@cratis/screenplay-language 4.124.0 → 4.124.1

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 (396) hide show
  1. package/README.md +50 -0
  2. package/dist/bundles/TypeReferenceSymbol.js +2 -0
  3. package/dist/bundles/TypeReferenceSymbol.js.map +1 -0
  4. package/dist/bundles/_virtual/_virtual/_rolldown/runtime.js +1 -0
  5. package/dist/bundles/bmp-word-characters.js +2 -0
  6. package/dist/bundles/bmp-word-characters.js.map +1 -0
  7. package/dist/bundles/case-authoring.js +3 -0
  8. package/dist/bundles/case-authoring.js.map +1 -0
  9. package/dist/bundles/code-actions.js +2 -0
  10. package/dist/bundles/code-actions.js.map +1 -0
  11. package/dist/bundles/compiler/Authoring/QuickFixes.js +5 -0
  12. package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -0
  13. package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js +2 -0
  14. package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js.map +1 -0
  15. package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js +2 -0
  16. package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js.map +1 -0
  17. package/dist/bundles/compiler/Dependencies/DependencyGraph.js +2 -0
  18. package/dist/bundles/compiler/Dependencies/DependencyGraph.js.map +1 -0
  19. package/dist/bundles/compiler/Dependencies/DependencyKind.js +2 -0
  20. package/dist/bundles/compiler/Dependencies/DependencyKind.js.map +1 -0
  21. package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js +2 -0
  22. package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js.map +1 -0
  23. package/dist/bundles/compiler/Dependencies/SliceReferences.js +2 -0
  24. package/dist/bundles/compiler/Dependencies/SliceReferences.js.map +1 -0
  25. package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js +2 -0
  26. package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js.map +1 -0
  27. package/dist/bundles/compiler/Dependencies/index.js +1 -0
  28. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +2 -0
  29. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -0
  30. package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js +2 -0
  31. package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js.map +1 -0
  32. package/dist/bundles/compiler/Diagnostics/SourceLocation.js +2 -0
  33. package/dist/bundles/compiler/Diagnostics/SourceLocation.js.map +1 -0
  34. package/dist/bundles/compiler/Files/AuthoredOrder.js +2 -0
  35. package/dist/bundles/compiler/Files/AuthoredOrder.js.map +1 -0
  36. package/dist/bundles/compiler/Files/OrderingRoot.js +1 -0
  37. package/dist/bundles/compiler/Files/PlayApplicationAssembly.js +2 -0
  38. package/dist/bundles/compiler/Files/PlayApplicationAssembly.js.map +1 -0
  39. package/dist/bundles/compiler/Files/PlayFolderMerge.js +2 -0
  40. package/dist/bundles/compiler/Files/PlayFolderMerge.js.map +1 -0
  41. package/dist/bundles/compiler/Files/PlayImports.js +1 -0
  42. package/dist/bundles/compiler/Files/PlayPlacement.js +2 -0
  43. package/dist/bundles/compiler/Files/PlayPlacement.js.map +1 -0
  44. package/dist/bundles/compiler/Files/TimelineOrder.js +2 -0
  45. package/dist/bundles/compiler/Files/TimelineOrder.js.map +1 -0
  46. package/dist/bundles/compiler/Parsing/AuthorizeParser.js +2 -0
  47. package/dist/bundles/compiler/Parsing/AuthorizeParser.js.map +1 -0
  48. package/dist/bundles/compiler/Parsing/CaptureParser.js +2 -0
  49. package/dist/bundles/compiler/Parsing/CaptureParser.js.map +1 -0
  50. package/dist/bundles/compiler/Parsing/CodeBlockParser.js +3 -0
  51. package/dist/bundles/compiler/Parsing/CodeBlockParser.js.map +1 -0
  52. package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js +2 -0
  53. package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js.map +1 -0
  54. package/dist/bundles/compiler/Parsing/CommandParser.js +2 -0
  55. package/dist/bundles/compiler/Parsing/CommandParser.js.map +1 -0
  56. package/dist/bundles/compiler/Parsing/CommandReadSources.js +2 -0
  57. package/dist/bundles/compiler/Parsing/CommandReadSources.js.map +1 -0
  58. package/dist/bundles/compiler/Parsing/CommandResponseParser.js +2 -0
  59. package/dist/bundles/compiler/Parsing/CommandResponseParser.js.map +1 -0
  60. package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js +2 -0
  61. package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js.map +1 -0
  62. package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js +2 -0
  63. package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js.map +1 -0
  64. package/dist/bundles/compiler/Parsing/CompositionParser.js +2 -0
  65. package/dist/bundles/compiler/Parsing/CompositionParser.js.map +1 -0
  66. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js +2 -0
  67. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js.map +1 -0
  68. package/dist/bundles/compiler/Parsing/ConditionParser.js +2 -0
  69. package/dist/bundles/compiler/Parsing/ConditionParser.js.map +1 -0
  70. package/dist/bundles/compiler/Parsing/ConstraintParser.js +2 -0
  71. package/dist/bundles/compiler/Parsing/ConstraintParser.js.map +1 -0
  72. package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js +2 -0
  73. package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js.map +1 -0
  74. package/dist/bundles/compiler/Parsing/DeclarationParsers.js +2 -0
  75. package/dist/bundles/compiler/Parsing/DeclarationParsers.js.map +1 -0
  76. package/dist/bundles/compiler/Parsing/DependencySourceParser.js +2 -0
  77. package/dist/bundles/compiler/Parsing/DependencySourceParser.js.map +1 -0
  78. package/dist/bundles/compiler/Parsing/DependsOnParser.js +2 -0
  79. package/dist/bundles/compiler/Parsing/DependsOnParser.js.map +1 -0
  80. package/dist/bundles/compiler/Parsing/DescriptionParser.js +2 -0
  81. package/dist/bundles/compiler/Parsing/DescriptionParser.js.map +1 -0
  82. package/dist/bundles/compiler/Parsing/DocumentationParser.js +2 -0
  83. package/dist/bundles/compiler/Parsing/DocumentationParser.js.map +1 -0
  84. package/dist/bundles/compiler/Parsing/EventMetadataParser.js +2 -0
  85. package/dist/bundles/compiler/Parsing/EventMetadataParser.js.map +1 -0
  86. package/dist/bundles/compiler/Parsing/EventSourceParser.js +2 -0
  87. package/dist/bundles/compiler/Parsing/EventSourceParser.js.map +1 -0
  88. package/dist/bundles/compiler/Parsing/EventSourceValidator.js +2 -0
  89. package/dist/bundles/compiler/Parsing/EventSourceValidator.js.map +1 -0
  90. package/dist/bundles/compiler/Parsing/EventSubjectValidator.js +2 -0
  91. package/dist/bundles/compiler/Parsing/EventSubjectValidator.js.map +1 -0
  92. package/dist/bundles/compiler/Parsing/ExpressionParser.js +2 -0
  93. package/dist/bundles/compiler/Parsing/ExpressionParser.js.map +1 -0
  94. package/dist/bundles/compiler/Parsing/FeatureBody.js +2 -0
  95. package/dist/bundles/compiler/Parsing/FeatureBody.js.map +1 -0
  96. package/dist/bundles/compiler/Parsing/FileImportParser.js +2 -0
  97. package/dist/bundles/compiler/Parsing/FileImportParser.js.map +1 -0
  98. package/dist/bundles/compiler/Parsing/FileReferences.js +2 -0
  99. package/dist/bundles/compiler/Parsing/FileReferences.js.map +1 -0
  100. package/dist/bundles/compiler/Parsing/GuardedActionParser.js +2 -0
  101. package/dist/bundles/compiler/Parsing/GuardedActionParser.js.map +1 -0
  102. package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js +2 -0
  103. package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js.map +1 -0
  104. package/dist/bundles/compiler/Parsing/GuardedActionValidator.js +2 -0
  105. package/dist/bundles/compiler/Parsing/GuardedActionValidator.js.map +1 -0
  106. package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js +2 -0
  107. package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js.map +1 -0
  108. package/dist/bundles/compiler/Parsing/IdentityParser.js +2 -0
  109. package/dist/bundles/compiler/Parsing/IdentityParser.js.map +1 -0
  110. package/dist/bundles/compiler/Parsing/IdentityValidator.js +2 -0
  111. package/dist/bundles/compiler/Parsing/IdentityValidator.js.map +1 -0
  112. package/dist/bundles/compiler/Parsing/ImplementationParser.js +3 -0
  113. package/dist/bundles/compiler/Parsing/ImplementationParser.js.map +1 -0
  114. package/dist/bundles/compiler/Parsing/ImportDiscovery.js +1 -0
  115. package/dist/bundles/compiler/Parsing/InlineEventValidator.js +2 -0
  116. package/dist/bundles/compiler/Parsing/InlineEventValidator.js.map +1 -0
  117. package/dist/bundles/compiler/Parsing/InputUses.js +2 -0
  118. package/dist/bundles/compiler/Parsing/InputUses.js.map +1 -0
  119. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js +2 -0
  120. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js.map +1 -0
  121. package/dist/bundles/compiler/Parsing/LineReader.js +2 -0
  122. package/dist/bundles/compiler/Parsing/LineReader.js.map +1 -0
  123. package/dist/bundles/compiler/Parsing/LineText.js +2 -0
  124. package/dist/bundles/compiler/Parsing/LineText.js.map +1 -0
  125. package/dist/bundles/compiler/Parsing/ModuleBody.js +2 -0
  126. package/dist/bundles/compiler/Parsing/ModuleBody.js.map +1 -0
  127. package/dist/bundles/compiler/Parsing/OperationParser.js +2 -0
  128. package/dist/bundles/compiler/Parsing/OperationParser.js.map +1 -0
  129. package/dist/bundles/compiler/Parsing/OperationValidator.js +2 -0
  130. package/dist/bundles/compiler/Parsing/OperationValidator.js.map +1 -0
  131. package/dist/bundles/compiler/Parsing/ParserContext.js +2 -0
  132. package/dist/bundles/compiler/Parsing/ParserContext.js.map +1 -0
  133. package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js +2 -0
  134. package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js.map +1 -0
  135. package/dist/bundles/compiler/Parsing/PolicyParser.js +2 -0
  136. package/dist/bundles/compiler/Parsing/PolicyParser.js.map +1 -0
  137. package/dist/bundles/compiler/Parsing/ProducesParser.js +2 -0
  138. package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -0
  139. package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js +2 -0
  140. package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js.map +1 -0
  141. package/dist/bundles/compiler/Parsing/ProjectionParser.js +2 -0
  142. package/dist/bundles/compiler/Parsing/ProjectionParser.js.map +1 -0
  143. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js +2 -0
  144. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js.map +1 -0
  145. package/dist/bundles/compiler/Parsing/PropertyLineParser.js +2 -0
  146. package/dist/bundles/compiler/Parsing/PropertyLineParser.js.map +1 -0
  147. package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js +2 -0
  148. package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js.map +1 -0
  149. package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js +2 -0
  150. package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js.map +1 -0
  151. package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js +2 -0
  152. package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js.map +1 -0
  153. package/dist/bundles/compiler/Parsing/PurposeParser.js +2 -0
  154. package/dist/bundles/compiler/Parsing/PurposeParser.js.map +1 -0
  155. package/dist/bundles/compiler/Parsing/PurposeValidator.js +2 -0
  156. package/dist/bundles/compiler/Parsing/PurposeValidator.js.map +1 -0
  157. package/dist/bundles/compiler/Parsing/QueryParser.js +2 -0
  158. package/dist/bundles/compiler/Parsing/QueryParser.js.map +1 -0
  159. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js +2 -0
  160. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js.map +1 -0
  161. package/dist/bundles/compiler/Parsing/ReactionParser.js +2 -0
  162. package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -0
  163. package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js +2 -0
  164. package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js.map +1 -0
  165. package/dist/bundles/compiler/Parsing/RedeliveryValues.js +2 -0
  166. package/dist/bundles/compiler/Parsing/RedeliveryValues.js.map +1 -0
  167. package/dist/bundles/compiler/Parsing/RefusalDeclarations.js +2 -0
  168. package/dist/bundles/compiler/Parsing/RefusalDeclarations.js.map +1 -0
  169. package/dist/bundles/compiler/Parsing/RefusalValueWalker.js +2 -0
  170. package/dist/bundles/compiler/Parsing/RefusalValueWalker.js.map +1 -0
  171. package/dist/bundles/compiler/Parsing/ResponseDateValues.js +2 -0
  172. package/dist/bundles/compiler/Parsing/ResponseDateValues.js.map +1 -0
  173. package/dist/bundles/compiler/Parsing/ResponseValidator.js +2 -0
  174. package/dist/bundles/compiler/Parsing/ResponseValidator.js.map +1 -0
  175. package/dist/bundles/compiler/Parsing/ScreenParser.js +2 -0
  176. package/dist/bundles/compiler/Parsing/ScreenParser.js.map +1 -0
  177. package/dist/bundles/compiler/Parsing/ScreenplayParser.js +2 -0
  178. package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -0
  179. package/dist/bundles/compiler/Parsing/SeedParser.js +2 -0
  180. package/dist/bundles/compiler/Parsing/SeedParser.js.map +1 -0
  181. package/dist/bundles/compiler/Parsing/SliceParser.js +2 -0
  182. package/dist/bundles/compiler/Parsing/SliceParser.js.map +1 -0
  183. package/dist/bundles/compiler/Parsing/SourceLine.js +2 -0
  184. package/dist/bundles/compiler/Parsing/SourceLine.js.map +1 -0
  185. package/dist/bundles/compiler/Parsing/SourceLineSplitter.js +3 -0
  186. package/dist/bundles/compiler/Parsing/SourceLineSplitter.js.map +1 -0
  187. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js +2 -0
  188. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js.map +1 -0
  189. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +2 -0
  190. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js.map +1 -0
  191. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js +2 -0
  192. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js.map +1 -0
  193. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js +2 -0
  194. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js.map +1 -0
  195. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +2 -0
  196. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js.map +1 -0
  197. package/dist/bundles/compiler/Parsing/SpecificationParser.js +2 -0
  198. package/dist/bundles/compiler/Parsing/SpecificationParser.js.map +1 -0
  199. package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js +2 -0
  200. package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js.map +1 -0
  201. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +2 -0
  202. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js.map +1 -0
  203. package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js +2 -0
  204. package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js.map +1 -0
  205. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +2 -0
  206. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -0
  207. package/dist/bundles/compiler/Parsing/StructuredValueParser.js +3 -0
  208. package/dist/bundles/compiler/Parsing/StructuredValueParser.js.map +1 -0
  209. package/dist/bundles/compiler/Parsing/TriggerDataParser.js +2 -0
  210. package/dist/bundles/compiler/Parsing/TriggerDataParser.js.map +1 -0
  211. package/dist/bundles/compiler/Parsing/UiBindingParser.js +2 -0
  212. package/dist/bundles/compiler/Parsing/UiBindingParser.js.map +1 -0
  213. package/dist/bundles/compiler/ScreenplayCompiler.js +2 -0
  214. package/dist/bundles/compiler/ScreenplayCompiler.js.map +1 -0
  215. package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js +2 -0
  216. package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js.map +1 -0
  217. package/dist/bundles/compiler/Syntax/CaptureEventsSource.js +2 -0
  218. package/dist/bundles/compiler/Syntax/CaptureEventsSource.js.map +1 -0
  219. package/dist/bundles/compiler/Syntax/DependencySources.js +2 -0
  220. package/dist/bundles/compiler/Syntax/DependencySources.js.map +1 -0
  221. package/dist/bundles/compiler/Syntax/EventDeclarations.js +2 -0
  222. package/dist/bundles/compiler/Syntax/EventDeclarations.js.map +1 -0
  223. package/dist/bundles/compiler/Syntax/EventSourceCatalog.js +2 -0
  224. package/dist/bundles/compiler/Syntax/EventSourceCatalog.js.map +1 -0
  225. package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js +2 -0
  226. package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js.map +1 -0
  227. package/dist/bundles/compiler/Syntax/ExactMathFacts.js +2 -0
  228. package/dist/bundles/compiler/Syntax/ExactMathFacts.js.map +1 -0
  229. package/dist/bundles/compiler/Syntax/ExactNumber.js +2 -0
  230. package/dist/bundles/compiler/Syntax/ExactNumber.js.map +1 -0
  231. package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js +2 -0
  232. package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js.map +1 -0
  233. package/dist/bundles/compiler/Syntax/LegacyWireProjection.js +2 -0
  234. package/dist/bundles/compiler/Syntax/LegacyWireProjection.js.map +1 -0
  235. package/dist/bundles/compiler/Syntax/Operations.js +2 -0
  236. package/dist/bundles/compiler/Syntax/Operations.js.map +1 -0
  237. package/dist/bundles/compiler/Syntax/PersonaCallers.js +2 -0
  238. package/dist/bundles/compiler/Syntax/PersonaCallers.js.map +1 -0
  239. package/dist/bundles/compiler/Syntax/ProductionDestinations.js +2 -0
  240. package/dist/bundles/compiler/Syntax/ProductionDestinations.js.map +1 -0
  241. package/dist/bundles/compiler/Syntax/PublicEventInvariants.js +2 -0
  242. package/dist/bundles/compiler/Syntax/PublicEventInvariants.js.map +1 -0
  243. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js +2 -0
  244. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -0
  245. package/dist/bundles/compiler/Syntax/SourceOptions.js +2 -0
  246. package/dist/bundles/compiler/Syntax/SourceOptions.js.map +1 -0
  247. package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js +2 -0
  248. package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js.map +1 -0
  249. package/dist/bundles/compiler/Syntax/StreamIdFormatter.js +2 -0
  250. package/dist/bundles/compiler/Syntax/StreamIdFormatter.js.map +1 -0
  251. package/dist/bundles/compiler/Syntax/StrictSyntaxJson.js +1 -0
  252. package/dist/bundles/compiler/Syntax/Structure.js +2 -0
  253. package/dist/bundles/compiler/Syntax/Structure.js.map +1 -0
  254. package/dist/bundles/compiler/Syntax/SyntaxCollections.js +2 -0
  255. package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -0
  256. package/dist/bundles/compiler/Syntax/SyntaxInvariants.js +2 -0
  257. package/dist/bundles/compiler/Syntax/SyntaxInvariants.js.map +1 -0
  258. package/dist/bundles/compiler/Syntax/SyntaxJson.js +2 -0
  259. package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -0
  260. package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js +2 -0
  261. package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js.map +1 -0
  262. package/dist/bundles/compiler/Syntax/index.js +1 -0
  263. package/dist/bundles/compiler/Text/ImplementationHintText.js +2 -0
  264. package/dist/bundles/compiler/Text/ImplementationHintText.js.map +1 -0
  265. package/dist/bundles/compiler/Text/ReservedWords.js +2 -0
  266. package/dist/bundles/compiler/Text/ReservedWords.js.map +1 -0
  267. package/dist/bundles/compiler/Text/SourceStreamNames.js +2 -0
  268. package/dist/bundles/compiler/Text/SourceStreamNames.js.map +1 -0
  269. package/dist/bundles/compiler/Text/StringLiteral.js +3 -0
  270. package/dist/bundles/compiler/Text/StringLiteral.js.map +1 -0
  271. package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js +2 -0
  272. package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js.map +1 -0
  273. package/dist/bundles/compiler/Text/patterns.js +2 -0
  274. package/dist/bundles/compiler/Text/patterns.js.map +1 -0
  275. package/dist/bundles/compiler/index.js +1 -0
  276. package/dist/bundles/completion-items.js +21 -0
  277. package/dist/bundles/completion-items.js.map +1 -0
  278. package/dist/bundles/completion-planner.js +5 -0
  279. package/dist/bundles/completion-planner.js.map +1 -0
  280. package/dist/bundles/completions.js +2 -0
  281. package/dist/bundles/completions.js.map +1 -0
  282. package/dist/bundles/dependency-completions.js +3 -0
  283. package/dist/bundles/dependency-completions.js.map +1 -0
  284. package/dist/bundles/dependency-target-analysis.js +2 -0
  285. package/dist/bundles/dependency-target-analysis.js.map +1 -0
  286. package/dist/bundles/diagnostic-codes.js +2 -0
  287. package/dist/bundles/diagnostic-codes.js.map +1 -0
  288. package/dist/bundles/diagnostics.js +2 -0
  289. package/dist/bundles/diagnostics.js.map +1 -0
  290. package/dist/bundles/document-context.js +2 -0
  291. package/dist/bundles/document-context.js.map +1 -0
  292. package/dist/bundles/documentation-item.js +2 -0
  293. package/dist/bundles/documentation-item.js.map +1 -0
  294. package/dist/bundles/event-analysis-source.js +2 -0
  295. package/dist/bundles/event-analysis-source.js.map +1 -0
  296. package/dist/bundles/event-context-catalog.js +2 -0
  297. package/dist/bundles/event-context-catalog.js.map +1 -0
  298. package/dist/bundles/event-context.js +4 -0
  299. package/dist/bundles/event-context.js.map +1 -0
  300. package/dist/bundles/event-source-authoring.js +13 -0
  301. package/dist/bundles/event-source-authoring.js.map +1 -0
  302. package/dist/bundles/example-analysis.js +3 -0
  303. package/dist/bundles/example-analysis.js.map +1 -0
  304. package/dist/bundles/example-authoring.js +3 -0
  305. package/dist/bundles/example-authoring.js.map +1 -0
  306. package/dist/bundles/example-declaration-items.js +2 -0
  307. package/dist/bundles/example-declaration-items.js.map +1 -0
  308. package/dist/bundles/example-values.js +2 -0
  309. package/dist/bundles/example-values.js.map +1 -0
  310. package/dist/bundles/file-imports.js +2 -0
  311. package/dist/bundles/file-imports.js.map +1 -0
  312. package/dist/bundles/file-references.js +2 -0
  313. package/dist/bundles/file-references.js.map +1 -0
  314. package/dist/bundles/hover-content.js +6 -0
  315. package/dist/bundles/hover-content.js.map +1 -0
  316. package/dist/bundles/hover.js +2 -0
  317. package/dist/bundles/hover.js.map +1 -0
  318. package/dist/bundles/index.js +2 -104
  319. package/dist/bundles/index.js.map +1 -7
  320. package/dist/bundles/inlay-hints.js +2 -0
  321. package/dist/bundles/inlay-hints.js.map +1 -0
  322. package/dist/bundles/inline-completions.js +2 -0
  323. package/dist/bundles/inline-completions.js.map +1 -0
  324. package/dist/bundles/inline-event-validation.js +2 -0
  325. package/dist/bundles/inline-event-validation.js.map +1 -0
  326. package/dist/bundles/keyword-docs.js +2 -0
  327. package/dist/bundles/keyword-docs.js.map +1 -0
  328. package/dist/bundles/language.js +2 -0
  329. package/dist/bundles/language.js.map +1 -0
  330. package/dist/bundles/named-rule-context.js +2 -0
  331. package/dist/bundles/named-rule-context.js.map +1 -0
  332. package/dist/bundles/operation-authoring.js +7 -0
  333. package/dist/bundles/operation-authoring.js.map +1 -0
  334. package/dist/bundles/persona-analysis.js +2 -0
  335. package/dist/bundles/persona-analysis.js.map +1 -0
  336. package/dist/bundles/production-destinations.js +2 -0
  337. package/dist/bundles/production-destinations.js.map +1 -0
  338. package/dist/bundles/purpose-items.js +2 -0
  339. package/dist/bundles/purpose-items.js.map +1 -0
  340. package/dist/bundles/reaction-authoring.js +5 -0
  341. package/dist/bundles/reaction-authoring.js.map +1 -0
  342. package/dist/bundles/refusal-context.js +2 -0
  343. package/dist/bundles/refusal-context.js.map +1 -0
  344. package/dist/bundles/response-analysis.js +7 -0
  345. package/dist/bundles/response-analysis.js.map +1 -0
  346. package/dist/bundles/response-completions.js +2 -0
  347. package/dist/bundles/response-completions.js.map +1 -0
  348. package/dist/bundles/response-tokens.js +3 -0
  349. package/dist/bundles/response-tokens.js.map +1 -0
  350. package/dist/bundles/scope-items.js +18 -0
  351. package/dist/bundles/scope-items.js.map +1 -0
  352. package/dist/bundles/structure-completions.js +7 -0
  353. package/dist/bundles/structure-completions.js.map +1 -0
  354. package/dist/bundles/sub-language-registry.js +2 -0
  355. package/dist/bundles/sub-language-registry.js.map +1 -0
  356. package/dist/bundles/sub-languages/capture/CompletionProvider.js +2 -0
  357. package/dist/bundles/sub-languages/capture/CompletionProvider.js.map +1 -0
  358. package/dist/bundles/sub-languages/capture/HoverProvider.js +60 -0
  359. package/dist/bundles/sub-languages/capture/HoverProvider.js.map +1 -0
  360. package/dist/bundles/sub-languages/capture/Validator.js +2 -0
  361. package/dist/bundles/sub-languages/capture/Validator.js.map +1 -0
  362. package/dist/bundles/sub-languages/capture/index.js +2 -40
  363. package/dist/bundles/sub-languages/capture/index.js.map +1 -7
  364. package/dist/bundles/sub-languages/capture/language.js +2 -0
  365. package/dist/bundles/sub-languages/capture/language.js.map +1 -0
  366. package/dist/bundles/sub-languages/cdl.js +2 -0
  367. package/dist/bundles/sub-languages/cdl.js.map +1 -0
  368. package/dist/bundles/sub-languages/pdl.js +2 -0
  369. package/dist/bundles/sub-languages/pdl.js.map +1 -0
  370. package/dist/bundles/sub-languages/projection/CodeActionProvider.js +2 -0
  371. package/dist/bundles/sub-languages/projection/CodeActionProvider.js.map +1 -0
  372. package/dist/bundles/sub-languages/projection/CompletionProvider.js +2 -0
  373. package/dist/bundles/sub-languages/projection/CompletionProvider.js.map +1 -0
  374. package/dist/bundles/sub-languages/projection/HoverProvider.js +43 -0
  375. package/dist/bundles/sub-languages/projection/HoverProvider.js.map +1 -0
  376. package/dist/bundles/sub-languages/projection/Validator.js +5 -0
  377. package/dist/bundles/sub-languages/projection/Validator.js.map +1 -0
  378. package/dist/bundles/sub-languages/projection/index.js +3 -75
  379. package/dist/bundles/sub-languages/projection/index.js.map +1 -7
  380. package/dist/bundles/sub-languages/projection/language.js +2 -0
  381. package/dist/bundles/sub-languages/projection/language.js.map +1 -0
  382. package/dist/bundles/symbols.js +3 -0
  383. package/dist/bundles/symbols.js.map +1 -0
  384. package/dist/bundles/themes/screenplay-dark.js +2 -0
  385. package/dist/bundles/themes/screenplay-dark.js.map +1 -0
  386. package/dist/bundles/themes/screenplay-light.js +2 -0
  387. package/dist/bundles/themes/screenplay-light.js.map +1 -0
  388. package/dist/bundles/tokens.js +2 -0
  389. package/dist/bundles/tokens.js.map +1 -0
  390. package/dist/bundles/validation.js +3 -0
  391. package/dist/bundles/validation.js.map +1 -0
  392. package/package.json +4 -3
  393. package/dist/bundles/chunk-7GSRLVHB.js +0 -42
  394. package/dist/bundles/chunk-7GSRLVHB.js.map +0 -7
  395. package/dist/bundles/chunk-AYDF3IFZ.js +0 -2
  396. package/dist/bundles/chunk-AYDF3IFZ.js.map +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","names":["contextualConstructs","embeddedLanguages","keyword","exitKeywords","constructKeywords","subLanguages","subLanguage","commonTokenRules","tokenizer","bmpWordCharacters","codeBlockTags","tag","clauseKeywords"],"sources":["../../tokens.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { languages } from 'monaco-editor';\nimport {\n clauseKeywords,\n codeBlockTags,\n constructKeywords,\n primitiveTypes,\n sliceTypes,\n} from './language';\nimport { MonarchTokenRules, SubLanguage } from './sub-language-registry';\nimport { bmpWordCharacters } from './bmp-word-characters';\n\n// Maps a Screenplay inline code tag to the Monaco language id used for embedded highlighting.\n// Declaration registration must not globally reserve existing property names.\n// Ambiguous standalone operation headers are supplied by typed semantic tokens.\nconst contextualConstructs = new Set(['operation', 'system', 'eventsource', 'purpose', 'runs']);\n\nconst embeddedLanguages: Record<string, string> = {\n csharp: 'csharp',\n typescript: 'typescript',\n react: 'typescript',\n html: 'html',\n sql: 'sql',\n};\n\nfunction subLanguageState(keyword: string): string {\n return `subLanguage_${keyword}`;\n}\n\n// A construct keyword at the start of a line ends any indented sub-language block.\nfunction subLanguageExitRule(subLanguages: SubLanguage[]): MonarchTokenRules[number] {\n const exitKeywords = [...constructKeywords.filter(keyword => !contextualConstructs.has(keyword)), ...subLanguages.map((subLanguage) => subLanguage.keyword)];\n return [\n new RegExp(`^\\\\s*(?:${exitKeywords.join('|')})\\\\b`),\n { token: '@rematch', next: '@pop' },\n ];\n}\n\n// Shared across the composite `.play` tokenizer and every standalone sub-language tokenizer\n// (comments, `$`-prefixed context variables, strings, numbers, operators, delimiters, whitespace).\nexport const commonTokenRules: MonarchTokenRules = [\n [/\\/\\/.*$/, 'comment'],\n [/\\$(?:context|identity|eventContext|eventSourceId|causedBy|refusal)(?:\\.\\w+)*/, 'variable.predefined'],\n [/\\$(?:env|secrets|strings)\\.[\\w.]+/, 'variable.predefined'],\n [/\\$\\.[\\w.]*/, 'variable.predefined'],\n [/\"(?:[^\"\\\\]|\\\\.)*\"/, 'string'],\n [/\"(?:[^\"\\\\]|\\\\.)*$/, 'string.invalid'],\n [/\\d+(?:ms|s|m|h|d)\\b/, 'number'],\n [/-?\\d+\\.\\d+/, 'number.float'],\n [/-?\\d+/, 'number'],\n [/=>|==|!=|>=|<=|[><=:?]/, 'operator'],\n [/[[\\](),.]/, 'delimiter'],\n [/\\s+/, 'white'],\n];\n\nexport function createTokensProvider(subLanguages: SubLanguage[]): languages.IMonarchLanguage {\n const tokenizer: Record<string, MonarchTokenRules> = {\n root: [\n [new RegExp(`^(\\\\s*)(example)(\\\\s+)([A-Z][${bmpWordCharacters}]*)(\\\\s*)(:)(\\\\s*)([A-Z][${bmpWordCharacters}.]*)(?=\\\\s*(?://.*)?$)`),\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'operator', 'white', 'type.identifier']],\n [/^(\\s*)(direction)(\\s+)(inbound|outbound)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [new RegExp(`^()(purpose)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`), ['white', 'keyword', 'white', { token: 'type.identifier', next: '@purposeBody.$1' }]],\n [/^(\\s*)(parameter)(\\s+)([a-z_]\\w*)(\\s+)([\\w.]+(?:\\[\\])?(?:\\s+optional)?)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'identifier', 'white', 'type.identifier']],\n [/^(\\s*)(case)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:[a-z_]\\w*\\s*=|\\/\\/|$))/, ['white', 'keyword', 'white', 'type.identifier']],\n [/\\b(case)(\\.)([a-z_]\\w*)\\b/, ['keyword', 'delimiter', 'identifier']],\n [/^(\\s*)(concept)(\\s+)([^\\s:]+)(\\s*:\\s*)(\\w+)((?:\\s+(?:@?pii|personal|@?sensitive|secret))*)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier', 'operator', { token: 'type.identifier', next: '@conceptBody.$1' }, 'keyword']],\n [/^(numbers)([ \\t]+)(exact)(?=[ \\t]*(?:(?:\\/\\/|#).*)?$)/, ['keyword', 'white', 'keyword']],\n [/^(eventsource)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', 'type.identifier']],\n [/^(system)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', 'type.identifier']],\n // 'runs' is contextual: only a reaction's identity line is a keyword; a property called runs keeps its name.\n [/^(\\s*)(runs)(\\s+)(as)(\\s+)(system)\\b/, ['white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(produces\\s+operation)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@operationBody.$1' }]],\n [/^(\\s*)(given\\s+operation)(\\s+)([\\w.]+)(\\s+)(fails)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'keyword']],\n [/^(\\s*)(then\\s+(?:operation|compensated))(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier']],\n [new RegExp(`^(\\\\s*)(command)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`), ['white', 'keyword', 'white', { token: 'type.identifier', next: '@commandBody.$1' }]],\n [/^(\\s*)(handler)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@handlerBody.$1' }]],\n [/^(\\s*@?[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?)(\\s+)(generated)(\\s+identifier|)(?=\\s*(?:\\/\\/.*)?$)/,\n ['identifier', 'type.identifier', 'white', 'keyword', 'keyword']],\n [/^(\\s*)(generated)(\\s+)([a-z_]\\w*)(\\s*=(?!=|>))/, ['white', 'keyword', 'white', 'identifier', 'operator']],\n [/^(\\s*)(then)(\\s+)(returns)\\b/, ['white', 'keyword', 'white', 'keyword']],\n // Only unambiguous response headers: two-token property declarations keep their names.\n [/^(\\s*)(returns)(?=\\s*(?:\\/\\/.*)?$|\\s+@\\w+\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n // A modifier only after a complete type; names called optional remain ordinary names.\n [/^(\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:from\\b|\\/\\/|$))/,\n ['identifier', 'type.identifier', 'white', 'keyword']],\n // Query prefixes cannot fall back to being property names.\n [/^(?!\\s*(?:by|filter)\\s+)(\\s*@?[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:identifier\\b|from\\b|=(?!=|>)|\\/\\/|$))/,\n ['identifier', 'type.identifier', 'white', 'keyword']],\n [/^(\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?!observable\\s+optional\\s*(?:\\/\\/.*)?$)(?:observable\\s+)?)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:\\/\\/.*)?$)/,\n ['keyword', 'type.identifier', 'white', 'keyword']],\n [new RegExp(`^(\\\\s*)(given)(\\\\s+)(caller)(\\\\s+)(as)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`),\n ['white', 'keyword', 'white', 'keyword', 'white', 'keyword', 'white', 'type.identifier']],\n // A specification's clock, trigger, capture and query steps - matched before a sub-language keyword\n // can claim 'capture' and read the rest of the specification as change data capture.\n [/^(\\s*)(given|when)(\\s+)(clock|capture|trigger|query)\\b/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(then)(\\s+)(result|no\\s+(?:result|events))\\b/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(then)(\\s+)(events)(\\s+)(in any order)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(when)(\\s+)(redelivered)(\\s+)([\\w.]+)(\\s+)(to)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'type.identifier', 'white', 'keyword', 'white', 'type.identifier']],\n // Guarded-action words are contextual; property names keep their ordinary meaning.\n [/^(\\s*)(otherwise)(\\s+)(hidden)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(otherwise)(\\s+)(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'type.identifier']],\n [/^(\\s*)(when)(\\s+)(?=.+\\s+execute\\s+[\\w.]+\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', { token: 'white', next: '@guardedActionCondition' }]],\n [/^(\\s*)(behavior)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@behaviorBody.$1' }]],\n [/^(\\s*)(on)(\\s+)(refused)(\\s+)(by)(\\s+)(validation|constraint|authorization)\\b/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(on)(\\s+)(refused)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(on)(\\s+)([\\w-]+)\\b/, ['white', 'keyword', 'white', { token: 'keyword', next: '@interactionBody.$1' }]],\n [/^(\\s*)(acknowledge)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n // A quoted import names .play files rather than a qualified name - the path reads as a link.\n [/^(\\s*)(import)(\\s+)(\"[^\"\\\\]*\")/, ['white', 'keyword', 'white', 'string.link']],\n // Retain the header indent so event metadata stops at the enclosing block boundary.\n [/^(\\s*)((?:(?:produces|public)\\s+)?event)(\\s+)([A-Za-z_]\\w*)(\\s+)(generation)(\\s+)(\\d+)(?=\\s*(?:from\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s*)?(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'keyword', 'white', { token: 'number', next: '@eventBody.$1' }]],\n [/^(\\s*)((?:(?:produces|public)\\s+)?event)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:from\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s*)?(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@eventBody.$1' }]],\n // A tagged opening fence carries the embedded language; legacy tag lines still highlight.\n ...codeBlockTags.map(\n (tag): MonarchTokenRules[number] => [\n new RegExp(`^\\\\s*\\\\x60\\\\x60\\\\x60${tag}\\\\s*$`),\n { token: 'string.quote', next: `@codeBlock.${embeddedLanguages[tag]}`, nextEmbedded: embeddedLanguages[tag] },\n ],\n ),\n // Inline code block tags at end of line open an embedded code block.\n ...codeBlockTags.map(\n (tag): MonarchTokenRules[number] => [\n new RegExp(`\\\\b${tag}\\\\b(?=\\\\s*$)`),\n { token: 'keyword.tag', next: `@codeBlockPending.${embeddedLanguages[tag]}` },\n ],\n ),\n // Sub-language constructs switch to the registered sub-language's token rules.\n ...subLanguages.map(\n (subLanguage): MonarchTokenRules[number] => [\n new RegExp(`\\\\b${subLanguage.keyword}\\\\b`),\n { token: 'keyword', next: `@${subLanguageState(subLanguage.keyword)}` },\n ],\n ),\n // Typed documentation names are properties, not metadata directives.\n [/^(\\s*)(documentation)(?=\\s+[\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?\\s*(?:identifier\\b|generated\\b|=(?!=|>)|\\/\\/|$))/,\n ['white', 'identifier']],\n // A bare description or documentation keyword opens a fenced prose block.\n [/\\b(?:description|documentation)\\b(?=\\s*(?:\\/\\/.*)?$)/, { token: 'keyword', next: '@descriptionBlockPending' }],\n [/\\brow-click\\b/, 'keyword'],\n // A leading @ escapes a name that collides with a directive keyword - it is a name, not an attribute.\n [/^\\s*@[a-z_]\\w*/, 'identifier'],\n [/@\\w+/, 'annotation'],\n [\n /[A-Z]\\w*/,\n {\n cases: {\n '@sliceTypes': 'keyword.type',\n '@primitiveTypes': 'type',\n '@default': 'type.identifier',\n },\n },\n ],\n [\n /[a-z_]\\w*/,\n {\n cases: {\n '@keywords': 'keyword',\n '@default': 'identifier',\n },\n },\n ],\n { include: '@common' },\n ],\n\n guardedActionCondition: [\n [/(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', { token: 'type.identifier', next: '@pop' }]],\n { include: '@root' },\n ],\n\n behaviorBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n { include: '@root' },\n ],\n\n interactionBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(otherwise)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n [/^(\\s*)(when)(\\s+)(?=item\\.|\\()/, ['white', 'keyword', 'white']],\n [/^(\\s*)(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier']],\n { include: '@root' },\n ],\n\n purposeBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(basis|interest|condition|authorization|subjects|retention|recipient|transfer|erasure)(\\s+)/, ['white', 'keyword', 'white']],\n [/\\b(safeguard|exception)\\b/, 'keyword'],\n { include: '@root' },\n ],\n\n conceptBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(@?pii|personal|@?sensitive|secret)(\\s+)(reason|scope|special|criminal)\\b/, ['white', 'keyword', 'white', 'keyword']],\n { include: '@root' },\n ],\n\n commandBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(validate)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@commandValidation.$1' }]],\n { include: '@root' },\n ],\n\n commandValidation: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [new RegExp(`^(\\\\s*)([${bmpWordCharacters}.]+)(\\\\s+)(rule)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?:severity\\\\s+\\\\w+|message\\\\s+.*|//.*|$))`),\n ['white', 'identifier', 'white', 'keyword', 'white', { token: 'type.identifier', next: '@namedRuleBody.$1' }]],\n { include: '@root' },\n ],\n\n namedRuleBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n operationBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(execute|compensate)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@operationPhase.$1' }]],\n [/^(\\s*)(uses)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier']],\n [/^(\\s*)(@?[a-z_]\\w*)(\\s+)([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?)(?=\\s*(?:=(?!=|>)|\\/\\/|$))/,\n ['white', 'identifier', 'white', 'type.identifier']],\n { include: '@root' },\n ],\n\n operationPhase: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n handlerBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n implementationBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(hint)(?=\\s+\")/, ['white', 'keyword']],\n { include: '@root' },\n ],\n\n eventBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(id)(?=\\s+\")/, ['white', 'keyword']],\n [/^(\\s*)(documentation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@descriptionBlockPending' }]],\n { include: '@root' },\n ],\n\n common: commonTokenRules,\n\n // After a code tag, the only thing allowed before the opening fence is whitespace.\n codeBlockPending: [\n [\n /^\\s*```\\s*$/,\n { token: 'string.quote', switchTo: '@codeBlock.$S2', nextEmbedded: '$S2' },\n ],\n [/^\\s*[^\\s`].*$/, { token: '@rematch', next: '@pop' }],\n [/\\s+/, 'white'],\n ],\n\n codeBlock: [\n [/^\\s*```\\s*$/, { token: 'string.quote', next: '@pop', nextEmbedded: '@pop' }],\n [/[^`]+/, ''],\n [/`/, ''],\n ],\n\n // After a bare description, the only thing allowed before the opening fence is whitespace.\n descriptionBlockPending: [\n [/\\/\\/.*$/, 'comment'],\n [/^\\s*```(?:text|markdown)?\\s*$/, { token: 'string.quote', switchTo: '@descriptionBlock' }],\n [/^\\s*[^\\s`].*$/, { token: '@rematch', next: '@pop' }],\n [/\\s+/, 'white'],\n ],\n\n descriptionBlock: [\n [/^\\s*```\\s*$/, { token: 'string.quote', next: '@pop' }],\n [/.+/, 'string'],\n ],\n };\n\n for (const subLanguage of subLanguages) {\n tokenizer[subLanguageState(subLanguage.keyword)] = [\n subLanguageExitRule(subLanguages),\n ...subLanguage.tokens,\n { include: '@common' },\n [/[A-Z]\\w*/, 'type.identifier'],\n [/[a-z_]\\w*/, 'identifier'],\n ];\n }\n\n return {\n defaultToken: '',\n tokenPostfix: '.play',\n ignoreCase: false,\n keywords: [...constructKeywords.filter(keyword => !contextualConstructs.has(keyword)), ...clauseKeywords, ...codeBlockTags],\n sliceTypes,\n primitiveTypes,\n tokenizer,\n } as languages.IMonarchLanguage;\n}\n"],"mappings":"2OAiBA,MAAMA,kBAAuB,IAAI,IAAI,CAAC,YAAa,SAAU,cAAe,UAAW,MAAM,CAAC,EAExFC,EAA4C,CAC9C,OAAQ,SACR,WAAY,aACZ,MAAO,aACP,KAAM,OACN,IAAK,KACT,EAEA,SAAS,iBAAiB,EAAyB,CAC/C,MAAO,eAAeC,GAC1B,CAGA,SAAS,oBAAoB,EAAwD,CACjF,IAAMC,EAAe,CAAC,GAAGC,EAAkB,OAAO,GAAW,CAACJ,EAAqB,IAAIE,CAAO,CAAC,EAAG,GAAGG,EAAa,IAAK,GAAgBC,EAAY,OAAO,CAAC,EAC3J,MAAO,CACC,OAAO,WAAWH,EAAa,KAAK,GAAG,EAAE,KAAK,EAClD,CAAE,MAAO,WAAY,KAAM,MAA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C,GAAGF,EAAkB,OAAO,GAAW,CAACJ,EAAqB,IAAIE,CAAO,CAAC,EAAG,GAAGU,EAAgB,GAAGF,CAAa,EAC1H,aACA,iBACA,WACJ,CACJ"}
