@hydranium/core 1.0.0-next.22 → 1.0.0-next.221

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 (652) hide show
  1. package/README.md +14 -8
  2. package/lib/documents/ast-document-manager.d.ts +219 -122
  3. package/lib/documents/ast-document-manager.d.ts.map +1 -1
  4. package/lib/documents/ast-document-manager.js +241 -130
  5. package/lib/documents/ast-document-manager.js.map +1 -1
  6. package/lib/documents/client-ids.d.ts +5 -19
  7. package/lib/documents/client-ids.d.ts.map +1 -1
  8. package/lib/documents/client-ids.js +5 -19
  9. package/lib/documents/client-ids.js.map +1 -1
  10. package/lib/documents/client-session-errors.d.ts +15 -0
  11. package/lib/documents/client-session-errors.d.ts.map +1 -0
  12. package/lib/documents/client-session-errors.js +15 -0
  13. package/lib/documents/client-session-errors.js.map +1 -0
  14. package/lib/documents/client-session-registry.d.ts +146 -0
  15. package/lib/documents/client-session-registry.d.ts.map +1 -0
  16. package/lib/documents/client-session-registry.js +207 -0
  17. package/lib/documents/client-session-registry.js.map +1 -0
  18. package/lib/documents/dirty-state-tracker.d.ts +79 -0
  19. package/lib/documents/dirty-state-tracker.d.ts.map +1 -0
  20. package/lib/documents/dirty-state-tracker.js +69 -0
  21. package/lib/documents/dirty-state-tracker.js.map +1 -0
  22. package/lib/documents/document-release-handler.d.ts +179 -0
  23. package/lib/documents/document-release-handler.d.ts.map +1 -0
  24. package/lib/documents/document-release-handler.js +283 -0
  25. package/lib/documents/document-release-handler.js.map +1 -0
  26. package/lib/documents/document-release-scheduler.d.ts +67 -0
  27. package/lib/documents/document-release-scheduler.d.ts.map +1 -0
  28. package/lib/documents/document-release-scheduler.js +80 -0
  29. package/lib/documents/document-release-scheduler.js.map +1 -0
  30. package/lib/documents/file-system-task-queue.d.ts +49 -0
  31. package/lib/documents/file-system-task-queue.d.ts.map +1 -0
  32. package/lib/documents/file-system-task-queue.js +34 -0
  33. package/lib/documents/file-system-task-queue.js.map +1 -0
  34. package/lib/documents/hydranium-text-documents.d.ts +399 -282
  35. package/lib/documents/hydranium-text-documents.d.ts.map +1 -1
  36. package/lib/documents/hydranium-text-documents.js +816 -483
  37. package/lib/documents/hydranium-text-documents.js.map +1 -1
  38. package/lib/documents/index.d.ts +10 -2
  39. package/lib/documents/index.d.ts.map +1 -1
  40. package/lib/documents/index.js +10 -2
  41. package/lib/documents/index.js.map +1 -1
  42. package/lib/documents/language-client-shadow.d.ts +218 -0
  43. package/lib/documents/language-client-shadow.d.ts.map +1 -0
  44. package/lib/documents/language-client-shadow.js +283 -0
  45. package/lib/documents/language-client-shadow.js.map +1 -0
  46. package/lib/documents/model-ledger.d.ts +47 -0
  47. package/lib/documents/model-ledger.d.ts.map +1 -0
  48. package/lib/documents/model-ledger.js +30 -0
  49. package/lib/documents/model-ledger.js.map +1 -0
  50. package/lib/documents/text-ledger.d.ts +64 -0
  51. package/lib/documents/text-ledger.d.ts.map +1 -0
  52. package/lib/documents/text-ledger.js +63 -0
  53. package/lib/documents/text-ledger.js.map +1 -0
  54. package/lib/documents/version-sync-service.d.ts +134 -0
  55. package/lib/documents/version-sync-service.d.ts.map +1 -0
  56. package/lib/documents/version-sync-service.js +171 -0
  57. package/lib/documents/version-sync-service.js.map +1 -0
  58. package/lib/index.d.ts +4 -0
  59. package/lib/index.d.ts.map +1 -1
  60. package/lib/index.js +7 -0
  61. package/lib/index.js.map +1 -1
  62. package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -1
  63. package/lib/langium/ast-extension/ast-extension-service.js.map +1 -1
  64. package/lib/langium/ast-extension/ast-node-builder.d.ts +32 -9
  65. package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -1
  66. package/lib/langium/ast-extension/ast-node-builder.js +60 -22
  67. package/lib/langium/ast-extension/ast-node-builder.js.map +1 -1
  68. package/lib/langium/bootstrap.d.ts +5 -5
  69. package/lib/langium/bootstrap.d.ts.map +1 -1
  70. package/lib/langium/bootstrap.js +42 -17
  71. package/lib/langium/bootstrap.js.map +1 -1
  72. package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -1
  73. package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -1
  74. package/lib/langium/composite-ast-reflection.d.ts +43 -0
  75. package/lib/langium/composite-ast-reflection.d.ts.map +1 -0
  76. package/lib/langium/composite-ast-reflection.js +92 -0
  77. package/lib/langium/composite-ast-reflection.js.map +1 -0
  78. package/lib/langium/config/configuration-provider.d.ts +81 -0
  79. package/lib/langium/config/configuration-provider.d.ts.map +1 -0
  80. package/lib/langium/config/configuration-provider.js +112 -0
  81. package/lib/langium/config/configuration-provider.js.map +1 -0
  82. package/lib/langium/config/index.d.ts +1 -0
  83. package/lib/langium/config/index.d.ts.map +1 -1
  84. package/lib/langium/config/index.js +1 -0
  85. package/lib/langium/config/index.js.map +1 -1
  86. package/lib/langium/config/settings.js.map +1 -1
  87. package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -1
  88. package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -1
  89. package/lib/langium/diagnostics/logger.d.ts +10 -3
  90. package/lib/langium/diagnostics/logger.d.ts.map +1 -1
  91. package/lib/langium/diagnostics/logger.js +12 -5
  92. package/lib/langium/diagnostics/logger.js.map +1 -1
  93. package/lib/langium/diagnostics/lsp-logger.d.ts +17 -0
  94. package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -1
  95. package/lib/langium/diagnostics/lsp-logger.js +57 -16
  96. package/lib/langium/diagnostics/lsp-logger.js.map +1 -1
  97. package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -1
  98. package/lib/langium/diagnostics/server-tracer.js.map +1 -1
  99. package/lib/langium/document-builder/build-pipeline-integration.d.ts +21 -1
  100. package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -1
  101. package/lib/langium/document-builder/build-pipeline-integration.js +32 -5
  102. package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -1
  103. package/lib/langium/document-builder/build-session.d.ts +93 -0
  104. package/lib/langium/document-builder/build-session.d.ts.map +1 -0
  105. package/lib/langium/document-builder/build-session.js +72 -0
  106. package/lib/langium/document-builder/build-session.js.map +1 -0
  107. package/lib/langium/document-builder/document-builder.d.ts +401 -29
  108. package/lib/langium/document-builder/document-builder.d.ts.map +1 -1
  109. package/lib/langium/document-builder/document-builder.js +698 -61
  110. package/lib/langium/document-builder/document-builder.js.map +1 -1
  111. package/lib/langium/document-builder/index.d.ts +1 -0
  112. package/lib/langium/document-builder/index.d.ts.map +1 -1
  113. package/lib/langium/document-builder/index.js +1 -0
  114. package/lib/langium/document-builder/index.js.map +1 -1
  115. package/lib/langium/documentation/comment-provider.d.ts.map +1 -1
  116. package/lib/langium/documentation/comment-provider.js.map +1 -1
  117. package/lib/langium/integration-services.d.ts +61 -19
  118. package/lib/langium/integration-services.d.ts.map +1 -1
  119. package/lib/langium/integration-services.js +10 -5
  120. package/lib/langium/integration-services.js.map +1 -1
  121. package/lib/langium/integrity/integrity-rule.d.ts +16 -8
  122. package/lib/langium/integrity/integrity-rule.d.ts.map +1 -1
  123. package/lib/langium/integrity/integrity-rule.js.map +1 -1
  124. package/lib/langium/integrity/integrity-service.d.ts +81 -24
  125. package/lib/langium/integrity/integrity-service.d.ts.map +1 -1
  126. package/lib/langium/integrity/integrity-service.js +264 -57
  127. package/lib/langium/integrity/integrity-service.js.map +1 -1
  128. package/lib/langium/keys/containment.d.ts +64 -0
  129. package/lib/langium/keys/containment.d.ts.map +1 -0
  130. package/lib/langium/keys/containment.js +53 -0
  131. package/lib/langium/keys/containment.js.map +1 -0
  132. package/lib/langium/keys/index.d.ts +1 -0
  133. package/lib/langium/keys/index.d.ts.map +1 -1
  134. package/lib/langium/keys/index.js +1 -0
  135. package/lib/langium/keys/index.js.map +1 -1
  136. package/lib/langium/keys/name-based-key-provider.d.ts +4 -0
  137. package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -1
  138. package/lib/langium/keys/name-based-key-provider.js +4 -0
  139. package/lib/langium/keys/name-based-key-provider.js.map +1 -1
  140. package/lib/langium/keys/positional-key-provider.d.ts.map +1 -1
  141. package/lib/langium/keys/positional-key-provider.js.map +1 -1
  142. package/lib/langium/labeling/label-provider.d.ts.map +1 -1
  143. package/lib/langium/labeling/label-provider.js.map +1 -1
  144. package/lib/langium/language-module.d.ts +29 -4
  145. package/lib/langium/language-module.d.ts.map +1 -1
  146. package/lib/langium/language-module.js +18 -4
  147. package/lib/langium/language-module.js.map +1 -1
  148. package/lib/langium/model-service/client-session.d.ts +343 -0
  149. package/lib/langium/model-service/client-session.d.ts.map +1 -0
  150. package/lib/langium/model-service/client-session.js +411 -0
  151. package/lib/langium/model-service/client-session.js.map +1 -0
  152. package/lib/langium/model-service/index.d.ts +2 -0
  153. package/lib/langium/model-service/index.d.ts.map +1 -1
  154. package/lib/langium/model-service/index.js +2 -0
  155. package/lib/langium/model-service/index.js.map +1 -1
  156. package/lib/langium/model-service/model-events.d.ts +61 -0
  157. package/lib/langium/model-service/model-events.d.ts.map +1 -0
  158. package/lib/langium/model-service/model-events.js +10 -0
  159. package/lib/langium/model-service/model-events.js.map +1 -0
  160. package/lib/langium/model-service/model-service.d.ts +432 -282
  161. package/lib/langium/model-service/model-service.d.ts.map +1 -1
  162. package/lib/langium/model-service/model-service.js +504 -438
  163. package/lib/langium/model-service/model-service.js.map +1 -1
  164. package/lib/langium/module.d.ts +157 -35
  165. package/lib/langium/module.d.ts.map +1 -1
  166. package/lib/langium/module.js +52 -35
  167. package/lib/langium/module.js.map +1 -1
  168. package/lib/langium/naming/name-provider.d.ts +25 -4
  169. package/lib/langium/naming/name-provider.d.ts.map +1 -1
  170. package/lib/langium/naming/name-provider.js +2 -1
  171. package/lib/langium/naming/name-provider.js.map +1 -1
  172. package/lib/langium/naming/name-separator-validation.d.ts +23 -0
  173. package/lib/langium/naming/name-separator-validation.d.ts.map +1 -1
  174. package/lib/langium/naming/name-separator-validation.js +30 -1
  175. package/lib/langium/naming/name-separator-validation.js.map +1 -1
  176. package/lib/langium/project/abstract-project-manager.d.ts.map +1 -1
  177. package/lib/langium/project/abstract-project-manager.js +9 -2
  178. package/lib/langium/project/abstract-project-manager.js.map +1 -1
  179. package/lib/langium/project/project-change-event.d.ts +2 -2
  180. package/lib/langium/project/single-project-manager.d.ts.map +1 -1
  181. package/lib/langium/project/single-project-manager.js.map +1 -1
  182. package/lib/langium/residency/cst-residency-service.d.ts +31 -11
  183. package/lib/langium/residency/cst-residency-service.d.ts.map +1 -1
  184. package/lib/langium/residency/cst-residency-service.js +23 -57
  185. package/lib/langium/residency/cst-residency-service.js.map +1 -1
  186. package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -1
  187. package/lib/langium/scope/ast-node-description-provider.js.map +1 -1
  188. package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -1
  189. package/lib/langium/scope/hydranium-scope-computation.js.map +1 -1
  190. package/lib/langium/scope/hydranium-scope-provider.d.ts +48 -13
  191. package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -1
  192. package/lib/langium/scope/hydranium-scope-provider.js +56 -20
  193. package/lib/langium/scope/hydranium-scope-provider.js.map +1 -1
  194. package/lib/langium/scope/reference-builder.d.ts.map +1 -1
  195. package/lib/langium/scope/reference-builder.js.map +1 -1
  196. package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -1
  197. package/lib/langium/scope/reference-candidate-provider.js.map +1 -1
  198. package/lib/langium/scope/scope-extension-service.d.ts.map +1 -1
  199. package/lib/langium/scope/scope-extension-service.js.map +1 -1
  200. package/lib/langium/serialization/abstract-serializer.d.ts +11 -20
  201. package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -1
  202. package/lib/langium/serialization/abstract-serializer.js +12 -21
  203. package/lib/langium/serialization/abstract-serializer.js.map +1 -1
  204. package/lib/langium/serialization/json-serializer.d.ts +1 -1
  205. package/lib/langium/serialization/json-serializer.d.ts.map +1 -1
  206. package/lib/langium/serialization/json-serializer.js.map +1 -1
  207. package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -1
  208. package/lib/langium/serialization/yaml-serializer.js.map +1 -1
  209. package/lib/langium/service-registry.d.ts +29 -1
  210. package/lib/langium/service-registry.d.ts.map +1 -1
  211. package/lib/langium/service-registry.js +37 -0
  212. package/lib/langium/service-registry.js.map +1 -1
  213. package/lib/langium/shared-services.d.ts +23 -6
  214. package/lib/langium/shared-services.d.ts.map +1 -1
  215. package/lib/langium/shared-services.js.map +1 -1
  216. package/lib/langium/transfer/transfer-encoder.d.ts +77 -26
  217. package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -1
  218. package/lib/langium/transfer/transfer-encoder.js +46 -24
  219. package/lib/langium/transfer/transfer-encoder.js.map +1 -1
  220. package/lib/langium/trivia/comment-preserver.d.ts +423 -0
  221. package/lib/langium/trivia/comment-preserver.d.ts.map +1 -0
  222. package/lib/langium/trivia/comment-preserver.js +906 -0
  223. package/lib/langium/trivia/comment-preserver.js.map +1 -0
  224. package/lib/langium/trivia/document-ending-preserver.d.ts +43 -0
  225. package/lib/langium/trivia/document-ending-preserver.d.ts.map +1 -0
  226. package/lib/langium/trivia/document-ending-preserver.js +48 -0
  227. package/lib/langium/trivia/document-ending-preserver.js.map +1 -0
  228. package/lib/langium/trivia/index.d.ts +14 -0
  229. package/lib/langium/trivia/index.d.ts.map +1 -0
  230. package/lib/langium/trivia/index.js +14 -0
  231. package/lib/langium/trivia/index.js.map +1 -0
  232. package/lib/langium/trivia/trivia-contribution.d.ts +37 -0
  233. package/lib/langium/trivia/trivia-contribution.d.ts.map +1 -0
  234. package/lib/langium/trivia/trivia-contribution.js +10 -0
  235. package/lib/langium/trivia/trivia-contribution.js.map +1 -0
  236. package/lib/langium/trivia/trivia-preserver.d.ts +50 -0
  237. package/lib/langium/trivia/trivia-preserver.d.ts.map +1 -0
  238. package/lib/langium/trivia/trivia-preserver.js +10 -0
  239. package/lib/langium/trivia/trivia-preserver.js.map +1 -0
  240. package/lib/langium/trivia/trivia-service.d.ts +70 -0
  241. package/lib/langium/trivia/trivia-service.d.ts.map +1 -0
  242. package/lib/langium/trivia/trivia-service.js +56 -0
  243. package/lib/langium/trivia/trivia-service.js.map +1 -0
  244. package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -1
  245. package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -1
  246. package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -1
  247. package/lib/langium/update-rewrite/update-rewrite.d.ts +1 -1
  248. package/lib/langium/validation/document-validator.d.ts +294 -10
  249. package/lib/langium/validation/document-validator.d.ts.map +1 -1
  250. package/lib/langium/validation/document-validator.js +448 -5
  251. package/lib/langium/validation/document-validator.js.map +1 -1
  252. package/lib/langium/validation/validation-contribution-collector.d.ts +9 -1
  253. package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -1
  254. package/lib/langium/validation/validation-contribution-collector.js +1 -1
  255. package/lib/langium/validation/validation-contribution-collector.js.map +1 -1
  256. package/lib/langium/workspace/document-uri-policy.d.ts +18 -14
  257. package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -1
  258. package/lib/langium/workspace/document-uri-policy.js +10 -9
  259. package/lib/langium/workspace/document-uri-policy.js.map +1 -1
  260. package/lib/langium/workspace/file-not-found.d.ts +23 -0
  261. package/lib/langium/workspace/file-not-found.d.ts.map +1 -0
  262. package/lib/langium/workspace/file-not-found.js +31 -0
  263. package/lib/langium/workspace/file-not-found.js.map +1 -0
  264. package/lib/langium/workspace/file-system-provider.d.ts +135 -9
  265. package/lib/langium/workspace/file-system-provider.d.ts.map +1 -1
  266. package/lib/langium/workspace/file-system-provider.js +93 -14
  267. package/lib/langium/workspace/file-system-provider.js.map +1 -1
  268. package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +56 -1
  269. package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -1
  270. package/lib/langium/workspace/hydranium-langium-document-factory.js +79 -0
  271. package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -1
  272. package/lib/langium/workspace/hydranium-workspace-lock.d.ts +43 -1
  273. package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -1
  274. package/lib/langium/workspace/hydranium-workspace-lock.js +58 -1
  275. package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -1
  276. package/lib/langium/workspace/hydranium-workspace-manager.d.ts +82 -9
  277. package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -1
  278. package/lib/langium/workspace/hydranium-workspace-manager.js +128 -10
  279. package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -1
  280. package/lib/langium/workspace/in-memory-file-system-provider.d.ts +26 -3
  281. package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -1
  282. package/lib/langium/workspace/in-memory-file-system-provider.js +41 -15
  283. package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -1
  284. package/lib/langium/workspace/index-manager.d.ts.map +1 -1
  285. package/lib/langium/workspace/index-manager.js.map +1 -1
  286. package/lib/langium/workspace/index.d.ts +1 -0
  287. package/lib/langium/workspace/index.d.ts.map +1 -1
  288. package/lib/langium/workspace/index.js +1 -0
  289. package/lib/langium/workspace/index.js.map +1 -1
  290. package/lib/langium/workspace/initialize-workspace.d.ts +31 -2
  291. package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -1
  292. package/lib/langium/workspace/initialize-workspace.js +13 -5
  293. package/lib/langium/workspace/initialize-workspace.js.map +1 -1
  294. package/lib/langium/workspace/langium-documents.d.ts +86 -17
  295. package/lib/langium/workspace/langium-documents.d.ts.map +1 -1
  296. package/lib/langium/workspace/langium-documents.js +101 -29
  297. package/lib/langium/workspace/langium-documents.js.map +1 -1
  298. package/lib/langium/workspace/persistent-file-system-provider.d.ts +1 -8
  299. package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -1
  300. package/lib/langium/workspace/persistent-file-system-provider.js +0 -7
  301. package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -1
  302. package/lib/{documents → langium/workspace}/self-save-registry.d.ts +38 -7
  303. package/lib/langium/workspace/self-save-registry.d.ts.map +1 -0
  304. package/lib/{documents → langium/workspace}/self-save-registry.js +29 -16
  305. package/lib/langium/workspace/self-save-registry.js.map +1 -0
  306. package/lib/langium/workspace/virtual-document.d.ts +48 -15
  307. package/lib/langium/workspace/virtual-document.d.ts.map +1 -1
  308. package/lib/langium/workspace/virtual-document.js +78 -18
  309. package/lib/langium/workspace/virtual-document.js.map +1 -1
  310. package/lib/langium/workspace/write-lock-scope.d.ts +20 -10
  311. package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -1
  312. package/lib/langium/workspace/write-lock-scope.js +12 -4
  313. package/lib/langium/workspace/write-lock-scope.js.map +1 -1
  314. package/lib/locale/index.d.ts +10 -0
  315. package/lib/locale/index.d.ts.map +1 -0
  316. package/lib/locale/index.js +10 -0
  317. package/lib/locale/index.js.map +1 -0
  318. package/lib/locale/server-locale.d.ts +73 -0
  319. package/lib/locale/server-locale.d.ts.map +1 -0
  320. package/lib/locale/server-locale.js +61 -0
  321. package/lib/locale/server-locale.js.map +1 -0
  322. package/lib/lsp/completion/hydranium-completion-provider.d.ts +44 -2
  323. package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -1
  324. package/lib/lsp/completion/hydranium-completion-provider.js +68 -0
  325. package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -1
  326. package/lib/lsp/connection-features.d.ts +23 -0
  327. package/lib/lsp/connection-features.d.ts.map +1 -0
  328. package/lib/lsp/connection-features.js +60 -0
  329. package/lib/lsp/connection-features.js.map +1 -0
  330. package/lib/lsp/diagnostics-connection.d.ts +27 -0
  331. package/lib/lsp/diagnostics-connection.d.ts.map +1 -0
  332. package/lib/lsp/diagnostics-connection.js +53 -0
  333. package/lib/lsp/diagnostics-connection.js.map +1 -0
  334. package/lib/lsp/hydranium-document-update-handler.d.ts +92 -81
  335. package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -1
  336. package/lib/lsp/hydranium-document-update-handler.js +153 -99
  337. package/lib/lsp/hydranium-document-update-handler.js.map +1 -1
  338. package/lib/lsp/index.d.ts +3 -1
  339. package/lib/lsp/index.d.ts.map +1 -1
  340. package/lib/lsp/index.js +3 -1
  341. package/lib/lsp/index.js.map +1 -1
  342. package/lib/lsp/lsp-latency.d.ts +39 -0
  343. package/lib/lsp/lsp-latency.d.ts.map +1 -0
  344. package/lib/lsp/lsp-latency.js +58 -0
  345. package/lib/lsp/lsp-latency.js.map +1 -0
  346. package/lib/lsp/semantic-token-provider.d.ts +34 -1
  347. package/lib/lsp/semantic-token-provider.d.ts.map +1 -1
  348. package/lib/lsp/semantic-token-provider.js +55 -8
  349. package/lib/lsp/semantic-token-provider.js.map +1 -1
  350. package/lib/lsp/shared-module.d.ts +4 -8
  351. package/lib/lsp/shared-module.d.ts.map +1 -1
  352. package/lib/lsp/shared-module.js.map +1 -1
  353. package/lib/lsp/start-language-server.d.ts +8 -7
  354. package/lib/lsp/start-language-server.d.ts.map +1 -1
  355. package/lib/lsp/start-language-server.js +13 -7
  356. package/lib/lsp/start-language-server.js.map +1 -1
  357. package/lib/messages/carriers.d.ts +54 -0
  358. package/lib/messages/carriers.d.ts.map +1 -0
  359. package/lib/messages/carriers.js +62 -0
  360. package/lib/messages/carriers.js.map +1 -0
  361. package/lib/messages/index.d.ts +25 -0
  362. package/lib/messages/index.d.ts.map +1 -0
  363. package/lib/messages/index.js +25 -0
  364. package/lib/messages/index.js.map +1 -0
  365. package/lib/messages/renderer.d.ts +142 -0
  366. package/lib/messages/renderer.d.ts.map +1 -0
  367. package/lib/messages/renderer.js +165 -0
  368. package/lib/messages/renderer.js.map +1 -0
  369. package/lib/node/event-loop-monitor.js.map +1 -1
  370. package/lib/node/heap-ceiling.d.ts +61 -0
  371. package/lib/node/heap-ceiling.d.ts.map +1 -0
  372. package/lib/node/heap-ceiling.js +72 -0
  373. package/lib/node/heap-ceiling.js.map +1 -0
  374. package/lib/node/index.d.ts +1 -1
  375. package/lib/node/index.d.ts.map +1 -1
  376. package/lib/node/index.js +1 -1
  377. package/lib/node/index.js.map +1 -1
  378. package/lib/node/latency-from-env.d.ts +1 -1
  379. package/lib/node/latency-from-env.js +1 -1
  380. package/lib/node/lint-grammar.js.map +1 -1
  381. package/lib/node/measure-memory.d.ts.map +1 -1
  382. package/lib/node/measure-memory.js +1 -0
  383. package/lib/node/measure-memory.js.map +1 -1
  384. package/lib/node/memory-monitor.js.map +1 -1
  385. package/lib/node/node-file-system-provider.d.ts +41 -6
  386. package/lib/node/node-file-system-provider.d.ts.map +1 -1
  387. package/lib/node/node-file-system-provider.js +109 -49
  388. package/lib/node/node-file-system-provider.js.map +1 -1
  389. package/lib/node/profile-capture.d.ts +8 -2
  390. package/lib/node/profile-capture.d.ts.map +1 -1
  391. package/lib/node/profile-capture.js +1 -1
  392. package/lib/node/profile-capture.js.map +1 -1
  393. package/lib/node/profile-digest.js.map +1 -1
  394. package/lib/node/profiling-run.d.ts +13 -3
  395. package/lib/node/profiling-run.d.ts.map +1 -1
  396. package/lib/node/profiling-run.js +17 -8
  397. package/lib/node/profiling-run.js.map +1 -1
  398. package/lib/node/rename-over-open-readers.d.ts +52 -0
  399. package/lib/node/rename-over-open-readers.d.ts.map +1 -0
  400. package/lib/node/rename-over-open-readers.js +66 -0
  401. package/lib/node/rename-over-open-readers.js.map +1 -0
  402. package/lib/node/socket-launcher.d.ts +20 -4
  403. package/lib/node/socket-launcher.d.ts.map +1 -1
  404. package/lib/node/socket-launcher.js +5 -4
  405. package/lib/node/socket-launcher.js.map +1 -1
  406. package/lib/node/stdio-launcher.d.ts +6 -5
  407. package/lib/node/stdio-launcher.d.ts.map +1 -1
  408. package/lib/node/stdio-launcher.js +2 -2
  409. package/lib/node/stdio-launcher.js.map +1 -1
  410. package/lib/testing/document-uri-policy-conformance.js.map +1 -1
  411. package/lib/testing/fake-description.js.map +1 -1
  412. package/lib/testing/fake-document.d.ts +16 -4
  413. package/lib/testing/fake-document.d.ts.map +1 -1
  414. package/lib/testing/fake-document.js +18 -3
  415. package/lib/testing/fake-document.js.map +1 -1
  416. package/lib/testing/index.d.ts +1 -1
  417. package/lib/testing/index.d.ts.map +1 -1
  418. package/lib/testing/index.js +2 -1
  419. package/lib/testing/index.js.map +1 -1
  420. package/lib/testing/langium-test-helpers.d.ts.map +1 -1
  421. package/lib/testing/langium-test-helpers.js +1 -0
  422. package/lib/testing/langium-test-helpers.js.map +1 -1
  423. package/lib/testing/make-noop-language-services.js.map +1 -1
  424. package/lib/testing/make-noop-shared-services.d.ts +14 -0
  425. package/lib/testing/make-noop-shared-services.d.ts.map +1 -1
  426. package/lib/testing/make-noop-shared-services.js +28 -2
  427. package/lib/testing/make-noop-shared-services.js.map +1 -1
  428. package/lib/testing/make-test-services.d.ts +72 -14
  429. package/lib/testing/make-test-services.d.ts.map +1 -1
  430. package/lib/testing/make-test-services.js +42 -10
  431. package/lib/testing/make-test-services.js.map +1 -1
  432. package/lib/testing/make-test-tracer.d.ts +12 -0
  433. package/lib/testing/make-test-tracer.d.ts.map +1 -1
  434. package/lib/testing/make-test-tracer.js +13 -0
  435. package/lib/testing/make-test-tracer.js.map +1 -1
  436. package/lib/testing/node/golden-corpus.js.map +1 -1
  437. package/lib/testing/node/index.d.ts +1 -0
  438. package/lib/testing/node/index.d.ts.map +1 -1
  439. package/lib/testing/node/index.js +1 -0
  440. package/lib/testing/node/index.js.map +1 -1
  441. package/lib/testing/node/lsp-harness.d.ts.map +1 -1
  442. package/lib/testing/node/lsp-harness.js +2 -0
  443. package/lib/testing/node/lsp-harness.js.map +1 -1
  444. package/lib/testing/node/lsp-server-connection.d.ts +11 -3
  445. package/lib/testing/node/lsp-server-connection.d.ts.map +1 -1
  446. package/lib/testing/node/lsp-server-connection.js +43 -10
  447. package/lib/testing/node/lsp-server-connection.js.map +1 -1
  448. package/lib/testing/node/scratch-workspace.d.ts.map +1 -1
  449. package/lib/testing/node/scratch-workspace.js +10 -5
  450. package/lib/testing/node/scratch-workspace.js.map +1 -1
  451. package/lib/testing/node/spawned-server.d.ts +14 -0
  452. package/lib/testing/node/spawned-server.d.ts.map +1 -1
  453. package/lib/testing/node/spawned-server.js +34 -2
  454. package/lib/testing/node/spawned-server.js.map +1 -1
  455. package/lib/testing/node/unhandled-rejections.d.ts +20 -0
  456. package/lib/testing/node/unhandled-rejections.d.ts.map +1 -0
  457. package/lib/testing/node/unhandled-rejections.js +32 -0
  458. package/lib/testing/node/unhandled-rejections.js.map +1 -0
  459. package/lib/testing/playwright/browser-capture-bridge.js.map +1 -1
  460. package/lib/testing/playwright/e2e-profiling.js.map +1 -1
  461. package/lib/testing/playwright/flaky-network-proxy.d.ts +76 -0
  462. package/lib/testing/playwright/flaky-network-proxy.d.ts.map +1 -0
  463. package/lib/testing/playwright/flaky-network-proxy.js +164 -0
  464. package/lib/testing/playwright/flaky-network-proxy.js.map +1 -0
  465. package/lib/testing/playwright/index.d.ts +1 -0
  466. package/lib/testing/playwright/index.d.ts.map +1 -1
  467. package/lib/testing/playwright/index.js +1 -0
  468. package/lib/testing/playwright/index.js.map +1 -1
  469. package/lib/testing/playwright/server-log-capture.d.ts +24 -8
  470. package/lib/testing/playwright/server-log-capture.d.ts.map +1 -1
  471. package/lib/testing/playwright/server-log-capture.js +27 -6
  472. package/lib/testing/playwright/server-log-capture.js.map +1 -1
  473. package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -1
  474. package/lib/testing/playwright/server-log-rename-reporter.js +10 -1
  475. package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -1
  476. package/lib/testing/run-update-pipeline.d.ts +4 -4
  477. package/lib/testing/run-update-pipeline.d.ts.map +1 -1
  478. package/lib/testing/stub-ast-document-manager.d.ts +11 -52
  479. package/lib/testing/stub-ast-document-manager.d.ts.map +1 -1
  480. package/lib/testing/stub-ast-document-manager.js +24 -65
  481. package/lib/testing/stub-ast-document-manager.js.map +1 -1
  482. package/lib/testing/stub-document-builder.d.ts +26 -11
  483. package/lib/testing/stub-document-builder.d.ts.map +1 -1
  484. package/lib/testing/stub-document-builder.js +78 -5
  485. package/lib/testing/stub-document-builder.js.map +1 -1
  486. package/lib/testing/stub-hydranium-text-documents.d.ts +33 -10
  487. package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -1
  488. package/lib/testing/stub-hydranium-text-documents.js +115 -16
  489. package/lib/testing/stub-hydranium-text-documents.js.map +1 -1
  490. package/lib/testing/stub-index-manager.js.map +1 -1
  491. package/lib/testing/stub-langium-documents.d.ts +3 -2
  492. package/lib/testing/stub-langium-documents.d.ts.map +1 -1
  493. package/lib/testing/stub-langium-documents.js.map +1 -1
  494. package/lib/testing/stub-model-service.d.ts +7 -6
  495. package/lib/testing/stub-model-service.d.ts.map +1 -1
  496. package/lib/testing/stub-model-service.js +4 -4
  497. package/lib/testing/stub-model-service.js.map +1 -1
  498. package/lib/testing/stub-project-manager.js.map +1 -1
  499. package/lib/testing/stub-self-save-registry.d.ts +1 -1
  500. package/lib/testing/stub-self-save-registry.d.ts.map +1 -1
  501. package/lib/testing/stub-service-registry.d.ts +1 -1
  502. package/lib/testing/stub-service-registry.js.map +1 -1
  503. package/lib/testing/stub-writable-file-system.d.ts +1 -1
  504. package/lib/testing/stub-writable-file-system.d.ts.map +1 -1
  505. package/lib/util/connection-liveness.d.ts +7 -6
  506. package/lib/util/connection-liveness.d.ts.map +1 -1
  507. package/lib/util/connection-liveness.js +35 -14
  508. package/lib/util/connection-liveness.js.map +1 -1
  509. package/lib/util/environment.d.ts.map +1 -1
  510. package/lib/util/environment.js.map +1 -1
  511. package/lib/util/registry.d.ts.map +1 -1
  512. package/package.json +32 -48
  513. package/src/documents/ast-document-manager.ts +379 -231
  514. package/src/documents/client-ids.ts +5 -22
  515. package/src/documents/client-session-errors.ts +24 -0
  516. package/src/documents/client-session-registry.ts +262 -0
  517. package/src/documents/dirty-state-tracker.ts +130 -0
  518. package/src/documents/document-release-handler.ts +365 -0
  519. package/src/documents/document-release-scheduler.ts +121 -0
  520. package/src/documents/file-system-task-queue.ts +68 -0
  521. package/src/documents/hydranium-text-documents.ts +931 -595
  522. package/src/documents/index.ts +10 -2
  523. package/src/documents/language-client-shadow.ts +451 -0
  524. package/src/documents/model-ledger.ts +66 -0
  525. package/src/documents/text-ledger.ts +112 -0
  526. package/src/documents/version-sync-service.ts +267 -0
  527. package/src/index.ts +7 -0
  528. package/src/langium/ast-extension/ast-node-builder.ts +66 -22
  529. package/src/langium/bootstrap.ts +42 -17
  530. package/src/langium/composite-ast-reflection.ts +107 -0
  531. package/src/langium/config/configuration-provider.ts +119 -0
  532. package/src/langium/config/index.ts +1 -0
  533. package/src/langium/diagnostics/logger.ts +12 -5
  534. package/src/langium/diagnostics/lsp-logger.ts +59 -15
  535. package/src/langium/document-builder/build-pipeline-integration.ts +50 -5
  536. package/src/langium/document-builder/build-session.ts +87 -0
  537. package/src/langium/document-builder/document-builder.ts +825 -59
  538. package/src/langium/document-builder/index.ts +1 -0
  539. package/src/langium/integration-services.ts +83 -24
  540. package/src/langium/integrity/integrity-rule.ts +16 -8
  541. package/src/langium/integrity/integrity-service.ts +287 -62
  542. package/src/langium/keys/containment.ts +87 -0
  543. package/src/langium/keys/index.ts +1 -0
  544. package/src/langium/keys/name-based-key-provider.ts +4 -0
  545. package/src/langium/language-module.ts +48 -7
  546. package/src/langium/model-service/client-session.ts +644 -0
  547. package/src/langium/model-service/index.ts +2 -0
  548. package/src/langium/model-service/model-events.ts +75 -0
  549. package/src/langium/model-service/model-service.ts +790 -468
  550. package/src/langium/module.ts +210 -64
  551. package/src/langium/naming/name-provider.ts +27 -5
  552. package/src/langium/naming/name-separator-validation.ts +34 -5
  553. package/src/langium/project/abstract-project-manager.ts +9 -1
  554. package/src/langium/project/project-change-event.ts +2 -2
  555. package/src/langium/residency/cst-residency-service.ts +46 -15
  556. package/src/langium/scope/hydranium-scope-provider.ts +60 -22
  557. package/src/langium/serialization/abstract-serializer.ts +13 -32
  558. package/src/langium/service-registry.ts +41 -2
  559. package/src/langium/shared-services.ts +27 -6
  560. package/src/langium/transfer/transfer-encoder.ts +104 -37
  561. package/src/langium/trivia/comment-preserver.ts +1100 -0
  562. package/src/langium/trivia/document-ending-preserver.ts +55 -0
  563. package/src/langium/trivia/index.ts +14 -0
  564. package/src/langium/trivia/trivia-contribution.ts +39 -0
  565. package/src/langium/trivia/trivia-preserver.ts +54 -0
  566. package/src/langium/trivia/trivia-service.ts +99 -0
  567. package/src/langium/update-rewrite/update-rewrite.ts +1 -1
  568. package/src/langium/validation/document-validator.ts +537 -11
  569. package/src/langium/validation/validation-contribution-collector.ts +10 -1
  570. package/src/langium/workspace/document-uri-policy.ts +18 -14
  571. package/src/langium/workspace/file-not-found.ts +35 -0
  572. package/src/langium/workspace/file-system-provider.ts +205 -17
  573. package/src/langium/workspace/hydranium-langium-document-factory.ts +117 -0
  574. package/src/langium/workspace/hydranium-workspace-lock.ts +86 -2
  575. package/src/langium/workspace/hydranium-workspace-manager.ts +154 -14
  576. package/src/langium/workspace/in-memory-file-system-provider.ts +48 -17
  577. package/src/langium/workspace/index.ts +1 -0
  578. package/src/langium/workspace/initialize-workspace.ts +43 -5
  579. package/src/langium/workspace/langium-documents.ts +124 -33
  580. package/src/langium/workspace/persistent-file-system-provider.ts +1 -8
  581. package/src/{documents → langium/workspace}/self-save-registry.ts +54 -15
  582. package/src/langium/workspace/virtual-document.ts +96 -19
  583. package/src/langium/workspace/write-lock-scope.ts +24 -11
  584. package/src/locale/index.ts +10 -0
  585. package/src/locale/server-locale.ts +86 -0
  586. package/src/lsp/completion/hydranium-completion-provider.ts +82 -2
  587. package/src/lsp/connection-features.ts +67 -0
  588. package/src/lsp/diagnostics-connection.ts +56 -0
  589. package/src/lsp/hydranium-document-update-handler.ts +187 -108
  590. package/src/lsp/index.ts +3 -1
  591. package/src/lsp/lsp-latency.ts +62 -0
  592. package/src/lsp/semantic-token-provider.ts +74 -7
  593. package/src/lsp/shared-module.ts +4 -8
  594. package/src/lsp/start-language-server.ts +13 -7
  595. package/src/messages/carriers.ts +78 -0
  596. package/src/messages/index.ts +36 -0
  597. package/src/messages/renderer.ts +212 -0
  598. package/src/node/heap-ceiling.ts +108 -0
  599. package/src/node/index.ts +1 -1
  600. package/src/node/latency-from-env.ts +1 -1
  601. package/src/node/measure-memory.ts +1 -0
  602. package/src/node/node-file-system-provider.ts +124 -53
  603. package/src/node/profile-capture.ts +9 -3
  604. package/src/node/profiling-run.ts +30 -8
  605. package/src/node/rename-over-open-readers.ts +78 -0
  606. package/src/node/socket-launcher.ts +24 -8
  607. package/src/node/stdio-launcher.ts +8 -7
  608. package/src/testing/fake-document.ts +24 -5
  609. package/src/testing/index.ts +2 -1
  610. package/src/testing/langium-test-helpers.ts +1 -0
  611. package/src/testing/make-noop-shared-services.ts +50 -2
  612. package/src/testing/make-test-services.ts +125 -31
  613. package/src/testing/make-test-tracer.ts +26 -0
  614. package/src/testing/node/index.ts +1 -0
  615. package/src/testing/node/lsp-harness.ts +2 -0
  616. package/src/testing/node/lsp-server-connection.ts +66 -12
  617. package/src/testing/node/scratch-workspace.ts +10 -5
  618. package/src/testing/node/spawned-server.ts +36 -2
  619. package/src/testing/node/unhandled-rejections.ts +31 -0
  620. package/src/testing/parse-semantic-root.ts +1 -1
  621. package/src/testing/playwright/flaky-network-proxy.ts +240 -0
  622. package/src/testing/playwright/index.ts +1 -0
  623. package/src/testing/playwright/server-log-capture.ts +45 -11
  624. package/src/testing/playwright/server-log-rename-reporter.ts +12 -1
  625. package/src/testing/run-update-pipeline.ts +4 -4
  626. package/src/testing/stub-ast-document-manager.ts +36 -138
  627. package/src/testing/stub-document-builder.ts +102 -18
  628. package/src/testing/stub-hydranium-text-documents.ts +165 -27
  629. package/src/testing/stub-langium-documents.ts +3 -2
  630. package/src/testing/stub-model-service.ts +9 -8
  631. package/src/testing/stub-self-save-registry.ts +1 -1
  632. package/src/testing/stub-service-registry.ts +1 -1
  633. package/src/testing/stub-writable-file-system.ts +1 -1
  634. package/src/util/connection-liveness.ts +37 -14
  635. package/src/util/environment.ts +9 -1
  636. package/lib/documents/language-client-text-shadow.d.ts +0 -101
  637. package/lib/documents/language-client-text-shadow.d.ts.map +0 -1
  638. package/lib/documents/language-client-text-shadow.js +0 -156
  639. package/lib/documents/language-client-text-shadow.js.map +0 -1
  640. package/lib/documents/self-save-registry.d.ts.map +0 -1
  641. package/lib/documents/self-save-registry.js.map +0 -1
  642. package/lib/lsp/instrument-connection.d.ts +0 -36
  643. package/lib/lsp/instrument-connection.d.ts.map +0 -1
  644. package/lib/lsp/instrument-connection.js +0 -62
  645. package/lib/lsp/instrument-connection.js.map +0 -1
  646. package/lib/node/process-memory.d.ts +0 -66
  647. package/lib/node/process-memory.d.ts.map +0 -1
  648. package/lib/node/process-memory.js +0 -252
  649. package/lib/node/process-memory.js.map +0 -1
  650. package/src/documents/language-client-text-shadow.ts +0 -175
  651. package/src/lsp/instrument-connection.ts +0 -66
  652. package/src/node/process-memory.ts +0 -299
