@hydranium/core 1.0.0-next.14 → 1.0.0-next.140
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/README.md +5 -1
- package/lib/documents/ast-document-manager.d.ts +187 -27
- package/lib/documents/ast-document-manager.d.ts.map +1 -1
- package/lib/documents/ast-document-manager.js +235 -38
- package/lib/documents/ast-document-manager.js.map +1 -1
- package/lib/documents/client-ids.d.ts +5 -19
- package/lib/documents/client-ids.d.ts.map +1 -1
- package/lib/documents/client-ids.js +5 -19
- package/lib/documents/client-ids.js.map +1 -1
- package/lib/documents/client-session-errors.d.ts +15 -0
- package/lib/documents/client-session-errors.d.ts.map +1 -0
- package/lib/documents/client-session-errors.js +15 -0
- package/lib/documents/client-session-errors.js.map +1 -0
- package/lib/documents/client-session-registry.d.ts +138 -0
- package/lib/documents/client-session-registry.d.ts.map +1 -0
- package/lib/documents/client-session-registry.js +187 -0
- package/lib/documents/client-session-registry.js.map +1 -0
- package/lib/documents/file-system-task-queue.d.ts +49 -0
- package/lib/documents/file-system-task-queue.d.ts.map +1 -0
- package/lib/documents/file-system-task-queue.js +34 -0
- package/lib/documents/file-system-task-queue.js.map +1 -0
- package/lib/documents/hydranium-text-documents.d.ts +386 -57
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -1
- package/lib/documents/hydranium-text-documents.js +697 -113
- package/lib/documents/hydranium-text-documents.js.map +1 -1
- package/lib/documents/index.d.ts +3 -0
- package/lib/documents/index.d.ts.map +1 -1
- package/lib/documents/index.js +3 -0
- package/lib/documents/index.js.map +1 -1
- package/lib/documents/language-client-text-shadow.d.ts +41 -9
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -1
- package/lib/documents/language-client-text-shadow.js +56 -11
- package/lib/documents/language-client-text-shadow.js.map +1 -1
- package/lib/documents/self-save-registry.d.ts +37 -6
- package/lib/documents/self-save-registry.d.ts.map +1 -1
- package/lib/documents/self-save-registry.js +28 -15
- package/lib/documents/self-save-registry.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib/langium/ast-extension/ast-node-builder.d.ts +32 -9
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -1
- package/lib/langium/ast-extension/ast-node-builder.js +60 -22
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -1
- package/lib/langium/bootstrap.d.ts.map +1 -1
- package/lib/langium/bootstrap.js +16 -9
- package/lib/langium/bootstrap.js.map +1 -1
- package/lib/langium/config/configuration-provider.d.ts +81 -0
- package/lib/langium/config/configuration-provider.d.ts.map +1 -0
- package/lib/langium/config/configuration-provider.js +112 -0
- package/lib/langium/config/configuration-provider.js.map +1 -0
- package/lib/langium/config/index.d.ts +1 -0
- package/lib/langium/config/index.d.ts.map +1 -1
- package/lib/langium/config/index.js +1 -0
- package/lib/langium/config/index.js.map +1 -1
- package/lib/langium/diagnostics/lsp-logger.d.ts +17 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -1
- package/lib/langium/diagnostics/lsp-logger.js +40 -6
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +21 -1
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -1
- package/lib/langium/document-builder/build-pipeline-integration.js +32 -5
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -1
- package/lib/langium/document-builder/build-session.d.ts +93 -0
- package/lib/langium/document-builder/build-session.d.ts.map +1 -0
- package/lib/langium/document-builder/build-session.js +72 -0
- package/lib/langium/document-builder/build-session.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +220 -11
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -1
- package/lib/langium/document-builder/document-builder.js +409 -27
- package/lib/langium/document-builder/document-builder.js.map +1 -1
- package/lib/langium/document-builder/index.d.ts +1 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -1
- package/lib/langium/document-builder/index.js +1 -0
- package/lib/langium/document-builder/index.js.map +1 -1
- package/lib/langium/integration-services.d.ts +45 -1
- package/lib/langium/integration-services.d.ts.map +1 -1
- package/lib/langium/integration-services.js +10 -5
- package/lib/langium/integration-services.js.map +1 -1
- package/lib/langium/integrity/integrity-rule.d.ts +13 -5
- package/lib/langium/integrity/integrity-rule.d.ts.map +1 -1
- package/lib/langium/integrity/integrity-rule.js.map +1 -1
- package/lib/langium/integrity/integrity-service.d.ts +50 -6
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -1
- package/lib/langium/integrity/integrity-service.js +193 -17
- package/lib/langium/integrity/integrity-service.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/language-module.d.ts +27 -2
- package/lib/langium/language-module.d.ts.map +1 -1
- package/lib/langium/language-module.js +16 -2
- package/lib/langium/language-module.js.map +1 -1
- package/lib/langium/model-service/client-session.d.ts +307 -0
- package/lib/langium/model-service/client-session.d.ts.map +1 -0
- package/lib/langium/model-service/client-session.js +395 -0
- package/lib/langium/model-service/client-session.js.map +1 -0
- package/lib/langium/model-service/index.d.ts +1 -0
- package/lib/langium/model-service/index.d.ts.map +1 -1
- package/lib/langium/model-service/index.js +1 -0
- package/lib/langium/model-service/index.js.map +1 -1
- package/lib/langium/model-service/model-service.d.ts +240 -174
- package/lib/langium/model-service/model-service.d.ts.map +1 -1
- package/lib/langium/model-service/model-service.js +207 -314
- package/lib/langium/model-service/model-service.js.map +1 -1
- package/lib/langium/module.d.ts +102 -18
- package/lib/langium/module.d.ts.map +1 -1
- package/lib/langium/module.js +30 -12
- package/lib/langium/module.js.map +1 -1
- package/lib/langium/naming/name-provider.d.ts +25 -4
- package/lib/langium/naming/name-provider.d.ts.map +1 -1
- package/lib/langium/naming/name-provider.js +2 -1
- package/lib/langium/naming/name-provider.js.map +1 -1
- package/lib/langium/naming/name-separator-validation.d.ts +23 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -1
- package/lib/langium/naming/name-separator-validation.js +30 -1
- package/lib/langium/naming/name-separator-validation.js.map +1 -1
- package/lib/langium/residency/cst-residency-service.d.ts +31 -11
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -1
- package/lib/langium/residency/cst-residency-service.js +13 -56
- package/lib/langium/residency/cst-residency-service.js.map +1 -1
- package/lib/langium/scope/hydranium-scope-provider.d.ts +48 -13
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -1
- package/lib/langium/scope/hydranium-scope-provider.js +56 -20
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -1
- package/lib/langium/serialization/abstract-serializer.d.ts +11 -20
- package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -1
- package/lib/langium/serialization/abstract-serializer.js +12 -21
- package/lib/langium/serialization/abstract-serializer.js.map +1 -1
- package/lib/langium/service-registry.d.ts +15 -1
- package/lib/langium/service-registry.d.ts.map +1 -1
- package/lib/langium/service-registry.js +16 -0
- package/lib/langium/service-registry.js.map +1 -1
- package/lib/langium/shared-services.d.ts +15 -2
- package/lib/langium/shared-services.d.ts.map +1 -1
- package/lib/langium/shared-services.js.map +1 -1
- package/lib/langium/transfer/transfer-encoder.d.ts +60 -17
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -1
- package/lib/langium/transfer/transfer-encoder.js +38 -16
- package/lib/langium/transfer/transfer-encoder.js.map +1 -1
- package/lib/langium/trivia/comment-preserver.d.ts +423 -0
- package/lib/langium/trivia/comment-preserver.d.ts.map +1 -0
- package/lib/langium/trivia/comment-preserver.js +906 -0
- package/lib/langium/trivia/comment-preserver.js.map +1 -0
- package/lib/langium/trivia/document-ending-preserver.d.ts +43 -0
- package/lib/langium/trivia/document-ending-preserver.d.ts.map +1 -0
- package/lib/langium/trivia/document-ending-preserver.js +48 -0
- package/lib/langium/trivia/document-ending-preserver.js.map +1 -0
- package/lib/langium/trivia/index.d.ts +14 -0
- package/lib/langium/trivia/index.d.ts.map +1 -0
- package/lib/langium/trivia/index.js +14 -0
- package/lib/langium/trivia/index.js.map +1 -0
- package/lib/langium/trivia/trivia-contribution.d.ts +37 -0
- package/lib/langium/trivia/trivia-contribution.d.ts.map +1 -0
- package/lib/langium/trivia/trivia-contribution.js +10 -0
- package/lib/langium/trivia/trivia-contribution.js.map +1 -0
- package/lib/langium/trivia/trivia-preserver.d.ts +50 -0
- package/lib/langium/trivia/trivia-preserver.d.ts.map +1 -0
- package/lib/langium/trivia/trivia-preserver.js +10 -0
- package/lib/langium/trivia/trivia-preserver.js.map +1 -0
- package/lib/langium/trivia/trivia-service.d.ts +70 -0
- package/lib/langium/trivia/trivia-service.d.ts.map +1 -0
- package/lib/langium/trivia/trivia-service.js +56 -0
- package/lib/langium/trivia/trivia-service.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts +1 -1
- package/lib/langium/validation/document-validator.d.ts +294 -10
- package/lib/langium/validation/document-validator.d.ts.map +1 -1
- package/lib/langium/validation/document-validator.js +448 -5
- package/lib/langium/validation/document-validator.js.map +1 -1
- package/lib/langium/workspace/document-uri-policy.d.ts +3 -4
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -1
- package/lib/langium/workspace/document-uri-policy.js +3 -4
- package/lib/langium/workspace/document-uri-policy.js.map +1 -1
- package/lib/langium/workspace/file-system-provider.d.ts +9 -1
- package/lib/langium/workspace/file-system-provider.d.ts.map +1 -1
- package/lib/langium/workspace/file-system-provider.js +40 -7
- package/lib/langium/workspace/file-system-provider.js.map +1 -1
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +25 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -1
- package/lib/langium/workspace/hydranium-langium-document-factory.js +25 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.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/in-memory-file-system-provider.d.ts +23 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -1
- package/lib/langium/workspace/in-memory-file-system-provider.js +55 -9
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -1
- package/lib/langium/workspace/initialize-workspace.d.ts +31 -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/langium/workspace/langium-documents.d.ts +79 -17
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -1
- package/lib/langium/workspace/langium-documents.js +83 -28
- package/lib/langium/workspace/langium-documents.js.map +1 -1
- package/lib/langium/workspace/virtual-document.d.ts +18 -3
- package/lib/langium/workspace/virtual-document.d.ts.map +1 -1
- package/lib/langium/workspace/virtual-document.js +19 -2
- package/lib/langium/workspace/virtual-document.js.map +1 -1
- package/lib/langium/workspace/write-lock-scope.d.ts +4 -3
- package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -1
- package/lib/langium/workspace/write-lock-scope.js +4 -3
- package/lib/langium/workspace/write-lock-scope.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 +73 -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/lsp/completion/hydranium-completion-provider.d.ts +44 -2
- package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -1
- package/lib/lsp/completion/hydranium-completion-provider.js +68 -0
- package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -1
- package/lib/lsp/connection-features.d.ts +23 -0
- package/lib/lsp/connection-features.d.ts.map +1 -0
- package/lib/lsp/connection-features.js +60 -0
- package/lib/lsp/connection-features.js.map +1 -0
- package/lib/lsp/diagnostics-connection.d.ts +27 -0
- package/lib/lsp/diagnostics-connection.d.ts.map +1 -0
- package/lib/lsp/diagnostics-connection.js +53 -0
- package/lib/lsp/diagnostics-connection.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts +70 -62
- package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -1
- package/lib/lsp/hydranium-document-update-handler.js +129 -75
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -1
- package/lib/lsp/index.d.ts +3 -1
- package/lib/lsp/index.d.ts.map +1 -1
- package/lib/lsp/index.js +3 -1
- package/lib/lsp/index.js.map +1 -1
- package/lib/lsp/lsp-latency.d.ts +39 -0
- package/lib/lsp/lsp-latency.d.ts.map +1 -0
- package/lib/lsp/lsp-latency.js +58 -0
- package/lib/lsp/lsp-latency.js.map +1 -0
- package/lib/lsp/semantic-token-provider.d.ts +34 -1
- package/lib/lsp/semantic-token-provider.d.ts.map +1 -1
- package/lib/lsp/semantic-token-provider.js +55 -8
- package/lib/lsp/semantic-token-provider.js.map +1 -1
- package/lib/lsp/shared-module.d.ts +4 -8
- package/lib/lsp/shared-module.d.ts.map +1 -1
- package/lib/lsp/shared-module.js.map +1 -1
- package/lib/lsp/start-language-server.d.ts +8 -7
- package/lib/lsp/start-language-server.d.ts.map +1 -1
- package/lib/lsp/start-language-server.js +13 -7
- package/lib/lsp/start-language-server.js.map +1 -1
- package/lib/messages/carriers.d.ts +54 -0
- package/lib/messages/carriers.d.ts.map +1 -0
- package/lib/messages/carriers.js +62 -0
- package/lib/messages/carriers.js.map +1 -0
- package/lib/messages/index.d.ts +25 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +25 -0
- package/lib/messages/index.js.map +1 -0
- package/lib/messages/renderer.d.ts +142 -0
- package/lib/messages/renderer.d.ts.map +1 -0
- package/lib/messages/renderer.js +165 -0
- package/lib/messages/renderer.js.map +1 -0
- package/lib/node/heap-ceiling.d.ts +61 -0
- package/lib/node/heap-ceiling.d.ts.map +1 -0
- package/lib/node/heap-ceiling.js +72 -0
- package/lib/node/heap-ceiling.js.map +1 -0
- package/lib/node/index.d.ts +1 -0
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +1 -0
- package/lib/node/index.js.map +1 -1
- package/lib/node/latency-from-env.d.ts +1 -1
- package/lib/node/latency-from-env.js +1 -1
- package/lib/node/measure-memory.d.ts.map +1 -1
- package/lib/node/measure-memory.js +1 -0
- package/lib/node/measure-memory.js.map +1 -1
- package/lib/node/node-file-system-provider.d.ts +35 -1
- package/lib/node/node-file-system-provider.d.ts.map +1 -1
- package/lib/node/node-file-system-provider.js +140 -45
- package/lib/node/node-file-system-provider.js.map +1 -1
- package/lib/node/profile-capture.d.ts +8 -2
- package/lib/node/profile-capture.d.ts.map +1 -1
- package/lib/node/profile-capture.js.map +1 -1
- package/lib/node/profiling-run.d.ts +2 -2
- package/lib/node/profiling-run.js +1 -1
- package/lib/node/profiling-run.js.map +1 -1
- package/lib/node/rename-over-open-readers.d.ts +52 -0
- package/lib/node/rename-over-open-readers.d.ts.map +1 -0
- package/lib/node/rename-over-open-readers.js +66 -0
- package/lib/node/rename-over-open-readers.js.map +1 -0
- package/lib/node/socket-launcher.d.ts +16 -1
- package/lib/node/socket-launcher.d.ts.map +1 -1
- package/lib/node/socket-launcher.js +4 -3
- package/lib/node/socket-launcher.js.map +1 -1
- package/lib/node/stdio-launcher.d.ts +1 -1
- package/lib/node/stdio-launcher.d.ts.map +1 -1
- package/lib/node/stdio-launcher.js +1 -1
- package/lib/node/stdio-launcher.js.map +1 -1
- package/lib/testing/fake-document.d.ts +16 -4
- package/lib/testing/fake-document.d.ts.map +1 -1
- package/lib/testing/fake-document.js +18 -3
- package/lib/testing/fake-document.js.map +1 -1
- 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 +62 -14
- package/lib/testing/make-test-services.d.ts.map +1 -1
- package/lib/testing/make-test-services.js +25 -5
- package/lib/testing/make-test-services.js.map +1 -1
- package/lib/testing/node/index.d.ts +1 -0
- package/lib/testing/node/index.d.ts.map +1 -1
- package/lib/testing/node/index.js +1 -0
- package/lib/testing/node/index.js.map +1 -1
- package/lib/testing/node/lsp-harness.d.ts.map +1 -1
- package/lib/testing/node/lsp-harness.js +2 -0
- package/lib/testing/node/lsp-harness.js.map +1 -1
- package/lib/testing/node/lsp-server-connection.d.ts +11 -3
- package/lib/testing/node/lsp-server-connection.d.ts.map +1 -1
- package/lib/testing/node/lsp-server-connection.js +42 -9
- package/lib/testing/node/lsp-server-connection.js.map +1 -1
- package/lib/testing/node/scratch-workspace.d.ts.map +1 -1
- package/lib/testing/node/scratch-workspace.js +10 -5
- package/lib/testing/node/scratch-workspace.js.map +1 -1
- package/lib/testing/node/spawned-server.d.ts +14 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -1
- package/lib/testing/node/spawned-server.js +33 -1
- package/lib/testing/node/spawned-server.js.map +1 -1
- package/lib/testing/node/unhandled-rejections.d.ts +20 -0
- package/lib/testing/node/unhandled-rejections.d.ts.map +1 -0
- package/lib/testing/node/unhandled-rejections.js +32 -0
- package/lib/testing/node/unhandled-rejections.js.map +1 -0
- package/lib/testing/playwright/flaky-network-proxy.d.ts +76 -0
- package/lib/testing/playwright/flaky-network-proxy.d.ts.map +1 -0
- package/lib/testing/playwright/flaky-network-proxy.js +164 -0
- package/lib/testing/playwright/flaky-network-proxy.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +1 -0
- package/lib/testing/playwright/index.d.ts.map +1 -1
- package/lib/testing/playwright/index.js +1 -0
- package/lib/testing/playwright/index.js.map +1 -1
- package/lib/testing/playwright/server-log-capture.d.ts +14 -4
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -1
- package/lib/testing/playwright/server-log-capture.js +21 -4
- package/lib/testing/playwright/server-log-capture.js.map +1 -1
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -1
- package/lib/testing/playwright/server-log-rename-reporter.js +10 -1
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -1
- package/lib/testing/run-update-pipeline.d.ts +4 -4
- package/lib/testing/run-update-pipeline.d.ts.map +1 -1
- package/lib/testing/stub-ast-document-manager.d.ts +10 -9
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -1
- package/lib/testing/stub-ast-document-manager.js +17 -9
- package/lib/testing/stub-ast-document-manager.js.map +1 -1
- package/lib/testing/stub-document-builder.d.ts +15 -6
- package/lib/testing/stub-document-builder.d.ts.map +1 -1
- package/lib/testing/stub-document-builder.js +48 -3
- package/lib/testing/stub-document-builder.js.map +1 -1
- package/lib/testing/stub-hydranium-text-documents.d.ts +22 -7
- package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -1
- package/lib/testing/stub-hydranium-text-documents.js +92 -15
- package/lib/testing/stub-hydranium-text-documents.js.map +1 -1
- package/lib/testing/stub-langium-documents.d.ts +3 -2
- package/lib/testing/stub-langium-documents.d.ts.map +1 -1
- package/lib/testing/stub-langium-documents.js.map +1 -1
- package/lib/testing/stub-model-service.d.ts +7 -6
- package/lib/testing/stub-model-service.d.ts.map +1 -1
- package/lib/testing/stub-model-service.js +4 -4
- package/lib/testing/stub-model-service.js.map +1 -1
- package/lib/util/connection-liveness.d.ts +7 -6
- package/lib/util/connection-liveness.d.ts.map +1 -1
- package/lib/util/connection-liveness.js +35 -14
- package/lib/util/connection-liveness.js.map +1 -1
- package/package.json +17 -8
- package/src/documents/ast-document-manager.ts +345 -62
- package/src/documents/client-ids.ts +5 -22
- package/src/documents/client-session-errors.ts +24 -0
- package/src/documents/client-session-registry.ts +240 -0
- package/src/documents/file-system-task-queue.ts +68 -0
- package/src/documents/hydranium-text-documents.ts +853 -142
- package/src/documents/index.ts +3 -0
- package/src/documents/language-client-text-shadow.ts +59 -11
- package/src/documents/self-save-registry.ts +52 -13
- package/src/index.ts +6 -0
- package/src/langium/ast-extension/ast-node-builder.ts +66 -22
- package/src/langium/bootstrap.ts +16 -9
- package/src/langium/config/configuration-provider.ts +119 -0
- package/src/langium/config/index.ts +1 -0
- package/src/langium/diagnostics/lsp-logger.ts +41 -6
- package/src/langium/document-builder/build-pipeline-integration.ts +50 -5
- package/src/langium/document-builder/build-session.ts +87 -0
- package/src/langium/document-builder/document-builder.ts +460 -26
- package/src/langium/document-builder/index.ts +1 -0
- package/src/langium/integration-services.ts +67 -6
- package/src/langium/integrity/integrity-rule.ts +13 -5
- package/src/langium/integrity/integrity-service.ts +202 -17
- 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/language-module.ts +42 -4
- package/src/langium/model-service/client-session.ts +606 -0
- package/src/langium/model-service/index.ts +1 -0
- package/src/langium/model-service/model-service.ts +363 -312
- package/src/langium/module.ts +132 -24
- package/src/langium/naming/name-provider.ts +27 -5
- package/src/langium/naming/name-separator-validation.ts +34 -5
- package/src/langium/residency/cst-residency-service.ts +36 -14
- package/src/langium/scope/hydranium-scope-provider.ts +60 -22
- package/src/langium/serialization/abstract-serializer.ts +13 -32
- package/src/langium/service-registry.ts +19 -2
- package/src/langium/shared-services.ts +19 -2
- package/src/langium/transfer/transfer-encoder.ts +85 -24
- package/src/langium/trivia/comment-preserver.ts +1100 -0
- package/src/langium/trivia/document-ending-preserver.ts +55 -0
- package/src/langium/trivia/index.ts +14 -0
- package/src/langium/trivia/trivia-contribution.ts +39 -0
- package/src/langium/trivia/trivia-preserver.ts +54 -0
- package/src/langium/trivia/trivia-service.ts +99 -0
- package/src/langium/update-rewrite/update-rewrite.ts +1 -1
- package/src/langium/validation/document-validator.ts +537 -11
- package/src/langium/workspace/document-uri-policy.ts +3 -4
- package/src/langium/workspace/file-system-provider.ts +48 -8
- package/src/langium/workspace/hydranium-langium-document-factory.ts +34 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +30 -1
- package/src/langium/workspace/in-memory-file-system-provider.ts +62 -10
- package/src/langium/workspace/initialize-workspace.ts +43 -5
- package/src/langium/workspace/langium-documents.ts +106 -33
- package/src/langium/workspace/virtual-document.ts +21 -3
- package/src/langium/workspace/write-lock-scope.ts +4 -3
- package/src/locale/index.ts +10 -0
- package/src/locale/server-locale.ts +86 -0
- package/src/lsp/completion/hydranium-completion-provider.ts +82 -2
- package/src/lsp/connection-features.ts +67 -0
- package/src/lsp/diagnostics-connection.ts +56 -0
- package/src/lsp/hydranium-document-update-handler.ts +158 -79
- package/src/lsp/index.ts +3 -1
- package/src/lsp/lsp-latency.ts +62 -0
- package/src/lsp/semantic-token-provider.ts +74 -7
- package/src/lsp/shared-module.ts +4 -8
- package/src/lsp/start-language-server.ts +13 -7
- package/src/messages/carriers.ts +78 -0
- package/src/messages/index.ts +36 -0
- package/src/messages/renderer.ts +212 -0
- package/src/node/heap-ceiling.ts +108 -0
- package/src/node/index.ts +1 -0
- package/src/node/latency-from-env.ts +1 -1
- package/src/node/measure-memory.ts +1 -0
- package/src/node/node-file-system-provider.ts +154 -47
- package/src/node/profile-capture.ts +8 -2
- package/src/node/profiling-run.ts +3 -3
- package/src/node/rename-over-open-readers.ts +78 -0
- package/src/node/socket-launcher.ts +19 -4
- package/src/node/stdio-launcher.ts +1 -2
- package/src/testing/fake-document.ts +24 -5
- package/src/testing/make-noop-shared-services.ts +50 -2
- package/src/testing/make-test-services.ts +101 -26
- package/src/testing/node/index.ts +1 -0
- package/src/testing/node/lsp-harness.ts +2 -0
- package/src/testing/node/lsp-server-connection.ts +61 -11
- package/src/testing/node/scratch-workspace.ts +10 -5
- package/src/testing/node/spawned-server.ts +35 -1
- package/src/testing/node/unhandled-rejections.ts +31 -0
- package/src/testing/playwright/flaky-network-proxy.ts +240 -0
- package/src/testing/playwright/index.ts +1 -0
- package/src/testing/playwright/server-log-capture.ts +24 -5
- package/src/testing/playwright/server-log-rename-reporter.ts +12 -1
- package/src/testing/run-update-pipeline.ts +4 -4
- package/src/testing/stub-ast-document-manager.ts +28 -21
- package/src/testing/stub-document-builder.ts +68 -12
- package/src/testing/stub-hydranium-text-documents.ts +127 -22
- package/src/testing/stub-langium-documents.ts +3 -2
- package/src/testing/stub-model-service.ts +9 -8
- package/src/util/connection-liveness.ts +37 -14
- package/lib/lsp/instrument-connection.d.ts +0 -36
- package/lib/lsp/instrument-connection.d.ts.map +0 -1
- package/lib/lsp/instrument-connection.js +0 -62
- package/lib/lsp/instrument-connection.js.map +0 -1
- package/src/lsp/instrument-connection.ts +0 -66
|
@@ -6,41 +6,37 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SPDX-License-Identifier: MIT
|
|
8
8
|
********************************************************************************/
|
|
9
|
-
import { type CanonicalUri, type
|
|
9
|
+
import { type CanonicalUri, type MaybeObservableValue, type MaybePromise, ObservableValue, type TransferElement, type Tracer } from '@hydranium/protocol';
|
|
10
10
|
import { type AstNode, DocumentState, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
11
|
+
import { type AstDiagnostic } from '../validation/document-validator.js';
|
|
11
12
|
import { type DocumentUriPolicy } from '../workspace/document-uri-policy.js';
|
|
12
13
|
import { type CancellationToken, type Disposable } from 'vscode-languageserver';
|
|
13
14
|
import { AstDocument, type AstDocumentSavedEvent, type AstDocumentUpdatedEvent } from '../../documents/ast-document-manager.js';
|
|
14
15
|
import { type LogNameOptions } from '../diagnostics/logger.js';
|
|
16
|
+
import { type OpenOptions } from '../../documents/client-session-registry.js';
|
|
15
17
|
import { type ServerSharedServices } from '../module.js';
|
|
18
|
+
import { type ClientSession } from './client-session.js';
|
|
19
|
+
/**
|
|
20
|
+
* The undo-stack entry for a server-authored write pushed to the editor.
|
|
21
|
+
*
|
|
22
|
+
* **A user-facing LABEL, not a log string**, which is easy to miss because it
|
|
23
|
+
* travels as an options field rather than as a message: LSP specifies
|
|
24
|
+
* `ApplyWorkspaceEditParams.label` as "presented in the user interface for
|
|
25
|
+
* example on an undo stack to undo the workspace edit". So a user who edits
|
|
26
|
+
* through a form or drags a diagram node reads this in their editor's undo menu
|
|
27
|
+
* — which is why it is rendered like any other message the server sends rather
|
|
28
|
+
* than left as the English literal it was.
|
|
29
|
+
*
|
|
30
|
+
* Parameterless deliberately. The obvious improvement is to name the document,
|
|
31
|
+
* and it is the wrong one: an undo menu is already grouped under the file, so
|
|
32
|
+
* the URI would be noise in the one place it is redundant.
|
|
33
|
+
*/
|
|
34
|
+
export declare const MODEL_UPDATE_EDIT: import("@hydranium/protocol").MessageDefinition<"Update Model">;
|
|
16
35
|
/**
|
|
17
36
|
* Constructor options for {@link ModelService}. All fields are optional,
|
|
18
37
|
* and the defaults are the behaviour described on each one.
|
|
19
38
|
*/
|
|
20
39
|
export interface ModelServiceOptions extends LogNameOptions {
|
|
21
|
-
/**
|
|
22
|
-
* When set, {@link ModelService.update} logs a `warn` line if its
|
|
23
|
-
* end-to-end wait (serialise + content-change apply + rebuild +
|
|
24
|
-
* settled-phase wait) exceeds this many milliseconds. Default
|
|
25
|
-
* `undefined` (no warn line ever emitted; the underlying
|
|
26
|
-
* `Logger.time` debug timing log is unchanged either way).
|
|
27
|
-
*
|
|
28
|
-
* Pure observability — does NOT abort the update, does NOT change
|
|
29
|
-
* resolution semantics. Adopters wanting a hard timeout that throws
|
|
30
|
-
* instead override {@link ModelService.update} on their subclass and
|
|
31
|
-
* race the parent call against their own deadline.
|
|
32
|
-
*
|
|
33
|
-
* Recommended starting threshold: 2-5 seconds for interactive paths
|
|
34
|
-
* (form save, diagram edit). Workspaces with very large documents
|
|
35
|
-
* or slow validation may legitimately exceed 5s on the cold path —
|
|
36
|
-
* tune per workspace.
|
|
37
|
-
*
|
|
38
|
-
* Accepts a {@link MaybeObservableValue} so the threshold can be a
|
|
39
|
-
* fixed constant or bound to a user setting via `Settings.number`
|
|
40
|
-
* and retuned live. Leaving it unset disables the warn line entirely
|
|
41
|
-
* (and skips the per-update stopwatch).
|
|
42
|
-
*/
|
|
43
|
-
readonly slowUpdateWarnMs?: MaybeObservableValue<number>;
|
|
44
40
|
/**
|
|
45
41
|
* Serialise the facade's own build under the workspace WRITE lock, the way
|
|
46
42
|
* Langium's `DefaultDocumentUpdateHandler` dispatches its build. Default
|
|
@@ -63,17 +59,19 @@ export interface ModelServiceOptions extends LogNameOptions {
|
|
|
63
59
|
* option removes is the wasted pass, not just its visible symptom.
|
|
64
60
|
*
|
|
65
61
|
* **What `false` buys.** `WorkspaceLock` is not reentrant. A caller that
|
|
66
|
-
* reaches `update` / `save`
|
|
67
|
-
* an integrity rule or build-phase pass that writes
|
|
68
|
-
* deadlocks: acquiring the lock cancels the running holder, and the new
|
|
62
|
+
* reaches a session's `update` / `save` or `rebuild` while already holding
|
|
63
|
+
* the write lock — an integrity rule or build-phase pass that writes
|
|
64
|
+
* back — deadlocks: acquiring the lock cancels the running holder, and the new
|
|
69
65
|
* acquisition then waits for that holder to release while the holder waits
|
|
70
66
|
* for this call. On `true` that shape is DETECTED and rejected with
|
|
71
67
|
* {@link ReentrantWriteLockError} rather than hanging, wherever a host
|
|
72
68
|
* installs a write-lock scope tracker (`@hydranium/core/node` does at entry
|
|
73
69
|
* load; see {@link isInsideWriteLock}). Setting `false` is the escape hatch
|
|
74
|
-
* for an adopter whose reentrant shape is unavoidable
|
|
75
|
-
*
|
|
76
|
-
*
|
|
70
|
+
* for an adopter whose reentrant shape is unavoidable: the facade's own
|
|
71
|
+
* build then takes no lock, so it cannot cancel the holder it runs inside.
|
|
72
|
+
* The wait after it can still hang there, because a document no build will
|
|
73
|
+
* carry is re-queued through the lock, and that re-queue waits for the
|
|
74
|
+
* holder to end. Prefer `false` over serialised builds only in that case.
|
|
77
75
|
*
|
|
78
76
|
* Accepts a {@link MaybeObservableValue} so it can be bound to a setting and
|
|
79
77
|
* flipped without a restart.
|
|
@@ -81,12 +79,17 @@ export interface ModelServiceOptions extends LogNameOptions {
|
|
|
81
79
|
readonly serializeBuilds?: MaybeObservableValue<boolean>;
|
|
82
80
|
}
|
|
83
81
|
/**
|
|
82
|
+
* The seam every non-LSP head talks to: the data server, the GLSP head and an
|
|
83
|
+
* adopter's own services reach documents through this slot rather than through
|
|
84
|
+
* the workspace stores.
|
|
85
|
+
*
|
|
84
86
|
* In-process facade over the framework's document plumbing
|
|
85
87
|
* (`HydraniumTextDocuments`, `LangiumDocuments`,
|
|
86
|
-
* `DocumentBuilder`, `WritableFileSystemProvider`). Owns the
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* doesn't have to be re-implemented per
|
|
88
|
+
* `DocumentBuilder`, `WritableFileSystemProvider`). Owns the document
|
|
89
|
+
* lifecycle the data-server and GLSP heads delegate to — client sessions that
|
|
90
|
+
* open, update, save and close documents, the phase reads, and `ready` — so
|
|
91
|
+
* coordinating those primitives doesn't have to be re-implemented per head.
|
|
92
|
+
* Every open and write goes through a session from {@link createSession}.
|
|
90
93
|
*
|
|
91
94
|
* "Model" here means the parsed AST — distinct from the wire-shape
|
|
92
95
|
* `TransferDocument` in `@hydranium/protocol`.
|
|
@@ -96,9 +99,9 @@ export interface ModelServiceOptions extends LogNameOptions {
|
|
|
96
99
|
* Multiple in-process consumers want the same workspace-level
|
|
97
100
|
* operations:
|
|
98
101
|
* - The data-server head turns these into typed RPC methods.
|
|
99
|
-
* - The GLSP head uses the same lifecycle for diagram-driven edits
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
+
* - The GLSP head uses the same lifecycle for diagram-driven edits: GModel
|
|
103
|
+
* operation handlers write through the diagram's session and wait on phases
|
|
104
|
+
* before reading.
|
|
102
105
|
* - Server-internal callers (integrity service, ad-hoc bridges, tests)
|
|
103
106
|
* want the same operations without the wire serialisation step.
|
|
104
107
|
*
|
|
@@ -111,15 +114,16 @@ export interface ModelServiceOptions extends LogNameOptions {
|
|
|
111
114
|
*
|
|
112
115
|
* **Read-latest supersession**
|
|
113
116
|
*
|
|
114
|
-
*
|
|
115
|
-
* `DocumentBuilder.waitUntil` to wait for the integrity-settled
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* event. Adopters wanting strict
|
|
120
|
-
* with vN's snapshot specifically, log
|
|
121
|
-
*
|
|
122
|
-
*
|
|
117
|
+
* A session's default `update` and `save` use Langium's per-URI
|
|
118
|
+
* `DocumentBuilder.waitUntil` to wait for `Validated` (the integrity-settled
|
|
119
|
+
* landmark {@link IntegrityService.SettledState} when rebuilds do not
|
|
120
|
+
* validate), then read the post-build state. Concurrent in-process callers
|
|
121
|
+
* on the same URI all see the latest post-build snapshot — none deadlock
|
|
122
|
+
* waiting for a specific version's settled event. Adopters wanting strict
|
|
123
|
+
* version-matched semantics (resolve with vN's snapshot specifically, log
|
|
124
|
+
* "vN superseded by vM at vN+1") override
|
|
125
|
+
* `DefaultClientSession.updateDocument` to attach a phase-listener with
|
|
126
|
+
* explicit version checks; the framework default doesn't need it for safety.
|
|
123
127
|
*
|
|
124
128
|
* **Returns AST snapshots, not wire envelopes**
|
|
125
129
|
*
|
|
@@ -139,18 +143,95 @@ export interface ModelServiceOptions extends LogNameOptions {
|
|
|
139
143
|
* by URI happens here so consumers can subscribe per-document without
|
|
140
144
|
* implementing the URI gate at each callsite.
|
|
141
145
|
*
|
|
146
|
+
* **Two families, and the distinction matters more than the names suggest.**
|
|
147
|
+
* `waitFor*` is a pure wait — it never triggers a build, so a caller waiting on
|
|
148
|
+
* a document no build has touched waits until something else builds it.
|
|
149
|
+
* `ensureDocumentState` and the phase shorthands over it *dispatch*: warm
|
|
150
|
+
* documents are awaited, cold ones are built.
|
|
151
|
+
*
|
|
152
|
+
* **Diagnostics are typed `never` below `Validated`.** Validation is the last
|
|
153
|
+
* phase, so at any earlier landmark the array either is not yet computed or
|
|
154
|
+
* still holds the previous build's, and reading it would take stale results
|
|
155
|
+
* for fresh ones. A caller that needs diagnostics asks for {@link validated}.
|
|
156
|
+
*
|
|
157
|
+
* What the `never` buys, exactly: reading a field off an element is a compile
|
|
158
|
+
* error, and nothing can be appended. It does NOT stop a caller assigning an
|
|
159
|
+
* element to a typed variable, because `never` is assignable to everything — so
|
|
160
|
+
* this is a guard against reaching for diagnostics by accident, not a seal
|
|
161
|
+
* against doing it deliberately.
|
|
162
|
+
*
|
|
163
|
+
* The waits resolve at or ABOVE their target, so an already-validated document
|
|
164
|
+
* does carry usable diagnostics and the `never` over-forbids there. That
|
|
165
|
+
* direction is the safe one: the alternative permits stale reads silently. A
|
|
166
|
+
* member taking a phase as a PARAMETER cannot judge statically and so returns
|
|
167
|
+
* `TDiagnostic`, leaving the choice to the caller.
|
|
168
|
+
*
|
|
142
169
|
* **Generic parameters.**
|
|
143
170
|
* - `TAst` — the AST root type each consumer expects on the returned
|
|
144
171
|
* {@link AstDocument}. Constrained to {@link AstNode}.
|
|
145
|
-
* - `TDiagnostic` —
|
|
146
|
-
* `
|
|
147
|
-
*
|
|
172
|
+
* - `TDiagnostic` — the AST-layer diagnostic: whatever the build left on
|
|
173
|
+
* `LangiumDocument.diagnostics`, carried through on the returned
|
|
174
|
+
* {@link AstDocument}. Defaults to {@link AstDiagnostic}.
|
|
175
|
+
* **Not the `TransferEncoder`'s parameter of the same name**, which is
|
|
176
|
+
* that encoder's OUTPUT and so names the wire shape. This one names its
|
|
177
|
+
* input, and an adopter binds the two to different types.
|
|
178
|
+
* - `TTransfer` — transfer-model root a session's `update` / `save` accept
|
|
148
179
|
* args. Constrained to {@link TransferElement}. Defaults to the
|
|
149
180
|
* structural base.
|
|
150
181
|
*/
|
|
151
|
-
export
|
|
182
|
+
export interface ModelService<TAst extends AstNode, TDiagnostic extends AstDiagnostic = AstDiagnostic, TTransfer extends TransferElement = TransferElement> {
|
|
183
|
+
/**
|
|
184
|
+
* Resolves once the workspace has been initialised and its first build has
|
|
185
|
+
* completed — the gate every read should wait behind, since a document
|
|
186
|
+
* queried before it may be unbuilt and reach no phase.
|
|
187
|
+
*
|
|
188
|
+
* A property rather than a method, matching `ProjectManager.ready` and
|
|
189
|
+
* Langium's `WorkspaceManager.ready`. An implementation needing a stricter
|
|
190
|
+
* gate supplies a Promise that awaits its own concern as well.
|
|
191
|
+
*/
|
|
192
|
+
readonly ready: Promise<void>;
|
|
193
|
+
waitForDocumentState(uri: string, state: DocumentState, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
194
|
+
waitForDocumentSettled(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, never>>;
|
|
195
|
+
waitForBuilderState(state: DocumentState, cancelToken?: CancellationToken): Promise<void>;
|
|
196
|
+
ensureDocumentState(uri: string, state?: DocumentState, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
197
|
+
rebuild(uri: string, state?: DocumentState, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
198
|
+
parsed(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, never>>;
|
|
199
|
+
linked(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, never>>;
|
|
200
|
+
settled(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, never>>;
|
|
201
|
+
indexed(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, never>>;
|
|
202
|
+
validated(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
203
|
+
isOpen(uri: string): boolean;
|
|
204
|
+
snapshot(uri: string): AstDocument<TAst, TDiagnostic> | undefined;
|
|
205
|
+
/**
|
|
206
|
+
* The text a session's write of `model` to `uri` applies: a textual model
|
|
207
|
+
* as given, a structured one rewritten and serialised.
|
|
208
|
+
*/
|
|
209
|
+
modelToText(uri: string, model: TTransfer | string, cancelToken?: CancellationToken): Promise<string>;
|
|
210
|
+
getDocument(uri: string): LangiumDocument | undefined;
|
|
211
|
+
onModelUpdated(uri: string, listener: (event: AstDocumentUpdatedEvent<TAst, TDiagnostic>) => void): Disposable;
|
|
212
|
+
onModelSaved(uri: string, listener: (event: AstDocumentSavedEvent<TAst, TDiagnostic>) => void): Disposable;
|
|
213
|
+
onClientClosed(uri: string, clientId: string, listener: () => void): Disposable;
|
|
214
|
+
/**
|
|
215
|
+
* Start a client session, the only way to open and write documents through
|
|
216
|
+
* this service. Pass a `label` naming the participant; without one it is
|
|
217
|
+
* `session`. The id defaults to `label#` plus a random UUID; a fixed
|
|
218
|
+
* `clientId` is taken as given. Throws `ReservedClientIdError` when the id
|
|
219
|
+
* is reserved by the framework, and `DuplicateClientIdError` when it is
|
|
220
|
+
* held by another live session or has documents open under it as a client
|
|
221
|
+
* that is not a session.
|
|
222
|
+
*
|
|
223
|
+
* `TOpenOptions` types the options the session's `open` takes and its
|
|
224
|
+
* `openOptions` returns. The narrowing is an unchecked cast, and it holds
|
|
225
|
+
* only for the caller that started the session: a holder reached through
|
|
226
|
+
* {@link getSession} sees plain `OpenOptions`.
|
|
227
|
+
*/
|
|
228
|
+
createSession<TOpenOptions extends OpenOptions = OpenOptions>(label?: string, clientId?: string): ClientSession<TAst, TDiagnostic, TTransfer, TOpenOptions>;
|
|
229
|
+
/** The live session started under `clientId`, or `undefined` once it has ended or was never started. */
|
|
230
|
+
getSession(clientId: string): ClientSession<TAst, TDiagnostic, TTransfer> | undefined;
|
|
231
|
+
}
|
|
232
|
+
export declare class DefaultModelService<TAst extends AstNode, TDiagnostic extends AstDiagnostic = AstDiagnostic,
|
|
152
233
|
/**
|
|
153
|
-
* Structured payload
|
|
234
|
+
* Structured payload a session's `update` / `save` accept. Constrained to
|
|
154
235
|
* {@link TransferElement} — the minimal `{ readonly $type: string }`
|
|
155
236
|
* shape. Both transfer-model overlay roots (which extend
|
|
156
237
|
* `TransferElement` explicitly) and AST root types (which have
|
|
@@ -158,7 +239,7 @@ export declare class ModelService<TAst extends AstNode, TDiagnostic = TransferDi
|
|
|
158
239
|
* constraint, so in-process callers (e.g. GLSP state or an
|
|
159
240
|
* integrity service) that pass AST roots remain compatible.
|
|
160
241
|
*/
|
|
161
|
-
TTransfer extends TransferElement = TransferElement> {
|
|
242
|
+
TTransfer extends TransferElement = TransferElement> implements ModelService<TAst, TDiagnostic, TTransfer> {
|
|
162
243
|
protected readonly services: ServerSharedServices;
|
|
163
244
|
protected readonly tracer: Tracer;
|
|
164
245
|
/**
|
|
@@ -170,12 +251,6 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
170
251
|
* (see {@link DocumentUriPolicy}).
|
|
171
252
|
*/
|
|
172
253
|
protected readonly uriPolicy: DocumentUriPolicy;
|
|
173
|
-
/**
|
|
174
|
-
* Live slow-update-warn threshold cell, or `undefined` when the option
|
|
175
|
-
* was not supplied (warn line + stopwatch disabled). Reads `.value` per
|
|
176
|
-
* update so a setting-bound threshold retunes without reconstruction.
|
|
177
|
-
*/
|
|
178
|
-
protected readonly slowUpdateWarn?: ObservableValue<number>;
|
|
179
254
|
/** See {@link ModelServiceOptions.serializeBuilds}. Defaults to `true`. */
|
|
180
255
|
protected readonly serializeBuilds: ObservableValue<boolean>;
|
|
181
256
|
/**
|
|
@@ -186,6 +261,15 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
186
261
|
*/
|
|
187
262
|
protected readonly syncChains: Map<string, Promise<void>>;
|
|
188
263
|
protected readonly pendingSync: Map<string, string>;
|
|
264
|
+
/** The live sessions this service started, by client id, for {@link getSession}. */
|
|
265
|
+
protected readonly sessions: Map<string, ClientSession<TAst, TDiagnostic, TTransfer, object>>;
|
|
266
|
+
/**
|
|
267
|
+
* Drops an ended session from {@link sessions}. Subscribed by the first
|
|
268
|
+
* {@link createSession} rather than at construction, so a services tree with
|
|
269
|
+
* no text store, or one that knows nothing of sessions, still constructs
|
|
270
|
+
* this service.
|
|
271
|
+
*/
|
|
272
|
+
protected sessionCloseListener?: Disposable;
|
|
189
273
|
/**
|
|
190
274
|
* Workspace-level readiness gate. Resolves when the framework has
|
|
191
275
|
* finished its first workspace build cycle and the `ModelService`
|
|
@@ -238,7 +322,7 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
238
322
|
* {@link waitForDocumentState} for the common "wait until content is stable"
|
|
239
323
|
* case (e.g. settling a save). Pure wait — does not trigger a build.
|
|
240
324
|
*/
|
|
241
|
-
waitForDocumentSettled(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst,
|
|
325
|
+
waitForDocumentSettled(uri: string, cancelToken?: CancellationToken): Promise<AstDocument<TAst, never>>;
|
|
242
326
|
/**
|
|
243
327
|
* Internal wait core operating on an already-{@link CanonicalUri canonical}
|
|
244
328
|
* URI. The public string doors ({@link waitForDocumentState} /
|
|
@@ -286,6 +370,12 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
286
370
|
* {@link ModelServiceOptions.serializeBuilds} — see there for the
|
|
287
371
|
* non-reentrancy hazard that is the reason the opt-out exists.
|
|
288
372
|
*
|
|
373
|
+
* An override calls the base before it awaits. Under an LSP connection the
|
|
374
|
+
* store's change event has already asked the update handler to build a
|
|
375
|
+
* session's write; an override whose await outlasts that build makes the
|
|
376
|
+
* base's request start a build of its own, so the write is built and
|
|
377
|
+
* delivered twice.
|
|
378
|
+
*
|
|
289
379
|
* Returns an empty `{ root, diagnostics }` envelope when the document
|
|
290
380
|
* cannot be loaded; adopters that want to throw override this method
|
|
291
381
|
* on their subclass.
|
|
@@ -316,11 +406,19 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
316
406
|
*
|
|
317
407
|
* Phase invariants encoded in the return type:
|
|
318
408
|
* - `parsed` / `linked` / `settled` / `indexed` return
|
|
319
|
-
* `AstDocument<TAst, never>` — diagnostics
|
|
320
|
-
*
|
|
409
|
+
* `AstDocument<TAst, never>` — no diagnostics have been computed at
|
|
410
|
+
* those phases.
|
|
321
411
|
* - `validated` returns `AstDocument<TAst, TDiagnostic>` — diagnostics
|
|
322
412
|
* are populated.
|
|
323
413
|
*
|
|
414
|
+
* **The `never` is enforced, not merely declared.** The wait underneath
|
|
415
|
+
* resolves at or ABOVE the requested state, so a document something else
|
|
416
|
+
* already carried past `Validated` would otherwise come back from
|
|
417
|
+
* `settled()` carrying a full diagnostics array typed `never`; these four
|
|
418
|
+
* strip it. An empty array here therefore means "this read does not report
|
|
419
|
+
* diagnostics", never "this document is clean" — call {@link validated}
|
|
420
|
+
* when the answer has to mean the second.
|
|
421
|
+
*
|
|
324
422
|
* `settled` is the integrity-overlay name for "all integrity rules
|
|
325
423
|
* have fired"; it maps to {@link IntegrityService.SettledState} (which
|
|
326
424
|
* equals `DocumentState.IndexedReferences`), but the dedicated method
|
|
@@ -360,81 +458,42 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
360
458
|
* one customization seam this chain deliberately preserves.
|
|
361
459
|
*/
|
|
362
460
|
protected ensureDocumentStateCanonical(uri: CanonicalUri, state?: DocumentState, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
363
|
-
/**
|
|
364
|
-
* Apply an update for `uri`. The structured-or-textual `model` payload
|
|
365
|
-
* is serialised (via {@link serialize} after {@link rewriteModel} when
|
|
366
|
-
* structured), pushed into the multi-client text-document store with
|
|
367
|
-
* a fresh version, drives a build to the target phase, and returns
|
|
368
|
-
* the post-build AST snapshot.
|
|
369
|
-
*
|
|
370
|
-
* **Read-latest supersession**: concurrent callers on the same URI
|
|
371
|
-
* all see the same post-build state once `waitUntil` resolves; none
|
|
372
|
-
* deadlock waiting for a specific version's settled event. The
|
|
373
|
-
* framework emits a post-resolution `debug` log line distinguishing
|
|
374
|
-
* "vN ready" from "vN ready at vM (superseded)" so callers can
|
|
375
|
-
* observe when their write was overtaken by a newer one before
|
|
376
|
-
* settling — purely observability, doesn't change resolution
|
|
377
|
-
* semantics. Adopters wanting version-matched resolution (resolve
|
|
378
|
-
* with vN's specific settled snapshot, intermediate-phase
|
|
379
|
-
* observability, slow-warn / hard-timeout behaviour) override this
|
|
380
|
-
* method.
|
|
381
|
-
*/
|
|
382
|
-
update(args: TransferUpdateArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
383
|
-
/**
|
|
384
|
-
* Persist `uri` to disk. Same content-change + settled-phase flow as
|
|
385
|
-
* {@link update}, then writes via the
|
|
386
|
-
* `WritableFileSystemProvider` and notifies the multi-client
|
|
387
|
-
* text-document store of the save (so any open LSP-side editor sees
|
|
388
|
-
* the `onDidSave` event regardless of who originated the persist).
|
|
389
|
-
*
|
|
390
|
-
* Returns the post-save AST snapshot.
|
|
391
|
-
*/
|
|
392
|
-
save(args: TransferSaveArgs<TTransfer>, cancelToken?: CancellationToken): Promise<AstDocument<TAst, TDiagnostic>>;
|
|
393
461
|
/**
|
|
394
462
|
* Wait for the document at `uri` to reach the integrity-settled landmark and
|
|
395
463
|
* drain any in-flight write-path applyEdit sync chain (see {@link syncChains})
|
|
396
464
|
* so every language client reflects the latest content before a save returns.
|
|
397
465
|
* No-op tail for headless adopters — `syncChains` is empty without an LSP
|
|
398
466
|
* client. Bounded by {@link SAVE_SETTLE_TIMEOUT_MS} so a hung build, or an
|
|
399
|
-
* applyEdit reverse-RPC deadlock, can't freeze the caller; on timeout
|
|
400
|
-
* a warning and returns rather than throwing.
|
|
467
|
+
* applyEdit reverse-RPC deadlock, can't freeze the caller; on timeout or a
|
|
468
|
+
* failed wait it logs a warning and returns rather than throwing.
|
|
401
469
|
*
|
|
402
470
|
* Adopters with a save flow that must converge editor + disk before returning
|
|
403
471
|
* (e.g. a dual form/code editor that would otherwise show a content-conflict
|
|
404
472
|
* dialog on rapid save) call this after their `save`.
|
|
405
473
|
*/
|
|
406
474
|
protected settleSave(uri: string, cancelToken?: CancellationToken): Promise<void>;
|
|
407
|
-
/**
|
|
408
|
-
* Open the document at `args.uri` on behalf of `args.clientId`.
|
|
409
|
-
* Multi-client: each (uri, clientId) pair is tracked as one
|
|
410
|
-
* registration; the underlying document stays open until the last
|
|
411
|
-
* client closes it. If `args.text` is omitted the document content
|
|
412
|
-
* is read from the `FileSystemProvider`.
|
|
413
|
-
*
|
|
414
|
-
* Returns a {@link Disposable} that closes the registration when
|
|
415
|
-
* disposed — useful for `using` blocks and shutdown cleanup.
|
|
416
|
-
*
|
|
417
|
-
* Delegates to the framework-bound
|
|
418
|
-
* `services.workspace.AstDocumentManager`. Adopter subclasses with
|
|
419
|
-
* extra open-time behaviour (logging, sync-chain bootstrapping)
|
|
420
|
-
* override on their `ModelService` subclass and call `super.open`.
|
|
421
|
-
*
|
|
422
|
-
* The open path does not thread cancellation: `AstDocumentManager.open`
|
|
423
|
-
* and the filesystem read behind it take no token, so a cancelled caller
|
|
424
|
-
* still completes the open.
|
|
425
|
-
*/
|
|
426
|
-
open(args: OpenModelArgs): Promise<Disposable>;
|
|
427
|
-
/**
|
|
428
|
-
* Close the document at `args.uri` for `args.clientId`. Counterpart
|
|
429
|
-
* to {@link open}; the underlying document stays open until every
|
|
430
|
-
* registered client has closed.
|
|
431
|
-
*/
|
|
432
|
-
close(args: CloseModelArgs): Promise<void>;
|
|
433
475
|
/**
|
|
434
476
|
* True when the document at `uri` is currently open for at least one
|
|
435
477
|
* client. Pure read; no side effects.
|
|
436
478
|
*/
|
|
437
479
|
isOpen(uri: string): boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Snapshot of `uri` as it stands RIGHT NOW — the synchronous sibling of the
|
|
482
|
+
* phase reads, which all wait. `undefined` when no document is registered.
|
|
483
|
+
*
|
|
484
|
+
* **This is what a writer wants, and {@link getDocument} is not.** The
|
|
485
|
+
* envelope's `version` is copied by value at projection time, so it cannot
|
|
486
|
+
* move afterwards; a version read off the live document at write time is
|
|
487
|
+
* whatever the server is at *now*, which is the number an optimistic gate is
|
|
488
|
+
* about to compare it against.
|
|
489
|
+
*
|
|
490
|
+
* Diagnostics only from a document that has reached `Validated`, and an
|
|
491
|
+
* empty array otherwise. Unlike the phase reads this one names no phase, so
|
|
492
|
+
* the state it finds is the only thing that can say whether the array
|
|
493
|
+
* describes the content being handed back or whatever an earlier build left.
|
|
494
|
+
* A caller that needs them unconditionally waits, via {@link validated}.
|
|
495
|
+
*/
|
|
496
|
+
snapshot(uri: string): AstDocument<TAst, TDiagnostic> | undefined;
|
|
438
497
|
/**
|
|
439
498
|
* The built {@link LangiumDocument} for `uri`, looked up by canonical identity —
|
|
440
499
|
* the synchronous, phase-agnostic sibling of {@link ensureDocumentState} /
|
|
@@ -443,24 +502,41 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
443
502
|
* into `LangiumDocuments` directly: a symlinked / `..` / case-divergent URI
|
|
444
503
|
* still resolves to the one document the build keys by its real path. Returns
|
|
445
504
|
* `undefined` if no document is registered for `uri`.
|
|
505
|
+
*
|
|
506
|
+
* **Live, so do not take a based-on version off it.** `textDocument` is the
|
|
507
|
+
* store's own object rather than a copy, so `.version` read here answers for
|
|
508
|
+
* the moment of the READ, not the moment of the earlier content — pass it to
|
|
509
|
+
* a write and the server compares its current version against itself, the
|
|
510
|
+
* gate passes unconditionally, and a concurrent edit is overwritten with
|
|
511
|
+
* nothing logged. Use {@link snapshot} for that, or a phase read.
|
|
446
512
|
*/
|
|
447
513
|
getDocument(uri: string): LangiumDocument | undefined;
|
|
514
|
+
createSession<TOpenOptions extends OpenOptions = OpenOptions>(label?: string, clientId?: string): ClientSession<TAst, TDiagnostic, TTransfer, TOpenOptions>;
|
|
515
|
+
getSession(clientId: string): ClientSession<TAst, TDiagnostic, TTransfer> | undefined;
|
|
516
|
+
/**
|
|
517
|
+
* Convert a structured-or-textual `model` payload to its textual form.
|
|
518
|
+
*
|
|
519
|
+
* Textual payloads (LSP / pre-serialised callers) pass through untouched.
|
|
520
|
+
* Structured payloads run the per-language `UpdateRewriteService` chain
|
|
521
|
+
* (transfer-model transforms; diff-aware rewrites see the previous AST root),
|
|
522
|
+
* then serialise. The chain is the single transfer-model-transform seam — a
|
|
523
|
+
* unary normalisation is just a rewrite that ignores `previous`, as
|
|
524
|
+
* `NormalizeEmptyStringsContribution` does. The chain is empty by
|
|
525
|
+
* default, so this is a no-op for adopters that register none.
|
|
526
|
+
*/
|
|
527
|
+
modelToText(uri: string, model: TTransfer | string, cancelToken?: CancellationToken): Promise<string>;
|
|
448
528
|
/**
|
|
449
529
|
* Mirror a server-side change of `document` back to the LSP textual language
|
|
450
530
|
* client, run per document as it reaches the post-integrity settled phase.
|
|
451
531
|
* The single framework caller of
|
|
452
|
-
* `HydraniumTextDocuments.applyEditToLanguageClient
|
|
453
|
-
* `HydraniumTextDocuments.stagePendingContent`.
|
|
454
|
-
*
|
|
455
|
-
* Routes to one of two mechanisms by language-client registration, because
|
|
456
|
-
* an open and a closed document answer different questions:
|
|
532
|
+
* `HydraniumTextDocuments.applyEditToLanguageClient`.
|
|
457
533
|
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
534
|
+
* Only a document open in the language client is mirrored, through
|
|
535
|
+
* {@link syncOpenDocument}, routed purely by **content**. A document open
|
|
536
|
+
* only in another client needs nothing: a language client opening it joins
|
|
537
|
+
* the existing entry and is refreshed from the store. A session writes only
|
|
538
|
+
* what it has open, so no session edit of a closed document waits here for
|
|
539
|
+
* the language client's next open.
|
|
464
540
|
*
|
|
465
541
|
* The decision is **re-derived from the current settled state every time** (it
|
|
466
542
|
* is not a one-shot enrolment), which is what makes it self-healing: a doc
|
|
@@ -481,35 +557,6 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
481
557
|
* author-based skip is needed.
|
|
482
558
|
*/
|
|
483
559
|
protected syncOpenDocument(uri: string, text: string): void;
|
|
484
|
-
/**
|
|
485
|
-
* Stage the settled text of a document closed in the language client so the
|
|
486
|
-
* eventual first `didOpen` sees this in-memory text instead of stale disk —
|
|
487
|
-
* but only for a {@link isNonLanguageClientEdit genuine non-language-client edit}.
|
|
488
|
-
* A document rebuilt by an internal build is skipped, leaving disk authoritative
|
|
489
|
-
* on the next open.
|
|
490
|
-
*/
|
|
491
|
-
protected stageClosedDocument(document: LangiumDocument): void;
|
|
492
|
-
/**
|
|
493
|
-
* Whether `document`'s settled state is a genuine edit by a client *other than
|
|
494
|
-
* the language client* — a write a form / GLSP / integrity client actually made.
|
|
495
|
-
* Excludes two non-edits: the **language client** itself (the LSP/Monaco text
|
|
496
|
-
* client — it already holds its own edits, and the staging here exists to feed
|
|
497
|
-
* it) and an **internal build** (workspace startup, a cascade relink, a
|
|
498
|
-
* `didClose`-reload). This is the gate for {@link stageClosedDocument}: staging
|
|
499
|
-
* an internal build would
|
|
500
|
-
* (a) pre-stage every file on boot and (b) re-stage discarded content after
|
|
501
|
-
* close (e.g. a disposing GLSP session's debounced submit firing after close),
|
|
502
|
-
* which then shadows clean disk on the next open.
|
|
503
|
-
*
|
|
504
|
-
* The signal is "a known client other than the language client authored this
|
|
505
|
-
* version **and** the URI was in the last build's changed set
|
|
506
|
-
* (`isDirectChange`)". A framework-internal rebuild reports no author
|
|
507
|
-
* (`getAuthor` → `undefined`), so it fails `hasKnownAuthor` without comparing
|
|
508
|
-
* against a sentinel. This is NOT redundant with content/registration — it
|
|
509
|
-
* distinguishes "client edited" from "framework rebuilt", which neither the
|
|
510
|
-
* shadow nor `isDirectChange` alone can.
|
|
511
|
-
*/
|
|
512
|
-
protected isNonLanguageClientEdit(document: LangiumDocument): boolean;
|
|
513
560
|
/**
|
|
514
561
|
* Enqueue a sync to the language client. The pending slot per URI holds only
|
|
515
562
|
* the latest text: if a newer settle fires while the current RPC is in
|
|
@@ -518,6 +565,16 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
518
565
|
* per URI so the shadow never drifts from Monaco.
|
|
519
566
|
*/
|
|
520
567
|
protected queueSync(uri: string, text: string): void;
|
|
568
|
+
/**
|
|
569
|
+
* The undo-stack label for a server-authored write, in the locale the server
|
|
570
|
+
* was handed at init.
|
|
571
|
+
*
|
|
572
|
+
* One method rather than the literal at each `applyEdit`, because the two
|
|
573
|
+
* call sites are the same edit — a push and its full-replace retry — and an
|
|
574
|
+
* undo menu showing two different words for one operation would read as two
|
|
575
|
+
* operations.
|
|
576
|
+
*/
|
|
577
|
+
protected editLabel(): string;
|
|
521
578
|
protected drainSyncQueue(uri: string): Promise<void>;
|
|
522
579
|
/**
|
|
523
580
|
* Subscribe to AST-snapshot updates for `uri`. Fires after each
|
|
@@ -525,9 +582,8 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
525
582
|
* `HydraniumTextDocuments` — single listener registration shared with
|
|
526
583
|
* any direct `HydraniumTextDocuments.onUpdate` subscriber, so the same
|
|
527
584
|
* underlying `DocumentBuilder.onDocumentPhase` listener serves both
|
|
528
|
-
* call paths.
|
|
529
|
-
*
|
|
530
|
-
* `lastUpdate` snapshot (see `AstDocumentManager.onUpdate`).
|
|
585
|
+
* call paths. The event's reason, source and cause are
|
|
586
|
+
* {@link AstDocumentManager.attributeUpdate}'s.
|
|
531
587
|
*/
|
|
532
588
|
onModelUpdated(uri: string, listener: (event: AstDocumentUpdatedEvent<TAst, TDiagnostic>) => void): Disposable;
|
|
533
589
|
/**
|
|
@@ -556,28 +612,22 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
556
612
|
* Adopters whose serializer call shape differs (custom service
|
|
557
613
|
* names, generator-driven YAML pretty printers, etc.) override this
|
|
558
614
|
* method. Routes through `Serializer.serializeTransfer` because
|
|
559
|
-
* `
|
|
615
|
+
* a session's `update` / `save` always receive a
|
|
560
616
|
* transfer-model shape (cross-references as plain strings) from
|
|
561
617
|
* adopter callers — the AST-shape entry point is `serializeAst`.
|
|
562
618
|
*
|
|
563
619
|
* Returns {@link MaybePromise} so adopter `Serializer` overrides can be
|
|
564
620
|
* async (remote schema lookup, external canonical-value resolution); the
|
|
565
|
-
* single caller ({@link modelToText}
|
|
621
|
+
* single caller ({@link modelToText}) is already `async`,
|
|
566
622
|
* so a naive `await` covers both branches without extra ceremony.
|
|
567
623
|
*/
|
|
568
624
|
protected serialize(uri: string, root: TTransfer): MaybePromise<string>;
|
|
569
625
|
/**
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
* Structured payloads run the per-language `UpdateRewriteService` chain
|
|
574
|
-
* (transfer-model transforms; diff-aware rewrites see the previous AST root),
|
|
575
|
-
* then serialise. The chain is the single transfer-model-transform seam — a
|
|
576
|
-
* unary normalisation is just a rewrite that ignores `previous`, as
|
|
577
|
-
* `NormalizeEmptyStringsContribution` does. The chain is empty by
|
|
578
|
-
* default, so this is a no-op for adopters that register none.
|
|
626
|
+
* The text a write into a document not yet built should take its trivia
|
|
627
|
+
* from: the store's, which a write always has, since it writes only a
|
|
628
|
+
* document its client has open.
|
|
579
629
|
*/
|
|
580
|
-
protected
|
|
630
|
+
protected textToTakeTriviaFrom(uri: string, _target: URI): Promise<string | undefined>;
|
|
581
631
|
/**
|
|
582
632
|
* Run the per-language transfer-model rewrite chain. Resolves the
|
|
583
633
|
* `UpdateRewriteService` per-URI (like {@link serialize}) and threads
|
|
@@ -594,5 +644,21 @@ TTransfer extends TransferElement = TransferElement> {
|
|
|
594
644
|
* registry — adopters that prefer to throw override on their subclass.
|
|
595
645
|
*/
|
|
596
646
|
protected toAstDocument(uri: URI): AstDocument<TAst, TDiagnostic>;
|
|
647
|
+
/**
|
|
648
|
+
* The same envelope with no diagnostics, for a read that names a phase below
|
|
649
|
+
* `Validated`.
|
|
650
|
+
*
|
|
651
|
+
* Langium fills `LangiumDocument.diagnostics` from inside `validateDocument`
|
|
652
|
+
* and from nowhere else, so below that phase the array holds whatever an
|
|
653
|
+
* EARLIER build left — a verdict about text the document may no longer have.
|
|
654
|
+
* The wait underneath resolves at or above the phase asked for, so a document
|
|
655
|
+
* something else carried past `Validated` would otherwise hand a full array
|
|
656
|
+
* back from `parsed()`.
|
|
657
|
+
*
|
|
658
|
+
* A copy rather than a clear: the envelope is freshly built here, but
|
|
659
|
+
* {@link toAstDocument} is overridable and an adopter's version may return
|
|
660
|
+
* one it also keeps.
|
|
661
|
+
*/
|
|
662
|
+
protected withoutDiagnostics(document: AstDocument<TAst, TDiagnostic>): AstDocument<TAst, never>;
|
|
597
663
|
}
|
|
598
664
|
//# sourceMappingURL=model-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-service.d.ts","sourceRoot":"","sources":["../../../src/langium/model-service/model-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"model-service.d.ts","sourceRoot":"","sources":["../../../src/langium/model-service/model-service.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,YAAY,EAEjB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,eAAe,EAEf,KAAK,eAAe,EACpB,KAAK,MAAM,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAY,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAC3G,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,KAAK,qBAAqB,EAAE,KAAK,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAEhI,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,C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