@eclipse-glsp-examples/workflow-server-bundled 2.6.0 → 2.7.0-next.7

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.
@@ -1842,7 +1842,7 @@ exports.TaskEditValidator = TaskEditValidator = __decorate([
1842
1842
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1843
1843
  exports.ModelTypes = void 0;
1844
1844
  /********************************************************************************
1845
- * Copyright (c) 2022-2023 STMicroelectronics and others.
1845
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
1846
1846
  *
1847
1847
  * This program and the accompanying materials are made available under the
1848
1848
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -1856,7 +1856,6 @@ exports.ModelTypes = void 0;
1856
1856
  *
1857
1857
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
1858
1858
  ********************************************************************************/
1859
- /* eslint-disable @typescript-eslint/padding-line-between-statements */
1860
1859
  var ModelTypes;
1861
1860
  (function (ModelTypes) {
1862
1861
  ModelTypes.LABEL_HEADING = 'label:heading';
@@ -3632,7 +3631,7 @@ if (false) {} else {
3632
3631
  Object.defineProperty(exports, "__esModule", ({ value: true }));
3633
3632
  exports.CompoundOperation = exports.Operation = exports.RejectAction = exports.ResponseAction = exports.RequestAction = exports.ActionMessage = exports.Action = void 0;
3634
3633
  /********************************************************************************
3635
- * Copyright (c) 2021-2023 STMicroelectronics and others.
3634
+ * Copyright (c) 2021-2026 STMicroelectronics and others.
3636
3635
  *
3637
3636
  * This program and the accompanying materials are made available under the
3638
3637
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -3984,7 +3983,7 @@ var PasteOperation;
3984
3983
  "use strict";
3985
3984
 
3986
3985
  /********************************************************************************
3987
- * Copyright (c) 2021-2023 STMicroelectronics and others.
3986
+ * Copyright (c) 2021-2026 STMicroelectronics and others.
3988
3987
  *
3989
3988
  * This program and the accompanying materials are made available under the
3990
3989
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -3999,7 +3998,7 @@ var PasteOperation;
3999
3998
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
4000
3999
  ********************************************************************************/
4001
4000
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4002
- exports.SetContextActions = exports.RequestContextActions = void 0;
4001
+ exports.EditorContextResult = exports.GetEditorContextAction = exports.SetContextActions = exports.RequestContextActions = void 0;
4003
4002
  const type_util_1 = __webpack_require__(/*! ../utils/type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js");
4004
4003
  const base_protocol_1 = __webpack_require__(/*! ./base-protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/action-protocol/base-protocol.js");
4005
4004
  var RequestContextActions;
@@ -4035,6 +4034,39 @@ var SetContextActions;
4035
4034
  }
4036
4035
  SetContextActions.create = create;
4037
4036
  })(SetContextActions || (exports.SetContextActions = SetContextActions = {}));
4037
+ var GetEditorContextAction;
4038
+ (function (GetEditorContextAction) {
4039
+ GetEditorContextAction.KIND = 'getEditorContext';
4040
+ function is(object) {
4041
+ return base_protocol_1.RequestAction.hasKind(object, GetEditorContextAction.KIND);
4042
+ }
4043
+ GetEditorContextAction.is = is;
4044
+ function create(options = {}) {
4045
+ return {
4046
+ kind: GetEditorContextAction.KIND,
4047
+ requestId: '',
4048
+ ...options
4049
+ };
4050
+ }
4051
+ GetEditorContextAction.create = create;
4052
+ })(GetEditorContextAction || (exports.GetEditorContextAction = GetEditorContextAction = {}));
4053
+ var EditorContextResult;
4054
+ (function (EditorContextResult) {
4055
+ EditorContextResult.KIND = 'editorContextResult';
4056
+ function is(object) {
4057
+ return base_protocol_1.Action.hasKind(object, EditorContextResult.KIND) && (0, type_util_1.hasObjectProp)(object, 'editorContext');
4058
+ }
4059
+ EditorContextResult.is = is;
4060
+ function create(editorContext, options = {}) {
4061
+ return {
4062
+ kind: EditorContextResult.KIND,
4063
+ responseId: '',
4064
+ editorContext,
4065
+ ...options
4066
+ };
4067
+ }
4068
+ EditorContextResult.create = create;
4069
+ })(EditorContextResult || (exports.EditorContextResult = EditorContextResult = {}));
4038
4070
 
4039
4071
 
4040
4072
  /***/ }),
@@ -5705,7 +5737,7 @@ exports.BaseGLSPClient = BaseGLSPClient;
5705
5737
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5706
5738
  exports.GLSPClient = exports.ClientState = exports.ApplicationIdProvider = void 0;
5707
5739
  /********************************************************************************
5708
- * Copyright (c) 2020-2024 EclipseSource and others.
5740
+ * Copyright (c) 2020-2026 EclipseSource and others.
5709
5741
  *
5710
5742
  * This program and the accompanying materials are made available under the
5711
5743
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -5719,12 +5751,12 @@ exports.GLSPClient = exports.ClientState = exports.ApplicationIdProvider = void
5719
5751
  *
5720
5752
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
5721
5753
  ********************************************************************************/
5722
- const uuid = __webpack_require__(/*! uuid */ "../../node_modules/@eclipse-glsp/protocol/node_modules/uuid/dist/esm-node/index.js");
5754
+ const uuid_1 = __webpack_require__(/*! uuid */ "../../node_modules/@eclipse-glsp/protocol/node_modules/uuid/dist/esm-node/index.js");
5723
5755
  const type_util_1 = __webpack_require__(/*! ../utils/type-util */ "../../node_modules/@eclipse-glsp/protocol/lib/utils/type-util.js");
5724
5756
  class ApplicationIdProvider {
5725
5757
  static get() {
5726
5758
  if (!ApplicationIdProvider._applicationId) {
5727
- ApplicationIdProvider._applicationId = uuid.v4();
5759
+ ApplicationIdProvider._applicationId = (0, uuid_1.v4)();
5728
5760
  }
5729
5761
  return ApplicationIdProvider._applicationId;
5730
5762
  }
@@ -5763,7 +5795,6 @@ var ClientState;
5763
5795
  })(ClientState || (exports.ClientState = ClientState = {}));
5764
5796
  var GLSPClient;
5765
5797
  (function (GLSPClient) {
5766
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
5767
5798
  function isOptions(object) {
5768
5799
  return type_util_1.AnyObject.is(object) && (0, type_util_1.hasStringProp)(object, 'id');
5769
5800
  }
@@ -6025,7 +6056,7 @@ exports.JsonrpcClientProxy = JsonrpcClientProxy;
6025
6056
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6026
6057
  exports.JsonrpcGLSPClient = void 0;
6027
6058
  /********************************************************************************
6028
- * Copyright (c) 2020-2023 EclipseSource and others.
6059
+ * Copyright (c) 2020-2026 EclipseSource and others.
6029
6060
  *
6030
6061
  * This program and the accompanying materials are made available under the
6031
6062
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -6043,7 +6074,6 @@ const vscode_jsonrpc_1 = __webpack_require__(/*! vscode-jsonrpc */ "../../node_m
6043
6074
  const glsp_client_1 = __webpack_require__(/*! ../glsp-client */ "../../node_modules/@eclipse-glsp/protocol/lib/client-server-protocol/glsp-client.js");
6044
6075
  var JsonrpcGLSPClient;
6045
6076
  (function (JsonrpcGLSPClient) {
6046
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
6047
6077
  function isOptions(object) {
6048
6078
  return glsp_client_1.GLSPClient.isOptions(object) && 'connectionProvider' in object;
6049
6079
  }
@@ -6562,7 +6592,7 @@ function isContainerModule(config) {
6562
6592
  "use strict";
6563
6593
 
6564
6594
  /********************************************************************************
6565
- * Copyright (c) 2023-2024 EclipseSource and others.
6595
+ * Copyright (c) 2023-2026 EclipseSource and others.
6566
6596
  *
6567
6597
  * This program and the accompanying materials are made available under the
6568
6598
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -6640,9 +6670,7 @@ class FeatureModule extends inversify_1.ContainerModule {
6640
6670
  }
6641
6671
  const missing = requires.filter(module => !module.isLoaded({ isBound }));
6642
6672
  if (missing.length > 0) {
6643
- this.debugLog(
6644
- // eslint-disable-next-line max-len
6645
- `Could not load feature module. Required modules are not loaded. Feature ids: ${missing.map(m => m.featureId.toString()).join(', ')}`);
6673
+ this.debugLog(`Could not load feature module. Required modules are not loaded. Feature ids: ${missing.map(m => m.featureId.toString()).join(', ')}`);
6646
6674
  return false;
6647
6675
  }
6648
6676
  return true;
@@ -7348,7 +7376,7 @@ geometry_1.Dimension.area = (dimension) => dimension.width * dimension.height;
7348
7376
  "use strict";
7349
7377
 
7350
7378
  /********************************************************************************
7351
- * Copyright (c) 2024 EclipseSource and others.
7379
+ * Copyright (c) 2024-2026 EclipseSource and others.
7352
7380
  *
7353
7381
  * This program and the accompanying materials are made available under the
7354
7382
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -7404,6 +7432,9 @@ geometry_1.Point.moveTowards = (from, vector) => {
7404
7432
  return { from, to, vector, direction: dir };
7405
7433
  };
7406
7434
  geometry_1.Point.equals = (one, other, eps) => (0, math_util_1.equalUpTo)(one.x, other.x, eps) && (0, math_util_1.equalUpTo)(one.y, other.y, eps);
7435
+ geometry_1.Point.isVerticalAligned = (a, b, eps = math_util_1.ALMOST_EQUAL_EPSILON) => (0, math_util_1.equalUpTo)(a.x, b.x, eps);
7436
+ geometry_1.Point.isHorizontalAligned = (a, b, eps = math_util_1.ALMOST_EQUAL_EPSILON) => (0, math_util_1.equalUpTo)(a.y, b.y, eps);
7437
+ geometry_1.Point.isAxisAligned = (a, b, eps = math_util_1.ALMOST_EQUAL_EPSILON) => geometry_1.Point.isVerticalAligned(a, b, eps) || geometry_1.Point.isHorizontalAligned(a, b, eps);
7407
7438
 
7408
7439
 
7409
7440
  /***/ }),
@@ -7615,7 +7646,6 @@ var Disposable;
7615
7646
  * @returns the newly created disposable
7616
7647
  */
7617
7648
  function empty() {
7618
- // eslint-disable-next-line @typescript-eslint/no-empty-function
7619
7649
  return { dispose: () => { } };
7620
7650
  }
7621
7651
  Disposable.empty = empty;
@@ -8154,7 +8184,7 @@ var Vector;
8154
8184
  "use strict";
8155
8185
 
8156
8186
  /********************************************************************************
8157
- * Copyright (c) 2024 Axon Ivy AG and others.
8187
+ * Copyright (c) 2024-2026 Axon Ivy AG and others.
8158
8188
  *
8159
8189
  * This program and the accompanying materials are made available under the
8160
8190
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -8169,7 +8199,13 @@ var Vector;
8169
8199
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
8170
8200
  ********************************************************************************/
8171
8201
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8202
+ exports.ALMOST_EQUAL_EPSILON = void 0;
8172
8203
  exports.equalUpTo = equalUpTo;
8204
+ /**
8205
+ * Default epsilon for loose numeric equality checks, matching the tolerance
8206
+ * used by sprotty's `almostEquals` convention.
8207
+ */
8208
+ exports.ALMOST_EQUAL_EPSILON = 1e-3;
8173
8209
  function equalUpTo(one, other, epsilon = Number.EPSILON) {
8174
8210
  return Math.abs(one - other) <= epsilon;
8175
8211
  }
@@ -8186,7 +8222,7 @@ function equalUpTo(one, other, epsilon = Number.EPSILON) {
8186
8222
  "use strict";
8187
8223
 
8188
8224
  /********************************************************************************
8189
- * Copyright (c) 2021-2025 EclipseSource and others.
8225
+ * Copyright (c) 2021-2026 EclipseSource and others.
8190
8226
  *
8191
8227
  * This program and the accompanying materials are made available under the
8192
8228
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -60269,11 +60305,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
60269
60305
  var __metadata = (this && this.__metadata) || function (k, v) {
60270
60306
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
60271
60307
  };
60308
+ var DefaultActionDispatcher_1;
60272
60309
  Object.defineProperty(exports, "__esModule", ({ value: true }));
60273
- exports.DefaultActionDispatcher = exports.ActionDispatcher = void 0;
60310
+ exports.DefaultActionDispatcher = exports.ActionDispatchScope = exports.ActionDispatcher = void 0;
60274
60311
  exports.respond = respond;
60275
60312
  /********************************************************************************
60276
- * Copyright (c) 2022-2023 STMicroelectronics and others.
60313
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
60277
60314
  *
60278
60315
  * This program and the accompanying materials are made available under the
60279
60316
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -60290,23 +60327,56 @@ exports.respond = respond;
60290
60327
  const protocol_1 = __webpack_require__(/*! @eclipse-glsp/protocol */ "../../node_modules/@eclipse-glsp/protocol/lib/index.js");
60291
60328
  const inversify_1 = __webpack_require__(/*! inversify */ "../../node_modules/inversify/lib/cjs/index.js");
60292
60329
  const service_identifiers_1 = __webpack_require__(/*! ../di/service-identifiers */ "../../packages/server/lib/common/di/service-identifiers.js");
60330
+ const action_queue_1 = __webpack_require__(/*! ../utils/action-queue */ "../../packages/server/lib/common/utils/action-queue.js");
60293
60331
  const glsp_server_error_1 = __webpack_require__(/*! ../utils/glsp-server-error */ "../../packages/server/lib/common/utils/glsp-server-error.js");
60294
60332
  const logger_1 = __webpack_require__(/*! ../utils/logger */ "../../packages/server/lib/common/utils/logger.js");
60295
- const promise_queue_1 = __webpack_require__(/*! ../utils/promise-queue */ "../../packages/server/lib/common/utils/promise-queue.js");
60296
60333
  const action_handler_registry_1 = __webpack_require__(/*! ./action-handler-registry */ "../../packages/server/lib/common/actions/action-handler-registry.js");
60297
60334
  const client_action_handler_1 = __webpack_require__(/*! ./client-action-handler */ "../../packages/server/lib/common/actions/client-action-handler.js");
60298
60335
  exports.ActionDispatcher = Symbol('ActionDispatcher');
60299
- let DefaultActionDispatcher = class DefaultActionDispatcher {
60336
+ exports.ActionDispatchScope = Symbol('ActionDispatchScope');
60337
+ /**
60338
+ * Default {@link ActionDispatcher}. External dispatches are queued and processed one at a
60339
+ * time; dispatches made from within a running handler run inline with the containing action.
60340
+ */
60341
+ let DefaultActionDispatcher = DefaultActionDispatcher_1 = class DefaultActionDispatcher {
60300
60342
  constructor() {
60301
- this.actionQueue = new promise_queue_1.PromiseQueue();
60343
+ this.actionQueue = new action_queue_1.ActionQueue();
60302
60344
  this.postUpdateQueue = [];
60345
+ this.pendingRequests = new Map();
60346
+ this.requestTimeouts = new Map();
60347
+ this.nextRequestId = 1;
60348
+ }
60349
+ initialize() {
60350
+ // Fire-and-forget: the loop is meant to run for the dispatcher's lifetime; surface any
60351
+ // unexpected termination via the logger instead of an unhandled rejection.
60352
+ this.processActionQueue().catch(error => this.logger.error('Action queue processor terminated unexpectedly', error));
60353
+ }
60354
+ generateRequestId() {
60355
+ return `server_${this.clientId}_${this.nextRequestId++}`;
60303
60356
  }
60304
60357
  dispatch(action) {
60305
- // Dont queue actions that are just delegated to the client
60306
- if (this.clientActionForwarder.shouldForwardToClient(action)) {
60358
+ // Intercept first to avoid deadlock: a handler may be awaiting this response.
60359
+ if (this.interceptPendingResponse(action)) {
60360
+ return Promise.resolve();
60361
+ }
60362
+ // Reentrant dispatches run inline to preserve ordering with the containing action.
60363
+ if (this.dispatchScope.isReentrant(action)) {
60307
60364
  return this.doDispatch(action);
60308
60365
  }
60309
- return this.actionQueue.enqueue(() => this.doDispatch(action));
60366
+ // External dispatches are queued and processed sequentially.
60367
+ return this.actionQueue.push(action);
60368
+ }
60369
+ async processActionQueue() {
60370
+ // Process each action inside the dispatch scope so reentrant dispatch() calls are recognized.
60371
+ for await (const entry of this.actionQueue.consume()) {
60372
+ try {
60373
+ await this.dispatchScope.enter(() => this.doDispatch(entry.item));
60374
+ entry.resolve();
60375
+ }
60376
+ catch (error) {
60377
+ entry.reject(error);
60378
+ }
60379
+ }
60310
60380
  }
60311
60381
  async doDispatch(action) {
60312
60382
  this.logger.debug('Dispatch action:', action.kind);
@@ -60320,42 +60390,171 @@ let DefaultActionDispatcher = class DefaultActionDispatcher {
60320
60390
  const response = await this.executeHandler(handler, action);
60321
60391
  responses.push(...response);
60322
60392
  }
60323
- if (this.postUpdateQueue.length > 0 && (protocol_1.UpdateModelAction.is(action) || protocol_1.SetModelAction.is(action))) {
60324
- responses.push(...this.postUpdateQueue);
60325
- this.postUpdateQueue = [];
60326
- }
60393
+ // Append post-update actions to responses so they are dispatched in the same inline
60394
+ // batch as the handler responses, preserving sequential order.
60395
+ responses.push(...this.drainPostUpdateQueue(action));
60327
60396
  await this.dispatchResponses(responses);
60328
60397
  }
60329
- async executeHandler(handler, request) {
60330
- const responseActions = await handler.execute(request);
60331
- return responseActions.map(action => respond(request, action));
60398
+ async executeHandler(handler, action) {
60399
+ const responseActions = await handler.execute(action);
60400
+ return responseActions.map(response => respond(action, response));
60332
60401
  }
60333
- dispatchResponses(actions) {
60334
- if (actions.length === 0) {
60335
- return Promise.resolve();
60402
+ async dispatchResponses(actions) {
60403
+ // Sequential dispatch inside the current dispatch scope. Each response goes inline via
60404
+ // the reentrant path, or is intercepted if it resolves a pending request().
60405
+ for (const action of actions) {
60406
+ await this.dispatch(action);
60336
60407
  }
60337
- const responseQueue = new promise_queue_1.PromiseQueue();
60338
- const responses = actions.map(action => responseQueue.enqueue(() => this.doDispatch(action)));
60339
- return Promise.all(responses).then(() => Promise.resolve());
60340
60408
  }
60341
- dispatchAll(...actions) {
60409
+ async dispatchAll(...actions) {
60342
60410
  if (actions.length === 0) {
60343
- return Promise.resolve();
60411
+ return;
60344
60412
  }
60345
60413
  const flat = [];
60346
60414
  (0, protocol_1.flatPush)(flat, actions);
60347
- return Promise.all(flat.map(action => this.dispatch(action))).then(() => Promise.resolve());
60415
+ // Sequential dispatch: external calls were already FIFO via the queue, but reentrant
60416
+ // calls also need deterministic ordering so handlers see each other's effects in order.
60417
+ for (const action of flat) {
60418
+ await this.dispatch(action);
60419
+ }
60348
60420
  }
60349
60421
  dispatchAfterNextUpdate(...actions) {
60350
60422
  if (actions.length !== 0) {
60351
60423
  (0, protocol_1.flatPush)(this.postUpdateQueue, actions);
60352
60424
  }
60353
60425
  }
60426
+ request(action) {
60427
+ return this.doRequest(action, undefined, true);
60428
+ }
60429
+ requestUntil(action, timeoutMs, rejectOnTimeout) {
60430
+ var _a;
60431
+ if (timeoutMs === void 0) { timeoutMs = (_a = action.timeout) !== null && _a !== void 0 ? _a : 2000; }
60432
+ if (rejectOnTimeout === void 0) { rejectOnTimeout = false; }
60433
+ return this.doRequest(action, timeoutMs, rejectOnTimeout);
60434
+ }
60435
+ doRequest(action, timeoutMs, rejectOnTimeout) {
60436
+ if (!action.requestId || action.requestId === '') {
60437
+ action.requestId = this.generateRequestId();
60438
+ }
60439
+ // Stamp the effective timeout onto the action so the receiving side
60440
+ // (handleServerRequest/handleClientRequest) can respect it.
60441
+ action.timeout = timeoutMs;
60442
+ const deferred = new protocol_1.Deferred();
60443
+ this.pendingRequests.set(action.requestId, deferred);
60444
+ if (timeoutMs !== undefined) {
60445
+ const timeout = setTimeout(() => {
60446
+ var _a;
60447
+ if (this.pendingRequests.delete(action.requestId)) {
60448
+ // Keep the requestTimeouts entry briefly as a stale marker so a late response
60449
+ // can be filtered, then drop it after a grace period to avoid leaking markers
60450
+ // for requests whose late responses never arrive.
60451
+ const cleanup = setTimeout(() => this.requestTimeouts.delete(action.requestId), DefaultActionDispatcher_1.STALE_TIMEOUT_GRACE_MS);
60452
+ (_a = cleanup.unref) === null || _a === void 0 ? void 0 : _a.call(cleanup);
60453
+ const message = `Request '${action.requestId}' (${action.kind}) timed out after ${timeoutMs}ms`;
60454
+ if (rejectOnTimeout) {
60455
+ deferred.reject(new Error(message));
60456
+ }
60457
+ else {
60458
+ this.logger.info(message);
60459
+ deferred.resolve(undefined);
60460
+ }
60461
+ }
60462
+ }, timeoutMs);
60463
+ this.requestTimeouts.set(action.requestId, timeout);
60464
+ }
60465
+ // dispatch() routes correctly on its own: external callers queue, handler-internal
60466
+ // callers run inline via the ActionDispatchScope. The matching response resolves
60467
+ // the deferred out-of-band via interceptPendingResponse().
60468
+ const dispatchPromise = this.dispatch(action);
60469
+ dispatchPromise.catch(error => {
60470
+ if (this.pendingRequests.delete(action.requestId)) {
60471
+ const timeout = this.requestTimeouts.get(action.requestId);
60472
+ if (timeout !== undefined) {
60473
+ clearTimeout(timeout);
60474
+ this.requestTimeouts.delete(action.requestId);
60475
+ }
60476
+ deferred.reject(error);
60477
+ }
60478
+ });
60479
+ return deferred.promise;
60480
+ }
60481
+ /**
60482
+ * If the given action is a {@link SetModelAction} or {@link UpdateModelAction} and there are actions
60483
+ * queued via {@link dispatchAfterNextUpdate}, drain and return them.
60484
+ *
60485
+ * @returns The drained actions, or an empty array if nothing to drain.
60486
+ */
60487
+ drainPostUpdateQueue(action) {
60488
+ if (this.postUpdateQueue.length > 0 && (protocol_1.UpdateModelAction.is(action) || protocol_1.SetModelAction.is(action))) {
60489
+ const actions = [...this.postUpdateQueue];
60490
+ this.postUpdateQueue = [];
60491
+ return actions;
60492
+ }
60493
+ return [];
60494
+ }
60495
+ /**
60496
+ * Checks whether the given action is a response matching a pending {@link request} or
60497
+ * {@link requestUntil} call. If matched, resolves (or rejects) the corresponding deferred
60498
+ * and returns `true` so the caller can short-circuit normal dispatch.
60499
+ *
60500
+ * For responses with a valid `responseId` but no matching pending request, checks for a stale
60501
+ * timeout entry (timed-out request) and clears the `responseId` so the action is not forwarded
60502
+ * by {@link ClientActionForwarder}. If no stale entry exists, the `responseId` is left intact
60503
+ * for normal forwarding.
60504
+ */
60505
+ interceptPendingResponse(action) {
60506
+ if (!protocol_1.ResponseAction.hasValidResponseId(action)) {
60507
+ return false;
60508
+ }
60509
+ const deferred = this.pendingRequests.get(action.responseId);
60510
+ if (deferred !== undefined) {
60511
+ this.pendingRequests.delete(action.responseId);
60512
+ const timeout = this.requestTimeouts.get(action.responseId);
60513
+ if (timeout !== undefined) {
60514
+ clearTimeout(timeout);
60515
+ this.requestTimeouts.delete(action.responseId);
60516
+ }
60517
+ // Intercepted responses skip doDispatch, so drain post-update actions here when the
60518
+ // response is an UpdateModel/SetModel. RejectAction does not trigger a drain; pending
60519
+ // post-update actions stay queued until the next successful update.
60520
+ const postUpdateActions = this.drainPostUpdateQueue(action);
60521
+ if (protocol_1.RejectAction.is(action)) {
60522
+ deferred.reject(new Error(`${action.message}${action.detail ? ': ' + action.detail : ''}`));
60523
+ }
60524
+ else {
60525
+ deferred.resolve(action);
60526
+ }
60527
+ if (postUpdateActions.length > 0) {
60528
+ // Fire-and-forget: callers of request() expect the resolved response, not the
60529
+ // unrelated post-update fan-out; awaiting here would couple them unnecessarily.
60530
+ this.dispatchResponses(postUpdateActions).catch(error => this.logger.error('Failed to dispatch post-update actions', error));
60531
+ }
60532
+ return true;
60533
+ }
60534
+ // Late response for a timed-out request: clear responseId so ClientActionForwarder does
60535
+ // not re-emit it to the client.
60536
+ const staleTimeout = this.requestTimeouts.get(action.responseId);
60537
+ if (staleTimeout !== undefined) {
60538
+ clearTimeout(staleTimeout);
60539
+ this.requestTimeouts.delete(action.responseId);
60540
+ this.logger.debug(`Late response for timed-out request '${action.responseId}', dispatching as normal action`);
60541
+ action.responseId = '';
60542
+ }
60543
+ return false;
60544
+ }
60354
60545
  dispose() {
60355
- this.actionQueue.clear();
60546
+ // Reject queued actions: no further processing should happen after dispose.
60547
+ this.actionQueue.rejectPending(new Error('ActionDispatcher disposed'));
60548
+ this.actionQueue.stop();
60549
+ this.pendingRequests.forEach((deferred, id) => deferred.reject(new Error(`Request '${id}' cancelled: dispatcher disposed`)));
60550
+ this.pendingRequests.clear();
60551
+ this.requestTimeouts.forEach(timeout => clearTimeout(timeout));
60552
+ this.requestTimeouts.clear();
60553
+ this.postUpdateQueue = [];
60356
60554
  }
60357
60555
  };
60358
60556
  exports.DefaultActionDispatcher = DefaultActionDispatcher;
60557
+ DefaultActionDispatcher.STALE_TIMEOUT_GRACE_MS = 30000;
60359
60558
  __decorate([
60360
60559
  (0, inversify_1.inject)(action_handler_registry_1.ActionHandlerRegistry),
60361
60560
  __metadata("design:type", action_handler_registry_1.ActionHandlerRegistry)
@@ -60372,7 +60571,17 @@ __decorate([
60372
60571
  (0, inversify_1.inject)(service_identifiers_1.ClientId),
60373
60572
  __metadata("design:type", String)
60374
60573
  ], DefaultActionDispatcher.prototype, "clientId", void 0);
60375
- exports.DefaultActionDispatcher = DefaultActionDispatcher = __decorate([
60574
+ __decorate([
60575
+ (0, inversify_1.inject)(exports.ActionDispatchScope),
60576
+ __metadata("design:type", Object)
60577
+ ], DefaultActionDispatcher.prototype, "dispatchScope", void 0);
60578
+ __decorate([
60579
+ (0, inversify_1.postConstruct)(),
60580
+ __metadata("design:type", Function),
60581
+ __metadata("design:paramtypes", []),
60582
+ __metadata("design:returntype", void 0)
60583
+ ], DefaultActionDispatcher.prototype, "initialize", null);
60584
+ exports.DefaultActionDispatcher = DefaultActionDispatcher = DefaultActionDispatcher_1 = __decorate([
60376
60585
  (0, inversify_1.injectable)()
60377
60586
  ], DefaultActionDispatcher);
60378
60587
  /**
@@ -60507,7 +60716,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
60507
60716
  Object.defineProperty(exports, "__esModule", ({ value: true }));
60508
60717
  exports.ClientActionForwarder = void 0;
60509
60718
  /********************************************************************************
60510
- * Copyright (c) 2022-2023 STMicroelectronics and others.
60719
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
60511
60720
  *
60512
60721
  * This program and the accompanying materials are made available under the
60513
60722
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -60554,7 +60763,7 @@ let ClientActionForwarder = class ClientActionForwarder {
60554
60763
  if (client_action_1.ClientAction.is(action)) {
60555
60764
  return false;
60556
60765
  }
60557
- return this.actionKinds.has(action.kind) || protocol_1.ResponseAction.is(action);
60766
+ return this.actionKinds.has(action.kind) || protocol_1.ResponseAction.hasValidResponseId(action);
60558
60767
  }
60559
60768
  };
60560
60769
  exports.ClientActionForwarder = ClientActionForwarder;
@@ -60598,7 +60807,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
60598
60807
  Object.defineProperty(exports, "__esModule", ({ value: true }));
60599
60808
  exports.DefaultGlobalActionProvider = exports.GlobalActionProvider = void 0;
60600
60809
  /********************************************************************************
60601
- * Copyright (c) 2022-2023 STMicroelectronics and others.
60810
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
60602
60811
  *
60603
60812
  * This program and the accompanying materials are made available under the
60604
60813
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -60634,7 +60843,6 @@ let DefaultGlobalActionProvider = class DefaultGlobalActionProvider {
60634
60843
  const container = serverContainer.createChild();
60635
60844
  const clientSessionModule = (0, client_session_module_1.createClientSessionModule)({
60636
60845
  clientId: 'tempId',
60637
- // eslint-disable-next-line @typescript-eslint/no-empty-function
60638
60846
  glspClient: { process: () => { } },
60639
60847
  clientActionKinds: []
60640
60848
  });
@@ -61877,7 +62085,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
61877
62085
  Object.defineProperty(exports, "__esModule", ({ value: true }));
61878
62086
  exports.RequestClipboardDataActionHandler = void 0;
61879
62087
  /********************************************************************************
61880
- * Copyright (c) 2022-2023 STMicroelectronics and others.
62088
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
61881
62089
  *
61882
62090
  * This program and the accompanying materials are made available under the
61883
62091
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -61907,7 +62115,6 @@ let RequestClipboardDataActionHandler = class RequestClipboardDataActionHandler
61907
62115
  selectedElements.forEach(element => {
61908
62116
  schemas.push(this.modelSerializer.createSchema(element));
61909
62117
  });
61910
- // eslint-disable-next-line no-null/no-null
61911
62118
  clipboardData['application/json'] = JSON.stringify(schemas, undefined, 2);
61912
62119
  return [protocol_1.SetClipboardDataAction.create(clipboardData)];
61913
62120
  }
@@ -63224,7 +63431,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
63224
63431
  Object.defineProperty(exports, "__esModule", ({ value: true }));
63225
63432
  exports.ModelSubmissionHandler = void 0;
63226
63433
  /********************************************************************************
63227
- * Copyright (c) 2022-2024 STMicroelectronics and others.
63434
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
63228
63435
  *
63229
63436
  * This program and the accompanying materials are made available under the
63230
63437
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -63427,7 +63634,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
63427
63634
  Object.defineProperty(exports, "__esModule", ({ value: true }));
63428
63635
  exports.RequestModelActionHandler = void 0;
63429
63636
  /********************************************************************************
63430
- * Copyright (c) 2022-2025 STMicroelectronics and others.
63637
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
63431
63638
  *
63432
63639
  * This program and the accompanying materials are made available under the
63433
63640
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -64163,7 +64370,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
64163
64370
  Object.defineProperty(exports, "__esModule", ({ value: true }));
64164
64371
  exports.DefaultProgressService = exports.ProgressService = void 0;
64165
64372
  /********************************************************************************
64166
- * Copyright (c) 2023 EclipseSource and others.
64373
+ * Copyright (c) 2023-2026 EclipseSource and others.
64167
64374
  *
64168
64375
  * This program and the accompanying materials are made available under the
64169
64376
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -65527,7 +65734,7 @@ exports.GModelReconnectEdgeOperationHandler = GModelReconnectEdgeOperationHandle
65527
65734
  "use strict";
65528
65735
 
65529
65736
  /********************************************************************************
65530
- * Copyright (c) 2022-2024 STMicroelectronics and others.
65737
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
65531
65738
  *
65532
65739
  * This program and the accompanying materials are made available under the
65533
65740
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -65637,6 +65844,7 @@ __exportStar(__webpack_require__(/*! ./session/client-session-factory */ "../../
65637
65844
  __exportStar(__webpack_require__(/*! ./session/client-session-initializer */ "../../packages/server/lib/common/session/client-session-initializer.js"), exports);
65638
65845
  __exportStar(__webpack_require__(/*! ./session/client-session-listener */ "../../packages/server/lib/common/session/client-session-listener.js"), exports);
65639
65846
  __exportStar(__webpack_require__(/*! ./session/client-session-manager */ "../../packages/server/lib/common/session/client-session-manager.js"), exports);
65847
+ __exportStar(__webpack_require__(/*! ./utils/action-queue */ "../../packages/server/lib/common/utils/action-queue.js"), exports);
65640
65848
  __exportStar(__webpack_require__(/*! ./utils/args-util */ "../../packages/server/lib/common/utils/args-util.js"), exports);
65641
65849
  __exportStar(__webpack_require__(/*! ./utils/client-options-util */ "../../packages/server/lib/common/utils/client-options-util.js"), exports);
65642
65850
  __exportStar(__webpack_require__(/*! ./utils/console-logger */ "../../packages/server/lib/common/utils/console-logger.js"), exports);
@@ -66438,7 +66646,7 @@ var DefaultGLSPServer_1;
66438
66646
  Object.defineProperty(exports, "__esModule", ({ value: true }));
66439
66647
  exports.DefaultGLSPServer = void 0;
66440
66648
  /********************************************************************************
66441
- * Copyright (c) 2022-2023 STMicroelectronics and others.
66649
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
66442
66650
  *
66443
66651
  * This program and the accompanying materials are made available under the
66444
66652
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -66467,9 +66675,7 @@ let DefaultGLSPServer = DefaultGLSPServer_1 = class DefaultGLSPServer {
66467
66675
  }
66468
66676
  validateProtocolVersion(params) {
66469
66677
  if (params.protocolVersion !== DefaultGLSPServer_1.PROTOCOL_VERSION) {
66470
- throw new Error(
66471
- // eslint-disable-next-line max-len
66472
- `Protocol version mismatch! The client protocol version ${params.protocolVersion} is not compatible with the server protocol version ${DefaultGLSPServer_1.PROTOCOL_VERSION}!`);
66678
+ throw new Error(`Protocol version mismatch! The client protocol version ${params.protocolVersion} is not compatible with the server protocol version ${DefaultGLSPServer_1.PROTOCOL_VERSION}!`);
66473
66679
  }
66474
66680
  }
66475
66681
  validateServerInitialized() {
@@ -66533,8 +66739,41 @@ let DefaultGLSPServer = DefaultGLSPServer_1 = class DefaultGLSPServer {
66533
66739
  }
66534
66740
  const action = message.action;
66535
66741
  client_action_1.ClientAction.mark(action);
66742
+ if (protocol_1.RequestAction.is(action)) {
66743
+ this.handleClientRequest(clientSession, action, message.clientId);
66744
+ return;
66745
+ }
66536
66746
  clientSession.actionDispatcher.dispatch(action).catch(error => this.handleProcessError(message, error));
66537
66747
  }
66748
+ // Fire-and-forget: intentionally not awaited by process()
66749
+ async handleClientRequest(clientSession, action, clientId) {
66750
+ var _a, _b, _c;
66751
+ try {
66752
+ const response = action.timeout !== undefined
66753
+ ? await clientSession.actionDispatcher.requestUntil(action, action.timeout, true)
66754
+ : await clientSession.actionDispatcher.request(action);
66755
+ if (response) {
66756
+ this.sendResponseToClient(clientId, response);
66757
+ }
66758
+ }
66759
+ catch (error) {
66760
+ const detail = error instanceof glsp_server_error_1.GLSPServerError ? (_b = (_a = error.cause) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a) : (_c = error === null || error === void 0 ? void 0 : error.toString) === null || _c === void 0 ? void 0 : _c.call(error);
66761
+ this.logger.error(`Failed to handle request '${action.kind}' (${action.requestId}):`, detail);
66762
+ try {
66763
+ const reject = protocol_1.RejectAction.create(`Failed to handle request '${action.kind}' (${action.requestId})`, {
66764
+ responseId: action.requestId,
66765
+ detail
66766
+ });
66767
+ this.sendResponseToClient(clientId, reject);
66768
+ }
66769
+ catch (sendError) {
66770
+ this.logger.error(`Failed to send rejection for request '${action.requestId}':`, sendError);
66771
+ }
66772
+ }
66773
+ }
66774
+ sendResponseToClient(clientId, response) {
66775
+ this.sendToClient({ clientId, action: response });
66776
+ }
66538
66777
  handleProcessError(message, reason) {
66539
66778
  var _a, _b, _c;
66540
66779
  let errorMsg = `Could not process action: '${message.action.kind}`;
@@ -66923,6 +67162,115 @@ class DefaultClientSession {
66923
67162
  exports.DefaultClientSession = DefaultClientSession;
66924
67163
 
66925
67164
 
67165
+ /***/ }),
67166
+
67167
+ /***/ "../../packages/server/lib/common/utils/action-queue.js":
67168
+ /*!**************************************************************!*\
67169
+ !*** ../../packages/server/lib/common/utils/action-queue.js ***!
67170
+ \**************************************************************/
67171
+ /***/ ((__unused_webpack_module, exports) => {
67172
+
67173
+ "use strict";
67174
+
67175
+ /********************************************************************************
67176
+ * Copyright (c) 2026 EclipseSource and others.
67177
+ *
67178
+ * This program and the accompanying materials are made available under the
67179
+ * terms of the Eclipse Public License v. 2.0 which is available at
67180
+ * http://www.eclipse.org/legal/epl-2.0.
67181
+ *
67182
+ * This Source Code may also be made available under the following Secondary
67183
+ * Licenses when the conditions for such availability set forth in the Eclipse
67184
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
67185
+ * with the GNU Classpath Exception which is available at
67186
+ * https://www.gnu.org/software/classpath/license.html.
67187
+ *
67188
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
67189
+ ********************************************************************************/
67190
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
67191
+ exports.ActionQueue = void 0;
67192
+ /**
67193
+ * Producer/consumer queue with a single async consumer loop. Items are processed in FIFO order.
67194
+ */
67195
+ class ActionQueue {
67196
+ constructor() {
67197
+ this.queue = [];
67198
+ this.stopped = false;
67199
+ this.consuming = false;
67200
+ }
67201
+ /**
67202
+ * Enqueues an item. The returned promise settles when the consumer finishes processing it,
67203
+ * propagating results back to the producer. Rejects immediately if the queue has been stopped.
67204
+ */
67205
+ push(item) {
67206
+ if (this.stopped) {
67207
+ return Promise.reject(new Error('ActionQueue is stopped'));
67208
+ }
67209
+ return new Promise((resolve, reject) => {
67210
+ var _a;
67211
+ this.queue.push({ item, resolve, reject });
67212
+ (_a = this.notify) === null || _a === void 0 ? void 0 : _a.call(this);
67213
+ });
67214
+ }
67215
+ /**
67216
+ * Yields pending entries, suspending until the next {@link push} when the queue is empty. Exits
67217
+ * once the queue is stopped and has been drained.
67218
+ *
67219
+ * Single-consumer: calling `consume()` a second time throws an error.
67220
+ */
67221
+ async *consume() {
67222
+ if (this.consuming) {
67223
+ throw new Error('ActionQueue supports only a single consumer');
67224
+ }
67225
+ this.consuming = true;
67226
+ try {
67227
+ while (!this.stopped || this.queue.length > 0) {
67228
+ while (this.queue.length > 0) {
67229
+ yield this.queue.shift();
67230
+ }
67231
+ if (this.stopped) {
67232
+ return;
67233
+ }
67234
+ await new Promise(resolve => {
67235
+ this.notify = resolve;
67236
+ });
67237
+ this.notify = undefined;
67238
+ }
67239
+ }
67240
+ finally {
67241
+ this.consuming = false;
67242
+ }
67243
+ }
67244
+ /**
67245
+ * Stops the queue. Further {@link push} calls reject. The consumer loop exits after
67246
+ * the remaining queued entries have been yielded (or immediately if the queue is empty).
67247
+ */
67248
+ stop() {
67249
+ var _a;
67250
+ this.stopped = true;
67251
+ (_a = this.notify) === null || _a === void 0 ? void 0 : _a.call(this);
67252
+ }
67253
+ /**
67254
+ * Rejects all queued entries with the given reason so producers awaiting their
67255
+ * `push()` promises do not hang. Does not stop the queue.
67256
+ */
67257
+ rejectPending(reason = new Error('ActionQueue cleared')) {
67258
+ const pending = this.queue;
67259
+ this.queue = [];
67260
+ for (const entry of pending) {
67261
+ entry.reject(reason);
67262
+ }
67263
+ }
67264
+ get size() {
67265
+ return this.queue.length;
67266
+ }
67267
+ get isStopped() {
67268
+ return this.stopped;
67269
+ }
67270
+ }
67271
+ exports.ActionQueue = ActionQueue;
67272
+
67273
+
66926
67274
  /***/ }),
66927
67275
 
66928
67276
  /***/ "../../packages/server/lib/common/utils/args-util.js":
@@ -67473,7 +67821,7 @@ function getRequestParentName(context) {
67473
67821
  "use strict";
67474
67822
 
67475
67823
  /********************************************************************************
67476
- * Copyright (c) 2022-2023 STMicroelectronics and others.
67824
+ * Copyright (c) 2022-2026 STMicroelectronics and others.
67477
67825
  *
67478
67826
  * This program and the accompanying materials are made available under the
67479
67827
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -67494,6 +67842,10 @@ exports.PromiseQueue = void 0;
67494
67842
  * of promises. Promises that are put in this queue are processed one by one.
67495
67843
  * i.e. After the first promise in the queue is resolved, it will be removed from the queue and the resolving of the
67496
67844
  * the next promise (if present) will start. The queue can only resolve one promise at a given time.
67845
+ *
67846
+ * @deprecated Since 2.7. The `DefaultActionDispatcher` no longer uses this queue. Kept for
67847
+ * backwards compatibility; will be removed in a future release. New code should use
67848
+ * {@link ActionQueue} or native async patterns instead.
67497
67849
  */
67498
67850
  class PromiseQueue {
67499
67851
  constructor() {
@@ -67877,10 +68229,12 @@ exports.configureWinstonLogger = configureWinstonLogger;
67877
68229
  const inversify_1 = __webpack_require__(/*! inversify */ "../../node_modules/inversify/lib/cjs/index.js");
67878
68230
  const winston = __webpack_require__(/*! winston */ "../../node_modules/winston/lib/winston.js");
67879
68231
  const common_1 = __webpack_require__(/*! ../../common */ "../../packages/server/lib/common/index.js");
68232
+ const node_action_dispatch_scope_1 = __webpack_require__(/*! ./node-action-dispatch-scope */ "../../packages/server/lib/node/di/node-action-dispatch-scope.js");
67880
68233
  const winston_logger_1 = __webpack_require__(/*! ./winston-logger */ "../../packages/server/lib/node/di/winston-logger.js");
67881
68234
  function createAppModule(options) {
67882
68235
  return new inversify_1.ContainerModule((bind, unbind, isBound, rebind) => {
67883
68236
  bind(common_1.InjectionContainer).toDynamicValue(dynamicContext => dynamicContext.container);
68237
+ bind(common_1.ActionDispatchScope).to(node_action_dispatch_scope_1.NodeActionDispatchScope).inSingletonScope();
67884
68238
  const context = { bind, unbind, isBound, rebind };
67885
68239
  configureWinstonLogger(context, options);
67886
68240
  });
@@ -67940,6 +68294,61 @@ function configureWinstonLogger(context, options, rebind = true, baseLoggerCreat
67940
68294
  }
67941
68295
 
67942
68296
 
68297
+ /***/ }),
68298
+
68299
+ /***/ "../../packages/server/lib/node/di/node-action-dispatch-scope.js":
68300
+ /*!***********************************************************************!*\
68301
+ !*** ../../packages/server/lib/node/di/node-action-dispatch-scope.js ***!
68302
+ \***********************************************************************/
68303
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
68304
+
68305
+ "use strict";
68306
+
68307
+ /********************************************************************************
68308
+ * Copyright (c) 2026 EclipseSource and others.
68309
+ *
68310
+ * This program and the accompanying materials are made available under the
68311
+ * terms of the Eclipse Public License v. 2.0 which is available at
68312
+ * http://www.eclipse.org/legal/epl-2.0.
68313
+ *
68314
+ * This Source Code may also be made available under the following Secondary
68315
+ * Licenses when the conditions for such availability set forth in the Eclipse
68316
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
68317
+ * with the GNU Classpath Exception which is available at
68318
+ * https://www.gnu.org/software/classpath/license.html.
68319
+ *
68320
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
68321
+ ********************************************************************************/
68322
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
68323
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
68324
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
68325
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
68326
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
68327
+ };
68328
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
68329
+ exports.NodeActionDispatchScope = void 0;
68330
+ const async_hooks_1 = __webpack_require__(/*! async_hooks */ "async_hooks");
68331
+ const inversify_1 = __webpack_require__(/*! inversify */ "../../node_modules/inversify/lib/cjs/index.js");
68332
+ /**
68333
+ * Node.js {@link ActionDispatchScope} backed by native `AsyncLocalStorage`.
68334
+ */
68335
+ let NodeActionDispatchScope = class NodeActionDispatchScope {
68336
+ constructor() {
68337
+ this.storage = new async_hooks_1.AsyncLocalStorage();
68338
+ }
68339
+ enter(callback) {
68340
+ return this.storage.run(true, callback);
68341
+ }
68342
+ isReentrant() {
68343
+ return this.storage.getStore() === true;
68344
+ }
68345
+ };
68346
+ exports.NodeActionDispatchScope = NodeActionDispatchScope;
68347
+ exports.NodeActionDispatchScope = NodeActionDispatchScope = __decorate([
68348
+ (0, inversify_1.injectable)()
68349
+ ], NodeActionDispatchScope);
68350
+
68351
+
67943
68352
  /***/ }),
67944
68353
 
67945
68354
  /***/ "../../packages/server/lib/node/di/winston-logger.js":
@@ -68117,7 +68526,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
68117
68526
  };
68118
68527
  Object.defineProperty(exports, "__esModule", ({ value: true }));
68119
68528
  /********************************************************************************
68120
- * Copyright (c) 2022-2024 EclipseSource and others.
68529
+ * Copyright (c) 2022-2026 EclipseSource and others.
68121
68530
  *
68122
68531
  * This program and the accompanying materials are made available under the
68123
68532
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -68133,6 +68542,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
68133
68542
  ********************************************************************************/
68134
68543
  __exportStar(__webpack_require__(/*! ./abstract-json-model-storage */ "../../packages/server/lib/node/abstract-json-model-storage.js"), exports);
68135
68544
  __exportStar(__webpack_require__(/*! ./di/app-module */ "../../packages/server/lib/node/di/app-module.js"), exports);
68545
+ __exportStar(__webpack_require__(/*! ./di/node-action-dispatch-scope */ "../../packages/server/lib/node/di/node-action-dispatch-scope.js"), exports);
68136
68546
  __exportStar(__webpack_require__(/*! ./di/winston-logger */ "../../packages/server/lib/node/di/winston-logger.js"), exports);
68137
68547
  __exportStar(__webpack_require__(/*! ./gmodel/gmodel-storage */ "../../packages/server/lib/node/gmodel/gmodel-storage.js"), exports);
68138
68548
  __exportStar(__webpack_require__(/*! ./launch/cli-parser */ "../../packages/server/lib/node/launch/cli-parser.js"), exports);
@@ -68577,6 +68987,17 @@ __exportStar(__webpack_require__(/*! ../common */ "../../packages/server/lib/com
68577
68987
  module.exports = __webpack_require__(/*! ./lib/node/index */ "../../packages/server/lib/node/index.js");
68578
68988
 
68579
68989
 
68990
+ /***/ }),
68991
+
68992
+ /***/ "async_hooks":
68993
+ /*!******************************!*\
68994
+ !*** external "async_hooks" ***!
68995
+ \******************************/
68996
+ /***/ ((module) => {
68997
+
68998
+ "use strict";
68999
+ module.exports = require("async_hooks");
69000
+
68580
69001
  /***/ }),
68581
69002
 
68582
69003
  /***/ "buffer":