@eclipse-glsp-examples/workflow-server-bundled 2.2.0-next.87 → 2.2.0-next.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/wf-glsp-server-node.js +1207 -433
- package/wf-glsp-server-node.js.map +1 -1
package/wf-glsp-server-node.js
CHANGED
|
@@ -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-
|
|
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()) };
|
|
@@ -6107,7 +6104,7 @@ exports.listen = listen;
|
|
|
6107
6104
|
"use strict";
|
|
6108
6105
|
|
|
6109
6106
|
/********************************************************************************
|
|
6110
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
6107
|
+
* Copyright (c) 2023-2024 EclipseSource and others.
|
|
6111
6108
|
*
|
|
6112
6109
|
* This program and the accompanying materials are made available under the
|
|
6113
6110
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -6637,10 +6634,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
6637
6634
|
********************************************************************************/
|
|
6638
6635
|
__exportStar(__webpack_require__(/*! ./action-protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/action-protocol/index.js"), exports);
|
|
6639
6636
|
__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
6637
|
__exportStar(__webpack_require__(/*! ./model */ "../../node_modules/@eclipse-glsp/protocol/lib/model/index.js"), exports);
|
|
6642
6638
|
__exportStar(__webpack_require__(/*! ./re-exports */ "../../node_modules/@eclipse-glsp/protocol/lib/re-exports.js"), exports);
|
|
6643
6639
|
__exportStar(__webpack_require__(/*! ./sprotty-actions */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-actions.js"), exports);
|
|
6640
|
+
__exportStar(__webpack_require__(/*! ./sprotty-geometry-bounds */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-bounds.js"), exports);
|
|
6641
|
+
__exportStar(__webpack_require__(/*! ./sprotty-geometry-dimension */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-dimension.js"), exports);
|
|
6644
6642
|
__exportStar(__webpack_require__(/*! ./sprotty-geometry-point */ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-point.js"), exports);
|
|
6645
6643
|
__exportStar(__webpack_require__(/*! ./utils */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/index.js"), exports);
|
|
6646
6644
|
|
|
@@ -6875,6 +6873,116 @@ actions_1.SetViewportAction.is = (object) => base_protocol_1.Action.hasKind(obje
|
|
|
6875
6873
|
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
6874
|
|
|
6877
6875
|
|
|
6876
|
+
/***/ }),
|
|
6877
|
+
|
|
6878
|
+
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-bounds.js":
|
|
6879
|
+
/*!********************************************************************************!*\
|
|
6880
|
+
!*** ../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-bounds.js ***!
|
|
6881
|
+
\********************************************************************************/
|
|
6882
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6883
|
+
|
|
6884
|
+
"use strict";
|
|
6885
|
+
|
|
6886
|
+
/********************************************************************************
|
|
6887
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
6888
|
+
*
|
|
6889
|
+
* This program and the accompanying materials are made available under the
|
|
6890
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6891
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
6892
|
+
*
|
|
6893
|
+
* This Source Code may also be made available under the following Secondary
|
|
6894
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
6895
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
6896
|
+
* with the GNU Classpath Exception which is available at
|
|
6897
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
6898
|
+
*
|
|
6899
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
6900
|
+
********************************************************************************/
|
|
6901
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
6902
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6903
|
+
exports.Bounds = void 0;
|
|
6904
|
+
const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
|
|
6905
|
+
Object.defineProperty(exports, "Bounds", ({ enumerable: true, get: function () { return geometry_1.Bounds; } }));
|
|
6906
|
+
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));
|
|
6907
|
+
geometry_1.Bounds.overlap = (one, other, touch) => {
|
|
6908
|
+
const oneTopLeft = geometry_1.Bounds.topLeft(one);
|
|
6909
|
+
const oneBottomRight = geometry_1.Bounds.bottomRight(one);
|
|
6910
|
+
const otherTopLeft = geometry_1.Bounds.topLeft(other);
|
|
6911
|
+
const otherBottomRight = geometry_1.Bounds.bottomRight(other);
|
|
6912
|
+
return touch
|
|
6913
|
+
? oneTopLeft.x <= otherBottomRight.x &&
|
|
6914
|
+
otherTopLeft.x <= oneBottomRight.x &&
|
|
6915
|
+
oneBottomRight.y >= otherTopLeft.y &&
|
|
6916
|
+
otherBottomRight.y >= oneTopLeft.y
|
|
6917
|
+
: oneTopLeft.x < otherBottomRight.x &&
|
|
6918
|
+
otherTopLeft.x < oneBottomRight.x &&
|
|
6919
|
+
oneBottomRight.y > otherTopLeft.y &&
|
|
6920
|
+
otherBottomRight.y > oneTopLeft.y;
|
|
6921
|
+
};
|
|
6922
|
+
geometry_1.Bounds.equals = (left, right) => geometry_1.Point.equals(left, right) && geometry_1.Dimension.equals(left, right);
|
|
6923
|
+
geometry_1.Bounds.left = (bounds) => bounds.x;
|
|
6924
|
+
geometry_1.Bounds.centerX = (bounds) => bounds.x + (bounds.width >= 0 ? bounds.width * 0.5 : 0);
|
|
6925
|
+
geometry_1.Bounds.right = (bounds) => bounds.x + bounds.width;
|
|
6926
|
+
geometry_1.Bounds.top = (bounds) => bounds.y;
|
|
6927
|
+
geometry_1.Bounds.middle = (bounds) => bounds.y + (bounds.height >= 0 ? bounds.height * 0.5 : 0);
|
|
6928
|
+
geometry_1.Bounds.centerY = geometry_1.Bounds.middle;
|
|
6929
|
+
geometry_1.Bounds.bottom = (bounds) => bounds.y + bounds.height;
|
|
6930
|
+
geometry_1.Bounds.topLeft = (bounds) => ({ x: geometry_1.Bounds.left(bounds), y: geometry_1.Bounds.top(bounds) });
|
|
6931
|
+
geometry_1.Bounds.topCenter = (bounds) => ({ x: geometry_1.Bounds.centerX(bounds), y: geometry_1.Bounds.top(bounds) });
|
|
6932
|
+
geometry_1.Bounds.topRight = (bounds) => ({ x: geometry_1.Bounds.right(bounds), y: geometry_1.Bounds.top(bounds) });
|
|
6933
|
+
geometry_1.Bounds.middleLeft = (bounds) => ({ x: geometry_1.Bounds.left(bounds), y: geometry_1.Bounds.middle(bounds) });
|
|
6934
|
+
geometry_1.Bounds.middleCenter = (bounds) => ({ x: geometry_1.Bounds.centerX(bounds), y: geometry_1.Bounds.middle(bounds) });
|
|
6935
|
+
geometry_1.Bounds.middleRight = (bounds) => ({ x: geometry_1.Bounds.right(bounds), y: geometry_1.Bounds.middle(bounds) });
|
|
6936
|
+
geometry_1.Bounds.bottomLeft = (bounds) => ({ x: geometry_1.Bounds.left(bounds), y: geometry_1.Bounds.bottom(bounds) });
|
|
6937
|
+
geometry_1.Bounds.bottomCenter = (bounds) => ({ x: geometry_1.Bounds.centerX(bounds), y: geometry_1.Bounds.bottom(bounds) });
|
|
6938
|
+
geometry_1.Bounds.bottomRight = (bounds) => ({ x: geometry_1.Bounds.right(bounds), y: geometry_1.Bounds.bottom(bounds) });
|
|
6939
|
+
geometry_1.Bounds.isAbove = (leftBounds, rightBounds) => geometry_1.Bounds.top(leftBounds) <= geometry_1.Bounds.top(rightBounds);
|
|
6940
|
+
geometry_1.Bounds.isBelow = (leftBounds, rightBounds) => geometry_1.Bounds.top(leftBounds) >= geometry_1.Bounds.top(rightBounds);
|
|
6941
|
+
geometry_1.Bounds.isBefore = (leftBounds, rightBounds) => geometry_1.Bounds.left(leftBounds) < geometry_1.Bounds.left(rightBounds);
|
|
6942
|
+
geometry_1.Bounds.isAfter = (leftBounds, rightBounds) => geometry_1.Bounds.left(leftBounds) >= geometry_1.Bounds.left(rightBounds);
|
|
6943
|
+
geometry_1.Bounds.sortBy = (rankFunc, ...bounds) => bounds.sort((left, right) => rankFunc(left) - rankFunc(right));
|
|
6944
|
+
geometry_1.Bounds.from = (topLeft, bottomRight) => (Object.assign(Object.assign({}, topLeft), { width: bottomRight.x - topLeft.x, height: bottomRight.y - topLeft.y }));
|
|
6945
|
+
|
|
6946
|
+
|
|
6947
|
+
/***/ }),
|
|
6948
|
+
|
|
6949
|
+
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-dimension.js":
|
|
6950
|
+
/*!***********************************************************************************!*\
|
|
6951
|
+
!*** ../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-dimension.js ***!
|
|
6952
|
+
\***********************************************************************************/
|
|
6953
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6954
|
+
|
|
6955
|
+
"use strict";
|
|
6956
|
+
|
|
6957
|
+
/********************************************************************************
|
|
6958
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
6959
|
+
*
|
|
6960
|
+
* This program and the accompanying materials are made available under the
|
|
6961
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6962
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
6963
|
+
*
|
|
6964
|
+
* This Source Code may also be made available under the following Secondary
|
|
6965
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
6966
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
6967
|
+
* with the GNU Classpath Exception which is available at
|
|
6968
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
6969
|
+
*
|
|
6970
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
6971
|
+
********************************************************************************/
|
|
6972
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
6973
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6974
|
+
exports.Dimension = void 0;
|
|
6975
|
+
const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
|
|
6976
|
+
Object.defineProperty(exports, "Dimension", ({ enumerable: true, get: function () { return geometry_1.Dimension; } }));
|
|
6977
|
+
geometry_1.Dimension.center = (d) => ({ x: d.width * 0.5, y: d.height * 0.5 });
|
|
6978
|
+
geometry_1.Dimension.add = (d, a) => ({ width: d.width + a.width, height: d.height + a.height });
|
|
6979
|
+
geometry_1.Dimension.subtract = (d, a) => ({ width: d.width - a.width, height: d.height - a.height });
|
|
6980
|
+
geometry_1.Dimension.multiplyMeasure = (d, m) => ({ width: d.width * m, height: d.height * m });
|
|
6981
|
+
geometry_1.Dimension.divideMeasure = (d, m) => ({ width: d.width / m, height: d.height / m });
|
|
6982
|
+
geometry_1.Dimension.map = (dimension, callbackfn) => (Object.assign(Object.assign({}, dimension), { width: callbackfn(dimension.width, 'width'), height: callbackfn(dimension.height, 'height') }));
|
|
6983
|
+
geometry_1.Dimension.equals = (left, right) => left.width === right.width && left.height === right.height;
|
|
6984
|
+
|
|
6985
|
+
|
|
6878
6986
|
/***/ }),
|
|
6879
6987
|
|
|
6880
6988
|
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/sprotty-geometry-point.js":
|
|
@@ -6905,7 +7013,36 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
6905
7013
|
exports.Point = void 0;
|
|
6906
7014
|
const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
|
|
6907
7015
|
Object.defineProperty(exports, "Point", ({ enumerable: true, get: function () { return geometry_1.Point; } }));
|
|
7016
|
+
const utils_1 = __webpack_require__(/*! ./utils */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/index.js");
|
|
7017
|
+
geometry_1.Point.is = (point) => utils_1.AnyObject.is(point) && (0, utils_1.hasNumberProp)(point, 'x') && (0, utils_1.hasNumberProp)(point, 'y');
|
|
7018
|
+
geometry_1.Point.isOrigin = (point) => geometry_1.Point.equals(point, geometry_1.Point.ORIGIN);
|
|
6908
7019
|
geometry_1.Point.isValid = (point) => point !== undefined && !isNaN(point.x) && !isNaN(point.y);
|
|
7020
|
+
geometry_1.Point.abs = (point) => geometry_1.Point.map(point, Math.abs);
|
|
7021
|
+
geometry_1.Point.divideScalar = (point, scalar) => geometry_1.Point.map(point, coordinate => coordinate / scalar);
|
|
7022
|
+
geometry_1.Point.multiplyScalar = (point, scalar) => geometry_1.Point.map(point, coordinate => coordinate * scalar);
|
|
7023
|
+
geometry_1.Point.map = (point, callbackfn) => (Object.assign(Object.assign({}, point), { x: callbackfn(point.x, 'x'), y: callbackfn(point.y, 'y') }));
|
|
7024
|
+
geometry_1.Point.snapToGrid = (point, grid, gridOrigin) => {
|
|
7025
|
+
if (gridOrigin) {
|
|
7026
|
+
// move point relative to grid origin and then restore after snapping
|
|
7027
|
+
const relative = geometry_1.Point.subtract(point, gridOrigin);
|
|
7028
|
+
const snapped = geometry_1.Point.snapToGrid(relative, grid);
|
|
7029
|
+
return geometry_1.Point.add(gridOrigin, snapped);
|
|
7030
|
+
}
|
|
7031
|
+
else {
|
|
7032
|
+
return { x: Math.round(point.x / grid.x) * grid.x, y: Math.round(point.y / grid.y) * grid.y };
|
|
7033
|
+
}
|
|
7034
|
+
};
|
|
7035
|
+
geometry_1.Point.vector = (from, to) => geometry_1.Point.subtract(to, from);
|
|
7036
|
+
geometry_1.Point.move = (from, to) => {
|
|
7037
|
+
const vector = geometry_1.Point.vector(from, to);
|
|
7038
|
+
const direction = utils_1.Vector.direction(vector);
|
|
7039
|
+
return { from, to, vector, direction };
|
|
7040
|
+
};
|
|
7041
|
+
geometry_1.Point.moveTowards = (from, vector) => {
|
|
7042
|
+
const to = geometry_1.Point.add(from, vector);
|
|
7043
|
+
const dir = utils_1.Vector.direction(vector);
|
|
7044
|
+
return { from, to, vector, direction: dir };
|
|
7045
|
+
};
|
|
6909
7046
|
|
|
6910
7047
|
|
|
6911
7048
|
/***/ }),
|
|
@@ -6934,7 +7071,7 @@ geometry_1.Point.isValid = (point) => point !== undefined && !isNaN(point.x) &&
|
|
|
6934
7071
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
6935
7072
|
********************************************************************************/
|
|
6936
7073
|
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;
|
|
7074
|
+
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
7075
|
function first(array, n) {
|
|
6939
7076
|
if (n) {
|
|
6940
7077
|
return array.filter((_, index) => index < n);
|
|
@@ -7082,6 +7219,15 @@ function partition(source, matchGuard) {
|
|
|
7082
7219
|
return { match, rest };
|
|
7083
7220
|
}
|
|
7084
7221
|
exports.partition = partition;
|
|
7222
|
+
/**
|
|
7223
|
+
* Helper function to create an array of values without any undefined values.
|
|
7224
|
+
* @param values The values to create the array from.
|
|
7225
|
+
* @returns The array of values without any undefined values.
|
|
7226
|
+
*/
|
|
7227
|
+
function arrayOf(...values) {
|
|
7228
|
+
return values.filter(element => element !== undefined);
|
|
7229
|
+
}
|
|
7230
|
+
exports.arrayOf = arrayOf;
|
|
7085
7231
|
|
|
7086
7232
|
|
|
7087
7233
|
/***/ }),
|
|
@@ -7157,6 +7303,12 @@ class DisposableCollection {
|
|
|
7157
7303
|
get isDisposed() {
|
|
7158
7304
|
return this.disposed;
|
|
7159
7305
|
}
|
|
7306
|
+
/**
|
|
7307
|
+
* Removes all disposables in this collection WITHOUT triggering their disposal behavior.
|
|
7308
|
+
*/
|
|
7309
|
+
clear() {
|
|
7310
|
+
this.disposables.length = 0;
|
|
7311
|
+
}
|
|
7160
7312
|
}
|
|
7161
7313
|
exports.DisposableCollection = DisposableCollection;
|
|
7162
7314
|
|
|
@@ -7210,6 +7362,373 @@ class Emitter extends jsonrpc.Emitter {
|
|
|
7210
7362
|
exports.Emitter = Emitter;
|
|
7211
7363
|
|
|
7212
7364
|
|
|
7365
|
+
/***/ }),
|
|
7366
|
+
|
|
7367
|
+
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-movement.js":
|
|
7368
|
+
/*!********************************************************************************!*\
|
|
7369
|
+
!*** ../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-movement.js ***!
|
|
7370
|
+
\********************************************************************************/
|
|
7371
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7372
|
+
|
|
7373
|
+
"use strict";
|
|
7374
|
+
|
|
7375
|
+
/********************************************************************************
|
|
7376
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
7377
|
+
*
|
|
7378
|
+
* This program and the accompanying materials are made available under the
|
|
7379
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7380
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7381
|
+
*
|
|
7382
|
+
* This Source Code may also be made available under the following Secondary
|
|
7383
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
7384
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
7385
|
+
* with the GNU Classpath Exception which is available at
|
|
7386
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
7387
|
+
*
|
|
7388
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
7389
|
+
********************************************************************************/
|
|
7390
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7391
|
+
exports.Movement = void 0;
|
|
7392
|
+
const geometry_1 = __webpack_require__(/*! sprotty-protocol/lib/utils/geometry */ "../../node_modules/sprotty-protocol/lib/utils/geometry.js");
|
|
7393
|
+
const geometry_vector_1 = __webpack_require__(/*! ./geometry-vector */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js");
|
|
7394
|
+
const type_util_1 = __webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js");
|
|
7395
|
+
/**
|
|
7396
|
+
* A collection of utility functions for working with movements.
|
|
7397
|
+
|
|
7398
|
+
*/
|
|
7399
|
+
var Movement;
|
|
7400
|
+
(function (Movement) {
|
|
7401
|
+
/**
|
|
7402
|
+
* The zero movement. It has from and to set to the origin and the vector set to zero.
|
|
7403
|
+
*/
|
|
7404
|
+
Movement.ZERO = Object.freeze({
|
|
7405
|
+
from: geometry_1.Point.ORIGIN,
|
|
7406
|
+
to: geometry_1.Point.ORIGIN,
|
|
7407
|
+
vector: geometry_vector_1.Vector.ZERO,
|
|
7408
|
+
direction: []
|
|
7409
|
+
});
|
|
7410
|
+
/**
|
|
7411
|
+
* A type guard that checks if the given object is a movement.
|
|
7412
|
+
* @param obj the object to check
|
|
7413
|
+
* @returns true if the object is a movement, false otherwise
|
|
7414
|
+
*/
|
|
7415
|
+
function is(obj) {
|
|
7416
|
+
return (type_util_1.AnyObject.is(obj) &&
|
|
7417
|
+
(0, type_util_1.hasObjectProp)(obj, 'from') &&
|
|
7418
|
+
geometry_1.Point.is(obj.from) &&
|
|
7419
|
+
(0, type_util_1.hasObjectProp)(obj, 'to') &&
|
|
7420
|
+
geometry_1.Point.is(obj.to) &&
|
|
7421
|
+
(0, type_util_1.hasObjectProp)(obj, 'vector') &&
|
|
7422
|
+
geometry_vector_1.Vector.is(obj.to) &&
|
|
7423
|
+
(0, type_util_1.hasObjectProp)(obj, 'direction'));
|
|
7424
|
+
}
|
|
7425
|
+
Movement.is = is;
|
|
7426
|
+
/**
|
|
7427
|
+
* Checks if the given movement is stationary, i.e. the starting point and end point are equal and the vector is zero.
|
|
7428
|
+
* @param movement the movement to check
|
|
7429
|
+
* @returns true if the movement is stationary, false otherwise
|
|
7430
|
+
*/
|
|
7431
|
+
function isStationary(movement) {
|
|
7432
|
+
return geometry_vector_1.Vector.isZero(movement.vector);
|
|
7433
|
+
}
|
|
7434
|
+
Movement.isStationary = isStationary;
|
|
7435
|
+
/**
|
|
7436
|
+
* Checks if the given movement is zero, i.e., all values are zero.
|
|
7437
|
+
* @param movement the movement to check
|
|
7438
|
+
* @returns true if the movement is zero, false otherwise
|
|
7439
|
+
*/
|
|
7440
|
+
function isZero(movement) {
|
|
7441
|
+
return Movement.equals(movement, Movement.ZERO);
|
|
7442
|
+
}
|
|
7443
|
+
Movement.isZero = isZero;
|
|
7444
|
+
/**
|
|
7445
|
+
* Checks if two movements are equal. Two movements are equal if their starting points, end points, and vectors are equal.
|
|
7446
|
+
* @param left the left movement
|
|
7447
|
+
* @param right the right movement
|
|
7448
|
+
* @returns true if the movements are equal, false otherwise
|
|
7449
|
+
*/
|
|
7450
|
+
function equals(left, right) {
|
|
7451
|
+
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);
|
|
7452
|
+
}
|
|
7453
|
+
Movement.equals = equals;
|
|
7454
|
+
})(Movement || (exports.Movement = Movement = {}));
|
|
7455
|
+
|
|
7456
|
+
|
|
7457
|
+
/***/ }),
|
|
7458
|
+
|
|
7459
|
+
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js":
|
|
7460
|
+
/*!****************************************************************************!*\
|
|
7461
|
+
!*** ../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js ***!
|
|
7462
|
+
\****************************************************************************/
|
|
7463
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
7464
|
+
|
|
7465
|
+
"use strict";
|
|
7466
|
+
|
|
7467
|
+
/********************************************************************************
|
|
7468
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
7469
|
+
*
|
|
7470
|
+
* This program and the accompanying materials are made available under the
|
|
7471
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7472
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7473
|
+
*
|
|
7474
|
+
* This Source Code may also be made available under the following Secondary
|
|
7475
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
7476
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
7477
|
+
* with the GNU Classpath Exception which is available at
|
|
7478
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
7479
|
+
*
|
|
7480
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
7481
|
+
********************************************************************************/
|
|
7482
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7483
|
+
exports.Direction = void 0;
|
|
7484
|
+
/**
|
|
7485
|
+
* A direction in 2D space.
|
|
7486
|
+
*/
|
|
7487
|
+
exports.Direction = {
|
|
7488
|
+
Left: 'left',
|
|
7489
|
+
Right: 'right',
|
|
7490
|
+
Up: 'up',
|
|
7491
|
+
Down: 'down'
|
|
7492
|
+
};
|
|
7493
|
+
|
|
7494
|
+
|
|
7495
|
+
/***/ }),
|
|
7496
|
+
|
|
7497
|
+
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js":
|
|
7498
|
+
/*!******************************************************************************!*\
|
|
7499
|
+
!*** ../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js ***!
|
|
7500
|
+
\******************************************************************************/
|
|
7501
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7502
|
+
|
|
7503
|
+
"use strict";
|
|
7504
|
+
|
|
7505
|
+
/********************************************************************************
|
|
7506
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
7507
|
+
*
|
|
7508
|
+
* This program and the accompanying materials are made available under the
|
|
7509
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7510
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7511
|
+
*
|
|
7512
|
+
* This Source Code may also be made available under the following Secondary
|
|
7513
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
7514
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
7515
|
+
* with the GNU Classpath Exception which is available at
|
|
7516
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
7517
|
+
*
|
|
7518
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
7519
|
+
********************************************************************************/
|
|
7520
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7521
|
+
exports.Vector = void 0;
|
|
7522
|
+
const geometry_util_1 = __webpack_require__(/*! ./geometry-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js");
|
|
7523
|
+
const type_util_1 = __webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js");
|
|
7524
|
+
/**
|
|
7525
|
+
* A collection of utility functions for working with vectors.
|
|
7526
|
+
*/
|
|
7527
|
+
var Vector;
|
|
7528
|
+
(function (Vector) {
|
|
7529
|
+
/**
|
|
7530
|
+
* The zero vector. It has x and y set to 0.
|
|
7531
|
+
*/
|
|
7532
|
+
Vector.ZERO = Object.freeze({
|
|
7533
|
+
x: 0,
|
|
7534
|
+
y: 0
|
|
7535
|
+
});
|
|
7536
|
+
/**
|
|
7537
|
+
* Compute the absolute value of the vector.
|
|
7538
|
+
* @param vector the vector to compute the absolute value of
|
|
7539
|
+
* @returns the absolute value of the vector
|
|
7540
|
+
*/
|
|
7541
|
+
function abs(vector) {
|
|
7542
|
+
return { x: Math.abs(vector.x), y: Math.abs(vector.y) };
|
|
7543
|
+
}
|
|
7544
|
+
Vector.abs = abs;
|
|
7545
|
+
/**
|
|
7546
|
+
* Computes the sum of two vectors.
|
|
7547
|
+
* @param vector the vector to add to
|
|
7548
|
+
* @param addend the vector to add
|
|
7549
|
+
* @returns the sum of the two vectors
|
|
7550
|
+
*/
|
|
7551
|
+
function add(vector, addend) {
|
|
7552
|
+
return { x: vector.x + addend.x, y: vector.y + addend.y };
|
|
7553
|
+
}
|
|
7554
|
+
Vector.add = add;
|
|
7555
|
+
/**
|
|
7556
|
+
* Check if two vectors are equal.
|
|
7557
|
+
* @param left the left vector
|
|
7558
|
+
* @param right the right vector
|
|
7559
|
+
* @returns true if the vectors are equal, false otherwise
|
|
7560
|
+
*/
|
|
7561
|
+
function equals(left, right) {
|
|
7562
|
+
return left.x === right.x && left.y === right.y;
|
|
7563
|
+
}
|
|
7564
|
+
Vector.equals = equals;
|
|
7565
|
+
/**
|
|
7566
|
+
* Check if a vector is valid. A vector is valid if it is not undefined and both x and y are numbers.
|
|
7567
|
+
* @param vector the vector to check
|
|
7568
|
+
* @returns true if the vector is valid, false otherwise
|
|
7569
|
+
*/
|
|
7570
|
+
function isValid(vector) {
|
|
7571
|
+
return vector !== undefined && !isNaN(vector.x) && !isNaN(vector.y);
|
|
7572
|
+
}
|
|
7573
|
+
Vector.isValid = isValid;
|
|
7574
|
+
/**
|
|
7575
|
+
* Computes the magnitude of a vector defined as the square root of the sum of the squares of the x and y components.
|
|
7576
|
+
* @param point the vector to compute the magnitude of
|
|
7577
|
+
* @returns the magnitude of the vector
|
|
7578
|
+
*/
|
|
7579
|
+
function magnitude(point) {
|
|
7580
|
+
return Math.sqrt(Math.pow(point.x, 2) + Math.pow(point.y, 2));
|
|
7581
|
+
}
|
|
7582
|
+
Vector.magnitude = magnitude;
|
|
7583
|
+
/**
|
|
7584
|
+
* Maps each component of the vector to a new value given by the callback function.
|
|
7585
|
+
* @param vector the vector to map
|
|
7586
|
+
* @param callbackfn the function to map the components
|
|
7587
|
+
* @returns the mapped vector
|
|
7588
|
+
*/
|
|
7589
|
+
function map(vector, callbackfn) {
|
|
7590
|
+
return Object.assign(Object.assign({}, vector), { x: callbackfn(vector.x, 'x'), y: callbackfn(vector.y, 'y') });
|
|
7591
|
+
}
|
|
7592
|
+
Vector.map = map;
|
|
7593
|
+
/**
|
|
7594
|
+
* Computes the normalized vector of a given vector.
|
|
7595
|
+
* The normalized vector has the same direction as the original vector but a magnitude of 1.
|
|
7596
|
+
*
|
|
7597
|
+
* @param vector the vector to normalize
|
|
7598
|
+
* @returns the normalized vector
|
|
7599
|
+
*/
|
|
7600
|
+
function normalize(vector) {
|
|
7601
|
+
const mag = magnitude(vector);
|
|
7602
|
+
if (mag === 0 || mag === 1) {
|
|
7603
|
+
return Vector.ZERO;
|
|
7604
|
+
}
|
|
7605
|
+
return {
|
|
7606
|
+
x: vector.x / mag,
|
|
7607
|
+
y: vector.y / mag
|
|
7608
|
+
};
|
|
7609
|
+
}
|
|
7610
|
+
Vector.normalize = normalize;
|
|
7611
|
+
/**
|
|
7612
|
+
* Check if a vector is the zero vector.
|
|
7613
|
+
* @param vector the vector to check
|
|
7614
|
+
* @returns true if the vector is the zero vector, false otherwise
|
|
7615
|
+
*/
|
|
7616
|
+
function isZero(vector) {
|
|
7617
|
+
return Vector.equals(vector, Vector.ZERO);
|
|
7618
|
+
}
|
|
7619
|
+
Vector.isZero = isZero;
|
|
7620
|
+
/**
|
|
7621
|
+
* Type guard to check if a value is a vector.
|
|
7622
|
+
* @param vector the value to check
|
|
7623
|
+
* @returns true if the value is a vector, false otherwise
|
|
7624
|
+
*/
|
|
7625
|
+
function is(vector) {
|
|
7626
|
+
return type_util_1.AnyObject.is(vector) && (0, type_util_1.hasNumberProp)(vector, 'x') && (0, type_util_1.hasNumberProp)(vector, 'y');
|
|
7627
|
+
}
|
|
7628
|
+
Vector.is = is;
|
|
7629
|
+
/**
|
|
7630
|
+
* Divides each component of the vector by a scalar.
|
|
7631
|
+
*
|
|
7632
|
+
* @param vector the vector to divide
|
|
7633
|
+
* @param scalar the scalar to divide by
|
|
7634
|
+
* @returns the divided vector
|
|
7635
|
+
*/
|
|
7636
|
+
function divide(vector, scalar) {
|
|
7637
|
+
return Vector.map(vector, coordinate => coordinate / scalar);
|
|
7638
|
+
}
|
|
7639
|
+
Vector.divide = divide;
|
|
7640
|
+
/**
|
|
7641
|
+
* Multiplies each component of the vector by a scalar.
|
|
7642
|
+
*
|
|
7643
|
+
* @param vector the vector to multiply
|
|
7644
|
+
* @param scalar the scalar to multiply by
|
|
7645
|
+
* @returns the multiplied vector
|
|
7646
|
+
*/
|
|
7647
|
+
function multiply(vector, scalar) {
|
|
7648
|
+
return Vector.map(vector, coordinate => coordinate * scalar);
|
|
7649
|
+
}
|
|
7650
|
+
Vector.multiply = multiply;
|
|
7651
|
+
/**
|
|
7652
|
+
* Subtracts the subtrahend from the vector.
|
|
7653
|
+
*
|
|
7654
|
+
* @param vector the vector to subtract from
|
|
7655
|
+
* @param subtrahend the vector to subtract
|
|
7656
|
+
* @returns the subtracted vector
|
|
7657
|
+
*/
|
|
7658
|
+
function subtract(vector, subtrahend) {
|
|
7659
|
+
return { x: vector.x - subtrahend.x, y: vector.y - subtrahend.y };
|
|
7660
|
+
}
|
|
7661
|
+
Vector.subtract = subtract;
|
|
7662
|
+
/**
|
|
7663
|
+
* Reverse the direction of a vector.
|
|
7664
|
+
* @param vector the vector to reverse
|
|
7665
|
+
* @returns the reversed vector
|
|
7666
|
+
*/
|
|
7667
|
+
function reverse(vector) {
|
|
7668
|
+
return { x: -vector.x, y: -vector.y };
|
|
7669
|
+
}
|
|
7670
|
+
Vector.reverse = reverse;
|
|
7671
|
+
/**
|
|
7672
|
+
* Computes the direction of a vector
|
|
7673
|
+
* @param vector the vector to compute the direction of
|
|
7674
|
+
* @returns the direction of the vector
|
|
7675
|
+
*/
|
|
7676
|
+
function direction(vector) {
|
|
7677
|
+
const directions = [];
|
|
7678
|
+
if (vector.x < 0) {
|
|
7679
|
+
directions.push(geometry_util_1.Direction.Left);
|
|
7680
|
+
}
|
|
7681
|
+
else if (vector.x > 0) {
|
|
7682
|
+
directions.push(geometry_util_1.Direction.Right);
|
|
7683
|
+
}
|
|
7684
|
+
if (vector.y < 0) {
|
|
7685
|
+
directions.push(geometry_util_1.Direction.Up);
|
|
7686
|
+
}
|
|
7687
|
+
else if (vector.y > 0) {
|
|
7688
|
+
directions.push(geometry_util_1.Direction.Down);
|
|
7689
|
+
}
|
|
7690
|
+
return directions;
|
|
7691
|
+
}
|
|
7692
|
+
Vector.direction = direction;
|
|
7693
|
+
/**
|
|
7694
|
+
* Computes a vector that is the minimum of all given vectors.
|
|
7695
|
+
* @returns the minimum vector
|
|
7696
|
+
*/
|
|
7697
|
+
function min(...vectors) {
|
|
7698
|
+
return {
|
|
7699
|
+
x: Math.min(...vectors.map(vector => vector.x)),
|
|
7700
|
+
y: Math.min(...vectors.map(vector => vector.y))
|
|
7701
|
+
};
|
|
7702
|
+
}
|
|
7703
|
+
Vector.min = min;
|
|
7704
|
+
/**
|
|
7705
|
+
* Computes a vector that is the maximum of all given vectors.
|
|
7706
|
+
* @returns the maximum vector
|
|
7707
|
+
*/
|
|
7708
|
+
function max(...vectors) {
|
|
7709
|
+
return {
|
|
7710
|
+
x: Math.max(...vectors.map(vector => vector.x)),
|
|
7711
|
+
y: Math.max(...vectors.map(vector => vector.y))
|
|
7712
|
+
};
|
|
7713
|
+
}
|
|
7714
|
+
Vector.max = max;
|
|
7715
|
+
/**
|
|
7716
|
+
* Computes a vector that is the average of all given vectors.
|
|
7717
|
+
* @returns the average vector
|
|
7718
|
+
*/
|
|
7719
|
+
function avg(...vectors) {
|
|
7720
|
+
if (vectors.length === 0) {
|
|
7721
|
+
return Vector.ZERO;
|
|
7722
|
+
}
|
|
7723
|
+
return {
|
|
7724
|
+
x: vectors.reduce((prev, cur) => prev + cur.x, 0) / vectors.length,
|
|
7725
|
+
y: vectors.reduce((prev, cur) => prev + cur.y, 0) / vectors.length
|
|
7726
|
+
};
|
|
7727
|
+
}
|
|
7728
|
+
Vector.avg = avg;
|
|
7729
|
+
})(Vector || (exports.Vector = Vector = {}));
|
|
7730
|
+
|
|
7731
|
+
|
|
7213
7732
|
/***/ }),
|
|
7214
7733
|
|
|
7215
7734
|
/***/ "../../node_modules/@eclipse-glsp/protocol/lib/utils/index.js":
|
|
@@ -7253,9 +7772,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
7253
7772
|
__exportStar(__webpack_require__(/*! ./array-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/array-util.js"), exports);
|
|
7254
7773
|
__exportStar(__webpack_require__(/*! ./disposable */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/disposable.js"), exports);
|
|
7255
7774
|
__exportStar(__webpack_require__(/*! ./event */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/event.js"), exports);
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7775
|
+
__exportStar(__webpack_require__(/*! ./geometry-movement */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-movement.js"), exports);
|
|
7776
|
+
__exportStar(__webpack_require__(/*! ./geometry-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-util.js"), exports);
|
|
7777
|
+
__exportStar(__webpack_require__(/*! ./geometry-vector */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/geometry-vector.js"), exports);
|
|
7259
7778
|
__exportStar(__webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js"), exports);
|
|
7260
7779
|
|
|
7261
7780
|
|
|
@@ -7285,7 +7804,7 @@ __exportStar(__webpack_require__(/*! ./type-util */ "../../node_modules/@eclipse
|
|
|
7285
7804
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
7286
7805
|
********************************************************************************/
|
|
7287
7806
|
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;
|
|
7807
|
+
exports.hasArrayProp = exports.hasFunctionProp = exports.hasObjectProp = exports.hasNumberProp = exports.hasBooleanProp = exports.hasStringProp = exports.call = exports.toTypeGuard = exports.AnyObject = void 0;
|
|
7289
7808
|
var AnyObject;
|
|
7290
7809
|
(function (AnyObject) {
|
|
7291
7810
|
/**
|
|
@@ -7309,6 +7828,10 @@ function toTypeGuard(constructor) {
|
|
|
7309
7828
|
return (element) => element instanceof constructor;
|
|
7310
7829
|
}
|
|
7311
7830
|
exports.toTypeGuard = toTypeGuard;
|
|
7831
|
+
function call(maybeFun, ...args) {
|
|
7832
|
+
return typeof maybeFun === 'function' ? maybeFun(...args) : maybeFun;
|
|
7833
|
+
}
|
|
7834
|
+
exports.call = call;
|
|
7312
7835
|
/**
|
|
7313
7836
|
* Validates whether the given object has a property of type `string` with the given key.
|
|
7314
7837
|
* @param object The object that should be validated
|
|
@@ -27035,7 +27558,7 @@ var Reflect;
|
|
|
27035
27558
|
};
|
|
27036
27559
|
// Load global or shim versions of Map, Set, and WeakMap
|
|
27037
27560
|
var functionPrototype = Object.getPrototypeOf(Function);
|
|
27038
|
-
var usePolyfill = typeof process === "object" && process
|
|
27561
|
+
var usePolyfill = typeof process === "object" && process["env" + ""] && process["env" + ""]["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true";
|
|
27039
27562
|
var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill();
|
|
27040
27563
|
var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill();
|
|
27041
27564
|
var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
|
|
@@ -34830,6 +35353,154 @@ module.exports = __webpack_require__(/*! ./lib/node/main */ "../../node_modules/
|
|
|
34830
35353
|
"use strict";
|
|
34831
35354
|
|
|
34832
35355
|
|
|
35356
|
+
// Expose modern transport directly as the export
|
|
35357
|
+
module.exports = __webpack_require__(/*! ./modern */ "../../node_modules/winston-transport/modern.js");
|
|
35358
|
+
|
|
35359
|
+
// Expose legacy stream
|
|
35360
|
+
module.exports.LegacyTransportStream = __webpack_require__(/*! ./legacy */ "../../node_modules/winston-transport/legacy.js");
|
|
35361
|
+
|
|
35362
|
+
|
|
35363
|
+
/***/ }),
|
|
35364
|
+
|
|
35365
|
+
/***/ "../../node_modules/winston-transport/legacy.js":
|
|
35366
|
+
/*!******************************************************!*\
|
|
35367
|
+
!*** ../../node_modules/winston-transport/legacy.js ***!
|
|
35368
|
+
\******************************************************/
|
|
35369
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
35370
|
+
|
|
35371
|
+
"use strict";
|
|
35372
|
+
|
|
35373
|
+
|
|
35374
|
+
const util = __webpack_require__(/*! util */ "util");
|
|
35375
|
+
const { LEVEL } = __webpack_require__(/*! triple-beam */ "../../node_modules/triple-beam/index.js");
|
|
35376
|
+
const TransportStream = __webpack_require__(/*! ./modern */ "../../node_modules/winston-transport/modern.js");
|
|
35377
|
+
|
|
35378
|
+
/**
|
|
35379
|
+
* Constructor function for the LegacyTransportStream. This is an internal
|
|
35380
|
+
* wrapper `winston >= 3` uses to wrap older transports implementing
|
|
35381
|
+
* log(level, message, meta).
|
|
35382
|
+
* @param {Object} options - Options for this TransportStream instance.
|
|
35383
|
+
* @param {Transpot} options.transport - winston@2 or older Transport to wrap.
|
|
35384
|
+
*/
|
|
35385
|
+
|
|
35386
|
+
const LegacyTransportStream = module.exports = function LegacyTransportStream(options = {}) {
|
|
35387
|
+
TransportStream.call(this, options);
|
|
35388
|
+
if (!options.transport || typeof options.transport.log !== 'function') {
|
|
35389
|
+
throw new Error('Invalid transport, must be an object with a log method.');
|
|
35390
|
+
}
|
|
35391
|
+
|
|
35392
|
+
this.transport = options.transport;
|
|
35393
|
+
this.level = this.level || options.transport.level;
|
|
35394
|
+
this.handleExceptions = this.handleExceptions || options.transport.handleExceptions;
|
|
35395
|
+
|
|
35396
|
+
// Display our deprecation notice.
|
|
35397
|
+
this._deprecated();
|
|
35398
|
+
|
|
35399
|
+
// Properly bubble up errors from the transport to the
|
|
35400
|
+
// LegacyTransportStream instance, but only once no matter how many times
|
|
35401
|
+
// this transport is shared.
|
|
35402
|
+
function transportError(err) {
|
|
35403
|
+
this.emit('error', err, this.transport);
|
|
35404
|
+
}
|
|
35405
|
+
|
|
35406
|
+
if (!this.transport.__winstonError) {
|
|
35407
|
+
this.transport.__winstonError = transportError.bind(this);
|
|
35408
|
+
this.transport.on('error', this.transport.__winstonError);
|
|
35409
|
+
}
|
|
35410
|
+
};
|
|
35411
|
+
|
|
35412
|
+
/*
|
|
35413
|
+
* Inherit from TransportStream using Node.js built-ins
|
|
35414
|
+
*/
|
|
35415
|
+
util.inherits(LegacyTransportStream, TransportStream);
|
|
35416
|
+
|
|
35417
|
+
/**
|
|
35418
|
+
* Writes the info object to our transport instance.
|
|
35419
|
+
* @param {mixed} info - TODO: add param description.
|
|
35420
|
+
* @param {mixed} enc - TODO: add param description.
|
|
35421
|
+
* @param {function} callback - TODO: add param description.
|
|
35422
|
+
* @returns {undefined}
|
|
35423
|
+
* @private
|
|
35424
|
+
*/
|
|
35425
|
+
LegacyTransportStream.prototype._write = function _write(info, enc, callback) {
|
|
35426
|
+
if (this.silent || (info.exception === true && !this.handleExceptions)) {
|
|
35427
|
+
return callback(null);
|
|
35428
|
+
}
|
|
35429
|
+
|
|
35430
|
+
// Remark: This has to be handled in the base transport now because we
|
|
35431
|
+
// cannot conditionally write to our pipe targets as stream.
|
|
35432
|
+
if (!this.level || this.levels[this.level] >= this.levels[info[LEVEL]]) {
|
|
35433
|
+
this.transport.log(info[LEVEL], info.message, info, this._nop);
|
|
35434
|
+
}
|
|
35435
|
+
|
|
35436
|
+
callback(null);
|
|
35437
|
+
};
|
|
35438
|
+
|
|
35439
|
+
/**
|
|
35440
|
+
* Writes the batch of info objects (i.e. "object chunks") to our transport
|
|
35441
|
+
* instance after performing any necessary filtering.
|
|
35442
|
+
* @param {mixed} chunks - TODO: add params description.
|
|
35443
|
+
* @param {function} callback - TODO: add params description.
|
|
35444
|
+
* @returns {mixed} - TODO: add returns description.
|
|
35445
|
+
* @private
|
|
35446
|
+
*/
|
|
35447
|
+
LegacyTransportStream.prototype._writev = function _writev(chunks, callback) {
|
|
35448
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
35449
|
+
if (this._accept(chunks[i])) {
|
|
35450
|
+
this.transport.log(
|
|
35451
|
+
chunks[i].chunk[LEVEL],
|
|
35452
|
+
chunks[i].chunk.message,
|
|
35453
|
+
chunks[i].chunk,
|
|
35454
|
+
this._nop
|
|
35455
|
+
);
|
|
35456
|
+
chunks[i].callback();
|
|
35457
|
+
}
|
|
35458
|
+
}
|
|
35459
|
+
|
|
35460
|
+
return callback(null);
|
|
35461
|
+
};
|
|
35462
|
+
|
|
35463
|
+
/**
|
|
35464
|
+
* Displays a deprecation notice. Defined as a function so it can be
|
|
35465
|
+
* overriden in tests.
|
|
35466
|
+
* @returns {undefined}
|
|
35467
|
+
*/
|
|
35468
|
+
LegacyTransportStream.prototype._deprecated = function _deprecated() {
|
|
35469
|
+
// eslint-disable-next-line no-console
|
|
35470
|
+
console.error([
|
|
35471
|
+
`${this.transport.name} is a legacy winston transport. Consider upgrading: `,
|
|
35472
|
+
'- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md'
|
|
35473
|
+
].join('\n'));
|
|
35474
|
+
};
|
|
35475
|
+
|
|
35476
|
+
/**
|
|
35477
|
+
* Clean up error handling state on the legacy transport associated
|
|
35478
|
+
* with this instance.
|
|
35479
|
+
* @returns {undefined}
|
|
35480
|
+
*/
|
|
35481
|
+
LegacyTransportStream.prototype.close = function close() {
|
|
35482
|
+
if (this.transport.close) {
|
|
35483
|
+
this.transport.close();
|
|
35484
|
+
}
|
|
35485
|
+
|
|
35486
|
+
if (this.transport.__winstonError) {
|
|
35487
|
+
this.transport.removeListener('error', this.transport.__winstonError);
|
|
35488
|
+
this.transport.__winstonError = null;
|
|
35489
|
+
}
|
|
35490
|
+
};
|
|
35491
|
+
|
|
35492
|
+
|
|
35493
|
+
/***/ }),
|
|
35494
|
+
|
|
35495
|
+
/***/ "../../node_modules/winston-transport/modern.js":
|
|
35496
|
+
/*!******************************************************!*\
|
|
35497
|
+
!*** ../../node_modules/winston-transport/modern.js ***!
|
|
35498
|
+
\******************************************************/
|
|
35499
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
35500
|
+
|
|
35501
|
+
"use strict";
|
|
35502
|
+
|
|
35503
|
+
|
|
34833
35504
|
const util = __webpack_require__(/*! util */ "util");
|
|
34834
35505
|
const Writable = __webpack_require__(/*! readable-stream/lib/_stream_writable.js */ "../../node_modules/readable-stream/lib/_stream_writable.js");
|
|
34835
35506
|
const { LEVEL } = __webpack_require__(/*! triple-beam */ "../../node_modules/triple-beam/index.js");
|
|
@@ -35041,140 +35712,6 @@ TransportStream.prototype._nop = function _nop() {
|
|
|
35041
35712
|
};
|
|
35042
35713
|
|
|
35043
35714
|
|
|
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
35715
|
/***/ }),
|
|
35179
35716
|
|
|
35180
35717
|
/***/ "../../node_modules/winston/lib/winston.js":
|
|
@@ -35321,6 +35858,17 @@ Object.defineProperty(exports, "exceptions", ({
|
|
|
35321
35858
|
}
|
|
35322
35859
|
}));
|
|
35323
35860
|
|
|
35861
|
+
/**
|
|
35862
|
+
* Define getter for `rejections` which replaces `handleRejections` and
|
|
35863
|
+
* `unhandleRejections`.
|
|
35864
|
+
* @type {Object}
|
|
35865
|
+
*/
|
|
35866
|
+
Object.defineProperty(exports, "rejections", ({
|
|
35867
|
+
get() {
|
|
35868
|
+
return defaultLogger.rejections;
|
|
35869
|
+
}
|
|
35870
|
+
}));
|
|
35871
|
+
|
|
35324
35872
|
/**
|
|
35325
35873
|
* Define getters / setters for appropriate properties of the default logger
|
|
35326
35874
|
* which need to be exposed by winston.
|
|
@@ -36808,7 +37356,7 @@ const asyncForEach = __webpack_require__(/*! async/forEach */ "../../node_module
|
|
|
36808
37356
|
const debug = __webpack_require__(/*! @dabh/diagnostics */ "../../node_modules/@dabh/diagnostics/node/index.js")('winston:rejection');
|
|
36809
37357
|
const once = __webpack_require__(/*! one-time */ "../../node_modules/one-time/index.js");
|
|
36810
37358
|
const stackTrace = __webpack_require__(/*! stack-trace */ "../../node_modules/stack-trace/lib/stack-trace.js");
|
|
36811
|
-
const
|
|
37359
|
+
const RejectionStream = __webpack_require__(/*! ./rejection-stream */ "../../node_modules/winston/lib/winston/rejection-stream.js");
|
|
36812
37360
|
|
|
36813
37361
|
/**
|
|
36814
37362
|
* Object for handling unhandledRejection events.
|
|
@@ -36884,7 +37432,7 @@ module.exports = class RejectionHandler {
|
|
|
36884
37432
|
err && err.stack || ' No stack trace'
|
|
36885
37433
|
].join('\n'),
|
|
36886
37434
|
stack: err && err.stack,
|
|
36887
|
-
|
|
37435
|
+
rejection: true,
|
|
36888
37436
|
date: new Date().toString(),
|
|
36889
37437
|
process: this.getProcessInfo(),
|
|
36890
37438
|
os: this.getOsInfo(),
|
|
@@ -36947,7 +37495,7 @@ module.exports = class RejectionHandler {
|
|
|
36947
37495
|
_addHandler(handler) {
|
|
36948
37496
|
if (!this.handlers.has(handler)) {
|
|
36949
37497
|
handler.handleRejections = true;
|
|
36950
|
-
const wrapper = new
|
|
37498
|
+
const wrapper = new RejectionStream(handler);
|
|
36951
37499
|
this.handlers.set(handler, wrapper);
|
|
36952
37500
|
this.logger.pipe(wrapper);
|
|
36953
37501
|
}
|
|
@@ -37047,6 +37595,69 @@ module.exports = class RejectionHandler {
|
|
|
37047
37595
|
};
|
|
37048
37596
|
|
|
37049
37597
|
|
|
37598
|
+
/***/ }),
|
|
37599
|
+
|
|
37600
|
+
/***/ "../../node_modules/winston/lib/winston/rejection-stream.js":
|
|
37601
|
+
/*!******************************************************************!*\
|
|
37602
|
+
!*** ../../node_modules/winston/lib/winston/rejection-stream.js ***!
|
|
37603
|
+
\******************************************************************/
|
|
37604
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
37605
|
+
|
|
37606
|
+
"use strict";
|
|
37607
|
+
/**
|
|
37608
|
+
* rejection-stream.js: TODO: add file header handler.
|
|
37609
|
+
*
|
|
37610
|
+
* (C) 2010 Charlie Robbins
|
|
37611
|
+
* MIT LICENCE
|
|
37612
|
+
*/
|
|
37613
|
+
|
|
37614
|
+
|
|
37615
|
+
|
|
37616
|
+
const { Writable } = __webpack_require__(/*! readable-stream */ "../../node_modules/readable-stream/readable.js");
|
|
37617
|
+
|
|
37618
|
+
/**
|
|
37619
|
+
* TODO: add class description.
|
|
37620
|
+
* @type {RejectionStream}
|
|
37621
|
+
* @extends {Writable}
|
|
37622
|
+
*/
|
|
37623
|
+
module.exports = class RejectionStream extends Writable {
|
|
37624
|
+
/**
|
|
37625
|
+
* Constructor function for the RejectionStream responsible for wrapping a
|
|
37626
|
+
* TransportStream; only allowing writes of `info` objects with
|
|
37627
|
+
* `info.rejection` set to true.
|
|
37628
|
+
* @param {!TransportStream} transport - Stream to filter to rejections
|
|
37629
|
+
*/
|
|
37630
|
+
constructor(transport) {
|
|
37631
|
+
super({ objectMode: true });
|
|
37632
|
+
|
|
37633
|
+
if (!transport) {
|
|
37634
|
+
throw new Error('RejectionStream requires a TransportStream instance.');
|
|
37635
|
+
}
|
|
37636
|
+
|
|
37637
|
+
this.handleRejections = true;
|
|
37638
|
+
this.transport = transport;
|
|
37639
|
+
}
|
|
37640
|
+
|
|
37641
|
+
/**
|
|
37642
|
+
* Writes the info object to our transport instance if (and only if) the
|
|
37643
|
+
* `rejection` property is set on the info.
|
|
37644
|
+
* @param {mixed} info - TODO: add param description.
|
|
37645
|
+
* @param {mixed} enc - TODO: add param description.
|
|
37646
|
+
* @param {mixed} callback - TODO: add param description.
|
|
37647
|
+
* @returns {mixed} - TODO: add return description.
|
|
37648
|
+
* @private
|
|
37649
|
+
*/
|
|
37650
|
+
_write(info, enc, callback) {
|
|
37651
|
+
if (info.rejection) {
|
|
37652
|
+
return this.transport.log(info, callback);
|
|
37653
|
+
}
|
|
37654
|
+
|
|
37655
|
+
callback();
|
|
37656
|
+
return true;
|
|
37657
|
+
}
|
|
37658
|
+
};
|
|
37659
|
+
|
|
37660
|
+
|
|
37050
37661
|
/***/ }),
|
|
37051
37662
|
|
|
37052
37663
|
/***/ "../../node_modules/winston/lib/winston/tail-file.js":
|
|
@@ -37519,7 +38130,7 @@ module.exports = class File extends TransportStream {
|
|
|
37519
38130
|
return;
|
|
37520
38131
|
}
|
|
37521
38132
|
if (this.lazy) {
|
|
37522
|
-
this._endStream(() => {this.emit('fileclosed')});
|
|
38133
|
+
this._endStream(() => {this.emit('fileclosed');});
|
|
37523
38134
|
return;
|
|
37524
38135
|
}
|
|
37525
38136
|
|
|
@@ -37924,12 +38535,6 @@ module.exports = class File extends TransportStream {
|
|
|
37924
38535
|
});
|
|
37925
38536
|
|
|
37926
38537
|
debug('create stream ok', fullpath);
|
|
37927
|
-
if (this.zippedArchive) {
|
|
37928
|
-
const gzip = zlib.createGzip();
|
|
37929
|
-
gzip.pipe(dest);
|
|
37930
|
-
return gzip;
|
|
37931
|
-
}
|
|
37932
|
-
|
|
37933
38538
|
return dest;
|
|
37934
38539
|
}
|
|
37935
38540
|
|
|
@@ -37942,13 +38547,33 @@ module.exports = class File extends TransportStream {
|
|
|
37942
38547
|
debug('_incFile', this.filename);
|
|
37943
38548
|
const ext = path.extname(this._basename);
|
|
37944
38549
|
const basename = path.basename(this._basename, ext);
|
|
38550
|
+
const tasks = [];
|
|
37945
38551
|
|
|
37946
|
-
if (
|
|
37947
|
-
|
|
37948
|
-
|
|
37949
|
-
|
|
37950
|
-
|
|
38552
|
+
if (this.zippedArchive) {
|
|
38553
|
+
tasks.push(
|
|
38554
|
+
function (cb) {
|
|
38555
|
+
const num = this._created > 0 && !this.tailable ? this._created : '';
|
|
38556
|
+
this._compressFile(
|
|
38557
|
+
path.join(this.dirname, `${basename}${num}${ext}`),
|
|
38558
|
+
path.join(this.dirname, `${basename}${num}${ext}.gz`),
|
|
38559
|
+
cb
|
|
38560
|
+
);
|
|
38561
|
+
}.bind(this)
|
|
38562
|
+
);
|
|
37951
38563
|
}
|
|
38564
|
+
|
|
38565
|
+
tasks.push(
|
|
38566
|
+
function (cb) {
|
|
38567
|
+
if (!this.tailable) {
|
|
38568
|
+
this._created += 1;
|
|
38569
|
+
this._checkMaxFilesIncrementing(ext, basename, cb);
|
|
38570
|
+
} else {
|
|
38571
|
+
this._checkMaxFilesTailable(ext, basename, cb);
|
|
38572
|
+
}
|
|
38573
|
+
}.bind(this)
|
|
38574
|
+
);
|
|
38575
|
+
|
|
38576
|
+
asyncSeries(tasks, callback);
|
|
37952
38577
|
}
|
|
37953
38578
|
|
|
37954
38579
|
/**
|
|
@@ -37967,13 +38592,9 @@ module.exports = class File extends TransportStream {
|
|
|
37967
38592
|
// Caveat emptor (indexzero): rotationFormat() was broken by design When
|
|
37968
38593
|
// combined with max files because the set of files to unlink is never
|
|
37969
38594
|
// stored.
|
|
37970
|
-
|
|
38595
|
+
return !this.tailable && this._created
|
|
37971
38596
|
? `${basename}${isRotation}${ext}`
|
|
37972
38597
|
: `${basename}${ext}`;
|
|
37973
|
-
|
|
37974
|
-
return this.zippedArchive && !this.tailable
|
|
37975
|
-
? `${target}.gz`
|
|
37976
|
-
: target;
|
|
37977
38598
|
}
|
|
37978
38599
|
|
|
37979
38600
|
/**
|
|
@@ -38036,13 +38657,36 @@ module.exports = class File extends TransportStream {
|
|
|
38036
38657
|
|
|
38037
38658
|
asyncSeries(tasks, () => {
|
|
38038
38659
|
fs.rename(
|
|
38039
|
-
path.join(this.dirname, `${basename}${ext}`),
|
|
38660
|
+
path.join(this.dirname, `${basename}${ext}${isZipped}`),
|
|
38040
38661
|
path.join(this.dirname, `${basename}1${ext}${isZipped}`),
|
|
38041
38662
|
callback
|
|
38042
38663
|
);
|
|
38043
38664
|
});
|
|
38044
38665
|
}
|
|
38045
38666
|
|
|
38667
|
+
/**
|
|
38668
|
+
* Compresses src to dest with gzip and unlinks src
|
|
38669
|
+
* @param {string} src - path to source file.
|
|
38670
|
+
* @param {string} dest - path to zipped destination file.
|
|
38671
|
+
* @param {Function} callback - callback called after file has been compressed.
|
|
38672
|
+
* @returns {undefined}
|
|
38673
|
+
* @private
|
|
38674
|
+
*/
|
|
38675
|
+
_compressFile(src, dest, callback) {
|
|
38676
|
+
fs.access(src, fs.F_OK, (err) => {
|
|
38677
|
+
if (err) {
|
|
38678
|
+
return callback();
|
|
38679
|
+
}
|
|
38680
|
+
var gzip = zlib.createGzip();
|
|
38681
|
+
var inp = fs.createReadStream(src);
|
|
38682
|
+
var out = fs.createWriteStream(dest);
|
|
38683
|
+
out.on('finish', () => {
|
|
38684
|
+
fs.unlink(src, callback);
|
|
38685
|
+
});
|
|
38686
|
+
inp.pipe(gzip).pipe(out);
|
|
38687
|
+
});
|
|
38688
|
+
}
|
|
38689
|
+
|
|
38046
38690
|
_createLogDirIfNotExist(dirPath) {
|
|
38047
38691
|
/* eslint-disable no-sync */
|
|
38048
38692
|
if (!fs.existsSync(dirPath)) {
|
|
@@ -38075,7 +38719,7 @@ const http = __webpack_require__(/*! http */ "http");
|
|
|
38075
38719
|
const https = __webpack_require__(/*! https */ "https");
|
|
38076
38720
|
const { Stream } = __webpack_require__(/*! readable-stream */ "../../node_modules/readable-stream/readable.js");
|
|
38077
38721
|
const TransportStream = __webpack_require__(/*! winston-transport */ "../../node_modules/winston-transport/index.js");
|
|
38078
|
-
const
|
|
38722
|
+
const { configure } = __webpack_require__(/*! safe-stable-stringify */ "../../node_modules/safe-stable-stringify/index.js");
|
|
38079
38723
|
|
|
38080
38724
|
/**
|
|
38081
38725
|
* Transport for outputting to a json-rpc server.
|
|
@@ -38099,6 +38743,7 @@ module.exports = class Http extends TransportStream {
|
|
|
38099
38743
|
this.port = options.port;
|
|
38100
38744
|
this.auth = options.auth;
|
|
38101
38745
|
this.path = options.path || '';
|
|
38746
|
+
this.maximumDepth = options.maximumDepth;
|
|
38102
38747
|
this.agent = options.agent;
|
|
38103
38748
|
this.headers = options.headers || {};
|
|
38104
38749
|
this.headers['content-type'] = 'application/json';
|
|
@@ -38317,6 +38962,9 @@ module.exports = class Http extends TransportStream {
|
|
|
38317
38962
|
req.on('response', res => (
|
|
38318
38963
|
res.on('end', () => callback(null, res)).resume()
|
|
38319
38964
|
));
|
|
38965
|
+
const jsonStringify = configure({
|
|
38966
|
+
...(this.maximumDepth && { maximumDepth: this.maximumDepth })
|
|
38967
|
+
});
|
|
38320
38968
|
req.end(Buffer.from(jsonStringify(options, this.options.replacer), 'utf8'));
|
|
38321
38969
|
}
|
|
38322
38970
|
};
|
|
@@ -39823,13 +40471,6 @@ const { concat, toArrayBuffer, unmask } = __webpack_require__(/*! ./buffer-util
|
|
|
39823
40471
|
const { isValidStatusCode, isValidUTF8 } = __webpack_require__(/*! ./validation */ "../../node_modules/ws/lib/validation.js");
|
|
39824
40472
|
|
|
39825
40473
|
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
40474
|
|
|
39834
40475
|
const GET_INFO = 0;
|
|
39835
40476
|
const GET_PAYLOAD_LENGTH_16 = 1;
|
|
@@ -39837,7 +40478,7 @@ const GET_PAYLOAD_LENGTH_64 = 2;
|
|
|
39837
40478
|
const GET_MASK = 3;
|
|
39838
40479
|
const GET_DATA = 4;
|
|
39839
40480
|
const INFLATING = 5;
|
|
39840
|
-
const
|
|
40481
|
+
const DEFER_EVENT = 6;
|
|
39841
40482
|
|
|
39842
40483
|
/**
|
|
39843
40484
|
* HyBi Receiver implementation.
|
|
@@ -39849,6 +40490,9 @@ class Receiver extends Writable {
|
|
|
39849
40490
|
* Creates a Receiver instance.
|
|
39850
40491
|
*
|
|
39851
40492
|
* @param {Object} [options] Options object
|
|
40493
|
+
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
|
|
40494
|
+
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
40495
|
+
* multiple times in the same tick
|
|
39852
40496
|
* @param {String} [options.binaryType=nodebuffer] The type for binary data
|
|
39853
40497
|
* @param {Object} [options.extensions] An object containing the negotiated
|
|
39854
40498
|
* extensions
|
|
@@ -39861,6 +40505,10 @@ class Receiver extends Writable {
|
|
|
39861
40505
|
constructor(options = {}) {
|
|
39862
40506
|
super();
|
|
39863
40507
|
|
|
40508
|
+
this._allowSynchronousEvents =
|
|
40509
|
+
options.allowSynchronousEvents !== undefined
|
|
40510
|
+
? options.allowSynchronousEvents
|
|
40511
|
+
: true;
|
|
39864
40512
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
39865
40513
|
this._extensions = options.extensions || {};
|
|
39866
40514
|
this._isServer = !!options.isServer;
|
|
@@ -39883,8 +40531,9 @@ class Receiver extends Writable {
|
|
|
39883
40531
|
this._messageLength = 0;
|
|
39884
40532
|
this._fragments = [];
|
|
39885
40533
|
|
|
39886
|
-
this.
|
|
40534
|
+
this._errored = false;
|
|
39887
40535
|
this._loop = false;
|
|
40536
|
+
this._state = GET_INFO;
|
|
39888
40537
|
}
|
|
39889
40538
|
|
|
39890
40539
|
/**
|
|
@@ -39956,53 +40605,42 @@ class Receiver extends Writable {
|
|
|
39956
40605
|
* @private
|
|
39957
40606
|
*/
|
|
39958
40607
|
startLoop(cb) {
|
|
39959
|
-
let err;
|
|
39960
40608
|
this._loop = true;
|
|
39961
40609
|
|
|
39962
40610
|
do {
|
|
39963
40611
|
switch (this._state) {
|
|
39964
40612
|
case GET_INFO:
|
|
39965
|
-
|
|
40613
|
+
this.getInfo(cb);
|
|
39966
40614
|
break;
|
|
39967
40615
|
case GET_PAYLOAD_LENGTH_16:
|
|
39968
|
-
|
|
40616
|
+
this.getPayloadLength16(cb);
|
|
39969
40617
|
break;
|
|
39970
40618
|
case GET_PAYLOAD_LENGTH_64:
|
|
39971
|
-
|
|
40619
|
+
this.getPayloadLength64(cb);
|
|
39972
40620
|
break;
|
|
39973
40621
|
case GET_MASK:
|
|
39974
40622
|
this.getMask();
|
|
39975
40623
|
break;
|
|
39976
40624
|
case GET_DATA:
|
|
39977
|
-
|
|
40625
|
+
this.getData(cb);
|
|
39978
40626
|
break;
|
|
39979
40627
|
case INFLATING:
|
|
40628
|
+
case DEFER_EVENT:
|
|
39980
40629
|
this._loop = false;
|
|
39981
40630
|
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
40631
|
}
|
|
39994
40632
|
} while (this._loop);
|
|
39995
40633
|
|
|
39996
|
-
cb(
|
|
40634
|
+
if (!this._errored) cb();
|
|
39997
40635
|
}
|
|
39998
40636
|
|
|
39999
40637
|
/**
|
|
40000
40638
|
* Reads the first two bytes of a frame.
|
|
40001
40639
|
*
|
|
40002
|
-
* @
|
|
40640
|
+
* @param {Function} cb Callback
|
|
40003
40641
|
* @private
|
|
40004
40642
|
*/
|
|
40005
|
-
getInfo() {
|
|
40643
|
+
getInfo(cb) {
|
|
40006
40644
|
if (this._bufferedBytes < 2) {
|
|
40007
40645
|
this._loop = false;
|
|
40008
40646
|
return;
|
|
@@ -40011,27 +40649,31 @@ class Receiver extends Writable {
|
|
|
40011
40649
|
const buf = this.consume(2);
|
|
40012
40650
|
|
|
40013
40651
|
if ((buf[0] & 0x30) !== 0x00) {
|
|
40014
|
-
|
|
40015
|
-
return error(
|
|
40652
|
+
const error = this.createError(
|
|
40016
40653
|
RangeError,
|
|
40017
40654
|
'RSV2 and RSV3 must be clear',
|
|
40018
40655
|
true,
|
|
40019
40656
|
1002,
|
|
40020
40657
|
'WS_ERR_UNEXPECTED_RSV_2_3'
|
|
40021
40658
|
);
|
|
40659
|
+
|
|
40660
|
+
cb(error);
|
|
40661
|
+
return;
|
|
40022
40662
|
}
|
|
40023
40663
|
|
|
40024
40664
|
const compressed = (buf[0] & 0x40) === 0x40;
|
|
40025
40665
|
|
|
40026
40666
|
if (compressed && !this._extensions[PerMessageDeflate.extensionName]) {
|
|
40027
|
-
|
|
40028
|
-
return error(
|
|
40667
|
+
const error = this.createError(
|
|
40029
40668
|
RangeError,
|
|
40030
40669
|
'RSV1 must be clear',
|
|
40031
40670
|
true,
|
|
40032
40671
|
1002,
|
|
40033
40672
|
'WS_ERR_UNEXPECTED_RSV_1'
|
|
40034
40673
|
);
|
|
40674
|
+
|
|
40675
|
+
cb(error);
|
|
40676
|
+
return;
|
|
40035
40677
|
}
|
|
40036
40678
|
|
|
40037
40679
|
this._fin = (buf[0] & 0x80) === 0x80;
|
|
@@ -40040,86 +40682,100 @@ class Receiver extends Writable {
|
|
|
40040
40682
|
|
|
40041
40683
|
if (this._opcode === 0x00) {
|
|
40042
40684
|
if (compressed) {
|
|
40043
|
-
|
|
40044
|
-
return error(
|
|
40685
|
+
const error = this.createError(
|
|
40045
40686
|
RangeError,
|
|
40046
40687
|
'RSV1 must be clear',
|
|
40047
40688
|
true,
|
|
40048
40689
|
1002,
|
|
40049
40690
|
'WS_ERR_UNEXPECTED_RSV_1'
|
|
40050
40691
|
);
|
|
40692
|
+
|
|
40693
|
+
cb(error);
|
|
40694
|
+
return;
|
|
40051
40695
|
}
|
|
40052
40696
|
|
|
40053
40697
|
if (!this._fragmented) {
|
|
40054
|
-
|
|
40055
|
-
return error(
|
|
40698
|
+
const error = this.createError(
|
|
40056
40699
|
RangeError,
|
|
40057
40700
|
'invalid opcode 0',
|
|
40058
40701
|
true,
|
|
40059
40702
|
1002,
|
|
40060
40703
|
'WS_ERR_INVALID_OPCODE'
|
|
40061
40704
|
);
|
|
40705
|
+
|
|
40706
|
+
cb(error);
|
|
40707
|
+
return;
|
|
40062
40708
|
}
|
|
40063
40709
|
|
|
40064
40710
|
this._opcode = this._fragmented;
|
|
40065
40711
|
} else if (this._opcode === 0x01 || this._opcode === 0x02) {
|
|
40066
40712
|
if (this._fragmented) {
|
|
40067
|
-
|
|
40068
|
-
return error(
|
|
40713
|
+
const error = this.createError(
|
|
40069
40714
|
RangeError,
|
|
40070
40715
|
`invalid opcode ${this._opcode}`,
|
|
40071
40716
|
true,
|
|
40072
40717
|
1002,
|
|
40073
40718
|
'WS_ERR_INVALID_OPCODE'
|
|
40074
40719
|
);
|
|
40720
|
+
|
|
40721
|
+
cb(error);
|
|
40722
|
+
return;
|
|
40075
40723
|
}
|
|
40076
40724
|
|
|
40077
40725
|
this._compressed = compressed;
|
|
40078
40726
|
} else if (this._opcode > 0x07 && this._opcode < 0x0b) {
|
|
40079
40727
|
if (!this._fin) {
|
|
40080
|
-
|
|
40081
|
-
return error(
|
|
40728
|
+
const error = this.createError(
|
|
40082
40729
|
RangeError,
|
|
40083
40730
|
'FIN must be set',
|
|
40084
40731
|
true,
|
|
40085
40732
|
1002,
|
|
40086
40733
|
'WS_ERR_EXPECTED_FIN'
|
|
40087
40734
|
);
|
|
40735
|
+
|
|
40736
|
+
cb(error);
|
|
40737
|
+
return;
|
|
40088
40738
|
}
|
|
40089
40739
|
|
|
40090
40740
|
if (compressed) {
|
|
40091
|
-
|
|
40092
|
-
return error(
|
|
40741
|
+
const error = this.createError(
|
|
40093
40742
|
RangeError,
|
|
40094
40743
|
'RSV1 must be clear',
|
|
40095
40744
|
true,
|
|
40096
40745
|
1002,
|
|
40097
40746
|
'WS_ERR_UNEXPECTED_RSV_1'
|
|
40098
40747
|
);
|
|
40748
|
+
|
|
40749
|
+
cb(error);
|
|
40750
|
+
return;
|
|
40099
40751
|
}
|
|
40100
40752
|
|
|
40101
40753
|
if (
|
|
40102
40754
|
this._payloadLength > 0x7d ||
|
|
40103
40755
|
(this._opcode === 0x08 && this._payloadLength === 1)
|
|
40104
40756
|
) {
|
|
40105
|
-
|
|
40106
|
-
return error(
|
|
40757
|
+
const error = this.createError(
|
|
40107
40758
|
RangeError,
|
|
40108
40759
|
`invalid payload length ${this._payloadLength}`,
|
|
40109
40760
|
true,
|
|
40110
40761
|
1002,
|
|
40111
40762
|
'WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH'
|
|
40112
40763
|
);
|
|
40764
|
+
|
|
40765
|
+
cb(error);
|
|
40766
|
+
return;
|
|
40113
40767
|
}
|
|
40114
40768
|
} else {
|
|
40115
|
-
|
|
40116
|
-
return error(
|
|
40769
|
+
const error = this.createError(
|
|
40117
40770
|
RangeError,
|
|
40118
40771
|
`invalid opcode ${this._opcode}`,
|
|
40119
40772
|
true,
|
|
40120
40773
|
1002,
|
|
40121
40774
|
'WS_ERR_INVALID_OPCODE'
|
|
40122
40775
|
);
|
|
40776
|
+
|
|
40777
|
+
cb(error);
|
|
40778
|
+
return;
|
|
40123
40779
|
}
|
|
40124
40780
|
|
|
40125
40781
|
if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
|
|
@@ -40127,54 +40783,58 @@ class Receiver extends Writable {
|
|
|
40127
40783
|
|
|
40128
40784
|
if (this._isServer) {
|
|
40129
40785
|
if (!this._masked) {
|
|
40130
|
-
|
|
40131
|
-
return error(
|
|
40786
|
+
const error = this.createError(
|
|
40132
40787
|
RangeError,
|
|
40133
40788
|
'MASK must be set',
|
|
40134
40789
|
true,
|
|
40135
40790
|
1002,
|
|
40136
40791
|
'WS_ERR_EXPECTED_MASK'
|
|
40137
40792
|
);
|
|
40793
|
+
|
|
40794
|
+
cb(error);
|
|
40795
|
+
return;
|
|
40138
40796
|
}
|
|
40139
40797
|
} else if (this._masked) {
|
|
40140
|
-
|
|
40141
|
-
return error(
|
|
40798
|
+
const error = this.createError(
|
|
40142
40799
|
RangeError,
|
|
40143
40800
|
'MASK must be clear',
|
|
40144
40801
|
true,
|
|
40145
40802
|
1002,
|
|
40146
40803
|
'WS_ERR_UNEXPECTED_MASK'
|
|
40147
40804
|
);
|
|
40805
|
+
|
|
40806
|
+
cb(error);
|
|
40807
|
+
return;
|
|
40148
40808
|
}
|
|
40149
40809
|
|
|
40150
40810
|
if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
|
|
40151
40811
|
else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
|
|
40152
|
-
else
|
|
40812
|
+
else this.haveLength(cb);
|
|
40153
40813
|
}
|
|
40154
40814
|
|
|
40155
40815
|
/**
|
|
40156
40816
|
* Gets extended payload length (7+16).
|
|
40157
40817
|
*
|
|
40158
|
-
* @
|
|
40818
|
+
* @param {Function} cb Callback
|
|
40159
40819
|
* @private
|
|
40160
40820
|
*/
|
|
40161
|
-
getPayloadLength16() {
|
|
40821
|
+
getPayloadLength16(cb) {
|
|
40162
40822
|
if (this._bufferedBytes < 2) {
|
|
40163
40823
|
this._loop = false;
|
|
40164
40824
|
return;
|
|
40165
40825
|
}
|
|
40166
40826
|
|
|
40167
40827
|
this._payloadLength = this.consume(2).readUInt16BE(0);
|
|
40168
|
-
|
|
40828
|
+
this.haveLength(cb);
|
|
40169
40829
|
}
|
|
40170
40830
|
|
|
40171
40831
|
/**
|
|
40172
40832
|
* Gets extended payload length (7+64).
|
|
40173
40833
|
*
|
|
40174
|
-
* @
|
|
40834
|
+
* @param {Function} cb Callback
|
|
40175
40835
|
* @private
|
|
40176
40836
|
*/
|
|
40177
|
-
getPayloadLength64() {
|
|
40837
|
+
getPayloadLength64(cb) {
|
|
40178
40838
|
if (this._bufferedBytes < 8) {
|
|
40179
40839
|
this._loop = false;
|
|
40180
40840
|
return;
|
|
@@ -40188,38 +40848,42 @@ class Receiver extends Writable {
|
|
|
40188
40848
|
// if payload length is greater than this number.
|
|
40189
40849
|
//
|
|
40190
40850
|
if (num > Math.pow(2, 53 - 32) - 1) {
|
|
40191
|
-
|
|
40192
|
-
return error(
|
|
40851
|
+
const error = this.createError(
|
|
40193
40852
|
RangeError,
|
|
40194
40853
|
'Unsupported WebSocket frame: payload length > 2^53 - 1',
|
|
40195
40854
|
false,
|
|
40196
40855
|
1009,
|
|
40197
40856
|
'WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH'
|
|
40198
40857
|
);
|
|
40858
|
+
|
|
40859
|
+
cb(error);
|
|
40860
|
+
return;
|
|
40199
40861
|
}
|
|
40200
40862
|
|
|
40201
40863
|
this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
|
|
40202
|
-
|
|
40864
|
+
this.haveLength(cb);
|
|
40203
40865
|
}
|
|
40204
40866
|
|
|
40205
40867
|
/**
|
|
40206
40868
|
* Payload length has been read.
|
|
40207
40869
|
*
|
|
40208
|
-
* @
|
|
40870
|
+
* @param {Function} cb Callback
|
|
40209
40871
|
* @private
|
|
40210
40872
|
*/
|
|
40211
|
-
haveLength() {
|
|
40873
|
+
haveLength(cb) {
|
|
40212
40874
|
if (this._payloadLength && this._opcode < 0x08) {
|
|
40213
40875
|
this._totalPayloadLength += this._payloadLength;
|
|
40214
40876
|
if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
|
|
40215
|
-
|
|
40216
|
-
return error(
|
|
40877
|
+
const error = this.createError(
|
|
40217
40878
|
RangeError,
|
|
40218
40879
|
'Max payload size exceeded',
|
|
40219
40880
|
false,
|
|
40220
40881
|
1009,
|
|
40221
40882
|
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
|
|
40222
40883
|
);
|
|
40884
|
+
|
|
40885
|
+
cb(error);
|
|
40886
|
+
return;
|
|
40223
40887
|
}
|
|
40224
40888
|
}
|
|
40225
40889
|
|
|
@@ -40246,7 +40910,6 @@ class Receiver extends Writable {
|
|
|
40246
40910
|
* Reads data bytes.
|
|
40247
40911
|
*
|
|
40248
40912
|
* @param {Function} cb Callback
|
|
40249
|
-
* @return {(Error|RangeError|undefined)} A possible error
|
|
40250
40913
|
* @private
|
|
40251
40914
|
*/
|
|
40252
40915
|
getData(cb) {
|
|
@@ -40268,7 +40931,10 @@ class Receiver extends Writable {
|
|
|
40268
40931
|
}
|
|
40269
40932
|
}
|
|
40270
40933
|
|
|
40271
|
-
if (this._opcode > 0x07)
|
|
40934
|
+
if (this._opcode > 0x07) {
|
|
40935
|
+
this.controlMessage(data, cb);
|
|
40936
|
+
return;
|
|
40937
|
+
}
|
|
40272
40938
|
|
|
40273
40939
|
if (this._compressed) {
|
|
40274
40940
|
this._state = INFLATING;
|
|
@@ -40285,7 +40951,7 @@ class Receiver extends Writable {
|
|
|
40285
40951
|
this._fragments.push(data);
|
|
40286
40952
|
}
|
|
40287
40953
|
|
|
40288
|
-
|
|
40954
|
+
this.dataMessage(cb);
|
|
40289
40955
|
}
|
|
40290
40956
|
|
|
40291
40957
|
/**
|
|
@@ -40304,74 +40970,96 @@ class Receiver extends Writable {
|
|
|
40304
40970
|
if (buf.length) {
|
|
40305
40971
|
this._messageLength += buf.length;
|
|
40306
40972
|
if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
|
|
40307
|
-
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
|
|
40314
|
-
)
|
|
40973
|
+
const error = this.createError(
|
|
40974
|
+
RangeError,
|
|
40975
|
+
'Max payload size exceeded',
|
|
40976
|
+
false,
|
|
40977
|
+
1009,
|
|
40978
|
+
'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH'
|
|
40315
40979
|
);
|
|
40980
|
+
|
|
40981
|
+
cb(error);
|
|
40982
|
+
return;
|
|
40316
40983
|
}
|
|
40317
40984
|
|
|
40318
40985
|
this._fragments.push(buf);
|
|
40319
40986
|
}
|
|
40320
40987
|
|
|
40321
|
-
|
|
40322
|
-
if (
|
|
40323
|
-
|
|
40324
|
-
this.startLoop(cb);
|
|
40988
|
+
this.dataMessage(cb);
|
|
40989
|
+
if (this._state === GET_INFO) this.startLoop(cb);
|
|
40325
40990
|
});
|
|
40326
40991
|
}
|
|
40327
40992
|
|
|
40328
40993
|
/**
|
|
40329
40994
|
* Handles a data message.
|
|
40330
40995
|
*
|
|
40331
|
-
* @
|
|
40996
|
+
* @param {Function} cb Callback
|
|
40332
40997
|
* @private
|
|
40333
40998
|
*/
|
|
40334
|
-
dataMessage() {
|
|
40335
|
-
if (this._fin) {
|
|
40336
|
-
|
|
40337
|
-
|
|
40999
|
+
dataMessage(cb) {
|
|
41000
|
+
if (!this._fin) {
|
|
41001
|
+
this._state = GET_INFO;
|
|
41002
|
+
return;
|
|
41003
|
+
}
|
|
40338
41004
|
|
|
40339
|
-
|
|
40340
|
-
|
|
40341
|
-
this._fragmented = 0;
|
|
40342
|
-
this._fragments = [];
|
|
41005
|
+
const messageLength = this._messageLength;
|
|
41006
|
+
const fragments = this._fragments;
|
|
40343
41007
|
|
|
40344
|
-
|
|
40345
|
-
|
|
41008
|
+
this._totalPayloadLength = 0;
|
|
41009
|
+
this._messageLength = 0;
|
|
41010
|
+
this._fragmented = 0;
|
|
41011
|
+
this._fragments = [];
|
|
40346
41012
|
|
|
40347
|
-
|
|
40348
|
-
|
|
40349
|
-
|
|
40350
|
-
|
|
40351
|
-
|
|
40352
|
-
|
|
40353
|
-
|
|
41013
|
+
if (this._opcode === 2) {
|
|
41014
|
+
let data;
|
|
41015
|
+
|
|
41016
|
+
if (this._binaryType === 'nodebuffer') {
|
|
41017
|
+
data = concat(fragments, messageLength);
|
|
41018
|
+
} else if (this._binaryType === 'arraybuffer') {
|
|
41019
|
+
data = toArrayBuffer(concat(fragments, messageLength));
|
|
41020
|
+
} else {
|
|
41021
|
+
data = fragments;
|
|
41022
|
+
}
|
|
40354
41023
|
|
|
41024
|
+
if (this._allowSynchronousEvents) {
|
|
40355
41025
|
this.emit('message', data, true);
|
|
41026
|
+
this._state = GET_INFO;
|
|
40356
41027
|
} else {
|
|
40357
|
-
|
|
41028
|
+
this._state = DEFER_EVENT;
|
|
41029
|
+
setImmediate(() => {
|
|
41030
|
+
this.emit('message', data, true);
|
|
41031
|
+
this._state = GET_INFO;
|
|
41032
|
+
this.startLoop(cb);
|
|
41033
|
+
});
|
|
41034
|
+
}
|
|
41035
|
+
} else {
|
|
41036
|
+
const buf = concat(fragments, messageLength);
|
|
40358
41037
|
|
|
40359
|
-
|
|
40360
|
-
|
|
40361
|
-
|
|
40362
|
-
|
|
40363
|
-
|
|
40364
|
-
|
|
40365
|
-
|
|
40366
|
-
|
|
40367
|
-
|
|
40368
|
-
|
|
41038
|
+
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
41039
|
+
const error = this.createError(
|
|
41040
|
+
Error,
|
|
41041
|
+
'invalid UTF-8 sequence',
|
|
41042
|
+
true,
|
|
41043
|
+
1007,
|
|
41044
|
+
'WS_ERR_INVALID_UTF8'
|
|
41045
|
+
);
|
|
41046
|
+
|
|
41047
|
+
cb(error);
|
|
41048
|
+
return;
|
|
41049
|
+
}
|
|
40369
41050
|
|
|
41051
|
+
if (this._state === INFLATING || this._allowSynchronousEvents) {
|
|
40370
41052
|
this.emit('message', buf, false);
|
|
41053
|
+
this._state = GET_INFO;
|
|
41054
|
+
} else {
|
|
41055
|
+
this._state = DEFER_EVENT;
|
|
41056
|
+
setImmediate(() => {
|
|
41057
|
+
this.emit('message', buf, false);
|
|
41058
|
+
this._state = GET_INFO;
|
|
41059
|
+
this.startLoop(cb);
|
|
41060
|
+
});
|
|
40371
41061
|
}
|
|
40372
41062
|
}
|
|
40373
|
-
|
|
40374
|
-
this._state = WAIT_MICROTASK;
|
|
40375
41063
|
}
|
|
40376
41064
|
|
|
40377
41065
|
/**
|
|
@@ -40381,26 +41069,26 @@ class Receiver extends Writable {
|
|
|
40381
41069
|
* @return {(Error|RangeError|undefined)} A possible error
|
|
40382
41070
|
* @private
|
|
40383
41071
|
*/
|
|
40384
|
-
controlMessage(data) {
|
|
41072
|
+
controlMessage(data, cb) {
|
|
40385
41073
|
if (this._opcode === 0x08) {
|
|
40386
|
-
this._loop = false;
|
|
40387
|
-
|
|
40388
41074
|
if (data.length === 0) {
|
|
41075
|
+
this._loop = false;
|
|
40389
41076
|
this.emit('conclude', 1005, EMPTY_BUFFER);
|
|
40390
41077
|
this.end();
|
|
40391
|
-
|
|
40392
|
-
this._state = GET_INFO;
|
|
40393
41078
|
} else {
|
|
40394
41079
|
const code = data.readUInt16BE(0);
|
|
40395
41080
|
|
|
40396
41081
|
if (!isValidStatusCode(code)) {
|
|
40397
|
-
|
|
41082
|
+
const error = this.createError(
|
|
40398
41083
|
RangeError,
|
|
40399
41084
|
`invalid status code ${code}`,
|
|
40400
41085
|
true,
|
|
40401
41086
|
1002,
|
|
40402
41087
|
'WS_ERR_INVALID_CLOSE_CODE'
|
|
40403
41088
|
);
|
|
41089
|
+
|
|
41090
|
+
cb(error);
|
|
41091
|
+
return;
|
|
40404
41092
|
}
|
|
40405
41093
|
|
|
40406
41094
|
const buf = new FastBuffer(
|
|
@@ -40410,83 +41098,68 @@ class Receiver extends Writable {
|
|
|
40410
41098
|
);
|
|
40411
41099
|
|
|
40412
41100
|
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
40413
|
-
|
|
41101
|
+
const error = this.createError(
|
|
40414
41102
|
Error,
|
|
40415
41103
|
'invalid UTF-8 sequence',
|
|
40416
41104
|
true,
|
|
40417
41105
|
1007,
|
|
40418
41106
|
'WS_ERR_INVALID_UTF8'
|
|
40419
41107
|
);
|
|
41108
|
+
|
|
41109
|
+
cb(error);
|
|
41110
|
+
return;
|
|
40420
41111
|
}
|
|
40421
41112
|
|
|
41113
|
+
this._loop = false;
|
|
40422
41114
|
this.emit('conclude', code, buf);
|
|
40423
41115
|
this.end();
|
|
40424
|
-
|
|
40425
|
-
this._state = GET_INFO;
|
|
40426
41116
|
}
|
|
40427
|
-
|
|
40428
|
-
this.
|
|
40429
|
-
|
|
41117
|
+
|
|
41118
|
+
this._state = GET_INFO;
|
|
41119
|
+
return;
|
|
41120
|
+
}
|
|
41121
|
+
|
|
41122
|
+
if (this._allowSynchronousEvents) {
|
|
41123
|
+
this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
|
|
41124
|
+
this._state = GET_INFO;
|
|
40430
41125
|
} else {
|
|
40431
|
-
this.
|
|
40432
|
-
|
|
41126
|
+
this._state = DEFER_EVENT;
|
|
41127
|
+
setImmediate(() => {
|
|
41128
|
+
this.emit(this._opcode === 0x09 ? 'ping' : 'pong', data);
|
|
41129
|
+
this._state = GET_INFO;
|
|
41130
|
+
this.startLoop(cb);
|
|
41131
|
+
});
|
|
40433
41132
|
}
|
|
40434
41133
|
}
|
|
40435
|
-
}
|
|
40436
41134
|
|
|
40437
|
-
|
|
40438
|
-
|
|
40439
|
-
|
|
40440
|
-
|
|
40441
|
-
|
|
40442
|
-
|
|
40443
|
-
|
|
40444
|
-
|
|
40445
|
-
|
|
40446
|
-
|
|
40447
|
-
|
|
40448
|
-
|
|
40449
|
-
|
|
40450
|
-
|
|
40451
|
-
|
|
40452
|
-
const err = new ErrorCtor(
|
|
40453
|
-
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
40454
|
-
);
|
|
40455
|
-
|
|
40456
|
-
Error.captureStackTrace(err, error);
|
|
40457
|
-
err.code = errorCode;
|
|
40458
|
-
err[kStatusCode] = statusCode;
|
|
40459
|
-
return err;
|
|
40460
|
-
}
|
|
41135
|
+
/**
|
|
41136
|
+
* Builds an error object.
|
|
41137
|
+
*
|
|
41138
|
+
* @param {function(new:Error|RangeError)} ErrorCtor The error constructor
|
|
41139
|
+
* @param {String} message The error message
|
|
41140
|
+
* @param {Boolean} prefix Specifies whether or not to add a default prefix to
|
|
41141
|
+
* `message`
|
|
41142
|
+
* @param {Number} statusCode The status code
|
|
41143
|
+
* @param {String} errorCode The exposed error code
|
|
41144
|
+
* @return {(Error|RangeError)} The error
|
|
41145
|
+
* @private
|
|
41146
|
+
*/
|
|
41147
|
+
createError(ErrorCtor, message, prefix, statusCode, errorCode) {
|
|
41148
|
+
this._loop = false;
|
|
41149
|
+
this._errored = true;
|
|
40461
41150
|
|
|
40462
|
-
|
|
40463
|
-
|
|
40464
|
-
|
|
40465
|
-
* @param {Function} cb Callback
|
|
40466
|
-
*/
|
|
40467
|
-
function queueMicrotaskShim(cb) {
|
|
40468
|
-
promise.then(cb).catch(throwErrorNextTick);
|
|
40469
|
-
}
|
|
41151
|
+
const err = new ErrorCtor(
|
|
41152
|
+
prefix ? `Invalid WebSocket frame: ${message}` : message
|
|
41153
|
+
);
|
|
40470
41154
|
|
|
40471
|
-
|
|
40472
|
-
|
|
40473
|
-
|
|
40474
|
-
|
|
40475
|
-
|
|
40476
|
-
*/
|
|
40477
|
-
function throwError(err) {
|
|
40478
|
-
throw err;
|
|
41155
|
+
Error.captureStackTrace(err, this.createError);
|
|
41156
|
+
err.code = errorCode;
|
|
41157
|
+
err[kStatusCode] = statusCode;
|
|
41158
|
+
return err;
|
|
41159
|
+
}
|
|
40479
41160
|
}
|
|
40480
41161
|
|
|
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
|
-
}
|
|
41162
|
+
module.exports = Receiver;
|
|
40490
41163
|
|
|
40491
41164
|
|
|
40492
41165
|
/***/ }),
|
|
@@ -41370,7 +42043,7 @@ if (isUtf8) {
|
|
|
41370
42043
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41371
42044
|
|
|
41372
42045
|
"use strict";
|
|
41373
|
-
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$" }] */
|
|
42046
|
+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */
|
|
41374
42047
|
|
|
41375
42048
|
|
|
41376
42049
|
|
|
@@ -41401,6 +42074,11 @@ class WebSocketServer extends EventEmitter {
|
|
|
41401
42074
|
* Create a `WebSocketServer` instance.
|
|
41402
42075
|
*
|
|
41403
42076
|
* @param {Object} options Configuration options
|
|
42077
|
+
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
|
|
42078
|
+
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
42079
|
+
* multiple times in the same tick
|
|
42080
|
+
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
42081
|
+
* automatically send a pong in response to a ping
|
|
41404
42082
|
* @param {Number} [options.backlog=511] The maximum length of the queue of
|
|
41405
42083
|
* pending connections
|
|
41406
42084
|
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
@@ -41427,6 +42105,8 @@ class WebSocketServer extends EventEmitter {
|
|
|
41427
42105
|
super();
|
|
41428
42106
|
|
|
41429
42107
|
options = {
|
|
42108
|
+
allowSynchronousEvents: true,
|
|
42109
|
+
autoPong: true,
|
|
41430
42110
|
maxPayload: 100 * 1024 * 1024,
|
|
41431
42111
|
skipUTF8Validation: false,
|
|
41432
42112
|
perMessageDeflate: false,
|
|
@@ -41747,7 +42427,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
41747
42427
|
`Sec-WebSocket-Accept: ${digest}`
|
|
41748
42428
|
];
|
|
41749
42429
|
|
|
41750
|
-
const ws = new this.options.WebSocket(null);
|
|
42430
|
+
const ws = new this.options.WebSocket(null, undefined, this.options);
|
|
41751
42431
|
|
|
41752
42432
|
if (protocols.size) {
|
|
41753
42433
|
//
|
|
@@ -41781,6 +42461,7 @@ class WebSocketServer extends EventEmitter {
|
|
|
41781
42461
|
socket.removeListener('error', socketOnError);
|
|
41782
42462
|
|
|
41783
42463
|
ws.setSocket(socket, head, {
|
|
42464
|
+
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
41784
42465
|
maxPayload: this.options.maxPayload,
|
|
41785
42466
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
41786
42467
|
});
|
|
@@ -41912,7 +42593,7 @@ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message) {
|
|
|
41912
42593
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41913
42594
|
|
|
41914
42595
|
"use strict";
|
|
41915
|
-
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$" }] */
|
|
42596
|
+
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex|Readable$", "caughtErrors": "none" }] */
|
|
41916
42597
|
|
|
41917
42598
|
|
|
41918
42599
|
|
|
@@ -41998,6 +42679,7 @@ class WebSocket extends EventEmitter {
|
|
|
41998
42679
|
|
|
41999
42680
|
initAsClient(this, address, protocols, options);
|
|
42000
42681
|
} else {
|
|
42682
|
+
this._autoPong = options.autoPong;
|
|
42001
42683
|
this._isServer = true;
|
|
42002
42684
|
}
|
|
42003
42685
|
}
|
|
@@ -42106,6 +42788,9 @@ class WebSocket extends EventEmitter {
|
|
|
42106
42788
|
* @param {Duplex} socket The network socket between the server and client
|
|
42107
42789
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
42108
42790
|
* @param {Object} options Options object
|
|
42791
|
+
* @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
|
|
42792
|
+
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
42793
|
+
* multiple times in the same tick
|
|
42109
42794
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
42110
42795
|
* masking key
|
|
42111
42796
|
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
|
@@ -42115,6 +42800,7 @@ class WebSocket extends EventEmitter {
|
|
|
42115
42800
|
*/
|
|
42116
42801
|
setSocket(socket, head, options) {
|
|
42117
42802
|
const receiver = new Receiver({
|
|
42803
|
+
allowSynchronousEvents: options.allowSynchronousEvents,
|
|
42118
42804
|
binaryType: this.binaryType,
|
|
42119
42805
|
extensions: this._extensions,
|
|
42120
42806
|
isServer: this._isServer,
|
|
@@ -42532,6 +43218,13 @@ module.exports = WebSocket;
|
|
|
42532
43218
|
* @param {(String|URL)} address The URL to which to connect
|
|
42533
43219
|
* @param {Array} protocols The subprotocols
|
|
42534
43220
|
* @param {Object} [options] Connection options
|
|
43221
|
+
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any
|
|
43222
|
+
* of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple
|
|
43223
|
+
* times in the same tick
|
|
43224
|
+
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
43225
|
+
* automatically send a pong in response to a ping
|
|
43226
|
+
* @param {Function} [options.finishRequest] A function which can be used to
|
|
43227
|
+
* customize the headers of each http request before it is sent
|
|
42535
43228
|
* @param {Boolean} [options.followRedirects=false] Whether or not to follow
|
|
42536
43229
|
* redirects
|
|
42537
43230
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
@@ -42554,6 +43247,8 @@ module.exports = WebSocket;
|
|
|
42554
43247
|
*/
|
|
42555
43248
|
function initAsClient(websocket, address, protocols, options) {
|
|
42556
43249
|
const opts = {
|
|
43250
|
+
allowSynchronousEvents: true,
|
|
43251
|
+
autoPong: true,
|
|
42557
43252
|
protocolVersion: protocolVersions[1],
|
|
42558
43253
|
maxPayload: 100 * 1024 * 1024,
|
|
42559
43254
|
skipUTF8Validation: false,
|
|
@@ -42561,7 +43256,6 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
42561
43256
|
followRedirects: false,
|
|
42562
43257
|
maxRedirects: 10,
|
|
42563
43258
|
...options,
|
|
42564
|
-
createConnection: undefined,
|
|
42565
43259
|
socketPath: undefined,
|
|
42566
43260
|
hostname: undefined,
|
|
42567
43261
|
protocol: undefined,
|
|
@@ -42572,6 +43266,8 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
42572
43266
|
port: undefined
|
|
42573
43267
|
};
|
|
42574
43268
|
|
|
43269
|
+
websocket._autoPong = opts.autoPong;
|
|
43270
|
+
|
|
42575
43271
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
42576
43272
|
throw new RangeError(
|
|
42577
43273
|
`Unsupported protocol version: ${opts.protocolVersion} ` +
|
|
@@ -42630,7 +43326,8 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
42630
43326
|
const protocolSet = new Set();
|
|
42631
43327
|
let perMessageDeflate;
|
|
42632
43328
|
|
|
42633
|
-
opts.createConnection =
|
|
43329
|
+
opts.createConnection =
|
|
43330
|
+
opts.createConnection || (isSecure ? tlsConnect : netConnect);
|
|
42634
43331
|
opts.defaultPort = opts.defaultPort || defaultPort;
|
|
42635
43332
|
opts.port = parsedUrl.port || defaultPort;
|
|
42636
43333
|
opts.host = parsedUrl.hostname.startsWith('[')
|
|
@@ -42720,8 +43417,8 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
42720
43417
|
? opts.socketPath === websocket._originalHostOrSocketPath
|
|
42721
43418
|
: false
|
|
42722
43419
|
: websocket._originalIpc
|
|
42723
|
-
|
|
42724
|
-
|
|
43420
|
+
? false
|
|
43421
|
+
: parsedUrl.host === websocket._originalHostOrSocketPath;
|
|
42725
43422
|
|
|
42726
43423
|
if (!isSameHost || (websocket._originalSecure && !isSecure)) {
|
|
42727
43424
|
//
|
|
@@ -42905,6 +43602,7 @@ function initAsClient(websocket, address, protocols, options) {
|
|
|
42905
43602
|
}
|
|
42906
43603
|
|
|
42907
43604
|
websocket.setSocket(socket, head, {
|
|
43605
|
+
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
42908
43606
|
generateMask: opts.generateMask,
|
|
42909
43607
|
maxPayload: opts.maxPayload,
|
|
42910
43608
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
@@ -43115,7 +43813,7 @@ function receiverOnMessage(data, isBinary) {
|
|
|
43115
43813
|
function receiverOnPing(data) {
|
|
43116
43814
|
const websocket = this[kWebSocket];
|
|
43117
43815
|
|
|
43118
|
-
websocket.pong(data, !
|
|
43816
|
+
if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
|
|
43119
43817
|
websocket.emit('ping', data);
|
|
43120
43818
|
}
|
|
43121
43819
|
|
|
@@ -43246,7 +43944,7 @@ function socketOnError() {
|
|
|
43246
43944
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
43247
43945
|
exports.getDefaultMapping = void 0;
|
|
43248
43946
|
/********************************************************************************
|
|
43249
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
43947
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
43250
43948
|
*
|
|
43251
43949
|
* This program and the accompanying materials are made available under the
|
|
43252
43950
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -43732,7 +44430,7 @@ exports.GGraphBuilder = GGraphBuilder;
|
|
|
43732
44430
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
43733
44431
|
exports.GHtmlRootBuilder = exports.GHtmlRoot = void 0;
|
|
43734
44432
|
/********************************************************************************
|
|
43735
|
-
* Copyright (c) 2022 StMicroelectronics.
|
|
44433
|
+
* Copyright (c) 2022-2024 StMicroelectronics.
|
|
43736
44434
|
*
|
|
43737
44435
|
* This program and the accompanying materials are made available under the
|
|
43738
44436
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -43982,7 +44680,7 @@ var GLayoutingBuilder;
|
|
|
43982
44680
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
43983
44681
|
exports.GModelRootBuilder = exports.GModelRoot = exports.GModelElementBuilder = exports.GModelElement = void 0;
|
|
43984
44682
|
/********************************************************************************
|
|
43985
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
44683
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
43986
44684
|
*
|
|
43987
44685
|
* This program and the accompanying materials are made available under the
|
|
43988
44686
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -44479,7 +45177,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
44479
45177
|
};
|
|
44480
45178
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
44481
45179
|
/********************************************************************************
|
|
44482
|
-
* Copyright (c) 2022 STMicroelectronics and others.
|
|
45180
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
44483
45181
|
*
|
|
44484
45182
|
* This program and the accompanying materials are made available under the
|
|
44485
45183
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -44529,7 +45227,7 @@ __exportStar(__webpack_require__(/*! ./gshaped-prerendered-element */ "../../pac
|
|
|
44529
45227
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
44530
45228
|
exports.configureELKLayoutModule = void 0;
|
|
44531
45229
|
/********************************************************************************
|
|
44532
|
-
* Copyright (c) 2022-
|
|
45230
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
44533
45231
|
*
|
|
44534
45232
|
* This program and the accompanying materials are made available under the
|
|
44535
45233
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -44583,11 +45281,7 @@ function configureELKLayoutModule(options) {
|
|
|
44583
45281
|
}
|
|
44584
45282
|
const elkFactory = () => new elk_bundled_1.default({
|
|
44585
45283
|
algorithms: options.algorithms,
|
|
44586
|
-
defaultLayoutOptions: options.defaultLayoutOptions
|
|
44587
|
-
// The node implementation relied on elkjs' `FakeWorker` to set the `workerFactory`.
|
|
44588
|
-
// However, since the required file is dynamically loaded and not available in a web-worker context,
|
|
44589
|
-
// it needs to be mocked manually.
|
|
44590
|
-
workerFactory: () => ({ postMessage: () => { } })
|
|
45284
|
+
defaultLayoutOptions: options.defaultLayoutOptions
|
|
44591
45285
|
});
|
|
44592
45286
|
bind(glsp_elk_layout_engine_1.ElkFactory).toConstantValue(elkFactory);
|
|
44593
45287
|
bind(glsp_elk_layout_engine_1.GlspElkLayoutEngine)
|
|
@@ -45039,10 +45733,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
45039
45733
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
45040
45734
|
};
|
|
45041
45735
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
45736
|
+
/********************************************************************************
|
|
45737
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
45738
|
+
*
|
|
45739
|
+
* This program and the accompanying materials are made available under the
|
|
45740
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
45741
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
45742
|
+
*
|
|
45743
|
+
* This Source Code may also be made available under the following Secondary
|
|
45744
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
45745
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
45746
|
+
* with the GNU Classpath Exception which is available at
|
|
45747
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
45748
|
+
*
|
|
45749
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
45750
|
+
********************************************************************************/
|
|
45042
45751
|
__exportStar(__webpack_require__(/*! ./di.config */ "../../packages/layout-elk/lib/di.config.js"), exports);
|
|
45043
45752
|
__exportStar(__webpack_require__(/*! ./element-filter */ "../../packages/layout-elk/lib/element-filter.js"), exports);
|
|
45044
45753
|
__exportStar(__webpack_require__(/*! ./glsp-elk-layout-engine */ "../../packages/layout-elk/lib/glsp-elk-layout-engine.js"), exports);
|
|
45045
45754
|
__exportStar(__webpack_require__(/*! ./layout-configurator */ "../../packages/layout-elk/lib/layout-configurator.js"), exports);
|
|
45755
|
+
__exportStar(__webpack_require__(/*! ./reexport */ "../../packages/layout-elk/lib/reexport.js"), exports);
|
|
45046
45756
|
|
|
45047
45757
|
|
|
45048
45758
|
/***/ }),
|
|
@@ -45154,6 +45864,19 @@ exports.FallbackLayoutConfigurator = FallbackLayoutConfigurator = __decorate([
|
|
|
45154
45864
|
], FallbackLayoutConfigurator);
|
|
45155
45865
|
|
|
45156
45866
|
|
|
45867
|
+
/***/ }),
|
|
45868
|
+
|
|
45869
|
+
/***/ "../../packages/layout-elk/lib/reexport.js":
|
|
45870
|
+
/*!*************************************************!*\
|
|
45871
|
+
!*** ../../packages/layout-elk/lib/reexport.js ***!
|
|
45872
|
+
\*************************************************/
|
|
45873
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
45874
|
+
|
|
45875
|
+
"use strict";
|
|
45876
|
+
|
|
45877
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
45878
|
+
|
|
45879
|
+
|
|
45157
45880
|
/***/ }),
|
|
45158
45881
|
|
|
45159
45882
|
/***/ "../../packages/server/lib/common/actions/action-dispatcher.js":
|
|
@@ -45787,7 +46510,7 @@ exports.CompoundCommand = CompoundCommand;
|
|
|
45787
46510
|
"use strict";
|
|
45788
46511
|
|
|
45789
46512
|
/********************************************************************************
|
|
45790
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
46513
|
+
* Copyright (c) 2023-2024 EclipseSource and others.
|
|
45791
46514
|
*
|
|
45792
46515
|
* This program and the accompanying materials are made available under the
|
|
45793
46516
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -46120,7 +46843,7 @@ exports.isConstructor = isConstructor;
|
|
|
46120
46843
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46121
46844
|
exports.createClientSessionModule = void 0;
|
|
46122
46845
|
/********************************************************************************
|
|
46123
|
-
* Copyright (c) 2022-
|
|
46846
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
46124
46847
|
*
|
|
46125
46848
|
* This program and the accompanying materials are made available under the
|
|
46126
46849
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -46135,6 +46858,7 @@ exports.createClientSessionModule = void 0;
|
|
|
46135
46858
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
46136
46859
|
********************************************************************************/
|
|
46137
46860
|
const protocol_1 = __webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js");
|
|
46861
|
+
const di_1 = __webpack_require__(/*! @eclipse-glsp/protocol/lib/di */ "../../node_modules/@eclipse-glsp/protocol/lib/di/index.js");
|
|
46138
46862
|
const inversify_1 = __webpack_require__(/*! inversify */ "../../node_modules/inversify/es/inversify.js");
|
|
46139
46863
|
const service_identifiers_1 = __webpack_require__(/*! ./service-identifiers */ "../../packages/server/lib/common/di/service-identifiers.js");
|
|
46140
46864
|
/**
|
|
@@ -46143,7 +46867,7 @@ const service_identifiers_1 = __webpack_require__(/*! ./service-identifiers */ "
|
|
|
46143
46867
|
function createClientSessionModule(options) {
|
|
46144
46868
|
return new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
|
|
46145
46869
|
const context = { bind, unbind, isBound, rebind };
|
|
46146
|
-
(0,
|
|
46870
|
+
(0, di_1.bindOrRebind)(context, service_identifiers_1.ClientId).toConstantValue(options.clientId);
|
|
46147
46871
|
bind(protocol_1.GLSPClientProxy).toConstantValue(options.glspClient);
|
|
46148
46872
|
bind(service_identifiers_1.ClientActionKinds).toConstantValue(new Set(options.clientActionKinds));
|
|
46149
46873
|
});
|
|
@@ -46493,7 +47217,7 @@ exports.GLSPModule = GLSPModule = __decorate([
|
|
|
46493
47217
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46494
47218
|
exports.InstanceMultiBinding = exports.MultiBinding = exports.AbstractMultiBinding = void 0;
|
|
46495
47219
|
/********************************************************************************
|
|
46496
|
-
* Copyright (c) 2022-
|
|
47220
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
46497
47221
|
*
|
|
46498
47222
|
* This program and the accompanying materials are made available under the
|
|
46499
47223
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -47285,7 +48009,7 @@ exports.DefaultContextEditValidatorRegistry = DefaultContextEditValidatorRegistr
|
|
|
47285
48009
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
47286
48010
|
exports.ValidateLabelEditAdapter = exports.ContextEditValidator = void 0;
|
|
47287
48011
|
/********************************************************************************
|
|
47288
|
-
* Copyright (c) 2022-
|
|
48012
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
47289
48013
|
*
|
|
47290
48014
|
* This program and the accompanying materials are made available under the
|
|
47291
48015
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -48125,7 +48849,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
48125
48849
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
48126
48850
|
exports.ModelSubmissionHandler = void 0;
|
|
48127
48851
|
/********************************************************************************
|
|
48128
|
-
* Copyright (c) 2022-
|
|
48852
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
48129
48853
|
*
|
|
48130
48854
|
* This program and the accompanying materials are made available under the
|
|
48131
48855
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -49819,7 +50543,7 @@ exports.GModelCreateEdgeOperationHandler = GModelCreateEdgeOperationHandler = __
|
|
|
49819
50543
|
"use strict";
|
|
49820
50544
|
|
|
49821
50545
|
/********************************************************************************
|
|
49822
|
-
* Copyright (c) 2022-
|
|
50546
|
+
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
49823
50547
|
*
|
|
49824
50548
|
* This program and the accompanying materials are made available under the
|
|
49825
50549
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -49877,7 +50601,10 @@ let GModelCreateNodeOperationHandler = class GModelCreateNodeOperationHandler ex
|
|
|
49877
50601
|
return this.elementTypeIds.map(elementTypeId => this.createTriggerNodeCreationAction(elementTypeId));
|
|
49878
50602
|
}
|
|
49879
50603
|
createTriggerNodeCreationAction(elementTypeId) {
|
|
49880
|
-
return protocol_1.TriggerNodeCreationAction.create(elementTypeId, {
|
|
50604
|
+
return protocol_1.TriggerNodeCreationAction.create(elementTypeId, {
|
|
50605
|
+
ghostElement: this.createTriggerGhostElement(elementTypeId),
|
|
50606
|
+
args: this.createTriggerArgs(elementTypeId)
|
|
50607
|
+
});
|
|
49881
50608
|
}
|
|
49882
50609
|
createTriggerGhostElement(elementTypeId) {
|
|
49883
50610
|
return undefined;
|
|
@@ -50070,59 +50797,6 @@ __decorate([
|
|
|
50070
50797
|
], GModelOperationHandler.prototype, "serializer", void 0);
|
|
50071
50798
|
|
|
50072
50799
|
|
|
50073
|
-
/***/ }),
|
|
50074
|
-
|
|
50075
|
-
/***/ "../../packages/server/lib/common/gmodel/index.js":
|
|
50076
|
-
/*!********************************************************!*\
|
|
50077
|
-
!*** ../../packages/server/lib/common/gmodel/index.js ***!
|
|
50078
|
-
\********************************************************/
|
|
50079
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
50080
|
-
|
|
50081
|
-
"use strict";
|
|
50082
|
-
|
|
50083
|
-
/********************************************************************************
|
|
50084
|
-
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
50085
|
-
*
|
|
50086
|
-
* This program and the accompanying materials are made available under the
|
|
50087
|
-
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
50088
|
-
* http://www.eclipse.org/legal/epl-2.0.
|
|
50089
|
-
*
|
|
50090
|
-
* This Source Code may also be made available under the following Secondary
|
|
50091
|
-
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
50092
|
-
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
50093
|
-
* with the GNU Classpath Exception which is available at
|
|
50094
|
-
* https://www.gnu.org/software/classpath/license.html.
|
|
50095
|
-
*
|
|
50096
|
-
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
50097
|
-
********************************************************************************/
|
|
50098
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
50099
|
-
if (k2 === undefined) k2 = k;
|
|
50100
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
50101
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
50102
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
50103
|
-
}
|
|
50104
|
-
Object.defineProperty(o, k2, desc);
|
|
50105
|
-
}) : (function(o, m, k, k2) {
|
|
50106
|
-
if (k2 === undefined) k2 = k;
|
|
50107
|
-
o[k2] = m[k];
|
|
50108
|
-
}));
|
|
50109
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
50110
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
50111
|
-
};
|
|
50112
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
50113
|
-
__exportStar(__webpack_require__(/*! ./apply-label-edit-operation-handler */ "../../packages/server/lib/common/gmodel/apply-label-edit-operation-handler.js"), exports);
|
|
50114
|
-
__exportStar(__webpack_require__(/*! ./change-bounds-operation-handler */ "../../packages/server/lib/common/gmodel/change-bounds-operation-handler.js"), exports);
|
|
50115
|
-
__exportStar(__webpack_require__(/*! ./change-routing-points-operation-handler */ "../../packages/server/lib/common/gmodel/change-routing-points-operation-handler.js"), exports);
|
|
50116
|
-
__exportStar(__webpack_require__(/*! ./cut-operation-handler */ "../../packages/server/lib/common/gmodel/cut-operation-handler.js"), exports);
|
|
50117
|
-
__exportStar(__webpack_require__(/*! ./delete-operation-handler */ "../../packages/server/lib/common/gmodel/delete-operation-handler.js"), exports);
|
|
50118
|
-
__exportStar(__webpack_require__(/*! ./gmodel-create-edge-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-edge-operation-handler.js"), exports);
|
|
50119
|
-
__exportStar(__webpack_require__(/*! ./gmodel-create-node-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-node-operation-handler.js"), exports);
|
|
50120
|
-
__exportStar(__webpack_require__(/*! ./gmodel-diagram-module */ "../../packages/server/lib/common/gmodel/gmodel-diagram-module.js"), exports);
|
|
50121
|
-
__exportStar(__webpack_require__(/*! ./gmodel-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-operation-handler.js"), exports);
|
|
50122
|
-
__exportStar(__webpack_require__(/*! ./paste-operation-handler */ "../../packages/server/lib/common/gmodel/paste-operation-handler.js"), exports);
|
|
50123
|
-
__exportStar(__webpack_require__(/*! ./reconnect-edge-operation-handler */ "../../packages/server/lib/common/gmodel/reconnect-edge-operation-handler.js"), exports);
|
|
50124
|
-
|
|
50125
|
-
|
|
50126
50800
|
/***/ }),
|
|
50127
50801
|
|
|
50128
50802
|
/***/ "../../packages/server/lib/common/gmodel/paste-operation-handler.js":
|
|
@@ -50354,7 +51028,7 @@ exports.GModelReconnectEdgeOperationHandler = GModelReconnectEdgeOperationHandle
|
|
|
50354
51028
|
"use strict";
|
|
50355
51029
|
|
|
50356
51030
|
/********************************************************************************
|
|
50357
|
-
* Copyright (c) 2022-
|
|
51031
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
50358
51032
|
*
|
|
50359
51033
|
* This program and the accompanying materials are made available under the
|
|
50360
51034
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -50383,8 +51057,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
50383
51057
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
50384
51058
|
};
|
|
50385
51059
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
50386
|
-
__exportStar(__webpack_require__(/*! @eclipse-glsp/graph */ "../../packages/graph/lib/index.js"), exports);
|
|
50387
|
-
__exportStar(__webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js"), exports);
|
|
50388
51060
|
__exportStar(__webpack_require__(/*! ./actions/action-dispatcher */ "../../packages/server/lib/common/actions/action-dispatcher.js"), exports);
|
|
50389
51061
|
__exportStar(__webpack_require__(/*! ./actions/action-handler */ "../../packages/server/lib/common/actions/action-handler.js"), exports);
|
|
50390
51062
|
__exportStar(__webpack_require__(/*! ./actions/action-handler-registry */ "../../packages/server/lib/common/actions/action-handler-registry.js"), exports);
|
|
@@ -50433,19 +51105,34 @@ __exportStar(__webpack_require__(/*! ./features/navigation/request-navigation-ta
|
|
|
50433
51105
|
__exportStar(__webpack_require__(/*! ./features/navigation/resolve-navigation-targets-action-handler */ "../../packages/server/lib/common/features/navigation/resolve-navigation-targets-action-handler.js"), exports);
|
|
50434
51106
|
__exportStar(__webpack_require__(/*! ./features/popup/popup-model-factory */ "../../packages/server/lib/common/features/popup/popup-model-factory.js"), exports);
|
|
50435
51107
|
__exportStar(__webpack_require__(/*! ./features/popup/request-popup-model-action-handler */ "../../packages/server/lib/common/features/popup/request-popup-model-action-handler.js"), exports);
|
|
51108
|
+
__exportStar(__webpack_require__(/*! ./features/progress/progress-service */ "../../packages/server/lib/common/features/progress/progress-service.js"), exports);
|
|
50436
51109
|
__exportStar(__webpack_require__(/*! ./features/type-hints/edge-creation-checker */ "../../packages/server/lib/common/features/type-hints/edge-creation-checker.js"), exports);
|
|
51110
|
+
__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);
|
|
50437
51111
|
__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);
|
|
50438
51112
|
__exportStar(__webpack_require__(/*! ./features/validation/model-validator */ "../../packages/server/lib/common/features/validation/model-validator.js"), exports);
|
|
50439
51113
|
__exportStar(__webpack_require__(/*! ./features/validation/request-markers-handler */ "../../packages/server/lib/common/features/validation/request-markers-handler.js"), exports);
|
|
50440
|
-
__exportStar(__webpack_require__(/*! ./gmodel/
|
|
51114
|
+
__exportStar(__webpack_require__(/*! ./gmodel/apply-label-edit-operation-handler */ "../../packages/server/lib/common/gmodel/apply-label-edit-operation-handler.js"), exports);
|
|
51115
|
+
__exportStar(__webpack_require__(/*! ./gmodel/change-bounds-operation-handler */ "../../packages/server/lib/common/gmodel/change-bounds-operation-handler.js"), exports);
|
|
51116
|
+
__exportStar(__webpack_require__(/*! ./gmodel/change-routing-points-operation-handler */ "../../packages/server/lib/common/gmodel/change-routing-points-operation-handler.js"), exports);
|
|
51117
|
+
__exportStar(__webpack_require__(/*! ./gmodel/cut-operation-handler */ "../../packages/server/lib/common/gmodel/cut-operation-handler.js"), exports);
|
|
51118
|
+
__exportStar(__webpack_require__(/*! ./gmodel/delete-operation-handler */ "../../packages/server/lib/common/gmodel/delete-operation-handler.js"), exports);
|
|
51119
|
+
__exportStar(__webpack_require__(/*! ./gmodel/gmodel-create-edge-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-edge-operation-handler.js"), exports);
|
|
51120
|
+
__exportStar(__webpack_require__(/*! ./gmodel/gmodel-create-node-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-create-node-operation-handler.js"), exports);
|
|
51121
|
+
__exportStar(__webpack_require__(/*! ./gmodel/gmodel-diagram-module */ "../../packages/server/lib/common/gmodel/gmodel-diagram-module.js"), exports);
|
|
51122
|
+
__exportStar(__webpack_require__(/*! ./gmodel/gmodel-operation-handler */ "../../packages/server/lib/common/gmodel/gmodel-operation-handler.js"), exports);
|
|
51123
|
+
__exportStar(__webpack_require__(/*! ./gmodel/paste-operation-handler */ "../../packages/server/lib/common/gmodel/paste-operation-handler.js"), exports);
|
|
51124
|
+
__exportStar(__webpack_require__(/*! ./gmodel/reconnect-edge-operation-handler */ "../../packages/server/lib/common/gmodel/reconnect-edge-operation-handler.js"), exports);
|
|
50441
51125
|
__exportStar(__webpack_require__(/*! ./launch/glsp-server-launcher */ "../../packages/server/lib/common/launch/glsp-server-launcher.js"), exports);
|
|
51126
|
+
__exportStar(__webpack_require__(/*! ./launch/jsonrpc-server-launcher */ "../../packages/server/lib/common/launch/jsonrpc-server-launcher.js"), exports);
|
|
50442
51127
|
__exportStar(__webpack_require__(/*! ./operations/compound-operation-handler */ "../../packages/server/lib/common/operations/compound-operation-handler.js"), exports);
|
|
50443
51128
|
__exportStar(__webpack_require__(/*! ./operations/create-operation-handler */ "../../packages/server/lib/common/operations/create-operation-handler.js"), exports);
|
|
50444
51129
|
__exportStar(__webpack_require__(/*! ./operations/json-operation-handler */ "../../packages/server/lib/common/operations/json-operation-handler.js"), exports);
|
|
50445
51130
|
__exportStar(__webpack_require__(/*! ./operations/operation-action-handler */ "../../packages/server/lib/common/operations/operation-action-handler.js"), exports);
|
|
50446
51131
|
__exportStar(__webpack_require__(/*! ./operations/operation-handler */ "../../packages/server/lib/common/operations/operation-handler.js"), exports);
|
|
50447
51132
|
__exportStar(__webpack_require__(/*! ./operations/operation-handler-registry */ "../../packages/server/lib/common/operations/operation-handler-registry.js"), exports);
|
|
51133
|
+
__exportStar(__webpack_require__(/*! ./protocol/client-action */ "../../packages/server/lib/common/protocol/client-action.js"), exports);
|
|
50448
51134
|
__exportStar(__webpack_require__(/*! ./protocol/glsp-server */ "../../packages/server/lib/common/protocol/glsp-server.js"), exports);
|
|
51135
|
+
__exportStar(__webpack_require__(/*! ./reexport */ "../../packages/server/lib/common/reexport.js"), exports);
|
|
50449
51136
|
__exportStar(__webpack_require__(/*! ./session/client-session */ "../../packages/server/lib/common/session/client-session.js"), exports);
|
|
50450
51137
|
__exportStar(__webpack_require__(/*! ./session/client-session-factory */ "../../packages/server/lib/common/session/client-session-factory.js"), exports);
|
|
50451
51138
|
__exportStar(__webpack_require__(/*! ./session/client-session-initializer */ "../../packages/server/lib/common/session/client-session-initializer.js"), exports);
|
|
@@ -51434,6 +52121,51 @@ exports.DefaultGLSPServer = DefaultGLSPServer = DefaultGLSPServer_1 = __decorate
|
|
|
51434
52121
|
], DefaultGLSPServer);
|
|
51435
52122
|
|
|
51436
52123
|
|
|
52124
|
+
/***/ }),
|
|
52125
|
+
|
|
52126
|
+
/***/ "../../packages/server/lib/common/reexport.js":
|
|
52127
|
+
/*!****************************************************!*\
|
|
52128
|
+
!*** ../../packages/server/lib/common/reexport.js ***!
|
|
52129
|
+
\****************************************************/
|
|
52130
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
52131
|
+
|
|
52132
|
+
"use strict";
|
|
52133
|
+
|
|
52134
|
+
/********************************************************************************
|
|
52135
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
52136
|
+
*
|
|
52137
|
+
* This program and the accompanying materials are made available under the
|
|
52138
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
52139
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
52140
|
+
*
|
|
52141
|
+
* This Source Code may also be made available under the following Secondary
|
|
52142
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
52143
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
52144
|
+
* with the GNU Classpath Exception which is available at
|
|
52145
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
52146
|
+
*
|
|
52147
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
52148
|
+
********************************************************************************/
|
|
52149
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
52150
|
+
if (k2 === undefined) k2 = k;
|
|
52151
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
52152
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
52153
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
52154
|
+
}
|
|
52155
|
+
Object.defineProperty(o, k2, desc);
|
|
52156
|
+
}) : (function(o, m, k, k2) {
|
|
52157
|
+
if (k2 === undefined) k2 = k;
|
|
52158
|
+
o[k2] = m[k];
|
|
52159
|
+
}));
|
|
52160
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
52161
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
52162
|
+
};
|
|
52163
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
52164
|
+
__exportStar(__webpack_require__(/*! @eclipse-glsp/graph */ "../../packages/graph/lib/index.js"), exports);
|
|
52165
|
+
__exportStar(__webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js"), exports);
|
|
52166
|
+
__exportStar(__webpack_require__(/*! @eclipse-glsp/protocol/lib/di */ "../../node_modules/@eclipse-glsp/protocol/lib/di/index.js"), exports);
|
|
52167
|
+
|
|
52168
|
+
|
|
51437
52169
|
/***/ }),
|
|
51438
52170
|
|
|
51439
52171
|
/***/ "../../packages/server/lib/common/session/client-session-factory.js":
|
|
@@ -51839,7 +52571,7 @@ ClientOptionsUtil.IS_RECONNECTING = 'isReconnecting';
|
|
|
51839
52571
|
"use strict";
|
|
51840
52572
|
|
|
51841
52573
|
/********************************************************************************
|
|
51842
|
-
* Copyright (c) 2022-
|
|
52574
|
+
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
51843
52575
|
*
|
|
51844
52576
|
* This program and the accompanying materials are made available under the
|
|
51845
52577
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -51950,7 +52682,7 @@ exports.configureConsoleLogger = configureConsoleLogger;
|
|
|
51950
52682
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
51951
52683
|
exports.getOrThrow = exports.GLSPServerError = void 0;
|
|
51952
52684
|
/********************************************************************************
|
|
51953
|
-
* Copyright (c) 2022-
|
|
52685
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
51954
52686
|
*
|
|
51955
52687
|
* This program and the accompanying materials are made available under the
|
|
51956
52688
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -52891,7 +53623,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
52891
53623
|
};
|
|
52892
53624
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
52893
53625
|
/********************************************************************************
|
|
52894
|
-
* Copyright (c) 2022-
|
|
53626
|
+
* Copyright (c) 2022-2024 EclipseSource and others.
|
|
52895
53627
|
*
|
|
52896
53628
|
* This program and the accompanying materials are made available under the
|
|
52897
53629
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -52905,7 +53637,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
52905
53637
|
*
|
|
52906
53638
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
52907
53639
|
********************************************************************************/
|
|
52908
|
-
__exportStar(__webpack_require__(/*! ../common/index */ "../../packages/server/lib/common/index.js"), exports);
|
|
52909
53640
|
__exportStar(__webpack_require__(/*! ./abstract-json-model-storage */ "../../packages/server/lib/node/abstract-json-model-storage.js"), exports);
|
|
52910
53641
|
__exportStar(__webpack_require__(/*! ./di/app-module */ "../../packages/server/lib/node/di/app-module.js"), exports);
|
|
52911
53642
|
__exportStar(__webpack_require__(/*! ./di/winston-logger */ "../../packages/server/lib/node/di/winston-logger.js"), exports);
|
|
@@ -52914,6 +53645,7 @@ __exportStar(__webpack_require__(/*! ./launch/cli-parser */ "../../packages/serv
|
|
|
52914
53645
|
__exportStar(__webpack_require__(/*! ./launch/socket-cli-parser */ "../../packages/server/lib/node/launch/socket-cli-parser.js"), exports);
|
|
52915
53646
|
__exportStar(__webpack_require__(/*! ./launch/socket-server-launcher */ "../../packages/server/lib/node/launch/socket-server-launcher.js"), exports);
|
|
52916
53647
|
__exportStar(__webpack_require__(/*! ./launch/websocket-server-launcher */ "../../packages/server/lib/node/launch/websocket-server-launcher.js"), exports);
|
|
53648
|
+
__exportStar(__webpack_require__(/*! ./reexport */ "../../packages/server/lib/node/reexport.js"), exports);
|
|
52917
53649
|
|
|
52918
53650
|
|
|
52919
53651
|
/***/ }),
|
|
@@ -53070,9 +53802,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
53070
53802
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
53071
53803
|
};
|
|
53072
53804
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
53073
|
-
exports.SocketServerLauncher =
|
|
53805
|
+
exports.SocketServerLauncher = void 0;
|
|
53074
53806
|
/********************************************************************************
|
|
53075
|
-
* Copyright (c) 2022-
|
|
53807
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
53076
53808
|
*
|
|
53077
53809
|
* This program and the accompanying materials are made available under the
|
|
53078
53810
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -53092,7 +53824,6 @@ const net = __webpack_require__(/*! net */ "net");
|
|
|
53092
53824
|
const jsonrpc = __webpack_require__(/*! vscode-jsonrpc/node */ "../../node_modules/vscode-jsonrpc/node.js");
|
|
53093
53825
|
const jsonrpc_server_launcher_1 = __webpack_require__(/*! ../../common/launch/jsonrpc-server-launcher */ "../../packages/server/lib/common/launch/jsonrpc-server-launcher.js");
|
|
53094
53826
|
const logger_1 = __webpack_require__(/*! ../../common/utils/logger */ "../../packages/server/lib/common/utils/logger.js");
|
|
53095
|
-
exports.START_UP_COMPLETE_MSG = '[GLSP-Server]:Startup completed. Accepting requests on port:';
|
|
53096
53827
|
let SocketServerLauncher = class SocketServerLauncher extends jsonrpc_server_launcher_1.JsonRpcGLSPServerLauncher {
|
|
53097
53828
|
constructor() {
|
|
53098
53829
|
super();
|
|
@@ -53276,6 +54007,49 @@ function wrapWebSocket(socket) {
|
|
|
53276
54007
|
exports.wrapWebSocket = wrapWebSocket;
|
|
53277
54008
|
|
|
53278
54009
|
|
|
54010
|
+
/***/ }),
|
|
54011
|
+
|
|
54012
|
+
/***/ "../../packages/server/lib/node/reexport.js":
|
|
54013
|
+
/*!**************************************************!*\
|
|
54014
|
+
!*** ../../packages/server/lib/node/reexport.js ***!
|
|
54015
|
+
\**************************************************/
|
|
54016
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
54017
|
+
|
|
54018
|
+
"use strict";
|
|
54019
|
+
|
|
54020
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
54021
|
+
if (k2 === undefined) k2 = k;
|
|
54022
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
54023
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
54024
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
54025
|
+
}
|
|
54026
|
+
Object.defineProperty(o, k2, desc);
|
|
54027
|
+
}) : (function(o, m, k, k2) {
|
|
54028
|
+
if (k2 === undefined) k2 = k;
|
|
54029
|
+
o[k2] = m[k];
|
|
54030
|
+
}));
|
|
54031
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
54032
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
54033
|
+
};
|
|
54034
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
54035
|
+
/********************************************************************************
|
|
54036
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
54037
|
+
*
|
|
54038
|
+
* This program and the accompanying materials are made available under the
|
|
54039
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
54040
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
54041
|
+
*
|
|
54042
|
+
* This Source Code may also be made available under the following Secondary
|
|
54043
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
54044
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
54045
|
+
* with the GNU Classpath Exception which is available at
|
|
54046
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
54047
|
+
*
|
|
54048
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
54049
|
+
********************************************************************************/
|
|
54050
|
+
__exportStar(__webpack_require__(/*! ../common */ "../../packages/server/lib/common/index.js"), exports);
|
|
54051
|
+
|
|
54052
|
+
|
|
53279
54053
|
/***/ }),
|
|
53280
54054
|
|
|
53281
54055
|
/***/ "../../packages/server/node.js":
|
|
@@ -57337,7 +58111,7 @@ var PatchError = /** @class */ (function (_super) {
|
|
|
57337
58111
|
/***/ ((module) => {
|
|
57338
58112
|
|
|
57339
58113
|
"use strict";
|
|
57340
|
-
module.exports = JSON.parse('{"name":"winston","description":"A logger for just about everything.","version":"3.
|
|
58114
|
+
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"}');
|
|
57341
58115
|
|
|
57342
58116
|
/***/ })
|
|
57343
58117
|
|