@hydranium/core 1.0.0-next.31 → 1.0.0-next.33
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/lib/documents/hydranium-text-documents.d.ts.map +1 -1
- package/lib/documents/hydranium-text-documents.js +12 -1
- package/lib/documents/hydranium-text-documents.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/langium/bootstrap.d.ts.map +1 -1
- package/lib/langium/bootstrap.js +8 -1
- package/lib/langium/bootstrap.js.map +1 -1
- package/lib/langium/document-builder/document-builder.d.ts +33 -1
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -1
- package/lib/langium/document-builder/document-builder.js +68 -2
- package/lib/langium/document-builder/document-builder.js.map +1 -1
- package/lib/langium/keys/containment.d.ts +64 -0
- package/lib/langium/keys/containment.d.ts.map +1 -0
- package/lib/langium/keys/containment.js +53 -0
- package/lib/langium/keys/containment.js.map +1 -0
- package/lib/langium/keys/index.d.ts +1 -0
- package/lib/langium/keys/index.d.ts.map +1 -1
- package/lib/langium/keys/index.js +1 -0
- package/lib/langium/keys/index.js.map +1 -1
- package/lib/langium/keys/name-based-key-provider.d.ts +4 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -1
- package/lib/langium/keys/name-based-key-provider.js +4 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -1
- package/lib/langium/model-service/model-service.d.ts +39 -2
- package/lib/langium/model-service/model-service.d.ts.map +1 -1
- package/lib/langium/model-service/model-service.js +44 -5
- package/lib/langium/model-service/model-service.js.map +1 -1
- package/lib/langium/module.d.ts +20 -0
- package/lib/langium/module.d.ts.map +1 -1
- package/lib/langium/module.js +4 -0
- package/lib/langium/module.js.map +1 -1
- package/lib/langium/naming/name-provider.d.ts +10 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -1
- package/lib/langium/naming/name-provider.js.map +1 -1
- package/lib/langium/naming/name-separator-validation.d.ts +23 -1
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -1
- package/lib/langium/naming/name-separator-validation.js +22 -0
- package/lib/langium/naming/name-separator-validation.js.map +1 -1
- package/lib/langium/shared-services.d.ts +13 -2
- package/lib/langium/shared-services.d.ts.map +1 -1
- package/lib/langium/shared-services.js.map +1 -1
- package/lib/langium/validation/document-validator.d.ts +128 -2
- package/lib/langium/validation/document-validator.d.ts.map +1 -1
- package/lib/langium/validation/document-validator.js +211 -4
- package/lib/langium/validation/document-validator.js.map +1 -1
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +21 -1
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -1
- package/lib/langium/workspace/hydranium-workspace-manager.js +28 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -1
- package/lib/langium/workspace/initialize-workspace.d.ts +22 -2
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -1
- package/lib/langium/workspace/initialize-workspace.js +13 -5
- package/lib/langium/workspace/initialize-workspace.js.map +1 -1
- package/lib/locale/index.d.ts +10 -0
- package/lib/locale/index.d.ts.map +1 -0
- package/lib/locale/index.js +10 -0
- package/lib/locale/index.js.map +1 -0
- package/lib/locale/server-locale.d.ts +59 -0
- package/lib/locale/server-locale.d.ts.map +1 -0
- package/lib/locale/server-locale.js +61 -0
- package/lib/locale/server-locale.js.map +1 -0
- package/lib/messages/carriers.d.ts +15 -7
- package/lib/messages/carriers.d.ts.map +1 -1
- package/lib/messages/carriers.js +19 -8
- package/lib/messages/carriers.js.map +1 -1
- package/lib/messages/index.d.ts +3 -0
- package/lib/messages/index.d.ts.map +1 -1
- package/lib/messages/index.js +3 -0
- package/lib/messages/index.js.map +1 -1
- package/lib/messages/renderer.d.ts +117 -0
- package/lib/messages/renderer.d.ts.map +1 -0
- package/lib/messages/renderer.js +159 -0
- package/lib/messages/renderer.js.map +1 -0
- package/lib/testing/make-noop-shared-services.d.ts +14 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -1
- package/lib/testing/make-noop-shared-services.js +28 -2
- package/lib/testing/make-noop-shared-services.js.map +1 -1
- package/lib/testing/make-test-services.d.ts +27 -0
- package/lib/testing/make-test-services.d.ts.map +1 -1
- package/lib/testing/make-test-services.js +17 -1
- package/lib/testing/make-test-services.js.map +1 -1
- package/package.json +5 -5
- package/src/documents/hydranium-text-documents.ts +12 -1
- package/src/index.ts +1 -0
- package/src/langium/bootstrap.ts +8 -1
- package/src/langium/document-builder/document-builder.ts +70 -2
- package/src/langium/keys/containment.ts +87 -0
- package/src/langium/keys/index.ts +1 -0
- package/src/langium/keys/name-based-key-provider.ts +4 -0
- package/src/langium/model-service/model-service.ts +46 -4
- package/src/langium/module.ts +22 -0
- package/src/langium/naming/name-provider.ts +10 -0
- package/src/langium/naming/name-separator-validation.ts +25 -3
- package/src/langium/shared-services.ts +13 -2
- package/src/langium/validation/document-validator.ts +238 -4
- package/src/langium/workspace/hydranium-workspace-manager.ts +30 -1
- package/src/langium/workspace/initialize-workspace.ts +34 -5
- package/src/locale/index.ts +10 -0
- package/src/locale/server-locale.ts +71 -0
- package/src/messages/carriers.ts +20 -10
- package/src/messages/index.ts +3 -0
- package/src/messages/renderer.ts +184 -0
- package/src/testing/make-noop-shared-services.ts +50 -2
- package/src/testing/make-test-services.ts +43 -1
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
import { Deferred, type Logger, type Tracer } from '@hydranium/protocol';
|
|
10
10
|
import { DefaultWorkspaceManager, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
11
|
-
import { type CancellationToken } from 'vscode-languageserver';
|
|
11
|
+
import { type CancellationToken, type InitializeParams } from 'vscode-languageserver';
|
|
12
12
|
import type { WorkspaceFolder } from 'vscode-languageserver-types';
|
|
13
13
|
import { type LogNameOptions } from '../diagnostics/logger.js';
|
|
14
|
+
import type { ServerLocale } from '../../locale/server-locale.js';
|
|
14
15
|
import type { ProjectChangeEvent } from '../project/project-change-event.js';
|
|
15
16
|
import type { ProjectManager } from '../project/project-manager.js';
|
|
16
17
|
import type { ServerSharedServicesMinimal } from '../shared-services.js';
|
|
@@ -114,6 +115,8 @@ export declare class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
|
114
115
|
*/
|
|
115
116
|
readonly workspaceInitialized: Promise<unknown>;
|
|
116
117
|
protected readonly uriPolicy: DocumentUriPolicy;
|
|
118
|
+
/** Handed the client's locale at init; read by whoever renders in it. */
|
|
119
|
+
protected readonly serverLocale: ServerLocale;
|
|
117
120
|
protected readonly writableFileSystemProvider: WritableFileSystemProvider;
|
|
118
121
|
protected readonly additionalDocuments: Record<string, AdditionalDocumentContribution>;
|
|
119
122
|
/** Registry consulted by {@link warnIfUnroutable} to check a seeded document routes. */
|
|
@@ -199,6 +202,23 @@ export declare class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
|
199
202
|
* server's file name and the harness's correlation key agree.
|
|
200
203
|
*/
|
|
201
204
|
protected resolveWorkspaceLogTarget(folders: WorkspaceFolder[]): void;
|
|
205
|
+
/**
|
|
206
|
+
* Forward the locale the client declared, then Langium's own read of the
|
|
207
|
+
* params. `DefaultWorkspaceManager.initialize` reads `workspaceFolders`
|
|
208
|
+
* alone, so `params.locale` would otherwise be discarded — and this is the
|
|
209
|
+
* only place it arrives, which the headless init seams route through too.
|
|
210
|
+
*
|
|
211
|
+
* **The ABSENT case is reported from here rather than from `ServerLocale`,
|
|
212
|
+
* because this is the only end that can see it.** `accept` is not called
|
|
213
|
+
* when no locale was declared — nor should it be, since `''` is a claim
|
|
214
|
+
* about a language rather than the absence of one — so a log written there
|
|
215
|
+
* covers one of the two outcomes and leaves the other looking like a server
|
|
216
|
+
* that never reached init. Both lines are at `info` for the reason `accept`
|
|
217
|
+
* gives: the framework ships no catalogue, so an undeclared locale and an
|
|
218
|
+
* untranslated code produce the same English and the log is what separates
|
|
219
|
+
* them.
|
|
220
|
+
*/
|
|
221
|
+
initialize(params: InitializeParams): void;
|
|
202
222
|
/**
|
|
203
223
|
* Override of Langium's workspace setup to resolve / reject
|
|
204
224
|
* {@link workspaceInitializedDeferred} once setup completes. Adopters with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-workspace-manager.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-workspace-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAiB,KAAK,eAAe,EAAY,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACtH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"hydranium-workspace-manager.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-workspace-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAiB,KAAK,eAAe,EAAY,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACtH,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,KAAK,cAAc,EAAsD,MAAM,0BAA0B,CAAC;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM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,CAC7C,OAAO,EAAE,eAAe,EAAE,EAC1B,SAAS,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,GAC9C,OAAO,CAAC,IAAI,CAAC;IA2BhB;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;cAalC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IA6B/F;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAS,CAAC,yBAAyB,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,eAAe,EAAE;IAa5H;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI;IAqB/D;;;;;;OAMG;IACH,SAAS,CAAC,yBAAyB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI;IAOrE;;;;;;;;;;;;;;;OAeG;IACM,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IASnD;;;;;;;OAOG;IACY,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,WAAW,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9G;;;;;;;;;OASG;IACH,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAS5D;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;CAI/D"}
|
|
@@ -141,6 +141,8 @@ export class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
|
141
141
|
*/
|
|
142
142
|
workspaceInitialized = this.workspaceInitializedDeferred.promise;
|
|
143
143
|
uriPolicy;
|
|
144
|
+
/** Handed the client's locale at init; read by whoever renders in it. */
|
|
145
|
+
serverLocale;
|
|
144
146
|
writableFileSystemProvider;
|
|
145
147
|
additionalDocuments;
|
|
146
148
|
/** Registry consulted by {@link warnIfUnroutable} to check a seeded document routes. */
|
|
@@ -150,6 +152,7 @@ export class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
|
150
152
|
this.projectManager = services.workspace.ProjectManager;
|
|
151
153
|
this.projectManager.onProjectsChanged(event => this.onProjectsChanged(event));
|
|
152
154
|
this.uriPolicy = services.workspace.DocumentUriPolicy;
|
|
155
|
+
this.serverLocale = services.ServerLocale;
|
|
153
156
|
this.writableFileSystemProvider = services.workspace.FileSystemProvider;
|
|
154
157
|
this.additionalDocuments = services.additionalDocuments;
|
|
155
158
|
this.languageRegistry = services.ServiceRegistry;
|
|
@@ -325,6 +328,31 @@ export class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
|
325
328
|
resolveLogFilePlaceholder('workspace', toLogFileWorkspaceToken(first.uri));
|
|
326
329
|
}
|
|
327
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Forward the locale the client declared, then Langium's own read of the
|
|
333
|
+
* params. `DefaultWorkspaceManager.initialize` reads `workspaceFolders`
|
|
334
|
+
* alone, so `params.locale` would otherwise be discarded — and this is the
|
|
335
|
+
* only place it arrives, which the headless init seams route through too.
|
|
336
|
+
*
|
|
337
|
+
* **The ABSENT case is reported from here rather than from `ServerLocale`,
|
|
338
|
+
* because this is the only end that can see it.** `accept` is not called
|
|
339
|
+
* when no locale was declared — nor should it be, since `''` is a claim
|
|
340
|
+
* about a language rather than the absence of one — so a log written there
|
|
341
|
+
* covers one of the two outcomes and leaves the other looking like a server
|
|
342
|
+
* that never reached init. Both lines are at `info` for the reason `accept`
|
|
343
|
+
* gives: the framework ships no catalogue, so an undeclared locale and an
|
|
344
|
+
* untranslated code produce the same English and the log is what separates
|
|
345
|
+
* them.
|
|
346
|
+
*/
|
|
347
|
+
initialize(params) {
|
|
348
|
+
if (params.locale) {
|
|
349
|
+
this.serverLocale.accept(params.locale);
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
this.tracer.info("no locale declared at init — rendering messages in the framework's English");
|
|
353
|
+
}
|
|
354
|
+
super.initialize(params);
|
|
355
|
+
}
|
|
328
356
|
/**
|
|
329
357
|
* Override of Langium's workspace setup to resolve / reject
|
|
330
358
|
* {@link workspaceInitializedDeferred} once setup completes. Adopters with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydranium-workspace-manager.js","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-workspace-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAA4B,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAwB,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAGtH,OAAO,EAAuB,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"hydranium-workspace-manager.js","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-workspace-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAA4B,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAwB,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAGtH,OAAO,EAAuB,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAMnH,OAAO,EAA0B,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAuC,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;;GAIG;AACH,IAAI,sCAAsC,GAAG,KAAK,CAAC;AAEnD;;;;;;GAMG;AACH,IAAI,mCAAuD,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UA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,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9G,CAAC;CACH"}
|
|
@@ -10,6 +10,24 @@ import { URI } from '@hydranium/langium';
|
|
|
10
10
|
import type { ServerSharedServicesMinimal } from '../shared-services.js';
|
|
11
11
|
/** A workspace folder root accepted by the headless init seams: a filesystem path or a {@link URI}. */
|
|
12
12
|
export type WorkspaceFolderInput = string | URI;
|
|
13
|
+
/**
|
|
14
|
+
* Options for the headless init seams.
|
|
15
|
+
*
|
|
16
|
+
* **Optional, and the parameter is optional too**, so that no existing caller
|
|
17
|
+
* has to change to gain a field it does not set.
|
|
18
|
+
*/
|
|
19
|
+
export interface ProgrammaticInitOptions {
|
|
20
|
+
/**
|
|
21
|
+
* The locale to render user-facing server messages in — the headless
|
|
22
|
+
* equivalent of LSP `initialize`'s `locale`, for a head with no LSP
|
|
23
|
+
* connection (`startStdioServer`, the CLI subcommands, a test harness).
|
|
24
|
+
*
|
|
25
|
+
* Omitted means no locale, which the default renderer resolves as the
|
|
26
|
+
* framework's English. That is the correct answer for a headless tool: it
|
|
27
|
+
* has no reading user to have a language.
|
|
28
|
+
*/
|
|
29
|
+
readonly locale?: string;
|
|
30
|
+
}
|
|
13
31
|
/**
|
|
14
32
|
* Initialize a hydranium workspace **without an LSP `initialize` request** —
|
|
15
33
|
* the headless counterpart to the editor entry. Drives the workspace manager's
|
|
@@ -37,8 +55,9 @@ export type WorkspaceFolderInput = string | URI;
|
|
|
37
55
|
*
|
|
38
56
|
* @param services the shared services tree the workspace manager lives on
|
|
39
57
|
* @param folders one or more workspace roots (filesystem paths or URIs)
|
|
58
|
+
* @param options the message locale, when the caller has one
|
|
40
59
|
*/
|
|
41
|
-
export declare function initializeWorkspaceProgrammatically(services: ServerSharedServicesMinimal, folders: WorkspaceFolderInput | ReadonlyArray<WorkspaceFolderInput
|
|
60
|
+
export declare function initializeWorkspaceProgrammatically(services: ServerSharedServicesMinimal, folders: WorkspaceFolderInput | ReadonlyArray<WorkspaceFolderInput>, options?: ProgrammaticInitOptions): Promise<void>;
|
|
42
61
|
/**
|
|
43
62
|
* {@link initializeWorkspaceProgrammatically} **and then build every registered
|
|
44
63
|
* document to `Validated`** — the "fully-built workspace" convenience for
|
|
@@ -58,6 +77,7 @@ export declare function initializeWorkspaceProgrammatically(services: ServerShar
|
|
|
58
77
|
*
|
|
59
78
|
* @param services the shared services tree the workspace manager lives on
|
|
60
79
|
* @param folders one or more workspace roots (filesystem paths or URIs)
|
|
80
|
+
* @param options the message locale, when the caller has one
|
|
61
81
|
*/
|
|
62
|
-
export declare function buildWorkspaceProgrammatically(services: ServerSharedServicesMinimal, folders: WorkspaceFolderInput | ReadonlyArray<WorkspaceFolderInput
|
|
82
|
+
export declare function buildWorkspaceProgrammatically(services: ServerSharedServicesMinimal, folders: WorkspaceFolderInput | ReadonlyArray<WorkspaceFolderInput>, options?: ProgrammaticInitOptions): Promise<void>;
|
|
63
83
|
//# sourceMappingURL=initialize-workspace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize-workspace.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/initialize-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAY,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAMnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEzE,uGAAuG;AACvG,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"initialize-workspace.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/initialize-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAY,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAMnD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEzE,uGAAuG;AACvG,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,GAAG,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACrC;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC3B;AAeD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,mCAAmC,CACtD,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAAC,oBAAoB,CAAC,EACnE,OAAO,GAAE,uBAA4B,GACrC,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,8BAA8B,CACjD,QAAQ,EAAE,2BAA2B,EACrC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAAC,oBAAoB,CAAC,EACnE,OAAO,GAAE,uBAA4B,GACrC,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -50,14 +50,21 @@ function toWorkspaceFolders(folders) {
|
|
|
50
50
|
*
|
|
51
51
|
* @param services the shared services tree the workspace manager lives on
|
|
52
52
|
* @param folders one or more workspace roots (filesystem paths or URIs)
|
|
53
|
+
* @param options the message locale, when the caller has one
|
|
53
54
|
*/
|
|
54
|
-
export async function initializeWorkspaceProgrammatically(services, folders) {
|
|
55
|
+
export async function initializeWorkspaceProgrammatically(services, folders, options = {}) {
|
|
55
56
|
const workspaceFolders = toWorkspaceFolders(folders);
|
|
56
57
|
const manager = services.workspace.WorkspaceManager;
|
|
57
|
-
// `
|
|
58
|
+
// `locale` goes through the synthesized params rather than a direct
|
|
59
|
+
// `acceptLocale` call, so this seam and a real LSP `initialize` reach the
|
|
60
|
+
// slot by the SAME path — an adopter overriding the capture in
|
|
61
|
+
// `HydraniumWorkspaceManager.initialize` is honoured headlessly too, which a
|
|
62
|
+
// second write site here would silently bypass.
|
|
63
|
+
//
|
|
64
|
+
// `initialize` records the folders (DefaultWorkspaceManager reads only that
|
|
58
65
|
// field); `initialized` runs `mutex.write(initializeWorkspace)` and resolves
|
|
59
66
|
// once discovery + the init build settle, so awaiting it is the ready gate.
|
|
60
|
-
manager.initialize({ workspaceFolders });
|
|
67
|
+
manager.initialize({ workspaceFolders, locale: options.locale });
|
|
61
68
|
await manager.initialized({});
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
@@ -79,9 +86,10 @@ export async function initializeWorkspaceProgrammatically(services, folders) {
|
|
|
79
86
|
*
|
|
80
87
|
* @param services the shared services tree the workspace manager lives on
|
|
81
88
|
* @param folders one or more workspace roots (filesystem paths or URIs)
|
|
89
|
+
* @param options the message locale, when the caller has one
|
|
82
90
|
*/
|
|
83
|
-
export async function buildWorkspaceProgrammatically(services, folders) {
|
|
84
|
-
await initializeWorkspaceProgrammatically(services, folders);
|
|
91
|
+
export async function buildWorkspaceProgrammatically(services, folders, options = {}) {
|
|
92
|
+
await initializeWorkspaceProgrammatically(services, folders, options);
|
|
85
93
|
const documents = services.workspace.LangiumDocuments.all.toArray();
|
|
86
94
|
await services.workspace.DocumentBuilder.build(documents, { validation: true });
|
|
87
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize-workspace.js","sourceRoot":"","sources":["../../../src/langium/workspace/initialize-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACnD,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"initialize-workspace.js","sourceRoot":"","sources":["../../../src/langium/workspace/initialize-workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM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;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CACjD,QAAqC,EACrC,OAAmE,EACnE,UAAmC,EAAE;IAErC,MAAM,mCAAmC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtE,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACpE,MAAM,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 './server-locale.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 './server-locale.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/locale/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { Tracer } from '@hydranium/protocol';
|
|
10
|
+
import { type LogNameOptions } from '../langium/diagnostics/logger.js';
|
|
11
|
+
import type { ServerSharedServicesMinimal } from '../langium/shared-services.js';
|
|
12
|
+
/** Construction options for {@link ServerLocale}. */
|
|
13
|
+
export type ServerLocaleOptions = LogNameOptions;
|
|
14
|
+
/**
|
|
15
|
+
* The locale the server was handed at init, for whoever needs to render in the
|
|
16
|
+
* reading user's language. Held apart from the message renderer that reads it,
|
|
17
|
+
* so replacing the renderer cannot drop locale handling.
|
|
18
|
+
*
|
|
19
|
+
* A plain string in and out. A consumer that must react to a change rather than
|
|
20
|
+
* read the current value wraps this itself — nothing does today, and both real
|
|
21
|
+
* hosts respawn the server on a display-language switch.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ServerLocale {
|
|
24
|
+
protected readonly tracer: Tracer;
|
|
25
|
+
protected current: string | undefined;
|
|
26
|
+
constructor(services: ServerSharedServicesMinimal, options?: ServerLocaleOptions);
|
|
27
|
+
/** The locale, or `undefined` when no init supplied one — which means the framework's English. */
|
|
28
|
+
get value(): string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Take the locale an init declared.
|
|
31
|
+
*
|
|
32
|
+
* **One locale per process, and the reason the OTHER heads need none of
|
|
33
|
+
* their own.** The data and GLSP heads publish a port over the LSP
|
|
34
|
+
* connection and are reached by forwarding a socket to it, so they are the
|
|
35
|
+
* same process as the LSP head that was handed this locale — there is no
|
|
36
|
+
* topology in which one of them serves a second frontend. The Theia backend
|
|
37
|
+
* is the case that would break it, and it holds no locale precisely because
|
|
38
|
+
* it serves every frontend at once; nothing there writes here.
|
|
39
|
+
*
|
|
40
|
+
* The framework accepts a locale and never sources one, and neither
|
|
41
|
+
* validates nor normalises the tag: rejecting an unfamiliar one would be
|
|
42
|
+
* selecting a locale.
|
|
43
|
+
*
|
|
44
|
+
* Override to ignore the argument, which is how a host pins a locale it
|
|
45
|
+
* already knows but has no LSP client to declare.
|
|
46
|
+
*
|
|
47
|
+
* **The line is at `info`, which is a deliberate exception to the
|
|
48
|
+
* per-service default.** A locale is written once per process and it is the
|
|
49
|
+
* one setting that silently changes every user-facing sentence the server
|
|
50
|
+
* produces, so a reader trying to explain an unexpected language has nothing
|
|
51
|
+
* else to look at: the framework ships no catalogue, so "no entry for this
|
|
52
|
+
* code" and "no locale declared" both render the English and are
|
|
53
|
+
* indistinguishable in the output. At `debug` the line is below the default
|
|
54
|
+
* threshold and therefore absent from exactly the log someone would be
|
|
55
|
+
* reading.
|
|
56
|
+
*/
|
|
57
|
+
accept(locale: string): void;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=server-locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-locale.d.ts","sourceRoot":"","sources":["../../src/locale/server-locale.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,qDAAqD;AACrD,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAEjD;;;;;;;;GAQG;AACH,qBAAa,YAAY;IACtB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE1B,QAAQ,EAAE,2BAA2B,EAAE,OAAO,GAAE,mBAAwB;IAIpF,kGAAkG;IAClG,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAI9B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* The locale the server was handed at init, for whoever needs to render in the
|
|
11
|
+
* reading user's language. Held apart from the message renderer that reads it,
|
|
12
|
+
* so replacing the renderer cannot drop locale handling.
|
|
13
|
+
*
|
|
14
|
+
* A plain string in and out. A consumer that must react to a change rather than
|
|
15
|
+
* read the current value wraps this itself — nothing does today, and both real
|
|
16
|
+
* hosts respawn the server on a display-language switch.
|
|
17
|
+
*/
|
|
18
|
+
export class ServerLocale {
|
|
19
|
+
tracer;
|
|
20
|
+
current;
|
|
21
|
+
constructor(services, options = {}) {
|
|
22
|
+
this.tracer = services.Tracer.for(options.logName ?? 'ServerLocale').trace('instantiated');
|
|
23
|
+
}
|
|
24
|
+
/** The locale, or `undefined` when no init supplied one — which means the framework's English. */
|
|
25
|
+
get value() {
|
|
26
|
+
return this.current;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Take the locale an init declared.
|
|
30
|
+
*
|
|
31
|
+
* **One locale per process, and the reason the OTHER heads need none of
|
|
32
|
+
* their own.** The data and GLSP heads publish a port over the LSP
|
|
33
|
+
* connection and are reached by forwarding a socket to it, so they are the
|
|
34
|
+
* same process as the LSP head that was handed this locale — there is no
|
|
35
|
+
* topology in which one of them serves a second frontend. The Theia backend
|
|
36
|
+
* is the case that would break it, and it holds no locale precisely because
|
|
37
|
+
* it serves every frontend at once; nothing there writes here.
|
|
38
|
+
*
|
|
39
|
+
* The framework accepts a locale and never sources one, and neither
|
|
40
|
+
* validates nor normalises the tag: rejecting an unfamiliar one would be
|
|
41
|
+
* selecting a locale.
|
|
42
|
+
*
|
|
43
|
+
* Override to ignore the argument, which is how a host pins a locale it
|
|
44
|
+
* already knows but has no LSP client to declare.
|
|
45
|
+
*
|
|
46
|
+
* **The line is at `info`, which is a deliberate exception to the
|
|
47
|
+
* per-service default.** A locale is written once per process and it is the
|
|
48
|
+
* one setting that silently changes every user-facing sentence the server
|
|
49
|
+
* produces, so a reader trying to explain an unexpected language has nothing
|
|
50
|
+
* else to look at: the framework ships no catalogue, so "no entry for this
|
|
51
|
+
* code" and "no locale declared" both render the English and are
|
|
52
|
+
* indistinguishable in the output. At `debug` the line is below the default
|
|
53
|
+
* threshold and therefore absent from exactly the log someone would be
|
|
54
|
+
* reading.
|
|
55
|
+
*/
|
|
56
|
+
accept(locale) {
|
|
57
|
+
this.current = locale;
|
|
58
|
+
this.tracer.info(`rendering messages in locale '${locale}'`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=server-locale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-locale.js","sourceRoot":"","sources":["../../src/locale/server-locale.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AASlF;;;;;;;;GAQG;AACH,MAAM,OAAO,YAAY;IACH,MAAM,CAAS;IACxB,OAAO,CAAqB;IAEtC,YAAY,QAAqC,EAAE,UAA+B,EAAE;QACjF,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,cAAc,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9F,CAAC;IAED,kGAAkG;IAClG,IAAI,KAAK;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,CAAC,MAAc;QAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,MAAM,GAAG,CAAC,CAAC;IAChE,CAAC;CACH"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
import { type MessageDefinition, type ParamsArg, type ResolvedMessage } from '@hydranium/protocol';
|
|
10
10
|
import type { AstNode, DiagnosticData, DiagnosticInfo, Properties, ValidationAcceptor } from '@hydranium/langium';
|
|
11
|
-
import
|
|
11
|
+
import { Diagnostic } from 'vscode-languageserver-protocol';
|
|
12
12
|
/**
|
|
13
13
|
* Raise a validation diagnostic from a declaration, so the call site never
|
|
14
14
|
* restates the code or the sentence.
|
|
@@ -20,6 +20,13 @@ import type { Diagnostic } from 'vscode-languageserver-protocol';
|
|
|
20
20
|
* be able to request a quick fix. The identity is merged OVER whatever they
|
|
21
21
|
* pass, which makes the two conventions co-exist rather than compete.
|
|
22
22
|
*
|
|
23
|
+
* `data` admits adopter-owned keys beside Langium's, which is why the index
|
|
24
|
+
* signature is there rather than a bare `Partial<DiagnosticData>`. Langium's
|
|
25
|
+
* shape is closed, and a diagnostic that carries a COMPANION payload for its own
|
|
26
|
+
* surface to read — the field a form must highlight, say — has nowhere else to
|
|
27
|
+
* put it: an encoder projecting that payload reads `diagnostic.data`, so the
|
|
28
|
+
* narrower type made the identity and the companion mutually exclusive.
|
|
29
|
+
*
|
|
23
30
|
* The identity lands in both `code` and `data.hydranium` on purpose. `code` is
|
|
24
31
|
* what survives to the editor surface; Theia's converter drops `data` before the
|
|
25
32
|
* squiggle, so a parameterised diagnostic falls back to the server's English
|
|
@@ -32,15 +39,16 @@ import type { Diagnostic } from 'vscode-languageserver-protocol';
|
|
|
32
39
|
* declares `data?: unknown` and an `unknown` cannot be spread.
|
|
33
40
|
*/
|
|
34
41
|
export declare function acceptMessage<S extends string, N extends AstNode, P extends Properties<N> = Properties<N>>(accept: ValidationAcceptor, severity: 'error' | 'warning' | 'info' | 'hint', message: MessageDefinition<S>, info: Omit<DiagnosticInfo<N, P>, 'code' | 'data'> & {
|
|
35
|
-
data?: Partial<DiagnosticData>;
|
|
42
|
+
data?: Partial<DiagnosticData> & Record<string, unknown>;
|
|
36
43
|
}, ...params: ParamsArg<S>): void;
|
|
37
44
|
/**
|
|
38
|
-
* Recover the identity from a published diagnostic, for a surface that
|
|
39
|
-
* diagnostics itself.
|
|
45
|
+
* Recover the identity from a published diagnostic, for a surface that
|
|
46
|
+
* identifies or renders diagnostics itself.
|
|
40
47
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
48
|
+
* `Diagnostic.message` is `string | MarkupContent` in LSP 3.17+, so the text
|
|
49
|
+
* comes from upstream's own `Diagnostic.getMessageString` rather than a
|
|
50
|
+
* hand-rolled narrowing — consuming the library in its style, and one fewer
|
|
51
|
+
* place restating the union.
|
|
44
52
|
*/
|
|
45
53
|
export declare function resolvedFromDiagnostic(diagnostic: Diagnostic): ResolvedMessage | undefined;
|
|
46
54
|
//# sourceMappingURL=carriers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carriers.d.ts","sourceRoot":"","sources":["../../src/messages/carriers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,eAAe,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,
|
|
1
|
+
{"version":3,"file":"carriers.d.ts","sourceRoot":"","sources":["../../src/messages/carriers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,eAAe,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EACvG,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,EAC/C,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAC7B,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EAChH,GAAG,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,GACvB,IAAI,CAMN;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,eAAe,GAAG,SAAS,CAK1F"}
|
package/lib/messages/carriers.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
9
|
import { hasMessageIdentity, messageData } from '@hydranium/protocol';
|
|
10
|
+
import { Diagnostic } from 'vscode-languageserver-protocol';
|
|
10
11
|
/**
|
|
11
12
|
* Raise a validation diagnostic from a declaration, so the call site never
|
|
12
13
|
* restates the code or the sentence.
|
|
@@ -18,6 +19,13 @@ import { hasMessageIdentity, messageData } from '@hydranium/protocol';
|
|
|
18
19
|
* be able to request a quick fix. The identity is merged OVER whatever they
|
|
19
20
|
* pass, which makes the two conventions co-exist rather than compete.
|
|
20
21
|
*
|
|
22
|
+
* `data` admits adopter-owned keys beside Langium's, which is why the index
|
|
23
|
+
* signature is there rather than a bare `Partial<DiagnosticData>`. Langium's
|
|
24
|
+
* shape is closed, and a diagnostic that carries a COMPANION payload for its own
|
|
25
|
+
* surface to read — the field a form must highlight, say — has nowhere else to
|
|
26
|
+
* put it: an encoder projecting that payload reads `diagnostic.data`, so the
|
|
27
|
+
* narrower type made the identity and the companion mutually exclusive.
|
|
28
|
+
*
|
|
21
29
|
* The identity lands in both `code` and `data.hydranium` on purpose. `code` is
|
|
22
30
|
* what survives to the editor surface; Theia's converter drops `data` before the
|
|
23
31
|
* squiggle, so a parameterised diagnostic falls back to the server's English
|
|
@@ -30,22 +38,25 @@ import { hasMessageIdentity, messageData } from '@hydranium/protocol';
|
|
|
30
38
|
* declares `data?: unknown` and an `unknown` cannot be spread.
|
|
31
39
|
*/
|
|
32
40
|
export function acceptMessage(accept, severity, message, info, ...params) {
|
|
33
|
-
const data = {
|
|
41
|
+
const data = {
|
|
42
|
+
...info.data,
|
|
43
|
+
...messageData(message, ...params)
|
|
44
|
+
};
|
|
34
45
|
accept(severity, message.format(...params), { ...info, code: message.code, data });
|
|
35
46
|
}
|
|
36
47
|
/**
|
|
37
|
-
* Recover the identity from a published diagnostic, for a surface that
|
|
38
|
-
* diagnostics itself.
|
|
48
|
+
* Recover the identity from a published diagnostic, for a surface that
|
|
49
|
+
* identifies or renders diagnostics itself.
|
|
39
50
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
51
|
+
* `Diagnostic.message` is `string | MarkupContent` in LSP 3.17+, so the text
|
|
52
|
+
* comes from upstream's own `Diagnostic.getMessageString` rather than a
|
|
53
|
+
* hand-rolled narrowing — consuming the library in its style, and one fewer
|
|
54
|
+
* place restating the union.
|
|
43
55
|
*/
|
|
44
56
|
export function resolvedFromDiagnostic(diagnostic) {
|
|
45
57
|
if (!hasMessageIdentity(diagnostic.data)) {
|
|
46
58
|
return undefined;
|
|
47
59
|
}
|
|
48
|
-
|
|
49
|
-
return { ...diagnostic.data.hydranium, text };
|
|
60
|
+
return { ...diagnostic.data.hydranium, text: Diagnostic.getMessageString(diagnostic) };
|
|
50
61
|
}
|
|
51
62
|
//# sourceMappingURL=carriers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carriers.js","sourceRoot":"","sources":["../../src/messages/carriers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,kBAAkB,EAClB,WAAW,EAKb,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"carriers.js","sourceRoot":"","sources":["../../src/messages/carriers.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,kBAAkB,EAClB,WAAW,EAKb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,aAAa,CAC1B,MAA0B,EAC1B,QAA+C,EAC/C,OAA6B,EAC7B,IAAgH,EAChH,GAAG,MAAoB;IAEvB,MAAM,IAAI,GAA6E;QACpF,GAAG,IAAI,CAAC,IAAI;QACZ,GAAG,WAAW,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC;KACpC,CAAC;IACF,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACtF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAsB;IAC1D,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,OAAO,SAAS,CAAC;IACpB,CAAC;IACD,OAAO,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC;AAC1F,CAAC"}
|
package/lib/messages/index.d.ts
CHANGED
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
* code is the contract, and renaming one is a breaking change.
|
|
17
17
|
*/
|
|
18
18
|
export * from './carriers.js';
|
|
19
|
+
export * from './renderer.js';
|
|
20
|
+
export { MODEL_UPDATE_EDIT } from '../langium/model-service/model-service.js';
|
|
19
21
|
export { SEPARATOR_IN_NAME } from '../langium/naming/name-separator-validation.js';
|
|
22
|
+
export { LEXING_ERROR, UNRESOLVED_REFERENCE } from '../langium/validation/document-validator.js';
|
|
20
23
|
export { NO_LOADABLE_CONTENT } from '../langium/workspace/langium-documents.js';
|
|
21
24
|
export { NO_SUCH_FILE, NO_SUCH_PATH } from '../langium/workspace/in-memory-file-system-provider.js';
|
|
22
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}
|
package/lib/messages/index.js
CHANGED
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
* code is the contract, and renaming one is a breaking change.
|
|
17
17
|
*/
|
|
18
18
|
export * from './carriers.js';
|
|
19
|
+
export * from './renderer.js';
|
|
20
|
+
export { MODEL_UPDATE_EDIT } from '../langium/model-service/model-service.js';
|
|
19
21
|
export { SEPARATOR_IN_NAME } from '../langium/naming/name-separator-validation.js';
|
|
22
|
+
export { LEXING_ERROR, UNRESOLVED_REFERENCE } from '../langium/validation/document-validator.js';
|
|
20
23
|
export { NO_LOADABLE_CONTENT } from '../langium/workspace/langium-documents.js';
|
|
21
24
|
export { NO_SUCH_FILE, NO_SUCH_PATH } from '../langium/workspace/in-memory-file-system-provider.js';
|
|
22
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}
|