@cratis/screenplay-language 5.3.0 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/TypeReferenceSymbol.js.map +1 -1
- package/dist/bundles/action-subject-authoring.js.map +1 -1
- package/dist/bundles/bmp-word-characters.js.map +1 -1
- package/dist/bundles/case-authoring.js +1 -1
- package/dist/bundles/case-authoring.js.map +1 -1
- package/dist/bundles/code-actions.js.map +1 -1
- package/dist/bundles/command-read-completions.js.map +1 -1
- package/dist/bundles/compiler/Authoring/ActionSubjectQuickFixes.js +3 -3
- package/dist/bundles/compiler/Authoring/ActionSubjectQuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Authoring/QuickFixes.js +4 -4
- package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Authoring/StructuredValueQuickFix.js +1 -1
- package/dist/bundles/compiler/Authoring/StructuredValueQuickFix.js.map +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixContext.js +4 -4
- package/dist/bundles/compiler/Authoring/TimelineQuickFixContext.js.map +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixImports.js +2 -2
- package/dist/bundles/compiler/Authoring/TimelineQuickFixImports.js.map +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixes.js +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DependencyGraph.js +1 -1
- package/dist/bundles/compiler/Dependencies/DependencyGraph.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DependencyKind.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/SliceReferences.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticArgument.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js +1 -1
- package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/SourceLocation.js.map +1 -1
- package/dist/bundles/compiler/Files/AuthoredOrder.js +1 -1
- package/dist/bundles/compiler/Files/AuthoredOrder.js.map +1 -1
- package/dist/bundles/compiler/Files/OrderingRoot.js +1 -1
- package/dist/bundles/compiler/Files/OrderingRoot.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayApplicationAssembly.js +1 -1
- package/dist/bundles/compiler/Files/PlayApplicationAssembly.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayDocumentSource.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayFolderMerge.js +1 -1
- package/dist/bundles/compiler/Files/PlayFolderMerge.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayGlob.js +2 -1
- package/dist/bundles/compiler/Files/PlayGlob.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayImports.js +1 -1
- package/dist/bundles/compiler/Files/PlayImports.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayPlacement.js.map +1 -1
- package/dist/bundles/compiler/Files/TimelineOrder.js +1 -1
- package/dist/bundles/compiler/Files/TimelineOrder.js.map +1 -1
- package/dist/bundles/compiler/Generation/FiniteGenerationRules.js +1 -1
- package/dist/bundles/compiler/Generation/GenerationAssessmentCache.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationChecksum.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPattern.js +1 -1
- package/dist/bundles/compiler/Generation/GenerationPattern.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPatternAssessment.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPatternParser.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPatternToken.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationRuleProof.js +1 -1
- package/dist/bundles/compiler/Generation/InvalidGenerationPattern.js.map +1 -1
- package/dist/bundles/compiler/Generation/RegexCharacters.js.map +1 -1
- package/dist/bundles/compiler/Generation/RegexExpression.js.map +1 -1
- package/dist/bundles/compiler/Generation/RuleConsistency.js +1 -1
- package/dist/bundles/compiler/Parsing/ActionSubjectClause.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ActionSubjectInputs.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ActionSubjectResolution.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ApplicationContextParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ApplicationContextParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/AuthorizeParser.js +1 -1
- package/dist/bundles/compiler/Parsing/AuthorizeParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CanvasPlacement.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CaptureEventFixturesValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CaptureParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CaptureParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ClockOperandParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CodeBlockParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandHandlerValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CommandParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandReadSources.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandResponseParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CommandResponseParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CompositionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CompositionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConditionDepthBudget.js +2 -0
- package/dist/bundles/compiler/Parsing/ConditionDepthBudget.js.map +1 -0
- package/dist/bundles/compiler/Parsing/ConditionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ConditionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ContinuationValues.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DeclarationParsers.js +1 -1
- package/dist/bundles/compiler/Parsing/DeclarationParsers.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DependencySourceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DependencySourceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DependsOnParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DescriptionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DescriptionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DocumentationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DocumentationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EnumerationMembers.js +1 -1
- package/dist/bundles/compiler/Parsing/EnumerationMembers.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventMetadataParser.js +1 -1
- package/dist/bundles/compiler/Parsing/EventMetadataParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSubjectValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSubjectValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ExpressionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ExpressionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FeatureBody.js +1 -1
- package/dist/bundles/compiler/Parsing/FeatureBody.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FileImportParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FileReferences.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FoldedEventSources.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GenerationBodyParser.js +1 -1
- package/dist/bundles/compiler/Parsing/GenerationBodyParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GenerationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/GenerationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionInputs.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedInteractions.js +1 -1
- package/dist/bundles/compiler/Parsing/GuardedInteractions.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentityParser.js +1 -1
- package/dist/bundles/compiler/Parsing/IdentityParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentityValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ImplementationParser.js +2 -2
- package/dist/bundles/compiler/Parsing/ImplementationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ImportDiscovery.js +1 -1
- package/dist/bundles/compiler/Parsing/ImportDiscovery.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InlineEventValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InputUses.js +1 -1
- package/dist/bundles/compiler/Parsing/InputUses.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InteractionAlternatives.js +1 -1
- package/dist/bundles/compiler/Parsing/InteractionAlternatives.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InteractionExecutions.js +1 -1
- package/dist/bundles/compiler/Parsing/InteractionExecutions.js.map +1 -1
- package/dist/bundles/compiler/Parsing/LegacyTextRulePatterns.js.map +1 -1
- package/dist/bundles/compiler/Parsing/LineReader.js.map +1 -1
- package/dist/bundles/compiler/Parsing/LineText.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguity.js +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguity.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguityCharacters.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguityGraph.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguityParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchOperandValidation.js +1 -1
- package/dist/bundles/compiler/Parsing/MatchOperandValidation.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ModuleBody.js +1 -1
- package/dist/bundles/compiler/Parsing/ModuleBody.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/OperationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/OperationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/OperationValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/OperationValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ParserContext.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PolicyParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PolicyParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PortableMatchGroupName.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PortableMatchPattern.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PortableMatchSuggestions.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PossibleEventsParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PossibleEventsParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProducesParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionEventScopeValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PropertyLineParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PropertyLineParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PurposeParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PurposeParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PurposeValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/QueryParser.js +1 -1
- package/dist/bundles/compiler/Parsing/QueryParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadModelKeyValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadModelMemberTypeValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadsParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReadsParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/RedeliveryValues.js.map +1 -1
- package/dist/bundles/compiler/Parsing/RefusalDeclarations.js +1 -1
- package/dist/bundles/compiler/Parsing/RefusalDeclarations.js.map +1 -1
- package/dist/bundles/compiler/Parsing/RefusalValueWalker.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ResponseCommandResolver.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ResponseDateValues.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ResponseValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ResponseValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ScreenParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ScreenParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SeedParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SeedParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SliceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SliceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SourceLine.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SourceLineSplitter.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SourceOptionsParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SourceOptionsParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StateMachineParser.js +1 -1
- package/dist/bundles/compiler/Parsing/StateMachineParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StructuralInteractionSites.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StructuredBlockParser.js +1 -1
- package/dist/bundles/compiler/Parsing/StructuredBlockParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StructuredValueParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/TemplateReferenceText.js +1 -1
- package/dist/bundles/compiler/Parsing/TemplateReferenceText.js.map +1 -1
- package/dist/bundles/compiler/Parsing/TriggerDataParser.js +1 -1
- package/dist/bundles/compiler/Parsing/TriggerDataParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/UiBindingParser.js +1 -1
- package/dist/bundles/compiler/Parsing/UiBindingParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js +1 -1
- package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js.map +1 -1
- package/dist/bundles/compiler/Parsing/WorkflowParser.js +1 -1
- package/dist/bundles/compiler/Parsing/WorkflowParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/checkPortableMatchPattern.js.map +1 -1
- package/dist/bundles/compiler/Parsing/hasExponentialMatchAmbiguity.js.map +1 -1
- package/dist/bundles/compiler/Parsing/trimMatchAmbiguityGraph.js.map +1 -1
- package/dist/bundles/compiler/ScreenActionSubjects.js.map +1 -1
- package/dist/bundles/compiler/ScreenplayCompiler.js +1 -1
- package/dist/bundles/compiler/ScreenplayCompiler.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ActionSubjectInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js.map +1 -1
- package/dist/bundles/compiler/Syntax/CaptureEventsSource.js.map +1 -1
- package/dist/bundles/compiler/Syntax/DependencySources.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventDeclarations.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventSourceCatalog.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ExactMathFacts.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ExactNumber.js.map +1 -1
- package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js.map +1 -1
- package/dist/bundles/compiler/Syntax/LegacyWireProjection.js.map +1 -1
- package/dist/bundles/compiler/Syntax/Operations.js.map +1 -1
- package/dist/bundles/compiler/Syntax/PersonaCallers.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ProductionDestinations.js.map +1 -1
- package/dist/bundles/compiler/Syntax/PublicEventInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SourceOptions.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js.map +1 -1
- package/dist/bundles/compiler/Syntax/StreamIdFormatter.js.map +1 -1
- package/dist/bundles/compiler/Syntax/StrictSyntaxJson.js +1 -1
- package/dist/bundles/compiler/Syntax/Structure.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxInvariants.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxJson.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js.map +1 -1
- package/dist/bundles/compiler/Syntax/index.js +1 -1
- package/dist/bundles/compiler/Text/ImplementationHintText.js.map +1 -1
- package/dist/bundles/compiler/Text/ReservedWords.js.map +1 -1
- package/dist/bundles/compiler/Text/SourceStreamNames.js.map +1 -1
- package/dist/bundles/compiler/Text/StringLiteral.js.map +1 -1
- package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js.map +1 -1
- package/dist/bundles/compiler/Text/patterns.js.map +1 -1
- package/dist/bundles/compiler/index.js +1 -1
- package/dist/bundles/completion-items.js +4 -4
- package/dist/bundles/completion-items.js.map +1 -1
- package/dist/bundles/completion-planner.js +2 -2
- package/dist/bundles/completion-planner.js.map +1 -1
- package/dist/bundles/completions.js +1 -1
- package/dist/bundles/completions.js.map +1 -1
- package/dist/bundles/continuation-responses.js +1 -1
- package/dist/bundles/continuation-responses.js.map +1 -1
- package/dist/bundles/declarations.js.map +1 -1
- package/dist/bundles/dependency-completions.js.map +1 -1
- package/dist/bundles/dependency-target-analysis.js.map +1 -1
- package/dist/bundles/diagnostic-codes.js +1 -1
- package/dist/bundles/diagnostic-codes.js.map +1 -1
- package/dist/bundles/diagnostics.js +1 -1
- package/dist/bundles/diagnostics.js.map +1 -1
- package/dist/bundles/document-context.js.map +1 -1
- package/dist/bundles/documentation-item.js.map +1 -1
- package/dist/bundles/event-analysis-source.js.map +1 -1
- package/dist/bundles/event-context-catalog.js.map +1 -1
- package/dist/bundles/event-context.js.map +1 -1
- package/dist/bundles/event-source-authoring.js +11 -11
- package/dist/bundles/event-source-authoring.js.map +1 -1
- package/dist/bundles/example-analysis.js +2 -2
- package/dist/bundles/example-analysis.js.map +1 -1
- package/dist/bundles/example-authoring.js +2 -2
- package/dist/bundles/example-authoring.js.map +1 -1
- package/dist/bundles/example-declaration-items.js.map +1 -1
- package/dist/bundles/example-values.js.map +1 -1
- package/dist/bundles/file-imports.js.map +1 -1
- package/dist/bundles/file-references.js.map +1 -1
- package/dist/bundles/generation-completions.js.map +1 -1
- package/dist/bundles/hover-content.js +5 -5
- package/dist/bundles/hover-content.js.map +1 -1
- package/dist/bundles/hover.js.map +1 -1
- package/dist/bundles/index.js +1 -1
- package/dist/bundles/index.js.map +1 -1
- package/dist/bundles/inlay-hints.js.map +1 -1
- package/dist/bundles/inline-completions.js +1 -1
- package/dist/bundles/inline-completions.js.map +1 -1
- package/dist/bundles/inline-event-validation.js +1 -1
- package/dist/bundles/inline-event-validation.js.map +1 -1
- package/dist/bundles/keyword-docs.js.map +1 -1
- package/dist/bundles/language.js.map +1 -1
- package/dist/bundles/named-rule-context.js.map +1 -1
- package/dist/bundles/operation-authoring.js +6 -6
- package/dist/bundles/operation-authoring.js.map +1 -1
- package/dist/bundles/persona-analysis.js +1 -1
- package/dist/bundles/persona-analysis.js.map +1 -1
- package/dist/bundles/production-destinations.js +1 -1
- package/dist/bundles/production-destinations.js.map +1 -1
- package/dist/bundles/purpose-items.js.map +1 -1
- package/dist/bundles/reaction-authoring.js +3 -3
- package/dist/bundles/reaction-authoring.js.map +1 -1
- package/dist/bundles/read-model-key-completions.js +1 -1
- package/dist/bundles/read-model-key-completions.js.map +1 -1
- package/dist/bundles/refusal-context.js.map +1 -1
- package/dist/bundles/response-analysis.js.map +1 -1
- package/dist/bundles/response-completions.js +1 -1
- package/dist/bundles/response-completions.js.map +1 -1
- package/dist/bundles/response-tokens.js +2 -2
- package/dist/bundles/response-tokens.js.map +1 -1
- package/dist/bundles/scope-items.js +3 -3
- package/dist/bundles/scope-items.js.map +1 -1
- package/dist/bundles/structure-completions.js.map +1 -1
- package/dist/bundles/sub-language-registry.js.map +1 -1
- package/dist/bundles/sub-languages/capture/CompletionProvider.js.map +1 -1
- package/dist/bundles/sub-languages/capture/HoverProvider.js.map +1 -1
- package/dist/bundles/sub-languages/capture/Validator.js.map +1 -1
- package/dist/bundles/sub-languages/capture/index.js.map +1 -1
- package/dist/bundles/sub-languages/capture/language.js.map +1 -1
- package/dist/bundles/sub-languages/cdl.js.map +1 -1
- package/dist/bundles/sub-languages/pdl.js.map +1 -1
- package/dist/bundles/sub-languages/projection/CodeActionProvider.js.map +1 -1
- package/dist/bundles/sub-languages/projection/CompletionProvider.js +1 -1
- package/dist/bundles/sub-languages/projection/CompletionProvider.js.map +1 -1
- package/dist/bundles/sub-languages/projection/HoverProvider.js.map +1 -1
- package/dist/bundles/sub-languages/projection/Validator.js.map +1 -1
- package/dist/bundles/sub-languages/projection/index.js.map +1 -1
- package/dist/bundles/sub-languages/projection/language.js.map +1 -1
- package/dist/bundles/symbols.js +2 -2
- package/dist/bundles/symbols.js.map +1 -1
- package/dist/bundles/themes/screenplay-dark.js.map +1 -1
- package/dist/bundles/themes/screenplay-light.js.map +1 -1
- package/dist/bundles/tokens.js.map +1 -1
- package/dist/bundles/validation.js +2 -2
- package/dist/bundles/validation.js.map +1 -1
- package/dist/diagnostic-codes.d.ts +1 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-context.js","names":["inString","inTemplate","index","line","character","map","lines","open","chain","currentIndent","indent","lineIndex","fences","lineIndent","headers"],"sources":["../../document-context.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\n// Matches SourceLineSplitter.CommentStart: // inside a double-quoted string or a\n// backtick template is content; a backslash escapes the next character only in a string.\nexport function withoutComment(line: string): string {\n let inString = false;\n let inTemplate = false;\n for (let index = 0; index < line.length; index++) {\n const character = line[index];\n if (character === '\\\\' && inString && index + 1 < line.length) {\n index++;\n } else if (character === '\"' && !inTemplate) {\n inString = !inString;\n } else if (character === '`' && !inString) {\n inTemplate = !inTemplate;\n } else if (!inString && !inTemplate && character === '/' && line[index + 1] === '/') {\n return line.slice(0, index);\n }\n }\n return line;\n}\n\nexport function indentOf(line: string): number {\n return line.length - line.trimStart().length;\n}\n\nexport function firstWord(line: string): string {\n return line.trim().split(/\\s+/)[0] ?? '';\n}\n\n// Marks every line that is a code fence or lives inside one, so structural\n// scanning never mistakes inline C#/TypeScript/HTML for Screenplay.\nexport function fenceMap(lines: string[]): boolean[] {\n const map: boolean[] = new Array(lines.length).fill(false);\n let open = false;\n for (let index = 0; index < lines.length; index++) {\n if (/^\\s*```(?:[a-z]+)?\\s*$/.test(lines[index]) && (!open || /^\\s*```\\s*$/.test(lines[index]))) {\n map[index] = true;\n open = !open;\n continue;\n }\n map[index] = open;\n }\n return map;\n}\n\n// Walks upward from a position and returns the chain of enclosing block openers,\n// innermost first — e.g. ['command', 'slice', 'feature', 'module']. A block opener\n// is any less-indented line above; its first word names the construct (for layout\n// slots this is the slot name, which callers treat as an unknown construct).\nexport function enclosingChain(\n lines: string[],\n fences: boolean[],\n lineIndex: number,\n indent: number,\n): string[] {\n const chain: string[] = [];\n let currentIndent = indent;\n for (let index = lineIndex - 1; index >= 0 && currentIndent > 0; index--) {\n if (fences[index]) continue;\n const line = withoutComment(lines[index]);\n if (line.trim().length === 0) continue;\n const lineIndent = indentOf(line);\n if (lineIndent < currentIndent) {\n chain.push(firstWord(line));\n currentIndent = lineIndent;\n }\n }\n return chain;\n}\n\n// Returns the full trimmed text of the nearest enclosing block opener above a\n// position — the same line enclosingChain's first entry is derived from, but kept\n// whole rather than reduced to its first word. Used where the construct is not\n// identified by a fixed leading keyword, such as a validation rule line, whose\n// first word is the property it applies to rather than \"rule\".\nexport function nearestEnclosingLine(\n lines: string[],\n fences: boolean[],\n lineIndex: number,\n indent: number,\n): string | undefined {\n for (let index = lineIndex - 1; index >= 0 && indent > 0; index--) {\n if (fences[index]) continue;\n const line = withoutComment(lines[index]);\n if (line.trim().length === 0) continue;\n if (indentOf(line) < indent) {\n return line.trim();\n }\n }\n return undefined;\n}\n\n// Like enclosingChain, but keeps each opener whole - 'slice StateView Name' rather than 'slice' - innermost first.\nexport function enclosingHeaders(\n lines: string[],\n fences: boolean[],\n lineIndex: number,\n indent: number,\n): string[] {\n const headers: string[] = [];\n let currentIndent = indent;\n for (let index = lineIndex - 1; index >= 0 && currentIndent > 0; index--) {\n if (fences[index]) continue;\n const line = withoutComment(lines[index]);\n if (line.trim().length === 0) continue;\n const lineIndent = indentOf(line);\n if (lineIndent < currentIndent) {\n headers.push(line.trim());\n currentIndent = lineIndent;\n }\n }\n return headers;\n}\n"],"mappings":"iDAKA,SAAgB,eAAe,EAAsB,CACjD,IAAIA,EAAW,GACXC,EAAa,GACjB,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAK,OAAQ,IAAS,CAC9C,IAAMC,EAAYD,EAAKD,GACvB,GAAIE,IAA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EAAQS,EAAY,EAAGT,GAAS,GAAKQ,EAAS,EAAG,IAAS,CAC/D,GAAIE,EAAOV,GAAQ,SACnB,IAAMC,EAAO,eAAeG,EAAMJ,EAAM,EACxC,GAAIC,EAAK,KAAK,CAAC,CAAC,SAAW,GACvB,SAASA,CAAI,EAAIO,EACjB,OAAOP,EAAK,KAAK,CAEzB,CAEJ,CAGA,SAAgB,iBACZ,EACA,EACA,EACA,EACQ,CACR,IAAMW,EAAoB,CAAC,EACvBL,EAAgBC,EACpB,IAAK,IAAIR,EAAQS,EAAY,EAAGT,GAAS,GAAKO,EAAgB,EAAG,IAAS,CACtE,GAAIG,EAAOV,GAAQ,SACnB,IAAMC,EAAO,eAAeG,EAAMJ,EAAM,EACxC,GAAIC,EAAK,KAAK,CAAC,CAAC,SAAW,EAAG,SAC9B,IAAMU,EAAa,SAASV,CAAI,EAC5BU,EAAaJ,IACbK,EAAQ,KAAKX,EAAK,KAAK,CAAC,EACxB,EAAgBU,EAExB,CACA,OAAOC,CACX"}
|
|
1
|
+
{"version":3,"file":"document-context.js","names":["inString","inTemplate","index","line","character","map","lines","open","chain","currentIndent","indent","lineIndex","fences","lineIndent","headers"],"sources":["../../document-context.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\n// Matches SourceLineSplitter.CommentStart: // inside a double-quoted string or a\n// backtick template is content; a backslash escapes the next character only in a string.\nexport function withoutComment(line: string): string {\n let inString = false;\n let inTemplate = false;\n for (let index = 0; index < line.length; index++) {\n const character = line[index];\n if (character === '\\\\' && inString && index + 1 < line.length) {\n index++;\n } else if (character === '\"' && !inTemplate) {\n inString = !inString;\n } else if (character === '`' && !inString) {\n inTemplate = !inTemplate;\n } else if (!inString && !inTemplate && character === '/' && line[index + 1] === '/') {\n return line.slice(0, index);\n }\n }\n return line;\n}\n\nexport function indentOf(line: string): number {\n return line.length - line.trimStart().length;\n}\n\nexport function firstWord(line: string): string {\n return line.trim().split(/\\s+/)[0] ?? '';\n}\n\n// Marks every line that is a code fence or lives inside one, so structural\n// scanning never mistakes inline C#/TypeScript/HTML for Screenplay.\nexport function fenceMap(lines: string[]): boolean[] {\n const map: boolean[] = new Array(lines.length).fill(false);\n let open = false;\n for (let index = 0; index < lines.length; index++) {\n if (/^\\s*```(?:[a-z]+)?\\s*$/.test(lines[index]) && (!open || /^\\s*```\\s*$/.test(lines[index]))) {\n map[index] = true;\n open = !open;\n continue;\n }\n map[index] = open;\n }\n return map;\n}\n\n// Walks upward from a position and returns the chain of enclosing block openers,\n// innermost first — e.g. ['command', 'slice', 'feature', 'module']. A block opener\n// is any less-indented line above; its first word names the construct (for layout\n// slots this is the slot name, which callers treat as an unknown construct).\nexport function enclosingChain(\n lines: string[],\n fences: boolean[],\n lineIndex: number,\n indent: number,\n): string[] {\n const chain: string[] = [];\n let currentIndent = indent;\n for (let index = lineIndex - 1; index >= 0 && currentIndent > 0; index--) {\n if (fences[index]) continue;\n const line = withoutComment(lines[index]);\n if (line.trim().length === 0) continue;\n const lineIndent = indentOf(line);\n if (lineIndent < currentIndent) {\n chain.push(firstWord(line));\n currentIndent = lineIndent;\n }\n }\n return chain;\n}\n\n// Returns the full trimmed text of the nearest enclosing block opener above a\n// position — the same line enclosingChain's first entry is derived from, but kept\n// whole rather than reduced to its first word. Used where the construct is not\n// identified by a fixed leading keyword, such as a validation rule line, whose\n// first word is the property it applies to rather than \"rule\".\nexport function nearestEnclosingLine(\n lines: string[],\n fences: boolean[],\n lineIndex: number,\n indent: number,\n): string | undefined {\n for (let index = lineIndex - 1; index >= 0 && indent > 0; index--) {\n if (fences[index]) continue;\n const line = withoutComment(lines[index]);\n if (line.trim().length === 0) continue;\n if (indentOf(line) < indent) {\n return line.trim();\n }\n }\n return undefined;\n}\n\n// Like enclosingChain, but keeps each opener whole - 'slice StateView Name' rather than 'slice' - innermost first.\nexport function enclosingHeaders(\n lines: string[],\n fences: boolean[],\n lineIndex: number,\n indent: number,\n): string[] {\n const headers: string[] = [];\n let currentIndent = indent;\n for (let index = lineIndex - 1; index >= 0 && currentIndent > 0; index--) {\n if (fences[index]) continue;\n const line = withoutComment(lines[index]);\n if (line.trim().length === 0) continue;\n const lineIndent = indentOf(line);\n if (lineIndent < currentIndent) {\n headers.push(line.trim());\n currentIndent = lineIndent;\n }\n }\n return headers;\n}\n"],"mappings":"A,iDAKA,SAAgB,eAAe,EAAsB,CACjD,IAAIA,EAAW,GACXC,EAAa,GACjB,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAK,OAAQ,IAAS,CAC9C,IAAMC,EAAYD,EAAKD,GACvB,GAAIE,IAAc,MAAQJ,GAAYE,EAAQ,EAAIC,EAAK,OACnD,SACG,GAAIC,IAAc,KAAO,CAACH,EAC7B,EAAW,CAACD,OACT,GAAII,IAAc,KAAO,CAACJ,EAC7B,EAAa,CAACC,OACX,GAAI,CAACD,GAAY,CAACC,GAAcG,IAAc,KAAOD,EAAKD,EAAQ,KAAO,IAC5E,OAAOC,EAAK,MAAM,EAAGD,CAAK,CAElC,CACA,OAAOC,CACX,CAEA,SAAgB,SAAS,EAAsB,CAC3C,OAAOA,EAAK,OAASA,EAAK,UAAU,CAAC,CAAC,MAC1C,CAEA,SAAgB,UAAU,EAAsB,CAC5C,OAAOA,EAAK,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,IAAM,EAC1C,CAIA,SAAgB,SAAS,EAA4B,CACjD,IAAME,EAAqB,MAAMC,EAAM,MAAM,CAAC,CAAC,KAAK,EAAK,EACrDC,EAAO,GACX,IAAK,IAAIL,EAAQ,EAAGA,EAAQI,EAAM,OAAQ,IAClC,yBAAyB,KAAKA,EAAMJ,EAAM,IAAM,CAACK,GAAQ,cAAc,KAAKD,EAAMJ,EAAM,IACxF,EAAIA,GAAS,GACb,EAAO,CAACK,GAGZ,EAAIL,GAASK,EAEjB,OAAOF,CACX,CAMA,SAAgB,eACZ,EACA,EACA,EACA,EACQ,CACR,IAAMG,EAAkB,CAAC,EACrBC,EAAgBC,EACpB,IAAK,IAAIR,EAAQS,EAAY,EAAGT,GAAS,GAAKO,EAAgB,EAAG,IAAS,CACtE,GAAIG,EAAOV,GAAQ,SACnB,IAAMC,EAAO,eAAeG,EAAMJ,EAAM,EACxC,GAAIC,EAAK,KAAK,CAAC,CAAC,SAAW,EAAG,SAC9B,IAAMU,EAAa,SAASV,CAAI,EAC5BU,EAAaJ,IACbD,EAAM,KAAK,UAAUL,CAAI,CAAC,EAC1B,EAAgBU,EAExB,CACA,OAAOL,CACX,CAOA,SAAgB,qBACZ,EACA,EACA,EACA,EACkB,CAClB,IAAK,IAAIN,EAAQS,EAAY,EAAGT,GAAS,GAAKQ,EAAS,EAAG,IAAS,CAC/D,GAAIE,EAAOV,GAAQ,SACnB,IAAMC,EAAO,eAAeG,EAAMJ,EAAM,EACxC,GAAIC,EAAK,KAAK,CAAC,CAAC,SAAW,GACvB,SAASA,CAAI,EAAIO,EACjB,OAAOP,EAAK,KAAK,CAEzB,CAEJ,CAGA,SAAgB,iBACZ,EACA,EACA,EACA,EACQ,CACR,IAAMW,EAAoB,CAAC,EACvBL,EAAgBC,EACpB,IAAK,IAAIR,EAAQS,EAAY,EAAGT,GAAS,GAAKO,EAAgB,EAAG,IAAS,CACtE,GAAIG,EAAOV,GAAQ,SACnB,IAAMC,EAAO,eAAeG,EAAMJ,EAAM,EACxC,GAAIC,EAAK,KAAK,CAAC,CAAC,SAAW,EAAG,SAC9B,IAAMU,EAAa,SAASV,CAAI,EAC5BU,EAAaJ,IACbK,EAAQ,KAAKX,EAAK,KAAK,CAAC,EACxB,EAAgBU,EAExB,CACA,OAAOC,CACX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-item.js","names":["documentationItem"],"sources":["../../documentation-item.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 { CompletionEntry } from './completion-items';\n\nexport const documentationItem: CompletionEntry = {\n label: 'documentation',\n insertText: 'documentation\\n ```markdown\\n ${1:Reasoning, assumptions or rejected alternatives}\\n ```',\n documentation: 'One nonempty authoring-only Markdown block; report-only (PLAY0270), with no executable effect.',\n};\n"],"mappings":"AAKA,MAAaA,EAAqC,CAC9C,MAAO,gBACP,WAAY,oGACZ,cAAe,gGACnB"}
|
|
1
|
+
{"version":3,"file":"documentation-item.js","names":["documentationItem"],"sources":["../../documentation-item.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 { CompletionEntry } from './completion-items';\n\nexport const documentationItem: CompletionEntry = {\n label: 'documentation',\n insertText: 'documentation\\n ```markdown\\n ${1:Reasoning, assumptions or rejected alternatives}\\n ```',\n documentation: 'One nonempty authoring-only Markdown block; report-only (PLAY0270), with no executable effect.',\n};\n"],"mappings":"AAKA,MAAaA,EAAqC,CAC9C,MAAO,gBACP,WAAY,oGACZ,cAAe,gGACnB,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-analysis-source.js","names":["fenced","lines","line","text","withoutComment"],"sources":["../../event-analysis-source.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 { withoutComment } from './document-context';\n\n// Match SourceLineSplitter: comments begin outside strings/templates; fenced bodies remain opaque.\nexport function eventAnalysisSource(lines: string[]): string[] {\n let fenced = false;\n return lines.map(line => {\n if (fenced) {\n if (line.trim() === '```') fenced = false;\n return line;\n }\n const text = withoutComment(line);\n if (/^\\s*```(?:[a-z]+)?\\s*$/.test(text)) fenced = true;\n return text.trimEnd();\n });\n}\n"],"mappings":"wGAMA,SAAgB,oBAAoB,EAA2B,CAC3D,IAAIA,EAAS,GACb,OAAOC,EAAM,IAAI,GAAQ,CACrB,GAAID,EAEA,OADIE,EAAK,KAAK,IAAM,QAAO,EAAS,IAC7BA,EAEX,IAAMC,EAAOC,EAAeF,CAAI,EAEhC,MADI,yBAAyB,KAAKC,CAAI,IAAG,EAAS,IAC3CA,EAAK,QAAQ,CACxB,CAAC,CACL"}
|
|
1
|
+
{"version":3,"file":"event-analysis-source.js","names":["fenced","lines","line","text","withoutComment"],"sources":["../../event-analysis-source.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 { withoutComment } from './document-context';\n\n// Match SourceLineSplitter: comments begin outside strings/templates; fenced bodies remain opaque.\nexport function eventAnalysisSource(lines: string[]): string[] {\n let fenced = false;\n return lines.map(line => {\n if (fenced) {\n if (line.trim() === '```') fenced = false;\n return line;\n }\n const text = withoutComment(line);\n if (/^\\s*```(?:[a-z]+)?\\s*$/.test(text)) fenced = true;\n return text.trimEnd();\n });\n}\n"],"mappings":"A,wGAMA,SAAgB,oBAAoB,EAA2B,CAC3D,IAAIA,EAAS,GACb,OAAOC,EAAM,IAAI,GAAQ,CACrB,GAAID,EAEA,OADIE,EAAK,KAAK,IAAM,QAAO,EAAS,IAC7BA,EAEX,IAAMC,EAAOC,EAAeF,CAAI,EAEhC,MADI,yBAAyB,KAAKC,CAAI,IAAG,EAAS,IAC3CA,EAAK,QAAQ,CACxB,CAAC,CACL,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-context-catalog.js","names":["eventContextRootType","eventContextTypes","\"EventContext\"","\"EventType\"","\"EventSourceType\"","\"EventSourceId\"","\"EventStreamType\"","\"EventStreamId\"","\"EventSequenceNumber\"","\"DateTimeOffset\"","\"EventStoreName\"","\"EventStoreNamespaceName\"","\"CorrelationId\"","\"Identity\"","\"EventHash\"","\"Subject\"","\"EventTypeId\"","\"EventTypeGeneration\"","eventContextPaths"],"sources":["../../event-context-catalog.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\n// Generated from Cratis.Screenplay.Syntax.EventContextCatalog - do not edit by hand. The spec\n// Syntax/for_EventContextCatalog/when_holding_the_editor_catalog_to_it fails when this file drifts; rerun\n// it with SCREENPLAY_REGENERATE_EVENT_CONTEXT=1 to rewrite it.\n\nexport type EventContextMemberKind = 'value' | 'composite' | 'collection' | 'function';\n\nexport interface EventContextMember {\n readonly name: string;\n readonly type: string;\n readonly kind: EventContextMemberKind;\n readonly description: string;\n}\n\nexport interface EventContextPath extends EventContextMember {\n readonly path: string;\n}\n\nexport const eventContextRootType = 'EventContext';\n\n// The members of each type a path passes through, keyed by type name.\nexport const eventContextTypes: Readonly<Record<string, readonly EventContextMember[]>> = {\n 'EventContext': [\n { name: 'eventType', type: 'EventType', kind: 'composite', description: 'The type of the event - its identifier, generation and whether it is a tombstone.' },\n { name: 'eventSourceType', type: 'EventSourceType', kind: 'value', description: 'The type of the event source the event was appended to.' },\n { name: 'eventSourceId', type: 'EventSourceId', kind: 'value', description: 'The identifier of the event source the event was appended to - the value $eventSourceId resolves.' },\n { name: 'eventStreamType', type: 'EventStreamType', kind: 'value', description: 'The type of the event stream the event belongs to.' },\n { name: 'eventStreamId', type: 'EventStreamId', kind: 'value', description: 'The identifier of the event stream the event belongs to.' },\n { name: 'sequenceNumber', type: 'EventSequenceNumber', kind: 'value', description: 'The position of the event in its event sequence.' },\n { name: 'occurred', type: 'DateTimeOffset', kind: 'value', description: 'When the event occurred - the time it was appended unless one was given.' },\n { name: 'eventStore', type: 'EventStoreName', kind: 'value', description: 'The name of the event store the event belongs to.' },\n { name: 'namespace', type: 'EventStoreNamespaceName', kind: 'value', description: 'The namespace within the event store the event belongs to.' },\n { name: 'correlationId', type: 'CorrelationId', kind: 'value', description: 'The correlation identifier the event was appended with.' },\n { name: 'causation', type: 'IEnumerable<Causation>', kind: 'collection', description: 'The chain of causes that led to the event - a collection, not addressable below.' },\n { name: 'causedBy', type: 'Identity', kind: 'composite', description: 'The identity that caused the event.' },\n { name: 'tags', type: 'IEnumerable<Tag>', kind: 'collection', description: 'The tags the event was appended with - a collection, not addressable below.' },\n { name: 'hash', type: 'EventHash', kind: 'value', description: 'The hash of the event content.' },\n { name: 'observationState', type: 'EventObservationState', kind: 'value', description: 'Whether the observer sees the event for the first time or again on replay - differs between live processing and replay.' },\n { name: 'subject', type: 'Subject', kind: 'value', description: 'The compliance subject the event is about - the event source identifier unless one was given.' },\n { name: 'subjectIsEventSourceId', type: 'bool', kind: 'value', description: 'Whether the subject is the event source identifier.' },\n ],\n 'EventType': [\n { name: 'id', type: 'EventTypeId', kind: 'value', description: 'The identifier of the event type.' },\n { name: 'generation', type: 'EventTypeGeneration', kind: 'value', description: 'The generation of the event type.' },\n { name: 'tombstone', type: 'bool', kind: 'value', description: 'Whether the event is a tombstone event.' },\n ],\n 'EventSourceType': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventSourceId': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventStreamType': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventStreamId': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventSequenceNumber': [\n { name: 'value', type: 'ulong', kind: 'value', description: 'The underlying ulong value.' },\n ],\n 'DateTimeOffset': [\n { name: 'Week', type: 'int', kind: 'function', description: 'The ISO 8601 week of the year the value falls in.' },\n ],\n 'EventStoreName': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventStoreNamespaceName': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'CorrelationId': [\n { name: 'value', type: 'Guid', kind: 'value', description: 'The underlying Guid value.' },\n ],\n 'Identity': [\n { name: 'subject', type: 'string', kind: 'value', description: 'The subject identifier of the identity.' },\n { name: 'name', type: 'string', kind: 'value', description: 'The display name of the identity.' },\n { name: 'userName', type: 'string', kind: 'value', description: 'The user name of the identity.' },\n { name: 'onBehalfOf', type: 'Identity', kind: 'composite', description: 'The identity this identity acted on behalf of, if any - an identity with the same members.' },\n ],\n 'EventHash': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'Subject': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventTypeId': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventTypeGeneration': [\n { name: 'value', type: 'uint', kind: 'value', description: 'The underlying uint value.' },\n ],\n};\n\n// Every path the catalog lists, depth first in declaration order.\nexport const eventContextPaths: readonly EventContextPath[] = [\n { path: 'eventType', name: 'eventType', type: 'EventType', kind: 'composite', description: 'The type of the event - its identifier, generation and whether it is a tombstone.' },\n { path: 'eventType.id', name: 'id', type: 'EventTypeId', kind: 'value', description: 'The identifier of the event type.' },\n { path: 'eventType.id.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventType.generation', name: 'generation', type: 'EventTypeGeneration', kind: 'value', description: 'The generation of the event type.' },\n { path: 'eventType.generation.value', name: 'value', type: 'uint', kind: 'value', description: 'The underlying uint value.' },\n { path: 'eventType.tombstone', name: 'tombstone', type: 'bool', kind: 'value', description: 'Whether the event is a tombstone event.' },\n { path: 'eventSourceType', name: 'eventSourceType', type: 'EventSourceType', kind: 'value', description: 'The type of the event source the event was appended to.' },\n { path: 'eventSourceType.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventSourceId', name: 'eventSourceId', type: 'EventSourceId', kind: 'value', description: 'The identifier of the event source the event was appended to - the value $eventSourceId resolves.' },\n { path: 'eventSourceId.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventStreamType', name: 'eventStreamType', type: 'EventStreamType', kind: 'value', description: 'The type of the event stream the event belongs to.' },\n { path: 'eventStreamType.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventStreamId', name: 'eventStreamId', type: 'EventStreamId', kind: 'value', description: 'The identifier of the event stream the event belongs to.' },\n { path: 'eventStreamId.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'sequenceNumber', name: 'sequenceNumber', type: 'EventSequenceNumber', kind: 'value', description: 'The position of the event in its event sequence.' },\n { path: 'sequenceNumber.value', name: 'value', type: 'ulong', kind: 'value', description: 'The underlying ulong value.' },\n { path: 'occurred', name: 'occurred', type: 'DateTimeOffset', kind: 'value', description: 'When the event occurred - the time it was appended unless one was given.' },\n { path: 'occurred.Week', name: 'Week', type: 'int', kind: 'function', description: 'The ISO 8601 week of the year the value falls in.' },\n { path: 'eventStore', name: 'eventStore', type: 'EventStoreName', kind: 'value', description: 'The name of the event store the event belongs to.' },\n { path: 'eventStore.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'namespace', name: 'namespace', type: 'EventStoreNamespaceName', kind: 'value', description: 'The namespace within the event store the event belongs to.' },\n { path: 'namespace.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'correlationId', name: 'correlationId', type: 'CorrelationId', kind: 'value', description: 'The correlation identifier the event was appended with.' },\n { path: 'correlationId.value', name: 'value', type: 'Guid', kind: 'value', description: 'The underlying Guid value.' },\n { path: 'causation', name: 'causation', type: 'IEnumerable<Causation>', kind: 'collection', description: 'The chain of causes that led to the event - a collection, not addressable below.' },\n { path: 'causedBy', name: 'causedBy', type: 'Identity', kind: 'composite', description: 'The identity that caused the event.' },\n { path: 'causedBy.subject', name: 'subject', type: 'string', kind: 'value', description: 'The subject identifier of the identity.' },\n { path: 'causedBy.name', name: 'name', type: 'string', kind: 'value', description: 'The display name of the identity.' },\n { path: 'causedBy.userName', name: 'userName', type: 'string', kind: 'value', description: 'The user name of the identity.' },\n { path: 'causedBy.onBehalfOf', name: 'onBehalfOf', type: 'Identity', kind: 'composite', description: 'The identity this identity acted on behalf of, if any - an identity with the same members.' },\n { path: 'tags', name: 'tags', type: 'IEnumerable<Tag>', kind: 'collection', description: 'The tags the event was appended with - a collection, not addressable below.' },\n { path: 'hash', name: 'hash', type: 'EventHash', kind: 'value', description: 'The hash of the event content.' },\n { path: 'hash.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'observationState', name: 'observationState', type: 'EventObservationState', kind: 'value', description: 'Whether the observer sees the event for the first time or again on replay - differs between live processing and replay.' },\n { path: 'subject', name: 'subject', type: 'Subject', kind: 'value', description: 'The compliance subject the event is about - the event source identifier unless one was given.' },\n { path: 'subject.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'subjectIsEventSourceId', name: 'subjectIsEventSourceId', type: 'bool', kind: 'value', description: 'Whether the subject is the event source identifier.' },\n];\n"],"mappings":"AAoBA,MAAaA,EAAuB,eAGvBC,EAA6E,CACtFC,aAAgB,CACZ,CAAE,KAAM,YAAa,KAAM,YAAa,KAAM,YAAa,YAAa,mFAAoF,EAC5J,CAAE,KAAM,kBAAmB,KAAM,kBAAmB,KAAM,QAAS,YAAa,yDAA0D,EAC1I,CAAE,KAAM,gBAAiB,KAAM,gBAAiB,KAAM,QAAS,YAAa,mGAAoG,EAChL,CAAE,KAAM,kBAAmB,KAAM,kBAAmB,KAAM,QAAS,YAAa,oDAAqD,EACrI,CAAE,KAAM,gBAAiB,KAAM,gBAAiB,KAAM,QAAS,YAAa,0DAA2D,EACvI,CAAE,KAAM,iBAAkB,KAAM,sBAAuB,KAAM,QAAS,YAAa,kDAAmD,EACtI,CAAE,KAAM,WAAY,KAAM,iBAAkB,KAAM,QAAS,YAAa,0EAA2E,EACnJ,CAAE,KAAM,aAAc,KAAM,iBAAkB,KAAM,QAAS,YAAa,mDAAoD,EAC9H,CAAE,KAAM,YAAa,KAAM,0BAA2B,KAAM,QAAS,YAAa,4DAA6D,EAC/I,CAAE,KAAM,gBAAiB,KAAM,gBAAiB,KAAM,QAAS,YAAa,yDAA0D,EACtI,CAAE,KAAM,YAAa,KAAM,yBAA0B,KAAM,aAAc,YAAa,kFAAmF,EACzK,CAAE,KAAM,WAAY,K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ventSourceType\"","\"EventSourceId\"","\"EventStreamType\"","\"EventStreamId\"","\"EventSequenceNumber\"","\"DateTimeOffset\"","\"EventStoreName\"","\"EventStoreNamespaceName\"","\"CorrelationId\"","\"Identity\"","\"EventHash\"","\"Subject\"","\"EventTypeId\"","\"EventTypeGeneration\"","eventContextPaths"],"sources":["../../event-context-catalog.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\n// Generated from Cratis.Screenplay.Syntax.EventContextCatalog - do not edit by hand. The spec\n// Syntax/for_EventContextCatalog/when_holding_the_editor_catalog_to_it fails when this file drifts; rerun\n// it with SCREENPLAY_REGENERATE_EVENT_CONTEXT=1 to rewrite it.\n\nexport type EventContextMemberKind = 'value' | 'composite' | 'collection' | 'function';\n\nexport interface EventContextMember {\n readonly name: string;\n readonly type: string;\n readonly kind: EventContextMemberKind;\n readonly description: string;\n}\n\nexport interface EventContextPath extends EventContextMember {\n readonly path: string;\n}\n\nexport const eventContextRootType = 'EventContext';\n\n// The members of each type a path passes through, keyed by type name.\nexport const eventContextTypes: Readonly<Record<string, readonly EventContextMember[]>> = {\n 'EventContext': [\n { name: 'eventType', type: 'EventType', kind: 'composite', description: 'The type of the event - its identifier, generation and whether it is a tombstone.' },\n { name: 'eventSourceType', type: 'EventSourceType', kind: 'value', description: 'The type of the event source the event was appended to.' },\n { name: 'eventSourceId', type: 'EventSourceId', kind: 'value', description: 'The identifier of the event source the event was appended to - the value $eventSourceId resolves.' },\n { name: 'eventStreamType', type: 'EventStreamType', kind: 'value', description: 'The type of the event stream the event belongs to.' },\n { name: 'eventStreamId', type: 'EventStreamId', kind: 'value', description: 'The identifier of the event stream the event belongs to.' },\n { name: 'sequenceNumber', type: 'EventSequenceNumber', kind: 'value', description: 'The position of the event in its event sequence.' },\n { name: 'occurred', type: 'DateTimeOffset', kind: 'value', description: 'When the event occurred - the time it was appended unless one was given.' },\n { name: 'eventStore', type: 'EventStoreName', kind: 'value', description: 'The name of the event store the event belongs to.' },\n { name: 'namespace', type: 'EventStoreNamespaceName', kind: 'value', description: 'The namespace within the event store the event belongs to.' },\n { name: 'correlationId', type: 'CorrelationId', kind: 'value', description: 'The correlation identifier the event was appended with.' },\n { name: 'causation', type: 'IEnumerable<Causation>', kind: 'collection', description: 'The chain of causes that led to the event - a collection, not addressable below.' },\n { name: 'causedBy', type: 'Identity', kind: 'composite', description: 'The identity that caused the event.' },\n { name: 'tags', type: 'IEnumerable<Tag>', kind: 'collection', description: 'The tags the event was appended with - a collection, not addressable below.' },\n { name: 'hash', type: 'EventHash', kind: 'value', description: 'The hash of the event content.' },\n { name: 'observationState', type: 'EventObservationState', kind: 'value', description: 'Whether the observer sees the event for the first time or again on replay - differs between live processing and replay.' },\n { name: 'subject', type: 'Subject', kind: 'value', description: 'The compliance subject the event is about - the event source identifier unless one was given.' },\n { name: 'subjectIsEventSourceId', type: 'bool', kind: 'value', description: 'Whether the subject is the event source identifier.' },\n ],\n 'EventType': [\n { name: 'id', type: 'EventTypeId', kind: 'value', description: 'The identifier of the event type.' },\n { name: 'generation', type: 'EventTypeGeneration', kind: 'value', description: 'The generation of the event type.' },\n { name: 'tombstone', type: 'bool', kind: 'value', description: 'Whether the event is a tombstone event.' },\n ],\n 'EventSourceType': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventSourceId': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventStreamType': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventStreamId': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventSequenceNumber': [\n { name: 'value', type: 'ulong', kind: 'value', description: 'The underlying ulong value.' },\n ],\n 'DateTimeOffset': [\n { name: 'Week', type: 'int', kind: 'function', description: 'The ISO 8601 week of the year the value falls in.' },\n ],\n 'EventStoreName': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventStoreNamespaceName': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'CorrelationId': [\n { name: 'value', type: 'Guid', kind: 'value', description: 'The underlying Guid value.' },\n ],\n 'Identity': [\n { name: 'subject', type: 'string', kind: 'value', description: 'The subject identifier of the identity.' },\n { name: 'name', type: 'string', kind: 'value', description: 'The display name of the identity.' },\n { name: 'userName', type: 'string', kind: 'value', description: 'The user name of the identity.' },\n { name: 'onBehalfOf', type: 'Identity', kind: 'composite', description: 'The identity this identity acted on behalf of, if any - an identity with the same members.' },\n ],\n 'EventHash': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'Subject': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventTypeId': [\n { name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n ],\n 'EventTypeGeneration': [\n { name: 'value', type: 'uint', kind: 'value', description: 'The underlying uint value.' },\n ],\n};\n\n// Every path the catalog lists, depth first in declaration order.\nexport const eventContextPaths: readonly EventContextPath[] = [\n { path: 'eventType', name: 'eventType', type: 'EventType', kind: 'composite', description: 'The type of the event - its identifier, generation and whether it is a tombstone.' },\n { path: 'eventType.id', name: 'id', type: 'EventTypeId', kind: 'value', description: 'The identifier of the event type.' },\n { path: 'eventType.id.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventType.generation', name: 'generation', type: 'EventTypeGeneration', kind: 'value', description: 'The generation of the event type.' },\n { path: 'eventType.generation.value', name: 'value', type: 'uint', kind: 'value', description: 'The underlying uint value.' },\n { path: 'eventType.tombstone', name: 'tombstone', type: 'bool', kind: 'value', description: 'Whether the event is a tombstone event.' },\n { path: 'eventSourceType', name: 'eventSourceType', type: 'EventSourceType', kind: 'value', description: 'The type of the event source the event was appended to.' },\n { path: 'eventSourceType.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventSourceId', name: 'eventSourceId', type: 'EventSourceId', kind: 'value', description: 'The identifier of the event source the event was appended to - the value $eventSourceId resolves.' },\n { path: 'eventSourceId.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventStreamType', name: 'eventStreamType', type: 'EventStreamType', kind: 'value', description: 'The type of the event stream the event belongs to.' },\n { path: 'eventStreamType.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'eventStreamId', name: 'eventStreamId', type: 'EventStreamId', kind: 'value', description: 'The identifier of the event stream the event belongs to.' },\n { path: 'eventStreamId.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'sequenceNumber', name: 'sequenceNumber', type: 'EventSequenceNumber', kind: 'value', description: 'The position of the event in its event sequence.' },\n { path: 'sequenceNumber.value', name: 'value', type: 'ulong', kind: 'value', description: 'The underlying ulong value.' },\n { path: 'occurred', name: 'occurred', type: 'DateTimeOffset', kind: 'value', description: 'When the event occurred - the time it was appended unless one was given.' },\n { path: 'occurred.Week', name: 'Week', type: 'int', kind: 'function', description: 'The ISO 8601 week of the year the value falls in.' },\n { path: 'eventStore', name: 'eventStore', type: 'EventStoreName', kind: 'value', description: 'The name of the event store the event belongs to.' },\n { path: 'eventStore.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'namespace', name: 'namespace', type: 'EventStoreNamespaceName', kind: 'value', description: 'The namespace within the event store the event belongs to.' },\n { path: 'namespace.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'correlationId', name: 'correlationId', type: 'CorrelationId', kind: 'value', description: 'The correlation identifier the event was appended with.' },\n { path: 'correlationId.value', name: 'value', type: 'Guid', kind: 'value', description: 'The underlying Guid value.' },\n { path: 'causation', name: 'causation', type: 'IEnumerable<Causation>', kind: 'collection', description: 'The chain of causes that led to the event - a collection, not addressable below.' },\n { path: 'causedBy', name: 'causedBy', type: 'Identity', kind: 'composite', description: 'The identity that caused the event.' },\n { path: 'causedBy.subject', name: 'subject', type: 'string', kind: 'value', description: 'The subject identifier of the identity.' },\n { path: 'causedBy.name', name: 'name', type: 'string', kind: 'value', description: 'The display name of the identity.' },\n { path: 'causedBy.userName', name: 'userName', type: 'string', kind: 'value', description: 'The user name of the identity.' },\n { path: 'causedBy.onBehalfOf', name: 'onBehalfOf', type: 'Identity', kind: 'composite', description: 'The identity this identity acted on behalf of, if any - an identity with the same members.' },\n { path: 'tags', name: 'tags', type: 'IEnumerable<Tag>', kind: 'collection', description: 'The tags the event was appended with - a collection, not addressable below.' },\n { path: 'hash', name: 'hash', type: 'EventHash', kind: 'value', description: 'The hash of the event content.' },\n { path: 'hash.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'observationState', name: 'observationState', type: 'EventObservationState', kind: 'value', description: 'Whether the observer sees the event for the first time or again on replay - differs between live processing and replay.' },\n { path: 'subject', name: 'subject', type: 'Subject', kind: 'value', description: 'The compliance subject the event is about - the event source identifier unless one was given.' },\n { path: 'subject.value', name: 'value', type: 'string', kind: 'value', description: 'The underlying string value.' },\n { path: 'subjectIsEventSourceId', name: 'subjectIsEventSourceId', type: 'bool', kind: 'value', description: 'Whether the subject is the event source identifier.' },\n];\n"],"mappings":"AAoBA,MAAaA,EAAuB,eAGvBC,EAA6E,CACtFC,aAAgB,CACZ,CAAE,KAAM,YAAa,KAAM,YAAa,KAAM,YAAa,YAAa,mFAAoF,EAC5J,CAAE,KAAM,kBAAmB,KAAM,kBAAmB,KAAM,QAAS,YAAa,yDAA0D,EAC1I,CAAE,KAAM,gBAAiB,KAAM,gBAAiB,KAAM,QAAS,YAAa,mGAAoG,EAChL,CAAE,KAAM,kBAAmB,KAAM,kBAAmB,KAAM,QAAS,YAAa,oDAAqD,EACrI,CAAE,KAAM,gBAAiB,KAAM,gBAAiB,KAAM,QAAS,YAAa,0DAA2D,EACvI,CAAE,KAAM,iBAAkB,KAAM,sBAAuB,KAAM,QAAS,YAAa,kDAAmD,EACtI,CAAE,KAAM,WA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a,yHAA0H,EAC3O,CAAE,KAAM,UAAW,KAAM,UAAW,KAAM,UAAW,KAAM,QAAS,YAAa,+FAAgG,EACjL,CAAE,KAAM,gBAAiB,KAAM,QAAS,KAAM,SAAU,KAAM,QAAS,YAAa,8BAA+B,EACnH,CAAE,KAAM,yBAA0B,KAAM,yBAA0B,KAAM,OAAQ,KAAM,QAAS,YAAa,qDAAsD,CACtK,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-context.js","names":["member","segment","declared","eventContextMembers","eventContextTypes","eventContextRootType","members","segments","candidate","current","expected","path","next","below","lines","child","eventContextPaths"],"sources":["../../event-context.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\n// Reads the generated event-context catalog. Every editor surface that describes $eventContext - projection\n// completion and hover, and the host editor's context-variable docs and completions - goes through here, so\n// none of them carries a list of its own.\n\nimport { eventContextPaths, eventContextRootType, eventContextTypes } from './event-context-catalog';\nimport type { EventContextMember, EventContextPath } from './event-context-catalog';\n\nexport { eventContextPaths };\nexport type { EventContextMember, EventContextPath };\n\n/**\n * Whether a written path segment names a member. Mirrors EventContextMember.IsNamedBy in the compiler: a property\n * resolves camelCase or with only its first character uppercased; a function resolves by its exact name, with or\n * without parentheses.\n */\nexport function namesEventContextMember(member: EventContextMember, segment: string): boolean {\n if (member.kind === 'function') {\n return segment === member.name || segment === `${member.name}()`;\n }\n\n const declared = member.name[0].toUpperCase() + member.name.slice(1);\n return segment === declared || (segment.length > 0 && segment[0].toUpperCase() + segment.slice(1) === declared);\n}\n\n/** The members of the event context itself - the first segment of every path. */\nexport const eventContextMembers: readonly EventContextMember[] = eventContextTypes[eventContextRootType];\n\n/**\n * The members that may follow the given segments after `$eventContext.`, or undefined when the segments do not\n * resolve or stop at a collection or function, below which nothing is addressable.\n */\nexport function eventContextMembersAfter(segments: readonly string[]): readonly EventContextMember[] | undefined {\n let members = eventContextMembers;\n for (const segment of segments) {\n const member = members.find((candidate) => namesEventContextMember(candidate, segment));\n if (!member || member.kind === 'collection' || member.kind === 'function') {\n return undefined;\n }\n\n members = eventContextTypes[member.type] ?? [];\n }\n\n return members;\n}\n\n/** The member the given segments name, or undefined when they do not resolve. */\nexport function eventContextMemberAt(segments: readonly string[]): EventContextMember | undefined {\n if (segments.length === 0) {\n return undefined;\n }\n\n const members = eventContextMembersAfter(segments.slice(0, -1));\n return members?.find((member) => namesEventContextMember(member, segments[segments.length - 1]));\n}\n\n/** The outcome of resolving a path against the catalog. Mirrors EventContextPathStatus in the compiler. */\nexport type EventContextPathStatus = 'known' | 'missing' | 'unknownMember' | 'unknownSubPath' | 'belowCollection';\n\n/** A path resolved against the catalog. Mirrors EventContextPathResolution in the compiler. */\nexport interface EventContextPathResolution {\n readonly status: EventContextPathStatus;\n readonly member?: EventContextMember;\n readonly segment?: string;\n readonly expected: readonly EventContextMember[];\n}\n\n/**\n * Resolves a path, as written after `$eventContext.`, the way EventContextCatalog.Resolve in the compiler does, so the\n * editor reports what the compiler reports.\n */\nexport function resolveEventContextPath(path: string): EventContextPathResolution {\n let current: EventContextMember | undefined;\n let expected = eventContextMembers;\n for (const segment of path.split('.')) {\n if (segment.length === 0) {\n return { status: 'missing', member: current, expected };\n }\n\n if (current?.kind === 'collection') {\n return { status: 'belowCollection', member: current, segment, expected: [] };\n }\n\n const next = expected.find((member) => namesEventContextMember(member, segment));\n if (!next) {\n return { status: current ? 'unknownSubPath' : 'unknownMember', member: current, segment, expected };\n }\n\n current = next;\n expected = next.kind === 'function' ? [] : eventContextTypes[next.type] ?? [];\n }\n\n return { status: 'known', member: current, expected: [] };\n}\n\n/** Markdown describing $eventContext and its members, for hovers. */\nexport function describeEventContext(): string {\n return [\n '**$eventContext**',\n '',\n 'Metadata about the event being projected. Paths are checked against the event-context catalog; `causation` and `tags` are collections and cannot be addressed below.',\n '',\n '**Members:**',\n ...eventContextMembers.map((member) => `- \\`${member.name}\\` (${member.type}) - ${member.description}`),\n ].join('\\n');\n}\n\n/** Markdown describing one member of the event context, for hovers. */\nexport function describeEventContextMember(path: string, member: EventContextMember): string {\n const below = member.kind === 'collection' || member.kind === 'function' ? [] : eventContextTypes[member.type] ?? [];\n const lines = [`**$eventContext.${path}**: \\`${member.type}\\``, '', member.description];\n if (below.length > 0) {\n lines.push('', `**Members:** ${below.map((child) => `\\`${child.name}\\``).join(', ')}`);\n }\n\n return lines.join('\\n');\n}\n"],"mappings":"iKAkBA,SAAgB,wBAAwB,EAA4B,EAA0B,CAC1F,GAAIA,EAAO,OAAS,WAChB,OAAOC,IAAYD,EAAO,MAAQC,IAAY,GAAGD,EAAO,KAAK,IAGjE,IAAME,EAAWF,EAAO,KAAK,EAAE,CAAC,YAAY,EAAIA,EAAO,KAAK,MAAM,CAAC,EACnE,OAAOC,IAAYC,GAAaD,EAAQ,OAAS,GAAKA,EAAQ,EAAE,CAAC,YAAY,EAAIA,EAAQ,MAAM,CAAC,IAAMC,CAC1G,CAGA,MAAaC,EAAqDC,EAAkBC,GAMpF,SAAgB,yBAAyB,EAAwE,CAC7G,IAAIC,EAAUH,EACd,IAAK,IAAMF,KAAWM,EAAU,CAC5B,IAAMP,EAASM,EAAQ,KAAM,GAAc,wBAAwBE,EAAWP,CAAO,CAAC,EACtF,GAAI,CAACD,GAAUA,EAAO,OAAS,cAAgBA,EAAO,OAAS,WAC3D,OAGJ,EAAUI,EAAkBJ,EAAO,OAAS,CAAC,CACjD,CAEA,OAAOM,CACX,CAGA,SAAgB,qBAAqB,EAA6D,CAC9F,GAAIC,EAAS,SAAW,EAKxB,OADgB,yBAAyBA,EAAS,MAAM,EAAG,EAAE,CAChD,CAAC,EAAE,KAAM,GAAW,wBAAwBP,EAAQO,EAASA,EAAS,OAAS,EAAE,CAAC,CACnG,CAiBA,SAAgB,wBAAwB,EAA0C,CAC9E,IAAIE,EACAC,EAAWP,EACf,IAAK,IAAMF,KAAWU,EAAK,MAAM,GAAG,EAAG,CACnC,GAAIV,EAAQ,SAAW,EACnB,MAAO,CAAE,OAAQ,UAAW,OAAQQ,EAAS,UAAS,EAG1D,GAAIA,GAAS,OAAS,aAClB,MAAO,CAAE,OAAQ,kBAAmB,OAAQA,EAAS,UAAS,SAAU,CAAC,CAAE,EAG/E,IAAMG,EAAOF,EAAS,KAAM,GAAW,wBAAwBV,EAAQC,CAAO,CAAC,EAC/E,GAAI,CAACW,EACD,MAAO,CAAE,OAAQH,EAAU,iBAAmB,gBAAiB,OAAQA,EAAS,UAAS,UAAS,EAGtG,EAAUG,EACV,EAAWA,EAAK,OAAS,WAAa,CAAC,EAAIR,EAAkBQ,EAAK,OAAS,CAAC,CAChF,CAEA,MAAO,CAAE,OAAQ,QAAS,OAAQH,EAAS,SAAU,CAAC,CAAE,CAC5D,CAGA,SAAgB,sBAA+B,CAC3C,MAAO,CACH,oBACA,GACA,uKACA,GACA,eACA,GAAGN,EAAoB,IAAK,GAAW,OAAOH,EAAO,KAAK,MAAMA,EAAO,KAAK,MAAMA,EAAO,aAAa,CAC1G,CAAC,CAAC,KAAK;CAAI,CACf,CAGA,SAAgB,2BAA2B,EAAc,EAAoC,CACzF,IAAMa,EAAQb,EAAO,OAAS,cAAgBA,EAAO,OAAS,WAAa,CAAC,EAAII,EAAkBJ,EAAO,OAAS,CAAC,EAC7Gc,EAAQ,CAAC,mBAAmBH,EAAK,QAAQX,EAAO,KAAK,IAAK,GAAIA,EAAO,WAAW,EAKtF,OAJIa,EAAM,OAAS,GACfC,EAAM,KAAK,GAAI,gBAAgBD,EAAM,IAAK,GAAU,KAAKE,EAAM,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,GAAG,EAGlFD,EAAM,KAAK;CAAI,CAC1B"}
|
|
1
|
+
{"version":3,"file":"event-context.js","names":["member","segment","declared","eventContextMembers","eventContextTypes","eventContextRootType","members","segments","candidate","current","expected","path","next","below","lines","child","eventContextPaths"],"sources":["../../event-context.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\n// Reads the generated event-context catalog. Every editor surface that describes $eventContext - projection\n// completion and hover, and the host editor's context-variable docs and completions - goes through here, so\n// none of them carries a list of its own.\n\nimport { eventContextPaths, eventContextRootType, eventContextTypes } from './event-context-catalog';\nimport type { EventContextMember, EventContextPath } from './event-context-catalog';\n\nexport { eventContextPaths };\nexport type { EventContextMember, EventContextPath };\n\n/**\n * Whether a written path segment names a member. Mirrors EventContextMember.IsNamedBy in the compiler: a property\n * resolves camelCase or with only its first character uppercased; a function resolves by its exact name, with or\n * without parentheses.\n */\nexport function namesEventContextMember(member: EventContextMember, segment: string): boolean {\n if (member.kind === 'function') {\n return segment === member.name || segment === `${member.name}()`;\n }\n\n const declared = member.name[0].toUpperCase() + member.name.slice(1);\n return segment === declared || (segment.length > 0 && segment[0].toUpperCase() + segment.slice(1) === declared);\n}\n\n/** The members of the event context itself - the first segment of every path. */\nexport const eventContextMembers: readonly EventContextMember[] = eventContextTypes[eventContextRootType];\n\n/**\n * The members that may follow the given segments after `$eventContext.`, or undefined when the segments do not\n * resolve or stop at a collection or function, below which nothing is addressable.\n */\nexport function eventContextMembersAfter(segments: readonly string[]): readonly EventContextMember[] | undefined {\n let members = eventContextMembers;\n for (const segment of segments) {\n const member = members.find((candidate) => namesEventContextMember(candidate, segment));\n if (!member || member.kind === 'collection' || member.kind === 'function') {\n return undefined;\n }\n\n members = eventContextTypes[member.type] ?? [];\n }\n\n return members;\n}\n\n/** The member the given segments name, or undefined when they do not resolve. */\nexport function eventContextMemberAt(segments: readonly string[]): EventContextMember | undefined {\n if (segments.length === 0) {\n return undefined;\n }\n\n const members = eventContextMembersAfter(segments.slice(0, -1));\n return members?.find((member) => namesEventContextMember(member, segments[segments.length - 1]));\n}\n\n/** The outcome of resolving a path against the catalog. Mirrors EventContextPathStatus in the compiler. */\nexport type EventContextPathStatus = 'known' | 'missing' | 'unknownMember' | 'unknownSubPath' | 'belowCollection';\n\n/** A path resolved against the catalog. Mirrors EventContextPathResolution in the compiler. */\nexport interface EventContextPathResolution {\n readonly status: EventContextPathStatus;\n readonly member?: EventContextMember;\n readonly segment?: string;\n readonly expected: readonly EventContextMember[];\n}\n\n/**\n * Resolves a path, as written after `$eventContext.`, the way EventContextCatalog.Resolve in the compiler does, so the\n * editor reports what the compiler reports.\n */\nexport function resolveEventContextPath(path: string): EventContextPathResolution {\n let current: EventContextMember | undefined;\n let expected = eventContextMembers;\n for (const segment of path.split('.')) {\n if (segment.length === 0) {\n return { status: 'missing', member: current, expected };\n }\n\n if (current?.kind === 'collection') {\n return { status: 'belowCollection', member: current, segment, expected: [] };\n }\n\n const next = expected.find((member) => namesEventContextMember(member, segment));\n if (!next) {\n return { status: current ? 'unknownSubPath' : 'unknownMember', member: current, segment, expected };\n }\n\n current = next;\n expected = next.kind === 'function' ? [] : eventContextTypes[next.type] ?? [];\n }\n\n return { status: 'known', member: current, expected: [] };\n}\n\n/** Markdown describing $eventContext and its members, for hovers. */\nexport function describeEventContext(): string {\n return [\n '**$eventContext**',\n '',\n 'Metadata about the event being projected. Paths are checked against the event-context catalog; `causation` and `tags` are collections and cannot be addressed below.',\n '',\n '**Members:**',\n ...eventContextMembers.map((member) => `- \\`${member.name}\\` (${member.type}) - ${member.description}`),\n ].join('\\n');\n}\n\n/** Markdown describing one member of the event context, for hovers. */\nexport function describeEventContextMember(path: string, member: EventContextMember): string {\n const below = member.kind === 'collection' || member.kind === 'function' ? [] : eventContextTypes[member.type] ?? [];\n const lines = [`**$eventContext.${path}**: \\`${member.type}\\``, '', member.description];\n if (below.length > 0) {\n lines.push('', `**Members:** ${below.map((child) => `\\`${child.name}\\``).join(', ')}`);\n }\n\n return lines.join('\\n');\n}\n"],"mappings":"A,iKAkBA,SAAgB,wBAAwB,EAA4B,EAA0B,CAC1F,GAAIA,EAAO,OAAS,WAChB,OAAOC,IAAYD,EAAO,MAAQC,IAAY,GAAGD,EAAO,KAAK,IAGjE,IAAME,EAAWF,EAAO,KAAK,EAAE,CAA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AAU,CAAC,CAAE,CAC5D,CAGA,SAAgB,sBAA+B,CAC3C,MAAO,CACH,oBACA,GACA,uKACA,GACA,eACA,GAAGN,EAAoB,IAAK,GAAW,OAAOH,EAAO,KAAK,MAAMA,EAAO,KAAK,MAAMA,EAAO,aAAa,CAC1G,CAAC,CAAC,KAAK;CAAI,CACf,CAGA,SAAgB,2BAA2B,EAAc,EAAoC,CACzF,IAAMa,EAAQb,EAAO,OAAS,cAAgBA,EAAO,OAAS,WAAa,CAAC,EAAII,EAAkBJ,EAAO,OAAS,CAAC,EAC7Gc,EAAQ,CAAC,mBAAmBH,EAAK,QAAQX,EAAO,KAAK,IAAK,GAAIA,EAAO,WAAW,EAKtF,OAJIa,EAAM,OAAS,GACfC,EAAM,KAAK,GAAI,gBAAgBD,EAAM,IAAK,GAAU,KAAKE,EAAM,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,GAAG,EAGlFD,EAAM,KAAK;CAAI,CAC1B,C"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import"./_virtual/_virtual/_rolldown/runtime.js";import{
|
|
2
|
-
`))??[],t?.authoringPlacement,t?.authoringPath,t?.authoringPlacementResolved).eventSources}function eventSourceDetails(t
|
|
3
|
-
`),
|
|
1
|
+
import"./_virtual/_virtual/_rolldown/runtime.js";import{enclosingChain as e,fenceMap as t,indentOf as n,withoutComment as r}from"./document-context.js";import{isSourceStreamName as i,isSourceStreamTypeName as a,sourceStreamPattern as o}from"./compiler/Text/SourceStreamNames.js";import"./compiler/index.js";import{symbolsForBuffer as s}from"./symbols.js";import{responseAnalysis as c}from"./response-analysis.js";import{typeReferenceText as l}from"./TypeReferenceSymbol.js";const u=`Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings remain unadmitted (PLAY0268); command handlers require a constrained implementation attachment (PLAY0800).`,d=`Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery is executable from ESM v17, independently of its locator route.`,f=o(`^\\s*stream\\s+(?:[A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)?\\.?)?$`),p=o(`^\\s*streamId\\s*=\\s*([\\w.]*)$`),m=o(`^\\s*identifier\\s+[\\w.]*$`),h=o(`^\\s*streamId\\s+[\\w.]*$`);function analyzeEventSources(e,t){return t=s(e,t),c(e,t?.authoringDocuments??t?.authoringSources?.filter(t=>t!==e.join(`
|
|
2
|
+
`))??[],t?.authoringPlacement,t?.authoringPath,t?.authoringPlacementResolved).eventSources}function eventSourceDetails(e,t){return[`**${t?`stream ${e.name}.${t.name}`:`eventsource ${e.name}`}**`,t?.description??e.description??``,e.identifier?`Identifier type: ${l(e.identifier)}`:`No identifier type declared.`,t?t.streamIdParts.length>0?`Stream id parts: ${t.streamIdParts.map(e=>`${e.name} ${l(e.type)}`).join(`, `)}`:t.streamId?`Stream id type: ${l(t.streamId)}`:`Unkeyed stream.`:e.streams.map(e=>`${e.name}${e.streamIdParts.length>0?` — ${e.streamIdParts.map(e=>`${e.name} ${l(e.type)}`).join(`, `)}`:e.streamId?` — ${l(e.streamId)}`:` — unkeyed`}`).join(`
|
|
3
|
+
`),t?.id??(t?null:e.id)?`Stored-name pin (rename-only metadata; not a semantic ID).`:``,u].filter(Boolean).join(`
|
|
4
4
|
|
|
5
|
-
`)}function eventSourceReferenceAt(e,t,n,
|
|
6
|
-
`));if(
|
|
7
|
-
`))??[],
|
|
8
|
-
`))??[],v.authoringPlacement,v.authoringPath,v.authoringPlacementResolved),literal=e=>{let t
|
|
9
|
-
`)}`,documentation:b.event?d:u}]:[]}}if(b?.event&&x>
|
|
10
|
-
`))??[],v.authoringPlacement,v.authoringPath,v.authoringPlacementResolved).operations.concepts.find(
|
|
11
|
-
`))??[],v.authoringPlacement,v.authoringPath),
|
|
12
|
-
`))??[],v.authoringPlacement,v.authoringPath),
|
|
5
|
+
`)}function eventSourceReferenceAt(e,t,n,i,a){let o=analyzeEventSources(e,a),at=a=>{let o=a.referenceLocation,s=`${a.eventSource}.${a.stream}`;return o?.line===t+1&&n>=o.column&&i<=o.column+s.length&&r(e[t]??``).slice(o.column-1,o.column-1+s.length)===s},s=o.ambiguousCandidates.find(at);if(s)return{route:s,resolution:{state:`ambiguous`,source:void 0,stream:void 0},target:void 0};let c=o.routes.find(at);if(!c)return null;let l=o.resolve(c.eventSource,c.stream),u=i<=c.referenceLocation.column+c.eventSource.length;return{route:c,resolution:l,target:l.state===`unique`?u?l.source:l.stream:void 0}}function eventSourceIdentifier(e,t,n){let i=r(n.split(/\r?\n/)[e.line-1]??``),a=i.slice(e.column-1).match(/^(?:eventsource|stream)\s+/)?.[0];return a&&i.slice(e.column-1+a.length,e.column-1+a.length+t.length)===t?{...e,column:e.column+a.length}:void 0}function eventSourceHover(e,t,i,a,o){o=s(e,o);let f=analyzeEventSources(e,o),p=f.contexts.get(t)?.observer?.from;if(p?.location.line===t+1&&/^\s*from\s+/.test(r(e[t]??``))){let e=f.resolve(p.eventSource,p.stream??void 0);return e.source?`${eventSourceDetails(e.source,e.stream)}\n\nObserves routed facts only. Stream ids are not filtered. Admitted by ESM v10.`:`Unresolved observer filter (PLAY0665).`}let m=eventSourceReferenceAt(e,t,i,a,o);if(m)return m.resolution.source&&m.resolution.stream?eventSourceDetails(m.resolution.source,m.resolution.stream)+(f.contexts.get(t)?.event?`\n\n${d}`:``):`Physical stream owner: ${m.resolution.state}; no route selected. ${`reasons`in m.resolution?m.resolution.reasons.join(` `):``} ${u}`;let h=f.contexts.get(t);if(h?.event?.noStream?.location.line===t+1&&i>=h.event.noStream.location.column&&a<=h.event.noStream.location.column+9)return`Assert an unrouted event; omitting a route on then leaves it unasserted. ${d}`;if(h?.event&&h.route?.streamId?.location.line===t+1&&i===h.route.streamId.location.column&&a===i+8)return`Concrete literal stream id, not a command property mapping. ${d}`;let g=h?.route?.directiveLocations?.streamId??h?.stream?.directiveLocations?.streamId;if(g?.line===t+1&&i===g.column&&a===i+8)return`Composite stream id: named parts, not a pre-joined value. ${h?.event?d:u}`;for(let e of h?.route?.streamIdParts??[])if(e.location.line===t+1&&i===e.location.column&&a===i+e.property.length)return`Authored stream id part **${e.property}**. ${h?.event?`Concrete literal. ${d}`:u}`;let _=h?.stream??h?.source;if(_){let n=eventSourceIdentifier(_.location,_.name,e.join(`
|
|
6
|
+
`));if(n?.line===t+1&&i===n.column&&a===i+_.name.length&&h?.source){let e=f.resolve(h.source.name,h.stream?.name);return eventSourceDetails(h.source,h.stream)+(e.state===`unique`?``:`\n\nPhysical ownership: ${e.state}. ${e.reasons.join(` `)}`)}}let v=h?.route?[h.route.streamId,...h.route.streamIdParts].find(e=>e?.location.line===t+1):void 0;if(v&&h?.command){if(v.location.line===t+1&&i===v.location.column&&a===i+8)return`Authored stream id mapping. ${u}`;let n=v.source;if(n.kind===`PathExpressionSyntax`&&n.path&&n.location?.line===t+1&&i>=n.location.column&&a<=n.location.column+n.path.length){let t=c(e,o?.authoringDocuments??o?.authoringSources?.filter(t=>t!==e.join(`
|
|
7
|
+
`))??[],o?.authoringPlacement,o?.authoringPath,o?.authoringPlacementResolved),r=n.path.slice(0,a-n.location.column).split(`.`),i=h.command.properties,s=!1,d=!1;for(let[e,n]of r.entries()){let a=i.filter(e=>e.name===n);if(a.length!==1)break;let o=a[0];if(s||=o.type.isOptional,d||=o.type.isCollection,e===r.length-1)return`**${n}** — ${l({...o.type,isOptional:s,isCollection:d})}. Command source for authored stream id. ${u}`;let c=t.operations.types.filter(e=>e.name===o.type.name);if(c.length!==1||d)break;i=c[0].properties.map(e=>({...e,isIdentifier:!1}))}}}if(h?.source&&/^\s*id\s+"/.test(r(e[t]??``))&&i===n(e[t])+1&&a===i+2)return`Stored-name pin: rename-only metadata, not a semantic identity or an automatic refactor. ${u}`;let y=h?.stream?.streamIdParts.find(e=>e.type.location?.line===t+1)?.type??h?.stream?.streamId??h?.source?.identifier;return y&&y.location?.line===t+1&&i>=y.location.column&&a<=y.location.column+y.name.length?`${l(y)} — authored ${h?.stream?`stream id`:`identifier`} type. ${u}`:null}function streamIdHeader(e,t,i){let a=n(e[t]??``);for(let o=t-1;o>i;o--){let t=r(e[o]);if(!(!t.trim()||n(t)>=a))return t.trim()===`streamId`?o:null}return null}function eventSourceCompletions(s,g,_,v){if(t(s)[g]||r(_).length<_.length||/[\uD800-\uDFFF]/.test(_))return null;let y=analyzeEventSources(s,v),b=y.contexts.get(g),x=_.trim()?n(s[g]):_.length,S=e(s,t(s),g,x);if(b?.observer&&[`reaction`,`reducer`].includes(S[0])&&/^\s*from\s+[\w.]*$/.test(_)&&(!b.observer.from||b.observer.from.location.line===g+1)){let e=_.trim().split(/\s+/)[1]??``;return y.declarations.filter(e=>y.resolve(e.name).state===`unique`).flatMap(e=>[{name:e.name,source:e,stream:void 0},...e.streams.filter(t=>y.resolve(e.name,t.name).state===`unique`).map(t=>({name:`${e.name}.${t.name}`,source:e,stream:t}))]).filter(t=>t.name.startsWith(e)).map(t=>({label:t.name,insertText:e.includes(`.`)?t.stream?.name??t.name:t.name,documentation:`Observes routed facts from this source or stream. Stream ids are not filtered. ESM v10.`}))}if(b?.route&&x>n(s[b.route.location.line-1])){let e=y.resolve(b.route.eventSource,b.route.stream).stream;if(e?.streamIdParts.length){let t=c(s,v.authoringDocuments??v.authoringSources?.filter(e=>e!==s.join(`
|
|
8
|
+
`))??[],v.authoringPlacement,v.authoringPath,v.authoringPlacementResolved),literal=e=>{let n=t.operations.concepts.find(t=>t.name===e)?.type??e;return n===`Int`?`0`:n===`Uuid`?`"00000000-0000-0000-0000-000000000000"`:'"${1:value}"'};if(streamIdHeader(s,g,b.route.location.line-1)!==null){let n=o(`^\\s*([A-Za-z_]\\w*)\\s*=(?!=|>)\\s*([\\w.]*)$`).exec(_);if(n){let r=e.streamIdParts.find(e=>e.name===n[1]);if(!r)return[];if(b.event)return[{label:r.name,insertText:literal(r.type.name),documentation:d}];if(!b.command)return[];let a=t.operations.concepts.filter(e=>e.name===r.type.name);if(r.type.isOptional||r.type.isCollection||!([`String`,`Uuid`].includes(r.type.name)||a.length===1&&[`String`,`Uuid`,`Int`].includes(a[0].type)&&a[0].values.length===0))return[];let o=n[2].split(`.`),s=b.command.properties;for(let e of o.slice(0,-1)){let n=s.filter(t=>t.name===e&&!t.type.isOptional&&!t.type.isCollection);if(n.length!==1)return[];let r=t.operations.types.filter(e=>e.name===n[0].type.name);if(r.length!==1)return[];s=r[0].properties.map(e=>({...e,isIdentifier:!1}))}return s.filter(e=>i(e.name)&&e.type.name===r.type.name&&!e.type.isOptional&&!e.type.isCollection).map(e=>({label:e.name,insertText:e.name,documentation:`${l(e.type)} — command source for authored stream id. ${u}`}))}let r=new Set(b.route.streamIdParts.filter(e=>e.location.line!==g+1).map(e=>e.property));return e.streamIdParts.filter(e=>!r.has(e.name)&&e.name.startsWith(_.trim())).map(e=>({label:e.name,insertText:`${e.name} = ${b.event?literal(e.type.name):``}`,documentation:b.event?d:u}))}return/^\s*(?:streamId)?$/.test(_)?[{label:`streamId parts`,insertText:`streamId\n${e.streamIdParts.map((e,t)=>` ${e.name} = ${b.event?literal(e.type.name):`\${${t+1}:source}`}`).join(`
|
|
9
|
+
`)}`,documentation:b.event?d:u}]:[]}}if(b?.event&&x>n(s[b.event.location.line-1])){if(b.route&&x>n(s[b.route.location.line-1])){let e=y.resolve(b.route.eventSource,b.route.stream).stream?.streamId;if(!e||b.route.streamId&&b.route.streamId.location.line!==g+1)return[];let t=c(s,v.authoringDocuments??v.authoringSources?.filter(e=>e!==s.join(`
|
|
10
|
+
`))??[],v.authoringPlacement,v.authoringPath,v.authoringPlacementResolved).operations.concepts.find(t=>t.name===e.name)?.type??e.name,n=t===`Int`?`0`:t===`Uuid`?`"00000000-0000-0000-0000-000000000000"`:'"${1:value}"';return/^\s*(?:streamId\s*=\s*)?$/.test(_)||`streamId`.startsWith(_.trim())?[{label:`streamId`,insertText:_.includes(`=`)?n:`streamId = ${n}`,documentation:`Concrete ${l(e)} literal. ${d}`}]:[]}if(f.test(_)&&(!b.event.stream||b.event.stream.location.line===g+1)&&!b.event.noStream){let e=_.trim().split(/\s+/)[1]??``;return y.declarations.flatMap(e=>e.streams.filter(t=>y.resolve(e.name,t.name).state===`unique`).map(t=>({name:`${e.name}.${t.name}`,source:e,stream:t}))).filter(t=>i(t.source.name)&&i(t.stream.name)&&(!e.includes(`.`)||t.name.startsWith(e.slice(0,e.lastIndexOf(`.`)+1)))).map(t=>({label:t.name,insertText:e.includes(`.`)?t.stream.name:t.name,documentation:`${eventSourceDetails(t.source,t.stream)}\n\n${d}`}))}if(b.event.stream||b.event.noStream)return!_.trim()||`stream`.startsWith(_.trim())||`no stream`.startsWith(_.trim())?[]:null;let e=[{label:`stream`,insertText:"stream ${1:Source.Stream}",documentation:d},...b.expectation?[{label:`no stream`,insertText:/^\s*no\s+/.test(_)?`stream`:`no stream`,documentation:`Assert an unrouted fact. ${d}`}]:[]].filter(e=>e.label.startsWith(_.trim()));return e.length>0?e:null}if(b?.command&&x>n(s[b.command.location.line-1])&&(!b.route||x<=n(s[b.route.location.line-1]))&&f.test(_)){let e=c(s,v.authoringDocuments??v.authoringSources?.filter(e=>e!==s.join(`
|
|
11
|
+
`))??[],v.authoringPlacement,v.authoringPath),t=new Set([...e.operations.concepts,...e.operations.types].map(e=>e.name)),n=_.trim().split(/\s+/)[1]??``;return y.targets.filter(e=>i(e.source.name)&&i(e.stream.name)&&(b.production||!t.has(e.name))&&(!n.includes(`.`)||e.name.startsWith(n.slice(0,n.lastIndexOf(`.`)+1)))).map(e=>({label:e.name,insertText:n.includes(`.`)?e.stream.name:e.name,documentation:eventSourceDetails(e.source,e.stream)}))}if(b?.route&&b.command&&x>n(s[b.route.location.line-1])&&p.test(_)){let e=y.resolve(b.route.eventSource,b.route.stream).stream?.streamId;if(!e)return[];let t=c(s,v.authoringDocuments??v.authoringSources?.filter(e=>e!==s.join(`
|
|
12
|
+
`))??[],v.authoringPlacement,v.authoringPath),n=t.operations.concepts.filter(t=>t.name===e.name);if(!([`String`,`Uuid`].includes(e.name)||n.length===1&&[`String`,`Uuid`,`Int`].includes(n[0].type)&&n[0].values.length===0)||e.isOptional||e.isCollection)return[];let r=p.exec(_)[1].split(`.`),a=b.command.properties;for(let e of r.slice(0,-1)){let n=a.filter(t=>t.name===e);if(n.length!==1||n[0].type.isOptional||n[0].type.isCollection)return[];let r=t.operations.types.filter(e=>e.name===n[0].type.name);if(r.length!==1)return[];a=r[0].properties.map(e=>({...e,isIdentifier:!1}))}return a.filter(t=>i(t.name)&&t.type.name===e.name&&!t.type.isOptional&&!t.type.isCollection).map(e=>({label:e.name,insertText:e.name,documentation:`${l(e.type)} — command source for authored stream id. ${u}`}))}if(b?.source&&x>n(s[b.source.location.line-1])){let e=b.stream&&x>n(s[b.stream.location.line-1]),t=e&&streamIdHeader(s,g,b.stream.location.line-1)!==null&&o(`^\\s*[A-Za-z_]\\w*\\s+[\\w.]*$`).test(_);if(t||(e?h:m).test(_)){let e=c(s,v.authoringDocuments??[],v.authoringPlacement,v.authoringPath),n=t||/^\s*streamId\b/.test(_);return[...n?[`String`,`Uuid`]:[`String`,`Uuid`,`Int`,`Decimal`,`Bool`,`Date`,`DateTime`],...e.operations.concepts.filter(e=>!n||[`String`,`Uuid`,`Int`].includes(e.type)&&e.values.length===0).map(e=>e.name)].filter(a).map(e=>({label:e,insertText:e,documentation:u}))}if(/^\s*$/.test(_))return e?[{label:`streamId`,insertText:"streamId ${1:Type}",documentation:u},{label:`streamId parts`,insertText:"streamId\n ${1:first} ${2:Type}\n ${3:second} ${4:Type}",documentation:u},{label:`description`,insertText:'description "${1:Description}"',documentation:`Authored description.`}]:[{label:`identifier`,insertText:"identifier ${1:Type}",documentation:u},{label:`stream`,insertText:"stream ${1:Name}",documentation:u},{label:`description`,insertText:'description "${1:Description}"',documentation:`Authored description.`}]}return null}export{analyzeEventSources,u as eventSourceAvailability,eventSourceCompletions,eventSourceDetails,eventSourceHover,eventSourceIdentifier,eventSourceReferenceAt,d as specificationRouteAvailability};
|
|
13
13
|
//# sourceMappingURL=event-source-authoring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-source-authoring.js","names":["eventSourceAvailability","specificationRouteAvailability","routePrefix","sourceStreamPattern","keyPrefix","identifierTypePrefix","streamTypePrefix","symbolsForBuffer","lines","symbols","responseAnalysis","source","stream","typeReferenceText","part","analysis","location","route","name","line","start","end","withoutComment","candidate","resolution","sourcePart","prefix","filter","resolved","reference","context","blockLocation","declaration","confidence","mapping","expression","typed","parts","properties","optional","collection","index","matches","property","types","type","indentOf","indent","owner","text","fenceMap","before","chain","enclosingChain","target","primitive","concept","concepts","path","segment","fields","isSourceStreamName","mapped","literal","qualified","matching","entry","names","ownsStream","partType","streamId","isSourceStreamTypeName"],"sources":["../../event-source-authoring.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 { CompletionEntry } from './completion-items';\nimport { enclosingChain, fenceMap, indentOf, withoutComment } from './document-context';\nimport { AuthoredEventSource } from './AuthoredEventSource';\nimport { AuthoredStream } from './AuthoredStream';\nimport { isSourceStreamName, isSourceStreamTypeName, sourceStreamPattern } from '@cratis/screenplay-compiler';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { responseAnalysis } from './response-analysis';\nimport { typeReferenceText } from './TypeReferenceSymbol';\n\nexport const eventSourceAvailability = 'Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings remain unadmitted (PLAY0268); command handlers require a constrained implementation attachment (PLAY0800).';\n\nexport const specificationRouteAvailability = 'Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery is executable from ESM v17, independently of its locator route.';\n\nconst routePrefix = sourceStreamPattern('^\\\\s*stream\\\\s+(?:[A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)?\\\\.?)?$');\nconst keyPrefix = sourceStreamPattern('^\\\\s*streamId\\\\s*=\\\\s*([\\\\w.]*)$');\nconst identifierTypePrefix = sourceStreamPattern('^\\\\s*identifier\\\\s+[\\\\w.]*$');\nconst streamTypePrefix = sourceStreamPattern('^\\\\s*streamId\\\\s+[\\\\w.]*$');\n\nexport function analyzeEventSources(lines: string[], symbols?: DocumentSymbols) {\n symbols = symbolsForBuffer(lines, symbols);\n return responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved).eventSources;\n}\n\nexport function eventSourceDetails(source: AuthoredEventSource, stream?: AuthoredStream): string {\n return [`**${stream ? `stream ${source.name}.${stream.name}` : `eventsource ${source.name}`}**`,\n stream?.description ?? source.description ?? '',\n source.identifier ? `Identifier type: ${typeReferenceText(source.identifier)}` : 'No identifier type declared.',\n stream ? stream.streamIdParts.length > 0 ? `Stream id parts: ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? `Stream id type: ${typeReferenceText(stream.streamId)}` : 'Unkeyed stream.' : source.streams.map(stream => `${stream.name}${stream.streamIdParts.length > 0 ? ` — ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? ` — ${typeReferenceText(stream.streamId)}` : ' — unkeyed'}`).join('\\n'),\n (stream?.id ?? (!stream ? source.id : null)) ? 'Stored-name pin (rename-only metadata; not a semantic ID).' : '', eventSourceAvailability].filter(Boolean).join('\\n\\n');\n}\n\nexport function eventSourceReferenceAt(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols) {\n const analysis = analyzeEventSources(lines, symbols);\n const at = (route: typeof analysis.routes[number]) => {\n const location = route.referenceLocation;\n const name = `${route.eventSource}.${route.stream}`;\n return location?.line === line + 1 && start >= location.column && end <= location.column + name.length &&\n withoutComment(lines[line] ?? '').slice(location.column - 1, location.column - 1 + name.length) === name;\n };\n const candidate = analysis.ambiguousCandidates.find(at);\n if (candidate) return { route: candidate, resolution: { state: 'ambiguous', source: undefined, stream: undefined }, target: undefined };\n const route = analysis.routes.find(at);\n if (!route) return null;\n const resolution = analysis.resolve(route.eventSource, route.stream);\n const sourcePart = end <= route.referenceLocation!.column + route.eventSource.length;\n return { route, resolution, target: resolution.state === 'unique' ? sourcePart ? resolution.source : resolution.stream : undefined };\n}\n\n// The location is a typed header start. Match its exact prefix, never search comments or another\n// occurrence of the same name. Both hosts use this to navigate to the authored identifier.\nexport function eventSourceIdentifier(location: { line: number; column: number; path?: string }, name: string, source: string) {\n const line = withoutComment(source.split(/\\r?\\n/)[location.line - 1] ?? '');\n const prefix = line.slice(location.column - 1).match(/^(?:eventsource|stream)\\s+/)?.[0];\n return prefix && line.slice(location.column - 1 + prefix.length, location.column - 1 + prefix.length + name.length) === name\n ? { ...location, column: location.column + prefix.length } : undefined;\n}\n\nexport function eventSourceHover(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols): string | null {\n symbols = symbolsForBuffer(lines, symbols);\n const analysis = analyzeEventSources(lines, symbols);\n const filter = analysis.contexts.get(line)?.observer?.from;\n if (filter?.location.line === line + 1 && /^\\s*from\\s+/.test(withoutComment(lines[line] ?? ''))) {\n const resolved = analysis.resolve(filter.eventSource, filter.stream ?? undefined);\n return resolved.source ? `${eventSourceDetails(resolved.source, resolved.stream)}\\n\\nObserves routed facts only. Stream ids are not filtered. Admitted by ESM v10.` : 'Unresolved observer filter (PLAY0665).';\n }\n const reference = eventSourceReferenceAt(lines, line, start, end, symbols);\n if (reference) return reference.resolution.source && reference.resolution.stream ? eventSourceDetails(reference.resolution.source, reference.resolution.stream) + (analysis.contexts.get(line)?.event ? `\\n\\n${specificationRouteAvailability}` : '')\n : `Physical stream owner: ${reference.resolution.state}; no route selected. ${'reasons' in reference.resolution ? reference.resolution.reasons.join(' ') : ''} ${eventSourceAvailability}`;\n const context = analysis.contexts.get(line);\n if (context?.event?.noStream?.location.line === line + 1 && start >= context.event.noStream.location.column && end <= context.event.noStream.location.column + 9)\n return `Assert an unrouted event; omitting a route on then leaves it unasserted. ${specificationRouteAvailability}`;\n if (context?.event && context.route?.streamId?.location.line === line + 1 && start === context.route.streamId.location.column && end === start + 8)\n return `Concrete literal stream id, not a command property mapping. ${specificationRouteAvailability}`;\n const blockLocation = context?.route?.directiveLocations?.streamId ?? context?.stream?.directiveLocations?.streamId;\n if (blockLocation?.line === line + 1 && start === blockLocation.column && end === start + 8)\n return `Composite stream id: named parts, not a pre-joined value. ${context?.event ? specificationRouteAvailability : eventSourceAvailability}`;\n for (const part of context?.route?.streamIdParts ?? []) {\n if (part.location.line === line + 1 && start === part.location.column && end === start + part.property.length)\n return `Authored stream id part **${part.property}**. ${context?.event ? `Concrete literal. ${specificationRouteAvailability}` : eventSourceAvailability}`;\n }\n const declaration = context?.stream ?? context?.source;\n if (declaration) {\n const name = eventSourceIdentifier(declaration.location, declaration.name, lines.join('\\n'));\n if (name?.line === line + 1 && start === name.column && end === start + declaration.name.length && context?.source) {\n const confidence = analysis.resolve(context.source.name, context.stream?.name);\n return eventSourceDetails(context.source, context.stream) + (confidence.state === 'unique' ? '' : `\\n\\nPhysical ownership: ${confidence.state}. ${confidence.reasons.join(' ')}`);\n }\n }\n const mapping = context?.route ? [context.route.streamId, ...context.route.streamIdParts].find(mapping => mapping?.location.line === line + 1) : undefined;\n if (mapping && context?.command) {\n if (mapping.location.line === line + 1 && start === mapping.location.column && end === start + 8)\n return `Authored stream id mapping. ${eventSourceAvailability}`;\n const expression = mapping.source as { kind?: string; path?: string; location?: { line: number; column: number } };\n if (expression.kind === 'PathExpressionSyntax' && expression.path && expression.location?.line === line + 1 &&\n start >= expression.location.column && end <= expression.location.column + expression.path.length) {\n const typed = responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved);\n const prefix = expression.path.slice(0, end - expression.location.column);\n const parts = prefix.split('.');\n let properties = context.command.properties;\n let optional = false;\n let collection = false;\n for (const [index, part] of parts.entries()) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1) break;\n const property = matches[0];\n optional ||= property.type.isOptional;\n collection ||= property.type.isCollection;\n if (index === parts.length - 1)\n return `**${part}** — ${typeReferenceText({ ...property.type, isOptional: optional, isCollection: collection })}. Command source for authored stream id. ${eventSourceAvailability}`;\n const types = typed.operations.types.filter(type => type.name === property.type.name);\n if (types.length !== 1 || collection) break;\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n }\n }\n if (context?.source && /^\\s*id\\s+\"/.test(withoutComment(lines[line] ?? '')) && start === indentOf(lines[line]) + 1 && end === start + 2)\n return `Stored-name pin: rename-only metadata, not a semantic identity or an automatic refactor. ${eventSourceAvailability}`;\n const type = context?.stream?.streamIdParts.find(part => part.type.location?.line === line + 1)?.type ?? context?.stream?.streamId ?? context?.source?.identifier;\n if (type && type.location?.line === line + 1 && start >= type.location.column && end <= type.location.column + type.name.length)\n return `${typeReferenceText(type)} — authored ${context?.stream ? 'stream id' : 'identifier'} type. ${eventSourceAvailability}`;\n return null;\n}\n\nfunction streamIdHeader(lines: string[], line: number, owner: number): number | null {\n const indent = indentOf(lines[line] ?? '');\n for (let index = line - 1; index > owner; index--) {\n const text = withoutComment(lines[index]);\n if (!text.trim() || indentOf(text) >= indent) continue;\n return text.trim() === 'streamId' ? index : null;\n }\n return null;\n}\n\nexport function eventSourceCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n // .NET word characters are UTF-16 code units; supplementary letters are not identifiers.\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length || /[\\uD800-\\uDFFF]/.test(before)) return null;\n const analysis = analyzeEventSources(lines, symbols);\n const context = analysis.contexts.get(line);\n const indent = before.trim() ? indentOf(lines[line]) : before.length;\n const chain = enclosingChain(lines, fenceMap(lines), line, indent);\n if (context?.observer && ['reaction', 'reducer'].includes(chain[0])) {\n if (/^\\s*from\\s+[\\w.]*$/.test(before) && (!context.observer.from || context.observer.from.location.line === line + 1)) {\n const prefix = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.declarations.filter(source => analysis.resolve(source.name).state === 'unique').flatMap(source => [\n { name: source.name, source, stream: undefined },\n ...source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique').map(stream => ({ name: `${source.name}.${stream.name}`, source, stream }))\n ]).filter(target => target.name.startsWith(prefix)).map(target => ({ label: target.name, insertText: prefix.includes('.') ? target.stream?.name ?? target.name : target.name, documentation: 'Observes routed facts from this source or stream. Stream ids are not filtered. ESM v10.' }));\n }\n }\n if (context?.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const stream = analysis.resolve(context.route.eventSource, context.route.stream).stream;\n if (stream?.streamIdParts.length) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const literal = (name: string) => {\n const primitive = typed.operations.concepts.find(concept => concept.name === name)?.type ?? name;\n return primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n };\n if (streamIdHeader(lines, line, context.route.location.line - 1) !== null) {\n const mapping = sourceStreamPattern('^\\\\s*([A-Za-z_]\\\\w*)\\\\s*=(?!=|>)\\\\s*([\\\\w.]*)$').exec(before);\n if (mapping) {\n const part = stream.streamIdParts.find(part => part.name === mapping[1]);\n if (!part) return [];\n if (context.event) return [{ label: part.name, insertText: literal(part.type.name), documentation: specificationRouteAvailability }];\n if (!context.command) return [];\n const concepts = typed.operations.concepts.filter(concept => concept.name === part.type.name);\n if (part.type.isOptional || part.type.isCollection || !(['String', 'Uuid'].includes(part.type.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0)) return [];\n const path = mapping[2].split('.');\n let properties = context.command.properties;\n for (const segment of path.slice(0, -1)) {\n const fields = properties.filter(property => property.name === segment && !property.type.isOptional && !property.type.isCollection);\n if (fields.length !== 1) return [];\n const types = typed.operations.types.filter(type => type.name === fields[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === part.type.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n const mapped = new Set(context.route.streamIdParts.filter(part => part.location.line !== line + 1).map(part => part.property));\n return stream.streamIdParts.filter(part => !mapped.has(part.name) && part.name.startsWith(before.trim()))\n .map(part => ({ label: part.name, insertText: `${part.name} = ${context.event ? literal(part.type.name) : ''}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }));\n }\n if (/^\\s*(?:streamId)?$/.test(before)) return [{ label: 'streamId parts', insertText: `streamId\\n${stream.streamIdParts.map((part, index) => ` ${part.name} = ${context.event ? literal(part.type.name) : `\\${${index + 1}:source}`}`).join('\\n')}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }];\n return [];\n }\n }\n if (context?.event && indent > indentOf(lines[context.event.location.line - 1])) {\n if (context.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target || context.route.streamId && context.route.streamId.location.line !== line + 1) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const primitive = typed.operations.concepts.find(concept => concept.name === target.name)?.type ?? target.name;\n const literal = primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n if (/^\\s*(?:streamId\\s*=\\s*)?$/.test(before) || 'streamId'.startsWith(before.trim()))\n return [{ label: 'streamId', insertText: before.includes('=') ? literal : `streamId = ${literal}`, documentation: `Concrete ${typeReferenceText(target)} literal. ${specificationRouteAvailability}` }];\n return [];\n }\n if (routePrefix.test(before) && (!context.event.stream || context.event.stream.location.line === line + 1) && !context.event.noStream) {\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n // Specification payload lines require '=', so imported value types cannot compete\n // with a route here as they do under a command. Physical ownership still must be unique.\n const targets = analysis.declarations.flatMap(source => source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique')\n .map(stream => ({ name: `${source.name}.${stream.name}`, source, stream })));\n return targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: `${eventSourceDetails(target.source, target.stream)}\\n\\n${specificationRouteAvailability}` }));\n }\n if (context.event.stream || context.event.noStream)\n return !before.trim() || 'stream'.startsWith(before.trim()) || 'no stream'.startsWith(before.trim()) ? [] : null;\n const entries = [{ label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: specificationRouteAvailability },\n ...(context.expectation ? [{ label: 'no stream', insertText: /^\\s*no\\s+/.test(before) ? 'stream' : 'no stream', documentation: `Assert an unrouted fact. ${specificationRouteAvailability}` }] : [])];\n const matching = entries.filter(entry => entry.label.startsWith(before.trim()));\n return matching.length > 0 ? matching : null;\n }\n if (context?.command && indent > indentOf(lines[context.command.location.line - 1]) &&\n (!context.route || indent <= indentOf(lines[context.route.location.line - 1])) && routePrefix.test(before)) {\n // A property named stream remains legal. Only offer routes whose complete-input\n // candidates have no known value-type competitor; never silently rewrite ambiguity.\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const names = new Set([...typed.operations.concepts, ...typed.operations.types].map(type => type.name));\n // targets already exclude competing imports from the authoritative parsed documents.\n // Scanned symbols can retain an import removed from the current unsaved buffer.\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (context.production || !names.has(target.name)) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: eventSourceDetails(target.source, target.stream) }));\n }\n if (context?.route && context.command && indent > indentOf(lines[context.route.location.line - 1]) && keyPrefix.test(before)) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const concepts = typed.operations.concepts.filter(concept => concept.name === target.name);\n const supported = ['String', 'Uuid'].includes(target.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0;\n if (!supported || target.isOptional || target.isCollection) return [];\n const parts = keyPrefix.exec(before)![1].split('.');\n let properties = context.command.properties;\n for (const part of parts.slice(0, -1)) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1 || matches[0].type.isOptional || matches[0].type.isCollection) return [];\n const types = typed.operations.types.filter(type => type.name === matches[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === target.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n if (context?.source && indent > indentOf(lines[context.source.location.line - 1])) {\n const ownsStream = context.stream && indent > indentOf(lines[context.stream.location.line - 1]);\n const partType = ownsStream && streamIdHeader(lines, line, context.stream!.location.line - 1) !== null && sourceStreamPattern('^\\\\s*[A-Za-z_]\\\\w*\\\\s+[\\\\w.]*$').test(before);\n if (partType || (ownsStream ? streamTypePrefix : identifierTypePrefix).test(before)) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const streamId = partType || /^\\s*streamId\\b/.test(before);\n return [...(streamId ? ['String', 'Uuid'] : ['String', 'Uuid', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime']), ...typed.operations.concepts.filter(concept => !streamId || ['String', 'Uuid', 'Int'].includes(concept.type) && concept.values.length === 0).map(concept => concept.name)]\n .filter(isSourceStreamTypeName).map(name => ({ label: name, insertText: name, documentation: eventSourceAvailability }));\n }\n if (/^\\s*$/.test(before)) return ownsStream ? [\n { label: 'streamId', insertText: 'streamId ${1:Type}', documentation: eventSourceAvailability },\n { label: 'streamId parts', insertText: 'streamId\\n ${1:first} ${2:Type}\\n ${3:second} ${4:Type}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ] : [\n { label: 'identifier', insertText: 'identifier ${1:Type}', documentation: eventSourceAvailability },\n { label: 'stream', insertText: 'stream ${1:Name}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ];\n }\n return null;\n}\n"],"mappings":"0dAYA,MAAaA,EAA0B,qTAE1BC,EAAiC,uLAExCC,EAAcC,EAAoB,6DAA6D,EAC/FC,EAAYD,EAAoB,kCAAkC,EAClEE,EAAuBF,EAAoB,6BAA6B,EACxEG,EAAmBH,EAAoB,2BAA2B,EAExE,SAAgB,oBAAoB,EAAiB,EAA2B,CAE5E,MADA,GAAUI,EAAiBC,EAAOC,CAAO,EAClCC,EAAiBF,EAAOC,GAAS,oBAAsBA,GAAS,kBAAkB,OAAO,GAAUE,IAAWH,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAAGC,GAAS,mBAAoBA,GAAS,cAAeA,GAAS,0BAA0B,CAAC,CAAC,YAC5O,CAEA,SAA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,MAAO,CAAC,GAAImB,EAAW,CAAC,SAAU,MAAM,EAAI,CAAC,SAAU,OAAQ,MAAO,UAAW,OAAQ,OAAQ,UAAU,EAAI,GAAGlC,EAAM,WAAW,SAAS,OAAO,GAAW,CAACkC,GAAY,CAAC,SAAU,OAAQ,KAAK,CAAC,CAAC,SAASd,EAAQ,IAAI,GAAKA,EAAQ,OAAO,SAAW,CAAC,CAAC,CAAC,IAAI,GAAWA,EAAQ,IAAI,CAAC,CAAC,CACpR,OAAOe,CAAsB,CAAC,CAAC,IAAI,IAAS,CAAE,MAAOrD,EAAM,WAAYA,EAAM,cAAelB,CAAwB,EAAE,CAC/H,CACA,GAAI,QAAQ,KAAKmD,CAAM,EAAG,OAAOiB,EAAa,CAC1C,CAAE,MAAO,WAAY,WAAY,qBAAsB,cAAepE,CAAwB,EAC9F,CAAE,MAAO,iBAAkB,WAAY,4DAA6D,cAAeA,CAAwB,EAC3I,CAAE,MAAO,cAAe,WAAY,iCAAkC,cAAe,uBAAwB,CACjH,EAAI,CACA,CAAE,MAAO,aAAc,WAAY,uBAAwB,cAAeA,CAAwB,EAClG,CAAE,MAAO,SAAU,WAAY,mBAAoB,cAAeA,CAAwB,EAC1F,CAAE,MAAO,cAAe,WAAY,iCAAkC,cAAe,uBAAwB,CACjH,CACJ,CACA,OAAO,IACX"}
|
|
1
|
+
{"version":3,"file":"event-source-authoring.js","names":["eventSourceAvailability","specificationRouteAvailability","routePrefix","sourceStreamPattern","keyPrefix","identifierTypePrefix","streamTypePrefix","symbolsForBuffer","lines","symbols","responseAnalysis","source","stream","typeReferenceText","part","analysis","location","route","name","line","start","end","withoutComment","candidate","resolution","sourcePart","prefix","filter","resolved","reference","context","blockLocation","declaration","confidence","mapping","expression","typed","parts","properties","optional","collection","index","matches","property","types","type","indentOf","indent","owner","text","fenceMap","before","chain","enclosingChain","target","primitive","concept","concepts","path","segment","fields","isSourceStreamName","mapped","literal","qualified","matching","entry","names","ownsStream","partType","streamId","isSourceStreamTypeName"],"sources":["../../event-source-authoring.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 { CompletionEntry } from './completion-items';\nimport { enclosingChain, fenceMap, indentOf, withoutComment } from './document-context';\nimport { AuthoredEventSource } from './AuthoredEventSource';\nimport { AuthoredStream } from './AuthoredStream';\nimport { isSourceStreamName, isSourceStreamTypeName, sourceStreamPattern } from '@cratis/screenplay-compiler';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { responseAnalysis } from './response-analysis';\nimport { typeReferenceText } from './TypeReferenceSymbol';\n\nexport const eventSourceAvailability = 'Event sources, streams and declarative command routes are admitted in executable semantic model (ESM) v8. A route classifies events; it does not supply an identity destination. Property-path mappings remain unadmitted (PLAY0268); command handlers require a constrained implementation attachment (PLAY0800).';\n\nexport const specificationRouteAvailability = 'Specification event routes, including example routes, are admitted in executable semantic model (ESM) v8. Redelivery is executable from ESM v17, independently of its locator route.';\n\nconst routePrefix = sourceStreamPattern('^\\\\s*stream\\\\s+(?:[A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)?\\\\.?)?$');\nconst keyPrefix = sourceStreamPattern('^\\\\s*streamId\\\\s*=\\\\s*([\\\\w.]*)$');\nconst identifierTypePrefix = sourceStreamPattern('^\\\\s*identifier\\\\s+[\\\\w.]*$');\nconst streamTypePrefix = sourceStreamPattern('^\\\\s*streamId\\\\s+[\\\\w.]*$');\n\nexport function analyzeEventSources(lines: string[], symbols?: DocumentSymbols) {\n symbols = symbolsForBuffer(lines, symbols);\n return responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved).eventSources;\n}\n\nexport function eventSourceDetails(source: AuthoredEventSource, stream?: AuthoredStream): string {\n return [`**${stream ? `stream ${source.name}.${stream.name}` : `eventsource ${source.name}`}**`,\n stream?.description ?? source.description ?? '',\n source.identifier ? `Identifier type: ${typeReferenceText(source.identifier)}` : 'No identifier type declared.',\n stream ? stream.streamIdParts.length > 0 ? `Stream id parts: ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? `Stream id type: ${typeReferenceText(stream.streamId)}` : 'Unkeyed stream.' : source.streams.map(stream => `${stream.name}${stream.streamIdParts.length > 0 ? ` — ${stream.streamIdParts.map(part => `${part.name} ${typeReferenceText(part.type)}`).join(', ')}` : stream.streamId ? ` — ${typeReferenceText(stream.streamId)}` : ' — unkeyed'}`).join('\\n'),\n (stream?.id ?? (!stream ? source.id : null)) ? 'Stored-name pin (rename-only metadata; not a semantic ID).' : '', eventSourceAvailability].filter(Boolean).join('\\n\\n');\n}\n\nexport function eventSourceReferenceAt(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols) {\n const analysis = analyzeEventSources(lines, symbols);\n const at = (route: typeof analysis.routes[number]) => {\n const location = route.referenceLocation;\n const name = `${route.eventSource}.${route.stream}`;\n return location?.line === line + 1 && start >= location.column && end <= location.column + name.length &&\n withoutComment(lines[line] ?? '').slice(location.column - 1, location.column - 1 + name.length) === name;\n };\n const candidate = analysis.ambiguousCandidates.find(at);\n if (candidate) return { route: candidate, resolution: { state: 'ambiguous', source: undefined, stream: undefined }, target: undefined };\n const route = analysis.routes.find(at);\n if (!route) return null;\n const resolution = analysis.resolve(route.eventSource, route.stream);\n const sourcePart = end <= route.referenceLocation!.column + route.eventSource.length;\n return { route, resolution, target: resolution.state === 'unique' ? sourcePart ? resolution.source : resolution.stream : undefined };\n}\n\n// The location is a typed header start. Match its exact prefix, never search comments or another\n// occurrence of the same name. Both hosts use this to navigate to the authored identifier.\nexport function eventSourceIdentifier(location: { line: number; column: number; path?: string }, name: string, source: string) {\n const line = withoutComment(source.split(/\\r?\\n/)[location.line - 1] ?? '');\n const prefix = line.slice(location.column - 1).match(/^(?:eventsource|stream)\\s+/)?.[0];\n return prefix && line.slice(location.column - 1 + prefix.length, location.column - 1 + prefix.length + name.length) === name\n ? { ...location, column: location.column + prefix.length } : undefined;\n}\n\nexport function eventSourceHover(lines: string[], line: number, start: number, end: number, symbols?: DocumentSymbols): string | null {\n symbols = symbolsForBuffer(lines, symbols);\n const analysis = analyzeEventSources(lines, symbols);\n const filter = analysis.contexts.get(line)?.observer?.from;\n if (filter?.location.line === line + 1 && /^\\s*from\\s+/.test(withoutComment(lines[line] ?? ''))) {\n const resolved = analysis.resolve(filter.eventSource, filter.stream ?? undefined);\n return resolved.source ? `${eventSourceDetails(resolved.source, resolved.stream)}\\n\\nObserves routed facts only. Stream ids are not filtered. Admitted by ESM v10.` : 'Unresolved observer filter (PLAY0665).';\n }\n const reference = eventSourceReferenceAt(lines, line, start, end, symbols);\n if (reference) return reference.resolution.source && reference.resolution.stream ? eventSourceDetails(reference.resolution.source, reference.resolution.stream) + (analysis.contexts.get(line)?.event ? `\\n\\n${specificationRouteAvailability}` : '')\n : `Physical stream owner: ${reference.resolution.state}; no route selected. ${'reasons' in reference.resolution ? reference.resolution.reasons.join(' ') : ''} ${eventSourceAvailability}`;\n const context = analysis.contexts.get(line);\n if (context?.event?.noStream?.location.line === line + 1 && start >= context.event.noStream.location.column && end <= context.event.noStream.location.column + 9)\n return `Assert an unrouted event; omitting a route on then leaves it unasserted. ${specificationRouteAvailability}`;\n if (context?.event && context.route?.streamId?.location.line === line + 1 && start === context.route.streamId.location.column && end === start + 8)\n return `Concrete literal stream id, not a command property mapping. ${specificationRouteAvailability}`;\n const blockLocation = context?.route?.directiveLocations?.streamId ?? context?.stream?.directiveLocations?.streamId;\n if (blockLocation?.line === line + 1 && start === blockLocation.column && end === start + 8)\n return `Composite stream id: named parts, not a pre-joined value. ${context?.event ? specificationRouteAvailability : eventSourceAvailability}`;\n for (const part of context?.route?.streamIdParts ?? []) {\n if (part.location.line === line + 1 && start === part.location.column && end === start + part.property.length)\n return `Authored stream id part **${part.property}**. ${context?.event ? `Concrete literal. ${specificationRouteAvailability}` : eventSourceAvailability}`;\n }\n const declaration = context?.stream ?? context?.source;\n if (declaration) {\n const name = eventSourceIdentifier(declaration.location, declaration.name, lines.join('\\n'));\n if (name?.line === line + 1 && start === name.column && end === start + declaration.name.length && context?.source) {\n const confidence = analysis.resolve(context.source.name, context.stream?.name);\n return eventSourceDetails(context.source, context.stream) + (confidence.state === 'unique' ? '' : `\\n\\nPhysical ownership: ${confidence.state}. ${confidence.reasons.join(' ')}`);\n }\n }\n const mapping = context?.route ? [context.route.streamId, ...context.route.streamIdParts].find(mapping => mapping?.location.line === line + 1) : undefined;\n if (mapping && context?.command) {\n if (mapping.location.line === line + 1 && start === mapping.location.column && end === start + 8)\n return `Authored stream id mapping. ${eventSourceAvailability}`;\n const expression = mapping.source as { kind?: string; path?: string; location?: { line: number; column: number } };\n if (expression.kind === 'PathExpressionSyntax' && expression.path && expression.location?.line === line + 1 &&\n start >= expression.location.column && end <= expression.location.column + expression.path.length) {\n const typed = responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved);\n const prefix = expression.path.slice(0, end - expression.location.column);\n const parts = prefix.split('.');\n let properties = context.command.properties;\n let optional = false;\n let collection = false;\n for (const [index, part] of parts.entries()) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1) break;\n const property = matches[0];\n optional ||= property.type.isOptional;\n collection ||= property.type.isCollection;\n if (index === parts.length - 1)\n return `**${part}** — ${typeReferenceText({ ...property.type, isOptional: optional, isCollection: collection })}. Command source for authored stream id. ${eventSourceAvailability}`;\n const types = typed.operations.types.filter(type => type.name === property.type.name);\n if (types.length !== 1 || collection) break;\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n }\n }\n if (context?.source && /^\\s*id\\s+\"/.test(withoutComment(lines[line] ?? '')) && start === indentOf(lines[line]) + 1 && end === start + 2)\n return `Stored-name pin: rename-only metadata, not a semantic identity or an automatic refactor. ${eventSourceAvailability}`;\n const type = context?.stream?.streamIdParts.find(part => part.type.location?.line === line + 1)?.type ?? context?.stream?.streamId ?? context?.source?.identifier;\n if (type && type.location?.line === line + 1 && start >= type.location.column && end <= type.location.column + type.name.length)\n return `${typeReferenceText(type)} — authored ${context?.stream ? 'stream id' : 'identifier'} type. ${eventSourceAvailability}`;\n return null;\n}\n\nfunction streamIdHeader(lines: string[], line: number, owner: number): number | null {\n const indent = indentOf(lines[line] ?? '');\n for (let index = line - 1; index > owner; index--) {\n const text = withoutComment(lines[index]);\n if (!text.trim() || indentOf(text) >= indent) continue;\n return text.trim() === 'streamId' ? index : null;\n }\n return null;\n}\n\nexport function eventSourceCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n // .NET word characters are UTF-16 code units; supplementary letters are not identifiers.\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length || /[\\uD800-\\uDFFF]/.test(before)) return null;\n const analysis = analyzeEventSources(lines, symbols);\n const context = analysis.contexts.get(line);\n const indent = before.trim() ? indentOf(lines[line]) : before.length;\n const chain = enclosingChain(lines, fenceMap(lines), line, indent);\n if (context?.observer && ['reaction', 'reducer'].includes(chain[0])) {\n if (/^\\s*from\\s+[\\w.]*$/.test(before) && (!context.observer.from || context.observer.from.location.line === line + 1)) {\n const prefix = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.declarations.filter(source => analysis.resolve(source.name).state === 'unique').flatMap(source => [\n { name: source.name, source, stream: undefined },\n ...source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique').map(stream => ({ name: `${source.name}.${stream.name}`, source, stream }))\n ]).filter(target => target.name.startsWith(prefix)).map(target => ({ label: target.name, insertText: prefix.includes('.') ? target.stream?.name ?? target.name : target.name, documentation: 'Observes routed facts from this source or stream. Stream ids are not filtered. ESM v10.' }));\n }\n }\n if (context?.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const stream = analysis.resolve(context.route.eventSource, context.route.stream).stream;\n if (stream?.streamIdParts.length) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const literal = (name: string) => {\n const primitive = typed.operations.concepts.find(concept => concept.name === name)?.type ?? name;\n return primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n };\n if (streamIdHeader(lines, line, context.route.location.line - 1) !== null) {\n const mapping = sourceStreamPattern('^\\\\s*([A-Za-z_]\\\\w*)\\\\s*=(?!=|>)\\\\s*([\\\\w.]*)$').exec(before);\n if (mapping) {\n const part = stream.streamIdParts.find(part => part.name === mapping[1]);\n if (!part) return [];\n if (context.event) return [{ label: part.name, insertText: literal(part.type.name), documentation: specificationRouteAvailability }];\n if (!context.command) return [];\n const concepts = typed.operations.concepts.filter(concept => concept.name === part.type.name);\n if (part.type.isOptional || part.type.isCollection || !(['String', 'Uuid'].includes(part.type.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0)) return [];\n const path = mapping[2].split('.');\n let properties = context.command.properties;\n for (const segment of path.slice(0, -1)) {\n const fields = properties.filter(property => property.name === segment && !property.type.isOptional && !property.type.isCollection);\n if (fields.length !== 1) return [];\n const types = typed.operations.types.filter(type => type.name === fields[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === part.type.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n const mapped = new Set(context.route.streamIdParts.filter(part => part.location.line !== line + 1).map(part => part.property));\n return stream.streamIdParts.filter(part => !mapped.has(part.name) && part.name.startsWith(before.trim()))\n .map(part => ({ label: part.name, insertText: `${part.name} = ${context.event ? literal(part.type.name) : ''}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }));\n }\n if (/^\\s*(?:streamId)?$/.test(before)) return [{ label: 'streamId parts', insertText: `streamId\\n${stream.streamIdParts.map((part, index) => ` ${part.name} = ${context.event ? literal(part.type.name) : `\\${${index + 1}:source}`}`).join('\\n')}`, documentation: context.event ? specificationRouteAvailability : eventSourceAvailability }];\n return [];\n }\n }\n if (context?.event && indent > indentOf(lines[context.event.location.line - 1])) {\n if (context.route && indent > indentOf(lines[context.route.location.line - 1])) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target || context.route.streamId && context.route.streamId.location.line !== line + 1) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n const primitive = typed.operations.concepts.find(concept => concept.name === target.name)?.type ?? target.name;\n const literal = primitive === 'Int' ? '0' : primitive === 'Uuid' ? '\"00000000-0000-0000-0000-000000000000\"' : '\"${1:value}\"';\n if (/^\\s*(?:streamId\\s*=\\s*)?$/.test(before) || 'streamId'.startsWith(before.trim()))\n return [{ label: 'streamId', insertText: before.includes('=') ? literal : `streamId = ${literal}`, documentation: `Concrete ${typeReferenceText(target)} literal. ${specificationRouteAvailability}` }];\n return [];\n }\n if (routePrefix.test(before) && (!context.event.stream || context.event.stream.location.line === line + 1) && !context.event.noStream) {\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n // Specification payload lines require '=', so imported value types cannot compete\n // with a route here as they do under a command. Physical ownership still must be unique.\n const targets = analysis.declarations.flatMap(source => source.streams.filter(stream => analysis.resolve(source.name, stream.name).state === 'unique')\n .map(stream => ({ name: `${source.name}.${stream.name}`, source, stream })));\n return targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: `${eventSourceDetails(target.source, target.stream)}\\n\\n${specificationRouteAvailability}` }));\n }\n if (context.event.stream || context.event.noStream)\n return !before.trim() || 'stream'.startsWith(before.trim()) || 'no stream'.startsWith(before.trim()) ? [] : null;\n const entries = [{ label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: specificationRouteAvailability },\n ...(context.expectation ? [{ label: 'no stream', insertText: /^\\s*no\\s+/.test(before) ? 'stream' : 'no stream', documentation: `Assert an unrouted fact. ${specificationRouteAvailability}` }] : [])];\n const matching = entries.filter(entry => entry.label.startsWith(before.trim()));\n return matching.length > 0 ? matching : null;\n }\n if (context?.command && indent > indentOf(lines[context.command.location.line - 1]) &&\n (!context.route || indent <= indentOf(lines[context.route.location.line - 1])) && routePrefix.test(before)) {\n // A property named stream remains legal. Only offer routes whose complete-input\n // candidates have no known value-type competitor; never silently rewrite ambiguity.\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const names = new Set([...typed.operations.concepts, ...typed.operations.types].map(type => type.name));\n // targets already exclude competing imports from the authoritative parsed documents.\n // Scanned symbols can retain an import removed from the current unsaved buffer.\n const qualified = before.trim().split(/\\s+/)[1] ?? '';\n return analysis.targets.filter(target => isSourceStreamName(target.source.name) && isSourceStreamName(target.stream.name) && (context.production || !names.has(target.name)) && (!qualified.includes('.') || target.name.startsWith(qualified.slice(0, qualified.lastIndexOf('.') + 1))))\n .map(target => ({ label: target.name, insertText: qualified.includes('.') ? target.stream.name : target.name, documentation: eventSourceDetails(target.source, target.stream) }));\n }\n if (context?.route && context.command && indent > indentOf(lines[context.route.location.line - 1]) && keyPrefix.test(before)) {\n const target = analysis.resolve(context.route.eventSource, context.route.stream).stream?.streamId;\n if (!target) return [];\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const concepts = typed.operations.concepts.filter(concept => concept.name === target.name);\n const supported = ['String', 'Uuid'].includes(target.name) || concepts.length === 1 && ['String', 'Uuid', 'Int'].includes(concepts[0].type) && concepts[0].values.length === 0;\n if (!supported || target.isOptional || target.isCollection) return [];\n const parts = keyPrefix.exec(before)![1].split('.');\n let properties = context.command.properties;\n for (const part of parts.slice(0, -1)) {\n const matches = properties.filter(property => property.name === part);\n if (matches.length !== 1 || matches[0].type.isOptional || matches[0].type.isCollection) return [];\n const types = typed.operations.types.filter(type => type.name === matches[0].type.name);\n if (types.length !== 1) return [];\n properties = types[0].properties.map(property => ({ ...property, isIdentifier: false }));\n }\n return properties.filter(property => isSourceStreamName(property.name) && property.type.name === target.name && !property.type.isOptional && !property.type.isCollection)\n .map(property => ({ label: property.name, insertText: property.name, documentation: `${typeReferenceText(property.type)} — command source for authored stream id. ${eventSourceAvailability}` }));\n }\n if (context?.source && indent > indentOf(lines[context.source.location.line - 1])) {\n const ownsStream = context.stream && indent > indentOf(lines[context.stream.location.line - 1]);\n const partType = ownsStream && streamIdHeader(lines, line, context.stream!.location.line - 1) !== null && sourceStreamPattern('^\\\\s*[A-Za-z_]\\\\w*\\\\s+[\\\\w.]*$').test(before);\n if (partType || (ownsStream ? streamTypePrefix : identifierTypePrefix).test(before)) {\n const typed = responseAnalysis(lines, symbols.authoringDocuments ?? [], symbols.authoringPlacement, symbols.authoringPath);\n const streamId = partType || /^\\s*streamId\\b/.test(before);\n return [...(streamId ? ['String', 'Uuid'] : ['String', 'Uuid', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime']), ...typed.operations.concepts.filter(concept => !streamId || ['String', 'Uuid', 'Int'].includes(concept.type) && concept.values.length === 0).map(concept => concept.name)]\n .filter(isSourceStreamTypeName).map(name => ({ label: name, insertText: name, documentation: eventSourceAvailability }));\n }\n if (/^\\s*$/.test(before)) return ownsStream ? [\n { label: 'streamId', insertText: 'streamId ${1:Type}', documentation: eventSourceAvailability },\n { label: 'streamId parts', insertText: 'streamId\\n ${1:first} ${2:Type}\\n ${3:second} ${4:Type}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ] : [\n { label: 'identifier', insertText: 'identifier ${1:Type}', documentation: eventSourceAvailability },\n { label: 'stream', insertText: 'stream ${1:Name}', documentation: eventSourceAvailability },\n { label: 'description', insertText: 'description \"${1:Description}\"', documentation: 'Authored description.' }\n ];\n }\n return null;\n}\n"],"mappings":"A,0dAYA,MAAaA,EAA0B,qTAE1BC,EAAiC,uLAExCC,EAAcC,EAAoB,6DAA6D,EAC/FC,EAAYD,EAAoB,kCAAkC,EAClEE,EAAuBF,EAAoB,6BAA6B,EACxEG,EAAmBH,EAAoB,2BAA2B,EAExE,SAAgB,oBAAoB,EAAiB,EAA2B,CAE5E,MADA,GAAUI,EAAiBC,EAAOC,CAAO,EAClCC,EAAiBF,EAAOC,GAAS,oBAAsBA,GAAS,kBAAkB,OAAO,GAAUE,IAAWH,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAAGC,GAAS,mBAAoBA,GAAS,cAAeA,GAAS,0BAA0B,CAAC,CAAC,YAC5O,CAEA,SAAgB,mBAAmB,EAA6B,EAAiC,CAC7F,MAAO,CAAC,KAAKG,EAAS,UAAUD,EAAO,KAAK,GAAGC,EAAO,OAAS,eAAeD,EAAO,OAAO,IACxFC,GAAQ,aAAeD,EAAO,aAAe,GAC7CA,EAAO,WAAa,oBAAoBE,EAAkBF,EAAO,UAAU,IAAM,+BACjFC,EAASA,EAAO,cAAc,OAAS,EAAI,oBAAoBA,EAAO,cAAc,IAAI,GAAQ,GAAGE,EAAK,KAAK,GAAGD,EAAkBC,EAAK,IAAI,GAAG,CAAC,CAAC,KAAK,IAAI,IAAMF,EAAO,SAAW,mBAAmBC,EAAkBD,EAAO,QAAQ,IAAM,kBAAoBD,EAAO,QAA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AAM,EAAG,OAAOiB,EAAa,CAC1C,CAAE,MAAO,WAAY,WAAY,qBAAsB,cAAepE,CAAwB,EAC9F,CAAE,MAAO,iBAAkB,WAAY,4DAA6D,cAAeA,CAAwB,EAC3I,CAAE,MAAO,cAAe,WAAY,iCAAkC,cAAe,uBAAwB,CACjH,EAAI,CACA,CAAE,MAAO,aAAc,WAAY,uBAAwB,cAAeA,CAAwB,EAClG,CAAE,MAAO,SAAU,WAAY,mBAAoB,cAAeA,CAAwB,EAC1F,CAAE,MAAO,cAAe,WAAY,iCAAkC,cAAe,uBAAwB,CACjH,CACJ,CACA,OAAO,IACX,C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"./_virtual/_virtual/_rolldown/runtime.js";import
|
|
2
|
-
`)},g=/* @__PURE__ */ new Map;for(let e of f.filter(e=>e.example?.location.path===o)){let t=e.example,r=t.location.line-1,i=n(s[r]??``).match(/^\s*example\s+/)?.[0];i&&g.set(r,{start:i.length+1,length:t.name.length,content:`**example ${display(e)} : ${t.type}**\n\n${kind(e)?effective(t,[],[],null):`Unresolved or ambiguous type; no effective values selected.`}`})}for(let{node:e,scope:t}of h){let r=[...e.given.map(e=>({step:e,name:e.eventType,expected:`event`,values:e.values,generated:[],destination:e.for,prefix:/^\s*given\s+/})),...e.givenReadModels.map(e=>({step:e,name:e.name,expected:`readmodel`,values:e.properties,generated:[],destination:null,prefix:/^\s*given\s+readmodel\s+/})),...e.when?[{step:e.when,name:e.when.commandType,expected:`command`,values:e.when.values,generated:e.when.generatedValues??[],destination:e.when.for,prefix:/^\s*when\s+/}]:[],...e.whenAppended?[{step:e.whenAppended,name:e.whenAppended.eventType,expected:`event`,values:e.whenAppended.values,generated:[],destination:e.whenAppended.for,prefix:/^\s*when\s+append\s+/}]:[],...e.thenEvents.map(e=>({step:e,name:e.eventType,expected:`event`,values:e.values,generated:[],destination:e.for,prefix:/^\s*then\s+/})),...e.thenReadModels.map(e=>({step:e,name:e.name,expected:`readmodel`,values:e.properties,generated:[],destination:null,prefix:/^\s*then\s+readmodel\s+/}))];for(let{step:e,name:i,expected:a,values:c,generated:l,destination:u,prefix:d}of r.filter(e=>e.step.location.path===o)){let r=unique(i,t),o=candidates(i,t).some(e=>e.example);if(!r?.example&&(r||!o))continue;let f=e.location.line-1,p=n(s[f]??``).match(d)?.[0].length;if(p===void 0)continue;let m=r?kind(r)===a?`**${a} ${r.example?.type??i}${r.example?` — example ${display(r)}`:``}**\n\n${effective(r.example,c,l,u,`eventType`in e?e:void 0)}\n\nAuthored fixture values, not execution results. Matching is unchanged.`:`**Example kind mismatch; no effective values selected.**`:`**Ambiguous example; no effective values selected.**`;g.set(f,{start:p+1,length:i.length,content:m})}}return{eventExamples:f.filter(e=>e.example?.location.path===o&&kind(e)===`event`).map(e=>e.example),completions(e,
|
|
1
|
+
import"./_virtual/_virtual/_rolldown/runtime.js";import"./compiler/index.js";import{eventDeclarations as e}from"./compiler/Syntax/EventDeclarations.js";import{specificationStepItems as t}from"./completion-items.js";import{withoutComment as n}from"./document-context.js";import{bmpWordCharacters as r}from"./bmp-word-characters.js";const i=RegExp(`^\\s*example\\s+[A-Z][${r}]*\\s*:\\s*([${r}.]*)$`),a=RegExp(`^\\s*(given|when|then)\\s+(?:(readmodel|append)\\s+)?([${r}.]*)$`);function exampleAnalysis(r,o,s,c,l,u){let d=r,f=[],p=u.some(e=>e.severity===`error`)?u.some(e=>e.code===`PLAY0519`)?`**Invalid duplicate assignments; no effective values selected.**`:`**Invalid source; no effective values selected.**`:null,m=/* @__PURE__ */ new Map,h=[],own=(e,t)=>{if(e.location.path===o&&e.location.line>0)for(let n of c(e.location.line-1))m.set(n,t)},examples=(e,t)=>{for(let n of e??[])f.push({name:n.name,scope:t,example:n}),own(n,t)};examples(d.examples,[]),f.push(...[...d.concepts,...d.types].map(e=>({name:e.name,scope:[]})));let features=(t,n)=>{for(let r of t){let t=[...n,r.name];own(r,t),examples(r.examples,t);for(let t of r.slices){let i=[...n,r.name,t.name];own(t,i),examples(t.examples,i);let a=/* @__PURE__ */ new Map;for(let n of e(t))a.set(n.name,[...a.get(n.name)??[],n]);for(let e of a.values()){let t=Math.max(...e.map(e=>e.generation));f.push(...e.filter(e=>e.generation===t).map(e=>({name:e.name,scope:i,fixtureKind:`event`})))}f.push(...t.commands.map(e=>({name:e.name,scope:i,fixtureKind:`command`})),...t.readModels.map(e=>({name:e.name,scope:i,fixtureKind:`readmodel`})));for(let e of t.specifications)h.push({node:e,scope:i}),own(e,i),examples(e.examples,i)}features(r.features,t)}};for(let e of d.modules)own(e,[e.name]),examples(e.examples,[e.name]),features(e.features,[e.name]);let candidates=(e,t)=>{let n=e.split(`.`),r=f.filter(e=>e.name===n.at(-1)),i=n.slice(0,-1);if(i.length)return r.filter(e=>i.length<=e.scope.length&&i.every((t,n)=>e.scope[e.scope.length-i.length+n]===t));for(let e=t.length;e>=0;e--){let n=r.filter(n=>e<=n.scope.length&&t.slice(0,e).every((e,t)=>n.scope[t]===e));if(n.length)return n}return[]},unique=(e,t)=>{let n=candidates(e,t);return n.length===1?n[0]:void 0},kind=e=>e.example?unique(e.example.type,e.scope)?.fixtureKind:e.fixtureKind,display=e=>[...e.scope.filter(e=>!l.has(e)),e.name].join(`.`),targets=(e,t,n=!1,r=``)=>f.flatMap(i=>{let a=kind(i);if(!a||t&&a!==t||n&&i.example)return[];let o=[...i.scope,i.name].join(`.`),s=unique(i.name,e)===i?i.name:o;if(unique(s,e)!==i)return[];let c=r.split(`.`).slice(0,-1).join(`.`);return c&&!o.endsWith(`${c}.${i.name}`)||s===o&&i.scope.some(e=>l.has(e))&&unique(i.name,e)!==i?[]:[{label:unique(i.name,e)===i?i.name:display(i),insertText:c?i.name:s,documentation:i.example?`Example of ${i.example.type}. Step assignments override example values; no implicit defaults.`:`Declared ${a}.`}]}),effective=(e,t,n,r,i)=>{if(p)return p;let merge=(t,n,r=``)=>{if(new Set(t.map(e=>e.property)).size!==t.length||new Set(n.map(e=>e.property)).size!==n.length)return null;let i=new Map(t.map(e=>[e.property,{value:e,origin:`example`,replaced:void 0}]));for(let e of n){let t=i.get(e.property)?.value;i.delete(e.property),i.set(e.property,{value:e,origin:t?`override`:`authored`,replaced:t})}return[...i.values()].map(({value:t,origin:n,replaced:i})=>`${r}${t.property} = ${expressionText(t.source)} — ${n}${n===`example`?` ${e.name}`:``}${i?` (replaces ${expressionText(i.source)} from ${e.name})`:``}`)},a=merge(e?.values??[],t),o=merge(e?.generatedValues??[],n,`generated `);if(!a||!o)return`**Invalid duplicate assignments; no effective values selected.**`;let s=r??e?.for,c=e?.stream??e?.noStream,l=i?.stream??i?.noStream,u=l??c,routeText=e=>e.kind===`SpecificationNoStreamSyntax`?`no stream`:`stream ${e.eventSource}.${e.stream}${e.streamId?` streamId = ${expressionText(e.streamId.source)}`:e.streamIdParts.length?` streamId ${e.streamIdParts.map(e=>`${e.property} = ${expressionText(e.source)}`).join(`, `)}`:``}`,d=u?[`${routeText(u)} — ${l?c?`override (replaces ${routeText(c)} from ${e.name})`:`authored`:`example ${e.name}`}`]:[];return[...a,...o,...d,...s?[`for ${expressionText(s)} — ${r?e?.for?`override (replaces ${expressionText(e.for)} from ${e.name})`:`authored`:`example ${e.name}`}`]:[]].join(`
|
|
2
|
+
`)},g=/* @__PURE__ */ new Map;for(let e of f.filter(e=>e.example?.location.path===o)){let t=e.example,r=t.location.line-1,i=n(s[r]??``).match(/^\s*example\s+/)?.[0];i&&g.set(r,{start:i.length+1,length:t.name.length,content:`**example ${display(e)} : ${t.type}**\n\n${kind(e)?effective(t,[],[],null):`Unresolved or ambiguous type; no effective values selected.`}`})}for(let{node:e,scope:t}of h){let r=[...e.given.map(e=>({step:e,name:e.eventType,expected:`event`,values:e.values,generated:[],destination:e.for,prefix:/^\s*given\s+/})),...e.givenReadModels.map(e=>({step:e,name:e.name,expected:`readmodel`,values:e.properties,generated:[],destination:null,prefix:/^\s*given\s+readmodel\s+/})),...e.when?[{step:e.when,name:e.when.commandType,expected:`command`,values:e.when.values,generated:e.when.generatedValues??[],destination:e.when.for,prefix:/^\s*when\s+/}]:[],...e.whenAppended?[{step:e.whenAppended,name:e.whenAppended.eventType,expected:`event`,values:e.whenAppended.values,generated:[],destination:e.whenAppended.for,prefix:/^\s*when\s+append\s+/}]:[],...e.thenEvents.map(e=>({step:e,name:e.eventType,expected:`event`,values:e.values,generated:[],destination:e.for,prefix:/^\s*then\s+/})),...e.thenReadModels.map(e=>({step:e,name:e.name,expected:`readmodel`,values:e.properties,generated:[],destination:null,prefix:/^\s*then\s+readmodel\s+/}))];for(let{step:e,name:i,expected:a,values:c,generated:l,destination:u,prefix:d}of r.filter(e=>e.step.location.path===o)){let r=unique(i,t),o=candidates(i,t).some(e=>e.example);if(!r?.example&&(r||!o))continue;let f=e.location.line-1,p=n(s[f]??``).match(d)?.[0].length;if(p===void 0)continue;let m=r?kind(r)===a?`**${a} ${r.example?.type??i}${r.example?` — example ${display(r)}`:``}**\n\n${effective(r.example,c,l,u,`eventType`in e?e:void 0)}\n\nAuthored fixture values, not execution results. Matching is unchanged.`:`**Example kind mismatch; no effective values selected.**`:`**Ambiguous example; no effective values selected.**`;g.set(f,{start:p+1,length:i.length,content:m})}}return{eventExamples:f.filter(e=>e.example?.location.path===o&&kind(e)===`event`).map(e=>e.example),completions(e,n){let r=m.get(e)??[],s=n.match(i);if(s)return targets(r,void 0,!0,s[1]);if(!h.some(({node:t})=>t.location.path===o&&c(t.location.line-1).includes(e)))return null;let l=n.match(a);if(!l||[`clock`,`caller`,`capture`,`trigger`,`query`,`result`,`error`,`denied`,`returns`,`no`,`operation`,`compensated`].includes(l[3]))return null;let u=l[2]===`readmodel`?`readmodel`:l[2]===`append`||l[1]!==`when`?`event`:`command`,d=targets(r,u,!1,l[3]);return d.length?l[2]?d:[...t[l[1]],...d]:null},hover(e,t,n){let r=g.get(e);return r&&t>=r.start&&n<=r.start+r.length?r.content:null}}}function expressionText(e){switch(e.kind){case`LiteralExpressionSyntax`:return typeof e.value==`object`&&e.value!==null?e.value.value:JSON.stringify(e.value);case`ListExpressionSyntax`:return e.items.length===0?`none`:`(${e.items.map(e=>`item ${expressionText(e)}`).join(`, `)})`;case`ObjectExpressionSyntax`:return e.members.length===0?`empty`:`(${e.members.map(e=>`${memberName(e.name)} = ${expressionText(e.value)}`).join(`, `)})`;case`ClockOffsetExpressionSyntax`:return`${e.clock} ${e.amount<0?`-`:`+`} ${Math.abs(e.amount)} ${e.unit}`;case`DateOfExpressionSyntax`:return`date of ${expressionText(e.operand)}`;case`RawExpressionSyntax`:return e.text;case`CaseValueExpressionSyntax`:return`case.${e.parameter}`;case`PathExpressionSyntax`:return e.path;case`ContextExpressionSyntax`:return`$context.${e.path}`;case`IdentityExpressionSyntax`:return`$identity.${e.path}`;case`EventContextExpressionSyntax`:return`$eventContext.${e.path}`;case`RefusalExpressionSyntax`:return`$refusal.${e.member}`;case`EventSourceIdExpressionSyntax`:return`$eventSourceId`;case`CausedByExpressionSyntax`:return`$causedBy${e.property?`.${e.property}`:``}`;case`EnvironmentExpressionSyntax`:return`$env.${e.name}`;case`StringsExpressionSyntax`:return`$strings.${e.key}`;case`SourceItemExpressionSyntax`:return`$.${e.path}`;case`TemplateExpressionSyntax`:return"`"+e.parts.map(e=>e.kind===`TemplateTextSyntax`?e.text:"${"+expressionText(e.expression)+`}`).join(``)+"`"}}const memberName=e=>e===`item`?`@item`:/^[\p{L}_][\p{L}\p{N}_]*$/u.test(e)?e:JSON.stringify(e);export{exampleAnalysis};
|
|
3
3
|
//# sourceMappingURL=example-analysis.js.map
|