@hydranium/data-client-theia 1.0.0-next.10

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.
Files changed (78) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/lib/browser/channel-connection.d.ts +174 -0
  4. package/lib/browser/channel-connection.d.ts.map +1 -0
  5. package/lib/browser/channel-connection.js +264 -0
  6. package/lib/browser/channel-connection.js.map +1 -0
  7. package/lib/browser/data-service-frontend.d.ts +154 -0
  8. package/lib/browser/data-service-frontend.d.ts.map +1 -0
  9. package/lib/browser/data-service-frontend.js +169 -0
  10. package/lib/browser/data-service-frontend.js.map +1 -0
  11. package/lib/browser/diagnostics-data-service-frontend.d.ts +35 -0
  12. package/lib/browser/diagnostics-data-service-frontend.d.ts.map +1 -0
  13. package/lib/browser/diagnostics-data-service-frontend.js +54 -0
  14. package/lib/browser/diagnostics-data-service-frontend.js.map +1 -0
  15. package/lib/browser/host-diagnostics-frontend.d.ts +19 -0
  16. package/lib/browser/host-diagnostics-frontend.d.ts.map +1 -0
  17. package/lib/browser/host-diagnostics-frontend.js +31 -0
  18. package/lib/browser/host-diagnostics-frontend.js.map +1 -0
  19. package/lib/browser/index.d.ts +15 -0
  20. package/lib/browser/index.d.ts.map +1 -0
  21. package/lib/browser/index.js +31 -0
  22. package/lib/browser/index.js.map +1 -0
  23. package/lib/browser/references-data-service-frontend.d.ts +45 -0
  24. package/lib/browser/references-data-service-frontend.d.ts.map +1 -0
  25. package/lib/browser/references-data-service-frontend.js +55 -0
  26. package/lib/browser/references-data-service-frontend.js.map +1 -0
  27. package/lib/browser/workspace-gate.d.ts +21 -0
  28. package/lib/browser/workspace-gate.d.ts.map +1 -0
  29. package/lib/browser/workspace-gate.js +36 -0
  30. package/lib/browser/workspace-gate.js.map +1 -0
  31. package/lib/common/emitter-data-client.d.ts +40 -0
  32. package/lib/common/emitter-data-client.d.ts.map +1 -0
  33. package/lib/common/emitter-data-client.js +49 -0
  34. package/lib/common/emitter-data-client.js.map +1 -0
  35. package/lib/common/index.d.ts +10 -0
  36. package/lib/common/index.d.ts.map +1 -0
  37. package/lib/common/index.js +37 -0
  38. package/lib/common/index.js.map +1 -0
  39. package/lib/index.d.ts +10 -0
  40. package/lib/index.d.ts.map +1 -0
  41. package/lib/index.js +11 -0
  42. package/lib/index.js.map +1 -0
  43. package/lib/node/connection-container-module.d.ts +34 -0
  44. package/lib/node/connection-container-module.d.ts.map +1 -0
  45. package/lib/node/connection-container-module.js +53 -0
  46. package/lib/node/connection-container-module.js.map +1 -0
  47. package/lib/node/data-server-connection-handler.d.ts +56 -0
  48. package/lib/node/data-server-connection-handler.d.ts.map +1 -0
  49. package/lib/node/data-server-connection-handler.js +63 -0
  50. package/lib/node/data-server-connection-handler.js.map +1 -0
  51. package/lib/node/host-diagnostics-server.d.ts +31 -0
  52. package/lib/node/host-diagnostics-server.d.ts.map +1 -0
  53. package/lib/node/host-diagnostics-server.js +62 -0
  54. package/lib/node/host-diagnostics-server.js.map +1 -0
  55. package/lib/node/index.d.ts +13 -0
  56. package/lib/node/index.d.ts.map +1 -0
  57. package/lib/node/index.js +29 -0
  58. package/lib/node/index.js.map +1 -0
  59. package/lib/node/socket-channel-forwarder.d.ts +34 -0
  60. package/lib/node/socket-channel-forwarder.d.ts.map +1 -0
  61. package/lib/node/socket-channel-forwarder.js +63 -0
  62. package/lib/node/socket-channel-forwarder.js.map +1 -0
  63. package/package.json +101 -0
  64. package/src/browser/channel-connection.ts +413 -0
  65. package/src/browser/data-service-frontend.ts +208 -0
  66. package/src/browser/diagnostics-data-service-frontend.ts +70 -0
  67. package/src/browser/host-diagnostics-frontend.ts +30 -0
  68. package/src/browser/index.ts +15 -0
  69. package/src/browser/references-data-service-frontend.ts +70 -0
  70. package/src/browser/workspace-gate.ts +35 -0
  71. package/src/common/emitter-data-client.ts +64 -0
  72. package/src/common/index.ts +21 -0
  73. package/src/index.ts +18 -0
  74. package/src/node/connection-container-module.ts +51 -0
  75. package/src/node/data-server-connection-handler.ts +76 -0
  76. package/src/node/host-diagnostics-server.ts +57 -0
  77. package/src/node/index.ts +13 -0
  78. package/src/node/socket-channel-forwarder.ts +64 -0
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
11
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
12
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
13
+ 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;
14
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.HostDiagnosticsServer = void 0;
18
+ exports.createHostDiagnosticsBackendModule = createHostDiagnosticsBackendModule;
19
+ const node_1 = require("@hydranium/core/lib/node");
20
+ const protocol_1 = require("@hydranium/protocol");
21
+ const core_1 = require("@theia/core");
22
+ const inversify_1 = require("@theia/core/shared/inversify");
23
+ /**
24
+ * Host-process diagnostics, computed IN the Theia backend process this service
25
+ * runs in (the parent / host, distinct from the data-server child that holds the
26
+ * model store). Universal — `process.memoryUsage()` always works — so the
27
+ * framework wires it by default. Each result is also written to the backend's
28
+ * stdout so it reaches the pod log (`kubectl logs`), not only the RPC caller.
29
+ */
30
+ let HostDiagnosticsServer = class HostDiagnosticsServer {
31
+ async dumpHostState(args) {
32
+ const snapshot = (0, node_1.formatProcessMemory)(args.label ? `Host backend state (${args.label})` : 'Host backend state');
33
+ console.info(snapshot);
34
+ return snapshot;
35
+ }
36
+ async writeHostHeapSnapshot(args) {
37
+ const filePath = (0, node_1.writeHeapSnapshotToDir)(args.directory, args.label ?? 'backend', 'heap-backend');
38
+ console.info(`Host heap snapshot written to ${filePath}`);
39
+ return filePath;
40
+ }
41
+ };
42
+ exports.HostDiagnosticsServer = HostDiagnosticsServer;
43
+ exports.HostDiagnosticsServer = HostDiagnosticsServer = __decorate([
44
+ (0, inversify_1.injectable)()
45
+ ], HostDiagnosticsServer);
46
+ /**
47
+ * Theia backend module that exposes {@link HostDiagnosticsServer} as an ordinary
48
+ * in-process RPC service at {@link HOST_DIAGNOSTICS_PATH} (not the socket-
49
+ * forwarded data-server transport). The frontend reaches it with
50
+ * `bindHostDiagnostics` (see `../browser`). Adopters
51
+ * `export default createHostDiagnosticsBackendModule()` from a backend-module
52
+ * entry point.
53
+ */
54
+ function createHostDiagnosticsBackendModule() {
55
+ return new inversify_1.ContainerModule(bind => {
56
+ bind(HostDiagnosticsServer).toSelf().inSingletonScope();
57
+ bind(core_1.ConnectionHandler)
58
+ .toDynamicValue(context => new core_1.RpcConnectionHandler(protocol_1.HOST_DIAGNOSTICS_PATH, () => context.container.get(HostDiagnosticsServer)))
59
+ .inSingletonScope();
60
+ });
61
+ }
62
+ //# sourceMappingURL=host-diagnostics-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-diagnostics-server.js","sourceRoot":"","sources":["../../src/node/host-diagnostics-server.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;AA0ClF,gFAOC;AA/CD,mDAAuF;AACvF,kDAK6B;AAC7B,sCAAsE;AACtE,4DAA2E;AAE3E;;;;;;GAMG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAC/B,KAAK,CAAC,aAAa,CAAC,IAAuB;QACxC,MAAM,QAAQ,GAAG,IAAA,0BAAmB,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;QAC/G,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,QAAQ,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,IAA+B;QACxD,MAAM,QAAQ,GAAG,IAAA,6BAAsB,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS,EAAE,cAAc,CAAC,CAAC;QACjG,OAAO,CAAC,IAAI,CAAC,iCAAiC,QAAQ,EAAE,CAAC,CAAC;QAC1D,OAAO,QAAQ,CAAC;IACnB,CAAC;CACH,CAAA;AAZY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CAYjC;AAED;;;;;;;GAOG;AACH,SAAgB,kCAAkC;IAC/C,OAAO,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;QAC/B,IAAI,CAAC,qBAAqB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;QACxD,IAAI,CAAC,wBAAiB,CAAC;aACnB,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,2BAAoB,CAAC,gCAAqB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,CAAC;aAC9H,gBAAgB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,13 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ export * from './connection-container-module';
10
+ export * from './data-server-connection-handler';
11
+ export * from './host-diagnostics-server';
12
+ export * from './socket-channel-forwarder';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ __exportStar(require("./connection-container-module"), exports);
26
+ __exportStar(require("./data-server-connection-handler"), exports);
27
+ __exportStar(require("./host-diagnostics-server"), exports);
28
+ __exportStar(require("./socket-channel-forwarder"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;;AAElF,gEAA8C;AAC9C,mEAAiD;AACjD,4DAA0C;AAC1C,6DAA2C"}
@@ -0,0 +1,34 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { type Channel, Disposable, DisposableCollection, type MessageProvider } from '@theia/core';
10
+ import type * as net from 'node:net';
11
+ import { type Message } from 'vscode-jsonrpc/node';
12
+ /**
13
+ * Relays JSON-RPC messages between a Theia browser-frontend {@link Channel} and
14
+ * a data-server's TCP socket — the backend half of the data-server head's
15
+ * transport. The model-server speaks vscode-jsonrpc (Content-Length framed) on
16
+ * the socket; the frontend speaks the same protocol over the channel (via
17
+ * `createChannelConnection`). This forwarder decodes each side and re-emits on
18
+ * the other, so the two ends share one protocol with no semantic re-proxy in
19
+ * between.
20
+ *
21
+ * Framework-owned equivalent of `@eclipse-glsp/theia-integration`'s
22
+ * `SocketConnectionForwarder` — reproduced here (rather than imported) so the
23
+ * data-server head carries no GLSP dependency.
24
+ */
25
+ export declare class SocketChannelForwarder implements Disposable {
26
+ protected readonly channel: Channel;
27
+ protected readonly socket: net.Socket;
28
+ protected readonly toDispose: DisposableCollection;
29
+ constructor(channel: Channel, socket: net.Socket);
30
+ protected decodeChannelMessage(provider: MessageProvider): Message;
31
+ protected writeToChannel(message: Message): void;
32
+ dispose(): void;
33
+ }
34
+ //# sourceMappingURL=socket-channel-forwarder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socket-channel-forwarder.d.ts","sourceRoot":"","sources":["../../src/node/socket-channel-forwarder.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACnG,OAAO,KAAK,KAAK,GAAG,MAAM,UAAU,CAAC;AACrC,OAAO,EAA2B,KAAK,OAAO,EAA4C,MAAM,qBAAqB,CAAC;AAEtH;;;;;;;;;;;;GAYG;AACH,qBAAa,sBAAuB,YAAW,UAAU;IAInD,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO;IACnC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM;IAJxC,SAAS,CAAC,QAAQ,CAAC,SAAS,uBAA8B;gBAGpC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,GAAG,CAAC,MAAM;IAkBxC,SAAS,CAAC,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO;IAKlE,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAMhD,OAAO,IAAI,IAAI;CAGjB"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
4
+ *
5
+ * This program and the accompanying materials are made available under the
6
+ * terms of the MIT License which is available in the project root.
7
+ *
8
+ * SPDX-License-Identifier: MIT
9
+ ********************************************************************************/
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.SocketChannelForwarder = void 0;
12
+ const core_1 = require("@theia/core");
13
+ const node_1 = require("vscode-jsonrpc/node");
14
+ /**
15
+ * Relays JSON-RPC messages between a Theia browser-frontend {@link Channel} and
16
+ * a data-server's TCP socket — the backend half of the data-server head's
17
+ * transport. The model-server speaks vscode-jsonrpc (Content-Length framed) on
18
+ * the socket; the frontend speaks the same protocol over the channel (via
19
+ * `createChannelConnection`). This forwarder decodes each side and re-emits on
20
+ * the other, so the two ends share one protocol with no semantic re-proxy in
21
+ * between.
22
+ *
23
+ * Framework-owned equivalent of `@eclipse-glsp/theia-integration`'s
24
+ * `SocketConnectionForwarder` — reproduced here (rather than imported) so the
25
+ * data-server head carries no GLSP dependency.
26
+ */
27
+ class SocketChannelForwarder {
28
+ channel;
29
+ socket;
30
+ toDispose = new core_1.DisposableCollection();
31
+ constructor(channel, socket) {
32
+ this.channel = channel;
33
+ this.socket = socket;
34
+ const reader = new node_1.SocketMessageReader(socket);
35
+ const writer = new node_1.SocketMessageWriter(socket);
36
+ const connection = (0, node_1.createMessageConnection)(reader, writer);
37
+ this.toDispose.pushAll([
38
+ connection.onClose(() => socket.destroy()),
39
+ reader.listen(message => this.writeToChannel(message)),
40
+ channel.onMessage(provider => void writer.write(this.decodeChannelMessage(provider))),
41
+ channel.onClose(() => connection.dispose()),
42
+ connection.onClose(() => channel.close()),
43
+ core_1.Disposable.create(() => {
44
+ channel.close();
45
+ connection.dispose();
46
+ })
47
+ ]);
48
+ }
49
+ decodeChannelMessage(provider) {
50
+ const buffer = provider().readBytes();
51
+ return JSON.parse(new TextDecoder().decode(buffer));
52
+ }
53
+ writeToChannel(message) {
54
+ const writeBuffer = this.channel.getWriteBuffer();
55
+ writeBuffer.writeBytes(new TextEncoder().encode(JSON.stringify(message)));
56
+ writeBuffer.commit();
57
+ }
58
+ dispose() {
59
+ this.toDispose.dispose();
60
+ }
61
+ }
62
+ exports.SocketChannelForwarder = SocketChannelForwarder;
63
+ //# sourceMappingURL=socket-channel-forwarder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socket-channel-forwarder.js","sourceRoot":"","sources":["../../src/node/socket-channel-forwarder.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAElF,sCAAmG;AAEnG,8CAAsH;AAEtH;;;;;;;;;;;;GAYG;AACH,MAAa,sBAAsB;IAIV;IACA;IAJH,SAAS,GAAG,IAAI,2BAAoB,EAAE,CAAC;IAE1D,YACsB,OAAgB,EAChB,MAAkB;QADlB,YAAO,GAAP,OAAO,CAAS;QAChB,WAAM,GAAN,MAAM,CAAY;QAErC,MAAM,MAAM,GAAG,IAAI,0BAAmB,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,0BAAmB,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAA,8BAAuB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YACpB,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAC1C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACtD,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrF,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC3C,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACzC,iBAAU,CAAC,MAAM,CAAC,GAAG,EAAE;gBACpB,OAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,UAAU,CAAC,OAAO,EAAE,CAAC;YACxB,CAAC,CAAC;SACJ,CAAC,CAAC;IACN,CAAC;IAES,oBAAoB,CAAC,QAAyB;QACrD,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAY,CAAC;IAClE,CAAC;IAES,cAAc,CAAC,OAAgB;QACtC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAClD,WAAW,CAAC,UAAU,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC1E,WAAW,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC;IAED,OAAO;QACJ,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;CACH;AArCD,wDAqCC"}
package/package.json ADDED
@@ -0,0 +1,101 @@
1
+ {
2
+ "name": "@hydranium/data-client-theia",
3
+ "version": "1.0.0-next.10",
4
+ "description": "Theia-coupled client primitives for the hydranium data-server protocol head; companion of @hydranium/data-server. Bridges framework typed errors (e.g. ConflictError) across Theia's RPC boundary so their code + data survive the wire.",
5
+ "keywords": [
6
+ "hydranium",
7
+ "langium",
8
+ "language-server",
9
+ "lsp",
10
+ "theia"
11
+ ],
12
+ "homepage": "https://github.com/eclipse-emfcloud/hydranium/tree/main/packages/data-client-theia",
13
+ "bugs": {
14
+ "url": "https://github.com/eclipse-emfcloud/hydranium/issues"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/eclipse-emfcloud/hydranium.git",
19
+ "directory": "packages/data-client-theia"
20
+ },
21
+ "license": "MIT",
22
+ "author": {
23
+ "name": "Hydranium Team"
24
+ },
25
+ "sideEffects": false,
26
+ "exports": {
27
+ ".": {
28
+ "types": "./lib/index.d.ts",
29
+ "default": "./lib/index.js"
30
+ },
31
+ "./common": {
32
+ "types": "./lib/common/index.d.ts",
33
+ "default": "./lib/common/index.js"
34
+ },
35
+ "./browser": {
36
+ "types": "./lib/browser/index.d.ts",
37
+ "default": "./lib/browser/index.js"
38
+ },
39
+ "./node": {
40
+ "types": "./lib/node/index.d.ts",
41
+ "default": "./lib/node/index.js"
42
+ },
43
+ "./lib/common": {
44
+ "types": "./lib/common/index.d.ts",
45
+ "default": "./lib/common/index.js"
46
+ },
47
+ "./lib/browser": {
48
+ "types": "./lib/browser/index.d.ts",
49
+ "default": "./lib/browser/index.js"
50
+ },
51
+ "./lib/node": {
52
+ "types": "./lib/node/index.d.ts",
53
+ "default": "./lib/node/index.js"
54
+ }
55
+ },
56
+ "main": "lib/index.js",
57
+ "types": "lib/index.d.ts",
58
+ "files": [
59
+ "lib",
60
+ "src",
61
+ "!lib/**/*.tsbuildinfo"
62
+ ],
63
+ "scripts": {
64
+ "build": "tsc -b",
65
+ "clean": "rimraf lib tsconfig.tsbuildinfo",
66
+ "lint": "eslint src test --max-warnings 0",
67
+ "prepack": "node -e \"const m=require('./package.json'),fs=require('node:fs');const missing=[m.main,...Object.values(m.bin||{})].filter(entry=>entry&&!fs.existsSync(entry));if(missing.length){console.error('prepack '+m.name+': not built ('+missing.join(', ')+' missing). Run the build before packing: a files entry that matches nothing is skipped silently, so the tarball would ship src only.');process.exit(1);}\"",
68
+ "test": "npm run typecheck:test && vitest run",
69
+ "typecheck:test": "tsc --noEmit -p tsconfig.test.json",
70
+ "watch": "tsc -b -w --preserveWatchOutput"
71
+ },
72
+ "devDependencies": {
73
+ "@hydranium/client-theia": "1.0.0-next.10",
74
+ "@hydranium/core": "1.0.0-next.10",
75
+ "@hydranium/protocol": "1.0.0-next.10",
76
+ "@theia/core": "^1.71.0",
77
+ "@theia/workspace": "^1.71.0",
78
+ "@types/node": "^22.0.0",
79
+ "inversify": "6.2.2",
80
+ "reflect-metadata": "0.2.2",
81
+ "rimraf": "^5.0.0",
82
+ "typescript": "^5.8.0",
83
+ "vscode-jsonrpc": "9.0.1"
84
+ },
85
+ "peerDependencies": {
86
+ "@hydranium/client-theia": "1.0.0-next.10",
87
+ "@hydranium/core": "1.0.0-next.10",
88
+ "@hydranium/protocol": "1.0.0-next.10",
89
+ "@theia/core": "^1.71.0",
90
+ "@theia/workspace": "^1.71.0",
91
+ "inversify": "^6.0.0",
92
+ "vscode-jsonrpc": "^8.0.0 || ^9.0.0"
93
+ },
94
+ "engines": {
95
+ "node": ">=22.13"
96
+ },
97
+ "publishConfig": {
98
+ "access": "public"
99
+ },
100
+ "//prepack": "The publish guard, and it deliberately is NOT a `prepare`: npm runs a workspace `prepare` BEFORE the root `postinstall` that applies patches/vscode-jsonrpc+9.0.1.patch, so building there fails on a cold clone and npm rolls the entire install back. `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. It FAILS rather than rebuilds, because the rebuild is exactly the part that ordering defeats. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error."
101
+ }