@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.
Files changed (868) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +100 -0
  3. package/lib/documents/ast-document-manager.d.ts +243 -0
  4. package/lib/documents/ast-document-manager.d.ts.map +1 -0
  5. package/lib/documents/ast-document-manager.js +302 -0
  6. package/lib/documents/ast-document-manager.js.map +1 -0
  7. package/lib/documents/client-ids.d.ts +30 -0
  8. package/lib/documents/client-ids.d.ts.map +1 -0
  9. package/lib/documents/client-ids.js +30 -0
  10. package/lib/documents/client-ids.js.map +1 -0
  11. package/lib/documents/hydranium-text-documents.d.ts +490 -0
  12. package/lib/documents/hydranium-text-documents.d.ts.map +1 -0
  13. package/lib/documents/hydranium-text-documents.js +893 -0
  14. package/lib/documents/hydranium-text-documents.js.map +1 -0
  15. package/lib/documents/index.d.ts +14 -0
  16. package/lib/documents/index.d.ts.map +1 -0
  17. package/lib/documents/index.js +14 -0
  18. package/lib/documents/index.js.map +1 -0
  19. package/lib/documents/language-client-text-shadow.d.ts +101 -0
  20. package/lib/documents/language-client-text-shadow.d.ts.map +1 -0
  21. package/lib/documents/language-client-text-shadow.js +156 -0
  22. package/lib/documents/language-client-text-shadow.js.map +1 -0
  23. package/lib/documents/self-save-registry.d.ts +55 -0
  24. package/lib/documents/self-save-registry.d.ts.map +1 -0
  25. package/lib/documents/self-save-registry.js +68 -0
  26. package/lib/documents/self-save-registry.js.map +1 -0
  27. package/lib/index.d.ts +38 -0
  28. package/lib/index.d.ts.map +1 -0
  29. package/lib/index.js +39 -0
  30. package/lib/index.js.map +1 -0
  31. package/lib/langium/ast-extension/ast-extension-contribution.d.ts +33 -0
  32. package/lib/langium/ast-extension/ast-extension-contribution.d.ts.map +1 -0
  33. package/lib/langium/ast-extension/ast-extension-contribution.js +10 -0
  34. package/lib/langium/ast-extension/ast-extension-contribution.js.map +1 -0
  35. package/lib/langium/ast-extension/ast-extension-service.d.ts +212 -0
  36. package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -0
  37. package/lib/langium/ast-extension/ast-extension-service.js +181 -0
  38. package/lib/langium/ast-extension/ast-extension-service.js.map +1 -0
  39. package/lib/langium/ast-extension/ast-node-builder.d.ts +90 -0
  40. package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -0
  41. package/lib/langium/ast-extension/ast-node-builder.js +61 -0
  42. package/lib/langium/ast-extension/ast-node-builder.js.map +1 -0
  43. package/lib/langium/ast-extension/index.d.ts +12 -0
  44. package/lib/langium/ast-extension/index.d.ts.map +1 -0
  45. package/lib/langium/ast-extension/index.js +12 -0
  46. package/lib/langium/ast-extension/index.js.map +1 -0
  47. package/lib/langium/bootstrap.d.ts +224 -0
  48. package/lib/langium/bootstrap.d.ts.map +1 -0
  49. package/lib/langium/bootstrap.js +512 -0
  50. package/lib/langium/bootstrap.js.map +1 -0
  51. package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +77 -0
  52. package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -0
  53. package/lib/langium/build-phase-pass/build-phase-pass-service.js +102 -0
  54. package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -0
  55. package/lib/langium/build-phase-pass/build-phase-pass.d.ts +106 -0
  56. package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -0
  57. package/lib/langium/build-phase-pass/build-phase-pass.js +43 -0
  58. package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -0
  59. package/lib/langium/build-phase-pass/index.d.ts +11 -0
  60. package/lib/langium/build-phase-pass/index.d.ts.map +1 -0
  61. package/lib/langium/build-phase-pass/index.js +11 -0
  62. package/lib/langium/build-phase-pass/index.js.map +1 -0
  63. package/lib/langium/config/index.d.ts +10 -0
  64. package/lib/langium/config/index.d.ts.map +1 -0
  65. package/lib/langium/config/index.js +10 -0
  66. package/lib/langium/config/index.js.map +1 -0
  67. package/lib/langium/config/settings.d.ts +173 -0
  68. package/lib/langium/config/settings.d.ts.map +1 -0
  69. package/lib/langium/config/settings.js +196 -0
  70. package/lib/langium/config/settings.js.map +1 -0
  71. package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts +109 -0
  72. package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -0
  73. package/lib/langium/diagnostics/hydranium-langium-profiler.js +153 -0
  74. package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -0
  75. package/lib/langium/diagnostics/index.d.ts +14 -0
  76. package/lib/langium/diagnostics/index.d.ts.map +1 -0
  77. package/lib/langium/diagnostics/index.js +19 -0
  78. package/lib/langium/diagnostics/index.js.map +1 -0
  79. package/lib/langium/diagnostics/log-file-token.d.ts +16 -0
  80. package/lib/langium/diagnostics/log-file-token.d.ts.map +1 -0
  81. package/lib/langium/diagnostics/log-file-token.js +25 -0
  82. package/lib/langium/diagnostics/log-file-token.js.map +1 -0
  83. package/lib/langium/diagnostics/log-preamble.d.ts +42 -0
  84. package/lib/langium/diagnostics/log-preamble.d.ts.map +1 -0
  85. package/lib/langium/diagnostics/log-preamble.js +57 -0
  86. package/lib/langium/diagnostics/log-preamble.js.map +1 -0
  87. package/lib/langium/diagnostics/logger.d.ts +104 -0
  88. package/lib/langium/diagnostics/logger.d.ts.map +1 -0
  89. package/lib/langium/diagnostics/logger.js +178 -0
  90. package/lib/langium/diagnostics/logger.js.map +1 -0
  91. package/lib/langium/diagnostics/lsp-logger.d.ts +76 -0
  92. package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -0
  93. package/lib/langium/diagnostics/lsp-logger.js +223 -0
  94. package/lib/langium/diagnostics/lsp-logger.js.map +1 -0
  95. package/lib/langium/diagnostics/server-tracer.d.ts +27 -0
  96. package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -0
  97. package/lib/langium/diagnostics/server-tracer.js +66 -0
  98. package/lib/langium/diagnostics/server-tracer.js.map +1 -0
  99. package/lib/langium/document-builder/build-pipeline-integration.d.ts +88 -0
  100. package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -0
  101. package/lib/langium/document-builder/build-pipeline-integration.js +151 -0
  102. package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -0
  103. package/lib/langium/document-builder/document-builder.d.ts +405 -0
  104. package/lib/langium/document-builder/document-builder.d.ts.map +1 -0
  105. package/lib/langium/document-builder/document-builder.js +729 -0
  106. package/lib/langium/document-builder/document-builder.js.map +1 -0
  107. package/lib/langium/document-builder/index.d.ts +12 -0
  108. package/lib/langium/document-builder/index.d.ts.map +1 -0
  109. package/lib/langium/document-builder/index.js +12 -0
  110. package/lib/langium/document-builder/index.js.map +1 -0
  111. package/lib/langium/document-builder/labeled-phase-listener.d.ts +21 -0
  112. package/lib/langium/document-builder/labeled-phase-listener.d.ts.map +1 -0
  113. package/lib/langium/document-builder/labeled-phase-listener.js +15 -0
  114. package/lib/langium/document-builder/labeled-phase-listener.js.map +1 -0
  115. package/lib/langium/documentation/comment-provider.d.ts +31 -0
  116. package/lib/langium/documentation/comment-provider.d.ts.map +1 -0
  117. package/lib/langium/documentation/comment-provider.js +36 -0
  118. package/lib/langium/documentation/comment-provider.js.map +1 -0
  119. package/lib/langium/documentation/index.d.ts +10 -0
  120. package/lib/langium/documentation/index.d.ts.map +1 -0
  121. package/lib/langium/documentation/index.js +10 -0
  122. package/lib/langium/documentation/index.js.map +1 -0
  123. package/lib/langium/integration-services.d.ts +200 -0
  124. package/lib/langium/integration-services.d.ts.map +1 -0
  125. package/lib/langium/integration-services.js +65 -0
  126. package/lib/langium/integration-services.js.map +1 -0
  127. package/lib/langium/integrity/index.d.ts +12 -0
  128. package/lib/langium/integrity/index.d.ts.map +1 -0
  129. package/lib/langium/integrity/index.js +12 -0
  130. package/lib/langium/integrity/index.js.map +1 -0
  131. package/lib/langium/integrity/integrity-contribution.d.ts +42 -0
  132. package/lib/langium/integrity/integrity-contribution.d.ts.map +1 -0
  133. package/lib/langium/integrity/integrity-contribution.js +10 -0
  134. package/lib/langium/integrity/integrity-contribution.js.map +1 -0
  135. package/lib/langium/integrity/integrity-rule.d.ts +82 -0
  136. package/lib/langium/integrity/integrity-rule.d.ts.map +1 -0
  137. package/lib/langium/integrity/integrity-rule.js +52 -0
  138. package/lib/langium/integrity/integrity-rule.js.map +1 -0
  139. package/lib/langium/integrity/integrity-service.d.ts +221 -0
  140. package/lib/langium/integrity/integrity-service.d.ts.map +1 -0
  141. package/lib/langium/integrity/integrity-service.js +328 -0
  142. package/lib/langium/integrity/integrity-service.js.map +1 -0
  143. package/lib/langium/keys/default-element-key-provider.d.ts +19 -0
  144. package/lib/langium/keys/default-element-key-provider.d.ts.map +1 -0
  145. package/lib/langium/keys/default-element-key-provider.js +18 -0
  146. package/lib/langium/keys/default-element-key-provider.js.map +1 -0
  147. package/lib/langium/keys/element-key-provider.d.ts +106 -0
  148. package/lib/langium/keys/element-key-provider.d.ts.map +1 -0
  149. package/lib/langium/keys/element-key-provider.js +25 -0
  150. package/lib/langium/keys/element-key-provider.js.map +1 -0
  151. package/lib/langium/keys/index.d.ts +13 -0
  152. package/lib/langium/keys/index.d.ts.map +1 -0
  153. package/lib/langium/keys/index.js +13 -0
  154. package/lib/langium/keys/index.js.map +1 -0
  155. package/lib/langium/keys/name-based-key-provider.d.ts +99 -0
  156. package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -0
  157. package/lib/langium/keys/name-based-key-provider.js +134 -0
  158. package/lib/langium/keys/name-based-key-provider.js.map +1 -0
  159. package/lib/langium/keys/positional-key-provider.d.ts +41 -0
  160. package/lib/langium/keys/positional-key-provider.d.ts.map +1 -0
  161. package/lib/langium/keys/positional-key-provider.js +48 -0
  162. package/lib/langium/keys/positional-key-provider.js.map +1 -0
  163. package/lib/langium/labeling/index.d.ts +10 -0
  164. package/lib/langium/labeling/index.d.ts.map +1 -0
  165. package/lib/langium/labeling/index.js +10 -0
  166. package/lib/langium/labeling/index.js.map +1 -0
  167. package/lib/langium/labeling/label-provider.d.ts +79 -0
  168. package/lib/langium/labeling/label-provider.d.ts.map +1 -0
  169. package/lib/langium/labeling/label-provider.js +44 -0
  170. package/lib/langium/labeling/label-provider.js.map +1 -0
  171. package/lib/langium/language-module.d.ts +281 -0
  172. package/lib/langium/language-module.d.ts.map +1 -0
  173. package/lib/langium/language-module.js +103 -0
  174. package/lib/langium/language-module.js.map +1 -0
  175. package/lib/langium/language-types.d.ts +85 -0
  176. package/lib/langium/language-types.d.ts.map +1 -0
  177. package/lib/langium/language-types.js +173 -0
  178. package/lib/langium/language-types.js.map +1 -0
  179. package/lib/langium/model-service/index.d.ts +10 -0
  180. package/lib/langium/model-service/index.d.ts.map +1 -0
  181. package/lib/langium/model-service/index.js +10 -0
  182. package/lib/langium/model-service/index.js.map +1 -0
  183. package/lib/langium/model-service/model-service.d.ts +598 -0
  184. package/lib/langium/model-service/model-service.d.ts.map +1 -0
  185. package/lib/langium/model-service/model-service.js +889 -0
  186. package/lib/langium/model-service/model-service.js.map +1 -0
  187. package/lib/langium/module.d.ts +308 -0
  188. package/lib/langium/module.d.ts.map +1 -0
  189. package/lib/langium/module.js +165 -0
  190. package/lib/langium/module.js.map +1 -0
  191. package/lib/langium/naming/index.d.ts +11 -0
  192. package/lib/langium/naming/index.d.ts.map +1 -0
  193. package/lib/langium/naming/index.js +11 -0
  194. package/lib/langium/naming/index.js.map +1 -0
  195. package/lib/langium/naming/name-provider.d.ts +360 -0
  196. package/lib/langium/naming/name-provider.d.ts.map +1 -0
  197. package/lib/langium/naming/name-provider.js +240 -0
  198. package/lib/langium/naming/name-provider.js.map +1 -0
  199. package/lib/langium/naming/name-separator-validation.d.ts +47 -0
  200. package/lib/langium/naming/name-separator-validation.d.ts.map +1 -0
  201. package/lib/langium/naming/name-separator-validation.js +61 -0
  202. package/lib/langium/naming/name-separator-validation.js.map +1 -0
  203. package/lib/langium/project/abstract-project-manager.d.ts +242 -0
  204. package/lib/langium/project/abstract-project-manager.d.ts.map +1 -0
  205. package/lib/langium/project/abstract-project-manager.js +545 -0
  206. package/lib/langium/project/abstract-project-manager.js.map +1 -0
  207. package/lib/langium/project/index.d.ts +13 -0
  208. package/lib/langium/project/index.d.ts.map +1 -0
  209. package/lib/langium/project/index.js +13 -0
  210. package/lib/langium/project/index.js.map +1 -0
  211. package/lib/langium/project/project-change-event.d.ts +64 -0
  212. package/lib/langium/project/project-change-event.d.ts.map +1 -0
  213. package/lib/langium/project/project-change-event.js +10 -0
  214. package/lib/langium/project/project-change-event.js.map +1 -0
  215. package/lib/langium/project/project-manager.d.ts +196 -0
  216. package/lib/langium/project/project-manager.d.ts.map +1 -0
  217. package/lib/langium/project/project-manager.js +10 -0
  218. package/lib/langium/project/project-manager.js.map +1 -0
  219. package/lib/langium/project/single-project-manager.d.ts +69 -0
  220. package/lib/langium/project/single-project-manager.d.ts.map +1 -0
  221. package/lib/langium/project/single-project-manager.js +104 -0
  222. package/lib/langium/project/single-project-manager.js.map +1 -0
  223. package/lib/langium/residency/cst-residency-service.d.ts +214 -0
  224. package/lib/langium/residency/cst-residency-service.d.ts.map +1 -0
  225. package/lib/langium/residency/cst-residency-service.js +349 -0
  226. package/lib/langium/residency/cst-residency-service.js.map +1 -0
  227. package/lib/langium/residency/index.d.ts +10 -0
  228. package/lib/langium/residency/index.d.ts.map +1 -0
  229. package/lib/langium/residency/index.js +10 -0
  230. package/lib/langium/residency/index.js.map +1 -0
  231. package/lib/langium/scope/ast-node-description-provider.d.ts +122 -0
  232. package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -0
  233. package/lib/langium/scope/ast-node-description-provider.js +115 -0
  234. package/lib/langium/scope/ast-node-description-provider.js.map +1 -0
  235. package/lib/langium/scope/hydranium-scope-computation.d.ts +163 -0
  236. package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -0
  237. package/lib/langium/scope/hydranium-scope-computation.js +220 -0
  238. package/lib/langium/scope/hydranium-scope-computation.js.map +1 -0
  239. package/lib/langium/scope/hydranium-scope-provider.d.ts +411 -0
  240. package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -0
  241. package/lib/langium/scope/hydranium-scope-provider.js +543 -0
  242. package/lib/langium/scope/hydranium-scope-provider.js.map +1 -0
  243. package/lib/langium/scope/index.d.ts +18 -0
  244. package/lib/langium/scope/index.d.ts.map +1 -0
  245. package/lib/langium/scope/index.js +18 -0
  246. package/lib/langium/scope/index.js.map +1 -0
  247. package/lib/langium/scope/reference-builder.d.ts +125 -0
  248. package/lib/langium/scope/reference-builder.d.ts.map +1 -0
  249. package/lib/langium/scope/reference-builder.js +115 -0
  250. package/lib/langium/scope/reference-builder.js.map +1 -0
  251. package/lib/langium/scope/reference-candidate-provider.d.ts +228 -0
  252. package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -0
  253. package/lib/langium/scope/reference-candidate-provider.js +185 -0
  254. package/lib/langium/scope/reference-candidate-provider.js.map +1 -0
  255. package/lib/langium/scope/scope-extension-contribution.d.ts +32 -0
  256. package/lib/langium/scope/scope-extension-contribution.d.ts.map +1 -0
  257. package/lib/langium/scope/scope-extension-contribution.js +10 -0
  258. package/lib/langium/scope/scope-extension-contribution.js.map +1 -0
  259. package/lib/langium/scope/scope-extension-service.d.ts +149 -0
  260. package/lib/langium/scope/scope-extension-service.d.ts.map +1 -0
  261. package/lib/langium/scope/scope-extension-service.js +94 -0
  262. package/lib/langium/scope/scope-extension-service.js.map +1 -0
  263. package/lib/langium/scope/scoped-ast-node-description.d.ts +160 -0
  264. package/lib/langium/scope/scoped-ast-node-description.d.ts.map +1 -0
  265. package/lib/langium/scope/scoped-ast-node-description.js +98 -0
  266. package/lib/langium/scope/scoped-ast-node-description.js.map +1 -0
  267. package/lib/langium/scope/tier-specificity.d.ts +47 -0
  268. package/lib/langium/scope/tier-specificity.d.ts.map +1 -0
  269. package/lib/langium/scope/tier-specificity.js +83 -0
  270. package/lib/langium/scope/tier-specificity.js.map +1 -0
  271. package/lib/langium/serialization/abstract-serializer.d.ts +316 -0
  272. package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -0
  273. package/lib/langium/serialization/abstract-serializer.js +351 -0
  274. package/lib/langium/serialization/abstract-serializer.js.map +1 -0
  275. package/lib/langium/serialization/index.d.ts +14 -0
  276. package/lib/langium/serialization/index.d.ts.map +1 -0
  277. package/lib/langium/serialization/index.js +14 -0
  278. package/lib/langium/serialization/index.js.map +1 -0
  279. package/lib/langium/serialization/json-serializer.d.ts +106 -0
  280. package/lib/langium/serialization/json-serializer.d.ts.map +1 -0
  281. package/lib/langium/serialization/json-serializer.js +198 -0
  282. package/lib/langium/serialization/json-serializer.js.map +1 -0
  283. package/lib/langium/serialization/serialization-util.d.ts +29 -0
  284. package/lib/langium/serialization/serialization-util.d.ts.map +1 -0
  285. package/lib/langium/serialization/serialization-util.js +37 -0
  286. package/lib/langium/serialization/serialization-util.js.map +1 -0
  287. package/lib/langium/serialization/serializer.d.ts +66 -0
  288. package/lib/langium/serialization/serializer.d.ts.map +1 -0
  289. package/lib/langium/serialization/serializer.js +10 -0
  290. package/lib/langium/serialization/serializer.js.map +1 -0
  291. package/lib/langium/serialization/yaml-serializer.d.ts +166 -0
  292. package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -0
  293. package/lib/langium/serialization/yaml-serializer.js +228 -0
  294. package/lib/langium/serialization/yaml-serializer.js.map +1 -0
  295. package/lib/langium/service-registry.d.ts +220 -0
  296. package/lib/langium/service-registry.d.ts.map +1 -0
  297. package/lib/langium/service-registry.js +258 -0
  298. package/lib/langium/service-registry.js.map +1 -0
  299. package/lib/langium/shared-services.d.ts +98 -0
  300. package/lib/langium/shared-services.d.ts.map +1 -0
  301. package/lib/langium/shared-services.js +30 -0
  302. package/lib/langium/shared-services.js.map +1 -0
  303. package/lib/langium/transfer/index.d.ts +10 -0
  304. package/lib/langium/transfer/index.d.ts.map +1 -0
  305. package/lib/langium/transfer/index.js +10 -0
  306. package/lib/langium/transfer/index.js.map +1 -0
  307. package/lib/langium/transfer/transfer-encoder.d.ts +294 -0
  308. package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -0
  309. package/lib/langium/transfer/transfer-encoder.js +328 -0
  310. package/lib/langium/transfer/transfer-encoder.js.map +1 -0
  311. package/lib/langium/update-rewrite/index.d.ts +14 -0
  312. package/lib/langium/update-rewrite/index.d.ts.map +1 -0
  313. package/lib/langium/update-rewrite/index.js +14 -0
  314. package/lib/langium/update-rewrite/index.js.map +1 -0
  315. package/lib/langium/update-rewrite/normalize-empty-strings.d.ts +52 -0
  316. package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -0
  317. package/lib/langium/update-rewrite/normalize-empty-strings.js +83 -0
  318. package/lib/langium/update-rewrite/normalize-empty-strings.js.map +1 -0
  319. package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts +37 -0
  320. package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts.map +1 -0
  321. package/lib/langium/update-rewrite/semantic-root-rewrite.js +51 -0
  322. package/lib/langium/update-rewrite/semantic-root-rewrite.js.map +1 -0
  323. package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts +42 -0
  324. package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts.map +1 -0
  325. package/lib/langium/update-rewrite/update-rewrite-contribution.js +10 -0
  326. package/lib/langium/update-rewrite/update-rewrite-contribution.js.map +1 -0
  327. package/lib/langium/update-rewrite/update-rewrite-service.d.ts +89 -0
  328. package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -0
  329. package/lib/langium/update-rewrite/update-rewrite-service.js +75 -0
  330. package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -0
  331. package/lib/langium/update-rewrite/update-rewrite.d.ts +59 -0
  332. package/lib/langium/update-rewrite/update-rewrite.d.ts.map +1 -0
  333. package/lib/langium/update-rewrite/update-rewrite.js +10 -0
  334. package/lib/langium/update-rewrite/update-rewrite.js.map +1 -0
  335. package/lib/langium/validation/document-validator.d.ts +106 -0
  336. package/lib/langium/validation/document-validator.d.ts.map +1 -0
  337. package/lib/langium/validation/document-validator.js +118 -0
  338. package/lib/langium/validation/document-validator.js.map +1 -0
  339. package/lib/langium/validation/index.d.ts +12 -0
  340. package/lib/langium/validation/index.d.ts.map +1 -0
  341. package/lib/langium/validation/index.js +12 -0
  342. package/lib/langium/validation/index.js.map +1 -0
  343. package/lib/langium/validation/validation-contribution-collector.d.ts +34 -0
  344. package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -0
  345. package/lib/langium/validation/validation-contribution-collector.js +51 -0
  346. package/lib/langium/validation/validation-contribution-collector.js.map +1 -0
  347. package/lib/langium/validation/validation-contribution.d.ts +36 -0
  348. package/lib/langium/validation/validation-contribution.d.ts.map +1 -0
  349. package/lib/langium/validation/validation-contribution.js +10 -0
  350. package/lib/langium/validation/validation-contribution.js.map +1 -0
  351. package/lib/langium/workspace/additional-document-contribution.d.ts +68 -0
  352. package/lib/langium/workspace/additional-document-contribution.d.ts.map +1 -0
  353. package/lib/langium/workspace/additional-document-contribution.js +23 -0
  354. package/lib/langium/workspace/additional-document-contribution.js.map +1 -0
  355. package/lib/langium/workspace/document-uri-policy.d.ts +151 -0
  356. package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -0
  357. package/lib/langium/workspace/document-uri-policy.js +121 -0
  358. package/lib/langium/workspace/document-uri-policy.js.map +1 -0
  359. package/lib/langium/workspace/file-system-provider.d.ts +30 -0
  360. package/lib/langium/workspace/file-system-provider.d.ts.map +1 -0
  361. package/lib/langium/workspace/file-system-provider.js +41 -0
  362. package/lib/langium/workspace/file-system-provider.js.map +1 -0
  363. package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +45 -0
  364. package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -0
  365. package/lib/langium/workspace/hydranium-langium-document-factory.js +64 -0
  366. package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -0
  367. package/lib/langium/workspace/hydranium-workspace-lock.d.ts +31 -0
  368. package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -0
  369. package/lib/langium/workspace/hydranium-workspace-lock.js +33 -0
  370. package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -0
  371. package/lib/langium/workspace/hydranium-workspace-manager.d.ts +232 -0
  372. package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -0
  373. package/lib/langium/workspace/hydranium-workspace-manager.js +368 -0
  374. package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -0
  375. package/lib/langium/workspace/in-memory-file-system-provider.d.ts +127 -0
  376. package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -0
  377. package/lib/langium/workspace/in-memory-file-system-provider.js +195 -0
  378. package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -0
  379. package/lib/langium/workspace/index-manager.d.ts +142 -0
  380. package/lib/langium/workspace/index-manager.d.ts.map +1 -0
  381. package/lib/langium/workspace/index-manager.js +245 -0
  382. package/lib/langium/workspace/index-manager.js.map +1 -0
  383. package/lib/langium/workspace/index.d.ts +23 -0
  384. package/lib/langium/workspace/index.d.ts.map +1 -0
  385. package/lib/langium/workspace/index.js +23 -0
  386. package/lib/langium/workspace/index.js.map +1 -0
  387. package/lib/langium/workspace/initialize-workspace.d.ts +63 -0
  388. package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -0
  389. package/lib/langium/workspace/initialize-workspace.js +88 -0
  390. package/lib/langium/workspace/initialize-workspace.js.map +1 -0
  391. package/lib/langium/workspace/langium-documents.d.ts +47 -0
  392. package/lib/langium/workspace/langium-documents.d.ts.map +1 -0
  393. package/lib/langium/workspace/langium-documents.js +85 -0
  394. package/lib/langium/workspace/langium-documents.js.map +1 -0
  395. package/lib/langium/workspace/persistent-file-system-provider.d.ts +207 -0
  396. package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -0
  397. package/lib/langium/workspace/persistent-file-system-provider.js +208 -0
  398. package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -0
  399. package/lib/langium/workspace/synthetic.d.ts +38 -0
  400. package/lib/langium/workspace/synthetic.d.ts.map +1 -0
  401. package/lib/langium/workspace/synthetic.js +58 -0
  402. package/lib/langium/workspace/synthetic.js.map +1 -0
  403. package/lib/langium/workspace/virtual-document.d.ts +78 -0
  404. package/lib/langium/workspace/virtual-document.d.ts.map +1 -0
  405. package/lib/langium/workspace/virtual-document.js +89 -0
  406. package/lib/langium/workspace/virtual-document.js.map +1 -0
  407. package/lib/langium/workspace/write-lock-scope.d.ts +69 -0
  408. package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -0
  409. package/lib/langium/workspace/write-lock-scope.js +54 -0
  410. package/lib/langium/workspace/write-lock-scope.js.map +1 -0
  411. package/lib/launcher/index.d.ts +10 -0
  412. package/lib/launcher/index.d.ts.map +1 -0
  413. package/lib/launcher/index.js +12 -0
  414. package/lib/launcher/index.js.map +1 -0
  415. package/lib/launcher/integrated-server.d.ts +28 -0
  416. package/lib/launcher/integrated-server.d.ts.map +1 -0
  417. package/lib/launcher/integrated-server.js +10 -0
  418. package/lib/launcher/integrated-server.js.map +1 -0
  419. package/lib/lsp/completion/hydranium-completion-provider.d.ts +89 -0
  420. package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -0
  421. package/lib/lsp/completion/hydranium-completion-provider.js +123 -0
  422. package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -0
  423. package/lib/lsp/hydranium-document-update-handler.d.ts +204 -0
  424. package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -0
  425. package/lib/lsp/hydranium-document-update-handler.js +288 -0
  426. package/lib/lsp/hydranium-document-update-handler.js.map +1 -0
  427. package/lib/lsp/index.d.ts +23 -0
  428. package/lib/lsp/index.d.ts.map +1 -0
  429. package/lib/lsp/index.js +23 -0
  430. package/lib/lsp/index.js.map +1 -0
  431. package/lib/lsp/instrument-connection.d.ts +36 -0
  432. package/lib/lsp/instrument-connection.d.ts.map +1 -0
  433. package/lib/lsp/instrument-connection.js +62 -0
  434. package/lib/lsp/instrument-connection.js.map +1 -0
  435. package/lib/lsp/language-module.d.ts +53 -0
  436. package/lib/lsp/language-module.d.ts.map +1 -0
  437. package/lib/lsp/language-module.js +28 -0
  438. package/lib/lsp/language-module.js.map +1 -0
  439. package/lib/lsp/semantic-token-provider.d.ts +131 -0
  440. package/lib/lsp/semantic-token-provider.d.ts.map +1 -0
  441. package/lib/lsp/semantic-token-provider.js +148 -0
  442. package/lib/lsp/semantic-token-provider.js.map +1 -0
  443. package/lib/lsp/shared-module.d.ts +76 -0
  444. package/lib/lsp/shared-module.d.ts.map +1 -0
  445. package/lib/lsp/shared-module.js +33 -0
  446. package/lib/lsp/shared-module.js.map +1 -0
  447. package/lib/lsp/start-language-server.d.ts +43 -0
  448. package/lib/lsp/start-language-server.d.ts.map +1 -0
  449. package/lib/lsp/start-language-server.js +60 -0
  450. package/lib/lsp/start-language-server.js.map +1 -0
  451. package/lib/node/ast-ground-truth.d.ts +57 -0
  452. package/lib/node/ast-ground-truth.d.ts.map +1 -0
  453. package/lib/node/ast-ground-truth.js +46 -0
  454. package/lib/node/ast-ground-truth.js.map +1 -0
  455. package/lib/node/event-loop-monitor.d.ts +40 -0
  456. package/lib/node/event-loop-monitor.d.ts.map +1 -0
  457. package/lib/node/event-loop-monitor.js +62 -0
  458. package/lib/node/event-loop-monitor.js.map +1 -0
  459. package/lib/node/index.d.ts +29 -0
  460. package/lib/node/index.d.ts.map +1 -0
  461. package/lib/node/index.js +50 -0
  462. package/lib/node/index.js.map +1 -0
  463. package/lib/node/latency-from-env.d.ts +32 -0
  464. package/lib/node/latency-from-env.d.ts.map +1 -0
  465. package/lib/node/latency-from-env.js +36 -0
  466. package/lib/node/latency-from-env.js.map +1 -0
  467. package/lib/node/lint-grammar.d.ts +87 -0
  468. package/lib/node/lint-grammar.d.ts.map +1 -0
  469. package/lib/node/lint-grammar.js +124 -0
  470. package/lib/node/lint-grammar.js.map +1 -0
  471. package/lib/node/log-file-sink.d.ts +22 -0
  472. package/lib/node/log-file-sink.d.ts.map +1 -0
  473. package/lib/node/log-file-sink.js +43 -0
  474. package/lib/node/log-file-sink.js.map +1 -0
  475. package/lib/node/log-preamble-node.d.ts +28 -0
  476. package/lib/node/log-preamble-node.d.ts.map +1 -0
  477. package/lib/node/log-preamble-node.js +55 -0
  478. package/lib/node/log-preamble-node.js.map +1 -0
  479. package/lib/node/measure-memory.d.ts +86 -0
  480. package/lib/node/measure-memory.d.ts.map +1 -0
  481. package/lib/node/measure-memory.js +128 -0
  482. package/lib/node/measure-memory.js.map +1 -0
  483. package/lib/node/memory-monitor.d.ts +42 -0
  484. package/lib/node/memory-monitor.d.ts.map +1 -0
  485. package/lib/node/memory-monitor.js +83 -0
  486. package/lib/node/memory-monitor.js.map +1 -0
  487. package/lib/node/node-file-system-provider.d.ts +112 -0
  488. package/lib/node/node-file-system-provider.d.ts.map +1 -0
  489. package/lib/node/node-file-system-provider.js +230 -0
  490. package/lib/node/node-file-system-provider.js.map +1 -0
  491. package/lib/node/process-memory.d.ts +66 -0
  492. package/lib/node/process-memory.d.ts.map +1 -0
  493. package/lib/node/process-memory.js +252 -0
  494. package/lib/node/process-memory.js.map +1 -0
  495. package/lib/node/profile-capture.d.ts +118 -0
  496. package/lib/node/profile-capture.d.ts.map +1 -0
  497. package/lib/node/profile-capture.js +315 -0
  498. package/lib/node/profile-capture.js.map +1 -0
  499. package/lib/node/profile-digest.d.ts +49 -0
  500. package/lib/node/profile-digest.d.ts.map +1 -0
  501. package/lib/node/profile-digest.js +74 -0
  502. package/lib/node/profile-digest.js.map +1 -0
  503. package/lib/node/profiling-run.d.ts +80 -0
  504. package/lib/node/profiling-run.d.ts.map +1 -0
  505. package/lib/node/profiling-run.js +183 -0
  506. package/lib/node/profiling-run.js.map +1 -0
  507. package/lib/node/reflect-grammar.d.ts +109 -0
  508. package/lib/node/reflect-grammar.d.ts.map +1 -0
  509. package/lib/node/reflect-grammar.js +96 -0
  510. package/lib/node/reflect-grammar.js.map +1 -0
  511. package/lib/node/server-diagnostics.d.ts +43 -0
  512. package/lib/node/server-diagnostics.d.ts.map +1 -0
  513. package/lib/node/server-diagnostics.js +46 -0
  514. package/lib/node/server-diagnostics.js.map +1 -0
  515. package/lib/node/server-state-snapshot.d.ts +48 -0
  516. package/lib/node/server-state-snapshot.d.ts.map +1 -0
  517. package/lib/node/server-state-snapshot.js +139 -0
  518. package/lib/node/server-state-snapshot.js.map +1 -0
  519. package/lib/node/socket-launcher.d.ts +106 -0
  520. package/lib/node/socket-launcher.d.ts.map +1 -0
  521. package/lib/node/socket-launcher.js +138 -0
  522. package/lib/node/socket-launcher.js.map +1 -0
  523. package/lib/node/stdio-launcher.d.ts +88 -0
  524. package/lib/node/stdio-launcher.d.ts.map +1 -0
  525. package/lib/node/stdio-launcher.js +83 -0
  526. package/lib/node/stdio-launcher.js.map +1 -0
  527. package/lib/node/validate-workspace.d.ts +80 -0
  528. package/lib/node/validate-workspace.d.ts.map +1 -0
  529. package/lib/node/validate-workspace.js +72 -0
  530. package/lib/node/validate-workspace.js.map +1 -0
  531. package/lib/node/write-lock-scope-node.d.ts +27 -0
  532. package/lib/node/write-lock-scope-node.d.ts.map +1 -0
  533. package/lib/node/write-lock-scope-node.js +38 -0
  534. package/lib/node/write-lock-scope-node.js.map +1 -0
  535. package/lib/testing/ast-snapshot.d.ts +38 -0
  536. package/lib/testing/ast-snapshot.d.ts.map +1 -0
  537. package/lib/testing/ast-snapshot.js +78 -0
  538. package/lib/testing/ast-snapshot.js.map +1 -0
  539. package/lib/testing/document-uri-policy-conformance.d.ts +65 -0
  540. package/lib/testing/document-uri-policy-conformance.d.ts.map +1 -0
  541. package/lib/testing/document-uri-policy-conformance.js +69 -0
  542. package/lib/testing/document-uri-policy-conformance.js.map +1 -0
  543. package/lib/testing/fake-description.d.ts +35 -0
  544. package/lib/testing/fake-description.d.ts.map +1 -0
  545. package/lib/testing/fake-description.js +38 -0
  546. package/lib/testing/fake-description.js.map +1 -0
  547. package/lib/testing/fake-document.d.ts +71 -0
  548. package/lib/testing/fake-document.d.ts.map +1 -0
  549. package/lib/testing/fake-document.js +85 -0
  550. package/lib/testing/fake-document.js.map +1 -0
  551. package/lib/testing/fake-reflection.d.ts +29 -0
  552. package/lib/testing/fake-reflection.d.ts.map +1 -0
  553. package/lib/testing/fake-reflection.js +30 -0
  554. package/lib/testing/fake-reflection.js.map +1 -0
  555. package/lib/testing/index.d.ts +44 -0
  556. package/lib/testing/index.d.ts.map +1 -0
  557. package/lib/testing/index.js +44 -0
  558. package/lib/testing/index.js.map +1 -0
  559. package/lib/testing/langium-test-helpers.d.ts +26 -0
  560. package/lib/testing/langium-test-helpers.d.ts.map +1 -0
  561. package/lib/testing/langium-test-helpers.js +26 -0
  562. package/lib/testing/langium-test-helpers.js.map +1 -0
  563. package/lib/testing/make-noop-language-services.d.ts +39 -0
  564. package/lib/testing/make-noop-language-services.d.ts.map +1 -0
  565. package/lib/testing/make-noop-language-services.js +30 -0
  566. package/lib/testing/make-noop-language-services.js.map +1 -0
  567. package/lib/testing/make-noop-shared-services.d.ts +61 -0
  568. package/lib/testing/make-noop-shared-services.d.ts.map +1 -0
  569. package/lib/testing/make-noop-shared-services.js +49 -0
  570. package/lib/testing/make-noop-shared-services.js.map +1 -0
  571. package/lib/testing/make-test-services.d.ts +217 -0
  572. package/lib/testing/make-test-services.d.ts.map +1 -0
  573. package/lib/testing/make-test-services.js +128 -0
  574. package/lib/testing/make-test-services.js.map +1 -0
  575. package/lib/testing/make-test-tracer.d.ts +67 -0
  576. package/lib/testing/make-test-tracer.d.ts.map +1 -0
  577. package/lib/testing/make-test-tracer.js +68 -0
  578. package/lib/testing/make-test-tracer.js.map +1 -0
  579. package/lib/testing/node/generated-workspace.d.ts +95 -0
  580. package/lib/testing/node/generated-workspace.d.ts.map +1 -0
  581. package/lib/testing/node/generated-workspace.js +134 -0
  582. package/lib/testing/node/generated-workspace.js.map +1 -0
  583. package/lib/testing/node/golden-corpus.d.ts +50 -0
  584. package/lib/testing/node/golden-corpus.d.ts.map +1 -0
  585. package/lib/testing/node/golden-corpus.js +80 -0
  586. package/lib/testing/node/golden-corpus.js.map +1 -0
  587. package/lib/testing/node/index.d.ts +28 -0
  588. package/lib/testing/node/index.d.ts.map +1 -0
  589. package/lib/testing/node/index.js +28 -0
  590. package/lib/testing/node/index.js.map +1 -0
  591. package/lib/testing/node/lsp-harness.d.ts +139 -0
  592. package/lib/testing/node/lsp-harness.d.ts.map +1 -0
  593. package/lib/testing/node/lsp-harness.js +119 -0
  594. package/lib/testing/node/lsp-harness.js.map +1 -0
  595. package/lib/testing/node/lsp-server-connection.d.ts +232 -0
  596. package/lib/testing/node/lsp-server-connection.d.ts.map +1 -0
  597. package/lib/testing/node/lsp-server-connection.js +304 -0
  598. package/lib/testing/node/lsp-server-connection.js.map +1 -0
  599. package/lib/testing/node/scratch-workspace.d.ts +60 -0
  600. package/lib/testing/node/scratch-workspace.d.ts.map +1 -0
  601. package/lib/testing/node/scratch-workspace.js +87 -0
  602. package/lib/testing/node/scratch-workspace.js.map +1 -0
  603. package/lib/testing/node/spawned-server.d.ts +170 -0
  604. package/lib/testing/node/spawned-server.d.ts.map +1 -0
  605. package/lib/testing/node/spawned-server.js +265 -0
  606. package/lib/testing/node/spawned-server.js.map +1 -0
  607. package/lib/testing/parse-semantic-root.d.ts +83 -0
  608. package/lib/testing/parse-semantic-root.d.ts.map +1 -0
  609. package/lib/testing/parse-semantic-root.js +119 -0
  610. package/lib/testing/parse-semantic-root.js.map +1 -0
  611. package/lib/testing/playwright/browser-capture-bridge.d.ts +80 -0
  612. package/lib/testing/playwright/browser-capture-bridge.d.ts.map +1 -0
  613. package/lib/testing/playwright/browser-capture-bridge.js +161 -0
  614. package/lib/testing/playwright/browser-capture-bridge.js.map +1 -0
  615. package/lib/testing/playwright/e2e-profiling.d.ts +132 -0
  616. package/lib/testing/playwright/e2e-profiling.d.ts.map +1 -0
  617. package/lib/testing/playwright/e2e-profiling.js +270 -0
  618. package/lib/testing/playwright/e2e-profiling.js.map +1 -0
  619. package/lib/testing/playwright/index.d.ts +13 -0
  620. package/lib/testing/playwright/index.d.ts.map +1 -0
  621. package/lib/testing/playwright/index.js +16 -0
  622. package/lib/testing/playwright/index.js.map +1 -0
  623. package/lib/testing/playwright/server-log-capture.d.ts +230 -0
  624. package/lib/testing/playwright/server-log-capture.d.ts.map +1 -0
  625. package/lib/testing/playwright/server-log-capture.js +336 -0
  626. package/lib/testing/playwright/server-log-capture.js.map +1 -0
  627. package/lib/testing/playwright/server-log-fixture.d.ts +36 -0
  628. package/lib/testing/playwright/server-log-fixture.d.ts.map +1 -0
  629. package/lib/testing/playwright/server-log-fixture.js +38 -0
  630. package/lib/testing/playwright/server-log-fixture.js.map +1 -0
  631. package/lib/testing/playwright/server-log-rename-reporter.d.ts +22 -0
  632. package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -0
  633. package/lib/testing/playwright/server-log-rename-reporter.js +26 -0
  634. package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -0
  635. package/lib/testing/run-update-pipeline.d.ts +99 -0
  636. package/lib/testing/run-update-pipeline.d.ts.map +1 -0
  637. package/lib/testing/run-update-pipeline.js +24 -0
  638. package/lib/testing/run-update-pipeline.js.map +1 -0
  639. package/lib/testing/stub-ast-document-manager.d.ts +82 -0
  640. package/lib/testing/stub-ast-document-manager.d.ts.map +1 -0
  641. package/lib/testing/stub-ast-document-manager.js +125 -0
  642. package/lib/testing/stub-ast-document-manager.js.map +1 -0
  643. package/lib/testing/stub-document-builder.d.ts +99 -0
  644. package/lib/testing/stub-document-builder.d.ts.map +1 -0
  645. package/lib/testing/stub-document-builder.js +142 -0
  646. package/lib/testing/stub-document-builder.js.map +1 -0
  647. package/lib/testing/stub-hydranium-text-documents.d.ts +125 -0
  648. package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -0
  649. package/lib/testing/stub-hydranium-text-documents.js +164 -0
  650. package/lib/testing/stub-hydranium-text-documents.js.map +1 -0
  651. package/lib/testing/stub-index-manager.d.ts +40 -0
  652. package/lib/testing/stub-index-manager.d.ts.map +1 -0
  653. package/lib/testing/stub-index-manager.js +38 -0
  654. package/lib/testing/stub-index-manager.js.map +1 -0
  655. package/lib/testing/stub-langium-documents.d.ts +53 -0
  656. package/lib/testing/stub-langium-documents.d.ts.map +1 -0
  657. package/lib/testing/stub-langium-documents.js +62 -0
  658. package/lib/testing/stub-langium-documents.js.map +1 -0
  659. package/lib/testing/stub-model-service.d.ts +31 -0
  660. package/lib/testing/stub-model-service.d.ts.map +1 -0
  661. package/lib/testing/stub-model-service.js +45 -0
  662. package/lib/testing/stub-model-service.js.map +1 -0
  663. package/lib/testing/stub-project-manager.d.ts +43 -0
  664. package/lib/testing/stub-project-manager.d.ts.map +1 -0
  665. package/lib/testing/stub-project-manager.js +125 -0
  666. package/lib/testing/stub-project-manager.js.map +1 -0
  667. package/lib/testing/stub-self-save-registry.d.ts +31 -0
  668. package/lib/testing/stub-self-save-registry.d.ts.map +1 -0
  669. package/lib/testing/stub-self-save-registry.js +23 -0
  670. package/lib/testing/stub-self-save-registry.js.map +1 -0
  671. package/lib/testing/stub-service-registry.d.ts +95 -0
  672. package/lib/testing/stub-service-registry.d.ts.map +1 -0
  673. package/lib/testing/stub-service-registry.js +108 -0
  674. package/lib/testing/stub-service-registry.js.map +1 -0
  675. package/lib/testing/stub-writable-file-system.d.ts +42 -0
  676. package/lib/testing/stub-writable-file-system.d.ts.map +1 -0
  677. package/lib/testing/stub-writable-file-system.js +26 -0
  678. package/lib/testing/stub-writable-file-system.js.map +1 -0
  679. package/lib/util/connection-liveness.d.ts +25 -0
  680. package/lib/util/connection-liveness.d.ts.map +1 -0
  681. package/lib/util/connection-liveness.js +46 -0
  682. package/lib/util/connection-liveness.js.map +1 -0
  683. package/lib/util/environment.d.ts +53 -0
  684. package/lib/util/environment.d.ts.map +1 -0
  685. package/lib/util/environment.js +78 -0
  686. package/lib/util/environment.js.map +1 -0
  687. package/lib/util/index.d.ts +13 -0
  688. package/lib/util/index.d.ts.map +1 -0
  689. package/lib/util/index.js +18 -0
  690. package/lib/util/index.js.map +1 -0
  691. package/lib/util/registry.d.ts +88 -0
  692. package/lib/util/registry.d.ts.map +1 -0
  693. package/lib/util/registry.js +105 -0
  694. package/lib/util/registry.js.map +1 -0
  695. package/package.json +134 -0
  696. package/src/documents/ast-document-manager.ts +455 -0
  697. package/src/documents/client-ids.ts +33 -0
  698. package/src/documents/hydranium-text-documents.ts +1142 -0
  699. package/src/documents/index.ts +14 -0
  700. package/src/documents/language-client-text-shadow.ts +175 -0
  701. package/src/documents/self-save-registry.ts +81 -0
  702. package/src/index.ts +39 -0
  703. package/src/langium/ast-extension/ast-extension-contribution.ts +35 -0
  704. package/src/langium/ast-extension/ast-extension-service.ts +311 -0
  705. package/src/langium/ast-extension/ast-node-builder.ts +125 -0
  706. package/src/langium/ast-extension/index.ts +12 -0
  707. package/src/langium/bootstrap.ts +600 -0
  708. package/src/langium/build-phase-pass/build-phase-pass-service.ts +141 -0
  709. package/src/langium/build-phase-pass/build-phase-pass.ts +123 -0
  710. package/src/langium/build-phase-pass/index.ts +11 -0
  711. package/src/langium/config/index.ts +10 -0
  712. package/src/langium/config/settings.ts +353 -0
  713. package/src/langium/diagnostics/hydranium-langium-profiler.ts +187 -0
  714. package/src/langium/diagnostics/index.ts +19 -0
  715. package/src/langium/diagnostics/log-file-token.ts +26 -0
  716. package/src/langium/diagnostics/log-preamble.ts +87 -0
  717. package/src/langium/diagnostics/logger.ts +246 -0
  718. package/src/langium/diagnostics/lsp-logger.ts +277 -0
  719. package/src/langium/diagnostics/server-tracer.ts +73 -0
  720. package/src/langium/document-builder/build-pipeline-integration.ts +193 -0
  721. package/src/langium/document-builder/document-builder.ts +839 -0
  722. package/src/langium/document-builder/index.ts +12 -0
  723. package/src/langium/document-builder/labeled-phase-listener.ts +26 -0
  724. package/src/langium/documentation/comment-provider.ts +37 -0
  725. package/src/langium/documentation/index.ts +10 -0
  726. package/src/langium/integration-services.ts +281 -0
  727. package/src/langium/integrity/index.ts +12 -0
  728. package/src/langium/integrity/integrity-contribution.ts +44 -0
  729. package/src/langium/integrity/integrity-rule.ts +100 -0
  730. package/src/langium/integrity/integrity-service.ts +423 -0
  731. package/src/langium/keys/default-element-key-provider.ts +20 -0
  732. package/src/langium/keys/element-key-provider.ts +114 -0
  733. package/src/langium/keys/index.ts +13 -0
  734. package/src/langium/keys/name-based-key-provider.ts +146 -0
  735. package/src/langium/keys/positional-key-provider.ts +57 -0
  736. package/src/langium/labeling/index.ts +10 -0
  737. package/src/langium/labeling/label-provider.ts +110 -0
  738. package/src/langium/language-module.ts +367 -0
  739. package/src/langium/language-types.ts +214 -0
  740. package/src/langium/model-service/index.ts +10 -0
  741. package/src/langium/model-service/model-service.ts +1051 -0
  742. package/src/langium/module.ts +446 -0
  743. package/src/langium/naming/index.ts +11 -0
  744. package/src/langium/naming/name-provider.ts +533 -0
  745. package/src/langium/naming/name-separator-validation.ts +73 -0
  746. package/src/langium/project/abstract-project-manager.ts +630 -0
  747. package/src/langium/project/index.ts +13 -0
  748. package/src/langium/project/project-change-event.ts +66 -0
  749. package/src/langium/project/project-manager.ts +221 -0
  750. package/src/langium/project/single-project-manager.ts +126 -0
  751. package/src/langium/residency/cst-residency-service.ts +412 -0
  752. package/src/langium/residency/index.ts +10 -0
  753. package/src/langium/scope/ast-node-description-provider.ts +141 -0
  754. package/src/langium/scope/hydranium-scope-computation.ts +246 -0
  755. package/src/langium/scope/hydranium-scope-provider.ts +659 -0
  756. package/src/langium/scope/index.ts +18 -0
  757. package/src/langium/scope/reference-builder.ts +194 -0
  758. package/src/langium/scope/reference-candidate-provider.ts +314 -0
  759. package/src/langium/scope/scope-extension-contribution.ts +34 -0
  760. package/src/langium/scope/scope-extension-service.ts +207 -0
  761. package/src/langium/scope/scoped-ast-node-description.ts +174 -0
  762. package/src/langium/scope/tier-specificity.ts +89 -0
  763. package/src/langium/serialization/abstract-serializer.ts +474 -0
  764. package/src/langium/serialization/index.ts +14 -0
  765. package/src/langium/serialization/json-serializer.ts +264 -0
  766. package/src/langium/serialization/serialization-util.ts +40 -0
  767. package/src/langium/serialization/serializer.ts +68 -0
  768. package/src/langium/serialization/yaml-serializer.ts +348 -0
  769. package/src/langium/service-registry.ts +323 -0
  770. package/src/langium/shared-services.ts +107 -0
  771. package/src/langium/transfer/index.ts +10 -0
  772. package/src/langium/transfer/transfer-encoder.ts +434 -0
  773. package/src/langium/update-rewrite/index.ts +14 -0
  774. package/src/langium/update-rewrite/normalize-empty-strings.ts +86 -0
  775. package/src/langium/update-rewrite/semantic-root-rewrite.ts +57 -0
  776. package/src/langium/update-rewrite/update-rewrite-contribution.ts +44 -0
  777. package/src/langium/update-rewrite/update-rewrite-service.ts +129 -0
  778. package/src/langium/update-rewrite/update-rewrite.ts +60 -0
  779. package/src/langium/validation/document-validator.ts +188 -0
  780. package/src/langium/validation/index.ts +12 -0
  781. package/src/langium/validation/validation-contribution-collector.ts +61 -0
  782. package/src/langium/validation/validation-contribution.ts +38 -0
  783. package/src/langium/workspace/additional-document-contribution.ts +80 -0
  784. package/src/langium/workspace/document-uri-policy.ts +187 -0
  785. package/src/langium/workspace/file-system-provider.ts +52 -0
  786. package/src/langium/workspace/hydranium-langium-document-factory.ts +78 -0
  787. package/src/langium/workspace/hydranium-workspace-lock.ts +35 -0
  788. package/src/langium/workspace/hydranium-workspace-manager.ts +412 -0
  789. package/src/langium/workspace/in-memory-file-system-provider.ts +241 -0
  790. package/src/langium/workspace/index-manager.ts +266 -0
  791. package/src/langium/workspace/index.ts +23 -0
  792. package/src/langium/workspace/initialize-workspace.ts +102 -0
  793. package/src/langium/workspace/langium-documents.ts +94 -0
  794. package/src/langium/workspace/persistent-file-system-provider.ts +287 -0
  795. package/src/langium/workspace/synthetic.ts +63 -0
  796. package/src/langium/workspace/virtual-document.ts +94 -0
  797. package/src/langium/workspace/write-lock-scope.ts +88 -0
  798. package/src/launcher/index.ts +12 -0
  799. package/src/launcher/integrated-server.ts +28 -0
  800. package/src/lsp/completion/hydranium-completion-provider.ts +132 -0
  801. package/src/lsp/hydranium-document-update-handler.ts +345 -0
  802. package/src/lsp/index.ts +24 -0
  803. package/src/lsp/instrument-connection.ts +66 -0
  804. package/src/lsp/language-module.ts +64 -0
  805. package/src/lsp/semantic-token-provider.ts +215 -0
  806. package/src/lsp/shared-module.ts +88 -0
  807. package/src/lsp/start-language-server.ts +68 -0
  808. package/src/node/ast-ground-truth.ts +76 -0
  809. package/src/node/event-loop-monitor.ts +89 -0
  810. package/src/node/index.ts +53 -0
  811. package/src/node/latency-from-env.ts +39 -0
  812. package/src/node/lint-grammar.ts +189 -0
  813. package/src/node/log-file-sink.ts +43 -0
  814. package/src/node/log-preamble-node.ts +63 -0
  815. package/src/node/measure-memory.ts +196 -0
  816. package/src/node/memory-monitor.ts +103 -0
  817. package/src/node/node-file-system-provider.ts +252 -0
  818. package/src/node/process-memory.ts +299 -0
  819. package/src/node/profile-capture.ts +377 -0
  820. package/src/node/profile-digest.ts +112 -0
  821. package/src/node/profiling-run.ts +236 -0
  822. package/src/node/reflect-grammar.ts +182 -0
  823. package/src/node/server-diagnostics.ts +63 -0
  824. package/src/node/server-state-snapshot.ts +192 -0
  825. package/src/node/socket-launcher.ts +210 -0
  826. package/src/node/stdio-launcher.ts +150 -0
  827. package/src/node/validate-workspace.ts +133 -0
  828. package/src/node/write-lock-scope-node.ts +41 -0
  829. package/src/testing/ast-snapshot.ts +88 -0
  830. package/src/testing/document-uri-policy-conformance.ts +104 -0
  831. package/src/testing/fake-description.ts +52 -0
  832. package/src/testing/fake-document.ts +120 -0
  833. package/src/testing/fake-reflection.ts +39 -0
  834. package/src/testing/index.ts +45 -0
  835. package/src/testing/langium-test-helpers.ts +26 -0
  836. package/src/testing/make-noop-language-services.ts +47 -0
  837. package/src/testing/make-noop-shared-services.ts +78 -0
  838. package/src/testing/make-test-services.ts +356 -0
  839. package/src/testing/make-test-tracer.ts +92 -0
  840. package/src/testing/node/generated-workspace.ts +222 -0
  841. package/src/testing/node/golden-corpus.ts +114 -0
  842. package/src/testing/node/index.ts +29 -0
  843. package/src/testing/node/lsp-harness.ts +230 -0
  844. package/src/testing/node/lsp-server-connection.ts +575 -0
  845. package/src/testing/node/scratch-workspace.ts +137 -0
  846. package/src/testing/node/spawned-server.ts +447 -0
  847. package/src/testing/parse-semantic-root.ts +150 -0
  848. package/src/testing/playwright/browser-capture-bridge.ts +258 -0
  849. package/src/testing/playwright/e2e-profiling.ts +362 -0
  850. package/src/testing/playwright/index.ts +16 -0
  851. package/src/testing/playwright/server-log-capture.ts +433 -0
  852. package/src/testing/playwright/server-log-fixture.ts +57 -0
  853. package/src/testing/playwright/server-log-rename-reporter.ts +29 -0
  854. package/src/testing/run-update-pipeline.ts +113 -0
  855. package/src/testing/stub-ast-document-manager.ts +224 -0
  856. package/src/testing/stub-document-builder.ts +242 -0
  857. package/src/testing/stub-hydranium-text-documents.ts +270 -0
  858. package/src/testing/stub-index-manager.ts +79 -0
  859. package/src/testing/stub-langium-documents.ts +104 -0
  860. package/src/testing/stub-model-service.ts +72 -0
  861. package/src/testing/stub-project-manager.ts +161 -0
  862. package/src/testing/stub-self-save-registry.ts +43 -0
  863. package/src/testing/stub-service-registry.ts +192 -0
  864. package/src/testing/stub-writable-file-system.ts +58 -0
  865. package/src/util/connection-liveness.ts +47 -0
  866. package/src/util/environment.ts +88 -0
  867. package/src/util/index.ts +18 -0
  868. 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-capture.js","sourceRoot":"","sources":["../../../src/testing/playwright/server-log-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,qB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U,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"}