@hydranium/core 1.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/lib/documents/ast-document-manager.d.ts +243 -0
- package/lib/documents/ast-document-manager.d.ts.map +1 -0
- package/lib/documents/ast-document-manager.js +302 -0
- package/lib/documents/ast-document-manager.js.map +1 -0
- package/lib/documents/client-ids.d.ts +30 -0
- package/lib/documents/client-ids.d.ts.map +1 -0
- package/lib/documents/client-ids.js +30 -0
- package/lib/documents/client-ids.js.map +1 -0
- package/lib/documents/hydranium-text-documents.d.ts +490 -0
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -0
- package/lib/documents/hydranium-text-documents.js +893 -0
- package/lib/documents/hydranium-text-documents.js.map +1 -0
- package/lib/documents/index.d.ts +14 -0
- package/lib/documents/index.d.ts.map +1 -0
- package/lib/documents/index.js +14 -0
- package/lib/documents/index.js.map +1 -0
- package/lib/documents/language-client-text-shadow.d.ts +101 -0
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -0
- package/lib/documents/language-client-text-shadow.js +156 -0
- package/lib/documents/language-client-text-shadow.js.map +1 -0
- package/lib/documents/self-save-registry.d.ts +55 -0
- package/lib/documents/self-save-registry.d.ts.map +1 -0
- package/lib/documents/self-save-registry.js +68 -0
- package/lib/documents/self-save-registry.js.map +1 -0
- package/lib/index.d.ts +38 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts +33 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js +10 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts +212 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.js +181 -0
- package/lib/langium/ast-extension/ast-extension-service.js.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts +90 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.js +61 -0
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -0
- package/lib/langium/ast-extension/index.d.ts +12 -0
- package/lib/langium/ast-extension/index.d.ts.map +1 -0
- package/lib/langium/ast-extension/index.js +12 -0
- package/lib/langium/ast-extension/index.js.map +1 -0
- package/lib/langium/bootstrap.d.ts +224 -0
- package/lib/langium/bootstrap.d.ts.map +1 -0
- package/lib/langium/bootstrap.js +512 -0
- package/lib/langium/bootstrap.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +77 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js +102 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts +106 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js +43 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -0
- package/lib/langium/build-phase-pass/index.d.ts +11 -0
- package/lib/langium/build-phase-pass/index.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/index.js +11 -0
- package/lib/langium/build-phase-pass/index.js.map +1 -0
- package/lib/langium/config/index.d.ts +10 -0
- package/lib/langium/config/index.d.ts.map +1 -0
- package/lib/langium/config/index.js +10 -0
- package/lib/langium/config/index.js.map +1 -0
- package/lib/langium/config/settings.d.ts +173 -0
- package/lib/langium/config/settings.d.ts.map +1 -0
- package/lib/langium/config/settings.js +196 -0
- package/lib/langium/config/settings.js.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts +109 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js +153 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -0
- package/lib/langium/diagnostics/index.d.ts +14 -0
- package/lib/langium/diagnostics/index.d.ts.map +1 -0
- package/lib/langium/diagnostics/index.js +19 -0
- package/lib/langium/diagnostics/index.js.map +1 -0
- package/lib/langium/diagnostics/log-file-token.d.ts +16 -0
- package/lib/langium/diagnostics/log-file-token.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-file-token.js +25 -0
- package/lib/langium/diagnostics/log-file-token.js.map +1 -0
- package/lib/langium/diagnostics/log-preamble.d.ts +42 -0
- package/lib/langium/diagnostics/log-preamble.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-preamble.js +57 -0
- package/lib/langium/diagnostics/log-preamble.js.map +1 -0
- package/lib/langium/diagnostics/logger.d.ts +104 -0
- package/lib/langium/diagnostics/logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/logger.js +178 -0
- package/lib/langium/diagnostics/logger.js.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts +76 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.js +223 -0
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -0
- package/lib/langium/diagnostics/server-tracer.d.ts +27 -0
- package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -0
- package/lib/langium/diagnostics/server-tracer.js +66 -0
- package/lib/langium/diagnostics/server-tracer.js.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +88 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.js +151 -0
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +405 -0
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -0
- package/lib/langium/document-builder/document-builder.js +729 -0
- package/lib/langium/document-builder/document-builder.js.map +1 -0
- package/lib/langium/document-builder/index.d.ts +12 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -0
- package/lib/langium/document-builder/index.js +12 -0
- package/lib/langium/document-builder/index.js.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts +21 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.js +15 -0
- package/lib/langium/document-builder/labeled-phase-listener.js.map +1 -0
- package/lib/langium/documentation/comment-provider.d.ts +31 -0
- package/lib/langium/documentation/comment-provider.d.ts.map +1 -0
- package/lib/langium/documentation/comment-provider.js +36 -0
- package/lib/langium/documentation/comment-provider.js.map +1 -0
- package/lib/langium/documentation/index.d.ts +10 -0
- package/lib/langium/documentation/index.d.ts.map +1 -0
- package/lib/langium/documentation/index.js +10 -0
- package/lib/langium/documentation/index.js.map +1 -0
- package/lib/langium/integration-services.d.ts +200 -0
- package/lib/langium/integration-services.d.ts.map +1 -0
- package/lib/langium/integration-services.js +65 -0
- package/lib/langium/integration-services.js.map +1 -0
- package/lib/langium/integrity/index.d.ts +12 -0
- package/lib/langium/integrity/index.d.ts.map +1 -0
- package/lib/langium/integrity/index.js +12 -0
- package/lib/langium/integrity/index.js.map +1 -0
- package/lib/langium/integrity/integrity-contribution.d.ts +42 -0
- package/lib/langium/integrity/integrity-contribution.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-contribution.js +10 -0
- package/lib/langium/integrity/integrity-contribution.js.map +1 -0
- package/lib/langium/integrity/integrity-rule.d.ts +82 -0
- package/lib/langium/integrity/integrity-rule.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-rule.js +52 -0
- package/lib/langium/integrity/integrity-rule.js.map +1 -0
- package/lib/langium/integrity/integrity-service.d.ts +221 -0
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-service.js +328 -0
- package/lib/langium/integrity/integrity-service.js.map +1 -0
- package/lib/langium/keys/default-element-key-provider.d.ts +19 -0
- package/lib/langium/keys/default-element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/default-element-key-provider.js +18 -0
- package/lib/langium/keys/default-element-key-provider.js.map +1 -0
- package/lib/langium/keys/element-key-provider.d.ts +106 -0
- package/lib/langium/keys/element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/element-key-provider.js +25 -0
- package/lib/langium/keys/element-key-provider.js.map +1 -0
- package/lib/langium/keys/index.d.ts +13 -0
- package/lib/langium/keys/index.d.ts.map +1 -0
- package/lib/langium/keys/index.js +13 -0
- package/lib/langium/keys/index.js.map +1 -0
- package/lib/langium/keys/name-based-key-provider.d.ts +99 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/name-based-key-provider.js +134 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -0
- package/lib/langium/keys/positional-key-provider.d.ts +41 -0
- package/lib/langium/keys/positional-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/positional-key-provider.js +48 -0
- package/lib/langium/keys/positional-key-provider.js.map +1 -0
- package/lib/langium/labeling/index.d.ts +10 -0
- package/lib/langium/labeling/index.d.ts.map +1 -0
- package/lib/langium/labeling/index.js +10 -0
- package/lib/langium/labeling/index.js.map +1 -0
- package/lib/langium/labeling/label-provider.d.ts +79 -0
- package/lib/langium/labeling/label-provider.d.ts.map +1 -0
- package/lib/langium/labeling/label-provider.js +44 -0
- package/lib/langium/labeling/label-provider.js.map +1 -0
- package/lib/langium/language-module.d.ts +281 -0
- package/lib/langium/language-module.d.ts.map +1 -0
- package/lib/langium/language-module.js +103 -0
- package/lib/langium/language-module.js.map +1 -0
- package/lib/langium/language-types.d.ts +85 -0
- package/lib/langium/language-types.d.ts.map +1 -0
- package/lib/langium/language-types.js +173 -0
- package/lib/langium/language-types.js.map +1 -0
- package/lib/langium/model-service/index.d.ts +10 -0
- package/lib/langium/model-service/index.d.ts.map +1 -0
- package/lib/langium/model-service/index.js +10 -0
- package/lib/langium/model-service/index.js.map +1 -0
- package/lib/langium/model-service/model-service.d.ts +598 -0
- package/lib/langium/model-service/model-service.d.ts.map +1 -0
- package/lib/langium/model-service/model-service.js +889 -0
- package/lib/langium/model-service/model-service.js.map +1 -0
- package/lib/langium/module.d.ts +308 -0
- package/lib/langium/module.d.ts.map +1 -0
- package/lib/langium/module.js +165 -0
- package/lib/langium/module.js.map +1 -0
- package/lib/langium/naming/index.d.ts +11 -0
- package/lib/langium/naming/index.d.ts.map +1 -0
- package/lib/langium/naming/index.js +11 -0
- package/lib/langium/naming/index.js.map +1 -0
- package/lib/langium/naming/name-provider.d.ts +360 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -0
- package/lib/langium/naming/name-provider.js +240 -0
- package/lib/langium/naming/name-provider.js.map +1 -0
- package/lib/langium/naming/name-separator-validation.d.ts +47 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -0
- package/lib/langium/naming/name-separator-validation.js +61 -0
- package/lib/langium/naming/name-separator-validation.js.map +1 -0
- package/lib/langium/project/abstract-project-manager.d.ts +242 -0
- package/lib/langium/project/abstract-project-manager.d.ts.map +1 -0
- package/lib/langium/project/abstract-project-manager.js +545 -0
- package/lib/langium/project/abstract-project-manager.js.map +1 -0
- package/lib/langium/project/index.d.ts +13 -0
- package/lib/langium/project/index.d.ts.map +1 -0
- package/lib/langium/project/index.js +13 -0
- package/lib/langium/project/index.js.map +1 -0
- package/lib/langium/project/project-change-event.d.ts +64 -0
- package/lib/langium/project/project-change-event.d.ts.map +1 -0
- package/lib/langium/project/project-change-event.js +10 -0
- package/lib/langium/project/project-change-event.js.map +1 -0
- package/lib/langium/project/project-manager.d.ts +196 -0
- package/lib/langium/project/project-manager.d.ts.map +1 -0
- package/lib/langium/project/project-manager.js +10 -0
- package/lib/langium/project/project-manager.js.map +1 -0
- package/lib/langium/project/single-project-manager.d.ts +69 -0
- package/lib/langium/project/single-project-manager.d.ts.map +1 -0
- package/lib/langium/project/single-project-manager.js +104 -0
- package/lib/langium/project/single-project-manager.js.map +1 -0
- package/lib/langium/residency/cst-residency-service.d.ts +214 -0
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -0
- package/lib/langium/residency/cst-residency-service.js +349 -0
- package/lib/langium/residency/cst-residency-service.js.map +1 -0
- package/lib/langium/residency/index.d.ts +10 -0
- package/lib/langium/residency/index.d.ts.map +1 -0
- package/lib/langium/residency/index.js +10 -0
- package/lib/langium/residency/index.js.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts +122 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.js +115 -0
- package/lib/langium/scope/ast-node-description-provider.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts +163 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.js +220 -0
- package/lib/langium/scope/hydranium-scope-computation.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts +411 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.js +543 -0
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -0
- package/lib/langium/scope/index.d.ts +18 -0
- package/lib/langium/scope/index.d.ts.map +1 -0
- package/lib/langium/scope/index.js +18 -0
- package/lib/langium/scope/index.js.map +1 -0
- package/lib/langium/scope/reference-builder.d.ts +125 -0
- package/lib/langium/scope/reference-builder.d.ts.map +1 -0
- package/lib/langium/scope/reference-builder.js +115 -0
- package/lib/langium/scope/reference-builder.js.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts +228 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.js +185 -0
- package/lib/langium/scope/reference-candidate-provider.js.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts +32 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.js +10 -0
- package/lib/langium/scope/scope-extension-contribution.js.map +1 -0
- package/lib/langium/scope/scope-extension-service.d.ts +149 -0
- package/lib/langium/scope/scope-extension-service.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-service.js +94 -0
- package/lib/langium/scope/scope-extension-service.js.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts +160 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.js +98 -0
- package/lib/langium/scope/scoped-ast-node-description.js.map +1 -0
- package/lib/langium/scope/tier-specificity.d.ts +47 -0
- package/lib/langium/scope/tier-specificity.d.ts.map +1 -0
- package/lib/langium/scope/tier-specificity.js +83 -0
- package/lib/langium/scope/tier-specificity.js.map +1 -0
- package/lib/langium/serialization/abstract-serializer.d.ts +316 -0
- package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/abstract-serializer.js +351 -0
- package/lib/langium/serialization/abstract-serializer.js.map +1 -0
- package/lib/langium/serialization/index.d.ts +14 -0
- package/lib/langium/serialization/index.d.ts.map +1 -0
- package/lib/langium/serialization/index.js +14 -0
- package/lib/langium/serialization/index.js.map +1 -0
- package/lib/langium/serialization/json-serializer.d.ts +106 -0
- package/lib/langium/serialization/json-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/json-serializer.js +198 -0
- package/lib/langium/serialization/json-serializer.js.map +1 -0
- package/lib/langium/serialization/serialization-util.d.ts +29 -0
- package/lib/langium/serialization/serialization-util.d.ts.map +1 -0
- package/lib/langium/serialization/serialization-util.js +37 -0
- package/lib/langium/serialization/serialization-util.js.map +1 -0
- package/lib/langium/serialization/serializer.d.ts +66 -0
- package/lib/langium/serialization/serializer.d.ts.map +1 -0
- package/lib/langium/serialization/serializer.js +10 -0
- package/lib/langium/serialization/serializer.js.map +1 -0
- package/lib/langium/serialization/yaml-serializer.d.ts +166 -0
- package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/yaml-serializer.js +228 -0
- package/lib/langium/serialization/yaml-serializer.js.map +1 -0
- package/lib/langium/service-registry.d.ts +220 -0
- package/lib/langium/service-registry.d.ts.map +1 -0
- package/lib/langium/service-registry.js +258 -0
- package/lib/langium/service-registry.js.map +1 -0
- package/lib/langium/shared-services.d.ts +98 -0
- package/lib/langium/shared-services.d.ts.map +1 -0
- package/lib/langium/shared-services.js +30 -0
- package/lib/langium/shared-services.js.map +1 -0
- package/lib/langium/transfer/index.d.ts +10 -0
- package/lib/langium/transfer/index.d.ts.map +1 -0
- package/lib/langium/transfer/index.js +10 -0
- package/lib/langium/transfer/index.js.map +1 -0
- package/lib/langium/transfer/transfer-encoder.d.ts +294 -0
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -0
- package/lib/langium/transfer/transfer-encoder.js +328 -0
- package/lib/langium/transfer/transfer-encoder.js.map +1 -0
- package/lib/langium/update-rewrite/index.d.ts +14 -0
- package/lib/langium/update-rewrite/index.d.ts.map +1 -0
- package/lib/langium/update-rewrite/index.js +14 -0
- package/lib/langium/update-rewrite/index.js.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts +52 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js +83 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts +37 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js +51 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts +42 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts +89 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js +75 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts +59 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite.js.map +1 -0
- package/lib/langium/validation/document-validator.d.ts +106 -0
- package/lib/langium/validation/document-validator.d.ts.map +1 -0
- package/lib/langium/validation/document-validator.js +118 -0
- package/lib/langium/validation/document-validator.js.map +1 -0
- package/lib/langium/validation/index.d.ts +12 -0
- package/lib/langium/validation/index.d.ts.map +1 -0
- package/lib/langium/validation/index.js +12 -0
- package/lib/langium/validation/index.js.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts +34 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.js +51 -0
- package/lib/langium/validation/validation-contribution-collector.js.map +1 -0
- package/lib/langium/validation/validation-contribution.d.ts +36 -0
- package/lib/langium/validation/validation-contribution.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution.js +10 -0
- package/lib/langium/validation/validation-contribution.js.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts +68 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.js +23 -0
- package/lib/langium/workspace/additional-document-contribution.js.map +1 -0
- package/lib/langium/workspace/document-uri-policy.d.ts +151 -0
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -0
- package/lib/langium/workspace/document-uri-policy.js +121 -0
- package/lib/langium/workspace/document-uri-policy.js.map +1 -0
- package/lib/langium/workspace/file-system-provider.d.ts +30 -0
- package/lib/langium/workspace/file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/file-system-provider.js +41 -0
- package/lib/langium/workspace/file-system-provider.js.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +45 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js +64 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts +31 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js +33 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +232 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js +368 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts +127 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js +195 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/index-manager.d.ts +142 -0
- package/lib/langium/workspace/index-manager.d.ts.map +1 -0
- package/lib/langium/workspace/index-manager.js +245 -0
- package/lib/langium/workspace/index-manager.js.map +1 -0
- package/lib/langium/workspace/index.d.ts +23 -0
- package/lib/langium/workspace/index.d.ts.map +1 -0
- package/lib/langium/workspace/index.js +23 -0
- package/lib/langium/workspace/index.js.map +1 -0
- package/lib/langium/workspace/initialize-workspace.d.ts +63 -0
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -0
- package/lib/langium/workspace/initialize-workspace.js +88 -0
- package/lib/langium/workspace/initialize-workspace.js.map +1 -0
- package/lib/langium/workspace/langium-documents.d.ts +47 -0
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -0
- package/lib/langium/workspace/langium-documents.js +85 -0
- package/lib/langium/workspace/langium-documents.js.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts +207 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.js +208 -0
- package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/synthetic.d.ts +38 -0
- package/lib/langium/workspace/synthetic.d.ts.map +1 -0
- package/lib/langium/workspace/synthetic.js +58 -0
- package/lib/langium/workspace/synthetic.js.map +1 -0
- package/lib/langium/workspace/virtual-document.d.ts +78 -0
- package/lib/langium/workspace/virtual-document.d.ts.map +1 -0
- package/lib/langium/workspace/virtual-document.js +89 -0
- package/lib/langium/workspace/virtual-document.js.map +1 -0
- package/lib/langium/workspace/write-lock-scope.d.ts +69 -0
- package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -0
- package/lib/langium/workspace/write-lock-scope.js +54 -0
- package/lib/langium/workspace/write-lock-scope.js.map +1 -0
- package/lib/launcher/index.d.ts +10 -0
- package/lib/launcher/index.d.ts.map +1 -0
- package/lib/launcher/index.js +12 -0
- package/lib/launcher/index.js.map +1 -0
- package/lib/launcher/integrated-server.d.ts +28 -0
- package/lib/launcher/integrated-server.d.ts.map +1 -0
- package/lib/launcher/integrated-server.js +10 -0
- package/lib/launcher/integrated-server.js.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts +89 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.js +123 -0
- package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts +204 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.js +288 -0
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -0
- package/lib/lsp/index.d.ts +23 -0
- package/lib/lsp/index.d.ts.map +1 -0
- package/lib/lsp/index.js +23 -0
- package/lib/lsp/index.js.map +1 -0
- package/lib/lsp/instrument-connection.d.ts +36 -0
- package/lib/lsp/instrument-connection.d.ts.map +1 -0
- package/lib/lsp/instrument-connection.js +62 -0
- package/lib/lsp/instrument-connection.js.map +1 -0
- package/lib/lsp/language-module.d.ts +53 -0
- package/lib/lsp/language-module.d.ts.map +1 -0
- package/lib/lsp/language-module.js +28 -0
- package/lib/lsp/language-module.js.map +1 -0
- package/lib/lsp/semantic-token-provider.d.ts +131 -0
- package/lib/lsp/semantic-token-provider.d.ts.map +1 -0
- package/lib/lsp/semantic-token-provider.js +148 -0
- package/lib/lsp/semantic-token-provider.js.map +1 -0
- package/lib/lsp/shared-module.d.ts +76 -0
- package/lib/lsp/shared-module.d.ts.map +1 -0
- package/lib/lsp/shared-module.js +33 -0
- package/lib/lsp/shared-module.js.map +1 -0
- package/lib/lsp/start-language-server.d.ts +43 -0
- package/lib/lsp/start-language-server.d.ts.map +1 -0
- package/lib/lsp/start-language-server.js +60 -0
- package/lib/lsp/start-language-server.js.map +1 -0
- package/lib/node/ast-ground-truth.d.ts +57 -0
- package/lib/node/ast-ground-truth.d.ts.map +1 -0
- package/lib/node/ast-ground-truth.js +46 -0
- package/lib/node/ast-ground-truth.js.map +1 -0
- package/lib/node/event-loop-monitor.d.ts +40 -0
- package/lib/node/event-loop-monitor.d.ts.map +1 -0
- package/lib/node/event-loop-monitor.js +62 -0
- package/lib/node/event-loop-monitor.js.map +1 -0
- package/lib/node/index.d.ts +29 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +50 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/latency-from-env.d.ts +32 -0
- package/lib/node/latency-from-env.d.ts.map +1 -0
- package/lib/node/latency-from-env.js +36 -0
- package/lib/node/latency-from-env.js.map +1 -0
- package/lib/node/lint-grammar.d.ts +87 -0
- package/lib/node/lint-grammar.d.ts.map +1 -0
- package/lib/node/lint-grammar.js +124 -0
- package/lib/node/lint-grammar.js.map +1 -0
- package/lib/node/log-file-sink.d.ts +22 -0
- package/lib/node/log-file-sink.d.ts.map +1 -0
- package/lib/node/log-file-sink.js +43 -0
- package/lib/node/log-file-sink.js.map +1 -0
- package/lib/node/log-preamble-node.d.ts +28 -0
- package/lib/node/log-preamble-node.d.ts.map +1 -0
- package/lib/node/log-preamble-node.js +55 -0
- package/lib/node/log-preamble-node.js.map +1 -0
- package/lib/node/measure-memory.d.ts +86 -0
- package/lib/node/measure-memory.d.ts.map +1 -0
- package/lib/node/measure-memory.js +128 -0
- package/lib/node/measure-memory.js.map +1 -0
- package/lib/node/memory-monitor.d.ts +42 -0
- package/lib/node/memory-monitor.d.ts.map +1 -0
- package/lib/node/memory-monitor.js +83 -0
- package/lib/node/memory-monitor.js.map +1 -0
- package/lib/node/node-file-system-provider.d.ts +112 -0
- package/lib/node/node-file-system-provider.d.ts.map +1 -0
- package/lib/node/node-file-system-provider.js +230 -0
- package/lib/node/node-file-system-provider.js.map +1 -0
- package/lib/node/process-memory.d.ts +66 -0
- package/lib/node/process-memory.d.ts.map +1 -0
- package/lib/node/process-memory.js +252 -0
- package/lib/node/process-memory.js.map +1 -0
- package/lib/node/profile-capture.d.ts +118 -0
- package/lib/node/profile-capture.d.ts.map +1 -0
- package/lib/node/profile-capture.js +315 -0
- package/lib/node/profile-capture.js.map +1 -0
- package/lib/node/profile-digest.d.ts +49 -0
- package/lib/node/profile-digest.d.ts.map +1 -0
- package/lib/node/profile-digest.js +74 -0
- package/lib/node/profile-digest.js.map +1 -0
- package/lib/node/profiling-run.d.ts +80 -0
- package/lib/node/profiling-run.d.ts.map +1 -0
- package/lib/node/profiling-run.js +183 -0
- package/lib/node/profiling-run.js.map +1 -0
- package/lib/node/reflect-grammar.d.ts +109 -0
- package/lib/node/reflect-grammar.d.ts.map +1 -0
- package/lib/node/reflect-grammar.js +96 -0
- package/lib/node/reflect-grammar.js.map +1 -0
- package/lib/node/server-diagnostics.d.ts +43 -0
- package/lib/node/server-diagnostics.d.ts.map +1 -0
- package/lib/node/server-diagnostics.js +46 -0
- package/lib/node/server-diagnostics.js.map +1 -0
- package/lib/node/server-state-snapshot.d.ts +48 -0
- package/lib/node/server-state-snapshot.d.ts.map +1 -0
- package/lib/node/server-state-snapshot.js +139 -0
- package/lib/node/server-state-snapshot.js.map +1 -0
- package/lib/node/socket-launcher.d.ts +106 -0
- package/lib/node/socket-launcher.d.ts.map +1 -0
- package/lib/node/socket-launcher.js +138 -0
- package/lib/node/socket-launcher.js.map +1 -0
- package/lib/node/stdio-launcher.d.ts +88 -0
- package/lib/node/stdio-launcher.d.ts.map +1 -0
- package/lib/node/stdio-launcher.js +83 -0
- package/lib/node/stdio-launcher.js.map +1 -0
- package/lib/node/validate-workspace.d.ts +80 -0
- package/lib/node/validate-workspace.d.ts.map +1 -0
- package/lib/node/validate-workspace.js +72 -0
- package/lib/node/validate-workspace.js.map +1 -0
- package/lib/node/write-lock-scope-node.d.ts +27 -0
- package/lib/node/write-lock-scope-node.d.ts.map +1 -0
- package/lib/node/write-lock-scope-node.js +38 -0
- package/lib/node/write-lock-scope-node.js.map +1 -0
- package/lib/testing/ast-snapshot.d.ts +38 -0
- package/lib/testing/ast-snapshot.d.ts.map +1 -0
- package/lib/testing/ast-snapshot.js +78 -0
- package/lib/testing/ast-snapshot.js.map +1 -0
- package/lib/testing/document-uri-policy-conformance.d.ts +65 -0
- package/lib/testing/document-uri-policy-conformance.d.ts.map +1 -0
- package/lib/testing/document-uri-policy-conformance.js +69 -0
- package/lib/testing/document-uri-policy-conformance.js.map +1 -0
- package/lib/testing/fake-description.d.ts +35 -0
- package/lib/testing/fake-description.d.ts.map +1 -0
- package/lib/testing/fake-description.js +38 -0
- package/lib/testing/fake-description.js.map +1 -0
- package/lib/testing/fake-document.d.ts +71 -0
- package/lib/testing/fake-document.d.ts.map +1 -0
- package/lib/testing/fake-document.js +85 -0
- package/lib/testing/fake-document.js.map +1 -0
- package/lib/testing/fake-reflection.d.ts +29 -0
- package/lib/testing/fake-reflection.d.ts.map +1 -0
- package/lib/testing/fake-reflection.js +30 -0
- package/lib/testing/fake-reflection.js.map +1 -0
- package/lib/testing/index.d.ts +44 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/index.js +44 -0
- package/lib/testing/index.js.map +1 -0
- package/lib/testing/langium-test-helpers.d.ts +26 -0
- package/lib/testing/langium-test-helpers.d.ts.map +1 -0
- package/lib/testing/langium-test-helpers.js +26 -0
- package/lib/testing/langium-test-helpers.js.map +1 -0
- package/lib/testing/make-noop-language-services.d.ts +39 -0
- package/lib/testing/make-noop-language-services.d.ts.map +1 -0
- package/lib/testing/make-noop-language-services.js +30 -0
- package/lib/testing/make-noop-language-services.js.map +1 -0
- package/lib/testing/make-noop-shared-services.d.ts +61 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -0
- package/lib/testing/make-noop-shared-services.js +49 -0
- package/lib/testing/make-noop-shared-services.js.map +1 -0
- package/lib/testing/make-test-services.d.ts +217 -0
- package/lib/testing/make-test-services.d.ts.map +1 -0
- package/lib/testing/make-test-services.js +128 -0
- package/lib/testing/make-test-services.js.map +1 -0
- package/lib/testing/make-test-tracer.d.ts +67 -0
- package/lib/testing/make-test-tracer.d.ts.map +1 -0
- package/lib/testing/make-test-tracer.js +68 -0
- package/lib/testing/make-test-tracer.js.map +1 -0
- package/lib/testing/node/generated-workspace.d.ts +95 -0
- package/lib/testing/node/generated-workspace.d.ts.map +1 -0
- package/lib/testing/node/generated-workspace.js +134 -0
- package/lib/testing/node/generated-workspace.js.map +1 -0
- package/lib/testing/node/golden-corpus.d.ts +50 -0
- package/lib/testing/node/golden-corpus.d.ts.map +1 -0
- package/lib/testing/node/golden-corpus.js +80 -0
- package/lib/testing/node/golden-corpus.js.map +1 -0
- package/lib/testing/node/index.d.ts +28 -0
- package/lib/testing/node/index.d.ts.map +1 -0
- package/lib/testing/node/index.js +28 -0
- package/lib/testing/node/index.js.map +1 -0
- package/lib/testing/node/lsp-harness.d.ts +139 -0
- package/lib/testing/node/lsp-harness.d.ts.map +1 -0
- package/lib/testing/node/lsp-harness.js +119 -0
- package/lib/testing/node/lsp-harness.js.map +1 -0
- package/lib/testing/node/lsp-server-connection.d.ts +232 -0
- package/lib/testing/node/lsp-server-connection.d.ts.map +1 -0
- package/lib/testing/node/lsp-server-connection.js +304 -0
- package/lib/testing/node/lsp-server-connection.js.map +1 -0
- package/lib/testing/node/scratch-workspace.d.ts +60 -0
- package/lib/testing/node/scratch-workspace.d.ts.map +1 -0
- package/lib/testing/node/scratch-workspace.js +87 -0
- package/lib/testing/node/scratch-workspace.js.map +1 -0
- package/lib/testing/node/spawned-server.d.ts +170 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -0
- package/lib/testing/node/spawned-server.js +265 -0
- package/lib/testing/node/spawned-server.js.map +1 -0
- package/lib/testing/parse-semantic-root.d.ts +83 -0
- package/lib/testing/parse-semantic-root.d.ts.map +1 -0
- package/lib/testing/parse-semantic-root.js +119 -0
- package/lib/testing/parse-semantic-root.js.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts +80 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.js +161 -0
- package/lib/testing/playwright/browser-capture-bridge.js.map +1 -0
- package/lib/testing/playwright/e2e-profiling.d.ts +132 -0
- package/lib/testing/playwright/e2e-profiling.d.ts.map +1 -0
- package/lib/testing/playwright/e2e-profiling.js +270 -0
- package/lib/testing/playwright/e2e-profiling.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +13 -0
- package/lib/testing/playwright/index.d.ts.map +1 -0
- package/lib/testing/playwright/index.js +16 -0
- package/lib/testing/playwright/index.js.map +1 -0
- package/lib/testing/playwright/server-log-capture.d.ts +230 -0
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-capture.js +336 -0
- package/lib/testing/playwright/server-log-capture.js.map +1 -0
- package/lib/testing/playwright/server-log-fixture.d.ts +36 -0
- package/lib/testing/playwright/server-log-fixture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-fixture.js +38 -0
- package/lib/testing/playwright/server-log-fixture.js.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts +22 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.js +26 -0
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -0
- package/lib/testing/run-update-pipeline.d.ts +99 -0
- package/lib/testing/run-update-pipeline.d.ts.map +1 -0
- package/lib/testing/run-update-pipeline.js +24 -0
- package/lib/testing/run-update-pipeline.js.map +1 -0
- package/lib/testing/stub-ast-document-manager.d.ts +82 -0
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -0
- package/lib/testing/stub-ast-document-manager.js +125 -0
- package/lib/testing/stub-ast-document-manager.js.map +1 -0
- package/lib/testing/stub-document-builder.d.ts +99 -0
- package/lib/testing/stub-document-builder.d.ts.map +1 -0
- package/lib/testing/stub-document-builder.js +142 -0
- package/lib/testing/stub-document-builder.js.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts +125 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.js +164 -0
- package/lib/testing/stub-hydranium-text-documents.js.map +1 -0
- package/lib/testing/stub-index-manager.d.ts +40 -0
- package/lib/testing/stub-index-manager.d.ts.map +1 -0
- package/lib/testing/stub-index-manager.js +38 -0
- package/lib/testing/stub-index-manager.js.map +1 -0
- package/lib/testing/stub-langium-documents.d.ts +53 -0
- package/lib/testing/stub-langium-documents.d.ts.map +1 -0
- package/lib/testing/stub-langium-documents.js +62 -0
- package/lib/testing/stub-langium-documents.js.map +1 -0
- package/lib/testing/stub-model-service.d.ts +31 -0
- package/lib/testing/stub-model-service.d.ts.map +1 -0
- package/lib/testing/stub-model-service.js +45 -0
- package/lib/testing/stub-model-service.js.map +1 -0
- package/lib/testing/stub-project-manager.d.ts +43 -0
- package/lib/testing/stub-project-manager.d.ts.map +1 -0
- package/lib/testing/stub-project-manager.js +125 -0
- package/lib/testing/stub-project-manager.js.map +1 -0
- package/lib/testing/stub-self-save-registry.d.ts +31 -0
- package/lib/testing/stub-self-save-registry.d.ts.map +1 -0
- package/lib/testing/stub-self-save-registry.js +23 -0
- package/lib/testing/stub-self-save-registry.js.map +1 -0
- package/lib/testing/stub-service-registry.d.ts +95 -0
- package/lib/testing/stub-service-registry.d.ts.map +1 -0
- package/lib/testing/stub-service-registry.js +108 -0
- package/lib/testing/stub-service-registry.js.map +1 -0
- package/lib/testing/stub-writable-file-system.d.ts +42 -0
- package/lib/testing/stub-writable-file-system.d.ts.map +1 -0
- package/lib/testing/stub-writable-file-system.js +26 -0
- package/lib/testing/stub-writable-file-system.js.map +1 -0
- package/lib/util/connection-liveness.d.ts +25 -0
- package/lib/util/connection-liveness.d.ts.map +1 -0
- package/lib/util/connection-liveness.js +46 -0
- package/lib/util/connection-liveness.js.map +1 -0
- package/lib/util/environment.d.ts +53 -0
- package/lib/util/environment.d.ts.map +1 -0
- package/lib/util/environment.js +78 -0
- package/lib/util/environment.js.map +1 -0
- package/lib/util/index.d.ts +13 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/registry.d.ts +88 -0
- package/lib/util/registry.d.ts.map +1 -0
- package/lib/util/registry.js +105 -0
- package/lib/util/registry.js.map +1 -0
- package/package.json +134 -0
- package/src/documents/ast-document-manager.ts +455 -0
- package/src/documents/client-ids.ts +33 -0
- package/src/documents/hydranium-text-documents.ts +1142 -0
- package/src/documents/index.ts +14 -0
- package/src/documents/language-client-text-shadow.ts +175 -0
- package/src/documents/self-save-registry.ts +81 -0
- package/src/index.ts +39 -0
- package/src/langium/ast-extension/ast-extension-contribution.ts +35 -0
- package/src/langium/ast-extension/ast-extension-service.ts +311 -0
- package/src/langium/ast-extension/ast-node-builder.ts +125 -0
- package/src/langium/ast-extension/index.ts +12 -0
- package/src/langium/bootstrap.ts +600 -0
- package/src/langium/build-phase-pass/build-phase-pass-service.ts +141 -0
- package/src/langium/build-phase-pass/build-phase-pass.ts +123 -0
- package/src/langium/build-phase-pass/index.ts +11 -0
- package/src/langium/config/index.ts +10 -0
- package/src/langium/config/settings.ts +353 -0
- package/src/langium/diagnostics/hydranium-langium-profiler.ts +187 -0
- package/src/langium/diagnostics/index.ts +19 -0
- package/src/langium/diagnostics/log-file-token.ts +26 -0
- package/src/langium/diagnostics/log-preamble.ts +87 -0
- package/src/langium/diagnostics/logger.ts +246 -0
- package/src/langium/diagnostics/lsp-logger.ts +277 -0
- package/src/langium/diagnostics/server-tracer.ts +73 -0
- package/src/langium/document-builder/build-pipeline-integration.ts +193 -0
- package/src/langium/document-builder/document-builder.ts +839 -0
- package/src/langium/document-builder/index.ts +12 -0
- package/src/langium/document-builder/labeled-phase-listener.ts +26 -0
- package/src/langium/documentation/comment-provider.ts +37 -0
- package/src/langium/documentation/index.ts +10 -0
- package/src/langium/integration-services.ts +281 -0
- package/src/langium/integrity/index.ts +12 -0
- package/src/langium/integrity/integrity-contribution.ts +44 -0
- package/src/langium/integrity/integrity-rule.ts +100 -0
- package/src/langium/integrity/integrity-service.ts +423 -0
- package/src/langium/keys/default-element-key-provider.ts +20 -0
- package/src/langium/keys/element-key-provider.ts +114 -0
- package/src/langium/keys/index.ts +13 -0
- package/src/langium/keys/name-based-key-provider.ts +146 -0
- package/src/langium/keys/positional-key-provider.ts +57 -0
- package/src/langium/labeling/index.ts +10 -0
- package/src/langium/labeling/label-provider.ts +110 -0
- package/src/langium/language-module.ts +367 -0
- package/src/langium/language-types.ts +214 -0
- package/src/langium/model-service/index.ts +10 -0
- package/src/langium/model-service/model-service.ts +1051 -0
- package/src/langium/module.ts +446 -0
- package/src/langium/naming/index.ts +11 -0
- package/src/langium/naming/name-provider.ts +533 -0
- package/src/langium/naming/name-separator-validation.ts +73 -0
- package/src/langium/project/abstract-project-manager.ts +630 -0
- package/src/langium/project/index.ts +13 -0
- package/src/langium/project/project-change-event.ts +66 -0
- package/src/langium/project/project-manager.ts +221 -0
- package/src/langium/project/single-project-manager.ts +126 -0
- package/src/langium/residency/cst-residency-service.ts +412 -0
- package/src/langium/residency/index.ts +10 -0
- package/src/langium/scope/ast-node-description-provider.ts +141 -0
- package/src/langium/scope/hydranium-scope-computation.ts +246 -0
- package/src/langium/scope/hydranium-scope-provider.ts +659 -0
- package/src/langium/scope/index.ts +18 -0
- package/src/langium/scope/reference-builder.ts +194 -0
- package/src/langium/scope/reference-candidate-provider.ts +314 -0
- package/src/langium/scope/scope-extension-contribution.ts +34 -0
- package/src/langium/scope/scope-extension-service.ts +207 -0
- package/src/langium/scope/scoped-ast-node-description.ts +174 -0
- package/src/langium/scope/tier-specificity.ts +89 -0
- package/src/langium/serialization/abstract-serializer.ts +474 -0
- package/src/langium/serialization/index.ts +14 -0
- package/src/langium/serialization/json-serializer.ts +264 -0
- package/src/langium/serialization/serialization-util.ts +40 -0
- package/src/langium/serialization/serializer.ts +68 -0
- package/src/langium/serialization/yaml-serializer.ts +348 -0
- package/src/langium/service-registry.ts +323 -0
- package/src/langium/shared-services.ts +107 -0
- package/src/langium/transfer/index.ts +10 -0
- package/src/langium/transfer/transfer-encoder.ts +434 -0
- package/src/langium/update-rewrite/index.ts +14 -0
- package/src/langium/update-rewrite/normalize-empty-strings.ts +86 -0
- package/src/langium/update-rewrite/semantic-root-rewrite.ts +57 -0
- package/src/langium/update-rewrite/update-rewrite-contribution.ts +44 -0
- package/src/langium/update-rewrite/update-rewrite-service.ts +129 -0
- package/src/langium/update-rewrite/update-rewrite.ts +60 -0
- package/src/langium/validation/document-validator.ts +188 -0
- package/src/langium/validation/index.ts +12 -0
- package/src/langium/validation/validation-contribution-collector.ts +61 -0
- package/src/langium/validation/validation-contribution.ts +38 -0
- package/src/langium/workspace/additional-document-contribution.ts +80 -0
- package/src/langium/workspace/document-uri-policy.ts +187 -0
- package/src/langium/workspace/file-system-provider.ts +52 -0
- package/src/langium/workspace/hydranium-langium-document-factory.ts +78 -0
- package/src/langium/workspace/hydranium-workspace-lock.ts +35 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +412 -0
- package/src/langium/workspace/in-memory-file-system-provider.ts +241 -0
- package/src/langium/workspace/index-manager.ts +266 -0
- package/src/langium/workspace/index.ts +23 -0
- package/src/langium/workspace/initialize-workspace.ts +102 -0
- package/src/langium/workspace/langium-documents.ts +94 -0
- package/src/langium/workspace/persistent-file-system-provider.ts +287 -0
- package/src/langium/workspace/synthetic.ts +63 -0
- package/src/langium/workspace/virtual-document.ts +94 -0
- package/src/langium/workspace/write-lock-scope.ts +88 -0
- package/src/launcher/index.ts +12 -0
- package/src/launcher/integrated-server.ts +28 -0
- package/src/lsp/completion/hydranium-completion-provider.ts +132 -0
- package/src/lsp/hydranium-document-update-handler.ts +345 -0
- package/src/lsp/index.ts +24 -0
- package/src/lsp/instrument-connection.ts +66 -0
- package/src/lsp/language-module.ts +64 -0
- package/src/lsp/semantic-token-provider.ts +215 -0
- package/src/lsp/shared-module.ts +88 -0
- package/src/lsp/start-language-server.ts +68 -0
- package/src/node/ast-ground-truth.ts +76 -0
- package/src/node/event-loop-monitor.ts +89 -0
- package/src/node/index.ts +53 -0
- package/src/node/latency-from-env.ts +39 -0
- package/src/node/lint-grammar.ts +189 -0
- package/src/node/log-file-sink.ts +43 -0
- package/src/node/log-preamble-node.ts +63 -0
- package/src/node/measure-memory.ts +196 -0
- package/src/node/memory-monitor.ts +103 -0
- package/src/node/node-file-system-provider.ts +252 -0
- package/src/node/process-memory.ts +299 -0
- package/src/node/profile-capture.ts +377 -0
- package/src/node/profile-digest.ts +112 -0
- package/src/node/profiling-run.ts +236 -0
- package/src/node/reflect-grammar.ts +182 -0
- package/src/node/server-diagnostics.ts +63 -0
- package/src/node/server-state-snapshot.ts +192 -0
- package/src/node/socket-launcher.ts +210 -0
- package/src/node/stdio-launcher.ts +150 -0
- package/src/node/validate-workspace.ts +133 -0
- package/src/node/write-lock-scope-node.ts +41 -0
- package/src/testing/ast-snapshot.ts +88 -0
- package/src/testing/document-uri-policy-conformance.ts +104 -0
- package/src/testing/fake-description.ts +52 -0
- package/src/testing/fake-document.ts +120 -0
- package/src/testing/fake-reflection.ts +39 -0
- package/src/testing/index.ts +45 -0
- package/src/testing/langium-test-helpers.ts +26 -0
- package/src/testing/make-noop-language-services.ts +47 -0
- package/src/testing/make-noop-shared-services.ts +78 -0
- package/src/testing/make-test-services.ts +356 -0
- package/src/testing/make-test-tracer.ts +92 -0
- package/src/testing/node/generated-workspace.ts +222 -0
- package/src/testing/node/golden-corpus.ts +114 -0
- package/src/testing/node/index.ts +29 -0
- package/src/testing/node/lsp-harness.ts +230 -0
- package/src/testing/node/lsp-server-connection.ts +575 -0
- package/src/testing/node/scratch-workspace.ts +137 -0
- package/src/testing/node/spawned-server.ts +447 -0
- package/src/testing/parse-semantic-root.ts +150 -0
- package/src/testing/playwright/browser-capture-bridge.ts +258 -0
- package/src/testing/playwright/e2e-profiling.ts +362 -0
- package/src/testing/playwright/index.ts +16 -0
- package/src/testing/playwright/server-log-capture.ts +433 -0
- package/src/testing/playwright/server-log-fixture.ts +57 -0
- package/src/testing/playwright/server-log-rename-reporter.ts +29 -0
- package/src/testing/run-update-pipeline.ts +113 -0
- package/src/testing/stub-ast-document-manager.ts +224 -0
- package/src/testing/stub-document-builder.ts +242 -0
- package/src/testing/stub-hydranium-text-documents.ts +270 -0
- package/src/testing/stub-index-manager.ts +79 -0
- package/src/testing/stub-langium-documents.ts +104 -0
- package/src/testing/stub-model-service.ts +72 -0
- package/src/testing/stub-project-manager.ts +161 -0
- package/src/testing/stub-self-save-registry.ts +43 -0
- package/src/testing/stub-service-registry.ts +192 -0
- package/src/testing/stub-writable-file-system.ts +58 -0
- package/src/util/connection-liveness.ts +47 -0
- package/src/util/environment.ts +88 -0
- package/src/util/index.ts +18 -0
- package/src/util/registry.ts +129 -0
|
@@ -0,0 +1,210 @@
|
|
|
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
|
+
import { Deferred } from '@hydranium/langium';
|
|
11
|
+
import * as net from 'node:net';
|
|
12
|
+
import type { Disposable, Logger } from '@hydranium/protocol';
|
|
13
|
+
import { createMessageConnection, SocketMessageReader, SocketMessageWriter } from 'vscode-jsonrpc/node';
|
|
14
|
+
import type { MessageConnection } from 'vscode-jsonrpc';
|
|
15
|
+
import type { IntegratedServer } from '../launcher/integrated-server.js';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Construction-time options for {@link startSocketServer}.
|
|
19
|
+
*/
|
|
20
|
+
export interface SocketServerOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Port to bind. Default `0` — OS-assigned ephemeral. Resolve the
|
|
23
|
+
* actual port off {@link StartedSocketServer.port} once `started`
|
|
24
|
+
* resolves (only then is the address info available).
|
|
25
|
+
*/
|
|
26
|
+
readonly port?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Optional logger. If omitted, the launcher runs silently — the
|
|
29
|
+
* adopter is expected to surface lifecycle events through their own
|
|
30
|
+
* logging in {@link OnClientConnection} if needed.
|
|
31
|
+
*/
|
|
32
|
+
readonly logger?: Logger;
|
|
33
|
+
/** Tag included in lifecycle log lines. Default `"SocketServer"`. */
|
|
34
|
+
readonly logTag?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Adopter callback fired per inbound client. Receives the already-
|
|
39
|
+
* constructed {@link MessageConnection} (created from the socket via
|
|
40
|
+
* vscode-jsonrpc's `SocketMessageReader`/`SocketMessageWriter`) BEFORE
|
|
41
|
+
* `connection.listen()` is called — the launcher invokes `listen()`
|
|
42
|
+
* after the callback returns so adopters that need to register handlers
|
|
43
|
+
* before message dispatch starts can do so.
|
|
44
|
+
*
|
|
45
|
+
* Adopters construct their per-client servers here and return a
|
|
46
|
+
* {@link Disposable}. The launcher invokes the disposable on socket
|
|
47
|
+
* close AND on server shutdown — adopters need not register their own
|
|
48
|
+
* teardown listeners.
|
|
49
|
+
*
|
|
50
|
+
* Returning a no-op `{ dispose() {} }` is valid for heads whose servers
|
|
51
|
+
* self-clean via `connection.onClose` (the framework's `DataServer`
|
|
52
|
+
* being the canonical example).
|
|
53
|
+
*/
|
|
54
|
+
export type OnClientConnection = (connection: MessageConnection) => Disposable;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Live socket server handle returned by {@link startSocketServer}.
|
|
58
|
+
*
|
|
59
|
+
* - {@link IntegratedServer.started} resolves once `listen` resolves
|
|
60
|
+
* AND `port` is populated.
|
|
61
|
+
* - {@link IntegratedServer.stopped} resolves when the underlying
|
|
62
|
+
* `net.Server` emits `close`.
|
|
63
|
+
* - {@link port} is undefined until `started` resolves.
|
|
64
|
+
* - {@link close} triggers shutdown: disposes all active client
|
|
65
|
+
* connections and closes the underlying `net.Server`.
|
|
66
|
+
*/
|
|
67
|
+
export interface StartedSocketServer extends IntegratedServer {
|
|
68
|
+
readonly port: number | undefined;
|
|
69
|
+
close(): void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Start a socket-based protocol head. Wraps `net.createServer` with the
|
|
74
|
+
* boilerplate adopters used to write per-head: address resolution,
|
|
75
|
+
* error/close lifecycle, per-client `MessageConnection` construction,
|
|
76
|
+
* connection tracking, and shutdown cleanup.
|
|
77
|
+
*
|
|
78
|
+
* **Multi-client semantics are framework-owned.** The launcher tracks
|
|
79
|
+
* every accepted connection, invokes the adopter's `onClientConnection`
|
|
80
|
+
* callback to wire per-client services, and disposes both the returned
|
|
81
|
+
* adopter disposable AND the underlying `MessageConnection` on socket
|
|
82
|
+
* close / server shutdown. Adopters keep per-client instance creation
|
|
83
|
+
* (their server objects) but don't re-implement the tracking machinery.
|
|
84
|
+
*
|
|
85
|
+
* The port is only known once {@link StartedSocketServer.started} has
|
|
86
|
+
* resolved, so announcing it — via {@link publishPortOnLspConnection} —
|
|
87
|
+
* belongs after that await, not beside the call.
|
|
88
|
+
*/
|
|
89
|
+
export function startSocketServer(options: SocketServerOptions, onClientConnection: OnClientConnection): StartedSocketServer {
|
|
90
|
+
const port = options.port ?? 0;
|
|
91
|
+
const logger = options.logger;
|
|
92
|
+
const tag = options.logTag ?? 'SocketServer';
|
|
93
|
+
const started = new Deferred<void>();
|
|
94
|
+
const stopped = new Deferred<void>();
|
|
95
|
+
const handle: { port: number | undefined } = { port: undefined };
|
|
96
|
+
|
|
97
|
+
// Tracks per-connection cleanup: the adopter's returned Disposable for
|
|
98
|
+
// its per-client server objects PLUS the underlying MessageConnection
|
|
99
|
+
// (so shutdown drains both at once).
|
|
100
|
+
const activeConnections: Array<{ connection: MessageConnection; adopterDisposable: Disposable }> = [];
|
|
101
|
+
|
|
102
|
+
const netServer = net.createServer(socket => {
|
|
103
|
+
const connection = createMessageConnection(new SocketMessageReader(socket), new SocketMessageWriter(socket));
|
|
104
|
+
const adopterDisposable = onClientConnection(connection);
|
|
105
|
+
const entry = { connection, adopterDisposable };
|
|
106
|
+
activeConnections.push(entry);
|
|
107
|
+
// Cleanup hook fires once per connection — covers both socket-side
|
|
108
|
+
// close and server-shutdown forced close.
|
|
109
|
+
let disposed = false;
|
|
110
|
+
const dispose = (): void => {
|
|
111
|
+
if (disposed) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
disposed = true;
|
|
115
|
+
try {
|
|
116
|
+
adopterDisposable.dispose();
|
|
117
|
+
} catch (err) {
|
|
118
|
+
logger?.warn(`[${tag}] Adopter disposable threw on cleanup: ${(err as Error)?.message ?? err}`);
|
|
119
|
+
}
|
|
120
|
+
connection.dispose();
|
|
121
|
+
const idx = activeConnections.indexOf(entry);
|
|
122
|
+
if (idx >= 0) {
|
|
123
|
+
activeConnections.splice(idx, 1);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
socket.on('close', dispose);
|
|
127
|
+
connection.onClose(() => dispose());
|
|
128
|
+
connection.listen();
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
netServer.listen(port);
|
|
132
|
+
netServer.on('listening', () => {
|
|
133
|
+
const addressInfo = netServer.address();
|
|
134
|
+
if (!addressInfo) {
|
|
135
|
+
logger?.error(`[${tag}] Could not resolve address info. Shutting down.`);
|
|
136
|
+
started.reject(new Error(`${tag} could not resolve address info`));
|
|
137
|
+
netServer.close();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (typeof addressInfo === 'string') {
|
|
141
|
+
logger?.error(`[${tag}] Unexpectedly listening to pipe or domain socket "${addressInfo}". Shutting down.`);
|
|
142
|
+
started.reject(new Error(`${tag} bound to pipe/domain socket "${addressInfo}", expected TCP`));
|
|
143
|
+
netServer.close();
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
handle.port = addressInfo.port;
|
|
147
|
+
logger?.info(`[${tag}] Ready to accept new client requests on port: ${addressInfo.port}`);
|
|
148
|
+
started.resolve();
|
|
149
|
+
});
|
|
150
|
+
netServer.on('error', err => {
|
|
151
|
+
logger?.error(`[${tag}] Error: ${err.message}`);
|
|
152
|
+
started.reject(err);
|
|
153
|
+
});
|
|
154
|
+
netServer.on('close', () => {
|
|
155
|
+
// Active client cleanup. Snapshot first since `dispose()` mutates
|
|
156
|
+
// the array.
|
|
157
|
+
for (const entry of activeConnections.slice()) {
|
|
158
|
+
try {
|
|
159
|
+
entry.adopterDisposable.dispose();
|
|
160
|
+
} catch (err) {
|
|
161
|
+
logger?.warn(`[${tag}] Adopter disposable threw on shutdown: ${(err as Error)?.message ?? err}`);
|
|
162
|
+
}
|
|
163
|
+
entry.connection.dispose();
|
|
164
|
+
}
|
|
165
|
+
activeConnections.length = 0;
|
|
166
|
+
stopped.resolve();
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
get port() {
|
|
171
|
+
return handle.port;
|
|
172
|
+
},
|
|
173
|
+
started: started.promise,
|
|
174
|
+
stopped: stopped.promise,
|
|
175
|
+
close(): void {
|
|
176
|
+
netServer.close();
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The shape the launcher needs from an LSP connection to publish a
|
|
183
|
+
* port. Matches `vscode-languageserver`'s `Connection.onRequest` —
|
|
184
|
+
* captured as a structural type here so the launcher doesn't take a
|
|
185
|
+
* heavy `vscode-languageserver` dep just for the type.
|
|
186
|
+
*/
|
|
187
|
+
export interface LspConnectionLike {
|
|
188
|
+
onRequest<TParams, TResult>(method: string, handler: (...params: TParams[]) => TResult): Disposable;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Register a `<command>` request handler on the language-server LSP
|
|
193
|
+
* connection that returns the port. Adopter clients call this command
|
|
194
|
+
* to discover the head's port after the LSP handshake.
|
|
195
|
+
*
|
|
196
|
+
* No-op (returns a `{ dispose() {} }` disposable) when `lspConnection`
|
|
197
|
+
* is `undefined` — Langium leaves `shared.lsp.Connection` optional and
|
|
198
|
+
* adopters running headless (no LSP wire) want the same launcher
|
|
199
|
+
* helpers to work.
|
|
200
|
+
*
|
|
201
|
+
* Adopters typically pass `services.shared.lsp.Connection`; both
|
|
202
|
+
* `services.shared.lsp.Connection?` and the structural `LspConnectionLike`
|
|
203
|
+
* shape are accepted.
|
|
204
|
+
*/
|
|
205
|
+
export function publishPortOnLspConnection(lspConnection: LspConnectionLike | undefined, command: string, port: number): Disposable {
|
|
206
|
+
if (!lspConnection) {
|
|
207
|
+
return { dispose: () => undefined };
|
|
208
|
+
}
|
|
209
|
+
return lspConnection.onRequest(command, () => port);
|
|
210
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
import { Deferred } from '@hydranium/langium';
|
|
11
|
+
import type { Disposable, Logger } from '@hydranium/protocol';
|
|
12
|
+
import type { MessageConnection } from 'vscode-jsonrpc';
|
|
13
|
+
import { createMessageConnection, StreamMessageReader, StreamMessageWriter } from 'vscode-jsonrpc/node';
|
|
14
|
+
import type { IntegratedServer } from '../launcher/integrated-server.js';
|
|
15
|
+
import type { ServerSharedServicesMinimal } from '../langium/shared-services.js';
|
|
16
|
+
import { initializeWorkspaceProgrammatically, type WorkspaceFolderInput } from '../langium/workspace/initialize-workspace.js';
|
|
17
|
+
|
|
18
|
+
/** Construction-time options for {@link startStdioServer}. */
|
|
19
|
+
export interface StdioServerOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Shared services tree whose workspace is brought up before the first
|
|
22
|
+
* request is dispatched. Required, because the ordering guarantee this
|
|
23
|
+
* launcher exists to provide is stated in terms of it.
|
|
24
|
+
*/
|
|
25
|
+
readonly shared: ServerSharedServicesMinimal;
|
|
26
|
+
/**
|
|
27
|
+
* Workspace root(s) to initialize — a filesystem path or a `URI`. Omit when
|
|
28
|
+
* the caller has already initialized the workspace itself, in which case the
|
|
29
|
+
* launcher only wires the transport.
|
|
30
|
+
*/
|
|
31
|
+
readonly workspace?: WorkspaceFolderInput | ReadonlyArray<WorkspaceFolderInput>;
|
|
32
|
+
/**
|
|
33
|
+
* Optional logger for lifecycle lines. Omitted means silent — note that a
|
|
34
|
+
* logger writing to **stdout** would corrupt this head's protocol stream, so
|
|
35
|
+
* anything passed here must sink elsewhere. The framework's own `LspLogger`
|
|
36
|
+
* writes to stderr when no LSP connection is bound, which is correct here.
|
|
37
|
+
*/
|
|
38
|
+
readonly logger?: Logger;
|
|
39
|
+
/** Tag included in lifecycle log lines. Default `"StdioServer"`. */
|
|
40
|
+
readonly logTag?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Input stream carrying inbound JSON-RPC. Default `process.stdin`. Overriding
|
|
43
|
+
* it is what lets a test drive the launcher over an in-memory duplex pair
|
|
44
|
+
* instead of spawning a process.
|
|
45
|
+
*/
|
|
46
|
+
readonly input?: NodeJS.ReadableStream;
|
|
47
|
+
/** Output stream for outbound JSON-RPC. Default `process.stdout`. */
|
|
48
|
+
readonly output?: NodeJS.WritableStream;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Live stdio server handle returned by {@link startStdioServer}.
|
|
53
|
+
*
|
|
54
|
+
* - {@link IntegratedServer.started} resolves once the workspace is initialized
|
|
55
|
+
* AND the connection is listening — i.e. once the head can actually answer.
|
|
56
|
+
* It rejects if workspace initialization throws, so a caller awaiting it sees
|
|
57
|
+
* a failed startup rather than a server that is listening but empty.
|
|
58
|
+
* - {@link IntegratedServer.stopped} resolves when the connection closes.
|
|
59
|
+
*/
|
|
60
|
+
export interface StartedStdioServer extends IntegratedServer {
|
|
61
|
+
/** The underlying connection, for callers wanting fine-grained control. */
|
|
62
|
+
readonly connection: MessageConnection;
|
|
63
|
+
/** Dispose the adopter's per-connection state and close the connection. */
|
|
64
|
+
close(): void;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Start a **stdio**-based protocol head — the transport `hydranium-cli` speaks,
|
|
69
|
+
* since `query` / `save` / `projects` / `watch` all spawn a server command and
|
|
70
|
+
* drive JSON-RPC over its stdin/stdout. The socket counterpart is
|
|
71
|
+
* `startSocketServer`; the two differ more
|
|
72
|
+
* than the transport swap suggests, and the differences are the reason this is
|
|
73
|
+
* a launcher rather than four lines in each adopter's entry.
|
|
74
|
+
*
|
|
75
|
+
* **One client, not N.** A socket head accepts arbitrarily many connections and
|
|
76
|
+
* tracks them; a stdio head has exactly one peer — the process that spawned it
|
|
77
|
+
* — for its whole lifetime. There is no accept loop and no connection registry.
|
|
78
|
+
*
|
|
79
|
+
* **Workspace initialization is the launcher's job, and its ordering is the
|
|
80
|
+
* guarantee.** A stdio data head typically has no LSP connection, so it never
|
|
81
|
+
* receives `initialize` / `initialized` and nothing else will bring the
|
|
82
|
+
* workspace up. Worse, the ordering is easy to get subtly wrong: initialization
|
|
83
|
+
* must complete **before** `connection.listen()`, because nothing reads the
|
|
84
|
+
* input stream until the reader is attached, so a request that arrives during
|
|
85
|
+
* startup waits in the pipe buffer. Listening first and initializing
|
|
86
|
+
* concurrently instead leaves the outcome to whichever internal lock happened
|
|
87
|
+
* to be held when the request landed — a race, not a guarantee, and one that
|
|
88
|
+
* shows up as an empty project registry under load rather than as an error.
|
|
89
|
+
*
|
|
90
|
+
* The `onConnection` callback runs BEFORE initialization so handlers are
|
|
91
|
+
* registered first, matching `startSocketServer`'s pre-`listen()` contract.
|
|
92
|
+
*/
|
|
93
|
+
export function startStdioServer(
|
|
94
|
+
options: StdioServerOptions,
|
|
95
|
+
onConnection: (connection: MessageConnection) => Disposable
|
|
96
|
+
): StartedStdioServer {
|
|
97
|
+
const logger = options.logger;
|
|
98
|
+
const tag = options.logTag ?? 'StdioServer';
|
|
99
|
+
const started = new Deferred<void>();
|
|
100
|
+
const stopped = new Deferred<void>();
|
|
101
|
+
|
|
102
|
+
const connection = createMessageConnection(
|
|
103
|
+
new StreamMessageReader(options.input ?? process.stdin),
|
|
104
|
+
new StreamMessageWriter(options.output ?? process.stdout)
|
|
105
|
+
);
|
|
106
|
+
const adopterDisposable = onConnection(connection);
|
|
107
|
+
|
|
108
|
+
let disposed = false;
|
|
109
|
+
const close = (): void => {
|
|
110
|
+
if (disposed) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
disposed = true;
|
|
114
|
+
try {
|
|
115
|
+
adopterDisposable.dispose();
|
|
116
|
+
} catch (err: unknown) {
|
|
117
|
+
logger?.warn(`[${tag}] Adopter disposable threw on cleanup: ${err instanceof Error ? err.message : String(err)}`);
|
|
118
|
+
}
|
|
119
|
+
connection.dispose();
|
|
120
|
+
stopped.resolve();
|
|
121
|
+
};
|
|
122
|
+
connection.onClose(() => close());
|
|
123
|
+
|
|
124
|
+
const begin = async (): Promise<void> => {
|
|
125
|
+
if (options.workspace !== undefined) {
|
|
126
|
+
logger?.info(`[${tag}] Initializing workspace`);
|
|
127
|
+
await initializeWorkspaceProgrammatically(options.shared, options.workspace);
|
|
128
|
+
}
|
|
129
|
+
// Only now attach the reader — see the ordering note in the doc above.
|
|
130
|
+
connection.listen();
|
|
131
|
+
logger?.info(`[${tag}] Listening on stdio`);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
begin().then(
|
|
135
|
+
() => started.resolve(),
|
|
136
|
+
(err: unknown) => {
|
|
137
|
+
// A failed startup must not leave a half-live head: report it on
|
|
138
|
+
// `started` and tear the connection down rather than listening over an
|
|
139
|
+
// uninitialized workspace.
|
|
140
|
+
logger?.error(`[${tag}] Startup failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
141
|
+
started.reject(err);
|
|
142
|
+
close();
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
// `started` is always observed internally, so a caller that ignores it can
|
|
146
|
+
// never crash the process with an unhandled rejection.
|
|
147
|
+
void started.promise.catch(() => undefined);
|
|
148
|
+
|
|
149
|
+
return { started: started.promise, stopped: stopped.promise, connection, close };
|
|
150
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
import { type LangiumDocument, type URI } from '@hydranium/langium';
|
|
11
|
+
import { Diagnostic, DiagnosticSeverity } from 'vscode-languageserver';
|
|
12
|
+
import { type ServerSharedServicesMinimal } from '../langium/shared-services.js';
|
|
13
|
+
import { buildWorkspaceProgrammatically } from '../langium/workspace/initialize-workspace.js';
|
|
14
|
+
|
|
15
|
+
/** A validation diagnostic's severity, as a stable lowercase string for the JSON contract. */
|
|
16
|
+
export type ValidationSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* One validation problem, flattened to a serialisable shape. This is the JSON
|
|
20
|
+
* contract `hydranium-cli validate --json` emits, deliberately independent of the
|
|
21
|
+
* `vscode-languageserver` {@link Diagnostic} type so CI tooling reads a stable
|
|
22
|
+
* schema and the CLI never needs a runtime `@hydranium/core` dependency.
|
|
23
|
+
*/
|
|
24
|
+
export interface ValidationFinding {
|
|
25
|
+
/** Workspace-relative path of the document the problem was reported on. */
|
|
26
|
+
uri: string;
|
|
27
|
+
severity: ValidationSeverity;
|
|
28
|
+
message: string;
|
|
29
|
+
/** 0-based line of the diagnostic range start (add 1 for editor display). */
|
|
30
|
+
line: number;
|
|
31
|
+
/** 0-based character of the diagnostic range start (add 1 for editor display). */
|
|
32
|
+
character: number;
|
|
33
|
+
/** The diagnostic `code`, when the rule set one. */
|
|
34
|
+
code?: string | number;
|
|
35
|
+
/** The diagnostic `source`, when the rule set one. */
|
|
36
|
+
source?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Per-severity tally across the whole workspace — drives the exit code and the summary line. */
|
|
40
|
+
export interface ValidationCounts {
|
|
41
|
+
error: number;
|
|
42
|
+
warning: number;
|
|
43
|
+
info: number;
|
|
44
|
+
hint: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** The full result of a headless workspace validation. */
|
|
48
|
+
export interface WorkspaceValidationResult {
|
|
49
|
+
/** Number of `LangiumDocument`s in the built workspace. */
|
|
50
|
+
documents: number;
|
|
51
|
+
/** Every problem found, grouped contiguously by document, in the order the documents were given. */
|
|
52
|
+
findings: ValidationFinding[];
|
|
53
|
+
/** Per-severity totals over {@link findings}. */
|
|
54
|
+
counts: ValidationCounts;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Options for {@link validateWorkspace}. */
|
|
58
|
+
export interface ValidateWorkspaceOptions {
|
|
59
|
+
/**
|
|
60
|
+
* Create the language's shared services in-process. This is the only
|
|
61
|
+
* language-specific input — a head passes its own `create<Lang>Services(fileSystem)`.
|
|
62
|
+
*/
|
|
63
|
+
createServices: () => { shared: ServerSharedServicesMinimal };
|
|
64
|
+
/** Workspace root (filesystem path or file URI) to build and validate. */
|
|
65
|
+
workspace: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Map a `vscode-languageserver` severity to the stable string. Unset → `error` (fail-safe for a CI gate). */
|
|
69
|
+
function severityLabel(severity: DiagnosticSeverity | undefined): ValidationSeverity {
|
|
70
|
+
switch (severity) {
|
|
71
|
+
case DiagnosticSeverity.Warning:
|
|
72
|
+
return 'warning';
|
|
73
|
+
case DiagnosticSeverity.Information:
|
|
74
|
+
return 'info';
|
|
75
|
+
case DiagnosticSeverity.Hint:
|
|
76
|
+
return 'hint';
|
|
77
|
+
default:
|
|
78
|
+
// DiagnosticSeverity.Error, or an omitted severity — treat as an error so
|
|
79
|
+
// a rule that forgets to set one still blocks the gate rather than passing silently.
|
|
80
|
+
return 'error';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Flatten each document's `diagnostics` into a {@link WorkspaceValidationResult}.
|
|
86
|
+
* Pure over its inputs (documents + a URI-to-relative-path mapper) so it unit-tests
|
|
87
|
+
* without booting a grammar; {@link validateWorkspace} is the thin boot-and-build wrapper.
|
|
88
|
+
*/
|
|
89
|
+
export function collectValidationResult(
|
|
90
|
+
documents: readonly LangiumDocument[],
|
|
91
|
+
wsRelativePath: (uri: URI) => string
|
|
92
|
+
): WorkspaceValidationResult {
|
|
93
|
+
const findings: ValidationFinding[] = [];
|
|
94
|
+
const counts: ValidationCounts = { error: 0, warning: 0, info: 0, hint: 0 };
|
|
95
|
+
for (const document of documents) {
|
|
96
|
+
const relativeUri = wsRelativePath(document.uri);
|
|
97
|
+
for (const diagnostic of (document.diagnostics ?? []) as Diagnostic[]) {
|
|
98
|
+
const severity = severityLabel(diagnostic.severity);
|
|
99
|
+
counts[severity] += 1;
|
|
100
|
+
findings.push({
|
|
101
|
+
uri: relativeUri,
|
|
102
|
+
severity,
|
|
103
|
+
// LSP 3.18 allows a `MarkupContent` message; this report is a
|
|
104
|
+
// line-oriented CI artifact, so take its plain-text rendering.
|
|
105
|
+
message: Diagnostic.getMessageString(diagnostic),
|
|
106
|
+
line: diagnostic.range.start.line,
|
|
107
|
+
character: diagnostic.range.start.character,
|
|
108
|
+
code: diagnostic.code,
|
|
109
|
+
source: diagnostic.source
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return { documents: documents.length, findings, counts };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Headless workspace validation — the browser-/socket-free counterpart to the
|
|
118
|
+
* diagnostics an editor session publishes. Boots a head's Langium services
|
|
119
|
+
* in-process via {@link ValidateWorkspaceOptions.createServices}, builds every
|
|
120
|
+
* document to `Validated` (which runs the language's validation checks), then
|
|
121
|
+
* collects the diagnostics into a serialisable {@link WorkspaceValidationResult}.
|
|
122
|
+
*
|
|
123
|
+
* Backs `hydranium-cli validate`, whose non-zero exit on errors makes it a CI
|
|
124
|
+
* gate. Like the other headless harnesses the only language-specific input is the
|
|
125
|
+
* service factory, so the framework code stays head-neutral. The build is the
|
|
126
|
+
* standard eager pipeline — identical to what those sibling harnesses run.
|
|
127
|
+
*/
|
|
128
|
+
export async function validateWorkspace(options: ValidateWorkspaceOptions): Promise<WorkspaceValidationResult> {
|
|
129
|
+
const { shared } = options.createServices();
|
|
130
|
+
await buildWorkspaceProgrammatically(shared, options.workspace);
|
|
131
|
+
const documents = shared.workspace.LangiumDocuments.all.toArray();
|
|
132
|
+
return collectValidationResult(documents, uri => shared.workspace.WorkspaceManager.wsRelativePath(uri));
|
|
133
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
11
|
+
import { type WriteLockScope, setWriteLockScope } from '../langium/workspace/write-lock-scope.js';
|
|
12
|
+
|
|
13
|
+
const storage = new AsyncLocalStorage<true>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* `node:async_hooks`-backed {@link WriteLockScope}.
|
|
17
|
+
*
|
|
18
|
+
* `AsyncLocalStorage` is the right primitive rather than a plain module-level
|
|
19
|
+
* boolean: the lock's action is async, and a flag set around it would report
|
|
20
|
+
* "inside" for every other task interleaved on the event loop while that action
|
|
21
|
+
* awaits — which is most of them. The store follows the async stack instead, so
|
|
22
|
+
* only code actually descended from the action sees it.
|
|
23
|
+
*/
|
|
24
|
+
export const nodeWriteLockScope: WriteLockScope = {
|
|
25
|
+
run<T>(fn: () => T): T {
|
|
26
|
+
return storage.run(true, fn);
|
|
27
|
+
},
|
|
28
|
+
isInside(): boolean {
|
|
29
|
+
return storage.getStore() === true;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Install the Node write-lock scope tracker, enabling reentrancy detection on the
|
|
35
|
+
* model facade. Idempotent. Called once at `@hydranium/core/node` load, so any
|
|
36
|
+
* Node host that imports the entry gets the detection for free; a browser bundle
|
|
37
|
+
* imports only `.` and keeps the inert default.
|
|
38
|
+
*/
|
|
39
|
+
export function installNodeWriteLockScope(): void {
|
|
40
|
+
setWriteLockScope(nodeWriteLockScope);
|
|
41
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* Structural AST snapshots for serializer round-trip testing.
|
|
12
|
+
*
|
|
13
|
+
* # The idea
|
|
14
|
+
*
|
|
15
|
+
* Byte-stability (the golden corpus) proves the serializer's *output format*
|
|
16
|
+
* is pinned, but not that serialization *preserves meaning*. The complementary
|
|
17
|
+
* guarantee is the round trip: parse some source, serialize the resulting
|
|
18
|
+
* model back to text, parse that text again — the two models must be the same.
|
|
19
|
+
* If they are, no semantic content was lost or invented in the trip through
|
|
20
|
+
* text, independent of whitespace, member ordering, or dropped comments.
|
|
21
|
+
*
|
|
22
|
+
* # Why a snapshot, not the live AST
|
|
23
|
+
*
|
|
24
|
+
* You cannot `expect(ast2).toEqual(ast1)` on two live Langium ASTs:
|
|
25
|
+
* - `$container` (and friends) make every node cyclic — a deep-equal walk
|
|
26
|
+
* never terminates.
|
|
27
|
+
* - `$cstNode` carries source offsets that legitimately differ once text has
|
|
28
|
+
* been re-serialized and re-parsed, so it is noise for a semantic compare.
|
|
29
|
+
* - a `Reference` holds a resolved `ref` back-pointer into the other tree;
|
|
30
|
+
* only its textual `$refText` is grammar content.
|
|
31
|
+
*
|
|
32
|
+
* {@link makeAstSnapshot} projects a node onto a plain, acyclic, JSON-like
|
|
33
|
+
* value that keeps exactly the grammar-derived shape — node `$type`s, their
|
|
34
|
+
* own properties, references reduced to `{ $refText }` — and drops the derived
|
|
35
|
+
* placement/parse metadata and computed extensions. Two snapshots then compare
|
|
36
|
+
* cleanly with `toEqual`, and that comparison means "same semantic model".
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
import { isAstNode, isReference } from '@hydranium/langium';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A plain, JSON-like structural view of an AST sub-tree — references reduced
|
|
43
|
+
* to `{ $refText }`, every Langium-internal and computed-extension field
|
|
44
|
+
* stripped. Cycle-free by construction, so it compares cleanly with
|
|
45
|
+
* `expect(...).toEqual(...)`.
|
|
46
|
+
*/
|
|
47
|
+
export type AstSnapshot = unknown;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Project an AST node (or any value reachable from one) onto a comparable
|
|
51
|
+
* {@link AstSnapshot} that captures only the grammar-derived shape.
|
|
52
|
+
*
|
|
53
|
+
* Built for round-trip assertions: the snapshot of a model re-parsed from its
|
|
54
|
+
* own serialized text deep-equals the snapshot of the original iff
|
|
55
|
+
* serialization preserved the semantic model, independent of formatting (see
|
|
56
|
+
* the module comment for why a snapshot is needed rather than a direct compare
|
|
57
|
+
* of the live ASTs).
|
|
58
|
+
*
|
|
59
|
+
* What it keeps and what it drops:
|
|
60
|
+
* - **`Reference`** (`$refText` + `ref`) → `{ $refText }`. The resolution
|
|
61
|
+
* target is positional noise; the textual name is the grammar content.
|
|
62
|
+
* - **`$type`** is kept (it identifies the node); every other `$`-prefixed
|
|
63
|
+
* field (`$container`, `$containerProperty`, `$containerIndex`, `$cstNode`,
|
|
64
|
+
* `$document`, …) is dropped — all are derived placement/parse metadata.
|
|
65
|
+
* - **`_`-prefixed fields** — the AST-extension computed properties — are
|
|
66
|
+
* dropped: they are derived at build time, not part of what a serializer
|
|
67
|
+
* round-trips.
|
|
68
|
+
* - Arrays recurse element-wise; primitives pass through unchanged.
|
|
69
|
+
*/
|
|
70
|
+
export function makeAstSnapshot(value: unknown): AstSnapshot {
|
|
71
|
+
if (isReference(value)) {
|
|
72
|
+
return { $refText: value.$refText };
|
|
73
|
+
}
|
|
74
|
+
if (Array.isArray(value)) {
|
|
75
|
+
return value.map(makeAstSnapshot);
|
|
76
|
+
}
|
|
77
|
+
if (isAstNode(value)) {
|
|
78
|
+
const snapshot: Record<string, unknown> = { $type: value.$type };
|
|
79
|
+
for (const [key, child] of Object.entries(value)) {
|
|
80
|
+
if (key.startsWith('$') || key.startsWith('_')) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
snapshot[key] = makeAstSnapshot(child);
|
|
84
|
+
}
|
|
85
|
+
return snapshot;
|
|
86
|
+
}
|
|
87
|
+
return value;
|
|
88
|
+
}
|