@eclipse-glsp-examples/workflow-server-bundled-web 2.7.0 → 2.8.0-next.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server-bundled-web",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0-next.1+ab013b0",
|
|
4
4
|
"description": "GLSP web server for the workflow example (bundled)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ab013b0c1f1fce1734182e324ea9f915d50f92a6"
|
|
47
47
|
}
|
|
@@ -45408,15 +45408,36 @@ let ElkLayoutModule = class ElkLayoutModule extends server_1.GLSPModule {
|
|
|
45408
45408
|
}
|
|
45409
45409
|
bindElkFactory() {
|
|
45410
45410
|
const { algorithms, defaultLayoutOptions, isWebWorker } = this.options;
|
|
45411
|
-
const factory = () =>
|
|
45412
|
-
algorithms,
|
|
45413
|
-
defaultLayoutOptions,
|
|
45414
|
-
// The node implementation relies on elkjs' `FakeWorker` to set the `workerFactory`. The required file is
|
|
45415
|
-
// dynamically loaded and not available in a web-worker context, so it has to be mocked manually there.
|
|
45416
|
-
workerFactory: isWebWorker ? () => ({ postMessage: () => { } }) : undefined
|
|
45417
|
-
});
|
|
45411
|
+
const factory = () => this.createElk({ algorithms, defaultLayoutOptions }, isWebWorker);
|
|
45418
45412
|
return { constantValue: factory };
|
|
45419
45413
|
}
|
|
45414
|
+
/** Creates the underlying elkjs {@link ELK} instance, see {@link createWebWorkerElk} for the web-worker case. */
|
|
45415
|
+
createElk(options, isWebWorker) {
|
|
45416
|
+
return isWebWorker ? this.createWebWorkerElk(options) : new elk_bundled_1.default(options);
|
|
45417
|
+
}
|
|
45418
|
+
/**
|
|
45419
|
+
* Creates an {@link ELK} instance for a web-worker server. elkjs only exposes its in-process fake worker when it
|
|
45420
|
+
* doesn't detect a dedicated-worker scope (`self` present, `document` absent) — otherwise it hijacks
|
|
45421
|
+
* `self.onmessage` and layout never runs. Briefly presenting a `document` during construction flips elkjs back to
|
|
45422
|
+
* the in-process worker without touching the server's own `self.onmessage` handler.
|
|
45423
|
+
*/
|
|
45424
|
+
createWebWorkerElk(options) {
|
|
45425
|
+
const globalScope = globalThis;
|
|
45426
|
+
const hadDocument = 'document' in globalScope;
|
|
45427
|
+
const previousDocument = globalScope.document;
|
|
45428
|
+
globalScope.document = previousDocument !== null && previousDocument !== void 0 ? previousDocument : {};
|
|
45429
|
+
try {
|
|
45430
|
+
return new elk_bundled_1.default(options);
|
|
45431
|
+
}
|
|
45432
|
+
finally {
|
|
45433
|
+
if (hadDocument) {
|
|
45434
|
+
globalScope.document = previousDocument;
|
|
45435
|
+
}
|
|
45436
|
+
else {
|
|
45437
|
+
delete globalScope.document;
|
|
45438
|
+
}
|
|
45439
|
+
}
|
|
45440
|
+
}
|
|
45420
45441
|
bindGlspElkLayoutEngine() {
|
|
45421
45442
|
return {
|
|
45422
45443
|
dynamicValue: ctx => {
|
|
@@ -101463,7 +101484,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"http://json-schema.org/dra
|
|
|
101463
101484
|
/***/ ((module) => {
|
|
101464
101485
|
|
|
101465
101486
|
"use strict";
|
|
101466
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@eclipse-glsp/server-mcp","version":"2.
|
|
101487
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@eclipse-glsp/server-mcp","version":"2.8.0-next","description":"Model Context Protocol (MCP) server for the GLSP TypeScript server — runs on Node, browser, and Fetch-API runtimes","keywords":["eclipse","graphics","diagram","modeling","visualization","glsp","diagram editor","mcp"],"homepage":"https://www.eclipse.org/glsp/","bugs":"https://github.com/eclipse-glsp/glsp/issues","repository":{"type":"git","url":"https://github.com/eclipse-glsp/glsp-server-node.git"},"license":"(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)","author":{"name":"Eclipse GLSP"},"contributors":[{"name":"Eclipse GLSP Project","email":"glsp-dev@eclipse.org","url":"https://projects.eclipse.org/projects/ecd.glsp"}],"main":"lib/node/index","browser":{"lib/node/index":"./lib/browser/index"},"types":"lib/common/index","files":["lib","src","node.js","node.d.ts","browser.js","browser.d.ts","common.js","common.d.ts"],"scripts":{"build":"tsc -b","clean":"rimraf lib *.tsbuildinfo coverage .nyc_output","generate:index":"glsp generateIndex src/browser src/common src/node -f -s","lint":"eslint --ext .ts,.tsx ./src","test":"mocha --config ../../.mocharc \\"./src/**/*.spec.?(ts|tsx)\\"","test:ci":"yarn test --reporter mocha-ctrf-json-reporter","test:coverage":"nyc yarn test","watch":"tsc -w"},"dependencies":{"@eclipse-glsp/server":"2.8.0-next","@hono/node-server":"^1.19.9","@modelcontextprotocol/sdk":"^1.29.0"},"peerDependencies":{"inversify":"^6.1.3"},"publishConfig":{"access":"public"}}');
|
|
101467
101488
|
|
|
101468
101489
|
/***/ })
|
|
101469
101490
|
|