@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,232 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { Deferred, type Logger, type Tracer } from '@hydranium/protocol';
|
|
10
|
+
import { DefaultWorkspaceManager, type LangiumDocument, type URI } from '@hydranium/langium';
|
|
11
|
+
import { type CancellationToken } from 'vscode-languageserver';
|
|
12
|
+
import type { WorkspaceFolder } from 'vscode-languageserver-types';
|
|
13
|
+
import { type LogNameOptions } from '../diagnostics/logger.js';
|
|
14
|
+
import type { ProjectChangeEvent } from '../project/project-change-event.js';
|
|
15
|
+
import type { ProjectManager } from '../project/project-manager.js';
|
|
16
|
+
import type { ServerSharedServicesMinimal } from '../shared-services.js';
|
|
17
|
+
import type { WritableFileSystemProvider } from '../../documents/ast-document-manager.js';
|
|
18
|
+
import { type DocumentUriPolicy } from './document-uri-policy.js';
|
|
19
|
+
import { type AdditionalDocumentContribution } from './additional-document-contribution.js';
|
|
20
|
+
/**
|
|
21
|
+
* Decide what to do with a process-level unhandled promise rejection.
|
|
22
|
+
*
|
|
23
|
+
* Langium's internal `Symbol(OperationCancelled)` marker — emitted when a
|
|
24
|
+
* `documentBuilder.build` is preempted by a concurrent write lock or
|
|
25
|
+
* cancellation token — is benign and is swallowed silently (without it the
|
|
26
|
+
* server logs spurious "Unhandled rejection" entries for cancellations that
|
|
27
|
+
* are not errors).
|
|
28
|
+
*
|
|
29
|
+
* Every OTHER reason is re-surfaced through {@link Logger.error}. This matters
|
|
30
|
+
* because Node disables its default crash/warn for ALL unhandled rejections as
|
|
31
|
+
* soon as any `unhandledRejection` listener is registered — so a handler that
|
|
32
|
+
* swallowed everything would make genuine unhandled rejections (real bugs)
|
|
33
|
+
* vanish silently. Logging keeps them visible while preserving the server's
|
|
34
|
+
* resilience (it does not re-crash the process).
|
|
35
|
+
*
|
|
36
|
+
* Pure and listener-free so it is unit-testable without touching the `process`
|
|
37
|
+
* singleton; {@link installOperationCancelledSuppression} wires it up.
|
|
38
|
+
*/
|
|
39
|
+
export declare function handleProcessUnhandledRejection(reason: unknown, logger: Logger): void;
|
|
40
|
+
/**
|
|
41
|
+
* Install a process-level `unhandledRejection` listener that routes every
|
|
42
|
+
* rejection through {@link handleProcessUnhandledRejection} — swallowing
|
|
43
|
+
* Langium's `OperationCancelled` marker and logging everything else via the
|
|
44
|
+
* supplied {@link Logger}.
|
|
45
|
+
*
|
|
46
|
+
* Idempotent — safe to call from every {@link HydraniumWorkspaceManager}
|
|
47
|
+
* constructor. The `process` listener is installed at most once, because one
|
|
48
|
+
* per tree would pile up on a singleton, but each call RE-POINTS the logger it
|
|
49
|
+
* routes through: the listener reads it at rejection time rather than closing
|
|
50
|
+
* over the first caller's, so the most recently built tree is the one that
|
|
51
|
+
* hears about a genuine rejection.
|
|
52
|
+
*
|
|
53
|
+
* Applies to every Langium-based server that experiences concurrent builds.
|
|
54
|
+
*/
|
|
55
|
+
export declare function installOperationCancelledSuppression(logger: Logger): void;
|
|
56
|
+
/**
|
|
57
|
+
* Framework {@link DefaultWorkspaceManager} subclass that integrates the
|
|
58
|
+
* project tier with Langium's workspace startup.
|
|
59
|
+
*
|
|
60
|
+
* ## Phase 0 — project discovery
|
|
61
|
+
*
|
|
62
|
+
* Overrides {@link performStartup} to await
|
|
63
|
+
* {@link ProjectManager.discoverProjects} **before** Langium's standard
|
|
64
|
+
* startup phases (additional documents → file traversal → workspace
|
|
65
|
+
* documents). By the time `documentBuilder.build` runs, the project
|
|
66
|
+
* registry is fully populated and every parsed document can resolve its
|
|
67
|
+
* owning project via `projectManager.getProject(uri)`.
|
|
68
|
+
*
|
|
69
|
+
* Single-project consumers using `SingleProjectManager` pay no cost —
|
|
70
|
+
* the override is a no-op resolve.
|
|
71
|
+
*
|
|
72
|
+
* Discovery has a side effect the startup sequence has to compensate for:
|
|
73
|
+
* it reads each descriptor through `LangiumDocuments.getOrCreateDocument`,
|
|
74
|
+
* so those documents already exist when Langium's traversal runs — and
|
|
75
|
+
* Langium's traversal deliberately drops URIs that already have a document
|
|
76
|
+
* ("ensure that the documents don't already exist"), so it never returns
|
|
77
|
+
* them. {@link performStartup} adds them back; see the method comment for
|
|
78
|
+
* what breaks without it.
|
|
79
|
+
*
|
|
80
|
+
* ## Cascade rebuild
|
|
81
|
+
*
|
|
82
|
+
* Subscribes to {@link ProjectManager.onProjectsChanged} in the
|
|
83
|
+
* constructor. When a project's identity, version, or dependencies
|
|
84
|
+
* change post-startup, the project manager emits the affected document
|
|
85
|
+
* URIs (its own members plus any transitive dependents per the
|
|
86
|
+
* `getAffectedProjects` hook). This manager re-runs
|
|
87
|
+
* `DocumentBuilder.resetToState(doc, DocumentState.Changed)` on each
|
|
88
|
+
* affected document so the next build cycle re-links them with the new
|
|
89
|
+
* visibility scope.
|
|
90
|
+
*
|
|
91
|
+
* Descriptor URIs that triggered the cycle are intentionally excluded
|
|
92
|
+
* from the affected set by `AbstractProjectManager.onBuildUpdate` —
|
|
93
|
+
* re-adding them would loop.
|
|
94
|
+
*/
|
|
95
|
+
export declare class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
96
|
+
protected readonly projectManager: ProjectManager;
|
|
97
|
+
protected readonly tracer: Tracer;
|
|
98
|
+
/**
|
|
99
|
+
* Deferred backing {@link workspaceInitialized}. The framework default
|
|
100
|
+
* resolves it from {@link initializeWorkspace} once Langium's standard
|
|
101
|
+
* workspace setup completes. Adopters that need to gate first-`didOpen`
|
|
102
|
+
* on additional async work (project-scope discovery, schema fetch, etc.)
|
|
103
|
+
* override {@link initializeWorkspace} and resolve / reject this Deferred
|
|
104
|
+
* after their work completes.
|
|
105
|
+
*/
|
|
106
|
+
protected readonly workspaceInitializedDeferred: Deferred<unknown>;
|
|
107
|
+
/**
|
|
108
|
+
* Resolves when the workspace is ready to handle the first `didOpen`
|
|
109
|
+
* event. `HydraniumTextDocuments.listen` awaits this promise inside its
|
|
110
|
+
* `didOpen` handler so the gate is hit at first use, not at DI. The
|
|
111
|
+
* framework resolves it from {@link initializeWorkspace}; adopters with
|
|
112
|
+
* extra async init override `initializeWorkspace` to thread their work
|
|
113
|
+
* before the resolve.
|
|
114
|
+
*/
|
|
115
|
+
readonly workspaceInitialized: Promise<unknown>;
|
|
116
|
+
protected readonly uriPolicy: DocumentUriPolicy;
|
|
117
|
+
protected readonly writableFileSystemProvider: WritableFileSystemProvider;
|
|
118
|
+
protected readonly additionalDocuments: Record<string, AdditionalDocumentContribution>;
|
|
119
|
+
/** Registry consulted by {@link warnIfUnroutable} to check a seeded document routes. */
|
|
120
|
+
protected readonly languageRegistry: ServerSharedServicesMinimal['ServiceRegistry'];
|
|
121
|
+
constructor(services: ServerSharedServicesMinimal, options?: LogNameOptions);
|
|
122
|
+
/**
|
|
123
|
+
* Contribution form of Langium's `loadAdditionalDocuments`. Runs the base
|
|
124
|
+
* behaviour first (a no-op unless a further subclass adds documents), then
|
|
125
|
+
* lets every {@link AdditionalDocumentContribution} in the shared
|
|
126
|
+
* `additionalDocuments` group build in-memory documents via the bound
|
|
127
|
+
* `LangiumDocumentFactory` and seed them through Langium's `collector`
|
|
128
|
+
* — so each is added to the workspace and indexed like a file-backed
|
|
129
|
+
* document. Adopters contribute a stdlib / built-in set here instead of
|
|
130
|
+
* overriding this method.
|
|
131
|
+
*/
|
|
132
|
+
protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* Warn when a seeded additional document's URI matches no registered
|
|
135
|
+
* language.
|
|
136
|
+
*
|
|
137
|
+
* Such a document is added to the workspace and indexed, but every
|
|
138
|
+
* per-language service is resolved per URI — so scope computation, naming,
|
|
139
|
+
* validation and serialisation all fail to route to it, and it contributes
|
|
140
|
+
* nothing to the scopes it was written to populate. Nothing else reports
|
|
141
|
+
* this: the document exists, so no lookup errors, it is simply inert.
|
|
142
|
+
*
|
|
143
|
+
* The usual cause is a `virtualUri` with no file extension:
|
|
144
|
+
* `virtualUri(contributor)` yields `virtual:<contributor>`, and routing has
|
|
145
|
+
* nothing to match on — there is no extension, and a virtual document is
|
|
146
|
+
* never open in `TextDocuments`, so the declared-languageId rung cannot
|
|
147
|
+
* serve it either. The convention is to end the URI with a registered
|
|
148
|
+
* extension by passing it as the last segment,
|
|
149
|
+
* `virtualUri(contributor, 'name.<ext>')`.
|
|
150
|
+
*/
|
|
151
|
+
protected warnIfUnroutable(document: LangiumDocument): void;
|
|
152
|
+
protected performStartup(folders: WorkspaceFolder[]): Promise<LangiumDocument[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Add back the documents project discovery created that Langium's file
|
|
155
|
+
* traversal then filtered out.
|
|
156
|
+
*
|
|
157
|
+
* `AbstractProjectManager.discoverProjects` has to parse each descriptor to
|
|
158
|
+
* read it, which it does through `LangiumDocuments.getOrCreateDocument`.
|
|
159
|
+
* Langium's `performStartup` traversal skips any URI that already has a
|
|
160
|
+
* document, so every descriptor is missing from the list it returns — and
|
|
161
|
+
* `initializeWorkspace` builds exactly that list.
|
|
162
|
+
*
|
|
163
|
+
* The consequence is not a slow first build but a WRONG one. Descriptor
|
|
164
|
+
* documents stay at `Parsed` with nothing in the global index, while the
|
|
165
|
+
* documents that did make the list run all the way through `Linked` against
|
|
166
|
+
* that empty index. Every cross-document reference into a descriptor fails,
|
|
167
|
+
* and the failure sticks: a later build skips documents already at
|
|
168
|
+
* `Validated`, so nothing re-links them until the user edits the file.
|
|
169
|
+
*
|
|
170
|
+
* Invisible to an adopter whose descriptors ARE its model files (every file
|
|
171
|
+
* is a descriptor, the returned list is empty, `build([])` is a no-op).
|
|
172
|
+
* Fatal for one whose descriptors are a subset — a folder-scoped project
|
|
173
|
+
* model, or a second grammar whose files are never descriptors.
|
|
174
|
+
*
|
|
175
|
+
* Only documents created by discovery are re-added: pre-existing ones are
|
|
176
|
+
* either additional/library documents (already collected by
|
|
177
|
+
* `loadAdditionalDocuments`) or leftovers from an earlier initialization,
|
|
178
|
+
* and neither belongs in this build list.
|
|
179
|
+
*/
|
|
180
|
+
protected withDiscoveredDescriptors(documents: LangiumDocument[], discovered: readonly LangiumDocument[]): LangiumDocument[];
|
|
181
|
+
/**
|
|
182
|
+
* One-shot startup diagnostic. Warns when a workspace root resolves through a
|
|
183
|
+
* symlink / `..` / case variant, so the URI a client opens (`S`) diverges
|
|
184
|
+
* from the canonical document identity (`R`) the build keys by — the
|
|
185
|
+
* condition the {@link DocumentUriPolicy} seam exists to reconcile.
|
|
186
|
+
* Probing the roots is sufficient and cheap: a divergent ancestor means every
|
|
187
|
+
* file beneath it diverges, and the loaded documents' URIs are already
|
|
188
|
+
* canonical (their original spelling is gone). Emits NOTHING for a plain
|
|
189
|
+
* on-disk workspace, or a filesystem without `realpath` — so a non-empty line
|
|
190
|
+
* is the empirical signal that a deployment actually exercises the divergence
|
|
191
|
+
* machinery.
|
|
192
|
+
*/
|
|
193
|
+
protected probePathDivergence(folders: WorkspaceFolder[]): void;
|
|
194
|
+
/**
|
|
195
|
+
* Resolve the `{workspace}` file-tee placeholder from the first workspace
|
|
196
|
+
* folder. No-op when no folder is known or no `{workspace}`-templated log
|
|
197
|
+
* target is configured. See {@link toLogFileWorkspaceToken} for the token
|
|
198
|
+
* derivation — a log-capturing test harness uses the same function so the
|
|
199
|
+
* server's file name and the harness's correlation key agree.
|
|
200
|
+
*/
|
|
201
|
+
protected resolveWorkspaceLogTarget(folders: WorkspaceFolder[]): void;
|
|
202
|
+
/**
|
|
203
|
+
* Override of Langium's workspace setup to resolve / reject
|
|
204
|
+
* {@link workspaceInitializedDeferred} once setup completes. Adopters with
|
|
205
|
+
* extra async work override this method, do their work in a sub-helper,
|
|
206
|
+
* and either delegate to `super.initializeWorkspace(...)` (preserving the
|
|
207
|
+
* default resolve) or call `this.workspaceInitializedDeferred.resolve(...)`
|
|
208
|
+
* themselves after the additional work finishes.
|
|
209
|
+
*/
|
|
210
|
+
initializeWorkspace(folders: WorkspaceFolder[], cancelToken?: CancellationToken): Promise<void>;
|
|
211
|
+
/**
|
|
212
|
+
* Default cascade-rebuild handler. Iterates {@link ProjectChangeEvent.affectedDocuments}
|
|
213
|
+
* and resets each to {@link DocumentState.Changed} so the next build cycle
|
|
214
|
+
* re-runs the pipeline (parse → link → validate) under the new project
|
|
215
|
+
* visibility scope.
|
|
216
|
+
*
|
|
217
|
+
* Subclasses can override for additional behaviour (e.g. logging,
|
|
218
|
+
* telemetry, custom rebuild policies); call `super` to preserve the
|
|
219
|
+
* default cascade.
|
|
220
|
+
*/
|
|
221
|
+
protected onProjectsChanged(event: ProjectChangeEvent): void;
|
|
222
|
+
/**
|
|
223
|
+
* Format a URI as a workspace-relative path suitable for log messages.
|
|
224
|
+
* Returns the path relative to `workspace` when provided (defaults to the
|
|
225
|
+
* first workspace folder's URI); falls back to the URI string when no
|
|
226
|
+
* workspace folder is known. Adopters with a multi-workspace model or a
|
|
227
|
+
* different display convention override on their workspace-manager
|
|
228
|
+
* subclass.
|
|
229
|
+
*/
|
|
230
|
+
wsRelativePath(uri: URI | string, workspace?: string): string;
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=hydranium-workspace-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hydranium-workspace-manager.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-workspace-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAiB,KAAK,eAAe,EAAY,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACtH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,M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F,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,2BAA2B,CAAC,iBAAiB,CAAC,CAAC;gBAExE,QAAQ,EAAE,2BAA2B,EAAE,OAAO,GAAE,cAAmB;IAY/E;;;;;;;;;OASG;cACsB,uBAAuB,CAC7C,OAAO,EAAE,eAAe,EAAE,EAC1B,SAAS,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,GAC9C,OAAO,CAAC,IAAI,CAAC;IA2BhB;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;cAalC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IA6B/F;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,SAAS,CAAC,yBAAyB,CAAC,SAAS,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,SAAS,eAAe,EAAE,GAAG,eAAe,EAAE;IAa5H;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI;IAqB/D;;;;;;OAMG;IACH,SAAS,CAAC,yBAAyB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI;IAOrE;;;;;;;OAOG;IACY,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,WAAW,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9G;;;;;;;;;OASG;IACH,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;IAS5D;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;CAI/D"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { Deferred } from '@hydranium/protocol';
|
|
10
|
+
import { DefaultWorkspaceManager, DocumentState, UriUtils } from '@hydranium/langium';
|
|
11
|
+
import { resolveLogFilePlaceholder, toLogFileWorkspaceToken } from '../diagnostics/logger.js';
|
|
12
|
+
import { findRealpathDivergence } from './document-uri-policy.js';
|
|
13
|
+
import { collectAdditionalDocuments } from './additional-document-contribution.js';
|
|
14
|
+
import { onProcessEvent } from '../../util/environment.js';
|
|
15
|
+
/**
|
|
16
|
+
* Module-level guard so repeated workspace-manager construction (e.g.
|
|
17
|
+
* test environments creating multiple instances across files) doesn't
|
|
18
|
+
* pile up listeners on the `process` singleton.
|
|
19
|
+
*/
|
|
20
|
+
let operationCancelledSuppressionInstalled = false;
|
|
21
|
+
/**
|
|
22
|
+
* The logger the installed listener routes through, re-pointed by every
|
|
23
|
+
* install rather than captured by the first. A process hosts more than one
|
|
24
|
+
* services tree — a test worker builds many, and a CLI subcommand spawns one
|
|
25
|
+
* beside a running head — and a handler holding the first tree's logger sends
|
|
26
|
+
* every later tree's genuine rejections to a logger nobody is reading.
|
|
27
|
+
*/
|
|
28
|
+
let operationCancelledSuppressionLogger;
|
|
29
|
+
/**
|
|
30
|
+
* Decide what to do with a process-level unhandled promise rejection.
|
|
31
|
+
*
|
|
32
|
+
* Langium's internal `Symbol(OperationCancelled)` marker — emitted when a
|
|
33
|
+
* `documentBuilder.build` is preempted by a concurrent write lock or
|
|
34
|
+
* cancellation token — is benign and is swallowed silently (without it the
|
|
35
|
+
* server logs spurious "Unhandled rejection" entries for cancellations that
|
|
36
|
+
* are not errors).
|
|
37
|
+
*
|
|
38
|
+
* Every OTHER reason is re-surfaced through {@link Logger.error}. This matters
|
|
39
|
+
* because Node disables its default crash/warn for ALL unhandled rejections as
|
|
40
|
+
* soon as any `unhandledRejection` listener is registered — so a handler that
|
|
41
|
+
* swallowed everything would make genuine unhandled rejections (real bugs)
|
|
42
|
+
* vanish silently. Logging keeps them visible while preserving the server's
|
|
43
|
+
* resilience (it does not re-crash the process).
|
|
44
|
+
*
|
|
45
|
+
* Pure and listener-free so it is unit-testable without touching the `process`
|
|
46
|
+
* singleton; {@link installOperationCancelledSuppression} wires it up.
|
|
47
|
+
*/
|
|
48
|
+
export function handleProcessUnhandledRejection(reason, logger) {
|
|
49
|
+
if (typeof reason === 'symbol' && String(reason) === 'Symbol(OperationCancelled)') {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
logger.error('Unhandled promise rejection: ' + (reason instanceof Error ? (reason.stack ?? reason.message) : String(reason)));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Install a process-level `unhandledRejection` listener that routes every
|
|
56
|
+
* rejection through {@link handleProcessUnhandledRejection} — swallowing
|
|
57
|
+
* Langium's `OperationCancelled` marker and logging everything else via the
|
|
58
|
+
* supplied {@link Logger}.
|
|
59
|
+
*
|
|
60
|
+
* Idempotent — safe to call from every {@link HydraniumWorkspaceManager}
|
|
61
|
+
* constructor. The `process` listener is installed at most once, because one
|
|
62
|
+
* per tree would pile up on a singleton, but each call RE-POINTS the logger it
|
|
63
|
+
* routes through: the listener reads it at rejection time rather than closing
|
|
64
|
+
* over the first caller's, so the most recently built tree is the one that
|
|
65
|
+
* hears about a genuine rejection.
|
|
66
|
+
*
|
|
67
|
+
* Applies to every Langium-based server that experiences concurrent builds.
|
|
68
|
+
*/
|
|
69
|
+
export function installOperationCancelledSuppression(logger) {
|
|
70
|
+
operationCancelledSuppressionLogger = logger;
|
|
71
|
+
if (operationCancelledSuppressionInstalled) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
operationCancelledSuppressionInstalled = true;
|
|
75
|
+
// Node-only: a browser worker has no `process` / `unhandledRejection` — the
|
|
76
|
+
// accessor makes this a no-op there.
|
|
77
|
+
onProcessEvent('unhandledRejection', reason => {
|
|
78
|
+
if (operationCancelledSuppressionLogger) {
|
|
79
|
+
handleProcessUnhandledRejection(reason, operationCancelledSuppressionLogger);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Framework {@link DefaultWorkspaceManager} subclass that integrates the
|
|
85
|
+
* project tier with Langium's workspace startup.
|
|
86
|
+
*
|
|
87
|
+
* ## Phase 0 — project discovery
|
|
88
|
+
*
|
|
89
|
+
* Overrides {@link performStartup} to await
|
|
90
|
+
* {@link ProjectManager.discoverProjects} **before** Langium's standard
|
|
91
|
+
* startup phases (additional documents → file traversal → workspace
|
|
92
|
+
* documents). By the time `documentBuilder.build` runs, the project
|
|
93
|
+
* registry is fully populated and every parsed document can resolve its
|
|
94
|
+
* owning project via `projectManager.getProject(uri)`.
|
|
95
|
+
*
|
|
96
|
+
* Single-project consumers using `SingleProjectManager` pay no cost —
|
|
97
|
+
* the override is a no-op resolve.
|
|
98
|
+
*
|
|
99
|
+
* Discovery has a side effect the startup sequence has to compensate for:
|
|
100
|
+
* it reads each descriptor through `LangiumDocuments.getOrCreateDocument`,
|
|
101
|
+
* so those documents already exist when Langium's traversal runs — and
|
|
102
|
+
* Langium's traversal deliberately drops URIs that already have a document
|
|
103
|
+
* ("ensure that the documents don't already exist"), so it never returns
|
|
104
|
+
* them. {@link performStartup} adds them back; see the method comment for
|
|
105
|
+
* what breaks without it.
|
|
106
|
+
*
|
|
107
|
+
* ## Cascade rebuild
|
|
108
|
+
*
|
|
109
|
+
* Subscribes to {@link ProjectManager.onProjectsChanged} in the
|
|
110
|
+
* constructor. When a project's identity, version, or dependencies
|
|
111
|
+
* change post-startup, the project manager emits the affected document
|
|
112
|
+
* URIs (its own members plus any transitive dependents per the
|
|
113
|
+
* `getAffectedProjects` hook). This manager re-runs
|
|
114
|
+
* `DocumentBuilder.resetToState(doc, DocumentState.Changed)` on each
|
|
115
|
+
* affected document so the next build cycle re-links them with the new
|
|
116
|
+
* visibility scope.
|
|
117
|
+
*
|
|
118
|
+
* Descriptor URIs that triggered the cycle are intentionally excluded
|
|
119
|
+
* from the affected set by `AbstractProjectManager.onBuildUpdate` —
|
|
120
|
+
* re-adding them would loop.
|
|
121
|
+
*/
|
|
122
|
+
export class HydraniumWorkspaceManager extends DefaultWorkspaceManager {
|
|
123
|
+
projectManager;
|
|
124
|
+
tracer;
|
|
125
|
+
/**
|
|
126
|
+
* Deferred backing {@link workspaceInitialized}. The framework default
|
|
127
|
+
* resolves it from {@link initializeWorkspace} once Langium's standard
|
|
128
|
+
* workspace setup completes. Adopters that need to gate first-`didOpen`
|
|
129
|
+
* on additional async work (project-scope discovery, schema fetch, etc.)
|
|
130
|
+
* override {@link initializeWorkspace} and resolve / reject this Deferred
|
|
131
|
+
* after their work completes.
|
|
132
|
+
*/
|
|
133
|
+
workspaceInitializedDeferred = new Deferred();
|
|
134
|
+
/**
|
|
135
|
+
* Resolves when the workspace is ready to handle the first `didOpen`
|
|
136
|
+
* event. `HydraniumTextDocuments.listen` awaits this promise inside its
|
|
137
|
+
* `didOpen` handler so the gate is hit at first use, not at DI. The
|
|
138
|
+
* framework resolves it from {@link initializeWorkspace}; adopters with
|
|
139
|
+
* extra async init override `initializeWorkspace` to thread their work
|
|
140
|
+
* before the resolve.
|
|
141
|
+
*/
|
|
142
|
+
workspaceInitialized = this.workspaceInitializedDeferred.promise;
|
|
143
|
+
uriPolicy;
|
|
144
|
+
writableFileSystemProvider;
|
|
145
|
+
additionalDocuments;
|
|
146
|
+
/** Registry consulted by {@link warnIfUnroutable} to check a seeded document routes. */
|
|
147
|
+
languageRegistry;
|
|
148
|
+
constructor(services, options = {}) {
|
|
149
|
+
super(services);
|
|
150
|
+
this.projectManager = services.workspace.ProjectManager;
|
|
151
|
+
this.projectManager.onProjectsChanged(event => this.onProjectsChanged(event));
|
|
152
|
+
this.uriPolicy = services.workspace.DocumentUriPolicy;
|
|
153
|
+
this.writableFileSystemProvider = services.workspace.FileSystemProvider;
|
|
154
|
+
this.additionalDocuments = services.additionalDocuments;
|
|
155
|
+
this.languageRegistry = services.ServiceRegistry;
|
|
156
|
+
this.tracer = services.Tracer.for(options.logName ?? 'WorkspaceManager').trace('instantiated');
|
|
157
|
+
installOperationCancelledSuppression(this.tracer);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Contribution form of Langium's `loadAdditionalDocuments`. Runs the base
|
|
161
|
+
* behaviour first (a no-op unless a further subclass adds documents), then
|
|
162
|
+
* lets every {@link AdditionalDocumentContribution} in the shared
|
|
163
|
+
* `additionalDocuments` group build in-memory documents via the bound
|
|
164
|
+
* `LangiumDocumentFactory` and seed them through Langium's `collector`
|
|
165
|
+
* — so each is added to the workspace and indexed like a file-backed
|
|
166
|
+
* document. Adopters contribute a stdlib / built-in set here instead of
|
|
167
|
+
* overriding this method.
|
|
168
|
+
*/
|
|
169
|
+
async loadAdditionalDocuments(folders, collector) {
|
|
170
|
+
await super.loadAdditionalDocuments(folders, collector);
|
|
171
|
+
const contributions = Object.keys(this.additionalDocuments);
|
|
172
|
+
if (contributions.length === 0) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
// Observable like the discovery / build-phase spans: one timed line
|
|
176
|
+
// reporting how many contributions ran and how many documents they
|
|
177
|
+
// seeded. `tags` is read at the done-emit, so the document count pushed
|
|
178
|
+
// inside the callback appears in the log line.
|
|
179
|
+
const tags = [`${contributions.length} contributions`];
|
|
180
|
+
let documentCount = 0;
|
|
181
|
+
await this.tracer.time('Load additional documents', async () => {
|
|
182
|
+
await collectAdditionalDocuments(this.additionalDocuments, folders, document => {
|
|
183
|
+
documentCount++;
|
|
184
|
+
this.warnIfUnroutable(document);
|
|
185
|
+
collector(document);
|
|
186
|
+
});
|
|
187
|
+
tags.push(`${documentCount} documents`);
|
|
188
|
+
}, 'info', { logAfterMs: 0, tags });
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Warn when a seeded additional document's URI matches no registered
|
|
192
|
+
* language.
|
|
193
|
+
*
|
|
194
|
+
* Such a document is added to the workspace and indexed, but every
|
|
195
|
+
* per-language service is resolved per URI — so scope computation, naming,
|
|
196
|
+
* validation and serialisation all fail to route to it, and it contributes
|
|
197
|
+
* nothing to the scopes it was written to populate. Nothing else reports
|
|
198
|
+
* this: the document exists, so no lookup errors, it is simply inert.
|
|
199
|
+
*
|
|
200
|
+
* The usual cause is a `virtualUri` with no file extension:
|
|
201
|
+
* `virtualUri(contributor)` yields `virtual:<contributor>`, and routing has
|
|
202
|
+
* nothing to match on — there is no extension, and a virtual document is
|
|
203
|
+
* never open in `TextDocuments`, so the declared-languageId rung cannot
|
|
204
|
+
* serve it either. The convention is to end the URI with a registered
|
|
205
|
+
* extension by passing it as the last segment,
|
|
206
|
+
* `virtualUri(contributor, 'name.<ext>')`.
|
|
207
|
+
*/
|
|
208
|
+
warnIfUnroutable(document) {
|
|
209
|
+
if (this.languageRegistry.hasServices(document.uri)) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const extensions = this.languageRegistry.all.flatMap(language => language.LanguageMetaData.fileExtensions);
|
|
213
|
+
this.tracer.warn(`Additional document '${document.uri.toString()}' matches no registered language, so every per-language ` +
|
|
214
|
+
'service (scope computation, naming, validation, serialization) will fail to route to it and it will ' +
|
|
215
|
+
`contribute nothing to scopes. End its URI with a registered file extension (${extensions.join(', ')}); ` +
|
|
216
|
+
'for a virtual document that means passing it as the last segment, `virtualUri(contributor, "name.<ext>")`.');
|
|
217
|
+
}
|
|
218
|
+
async performStartup(folders) {
|
|
219
|
+
// Resolve the `{workspace}` file-tee placeholder (if configured) as early
|
|
220
|
+
// as possible — before any build logging — so per-workspace log capture
|
|
221
|
+
// names its file correctly and the buffered startup lines flush.
|
|
222
|
+
this.resolveWorkspaceLogTarget(folders);
|
|
223
|
+
// Snapshot the document set around discovery so the descriptor documents
|
|
224
|
+
// it creates can be identified afterwards. Plain iteration rather than
|
|
225
|
+
// stream operators, so the two passes work against any conforming
|
|
226
|
+
// `LangiumDocuments`; both run once per workspace initialization, next to
|
|
227
|
+
// a discovery walk of the whole tree.
|
|
228
|
+
const beforeDiscovery = new Set();
|
|
229
|
+
for (const document of this.langiumDocuments.all) {
|
|
230
|
+
beforeDiscovery.add(document.uri.toString());
|
|
231
|
+
}
|
|
232
|
+
// Phase 0: project discovery. By the time Langium's standard startup
|
|
233
|
+
// runs below, `getProject(uri)` returns a definitive answer for every URI
|
|
234
|
+
// that belongs to a discovered project.
|
|
235
|
+
await this.projectManager.discoverProjects(folders);
|
|
236
|
+
const discovered = [];
|
|
237
|
+
for (const document of this.langiumDocuments.all) {
|
|
238
|
+
if (!beforeDiscovery.has(document.uri.toString())) {
|
|
239
|
+
discovered.push(document);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const documents = await super.performStartup(folders);
|
|
243
|
+
this.probePathDivergence(folders);
|
|
244
|
+
return this.withDiscoveredDescriptors(documents, discovered);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Add back the documents project discovery created that Langium's file
|
|
248
|
+
* traversal then filtered out.
|
|
249
|
+
*
|
|
250
|
+
* `AbstractProjectManager.discoverProjects` has to parse each descriptor to
|
|
251
|
+
* read it, which it does through `LangiumDocuments.getOrCreateDocument`.
|
|
252
|
+
* Langium's `performStartup` traversal skips any URI that already has a
|
|
253
|
+
* document, so every descriptor is missing from the list it returns — and
|
|
254
|
+
* `initializeWorkspace` builds exactly that list.
|
|
255
|
+
*
|
|
256
|
+
* The consequence is not a slow first build but a WRONG one. Descriptor
|
|
257
|
+
* documents stay at `Parsed` with nothing in the global index, while the
|
|
258
|
+
* documents that did make the list run all the way through `Linked` against
|
|
259
|
+
* that empty index. Every cross-document reference into a descriptor fails,
|
|
260
|
+
* and the failure sticks: a later build skips documents already at
|
|
261
|
+
* `Validated`, so nothing re-links them until the user edits the file.
|
|
262
|
+
*
|
|
263
|
+
* Invisible to an adopter whose descriptors ARE its model files (every file
|
|
264
|
+
* is a descriptor, the returned list is empty, `build([])` is a no-op).
|
|
265
|
+
* Fatal for one whose descriptors are a subset — a folder-scoped project
|
|
266
|
+
* model, or a second grammar whose files are never descriptors.
|
|
267
|
+
*
|
|
268
|
+
* Only documents created by discovery are re-added: pre-existing ones are
|
|
269
|
+
* either additional/library documents (already collected by
|
|
270
|
+
* `loadAdditionalDocuments`) or leftovers from an earlier initialization,
|
|
271
|
+
* and neither belongs in this build list.
|
|
272
|
+
*/
|
|
273
|
+
withDiscoveredDescriptors(documents, discovered) {
|
|
274
|
+
if (discovered.length === 0) {
|
|
275
|
+
return documents;
|
|
276
|
+
}
|
|
277
|
+
const collected = new Set(documents.map(document => document.uri.toString()));
|
|
278
|
+
const missing = discovered.filter(document => !collected.has(document.uri.toString()));
|
|
279
|
+
if (missing.length === 0) {
|
|
280
|
+
return documents;
|
|
281
|
+
}
|
|
282
|
+
this.tracer.debug(`Re-adding ${missing.length} project-descriptor document(s) to the initial build.`);
|
|
283
|
+
return [...missing, ...documents];
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* One-shot startup diagnostic. Warns when a workspace root resolves through a
|
|
287
|
+
* symlink / `..` / case variant, so the URI a client opens (`S`) diverges
|
|
288
|
+
* from the canonical document identity (`R`) the build keys by — the
|
|
289
|
+
* condition the {@link DocumentUriPolicy} seam exists to reconcile.
|
|
290
|
+
* Probing the roots is sufficient and cheap: a divergent ancestor means every
|
|
291
|
+
* file beneath it diverges, and the loaded documents' URIs are already
|
|
292
|
+
* canonical (their original spelling is gone). Emits NOTHING for a plain
|
|
293
|
+
* on-disk workspace, or a filesystem without `realpath` — so a non-empty line
|
|
294
|
+
* is the empirical signal that a deployment actually exercises the divergence
|
|
295
|
+
* machinery.
|
|
296
|
+
*/
|
|
297
|
+
probePathDivergence(folders) {
|
|
298
|
+
if (!this.uriPolicy) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
for (const folder of folders) {
|
|
302
|
+
const real = findRealpathDivergence(folder.uri, this.writableFileSystemProvider);
|
|
303
|
+
if (!real) {
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
const policyName = this.uriPolicy.constructor.name;
|
|
307
|
+
const collapsed = this.uriPolicy.canonicalUri(folder.uri) === this.uriPolicy.canonicalUri(real);
|
|
308
|
+
this.tracer.warn(`Workspace root '${folder.uri}' resolves through a symlink/'..'/case variant to '${real.toString()}', ` +
|
|
309
|
+
`so client URIs under it diverge from canonical document identity. ` +
|
|
310
|
+
(collapsed
|
|
311
|
+
? `The bound ${policyName} collapses both spellings to one identity, so subscriptions stay consistent.`
|
|
312
|
+
: `The bound ${policyName} does NOT collapse them — the link and its target would become distinct documents.`));
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Resolve the `{workspace}` file-tee placeholder from the first workspace
|
|
317
|
+
* folder. No-op when no folder is known or no `{workspace}`-templated log
|
|
318
|
+
* target is configured. See {@link toLogFileWorkspaceToken} for the token
|
|
319
|
+
* derivation — a log-capturing test harness uses the same function so the
|
|
320
|
+
* server's file name and the harness's correlation key agree.
|
|
321
|
+
*/
|
|
322
|
+
resolveWorkspaceLogTarget(folders) {
|
|
323
|
+
const first = folders[0];
|
|
324
|
+
if (first) {
|
|
325
|
+
resolveLogFilePlaceholder('workspace', toLogFileWorkspaceToken(first.uri));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Override of Langium's workspace setup to resolve / reject
|
|
330
|
+
* {@link workspaceInitializedDeferred} once setup completes. Adopters with
|
|
331
|
+
* extra async work override this method, do their work in a sub-helper,
|
|
332
|
+
* and either delegate to `super.initializeWorkspace(...)` (preserving the
|
|
333
|
+
* default resolve) or call `this.workspaceInitializedDeferred.resolve(...)`
|
|
334
|
+
* themselves after the additional work finishes.
|
|
335
|
+
*/
|
|
336
|
+
async initializeWorkspace(folders, cancelToken) {
|
|
337
|
+
try {
|
|
338
|
+
await super.initializeWorkspace(folders, cancelToken);
|
|
339
|
+
this.workspaceInitializedDeferred.resolve(undefined);
|
|
340
|
+
}
|
|
341
|
+
catch (error) {
|
|
342
|
+
this.workspaceInitializedDeferred.reject(error);
|
|
343
|
+
throw error;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Default cascade-rebuild handler. Iterates {@link ProjectChangeEvent.affectedDocuments}
|
|
348
|
+
* and resets each to {@link DocumentState.Changed} so the next build cycle
|
|
349
|
+
* re-runs the pipeline (parse → link → validate) under the new project
|
|
350
|
+
* visibility scope.
|
|
351
|
+
*
|
|
352
|
+
* Subclasses can override for additional behaviour (e.g. logging,
|
|
353
|
+
* telemetry, custom rebuild policies); call `super` to preserve the
|
|
354
|
+
* default cascade.
|
|
355
|
+
*/
|
|
356
|
+
onProjectsChanged(event) {
|
|
357
|
+
for (const uri of event.affectedDocuments) {
|
|
358
|
+
const document = this.langiumDocuments.getDocument(uri);
|
|
359
|
+
if (document) {
|
|
360
|
+
this.documentBuilder.resetToState(document, DocumentState.Changed);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
wsRelativePath(uri, workspace = this.workspaceFolders?.[0]?.uri) {
|
|
365
|
+
return workspace ? UriUtils.relative(workspace, uri) : typeof uri === 'string' ? uri : uri.path.toString();
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
//# sourceMappingURL=hydranium-workspace-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hydranium-workspace-manager.js","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-workspace-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,QAAQ,EAA4B,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAwB,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AAGtH,OAAO,EAAuB,yBAAyB,EAA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