@@ -1 +1 @@
1
- {"version":3,"file":"document-uri-policy.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/document-uri-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,KAAK,GAAG,EAAY,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACvC,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,EAAE,EAAE,yBAAyB,GAAG,GAAG,GAAG,SAAS,CAIxG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,iBAAiB;IAC/B,YAAY,CAAC,GAAG,EAAE,GAAG,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,iBAAiB;IAC/B,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,YAAY,CAAC;IAC9C;;;;;;OAMG;IACH,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,SAAS,CAAC;CAC9C;AAED;;;;;GAKG;AACH,qBAAa,wBAAyB,YAAW,iBAAiB;IAC/D,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,YAAY,CAI5C;IAED;;;;;;OAMG;IACH,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,SAAS,CAE1C;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,qBAAa,yBAA0B,SAAQ,wBAAwB;IACpE,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,yBAAyB,CAAC;IAEjD,YAAY,QAAQ,EAAE,2BAA2B,EAGhD;IAEQ,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,YAAY,CAMrD;IAEQ,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,GAAG,GAAG,SAAS,CAQnD;CACH"}
@@ -42,10 +42,9 @@ export class DefaultDocumentUriPolicy {
42
42
  /**
43
43
  * No filesystem access, so existence cannot be checked — every URI is
44
44
  * treated as loadable and returned unchanged. A later load that misses
45
- * therefore reaches the filesystem and throws, which
46
- * `AbstractHydraniumLangiumDocuments.getOrCreateDocument` absorbs into its
47
- * empty-document fallback: under this policy that fallback, not this method,
48
- * is what makes a missing file a placeholder rather than an error.
45
+ * therefore reaches the filesystem and throws, which reports the miss with
46
+ * the reason the read failed. Under a policy that CAN check, the miss is
47
+ * caught earlier and reported without one.
49
48
  */
50
49
  loadUri(uri) {
51
50
  return UriUtils.toUri(uri);
@@ -89,11 +88,13 @@ export class DefaultDocumentUriPolicy {
89
88
  * `loadUri` returns `undefined` for an absent path (honest about existence, so a
90
89
  * caller about to read the filesystem skips it).
91
90
  *
92
- * If the bound provider has no `realpath` (in-memory / browser / empty),
93
- * both methods degrade to {@link DefaultDocumentUriPolicy} automatically — the
94
- * `loadUri` ternary tests the *method's presence*, not its return, so the
95
- * existence signal is preserved: `loadUri` returns `undefined` only when
96
- * `realpath` is present and reports the path absent.
91
+ * If the provider for a URI's scheme has no `realpath` (in-memory / browser /
92
+ * empty), the framework's `FileSystemProviderRegistry` returns the URI
93
+ * unchanged and both methods answer as {@link DefaultDocumentUriPolicy} does. A
94
+ * slot bound to a provider without `realpath` degrades the same way: the
95
+ * `loadUri` ternary tests the *method's presence*, not its return, so
96
+ * `loadUri` returns `undefined` only when `realpath` is present and reports the
97
+ * path absent.
97
98
  */
98
99
  export class RealpathDocumentUriPolicy extends DefaultDocumentUriPolicy {
99
100
  fs;
@@ -1 +1 @@
1
- {"version":3,"file":"document-uri-policy.js","sourceRoot":"","sources":["../../../src/langium/workspace/document-uri-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAqB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAY,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAexD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CAAC,GAAiB,EAAE,EAA6B;IACpF,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,MAAM,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAO,IAAI,IAAI,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1F,CAAC;AAgDD;;;;;GAKG;AACH,MAAM,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,YAAY,CAAC,GAAiB;QACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;QAClD,yEAAyE;QACzE,uEAAuE;QACvE,OAAO,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACpF,CAAC;IAEQ,OAAO,CAAC,GAAiB;QAC/B,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QACD,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnC,kEAAkE;QAClE,yEAAyE;QACzE,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACrD,CAAC;CACH"}
@@ -0,0 +1,23 @@
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 URI } from '@hydranium/langium';
10
+ /**
11
+ * A missing-file error shaped as a Node file system raises it, with code
12
+ * `ENOENT` and the path: callers tell a missing file from any other failure by
13
+ * those two fields, whichever provider is bound. The release relies on it to
14
+ * tell a document gone meanwhile from any other failed rebuild.
15
+ */
16
+ export declare function notFound(message: string, uri: URI): Error;
17
+ /**
18
+ * Whether `err` reports that the file of `target` does not exist, as a Node
19
+ * file system and {@link notFound} do: code `ENOENT`, with `target`'s path. A
20
+ * missing file of another document is a different failure.
21
+ */
22
+ export declare function isFileNotFound(err: unknown, target: URI): boolean;
23
+ //# sourceMappingURL=file-not-found.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-not-found.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/file-not-found.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAK9C;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,KAAK,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAKjE"}
@@ -0,0 +1,31 @@
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
+ // Not re-exported from the workspace barrel: the framework's providers and
10
+ // the release handler share it, and it is no API of theirs.
11
+ /**
12
+ * A missing-file error shaped as a Node file system raises it, with code
13
+ * `ENOENT` and the path: callers tell a missing file from any other failure by
14
+ * those two fields, whichever provider is bound. The release relies on it to
15
+ * tell a document gone meanwhile from any other failed rebuild.
16
+ */
17
+ export function notFound(message, uri) {
18
+ return Object.assign(new Error(message), { code: 'ENOENT', path: uri.fsPath });
19
+ }
20
+ /**
21
+ * Whether `err` reports that the file of `target` does not exist, as a Node
22
+ * file system and {@link notFound} do: code `ENOENT`, with `target`'s path. A
23
+ * missing file of another document is a different failure.
24
+ */
25
+ export function isFileNotFound(err, target) {
26
+ if (typeof err !== 'object' || err === null || !('code' in err) || err.code !== 'ENOENT') {
27
+ return false;
28
+ }
29
+ return !('path' in err) || err.path === target.fsPath;
30
+ }
31
+ //# sourceMappingURL=file-not-found.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-not-found.js","sourceRoot":"","sources":["../../../src/langium/workspace/file-not-found.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF,2EAA2E;AAC3E,4DAA4D;AAE5D;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,GAAQ;IAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AAClF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY,EAAE,MAAW;IACrD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACxF,OAAO,KAAK,CAAC;IAChB,CAAC;IACD,OAAO,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC;AACzD,CAAC"}
@@ -8,23 +8,149 @@
8
8
  ********************************************************************************/
9
9
  import { type Tracer } from '@hydranium/protocol';
10
10
  import { EmptyFileSystemProvider } from '@hydranium/langium';
11
- import type { URI } from '@hydranium/langium';
12
- import { type WritableFileSystemProvider } from '../../documents/ast-document-manager.js';
11
+ import type { FileSystemNode, FileSystemProvider, URI } from '@hydranium/langium';
12
+ import { type SelfSaveRegistry } from './self-save-registry.js';
13
13
  import { type LogNameOptions } from '../diagnostics/logger.js';
14
14
  import { type ServerSharedServicesMinimal } from '../shared-services.js';
15
15
  /**
16
- * Empty-filesystem default {@link WritableFileSystemProvider}. For
17
- * in-memory / browser / test / CLI hosts that don't have a real filesystem.
18
- * All writes are no-ops. This is the portable `.`-entry default; the
19
- * Node-backed `DefaultFileSystemProvider`
20
- * lives in `@hydranium/core/node` (it pulls `node:fs`).
16
+ * File-system provider extension that supports writes. Langium's standard
17
+ * {@link FileSystemProvider} is read-only; `AstDocumentManager` needs to persist
18
+ * saves, so consumers wire in a provider that implements this superset.
19
+ *
20
+ * Implementations may optionally hold a reference to a
21
+ * {@link SelfSaveRegistry} so they can record their own write mtimes and
22
+ * help downstream file-watchers suppress echo events for those writes.
23
+ * The framework's `DefaultFileSystemProvider` reads it from
24
+ * `services.workspace.SelfSaveRegistry`; alternative implementations can do
25
+ * the same or leave the field unset.
26
+ */
27
+ export interface WritableFileSystemProvider extends FileSystemProvider {
28
+ writeFile(uri: URI, content: string): Promise<void>;
29
+ /**
30
+ * Last-modified time (ms) of the file at `uri`, or `undefined` if it can't
31
+ * be determined (missing file, or a provider with no disk — in-memory /
32
+ * browser). Optional: the only consumer is self-save echo suppression
33
+ * (`didChangeWatchedFiles`), which simply lets a change through when the
34
+ * mtime is unavailable. Distinct from Langium's `stat` (whose
35
+ * `FileSystemNode` carries no mtime). Keeping disk access on the provider
36
+ * seam is what lets the LSP update handler avoid a direct `node:fs` import.
37
+ */
38
+ mtimeMs?(uri: URI): Promise<number | undefined>;
39
+ /**
40
+ * Resolve `uri` to its real on-disk identity (symlinks collapsed, `..`/`.`
41
+ * walked, case-folded on case-insensitive filesystems), or `undefined` *iff
42
+ * the filesystem knows the path is absent*. The single source of the
43
+ * "nothing loadable here" signal `RealpathDocumentUriPolicy` turns into
44
+ * the synthetic-placeholder branch of `getOrCreateDocument`.
45
+ *
46
+ * Contract for implementers:
47
+ * - A `file:`-backed provider returns the resolved URI when the file exists,
48
+ * and `undefined` when it cannot resolve the path (missing / unreadable).
49
+ * - A non-`file:` URI (or any URI the provider cannot stat) passes through
50
+ * **unchanged** — it is treated as present, never reported absent.
51
+ * - A provider with no disk to check (in-memory / browser / empty) simply
52
+ * omits this method; the framework's `FileSystemProviderRegistry` then
53
+ * returns the URI unchanged, and `RealpathDocumentUriPolicy` answers as
54
+ * the syntactic `DefaultDocumentUriPolicy` does.
55
+ *
56
+ * Synchronous (a `realpath` is a kernel-cached syscall) and optional — the
57
+ * only consumers are the document-identity policy's `canonicalUri`/`loadUri`.
58
+ * Keeping the syscall on the provider seam is what lets the policy stay
59
+ * browser-neutral (no `node:fs` import).
60
+ */
61
+ realpath?(uri: URI): URI | undefined;
62
+ /** Registry the provider records its own writes against. Optional — providers without watcher integration may omit. */
63
+ readonly selfSaveRegistry?: SelfSaveRegistry;
64
+ }
65
+ /**
66
+ * Empty-filesystem {@link WritableFileSystemProvider}. For browser / test / CLI
67
+ * hosts that don't have a real filesystem. All writes are no-ops. On the
68
+ * portable `.` entry it is the {@link FileSystemProviderRegistry.host} when
69
+ * `context.fileSystemProvider` gives no writable provider; the Node-backed
70
+ * `DefaultFileSystemProvider` lives in `@hydranium/core/node` (it pulls
71
+ * `node:fs`).
21
72
  */
22
73
  export declare class DefaultEmptyFileSystemProvider extends EmptyFileSystemProvider implements WritableFileSystemProvider {
23
74
  protected readonly services: ServerSharedServicesMinimal;
24
75
  protected readonly tracer: Tracer;
25
76
  constructor(services: ServerSharedServicesMinimal, options?: LogNameOptions);
26
77
  writeFile(_uri: URI, _content: string): Promise<void>;
27
- readFile(uri?: URI): Promise<string>;
28
- readFileSync(uri?: URI): string;
78
+ readFile(_uri?: URI): Promise<string>;
79
+ readBinary(_uri?: URI): Promise<Uint8Array>;
80
+ stat(uri: URI): Promise<FileSystemNode>;
81
+ }
82
+ /**
83
+ * The provider bound on `workspace.FileSystemProvider`: it dispatches each call
84
+ * by the URI's scheme to the provider registered for it in the shared
85
+ * `fileSystemProviders` group, and to the {@link host} for any scheme without
86
+ * one.
87
+ *
88
+ * So one provider answers for each scheme, and a host's provider needs to know
89
+ * only its own: the framework registers `virtual:` there, and an adopter adds a
90
+ * scheme by contributing to the group. The host takes every unclaimed scheme
91
+ * rather than `file:` alone, which keeps an in-memory workspace under `memory:`
92
+ * or any other scheme on the host's provider.
93
+ *
94
+ * `THost` types the host, so an adopter whose own provider has more members
95
+ * than the base declares the slot as `FileSystemProviderRegistry<MyProvider>`,
96
+ * binds a {@link DefaultFileSystemProviderRegistry} with that host, and reads
97
+ * those members through `services.workspace.FileSystemProvider.host`.
98
+ */
99
+ export interface FileSystemProviderRegistry<THost extends WritableFileSystemProvider = WritableFileSystemProvider> extends WritableFileSystemProvider {
100
+ /** The provider for every scheme no entry of `fileSystemProviders` claims. */
101
+ readonly host: THost;
102
+ /** The provider that answers for `uri`. */
103
+ providerFor(uri: URI): WritableFileSystemProvider;
104
+ }
105
+ /** Options for {@link DefaultFileSystemProviderRegistry}. */
106
+ export interface FileSystemProviderRegistryOptions<THost extends WritableFileSystemProvider = WritableFileSystemProvider> extends LogNameOptions {
107
+ /**
108
+ * The provider for every scheme no entry of `fileSystemProviders` claims.
109
+ * The framework passes the provider `context.fileSystemProvider` returns,
110
+ * or a {@link DefaultEmptyFileSystemProvider} when that is not writable.
111
+ */
112
+ host: THost;
113
+ }
114
+ /**
115
+ * The framework's {@link FileSystemProviderRegistry}.
116
+ *
117
+ * A directory is listed by the provider of its own scheme, so a workspace
118
+ * root's tree comes from that provider alone.
119
+ *
120
+ * `realpath` and `mtimeMs` are always present and forward to the scheme's
121
+ * provider. Where that provider lacks one, `realpath` returns the URI unchanged
122
+ * and `mtimeMs` returns `undefined`: the answers `RealpathDocumentUriPolicy`
123
+ * and the self-save filter already give a provider without them.
124
+ */
125
+ export declare class DefaultFileSystemProviderRegistry<THost extends WritableFileSystemProvider = WritableFileSystemProvider> implements FileSystemProviderRegistry<THost> {
126
+ protected readonly services: ServerSharedServicesMinimal & {
127
+ fileSystemProviders: Record<string, WritableFileSystemProvider>;
128
+ };
129
+ readonly host: THost;
130
+ protected readonly tracer: Tracer;
131
+ constructor(services: ServerSharedServicesMinimal & {
132
+ fileSystemProviders: Record<string, WritableFileSystemProvider>;
133
+ }, options: FileSystemProviderRegistryOptions<THost>);
134
+ /**
135
+ * The group is read per call, not in the constructor, so a registered
136
+ * provider is built on first use and may read slots that reach back to this
137
+ * one. Only an OWN key of the group counts: the DI container resolves any
138
+ * key found on the prototype chain, so a scheme such as `constructor` would
139
+ * otherwise dispatch to a function.
140
+ */
141
+ providerFor(uri: URI): WritableFileSystemProvider;
142
+ writeFile(uri: URI, content: string): Promise<void>;
143
+ mtimeMs(uri: URI): Promise<number | undefined>;
144
+ realpath(uri: URI): URI | undefined;
145
+ stat(uri: URI): Promise<FileSystemNode>;
146
+ statSync(uri: URI): FileSystemNode;
147
+ exists(uri: URI): Promise<boolean>;
148
+ existsSync(uri: URI): boolean;
149
+ readBinary(uri: URI): Promise<Uint8Array>;
150
+ readBinarySync(uri: URI): Uint8Array;
151
+ readFile(uri: URI): Promise<string>;
152
+ readFileSync(uri: URI): string;
153
+ readDirectory(uri: URI): Promise<FileSystemNode[]>;
154
+ readDirectorySync(uri: URI): FileSystemNode[];
29
155
  }
30
156
  //# sourceMappingURL=file-system-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-system-provider.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAGzE;;;;;;GAMG;AACH,qBAAa,8BAA+B,SAAQ,uBAAwB,YAAW,0BAA0B;IAI3G,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B;IAH3D,SAAS,CAAC,QAAQ,CAAC,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AAG,GAAG,cAAc,EAAE,CAE5C;CACH"}
@@ -7,13 +7,13 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { EmptyFileSystemProvider } from '@hydranium/langium';
10
- import { serveVirtualDocument } from './virtual-document.js';
11
10
  /**
12
- * Empty-filesystem default {@link WritableFileSystemProvider}. For
13
- * in-memory / browser / test / CLI hosts that don't have a real filesystem.
14
- * All writes are no-ops. This is the portable `.`-entry default; the
15
- * Node-backed `DefaultFileSystemProvider`
16
- * lives in `@hydranium/core/node` (it pulls `node:fs`).
11
+ * Empty-filesystem {@link WritableFileSystemProvider}. For browser / test / CLI
12
+ * hosts that don't have a real filesystem. All writes are no-ops. On the
13
+ * portable `.` entry it is the {@link FileSystemProviderRegistry.host} when
14
+ * `context.fileSystemProvider` gives no writable provider; the Node-backed
15
+ * `DefaultFileSystemProvider` lives in `@hydranium/core/node` (it pulls
16
+ * `node:fs`).
17
17
  */
18
18
  export class DefaultEmptyFileSystemProvider extends EmptyFileSystemProvider {
19
19
  services;
@@ -26,16 +26,95 @@ export class DefaultEmptyFileSystemProvider extends EmptyFileSystemProvider {
26
26
  async writeFile(_uri, _content) {
27
27
  // no-op
28
28
  }
29
- // Serve virtual documents from the registered document (there is no disk to
30
- // read); delegate everything else to the empty base (which throws). The
31
- // base declares these param-less, so the param is optional here.
32
- readFile(uri) {
33
- const served = uri !== undefined ? serveVirtualDocument(this.services, uri) : undefined;
34
- return served !== undefined ? Promise.resolve(served) : super.readFile();
29
+ // `async` so the base's refusal becomes a rejection: it throws
30
+ // SYNCHRONOUSLY from a method declared to return a promise, and a
31
+ // synchronous throw escapes the promise chain — `.catch()` never attaches
32
+ // and `Promise.all` dies while its argument array is still being built, so
33
+ // a caller reading several URIs cannot handle the miss it asked about. The
34
+ // base declares `readFile` and `readBinary` param-less, so the param is
35
+ // optional there.
36
+ async readFile(_uri) {
37
+ return super.readFile();
38
+ }
39
+ async readBinary(_uri) {
40
+ return super.readBinary();
41
+ }
42
+ async stat(uri) {
43
+ return super.stat(uri);
44
+ }
45
+ }
46
+ /**
47
+ * The framework's {@link FileSystemProviderRegistry}.
48
+ *
49
+ * A directory is listed by the provider of its own scheme, so a workspace
50
+ * root's tree comes from that provider alone.
51
+ *
52
+ * `realpath` and `mtimeMs` are always present and forward to the scheme's
53
+ * provider. Where that provider lacks one, `realpath` returns the URI unchanged
54
+ * and `mtimeMs` returns `undefined`: the answers `RealpathDocumentUriPolicy`
55
+ * and the self-save filter already give a provider without them.
56
+ */
57
+ export class DefaultFileSystemProviderRegistry {
58
+ services;
59
+ host;
60
+ tracer;
61
+ constructor(services, options) {
62
+ this.services = services;
63
+ this.host = options.host;
64
+ this.tracer = services.Tracer.for(options.logName ?? this.constructor.name).trace('instantiated');
65
+ }
66
+ /**
67
+ * The group is read per call, not in the constructor, so a registered
68
+ * provider is built on first use and may read slots that reach back to this
69
+ * one. Only an OWN key of the group counts: the DI container resolves any
70
+ * key found on the prototype chain, so a scheme such as `constructor` would
71
+ * otherwise dispatch to a function.
72
+ */
73
+ providerFor(uri) {
74
+ const providers = this.services.fileSystemProviders;
75
+ return Object.hasOwn(providers, uri.scheme) ? providers[uri.scheme] : this.host;
76
+ }
77
+ // The async methods are `async` so a provider that throws synchronously from
78
+ // one still rejects, for the reason `DefaultEmptyFileSystemProvider` gives.
79
+ async writeFile(uri, content) {
80
+ return this.providerFor(uri).writeFile(uri, content);
81
+ }
82
+ async mtimeMs(uri) {
83
+ return this.providerFor(uri).mtimeMs?.(uri);
84
+ }
85
+ realpath(uri) {
86
+ const provider = this.providerFor(uri);
87
+ return provider.realpath ? provider.realpath(uri) : uri;
88
+ }
89
+ async stat(uri) {
90
+ return this.providerFor(uri).stat(uri);
91
+ }
92
+ statSync(uri) {
93
+ return this.providerFor(uri).statSync(uri);
94
+ }
95
+ async exists(uri) {
96
+ return this.providerFor(uri).exists(uri);
97
+ }
98
+ existsSync(uri) {
99
+ return this.providerFor(uri).existsSync(uri);
100
+ }
101
+ async readBinary(uri) {
102
+ return this.providerFor(uri).readBinary(uri);
103
+ }
104
+ readBinarySync(uri) {
105
+ return this.providerFor(uri).readBinarySync(uri);
106
+ }
107
+ async readFile(uri) {
108
+ return this.providerFor(uri).readFile(uri);
35
109
  }
36
110
  readFileSync(uri) {
37
- const served = uri !== undefined ? serveVirtualDocument(this.services, uri) : undefined;
38
- return served !== undefined ? served : super.readFileSync();
111
+ return this.providerFor(uri).readFileSync(uri);
112
+ }
113
+ async readDirectory(uri) {
114
+ return this.providerFor(uri).readDirectory(uri);
115
+ }
116
+ readDirectorySync(uri) {
117
+ return this.providerFor(uri).readDirectorySync(uri);
39
118
  }
40
119
  }
41
120
  //# sourceMappingURL=file-system-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-system-provider.js","sourceRoot":"","sources":["../../../src/langium/workspace/file-system-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAGlF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAK7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;GAMG;AACH,MAAM,OAAO,8BAA+B,SAAQ,uBAAuB;IAIlD;IAHH,MAAM,CAAS;IAElC,YACsB,QAAqC,EACxD,UAA0B,EAAE;QAE5B,KAAK,EAAE,CAAC;QAHW,aAAQ,GAAR,QAAQ,CAA6B;QAIxD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IACrG,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAS,EAAE,QAAgB;QACxC,QAAQ;IACX,CAAC;IAED,4EAA4E;IAC5E,wEAAwE;IACxE,iEAAiE;IACxD,QAAQ,CAAC,GAAS;QACxB,MAAM,MAAM,GAAG,GAAG,KAAK,SAAS,CAAC,CAAC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AG,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,GAAQ;QACzB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;IAED,iBAAiB,CAAC,GAAQ;QACvB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;CACH"}
@@ -6,7 +6,13 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { type AstNode, DefaultLangiumDocumentFactory, type LangiumDocument, type URI } from '@hydranium/langium';
9
+ import { type AstNode, DefaultLangiumDocumentFactory, type LangiumDocument, type Mutable, type ParseResult, type URI } from '@hydranium/langium';
10
+ import { type CancellationToken } from 'vscode-languageserver-protocol';
11
+ import { type TextDocument } from 'vscode-languageserver-textdocument';
12
+ import { type ModelLedger } from '../../documents/model-ledger.js';
13
+ import { type VersionSyncService } from '../../documents/version-sync-service.js';
14
+ import { type ExtendedServiceRegistry } from '../service-registry.js';
15
+ import { type ServerSharedServicesMinimal } from '../shared-services.js';
10
16
  /**
11
17
  * Framework `LangiumDocumentFactory` that fills in the one thing Langium
12
18
  * leaves empty for a code-built document: its text.
@@ -34,7 +40,56 @@ import { type AstNode, DefaultLangiumDocumentFactory, type LangiumDocument, type
34
40
  * node identity is preserved.
35
41
  */
36
42
  export declare class HydraniumLangiumDocumentFactory extends DefaultLangiumDocumentFactory {
43
+ /**
44
+ * Narrows the inherited Langium `ServiceRegistry` field to the framework's
45
+ * {@link ExtendedServiceRegistry}, so the by-id lookup below needs no
46
+ * per-callsite cast. The framework's shared module binds that class.
47
+ */
48
+ protected readonly serviceRegistry: ExtendedServiceRegistry;
49
+ /** Resolved per call: the sync service reaches the registry, which is built with this factory. */
50
+ protected readonly versionSyncService: () => VersionSyncService;
51
+ protected readonly modelLedger: () => ModelLedger;
52
+ constructor(services: ServerSharedServicesMinimal);
53
+ /**
54
+ * Parse `text` for `uri` under the grammar `languageId` names, instead of
55
+ * the one `uri` routes to.
56
+ *
57
+ * For a URI that routes to no grammar at all: a directory, or any other URI
58
+ * that names no file and so carries no extension. Langium's ladder ends at
59
+ * the extension, so it reports `no services for the extension ''` from
60
+ * inside the parse — naming neither the URI nor the caller that could have
61
+ * said which grammar it meant.
62
+ *
63
+ * The caller supplies the language because nothing else can. A URI with no
64
+ * extension carries no routing signal, and choosing on its behalf would be a
65
+ * guess the moment a second grammar is registered — which is why this takes
66
+ * the id rather than falling back to a sole registered language.
67
+ *
68
+ * @throws when `languageId` names no registered grammar.
69
+ */
70
+ fromStringInLanguage<T extends AstNode = AstNode>(text: string, uri: URI, languageId: string): LangiumDocument<T>;
37
71
  fromModel<T extends AstNode = AstNode>(model: T, uri: URI): LangiumDocument<T>;
72
+ protected createLangiumDocument<T extends AstNode = AstNode>(parseResult: ParseResult<T>, uri: URI, textDocument?: TextDocument, text?: string): LangiumDocument<T>;
73
+ /**
74
+ * The version is read before the parse, for the same reason as in
75
+ * {@link update}: the text document is the store's, which an edit updates
76
+ * in place while the parse runs.
77
+ */
78
+ protected createAsync<T extends AstNode = AstNode>(uri: URI, content: string | TextDocument, cancelToken: CancellationToken): Promise<LangiumDocument<T>>;
79
+ /**
80
+ * The store's version is read before Langium's `update`, which reads the
81
+ * store's text before its first await: read after, it can belong to an
82
+ * edit that arrived while the parse ran.
83
+ *
84
+ * Reconciled with the store here rather than in a `Parsed` listener, which
85
+ * a cancel skips, leaving the root on the version of its earlier text.
86
+ */
87
+ update<T extends AstNode = AstNode>(document: Mutable<LangiumDocument<T>>, cancellationToken: CancellationToken): Promise<LangiumDocument<T>>;
88
+ /**
89
+ * `version`, or {@link STALE_VERSION} when the store holds `uri` open with
90
+ * other text than `parsed`: text read from the file while an open landed.
91
+ */
92
+ protected versionOfParsedText(uri: URI, parsed: string | undefined, version: number): number;
38
93
  /**
39
94
  * Serialize `model` via the per-language serializer, or `undefined` if none
40
95
  * is bound, it fails, or it is async — `fromModel` is synchronous, so an
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-langium-document-factory.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-langium-document-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,OAAO,EAEZ,6BAA6B,EAC7B,KAAK,eAAe,EAEpB,KAAK,GAAG,EACV,MAAM,oBAAoB,CAAC;AAQ5B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,+BAAgC,SAAQ,6BAA6B;IACtE,SAAS,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC;IAYvF;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS;CASxE"}
1
+ {"version":3,"file":"hydranium-langium-document-factory.d.ts","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-langium-document-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,KAAK,OAAO,EAEZ,6BAA6B,EAC7B,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,GAAG,EACV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EA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AAC,CAAC,CAAC,EACrC,iBAAiB,EAAE,iBAAiB,GACpC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAY7B;IAED;;;OAGG;IACH,SAAS,CAAC,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG3F;IAED;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAQrE;CACH"}
@@ -7,6 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { AstUtils, DefaultLangiumDocumentFactory } from '@hydranium/langium';
10
+ import { STALE_VERSION } from '@hydranium/protocol';
10
11
  /**
11
12
  * Framework `LangiumDocumentFactory` that fills in the one thing Langium
12
13
  * leaves empty for a code-built document: its text.
@@ -34,6 +35,39 @@ import { AstUtils, DefaultLangiumDocumentFactory } from '@hydranium/langium';
34
35
  * node identity is preserved.
35
36
  */
36
37
  export class HydraniumLangiumDocumentFactory extends DefaultLangiumDocumentFactory {
38
+ /** Resolved per call: the sync service reaches the registry, which is built with this factory. */
39
+ versionSyncService;
40
+ modelLedger;
41
+ constructor(services) {
42
+ super(services);
43
+ this.versionSyncService = () => services.workspace.VersionSyncService;
44
+ this.modelLedger = () => services.workspace.ModelLedger;
45
+ }
46
+ /**
47
+ * Parse `text` for `uri` under the grammar `languageId` names, instead of
48
+ * the one `uri` routes to.
49
+ *
50
+ * For a URI that routes to no grammar at all: a directory, or any other URI
51
+ * that names no file and so carries no extension. Langium's ladder ends at
52
+ * the extension, so it reports `no services for the extension ''` from
53
+ * inside the parse — naming neither the URI nor the caller that could have
54
+ * said which grammar it meant.
55
+ *
56
+ * The caller supplies the language because nothing else can. A URI with no
57
+ * extension carries no routing signal, and choosing on its behalf would be a
58
+ * guess the moment a second grammar is registered — which is why this takes
59
+ * the id rather than falling back to a sole registered language.
60
+ *
61
+ * @throws when `languageId` names no registered grammar.
62
+ */
63
+ fromStringInLanguage(text, uri, languageId) {
64
+ const services = this.serviceRegistry.getServicesById(languageId);
65
+ if (!services) {
66
+ throw new Error(`No grammar is registered for the language id '${languageId}' (parsing ${uri.toString()}).`);
67
+ }
68
+ const parseResult = services.parser.LangiumParser.parse(text);
69
+ return this.createLangiumDocument(parseResult, uri, undefined, text);
70
+ }
37
71
  fromModel(model, uri) {
38
72
  // Make the code-built AST as structurally complete as a parsed one — the
39
73
  // parser links containers, `fromModel` does not. In place (identity kept).
@@ -45,6 +79,51 @@ export class HydraniumLangiumDocumentFactory extends DefaultLangiumDocumentFacto
45
79
  const parseResult = { value: model, parserErrors: [], lexerErrors: [] };
46
80
  return this.createLangiumDocument(parseResult, uri, undefined, text);
47
81
  }
82
+ createLangiumDocument(parseResult, uri, textDocument, text) {
83
+ const document = super.createLangiumDocument(parseResult, uri, textDocument, text);
84
+ // Without `textDocument` Langium creates one at version 0 on first read,
85
+ // which needs a language for `uri` that a folder URI does not have.
86
+ const parsed = parseResult.value.$cstNode?.root.fullText ?? text ?? textDocument?.getText();
87
+ this.versionSyncService().modelProduced(document, { version: this.versionOfParsedText(uri, parsed, textDocument?.version ?? 0) });
88
+ return document;
89
+ }
90
+ /**
91
+ * The version is read before the parse, for the same reason as in
92
+ * {@link update}: the text document is the store's, which an edit updates
93
+ * in place while the parse runs.
94
+ */
95
+ async createAsync(uri, content, cancelToken) {
96
+ const version = typeof content === 'string' ? undefined : content.version;
97
+ const document = await super.createAsync(uri, content, cancelToken);
98
+ if (version !== undefined) {
99
+ this.versionSyncService().modelProduced(document, { version });
100
+ }
101
+ return document;
102
+ }
103
+ /**
104
+ * The store's version is read before Langium's `update`, which reads the
105
+ * store's text before its first await: read after, it can belong to an
106
+ * edit that arrived while the parse ran.
107
+ *
108
+ * Reconciled with the store here rather than in a `Parsed` listener, which
109
+ * a cancel skips, leaving the root on the version of its earlier text.
110
+ */
111
+ async update(document, cancellationToken) {
112
+ const stored = this.textDocuments?.get(document.uri.toString())?.version;
113
+ const updated = await super.update(document, cancellationToken);
114
+ const version = stored ??
115
+ this.versionOfParsedText(updated.uri, this.modelLedger().textOf(updated.parseResult.value) ?? updated.textDocument.getText(), updated.textDocument.version);
116
+ this.versionSyncService().modelProduced(updated, { version });
117
+ return updated;
118
+ }
119
+ /**
120
+ * `version`, or {@link STALE_VERSION} when the store holds `uri` open with
121
+ * other text than `parsed`: text read from the file while an open landed.
122
+ */
123
+ versionOfParsedText(uri, parsed, version) {
124
+ const open = this.textDocuments?.get(uri.toString());
125
+ return open !== undefined && parsed !== undefined && open.getText() !== parsed ? STALE_VERSION : version;
126
+ }
48
127
  /**
49
128
  * Serialize `model` via the per-language serializer, or `undefined` if none
50
129
  * is bound, it fails, or it is async — `fromModel` is synchronous, so an
@@ -1 +1 @@
1
- {"version":3,"file":"hydranium-langium-document-factory.js","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-langium-document-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,QAAQ,EACR,6BAA6B,EAI/B,MAAM,oBAAoB,CAAC;AAQ5B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,+BAAgC,SAAQ,6BAA6B;IACtE,SAAS,CAA8B,KAAQ,EAAE,GAAQ;QAC/D,yEAAyE;QACzE,2EAA2E;QAC3E,QAAQ,CAAC,sBAAsB,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC7C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,WAAW,GAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,qBAAqB,CAAI,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACO,cAAc,CAAC,KAAc,EAAE,GAAQ;QAC9C,IAAI,CAAC;YACF,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,GAAG,CAAmB,CAAC;YACzE,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;YACxE,OAAO,OAAO,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,CAAC;QAAC,MAAM,CAAC;YACN,OAAO,SAAS,CAAC;QACpB,CAAC;IACJ,CAAC;CACH"}
1
+ {"version":3,"file":"hydranium-langium-document-factory.js","sourceRoot":"","sources":["../../../src/langium/workspace/hydranium-langium-document-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAEJ,QAAQ,EACR,6BAA6B,EAK/B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAYpD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,+BAAgC,SAAQ,6BAA6B;IAQ/E,kGAAkG;IAC/E,kBAAkB,CAA2B;IAC7C,WAAW,CAAoB;IAElD,YAAY,QAAqC;QAC9C,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,kBAAkB,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC;QACtE,IAAI,CAAC,WAAW,GAAG,GAAG,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC;IAC3D,CAAC;IAED;;;;;;;;;;;;;;;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