@@ -0,0 +1,3 @@
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{causedByProperties as e,contextRoots as t,identityProperties as n,primitiveTypes as r,sliceTypes as i}from"./language.js";import{DiagnosticCodes as a}from"./compiler/Diagnostics/DiagnosticCodes.js";import{legacyOptionalTypeLength as o}from"./compiler/Authoring/QuickFixes.js";import"./compiler/index.js";import{enclosingChain as s,fenceMap as c,indentOf as l}from"./document-context.js";import{eventAnalysisSource as u}from"./event-analysis-source.js";import{resolveEventContextPath as d}from"./event-context.js";import{responseAnalysis as f}from"./response-analysis.js";import{knownEventNames as p,knownTypeNames as m,mergeSymbols as h,propertyTypeReference as g,scanDocument as _,symbolsForBuffer as v}from"./symbols.js";import{diagnosticCodes as y}from"./diagnostic-codes.js";import{validateInlineEvents as b}from"./inline-event-validation.js";import{fileImportOn as x,isFileImportLine as S}from"./file-imports.js";function issue(e,t,n,r,i,a){return{severity:e,message:i,line:t,startColumn:n,endColumn:n+r,code:a}}function tokenIssue(e,t,n,r,i,a){return issue(e,t,n.indexOf(r)+1,r.length,i,a)}function validateDeclarations(e,t,n){let i=[],a=/* @__PURE__ */ new Set([...m(t,r),...m(n,[])]),checkProperties=(e,t)=>{for(let n of e.filter(e=>!a.has(g(e).name))){let e=g(n).name;i.push(issue(`warning`,n.line,n.sourceType.startColumn,n.sourceType.text.length,e===`optional`?`Unknown type 'optional' on '${n.name}' of ${t} — did you forget the type before 'optional'?`:`Unknown type '${e}' on '${n.name}' of ${t} — declare it with 'concept ${e} : <Primitive>' or 'type ${e}'.`,y.unknownType))}};for(let e of t.types)checkProperties(e.properties,`type '${e.name}'`);for(let e of t.events)checkProperties(e.properties,`event '${e.name}'`);for(let e of t.queries)checkProperties(e.parameters,`query '${e.name}'`);for(let n of t.commands){checkProperties(n.properties,`command '${n.name}'`);let t=n.properties.filter(e=>e.isIdentifier);for(let r of t.slice(1))i.push(tokenIssue(`error`,r.line,e[r.line],`identifier`,`Command '${n.name}' already marks '${t[0].name}' as identifier — only one property can be the identifier.`,y.duplicateCommandIdentifier))}let o=/* @__PURE__ */ new Map;for(let n of[...t.concepts,...t.types])o.get(n.name)===void 0?o.set(n.name,n.line):i.push(tokenIssue(`error`,n.line,e[n.line],n.name,`Duplicate declaration of '${n.name}' — concept and type names must be unique.`,y.duplicateDeclaration));return i}function validateLines(s,u={}){let d=c(s),m=_(s),g=u.application??h(),x=v(s,{...g,authoringPath:u.path??g.authoringPath,authoringPlacement:u.placement??g.authoringPlacement}),S=f(s,x.authoringDocuments??x.authoringSources?.filter(e=>e!==s.join(`
2
+ `)),x.authoringPlacement,x.authoringPath,x.authoringPlacementResolved),C=new Set(S.eventSources.routes.map(e=>e.location.line-1)),w={...m,commands:m.commands.map(e=>({...e,properties:e.properties.filter(e=>!C.has(e.line)),produces:e.produces?.filter(e=>!S.operationProductionLines?.has(e.line)),productionHeaders:e.productionHeaders?.filter(e=>!S.operationProductionLines?.has(e))}))},T=/* @__PURE__ */ new Set([...p(w),...p(g)]),E=new Set([...w.policies,...g.policies].map(e=>e.name)),D=validateDeclarations(s,w,g);D.push(...validateProductionDestinations(s,w));let O=/* @__PURE__ */ new Set([a.LegacyOptionalSuffix,a.InvalidOptionalModifierOrder,a.OptionalReadsNotSupported]),k=/* @__PURE__ */ new Set([a.UnexpectedTokenInPolicyCondition,a.ExpectedPolicyCondition,a.UnclosedPolicyConditionGroup,a.ExpectedRoleName,a.ExpectedClaimName,a.ExpectedClaimMatches,a.ExpectedClaimMatchTarget]),A=/* @__PURE__ */ new Set([a.UnknownEvent,a.UnknownReadModelProperty,a.PiiNotSupportedOnIdentifier]),j=/* @__PURE__ */ new Set([a.EventFromLaterSlice,a.TimelineCycleGroup]),M=/* @__PURE__ */ new Set([a.UndeclaredDependency,a.UnusedDependencyDeclaration,a.InvalidDependencyTarget,a.RepeatedDependencyDeclaration,a.MutualDependencyDeclarations,a.AmbiguousReference]),N=/* @__PURE__ */ new Set([a.InvalidEventDeclaration,a.InvalidImportDeclaration,a.InvalidSliceDeclaration,a.InvalidDescription,a.DuplicateDescription,a.EmptyDescription,a.DuplicateEventSubject,a.InvalidSubjectType,a.ProtectedSubjectType,a.InvalidSubjectOwner,a.ReadModelSubjectNotSupported,a.InvalidSubjectModifierOrder,a.UnsupportedInteractionAlternatives,a.MixedInteractionAlternatives,a.InteractionAlternativeWithoutActions,a.InlineInteractionAlternative,a.LegacyInteractionWhere,a.InvalidSpecificationParameter,a.InvalidSpecificationCase,a.DuplicateSpecificationParameter,a.DuplicateSpecificationCase,a.IncompleteSpecificationTable,a.InvalidSpecificationCaseAssignment,a.InvalidSpecificationCaseValue,a.InvalidSpecificationCaseReference,a.OptionalSpecificationParameterTarget,a.SpecificationCaseNameCollision,a.IncompatibleSpecificationParameterType,a.UnusedSpecificationParameter,a.SingularSpecificationTableExpansion,a.InvalidSpecificationCallerPersona,a.UnsynthesizablePersonaCaller,a.PersonaWithoutGate,a.GateWithoutPersona,a.AmbiguousPersonaCaller,a.InvalidDocumentation,a.ConflictingDocumentationAcrossFiles,a.InvalidAbsentReadModelStep,a.UnknownConstraintProperty,a.OmittedProductionDestination,a.InvalidSpecificationExample,a.DuplicateSpecificationAssignment]),P=/* @__PURE__ */ new Set([a.InvalidPurposeDeclaration,a.InvalidPurposeVocabulary,a.DuplicatePurposeField,a.DuplicatePurposeDeclaration,a.UnknownPurpose,a.PurposeInterestMismatch,a.PersonalDataWithoutPurpose,a.SpecialDataWithoutCondition,a.CriminalDataWithoutAuthorization,a.PurposeWithoutBasis,a.UnusedPurpose,a.UnknownConceptDirective,a.AttributeReasonWithoutAttribute,a.DuplicateAttributeReason,a.LegacyComplianceMarker,a.UnknownComplianceMarker,a.InvalidSecretScope,a.DuplicateSecretScope,a.SecretScopeIgnoredForPii,a.InvalidPersonalDataQualifier,a.DuplicateSpecialCategory]),F=/* @__PURE__ */ new Set;for(let e of u.compilerDiagnostics??S.diagnostics){let t=e.code===a.UnknownType&&(S.identityDetails??[]).some(t=>t.line===e.location.line-1),n=e.code===a.RepeatedSingularDeclarationAcrossFiles&&e.message.includes(`identity block`);if(!t&&!n&&!P.has(e.code)&&!O.has(e.code)&&!k.has(e.code)&&!A.has(e.code)&&!j.has(e.code)&&!M.has(e.code)&&!N.has(e.code)&&e.code!==a.InvalidSpecificationExampleBody&&e.code!==a.UnknownRuleImplementationDirective&&e.code!==a.InvalidValidationRule&&e.code!==a.RepeatedDeclarationAcrossFiles&&!/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY063[3-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$/.test(e.code))continue;let r=e.location.line-1;if(e.code===a.OmittedProductionDestination&&D.some(t=>t.code===e.code&&t.line===r))continue;if(e.code===a.UnknownEvent){if(F.has(r))continue;F.add(r)}let i=o(s[r],e)||s[r].length-e.location.column+1;D.push(issue(e.severity,r,e.location.column,i,e.message,e.code))}let checkEvent=(e,t,n)=>{!T.has(n)&&!F.has(e)&&D.push(tokenIssue(`warning`,e,t,n,`Unknown event type '${n}' — declare it in a slice or import it.`,y.unknownEvent))},I=-1;for(let a=0;a<s.length;a++){let o=s[a],c=o.trim();if(d[a]||c.length===0)continue;let u=o.match(/^[ ]*(\t+)/);if(u&&D.push(issue(`warning`,a,u[0].length-u[1].length+1,u[1].length,`Screenplay is indentation-based — use spaces, not tabs.`,y.tabIndentation)),I>=0){if(l(o)>I&&/^(?:or\s+)?[A-Z]\w*(?:\s+or\s+[A-Z]\w*)*$/.test(c)){for(let e of c.split(/\s+/).filter(e=>e!==`or`))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy));continue}I=-1}let f=validateImport(s,d,a);f&&D.push(f);let p=c.match(/^slice\s+(\w+)/);p&&!i.includes(p[1])&&D.push(tokenIssue(`error`,a,o,p[1],`Unknown slice type '${p[1]}' — expected ${i.join(`, `)}.`,y.unknownSliceType));let m=c.match(/^concept\s+\w+\s*:\s*(\w+)/);m&&m[1]!==`Enum`&&!r.includes(m[1])&&D.push(tokenIssue(`error`,a,o,m[1],`Unknown primitive type '${m[1]}' — expected ${r.join(`, `)} or Enum.`,y.unknownPrimitiveType));let h=c.match(/^authorize\s+(.*)$/);if(h){I=l(o);for(let e of h[1].split(/\s+/).filter(e=>e!==`or`&&e.length>0))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy))}let g=c.match(/^on\s+([A-Z]\w*)\s*$/);g&&checkEvent(a,o,g[1]);let _=c.match(/^produces\s+([A-Z]\w*)\s*$/);if(_&&!S.operationProductionLines?.has(a)&&checkEvent(a,o,_[1]),/^produces\s+when\b/.test(c)&&!S.operationProductionLines?.has(a))for(let e=a+1;e<s.length;e++){let t=s[e];if(!(d[e]||t.trim().length===0)){if(l(t)>l(o)){let n=t.trim().match(/^([A-Z]\w*)\s*$/);n&&checkEvent(e,t,n[1])}break}}let v=c.match(/^unique\s+event\s+([A-Z]\w*)/);v&&checkEvent(a,o,v[1]);let b=c.match(/^unique\s+[a-z_]\w*\s+on\s+([A-Z]\w*)/);b&&checkEvent(a,o,b[1]);for(let e of o.match(/\$identity\.[\w.]+/g)??[]){let t=e.substring(10).split(`.`)[0],r=[...n,...(S.identityDetails??[]).map(e=>e.name)];r.includes(t)||D.push(tokenIssue(`warning`,a,o,e,`Unknown $identity property '${t}' — expected ${r.join(`, `)}.`,y.unknownContextIdentityProperty))}for(let r of o.match(/\$context\.[\w.]+/g)??[]){let i=r.substring(9).split(`.`);t.includes(i[0])?i[0]===`causedBy`&&i.length>1&&!e.includes(i[1])?D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.causedBy property '${i[1]}' — expected ${e.join(`, `)}.`,y.unknownContextCausedByProperty)):i[0]===`identity`&&i.length>1&&!n.includes(i[1])&&D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.identity property '${i[1]}' — expected ${n.join(`, `)}.`,y.unknownContextIdentityProperty)):D.push(tokenIssue(`warning`,a,o,r,`Unknown $context path '${i.join(`.`)}' — expected one of ${t.join(`, `)}.`,y.unknownContextPath))}}D.push(...validateEventContextPaths(s,d)),D.push(...b(s,w,g,S.operationProductionLines));let L=s.map((e,t)=>({line:e,index:t})).filter(({line:e})=>/^\s*```(?:[a-z]+)?\s*$/.test(e));if(L.length%2==1){let e=L[L.length-1];D.push(issue(`error`,e.index,1,e.line.length+1,"Unclosed inline code block — expected a closing ``` line.",y.unclosedCodeBlock))}return D}function validateProductionDestinations(e,t){let n=[];e=u(e);for(let r of t.commands){let t=r.properties.filter(e=>e.isIdentifier&&!g(e).isOptional&&!g(e).isCollection);if(t.length===1)for(let i of r.produces??[]){if(i.inline||i.conditional||i.target!==void 0)continue;let r=i.line;n.push(issue(`information`,r,l(e[r])+1,e[r].trim().length,`Plain 'produces ${i.name}' omits its destination — use 'for ${t[0].name}' to explicitly select the command's identifier.`,y.omittedProductionDestination))}}return n}function validateImport(e,t,n){let r=e[n],i=r.trim().replace(/\s*\/\/.*$/,``);if(!/^import\b/.test(i)||x(r,n))return;let a=l(r);if(a>0&&[`module`,`feature`].includes(s(e,t,n,a)[0])||S(r))return issue(`error`,n,a+1,i.length,`Invalid import '${i}' — inside a module or feature, import names files: 'import "<path or glob>"'.`,y.invalidFileImport)}const C=/^(?:(?:increment|decrement|count|clear|add|subtract|set)\s+)?@?([$\w.]+)(?=\s|=|$)/;function validateEventContextPaths(e,t){let n=[],names=e=>e.map(e=>e.name).join(`, `);for(let r=0;r<e.length;r++){let i=e[r];if(t[r])continue;for(let e of i.matchAll(/(\.)?\$eventContext((?:\.(?:\w+(?:\(\))?)?)*)/g)){let t=e[0].substring(e[1]?.length??0),i=e[2];if(i.length===0){e[1]&&n.push(issue(`error`,r,(e.index??0)+2,t.length,`'$eventContext' names no member - expected one of ${names(d(``).expected)}.`,y.missingEventContextPath));continue}let a=i.substring(1),o=d(a),s=(e.index??0)+(e[1]?.length??0)+1;switch(o.status){case`missing`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' names no member - expected one of ${names(o.expected)}.`,y.missingEventContextPath));break;case`unknownMember`:n.push(issue(`warning`,r,s,t.length,`Unknown event context member '${o.segment}' in '$eventContext.${a}' - expected one of ${names(o.expected)}.`,y.unknownEventContextMember));break;case`unknownSubPath`:{let e=o.expected.length===0?`no members to address`:`members ${names(o.expected)}`;n.push(issue(`warning`,r,s,t.length,`Unknown event context path '$eventContext.${a}' - '${o.member?.name}' (${o.member?.type}) has ${e}.`,y.unknownEventContextPath));break}case`belowCollection`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' cannot resolve - '${o.member?.name}' is a collection (${o.member?.type}) and cannot be addressed below.`,y.eventContextPathBelowCollection))}}let a=i.trim().match(C)?.[1],o=a?.match(/\.\$(\w+)/)?.[1];a&&o&&o!==`eventContext`&&n.push(tokenIssue(`warning`,r,i,a,`Dynamic dictionary key '$${o}' in '${a}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${o}' becomes the key.`,y.unresolvedDynamicKeySource))}return n}export{validateEventContextPaths,validateLines};
3
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","names":["startColumn","length","severity","line","text","token","message","code","issues","types","knownTypeNames","symbols","primitiveTypes","application","property","properties","propertyTypeReference","candidate","bare","owner","diagnosticCodes","type","event","query","command","identifiers","extra","lines","declared","declaration","fences","fenceMap","scanned","scanDocument","context","mergeSymbols","input","symbolsForBuffer","analysis","responseAnalysis","source","routeLines","route","production","events","knownEventNames","policies","policy","optionalCodes","DiagnosticCodes","policyCodes","consistencyCodes","timelineCodes","dependencyCodes","authoringCodes","complianceCodes","compilerUnknownEventLines","diagnostic","identityType","detail","identityDuplicate","existing","legacyOptionalTypeLength","name","authorizeIndent","index","trimmed","leading","indentOf","fileImportIssue","slice","sliceTypes","concept","authorize","reactsOn","produces","next","uniqueEvent","uniqueProperty","path","member","knownIdentity","identityProperties","segments","contextRoots","causedByProperties","validateInlineEvents","fenceLines","last","eventAnalysisSource","fileImportOn","indent","enclosingChain","isFileImportLine","mappingTarget","members","match","written","resolveEventContextPath","resolution","column","has","target"],"sources":["../../validation.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DiagnosticCodes, legacyOptionalTypeLength } from '@cratis/screenplay-compiler';\nimport { AnalysisDiagnostic, responseAnalysis } from './response-analysis';\nimport { validateInlineEvents } from './inline-event-validation';\nimport { causedByProperties, contextRoots, identityProperties, primitiveTypes, sliceTypes } from './language';\nimport { DiagnosticCode, diagnosticCodes } from './diagnostic-codes';\nimport { enclosingChain, fenceMap, indentOf } from './document-context';\nimport { eventAnalysisSource } from './event-analysis-source';\nimport { resolveEventContextPath } from './event-context';\nimport {\n DocumentSymbols,\n PropertySymbol,\n propertyTypeReference,\n knownEventNames,\n knownTypeNames,\n mergeSymbols,\n scanDocument,\n symbolsForBuffer,\n} from './symbols';\nimport { fileImportOn, isFileImportLine } from './file-imports';\n\nexport type ValidationSeverity = 'error' | 'warning' | 'information';\n\nexport interface ValidationIssue {\n line: number;\n startColumn: number;\n endColumn: number;\n message: string;\n severity: ValidationSeverity;\n\n // The compiler code for this condition, absent on the structural checks the editor makes and the\n // compiler does not. See ./diagnostic-codes.ts.\n code?: DiagnosticCode;\n}\n\n// What a document is validated against beyond itself.\nexport interface ValidationContext {\n // What the rest of the application declares - the other .play files of a folder, or the files an import\n // brings in - so a name declared in another file is not reported unknown. Merge the scanned symbols of\n // those files with mergeSymbols. The document's own declarations are always known.\n application?: DocumentSymbols;\n placement?: readonly string[];\n path?: string;\n compilerDiagnostics?: readonly AnalysisDiagnostic[];\n}\n\nfunction issue(\n severity: ValidationSeverity,\n line: number,\n startColumn: number,\n length: number,\n message: string,\n code: DiagnosticCode,\n): ValidationIssue {\n return { severity, message, line, startColumn, endColumn: startColumn + length, code };\n}\n\nfunction tokenIssue(\n severity: ValidationSeverity,\n line: number,\n text: string,\n token: string,\n message: string,\n code: DiagnosticCode,\n): ValidationIssue {\n const column = text.indexOf(token) + 1;\n return issue(severity, line, column, token.length, message, code);\n}\n\n// Reports every property whose type reference names nothing the document declares, and\n// every command that marks more than one property as its identifier.\nfunction validateDeclarations(lines: string[], symbols: DocumentSymbols, application: DocumentSymbols): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n const types = new Set([...knownTypeNames(symbols, primitiveTypes), ...knownTypeNames(application, [])]);\n\n const checkProperties = (properties: PropertySymbol[], owner: string) => {\n for (const property of properties.filter(\n (candidate) => !types.has(propertyTypeReference(candidate).name),\n )) {\n const bare = propertyTypeReference(property).name;\n issues.push(\n issue(\n 'warning',\n property.line,\n property.sourceType!.startColumn,\n property.sourceType!.text.length,\n bare === 'optional'\n ? `Unknown type 'optional' on '${property.name}' of ${owner} — did you forget the type before 'optional'?`\n : `Unknown type '${bare}' on '${property.name}' of ${owner} — declare it with 'concept ${bare} : <Primitive>' or 'type ${bare}'.`,\n diagnosticCodes.unknownType,\n ),\n );\n }\n };\n\n for (const type of symbols.types) checkProperties(type.properties, `type '${type.name}'`);\n for (const event of symbols.events) checkProperties(event.properties, `event '${event.name}'`);\n for (const query of symbols.queries) checkProperties(query.parameters, `query '${query.name}'`);\n for (const command of symbols.commands) {\n checkProperties(command.properties, `command '${command.name}'`);\n const identifiers = command.properties.filter((property) => property.isIdentifier);\n for (const extra of identifiers.slice(1)) {\n issues.push(\n tokenIssue(\n 'error',\n extra.line,\n lines[extra.line],\n 'identifier',\n `Command '${command.name}' already marks '${identifiers[0].name}' as identifier — only one property can be the identifier.`,\n diagnosticCodes.duplicateCommandIdentifier,\n ),\n );\n }\n }\n\n const declared = new Map<string, number>();\n for (const declaration of [...symbols.concepts, ...symbols.types]) {\n const first = declared.get(declaration.name);\n if (first === undefined) {\n declared.set(declaration.name, declaration.line);\n continue;\n }\n issues.push(\n tokenIssue(\n 'error',\n declaration.line,\n lines[declaration.line],\n declaration.name,\n `Duplicate declaration of '${declaration.name}' — concept and type names must be unique.`,\n diagnosticCodes.duplicateDeclaration,\n ),\n );\n }\n\n return issues;\n}\n\n// Validates a Screenplay document without any editor dependency — both the Monaco\n// service and the VSCode extension adapt these issues to their marker/diagnostic APIs.\n//\n// The checks read the document line by line, never as a whole document's top level, so a file an import\n// places in a module or feature - holding slices or features at its top level - validates as it is written.\n// Where it is placed, and whether its imports resolve, is the compiler's to say.\nexport function validateLines(lines: string[], context: ValidationContext = {}): ValidationIssue[] {\n const fences = fenceMap(lines);\n const scanned = scanDocument(lines);\n const application = context.application ?? mergeSymbols();\n const input = symbolsForBuffer(lines, { ...application, authoringPath: context.path ?? application.authoringPath, authoringPlacement: context.placement ?? application.authoringPlacement });\n const analysis = responseAnalysis(lines, input.authoringDocuments ?? input.authoringSources?.filter(source => source !== lines.join('\\n')), input.authoringPlacement, input.authoringPath, input.authoringPlacementResolved);\n const routeLines = new Set(analysis.eventSources.routes.map(route => route.location.line - 1));\n const symbols = { ...scanned, commands: scanned.commands.map(command => ({ ...command,\n properties: command.properties.filter(property => !routeLines.has(property.line)),\n produces: command.produces?.filter(production => !analysis.operationProductionLines?.has(production.line)),\n productionHeaders: command.productionHeaders?.filter(line => !analysis.operationProductionLines?.has(line)),\n })) };\n const events = new Set([...knownEventNames(symbols), ...knownEventNames(application)]);\n const policies = new Set([...symbols.policies, ...application.policies].map((policy) => policy.name));\n const issues: ValidationIssue[] = validateDeclarations(lines, symbols, application);\n issues.push(...validateProductionDestinations(lines, symbols));\n // One parser pass covers committed types, including query results and trigger data, without\n // speculative property scans mistaking tags, paths, strings or code for optionality.\n const optionalCodes = new Set<string>([DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.InvalidOptionalModifierOrder, DiagnosticCodes.OptionalReadsNotSupported]);\n const policyCodes = new Set<string>([DiagnosticCodes.UnexpectedTokenInPolicyCondition, DiagnosticCodes.ExpectedPolicyCondition, DiagnosticCodes.UnclosedPolicyConditionGroup, DiagnosticCodes.ExpectedRoleName, DiagnosticCodes.ExpectedClaimName, DiagnosticCodes.ExpectedClaimMatches, DiagnosticCodes.ExpectedClaimMatchTarget]);\n const consistencyCodes = new Set<string>([DiagnosticCodes.UnknownEvent, DiagnosticCodes.UnknownReadModelProperty, DiagnosticCodes.PiiNotSupportedOnIdentifier]);\n const timelineCodes = new Set<string>([DiagnosticCodes.EventFromLaterSlice, DiagnosticCodes.TimelineCycleGroup]);\n const dependencyCodes = new Set<string>([DiagnosticCodes.UndeclaredDependency, DiagnosticCodes.UnusedDependencyDeclaration, DiagnosticCodes.InvalidDependencyTarget, DiagnosticCodes.RepeatedDependencyDeclaration, DiagnosticCodes.MutualDependencyDeclarations, DiagnosticCodes.AmbiguousReference]);\n // These parser diagnostics must reach the marker adapter. C#-only completeness and reference\n // checks are not synthesized here, but are preserved when a caller supplies compiler diagnostics.\n const authoringCodes = new Set<string>([DiagnosticCodes.InvalidEventDeclaration, DiagnosticCodes.InvalidImportDeclaration, DiagnosticCodes.InvalidSliceDeclaration, DiagnosticCodes.InvalidDescription, DiagnosticCodes.DuplicateDescription, DiagnosticCodes.EmptyDescription,DiagnosticCodes.DuplicateEventSubject, DiagnosticCodes.InvalidSubjectType, DiagnosticCodes.ProtectedSubjectType, DiagnosticCodes.InvalidSubjectOwner, DiagnosticCodes.ReadModelSubjectNotSupported, DiagnosticCodes.InvalidSubjectModifierOrder, DiagnosticCodes.UnsupportedInteractionAlternatives, DiagnosticCodes.MixedInteractionAlternatives, DiagnosticCodes.InteractionAlternativeWithoutActions, DiagnosticCodes.InlineInteractionAlternative, DiagnosticCodes.LegacyInteractionWhere, DiagnosticCodes.InvalidSpecificationParameter, DiagnosticCodes.InvalidSpecificationCase, DiagnosticCodes.DuplicateSpecificationParameter, DiagnosticCodes.DuplicateSpecificationCase, DiagnosticCodes.IncompleteSpecificationTable, DiagnosticCodes.InvalidSpecificationCaseAssignment, DiagnosticCodes.InvalidSpecificationCaseValue, DiagnosticCodes.InvalidSpecificationCaseReference, DiagnosticCodes.OptionalSpecificationParameterTarget, DiagnosticCodes.SpecificationCaseNameCollision, DiagnosticCodes.IncompatibleSpecificationParameterType, DiagnosticCodes.UnusedSpecificationParameter, DiagnosticCodes.SingularSpecificationTableExpansion, DiagnosticCodes.InvalidSpecificationCallerPersona, DiagnosticCodes.UnsynthesizablePersonaCaller, DiagnosticCodes.PersonaWithoutGate, DiagnosticCodes.GateWithoutPersona, DiagnosticCodes.AmbiguousPersonaCaller, DiagnosticCodes.InvalidDocumentation, DiagnosticCodes.ConflictingDocumentationAcrossFiles, DiagnosticCodes.InvalidAbsentReadModelStep, DiagnosticCodes.UnknownConstraintProperty, DiagnosticCodes.OmittedProductionDestination, DiagnosticCodes.InvalidSpecificationExample, DiagnosticCodes.DuplicateSpecificationAssignment]);\n const complianceCodes = new Set<string>([DiagnosticCodes.InvalidPurposeDeclaration, DiagnosticCodes.InvalidPurposeVocabulary, DiagnosticCodes.DuplicatePurposeField, DiagnosticCodes.DuplicatePurposeDeclaration, DiagnosticCodes.UnknownPurpose, DiagnosticCodes.PurposeInterestMismatch, DiagnosticCodes.PersonalDataWithoutPurpose, DiagnosticCodes.SpecialDataWithoutCondition, DiagnosticCodes.CriminalDataWithoutAuthorization, DiagnosticCodes.PurposeWithoutBasis, DiagnosticCodes.UnusedPurpose, DiagnosticCodes.UnknownConceptDirective, DiagnosticCodes.AttributeReasonWithoutAttribute, DiagnosticCodes.DuplicateAttributeReason, DiagnosticCodes.LegacyComplianceMarker, DiagnosticCodes.UnknownComplianceMarker, DiagnosticCodes.InvalidSecretScope, DiagnosticCodes.DuplicateSecretScope, DiagnosticCodes.SecretScopeIgnoredForPii, DiagnosticCodes.InvalidPersonalDataQualifier, DiagnosticCodes.DuplicateSpecialCategory]);\n const compilerUnknownEventLines = new Set<number>();\n for (const diagnostic of context.compilerDiagnostics ?? analysis.diagnostics) {\n const identityType = diagnostic.code === DiagnosticCodes.UnknownType && (analysis.identityDetails ?? []).some(detail => detail.line === diagnostic.location.line - 1);\n const identityDuplicate = diagnostic.code === DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles && diagnostic.message.includes('identity block');\n if (!identityType && !identityDuplicate && !complianceCodes.has(diagnostic.code) && !optionalCodes.has(diagnostic.code) && !policyCodes.has(diagnostic.code) && !consistencyCodes.has(diagnostic.code) && !timelineCodes.has(diagnostic.code) && !dependencyCodes.has(diagnostic.code) && !authoringCodes.has(diagnostic.code) && diagnostic.code !== DiagnosticCodes.InvalidSpecificationExampleBody && diagnostic.code !== DiagnosticCodes.UnknownRuleImplementationDirective && diagnostic.code !== DiagnosticCodes.InvalidValidationRule && diagnostic.code !== DiagnosticCodes.RepeatedDeclarationAcrossFiles && !/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY063[3-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$/.test(diagnostic.code)) continue;\n const line = diagnostic.location.line - 1;\n if (diagnostic.code === DiagnosticCodes.OmittedProductionDestination && issues.some(existing => existing.code === diagnostic.code && existing.line === line)) continue;\n if (diagnostic.code === DiagnosticCodes.UnknownEvent) {\n if (compilerUnknownEventLines.has(line)) continue;\n compilerUnknownEventLines.add(line);\n }\n const length = legacyOptionalTypeLength(lines[line], diagnostic) || lines[line].length - diagnostic.location.column + 1;\n issues.push(issue(diagnostic.severity, line, diagnostic.location.column, length, diagnostic.message, diagnostic.code as DiagnosticCode));\n }\n\n const checkEvent = (line: number, text: string, name: string) => {\n if (!events.has(name) && !compilerUnknownEventLines.has(line)) {\n issues.push(\n tokenIssue(\n 'warning',\n line,\n text,\n name,\n `Unknown event type '${name}' — declare it in a slice or import it.`,\n diagnosticCodes.unknownEvent,\n ),\n );\n }\n };\n\n let authorizeIndent = -1;\n\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n const trimmed = line.trim();\n\n if (fences[index] || trimmed.length === 0) continue;\n\n const leading = line.match(/^[ ]*(\\t+)/);\n if (leading) {\n issues.push(\n issue(\n 'warning',\n index,\n leading[0].length - leading[1].length + 1,\n leading[1].length,\n 'Screenplay is indentation-based — use spaces, not tabs.',\n diagnosticCodes.tabIndentation,\n ),\n );\n }\n\n // Policy references continue on indented lines below an authorize clause.\n if (authorizeIndent >= 0) {\n if (\n indentOf(line) > authorizeIndent &&\n /^(?:or\\s+)?[A-Z]\\w*(?:\\s+or\\s+[A-Z]\\w*)*$/.test(trimmed)\n ) {\n for (const name of trimmed.split(/\\s+/).filter((token) => token !== 'or')) {\n if (!policies.has(name)) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n name,\n `Unknown policy '${name}' — declare it with 'policy ${name}'.`,\n diagnosticCodes.unknownPolicy,\n ),\n );\n }\n }\n continue;\n }\n authorizeIndent = -1;\n }\n\n const fileImportIssue = validateImport(lines, fences, index);\n if (fileImportIssue) issues.push(fileImportIssue);\n\n const slice = trimmed.match(/^slice\\s+(\\w+)/);\n if (slice && !sliceTypes.includes(slice[1])) {\n issues.push(\n tokenIssue(\n 'error',\n index,\n line,\n slice[1],\n `Unknown slice type '${slice[1]}' — expected ${sliceTypes.join(', ')}.`,\n diagnosticCodes.unknownSliceType,\n ),\n );\n }\n\n const concept = trimmed.match(/^concept\\s+\\w+\\s*:\\s*(\\w+)/);\n if (concept && concept[1] !== 'Enum' && !primitiveTypes.includes(concept[1])) {\n issues.push(\n tokenIssue(\n 'error',\n index,\n line,\n concept[1],\n `Unknown primitive type '${concept[1]}' — expected ${primitiveTypes.join(', ')} or Enum.`,\n diagnosticCodes.unknownPrimitiveType,\n ),\n );\n }\n\n const authorize = trimmed.match(/^authorize\\s+(.*)$/);\n if (authorize) {\n authorizeIndent = indentOf(line);\n for (const name of authorize[1].split(/\\s+/).filter((token) => token !== 'or' && token.length > 0)) {\n if (!policies.has(name)) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n name,\n `Unknown policy '${name}' — declare it with 'policy ${name}'.`,\n diagnosticCodes.unknownPolicy,\n ),\n );\n }\n }\n }\n\n const reactsOn = trimmed.match(/^on\\s+([A-Z]\\w*)\\s*$/);\n if (reactsOn) checkEvent(index, line, reactsOn[1]);\n\n const produces = trimmed.match(/^produces\\s+([A-Z]\\w*)\\s*$/);\n if (produces && !analysis.operationProductionLines?.has(index)) checkEvent(index, line, produces[1]);\n\n if (/^produces\\s+when\\b/.test(trimmed) && !analysis.operationProductionLines?.has(index)) {\n for (let next = index + 1; next < lines.length; next++) {\n const candidate = lines[next];\n if (fences[next] || candidate.trim().length === 0) continue;\n if (indentOf(candidate) > indentOf(line)) {\n const name = candidate.trim().match(/^([A-Z]\\w*)\\s*$/);\n if (name) checkEvent(next, candidate, name[1]);\n }\n break;\n }\n }\n\n const uniqueEvent = trimmed.match(/^unique\\s+event\\s+([A-Z]\\w*)/);\n if (uniqueEvent) checkEvent(index, line, uniqueEvent[1]);\n\n const uniqueProperty = trimmed.match(/^unique\\s+[a-z_]\\w*\\s+on\\s+([A-Z]\\w*)/);\n if (uniqueProperty) checkEvent(index, line, uniqueProperty[1]);\n\n // Every $identity. path must name a member of the caller; anything after 'claims.' is a claim name.\n // A bare $identity is left to the compilers, which see it only where an expression is expected.\n for (const path of line.match(/\\$identity\\.[\\w.]+/g) ?? []) {\n const member = path.substring('$identity.'.length).split('.')[0];\n const knownIdentity = [...identityProperties, ...(analysis.identityDetails ?? []).map(detail => detail.name)];\n if (!knownIdentity.includes(member)) {\n issues.push(tokenIssue('warning', index, line, path,\n `Unknown $identity property '${member}' — expected ${knownIdentity.join(', ')}.`,\n diagnosticCodes.unknownContextIdentityProperty));\n }\n }\n\n // Every $context. path must name something CommandContext or QueryContext carries.\n for (const path of line.match(/\\$context\\.[\\w.]+/g) ?? []) {\n const segments = path.substring('$context.'.length).split('.');\n if (!contextRoots.includes(segments[0])) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context path '${segments.join('.')}' — expected one of ${contextRoots.join(', ')}.`,\n diagnosticCodes.unknownContextPath,\n ),\n );\n } else if (\n segments[0] === 'causedBy' &&\n segments.length > 1 &&\n !causedByProperties.includes(segments[1])\n ) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context.causedBy property '${segments[1]}' — expected ${causedByProperties.join(', ')}.`,\n diagnosticCodes.unknownContextCausedByProperty,\n ),\n );\n } else if (\n segments[0] === 'identity' &&\n segments.length > 1 &&\n !identityProperties.includes(segments[1])\n ) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context.identity property '${segments[1]}' — expected ${identityProperties.join(', ')}.`,\n diagnosticCodes.unknownContextIdentityProperty,\n ),\n );\n }\n }\n }\n\n issues.push(...validateEventContextPaths(lines, fences));\n issues.push(...validateInlineEvents(lines, symbols, application, analysis.operationProductionLines));\n\n const fenceLines = lines\n .map((line, index) => ({ line, index }))\n .filter(({ line }) => /^\\s*```(?:[a-z]+)?\\s*$/.test(line));\n if (fenceLines.length % 2 === 1) {\n const last = fenceLines[fenceLines.length - 1];\n issues.push(\n issue(\n 'error',\n last.index,\n 1,\n last.line.length + 1,\n 'Unclosed inline code block — expected a closing ``` line.',\n diagnosticCodes.unclosedCodeBlock,\n ),\n );\n }\n\n return issues;\n}\n\n// This is advice, not a semantic default: accepting the typed workspace repair changes routing.\nfunction validateProductionDestinations(lines: string[], symbols: DocumentSymbols): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n lines = eventAnalysisSource(lines);\n for (const command of symbols.commands) {\n const identifiers = command.properties.filter(property => property.isIdentifier && !propertyTypeReference(property).isOptional && !propertyTypeReference(property).isCollection);\n if (identifiers.length !== 1) continue;\n for (const production of command.produces ?? []) {\n if (production.inline || production.conditional || production.target !== undefined) continue;\n const line = production.line;\n issues.push(issue('information', line, indentOf(lines[line]) + 1, lines[line].trim().length,\n `Plain 'produces ${production.name}' omits its destination — use 'for ${identifiers[0].name}' to explicitly select the command's identifier.`,\n diagnosticCodes.omittedProductionDestination));\n }\n }\n return issues;\n}\n\n// Inside a module or feature an import names files, and a quoted import anywhere has the compiler's shape.\nfunction validateImport(lines: string[], fences: boolean[], index: number): ValidationIssue | undefined {\n const line = lines[index];\n const trimmed = line.trim().replace(/\\s*\\/\\/.*$/, '');\n if (!/^import\\b/.test(trimmed) || fileImportOn(line, index)) return undefined;\n const indent = indentOf(line);\n const inBody = indent > 0 && ['module', 'feature'].includes(enclosingChain(lines, fences, index, indent)[0]);\n if (!inBody && !isFileImportLine(line)) return undefined;\n return issue(\n 'error',\n index,\n indent + 1,\n trimmed.length,\n `Invalid import '${trimmed}' — inside a module or feature, import names files: 'import \"<path or glob>\"'.`,\n diagnosticCodes.invalidFileImport,\n );\n}\n\n// A mapping target: the first word of a mapping line, after the keyword that opens it if there is one.\nconst mappingTarget = /^(?:(?:increment|decrement|count|clear|add|subtract|set)\\s+)?@?([$\\w.]+)(?=\\s|=|$)/;\n\n// Every $eventContext.<path> - in an expression or as the dynamic key of a mapping target - checked against the\n// event-context catalog the way the compiler checks it (Parsing/EventContextPathValidator.cs).\nexport function validateEventContextPaths(lines: string[], fences: boolean[]): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n const names = (members: readonly { name: string }[]) => members.map((member) => member.name).join(', ');\n\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n if (fences[index]) continue;\n\n for (const match of line.matchAll(/(\\.)?\\$eventContext((?:\\.(?:\\w+(?:\\(\\))?)?)*)/g)) {\n const token = match[0].substring(match[1]?.length ?? 0);\n const written = match[2];\n if (written.length === 0) {\n // A bare $eventContext names nothing only as a dynamic key; in an expression the compiler rejects it as invalid.\n if (match[1]) {\n issues.push(issue('error', index, (match.index ?? 0) + 2, token.length, `'$eventContext' names no member - expected one of ${names(resolveEventContextPath('').expected)}.`, diagnosticCodes.missingEventContextPath));\n }\n continue;\n }\n\n const path = written.substring(1);\n const resolution = resolveEventContextPath(path);\n const column = (match.index ?? 0) + (match[1]?.length ?? 0) + 1;\n switch (resolution.status) {\n case 'missing':\n issues.push(issue('error', index, column, token.length, `'$eventContext.${path}' names no member - expected one of ${names(resolution.expected)}.`, diagnosticCodes.missingEventContextPath));\n break;\n case 'unknownMember':\n issues.push(issue('warning', index, column, token.length, `Unknown event context member '${resolution.segment}' in '$eventContext.${path}' - expected one of ${names(resolution.expected)}.`, diagnosticCodes.unknownEventContextMember));\n break;\n case 'unknownSubPath': {\n const has = resolution.expected.length === 0 ? 'no members to address' : `members ${names(resolution.expected)}`;\n issues.push(issue('warning', index, column, token.length, `Unknown event context path '$eventContext.${path}' - '${resolution.member?.name}' (${resolution.member?.type}) has ${has}.`, diagnosticCodes.unknownEventContextPath));\n break;\n }\n case 'belowCollection':\n issues.push(issue('error', index, column, token.length, `'$eventContext.${path}' cannot resolve - '${resolution.member?.name}' is a collection (${resolution.member?.type}) and cannot be addressed below.`, diagnosticCodes.eventContextPathBelowCollection));\n break;\n }\n }\n\n // Only $eventContext resolves in a dynamic key; any other $ source is kept as the literal key text.\n const target = line.trim().match(mappingTarget)?.[1];\n const source = target?.match(/\\.\\$(\\w+)/)?.[1];\n if (target && source && source !== 'eventContext') {\n issues.push(tokenIssue('warning', index, line, target, `Dynamic dictionary key '$${source}' in '${target}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${source}' becomes the key.`, diagnosticCodes.unresolvedDynamicKeySource));\n }\n }\n\n return issues;\n}\n"],"mappings":"88BAgDA,SAAS,MACL,EACA,EACA,EACA,EACA,EACA,EACe,C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124.0",
3
+ "version": "4.124.1",
4
4
  "description": "Monaco language service for the Cratis Screenplay DSL — syntax highlighting, IntelliSense, hover and diagnostics for .play files",
5
5
  "keywords": [
6
6
  "cratis",
@@ -45,11 +45,11 @@
45
45
  ],
46
46
  "scripts": {
47
47
  "build": "node build.mjs",
48
- "test:pack": "node check-package.mjs",
48
+ "test:pack": "node --test check-package.test.mjs && node check-package.mjs",
49
49
  "compile": "tsc --noEmit -p tsconfig.json",
50
50
  "lint": "yarn g:lint",
51
51
  "lint:ci": "yarn g:lint:ci",
52
- "test": "vitest run"
52
+ "test": "node --test check-package.test.mjs && vitest run"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "monaco-editor": ">=0.44.0"
@@ -60,6 +60,7 @@
60
60
  "chai": "^6.3.0",
61
61
  "esbuild": "^0.28.2",
62
62
  "monaco-editor": "^0.55.1",
63
+ "rolldown": "1.2.13",
63
64
  "typescript": "6.0.3",
64
65
  "vitest": "^5.0.3"
65
66
  }