@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,336 @@
|
|
|
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 { appendFileSync, existsSync, readdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
import { DEFAULT_LOG_FILE_ENV, DEFAULT_LOG_LEVEL_ENV } from '@hydranium/protocol';
|
|
13
|
+
import { toLogFileWorkspaceToken } from '../../langium/diagnostics/log-file-token.js';
|
|
14
|
+
/**
|
|
15
|
+
* Default env var naming the per-test server-log capture directory. Its presence
|
|
16
|
+
* is the opt-in: set it to a directory to enable capture, leave it unset for a
|
|
17
|
+
* normal (no-capture) run. Read by both {@link captureServerLog} and
|
|
18
|
+
* {@link attachServerLog}.
|
|
19
|
+
*/
|
|
20
|
+
export const DEFAULT_SERVER_LOG_DIR_ENV = 'HYDRANIUM_SERVER_LOG_DIR';
|
|
21
|
+
/**
|
|
22
|
+
* Default env var providing a central {@link AttachServerLogOptions.attachOn}
|
|
23
|
+
* policy (`'failure' | 'always' | 'never'`) for a whole run, so a debugging
|
|
24
|
+
* session can flip it once on the CLI without touching any spec. An explicit
|
|
25
|
+
* `attachOn` option still wins; an unset/invalid value falls back to `'failure'`.
|
|
26
|
+
*/
|
|
27
|
+
export const DEFAULT_SERVER_LOG_ATTACH_ENV = 'HYDRANIUM_SERVER_LOG_ATTACH';
|
|
28
|
+
/**
|
|
29
|
+
* Default env var naming which browser console levels {@link forwardBrowserConsole}
|
|
30
|
+
* forwards — a comma-separated list (e.g. `error,warning,info`). Lets a run widen or
|
|
31
|
+
* narrow the forwarded set without touching the spec. An explicit `levels` option
|
|
32
|
+
* wins; an unset value falls back to {@link DEFAULT_BROWSER_LOG_LEVELS}.
|
|
33
|
+
*/
|
|
34
|
+
export const DEFAULT_BROWSER_LOG_LEVELS_ENV = 'HYDRANIUM_BROWSER_LOG_LEVELS';
|
|
35
|
+
/** Console levels {@link forwardBrowserConsole} forwards by default — errors + warnings only (tiny volume). */
|
|
36
|
+
export const DEFAULT_BROWSER_LOG_LEVELS = ['error', 'warning'];
|
|
37
|
+
function parseAttachOn(value) {
|
|
38
|
+
return value === 'failure' || value === 'always' || value === 'never' ? value : undefined;
|
|
39
|
+
}
|
|
40
|
+
/** Parse a comma-separated console-level list, or `undefined` when empty/unset. */
|
|
41
|
+
function parseBrowserLogLevels(value) {
|
|
42
|
+
if (!value) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const levels = value
|
|
46
|
+
.split(',')
|
|
47
|
+
.map(level => level.trim())
|
|
48
|
+
.filter(level => level.length > 0);
|
|
49
|
+
return levels.length > 0 ? levels : undefined;
|
|
50
|
+
}
|
|
51
|
+
/** The `{workspace}` placeholder the file-tee expands once the workspace is known. */
|
|
52
|
+
const WORKSPACE_PLACEHOLDER = '{workspace}';
|
|
53
|
+
/**
|
|
54
|
+
* Build the environment to inject into the server process (e.g. a Playwright
|
|
55
|
+
* `webServer.env`) so it writes one per-workspace log file under the capture dir,
|
|
56
|
+
* plus the reporter entry that renames those files to spec names once the run
|
|
57
|
+
* ends. Returns an **empty env, and no reporter, when no dir is configured**, so a
|
|
58
|
+
* normal run is untouched. The `{workspace}` token is expanded server-side once
|
|
59
|
+
* the workspace is known.
|
|
60
|
+
*
|
|
61
|
+
* **Publishes a resolved `options.dir` onto {@link DEFAULT_SERVER_LOG_DIR_ENV} in
|
|
62
|
+
* the CALLING process, and that mutation is load-bearing rather than a
|
|
63
|
+
* convenience.** The returned env reaches the server child only, while
|
|
64
|
+
* {@link markServerLog} / {@link attachServerLog} — the halves that write the
|
|
65
|
+
* per-test boundary markers and do the attaching — run in the runner process and
|
|
66
|
+
* resolve their directory from that env var, which a fixture typically calls with
|
|
67
|
+
* no options at all. Passing the option without publishing it produces a captured
|
|
68
|
+
* log with no markers in it and nothing attached to the failing test, which is
|
|
69
|
+
* worse than capture being off. A config-time caller runs before any worker forks,
|
|
70
|
+
* so the workers inherit it.
|
|
71
|
+
*/
|
|
72
|
+
export function captureServerLog(options = {}) {
|
|
73
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
74
|
+
if (!dir) {
|
|
75
|
+
return { env: {} };
|
|
76
|
+
}
|
|
77
|
+
process.env[DEFAULT_SERVER_LOG_DIR_ENV] = dir;
|
|
78
|
+
const env = {
|
|
79
|
+
[DEFAULT_LOG_FILE_ENV]: join(dir, `${WORKSPACE_PLACEHOLDER}.log`)
|
|
80
|
+
};
|
|
81
|
+
env[DEFAULT_LOG_LEVEL_ENV] = options.level ?? process.env[DEFAULT_LOG_LEVEL_ENV] ?? 'debug';
|
|
82
|
+
const reporterModule = fileURLToPath(new URL('./server-log-rename-reporter.js', import.meta.url));
|
|
83
|
+
return { env, reporter: [reporterModule, { dir }] };
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Derive a stable, filename-safe per-suite log name from a spec's absolute path:
|
|
87
|
+
* the path below the last `tests/` segment (or the basename), minus the
|
|
88
|
+
* `.spec.ts(x)` suffix, with separators flattened. The server names logs by an
|
|
89
|
+
* opaque workspace token; {@link renameServerLogs} uses this to rename them to
|
|
90
|
+
* spec names once the run ends.
|
|
91
|
+
*
|
|
92
|
+
* `.mts` / `.cts` are stripped too: an ESM Playwright project names its specs
|
|
93
|
+
* `.spec.mts`, and a `.ts`-only strip leaves that inside the log's file name.
|
|
94
|
+
*/
|
|
95
|
+
export function serverLogSpecName(file) {
|
|
96
|
+
const norm = file.replace(/\\/g, '/');
|
|
97
|
+
const idx = norm.lastIndexOf('/tests/');
|
|
98
|
+
const relative = idx >= 0 ? norm.slice(idx + '/tests/'.length) : norm.slice(norm.lastIndexOf('/') + 1);
|
|
99
|
+
return relative.replace(/\.spec\.[cm]?tsx?$/, '').replace(/[^A-Za-z0-9._-]/g, '_');
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Rename each `<token>.log` (backend) and `<token>.browser.log` (forwarded
|
|
103
|
+
* browser console) to the spec name recorded in its `<token>.spec` sidecar
|
|
104
|
+
* (written by {@link markServerLog}), then delete the sidecar. Colliding names —
|
|
105
|
+
* a spec that opened more than one workspace — get a `-2`, `-3`, … suffix. Token
|
|
106
|
+
* logs without a sidecar are left untouched. Run once, after all server processes
|
|
107
|
+
* have exited (e.g. a reporter's `onEnd`). Best-effort.
|
|
108
|
+
*/
|
|
109
|
+
export function renameServerLogs(dir) {
|
|
110
|
+
let entries;
|
|
111
|
+
try {
|
|
112
|
+
entries = readdirSync(dir);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
// Per suffix (`.log`, `.browser.log`) a `taken` set guards collisions, so the
|
|
118
|
+
// backend and browser logs for one spec share the same friendly base name.
|
|
119
|
+
const taken = { '.log': new Set(), '.browser.log': new Set() };
|
|
120
|
+
const rename = (token, name, suffix) => {
|
|
121
|
+
const source = join(dir, `${token}${suffix}`);
|
|
122
|
+
if (!existsSync(source)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
let target = `${name}${suffix}`;
|
|
126
|
+
for (let n = 2; taken[suffix].has(target) || existsSync(join(dir, target)); n++) {
|
|
127
|
+
target = `${name}-${n}${suffix}`;
|
|
128
|
+
}
|
|
129
|
+
taken[suffix].add(target);
|
|
130
|
+
try {
|
|
131
|
+
renameSync(source, join(dir, target));
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
// ignore
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
for (const entry of entries) {
|
|
138
|
+
if (!entry.endsWith('.spec')) {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const sidecar = join(dir, entry);
|
|
142
|
+
const token = entry.slice(0, -'.spec'.length);
|
|
143
|
+
let name;
|
|
144
|
+
try {
|
|
145
|
+
name = readFileSync(sidecar, 'utf-8').trim();
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
unlinkSync(sidecar);
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
// ignore
|
|
155
|
+
}
|
|
156
|
+
if (!name) {
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
rename(token, name, '.log');
|
|
160
|
+
rename(token, name, '.browser.log');
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Resolve the per-workspace server-log file the {@link captureServerLog} tee
|
|
165
|
+
* writes for `workspacePath` — the `<token>.log` under the capture dir — or
|
|
166
|
+
* `undefined` when no capture dir is configured (`options.dir` / the default env
|
|
167
|
+
* var both unset). Lets a harness locate the log to fold elsewhere (e.g. the e2e
|
|
168
|
+
* profiling fixture folding `server.log` into a bundle). Does NOT check the file
|
|
169
|
+
* exists — it names where the tee would write.
|
|
170
|
+
*/
|
|
171
|
+
export function resolveServerLogPath(workspacePath, options = {}) {
|
|
172
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
173
|
+
if (!dir) {
|
|
174
|
+
return undefined;
|
|
175
|
+
}
|
|
176
|
+
return join(dir, `${toLogFileWorkspaceToken(workspacePath)}.log`);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Resolve the per-workspace **browser-console** log file {@link forwardBrowserConsole}
|
|
180
|
+
* writes for `workspacePath` — the `<token>.browser.log` under the capture dir —
|
|
181
|
+
* or `undefined` when no capture dir is configured. The browser console is kept in
|
|
182
|
+
* its OWN file (not interleaved into `server.log`): the two streams use different
|
|
183
|
+
* clocks, so a merged order would misrepresent timing. Does NOT check the file exists.
|
|
184
|
+
*/
|
|
185
|
+
export function resolveBrowserConsoleLogPath(workspacePath, options = {}) {
|
|
186
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
187
|
+
if (!dir) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
return join(dir, `${toLogFileWorkspaceToken(workspacePath)}.browser.log`);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Write a start-of-test boundary marker to the workspace's (per-suite) server
|
|
194
|
+
* log, so the test's lines follow it in natural reading order. Call from a
|
|
195
|
+
* spec's `beforeEach` (or a fixture's setup) with the test's workspace path.
|
|
196
|
+
* No-op when no capture dir is configured. Best-effort; never throws.
|
|
197
|
+
*/
|
|
198
|
+
export function markServerLog(testInfo, workspacePath, options = {}) {
|
|
199
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
200
|
+
if (!dir) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const token = toLogFileWorkspaceToken(workspacePath);
|
|
204
|
+
try {
|
|
205
|
+
appendFileSync(join(dir, `${token}.log`), `\n===== START: ${testInfo.title} =====\n`);
|
|
206
|
+
}
|
|
207
|
+
catch {
|
|
208
|
+
// Best-effort marker; a failing log sink must not break the test run.
|
|
209
|
+
}
|
|
210
|
+
// Record token -> spec name so `renameServerLogs` can give the per-suite log a
|
|
211
|
+
// friendly name after the run (the server itself only knows the workspace token).
|
|
212
|
+
if (testInfo.file) {
|
|
213
|
+
try {
|
|
214
|
+
writeFileSync(join(dir, `${token}.spec`), serverLogSpecName(testInfo.file));
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// ignore
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Append a raw line to the workspace's (per-suite) server-log file — the same
|
|
223
|
+
* `<token>.log` {@link markServerLog} / {@link attachServerLog} write to. Lets a
|
|
224
|
+
* harness interleave its own observations (e.g. forwarded browser-console lines)
|
|
225
|
+
* into the backend stream so they correlate by timestamp/order. A trailing
|
|
226
|
+
* newline is added if the line lacks one.
|
|
227
|
+
*
|
|
228
|
+
* **No-op when no capture dir is configured** (`opts.dir` / the default env var
|
|
229
|
+
* both unset), so a normal run is untouched. Best-effort; never throws.
|
|
230
|
+
*/
|
|
231
|
+
export function appendServerLog(workspacePath, line, options = {}) {
|
|
232
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
233
|
+
if (!dir) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
const file = join(dir, `${toLogFileWorkspaceToken(workspacePath)}.log`);
|
|
237
|
+
try {
|
|
238
|
+
appendFileSync(file, line.endsWith('\n') ? line : `${line}\n`);
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
// Best-effort; a failing log sink must not break the test run.
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Forward the browser tab's `error` / `warning` console messages into the
|
|
246
|
+
* workspace's (per-suite) **browser-console** log — `<token>.browser.log`, its own
|
|
247
|
+
* file BESIDE the backend `server.log`, NOT interleaved into it. The two streams
|
|
248
|
+
* use different clocks (the backend logger vs the forwarder's arrival time), so a
|
|
249
|
+
* merged order would misrepresent timing; keeping them separate is honest and a
|
|
250
|
+
* consumer can still merge deliberately by each line's own timestamp. Playwright
|
|
251
|
+
* has both page access and fs access, so no renderer→backend transport is needed.
|
|
252
|
+
* Which levels are forwarded is configurable — `options.levels`, else the
|
|
253
|
+
* comma-separated {@link DEFAULT_BROWSER_LOG_LEVELS_ENV} env, else
|
|
254
|
+
* {@link DEFAULT_BROWSER_LOG_LEVELS} (`error` + `warning`, tiny volume; the
|
|
255
|
+
* production frontend logger strips info/debug/log anyway). Each line keeps the
|
|
256
|
+
* frontend logger's own timestamp (embedded in the text); a `[browser]` tag marks
|
|
257
|
+
* the origin.
|
|
258
|
+
*
|
|
259
|
+
* Call once after the page exists (e.g. right after the Theia app starts), with
|
|
260
|
+
* the test's workspace path. **No-op — and no listener attached — when no capture
|
|
261
|
+
* dir is configured** (`options.dir` / the default env var both unset), so a
|
|
262
|
+
* normal run is untouched. Best-effort; forwarding never throws.
|
|
263
|
+
*/
|
|
264
|
+
export function forwardBrowserConsole(page, workspacePath, options = {}) {
|
|
265
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
266
|
+
if (!dir) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const levels = new Set(options.levels ?? parseBrowserLogLevels(process.env[DEFAULT_BROWSER_LOG_LEVELS_ENV]) ?? DEFAULT_BROWSER_LOG_LEVELS);
|
|
270
|
+
const file = join(dir, `${toLogFileWorkspaceToken(workspacePath)}.browser.log`);
|
|
271
|
+
page.on('console', message => {
|
|
272
|
+
const type = message.type();
|
|
273
|
+
if (!levels.has(type)) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
try {
|
|
277
|
+
appendFileSync(file, `[browser] [${type}] ${message.text()}\n`);
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
// Best-effort; a failing log sink must not break the test run.
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Per-test server-log capture, called from a spec's `afterEach` with the test's
|
|
286
|
+
* workspace path:
|
|
287
|
+
*
|
|
288
|
+
* - appends an end-of-test **boundary marker** to the workspace's (per-suite)
|
|
289
|
+
* server log, so each test's region is delimited within the shared stream;
|
|
290
|
+
* - attaches that log — and the separate browser-console log, when one exists —
|
|
291
|
+
* to the test, so it shows in the HTML report alongside the trace + screenshot.
|
|
292
|
+
* Which outcomes attach is {@link AttachServerLogOptions.attachOn}, failure-only
|
|
293
|
+
* by default.
|
|
294
|
+
*
|
|
295
|
+
* **No-op when no capture dir is configured** (`options.dir` and the default env
|
|
296
|
+
* var both unset), so a normal run is untouched — no per-spec guard needed.
|
|
297
|
+
* Markers and writes are best-effort; failures never propagate.
|
|
298
|
+
*/
|
|
299
|
+
export async function attachServerLog(testInfo, workspacePath, options = {}) {
|
|
300
|
+
const dir = options.dir ?? process.env[DEFAULT_SERVER_LOG_DIR_ENV];
|
|
301
|
+
if (!dir) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const file = join(dir, `${toLogFileWorkspaceToken(workspacePath)}.log`);
|
|
305
|
+
const status = testInfo.status ?? 'unknown';
|
|
306
|
+
try {
|
|
307
|
+
appendFileSync(file, `\n===== END: ${testInfo.title} — ${status} =====\n`);
|
|
308
|
+
}
|
|
309
|
+
catch {
|
|
310
|
+
// Best-effort marker; a failing log sink must not break the test run.
|
|
311
|
+
}
|
|
312
|
+
const failed = status !== (testInfo.expectedStatus ?? 'passed');
|
|
313
|
+
const attachOn = options.attachOn ?? parseAttachOn(process.env[DEFAULT_SERVER_LOG_ATTACH_ENV]) ?? 'failure';
|
|
314
|
+
const shouldAttach = attachOn === 'always' || (attachOn === 'failure' && failed);
|
|
315
|
+
if (!shouldAttach) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
// Attach both streams: the backend server log and (when present) the separate
|
|
319
|
+
// browser-console log, so a failing test carries the frontend side too.
|
|
320
|
+
const attachments = [
|
|
321
|
+
{ name: 'server-log', path: file },
|
|
322
|
+
{ name: 'browser-console-log', path: join(dir, `${toLogFileWorkspaceToken(workspacePath)}.browser.log`) }
|
|
323
|
+
];
|
|
324
|
+
for (const attachment of attachments) {
|
|
325
|
+
if (!existsSync(attachment.path)) {
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
try {
|
|
329
|
+
await testInfo.attach(attachment.name, { path: attachment.path, contentType: 'text/plain' });
|
|
330
|
+
}
|
|
331
|
+
catch {
|
|
332
|
+
// Attaching must not break the test run.
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
//# sourceMappingURL=server-log-capture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-log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,IAAI,EAAE,IAAI,EAAE;QAClC,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,uBAAuB,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE;KAC3G,CAAC;IACF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACpC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,SAAS;QACZ,CAAC;QACD,IAAI,CAAC;YACF,MAAM,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;QAChG,CAAC;QAAC,MAAM,CAAC;YACN,yCAAyC;QAC5C,CAAC;IACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { type Fixtures, type PlaywrightTestArgs, type PlaywrightTestOptions } from '@playwright/test';
|
|
10
|
+
export interface ServerLogFixtures {
|
|
11
|
+
/**
|
|
12
|
+
* Workspace path for the current test. Defaults to `''` (capture skipped);
|
|
13
|
+
* adopters override it with a fixture deriving from their app.
|
|
14
|
+
* Requires a **per-test app fixture** — a per-spec `beforeAll` app lives in a
|
|
15
|
+
* closure a fixture cannot read, so those suites use `markServerLog` /
|
|
16
|
+
* `attachServerLog` in `beforeEach` / `afterEach` instead.
|
|
17
|
+
*/
|
|
18
|
+
serverLogWorkspace: string;
|
|
19
|
+
}
|
|
20
|
+
/** Full fixture set including the internal side-effect-only auto fixture. */
|
|
21
|
+
interface ServerLogTestFixtures extends ServerLogFixtures {
|
|
22
|
+
/** Internal auto fixture: marks on setup, attaches on teardown. Provides no value. */
|
|
23
|
+
serverLogCapture: void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Composable fixtures for per-test server-log capture: writes the start marker
|
|
27
|
+
* before each test (setup) and attaches the log on failure after each test
|
|
28
|
+
* (teardown) — i.e. the `beforeEach` + `afterEach` pair fused into one auto
|
|
29
|
+
* fixture. Compose onto any test base, or use the pre-extended {@link test}.
|
|
30
|
+
* Override `serverLogWorkspace` to wire the workspace; otherwise it's inert.
|
|
31
|
+
*/
|
|
32
|
+
export declare const serverLogFixtures: Fixtures<ServerLogTestFixtures, object, PlaywrightTestArgs & PlaywrightTestOptions>;
|
|
33
|
+
/** Pre-extended test with {@link serverLogFixtures} applied, for adopters on the plain base. */
|
|
34
|
+
export declare const test: import("@playwright/test").TestType<PlaywrightTestArgs & PlaywrightTestOptions & ServerLogTestFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=server-log-fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-log-fixture.d.ts","sourceRoot":"","sources":["../../../src/testing/playwright/server-log-fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAKlF,OAAO,EAAgB,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGpH,MAAM,WAAW,iBAAiB;IAC/B;;;;;;OAMG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC7B;AAED,6EAA6E;AAC7E,UAAU,qBAAsB,SAAQ,iBAAiB;IACtD,sFAAsF;IACtF,gBAAgB,EAAE,IAAI,CAAC;CACzB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,qBAAqB,EAAE,MAAM,EAAE,kBAAkB,GAAG,qBAAqB,CAcjH,CAAC;AAEF,gGAAgG;AAChG,eAAO,MAAM,IAAI,+MAAwD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
// This module imports `@playwright/test` (an OPTIONAL peer) to compose a fixture.
|
|
10
|
+
// The plain functions in `server-log-capture.ts` stay playwright-free; only
|
|
11
|
+
// adopters that use this fixture need `@playwright/test` installed.
|
|
12
|
+
import { test as base } from '@playwright/test';
|
|
13
|
+
import { attachServerLog, markServerLog } from './server-log-capture.js';
|
|
14
|
+
/**
|
|
15
|
+
* Composable fixtures for per-test server-log capture: writes the start marker
|
|
16
|
+
* before each test (setup) and attaches the log on failure after each test
|
|
17
|
+
* (teardown) — i.e. the `beforeEach` + `afterEach` pair fused into one auto
|
|
18
|
+
* fixture. Compose onto any test base, or use the pre-extended {@link test}.
|
|
19
|
+
* Override `serverLogWorkspace` to wire the workspace; otherwise it's inert.
|
|
20
|
+
*/
|
|
21
|
+
export const serverLogFixtures = {
|
|
22
|
+
serverLogWorkspace: ['', { option: true }],
|
|
23
|
+
serverLogCapture: [
|
|
24
|
+
async ({ serverLogWorkspace }, use) => {
|
|
25
|
+
if (serverLogWorkspace) {
|
|
26
|
+
markServerLog(base.info(), serverLogWorkspace);
|
|
27
|
+
}
|
|
28
|
+
await use(undefined);
|
|
29
|
+
if (serverLogWorkspace) {
|
|
30
|
+
await attachServerLog(base.info(), serverLogWorkspace);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{ auto: true }
|
|
34
|
+
]
|
|
35
|
+
};
|
|
36
|
+
/** Pre-extended test with {@link serverLogFixtures} applied, for adopters on the plain base. */
|
|
37
|
+
export const test = base.extend(serverLogFixtures);
|
|
38
|
+
//# sourceMappingURL=server-log-fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-log-fixture.js","sourceRoot":"","sources":["../../../src/testing/playwright/server-log-fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,kFAAkF;AAClF,4EAA4E;AAC5E,oEAAoE;AACpE,OAAO,EAAE,IAAI,IAAI,IAAI,EAAsE,MAAM,kBAAkB,CAAC;AACpH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAmBzE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAwF;IACnH,kBAAkB,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1C,gBAAgB,EAAE;QACf,KAAK,EAAE,EAAE,kBAAkB,EAAE,EAAE,GAAG,EAAiB,EAAE;YAClD,IAAI,kBAAkB,EAAE,CAAC;gBACtB,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,kBAAkB,CAAC,CAAC;YAClD,CAAC;YACD,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,IAAI,kBAAkB,EAAE,CAAC;gBACtB,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,kBAAkB,CAAC,CAAC;YAC1D,CAAC;QACJ,CAAC;QACD,EAAE,IAAI,EAAE,IAAI,EAAE;KAChB;CACH,CAAC;AAEF,gGAAgG;AAChG,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAwB,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
import { type ServerLogRenameReporterOptions } from './server-log-capture.js';
|
|
10
|
+
/**
|
|
11
|
+
* Playwright reporter (registered by path via `captureServerLog`) that, at
|
|
12
|
+
* the end of the run — once every per-frontend server has exited — renames the
|
|
13
|
+
* opaque `<workspace-token>.log` files to spec names via {@link renameServerLogs}.
|
|
14
|
+
* Implements only `onEnd`; declared structurally so this module imports nothing
|
|
15
|
+
* from `@playwright/test`.
|
|
16
|
+
*/
|
|
17
|
+
export default class ServerLogRenameReporter {
|
|
18
|
+
protected readonly dir: string;
|
|
19
|
+
constructor(options: ServerLogRenameReporterOptions);
|
|
20
|
+
onEnd(): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=server-log-rename-reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-log-rename-reporter.d.ts","sourceRoot":"","sources":["../../../src/testing/playwright/server-log-rename-reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAoB,KAAK,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAuB;IACzC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAEnB,OAAO,EAAE,8BAA8B;IAInD,KAAK,IAAI,IAAI;CAGf"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { renameServerLogs } from './server-log-capture.js';
|
|
10
|
+
/**
|
|
11
|
+
* Playwright reporter (registered by path via `captureServerLog`) that, at
|
|
12
|
+
* the end of the run — once every per-frontend server has exited — renames the
|
|
13
|
+
* opaque `<workspace-token>.log` files to spec names via {@link renameServerLogs}.
|
|
14
|
+
* Implements only `onEnd`; declared structurally so this module imports nothing
|
|
15
|
+
* from `@playwright/test`.
|
|
16
|
+
*/
|
|
17
|
+
export default class ServerLogRenameReporter {
|
|
18
|
+
dir;
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.dir = options.dir;
|
|
21
|
+
}
|
|
22
|
+
onEnd() {
|
|
23
|
+
renameServerLogs(this.dir);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=server-log-rename-reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-log-rename-reporter.js","sourceRoot":"","sources":["../../../src/testing/playwright/server-log-rename-reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,gBAAgB,EAAuC,MAAM,yBAAyB,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAuB;IACtB,GAAG,CAAS;IAE/B,YAAY,OAAuC;QAChD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAC1B,CAAC;IAED,KAAK;QACF,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;CACH"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
* Driver for the structured-write transform chain — the rewrite registry plus
|
|
11
|
+
* the serializer — run the way `ModelService.update` runs it.
|
|
12
|
+
*
|
|
13
|
+
* # Why a driver and not a documented recipe
|
|
14
|
+
*
|
|
15
|
+
* The chain is short enough that a test can chain it by hand, and that is
|
|
16
|
+
* exactly the failure this exists to prevent. A hand-copied chain names each
|
|
17
|
+
* rewrite as a function call, so it is a SNAPSHOT of the registry taken on the
|
|
18
|
+
* day it was written: a newly registered rewrite, a changed priority or a
|
|
19
|
+
* withdrawn one leaves the copy compiling and passing while production runs
|
|
20
|
+
* something else. Nothing fails, because the drift only matters for the
|
|
21
|
+
* fixtures the missing rewrite would have touched — and a test whose fixture it
|
|
22
|
+
* does not touch keeps asserting against a pipeline that stopped existing.
|
|
23
|
+
* Reading the order from the registry is the only version of this that cannot
|
|
24
|
+
* fall behind.
|
|
25
|
+
*
|
|
26
|
+
* # Resolved per URI, not per language handle
|
|
27
|
+
*
|
|
28
|
+
* Both slots are resolved through `ServiceRegistry.getServices(uri)`, which is
|
|
29
|
+
* what `ModelService.serialize` and `ModelService.rewriteModel` do. Taking a
|
|
30
|
+
* language-services handle instead would be shorter, but it re-hardcodes the
|
|
31
|
+
* language at the call site and so cannot witness a multi-grammar workspace
|
|
32
|
+
* routing a write to the wrong language's rewrite set or serializer — the one
|
|
33
|
+
* defect that only shows up when more than one grammar is registered.
|
|
34
|
+
*
|
|
35
|
+
* # Scope: the transform chain, not the document lifecycle
|
|
36
|
+
*
|
|
37
|
+
* This runs rewrite → serialize and stops. It does NOT open the document, push
|
|
38
|
+
* text into the multi-client store, drive a build or return an
|
|
39
|
+
* {@link AstDocument}: those need a live workspace, and a test that wants them
|
|
40
|
+
* should call `ModelService.update` itself rather than a driver standing in for
|
|
41
|
+
* it. What is left is the part with no observable of its own — the text and the
|
|
42
|
+
* rewritten model — which is why it needed lifting.
|
|
43
|
+
*
|
|
44
|
+
* A textual payload is likewise out of scope. `ModelService.modelToText`
|
|
45
|
+
* returns a string payload untouched, so there is no chain to drive and nothing
|
|
46
|
+
* a driver could add.
|
|
47
|
+
*/
|
|
48
|
+
import type { AstNode } from '@hydranium/langium';
|
|
49
|
+
import type { TransferElement } from '@hydranium/protocol';
|
|
50
|
+
import type { CancellationToken } from 'vscode-languageserver';
|
|
51
|
+
import type { ServerSharedServices } from '../langium/module.js';
|
|
52
|
+
/** Inputs to {@link runUpdatePipeline}. */
|
|
53
|
+
export interface UpdatePipelineArgs<TTransfer extends TransferElement = TransferElement, TAst extends AstNode = AstNode> {
|
|
54
|
+
/**
|
|
55
|
+
* URI the write is for. Selects the language whose rewrite set and
|
|
56
|
+
* serializer run, so in a multi-grammar workspace it decides the answer
|
|
57
|
+
* rather than merely labelling it.
|
|
58
|
+
*/
|
|
59
|
+
readonly uri: string;
|
|
60
|
+
/** Transfer-model payload, as an adopter caller would hand it to `ModelService.update`. */
|
|
61
|
+
readonly model: TTransfer;
|
|
62
|
+
/**
|
|
63
|
+
* Previous AST root threaded into every rewrite, so a diff-based rewrite can
|
|
64
|
+
* tell a real user change from a stale echo.
|
|
65
|
+
*
|
|
66
|
+
* Omit it to take the same value production takes — the current document's
|
|
67
|
+
* `parseResult.value`, or `undefined` for a document that has never been
|
|
68
|
+
* built. Pass it explicitly when the test constructs both sides itself and
|
|
69
|
+
* has no built document to read from.
|
|
70
|
+
*/
|
|
71
|
+
readonly previous?: TAst;
|
|
72
|
+
/** Honoured between rewrites, as `UpdateRewriteService.apply` honours it. */
|
|
73
|
+
readonly cancelToken?: CancellationToken;
|
|
74
|
+
}
|
|
75
|
+
/** What {@link runUpdatePipeline} produced, at both stages. */
|
|
76
|
+
export interface UpdatePipelineResult<TTransfer extends TransferElement = TransferElement> {
|
|
77
|
+
/**
|
|
78
|
+
* The model after the rewrite chain and before serialisation.
|
|
79
|
+
*
|
|
80
|
+
* Exposed rather than discarded because the chain is what drifts, and a test
|
|
81
|
+
* that can only see `text` has to assert the chain's effect THROUGH the
|
|
82
|
+
* serializer — which turns a model assertion into a substring match on the
|
|
83
|
+
* concrete syntax, sensitive to formatting that has nothing to do with the
|
|
84
|
+
* rewrite. Returning a bare string was the alternative; it is a smaller
|
|
85
|
+
* surface but it makes the precise assertion unavailable.
|
|
86
|
+
*/
|
|
87
|
+
readonly rewritten: TTransfer;
|
|
88
|
+
/** The serialized text, which is what `ModelService.update` applies to the store. */
|
|
89
|
+
readonly text: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Run the rewrite chain registered for `args.uri`'s language, then serialise
|
|
93
|
+
* the result with that language's `Serializer`.
|
|
94
|
+
*
|
|
95
|
+
* Both slots are read from the registry at call time, so a rewrite registered
|
|
96
|
+
* after this driver was written still runs.
|
|
97
|
+
*/
|
|
98
|
+
export declare function runUpdatePipeline<TTransfer extends TransferElement = TransferElement, TAst extends AstNode = AstNode>(services: ServerSharedServices, args: UpdatePipelineArgs<TTransfer, TAst>): Promise<UpdatePipelineResult<TTransfer>>;
|
|
99
|
+
//# sourceMappingURL=run-update-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-update-pipeline.d.ts","sourceRoot":"","sources":["../../src/testing/run-update-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,2CAA2C;AAC3C,MAAM,WAAW,kBAAkB,CAAC,SAAS,SAAS,eAAe,GAAG,eAAe,EAAE,IAAI,SAAS,OAAO,GAAG,OAAO;IACpH;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;IACzB,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CAC3C;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB,CAAC,SAAS,SAAS,eAAe,GAAG,eAAe;IACtF;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,SAAS,eAAe,GAAG,eAAe,EAAE,IAAI,SAAS,OAAO,GAAG,OAAO,EACxH,QAAQ,EAAE,oBAAoB,EAC9B,IAAI,EAAE,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,GACzC,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAM1C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { UriUtils } from '@hydranium/langium';
|
|
10
|
+
/**
|
|
11
|
+
* Run the rewrite chain registered for `args.uri`'s language, then serialise
|
|
12
|
+
* the result with that language's `Serializer`.
|
|
13
|
+
*
|
|
14
|
+
* Both slots are read from the registry at call time, so a rewrite registered
|
|
15
|
+
* after this driver was written still runs.
|
|
16
|
+
*/
|
|
17
|
+
export async function runUpdatePipeline(services, args) {
|
|
18
|
+
const languageServices = services.ServiceRegistry.getServices(UriUtils.toUri(args.uri));
|
|
19
|
+
const previous = args.previous ?? services.workspace.AstDocumentManager.getDocument(args.uri)?.parseResult.value;
|
|
20
|
+
const rewritten = (await languageServices.updateRewrite.UpdateRewriteService.apply(args.model, previous, args.cancelToken));
|
|
21
|
+
const text = await languageServices.serializer.Serializer.serializeTransfer(rewritten);
|
|
22
|
+
return { rewritten, text };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=run-update-pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-update-pipeline.js","sourceRoot":"","sources":["../../src/testing/run-update-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AA2ClF,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AA8C9C;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACpC,QAA8B,EAC9B,IAAyC;IAEzC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACxF,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAK,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,KAA0B,CAAC;IACvI,MAAM,SAAS,GAAG,CAAC,MAAM,gBAAgB,CAAC,aAAa,CAAC,oBAAoB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAc,CAAC;IACzI,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC9B,CAAC"}
|