@cratis/screenplay-language 5.2.0 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2 -0
- package/dist/bundles/compiler/Parsing/ApplicationContextParser.js.map +1 -0
- 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 +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 +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 +18 -17
- 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 +1 -1
- package/dist/bundles/keyword-docs.js.map +1 -1
- package/dist/bundles/language.js +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 +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 +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/completion-items.d.ts +1 -0
- package/dist/completion-items.d.ts.map +1 -1
- package/dist/completion-planner.d.ts.map +1 -1
- package/dist/diagnostic-codes.d.ts +6 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/dist/keyword-docs.d.ts.map +1 -1
- package/dist/language.d.ts.map +1 -1
- package/dist/scope-items.d.ts.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenActionSubjects.js","names":["resolveActionSubjectApplication","application"],"sources":["../../../../../Compiler/ScreenActionSubjects.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 { CompilationResult } from './ScreenplayCompiler';\nimport { resolveActionSubjectApplication } from './Parsing/ActionSubjectResolution';\nimport { ApplicationSyntax } from './Syntax/Structure';\n\n/** Resolves an immutable authored tree into its effective action-subject semantics without changing the authored syntax. */\nexport function resolveActionSubjects(application: ApplicationSyntax): CompilationResult<ApplicationSyntax> {\n return resolveActionSubjectApplication(application);\n}\n"],"mappings":"yIAQA,SAAgB,sBAAsB,EAAsE,CACxG,OAAOA,EAAgCC,CAAW,CACtD"}
|
|
1
|
+
{"version":3,"file":"ScreenActionSubjects.js","names":["resolveActionSubjectApplication","application"],"sources":["../../../../../Compiler/ScreenActionSubjects.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 { CompilationResult } from './ScreenplayCompiler';\nimport { resolveActionSubjectApplication } from './Parsing/ActionSubjectResolution';\nimport { ApplicationSyntax } from './Syntax/Structure';\n\n/** Resolves an immutable authored tree into its effective action-subject semantics without changing the authored syntax. */\nexport function resolveActionSubjects(application: ApplicationSyntax): CompilationResult<ApplicationSyntax> {\n return resolveActionSubjectApplication(application);\n}\n"],"mappings":"A,yIAQA,SAAgB,sBAAsB,EAAsE,CACxG,OAAOA,EAAgCC,CAAW,CACtD,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../_virtual/_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_virtual/_rolldown/runtime.js";import{validateIdentity as e}from"./Parsing/IdentityValidator.js";import{validateApplicationHandlers as t}from"./Parsing/CommandHandlerValidator.js";import{recordStructuralInteractions as n}from"./Parsing/StructuralInteractionSites.js";import{validateSpecificationCases as r}from"./Parsing/SpecificationCaseValidator.js";import{expandSpecificationExamples as i,validateSpecificationExampleTypes as a}from"./Parsing/SpecificationCommandExamples.js";import{productionDestinationDiagnostics as o}from"./Diagnostics/ProductionDestinationDiagnostics.js";import{validateConstraintProperties as s}from"./Parsing/ConstraintPropertyValidator.js";import{validateDependencyDeclarations as c}from"./Dependencies/DeclaredDependencyTargets.js";import{DeclaredDependencies as l}from"./Dependencies/DeclaredDependencies.js";import{documentPlacement as u}from"./Files/PlayPlacement.js";import{discoverImports as d}from"./Parsing/ImportDiscovery.js";import{interactionAncestry as f}from"./Parsing/InteractionAlternatives.js";import{validateResponses as p}from"./Parsing/ResponseValidator.js";import{validatePublicEventUsage as m}from"./Parsing/PublicEventUsageValidator.js";import{sourceContext as h}from"./Parsing/SourceOptionsParser.js";import{validateInlineEvents as g}from"./Parsing/InlineEventValidator.js";import{validateOperations as _}from"./Parsing/OperationValidator.js";import{CommandStreamCandidates as v}from"./Parsing/CommandStreamCandidates.js";import{validateEventSources as y}from"./Parsing/EventSourceValidator.js";import{validateProjectionTargets as b}from"./Parsing/ProjectionTargetValidator.js";import{validateIdentifierCompliance as x}from"./Parsing/IdentifierComplianceValidator.js";import{validateEventSubjects as S}from"./Parsing/EventSubjectValidator.js";import{validateReadModelKeys as C}from"./Parsing/ReadModelKeyValidator.js";import{validateReadModelMemberTypes as w}from"./Parsing/ReadModelMemberTypeValidator.js";import{validateReactionRefusals as T}from"./Parsing/ReactionRefusalValidator.js";import{validateSpecificationRedelivery as E}from"./Parsing/SpecificationRedeliveryValidator.js";import{validateGuardedActions as D}from"./Parsing/GuardedActionValidator.js";import{validatePersonaCallers as O}from"./Parsing/PersonaCallerValidator.js";import{validatePurposes as k}from"./Parsing/PurposeValidator.js";import{parseApplication as A}from"./Parsing/ScreenplayParser.js";import{splitLines as j}from"./Parsing/SourceLineSplitter.js";import"./Parsing/ProjectionParser.js";import"./Parsing/CaptureParser.js";import"./Parsing/SpecificationParser.js";import"./Parsing/SpecificationExampleParser.js";import{timelineOrderDiagnostics as M}from"./Files/TimelineOrder.js";function parseForAuthoring(d,N,P=u,F=!0,I,L){let R=j(d,!1,N),z=h(R,N,L);z.scope=P,z.interactionAncestors=f(R),z.streamCandidates=I??v.capture([R],P,L);let B=A(z,R,P);if(n(B,z),F){t(B,z),e(B,z),k(B,z),g(B,z),s(B,z),_(B,z),m(B,z),r(B,z),a(B,z,!0);let n=i(B);p(n,z),y(B,z),b(B,z),x(n,z),S(B,z),C(B,z),w(B,z),T(B,z),E(B,z),D(B,z),O(B,z),B=c(B,z),l.validate(B,z);for(let e of o(B))z.information(e.code,e.message,e.location);for(let e of M(B))z.information(e.code,e.message,e.location)}return{value:B,diagnostics:z.diagnostics,triggerData:z.triggerData,inputUses:z.inputUses,continuationValues:z.continuationValues,guardedInteractions:z.guardedInteractions,interactionBehaviors:z.interactionBehaviors,interactionUses:z.interactionUses,success:!z.diagnostics.some(e=>e.severity===`error`)}}function discoverImports(e,t,n){let r=j(e,!1,t);return d(h(r,t,n))}export{discoverImports,parseForAuthoring};
|
|
2
2
|
//# sourceMappingURL=ScreenplayCompiler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenplayCompiler.js","names":["discoverImportsIn","discoverImports$1","documentPlacement","lines","splitLines","source","path","context","sourceContext","languages","placement","interactionAncestry","streamCandidates","CommandStreamCandidates","value","parseApplication","recordStructuralInteractions","validateResponseContracts","validateApplicationHandlers","validateIdentity","validatePurposes","validateInlineEvents","validateConstraintProperties","validateOperations","validatePublicEventUsage","validateSpecificationCases","validateSpecificationExampleTypes","effective","expandSpecificationExamples","validateResponses","validateEventSources","validateProjectionTargets","validateIdentifierCompliance","validateEventSubjects","validateReadModelKeys","validateReadModelMemberTypes","validateReactionRefusals","validateSpecificationRedelivery","validateGuardedActions","validatePersonaCallers","validateDependencyDeclarations","DeclaredDependencies","diagnostic","productionDestinationDiagnostics","timelineOrderDiagnostics"],"sources":["../../../../../Compiler/ScreenplayCompiler.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 { validateIdentity } from './Parsing/IdentityValidator';\nimport { validateApplicationHandlers } from './Parsing/CommandHandlerValidator';\nimport { recordStructuralInteractions } from './Parsing/StructuralInteractionSites';\nimport { Diagnostic } from './Diagnostics/Diagnostic';\nimport { validateSpecificationCases } from './Parsing/SpecificationCaseValidator';\nimport { expandSpecificationExamples, validateSpecificationExampleTypes } from './Parsing/SpecificationCommandExamples';\nimport { productionDestinationDiagnostics } from './Diagnostics/ProductionDestinationDiagnostics';\nimport { validateConstraintProperties } from './Parsing/ConstraintPropertyValidator';\nimport { validateDependencyDeclarations } from './Dependencies/DeclaredDependencyTargets';\nimport { DeclaredDependencies } from './Dependencies/DeclaredDependencies';\nimport { documentPlacement, PlayPlacement } from './Files/PlayPlacement';\nimport { DiscoveredImport, discoverImports as discoverImportsIn } from './Parsing/ImportDiscovery';\nimport { ContinuationValueUse } from './Parsing/ContinuationValueUse';\nimport { InputUse } from './Parsing/InputUses';\nimport { GuardedInteractionBinding, interactionAncestry } from './Parsing/InteractionAlternatives';\nimport { validateResponses } from './Parsing/ResponseValidator';\nimport { validatePublicEventUsage } from './Parsing/PublicEventUsageValidator';\nimport { sourceContext } from './Parsing/SourceOptionsParser';\nimport { validateInlineEvents } from './Parsing/InlineEventValidator';\nimport { validateOperations } from './Parsing/OperationValidator';\nimport { CommandStreamCandidates } from './Parsing/CommandStreamCandidates';\nimport { validateEventSources } from './Parsing/EventSourceValidator';\nimport { validateProjectionTargets } from './Parsing/ProjectionTargetValidator';\nimport { validateIdentifierCompliance } from './Parsing/IdentifierComplianceValidator';\nimport { validateEventSubjects } from './Parsing/EventSubjectValidator';\nimport { validateReadModelKeys } from './Parsing/ReadModelKeyValidator';\nimport { validateReadModelMemberTypes } from './Parsing/ReadModelMemberTypeValidator';\nimport { validateReactionRefusals } from './Parsing/ReactionRefusalValidator';\nimport { validateSpecificationRedelivery } from './Parsing/SpecificationRedeliveryValidator';\nimport { validateGuardedActions } from './Parsing/GuardedActionValidator';\nimport { validatePersonaCallers } from './Parsing/PersonaCallerValidator';\nimport { validatePurposes } from './Parsing/PurposeValidator';\nimport { parseApplication } from './Parsing/ScreenplayParser';\nimport { splitLines } from './Parsing/SourceLineSplitter';\nimport { PropertySyntax } from './Syntax/Declarations';\nimport { ApplicationSyntax } from './Syntax/Structure';\nimport { ApplicationSyntaxVisitor } from './Syntax/Visitors';\nimport { ProjectionSyntax } from './Syntax/Projections';\nimport { CaptureSyntax } from './Syntax/Captures';\nimport { SpecificationExampleSyntax, SpecificationSyntax } from './Syntax/Specifications';\nimport { SyntaxNode } from './Syntax/SyntaxNode';\nimport { ParserContext } from './Parsing/ParserContext';\nimport { parseProjection } from './Parsing/ProjectionParser';\nimport { parseCapture } from './Parsing/CaptureParser';\nimport { parseSpecification } from './Parsing/SpecificationParser';\nimport { parseExample } from './Parsing/SpecificationExampleParser';\nimport { firstWord } from './Parsing/LineText';\nimport { SourceLine, locationOf } from './Parsing/SourceLine';\nimport { DiagnosticCodes } from './Diagnostics/DiagnosticCodes';\nimport { timelineOrderDiagnostics } from './Files/TimelineOrder';\n\n// What compiling produced: the syntax tree, and the diagnostics found on the way. A tree is always\n// produced, so a document with errors still shows everything that could be read.\nexport interface CompilationResult<T> {\n readonly value: T;\n readonly diagnostics: readonly Diagnostic[];\n readonly success: boolean;\n}\n\n// Parses one .play document - the TypeScript counterpart of the C# ScreenplayCompiler.Parse. The path, when\n// given, is carried on every source location so a folder of documents can be merged and still point back\n// at the file each node came from. A placement says the document's top level belongs to the module or\n// feature an import placed it in: that module and feature are in the tree, marked as placements, holding what\n// the document declares at its top level.\nexport function parse(source: string, path?: string, placement: PlayPlacement = documentPlacement): CompilationResult<ApplicationSyntax> {\n const { value, diagnostics, success } = parseForAuthoring(source, path, placement);\n return { value, diagnostics, success };\n}\n\n// Additive authoring view: do not widen TypeRefSyntax or the cross-compiler SyntaxJson projection.\nexport function parseForAuthoring(source: string, path?: string, placement: PlayPlacement = documentPlacement, validateResponseContracts = true, streamCandidates?: CommandStreamCandidates, languages?: ReadonlySet<string>): CompilationResult<ApplicationSyntax> & { readonly triggerData: readonly PropertySyntax[]; readonly inputUses: readonly InputUse[]; readonly continuationValues: readonly ContinuationValueUse[]; readonly guardedInteractions: readonly GuardedInteractionBinding[]; readonly interactionBehaviors: ParserContext['interactionBehaviors']; readonly interactionUses: ParserContext['interactionUses'] } {\n const lines = splitLines(source, false, path);\n const context = sourceContext(lines, path, languages);\n context.scope = placement;\n context.interactionAncestors = interactionAncestry(lines);\n context.streamCandidates = streamCandidates ?? CommandStreamCandidates.capture([lines], placement, languages);\n let value = parseApplication(context, lines, placement);\n recordStructuralInteractions(value, context);\n // Folder assembly validates declaration-dependent contracts once against the merged inventory.\n if (validateResponseContracts) {\n validateApplicationHandlers(value, context);\n validateIdentity(value, context);\n validatePurposes(value, context);\n validateInlineEvents(value, context);\n validateConstraintProperties(value, context);\n validateOperations(value, context);\n validatePublicEventUsage(value, context);\n validateSpecificationCases(value, context);\n validateSpecificationExampleTypes(value, context, true);\n const effective = expandSpecificationExamples(value);\n validateResponses(effective, context);\n validateEventSources(value, context);\n validateProjectionTargets(value, context);\n validateIdentifierCompliance(effective, context);\n validateEventSubjects(value, context);\n validateReadModelKeys(value, context);\n validateReadModelMemberTypes(value, context);\n validateReactionRefusals(value, context);\n validateSpecificationRedelivery(value, context);\n validateGuardedActions(value, context);\n validatePersonaCallers(value, context);\n value = validateDependencyDeclarations(value, context);\n DeclaredDependencies.validate(value, context);\n for (const diagnostic of productionDestinationDiagnostics(value)) context.information(diagnostic.code, diagnostic.message, diagnostic.location);\n for (const diagnostic of timelineOrderDiagnostics(value)) context.information(diagnostic.code, diagnostic.message, diagnostic.location);\n }\n return {\n value,\n diagnostics: context.diagnostics,\n triggerData: context.triggerData,\n inputUses: context.inputUses,\n continuationValues: context.continuationValues,\n guardedInteractions: context.guardedInteractions,\n interactionBehaviors: context.interactionBehaviors,\n interactionUses: context.interactionUses,\n success: !context.diagnostics.some(diagnostic => diagnostic.severity === 'error'),\n };\n}\n\n/** Checks public boundaries on programmatically authored or decoded assembled syntax. */\nexport function publicEventDiagnostics(application: ApplicationSyntax): readonly Diagnostic[] {\n const context = sourceContext([], application.location.path);\n validatePublicEventUsage(application, context);\n return context.diagnostics;\n}\n\n// Parses a document and hands its syntax tree to a visitor - the counterpart of the C#\n// ScreenplayCompiler.Compile<T>(source, visitor). The visitor runs even when there are errors, over\n// everything that could be read.\nexport function compile<T>(source: string, visitor: ApplicationSyntaxVisitor<T>, path?: string): CompilationResult<T> {\n const parsed = parse(source, path);\n return { value: visitor.visit(parsed.value), diagnostics: parsed.diagnostics, success: parsed.success };\n}\n\n// Finds the files a document imports and where in it each import is written - each import with the module\n// and feature names around it, outermost first. Diagnostics are not collected; parsing the document reports them.\nexport function discoverImports(source: string, path?: string, languages?: ReadonlySet<string>): DiscoveredImport[] {\n const lines = splitLines(source, false, path);\n return discoverImportsIn(sourceContext(lines, path, languages));\n}\n\n// Additive entry points preserve the caller's registry; none can select numeric mode externally.\nexport function parseWithLanguages(source: string, languages: ReadonlySet<string>, path?: string, placement: PlayPlacement = documentPlacement): CompilationResult<ApplicationSyntax> {\n const { value, diagnostics, success } = parseForAuthoring(source, path, placement, true, undefined, languages);\n return { value, diagnostics, success };\n}\n\nexport function parseProjectionSource(source: string, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly ProjectionSyntax[]> {\n return parseSourceFamily(source, 'projection', parseProjection, path, languages);\n}\n\nexport function parseCaptureSource(source: string, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly CaptureSyntax[]> {\n return parseSourceFamily(source, 'capture', parseCapture, path, languages);\n}\n\nexport function parseSpecificationSource(source: string, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly SpecificationSyntax[]> {\n return parseSourceFamily(source, 'specification', parseSpecification, path, languages);\n}\n\nfunction parseSourceFamily<T extends SyntaxNode>(source: string, keyword: string, read: (context: ParserContext, line: SourceLine) => T, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly T[]> {\n const context = sourceContext(splitLines(source, true, path), path, languages, true);\n const value: T[] = [];\n const examples: SpecificationExampleSyntax[] = [];\n for (let line = context.reader.peekSignificant(); line !== undefined; line = context.reader.peekSignificant()) {\n context.reader.takeSignificant();\n if (keyword === 'specification' && firstWord(line.content) === 'example') examples.push(parseExample(context, line));\n else if (line.content.startsWith(keyword)) value.push(read(context, line));\n else {\n context.error(DiagnosticCodes.UnknownTopLevelConstruct, `Expected '${keyword}', got '${line.content}'`, locationOf(line));\n context.skipOpaqueBlock(line.indent);\n }\n }\n if (context.sourceOptions.numericMode === 'exact' && value.length === 0 && context.diagnostics.length === 0) {\n const code = keyword === 'projection' ? DiagnosticCodes.ProjectionDocumentWithoutProjection : keyword === 'capture' ? DiagnosticCodes.CaptureDocumentWithoutCapture : DiagnosticCodes.SpecificationDocumentWithoutSpecification;\n context.error(code, `Document must contain at least one ${keyword}`, context.start);\n }\n const roots = keyword === 'specification' && examples.length > 0 ? value.map(node => ({ ...node, examples })) : value;\n if (keyword === 'specification') {\n const application = parseApplication(sourceContext([], path, languages), [], documentPlacement);\n validateSpecificationCases({ ...application, examples }, context, roots as unknown as SpecificationSyntax[]);\n }\n return { value: roots, diagnostics: context.diagnostics, success: !context.diagnostics.some(diagnostic => diagnostic.severity === 'error') };\n}\n"],"mappings":"yqFAyEA,SAAgB,kBAAkB,EAAgB,EAAe,EAA2BE,EAAmB,EAA4B,GAAM,EAA4C,EAA0a,CACnmB,IAAMC,EAAQC,EAAWC,EAAQ,GAAOC,CAAI,EACtCC,EAAUC,EAAcL,EAAOG,EAAMG,CAAS,EACpD,EAAQ,MAAQC,EAChB,EAAQ,qBAAuBC,EAAoBR,CAAK,EACxD,EAAQ,iBAAmBS,GAAoBC,EAAwB,QAAQ,CAACV,CAAK,EAAGO,EAAWD,CAAS,EAC5G,IAAIK,EAAQC,EAAiBR,EAASJ,EAAOO,CAAS,EAGtD,GAFAM,EAA6BF,EAAOP,CAAO,EAEvCU,EAA2B,CAC3BC,EAA4BJ,EAAOP,CAAO,EAC1CY,EAAiBL,EAAOP,CAAO,EAC/Ba,EAAiBN,EAAOP,CAAO,EAC/Bc,EAAqBP,EAAOP,CAAO,EACnCe,EAA6BR,EAAOP,CAAO,EAC3CgB,EAAmBT,EAAOP,CAAO,EACjCiB,EAAyBV,EAAOP,CAAO,EACvCkB,EAA2BX,EAAOP,CAAO,EACzCmB,EAAkCZ,EAAOP,EAAS,EAAI,EACtD,IAAMoB,EAAYC,EAA4Bd,CAAK,EACnDe,EAAkBF,EAAWpB,CAAO,EACpCuB,EAAqBhB,EAAOP,CAAO,EACnCwB,EAA0BjB,EAAOP,CAAO,EACxCyB,EAA6BL,EAAWpB,CAAO,EAC/C0B,EAAsBnB,EAAOP,CAAO,EACpC2B,EAAsBpB,EAAOP,CAAO,EACpC4B,EAA6BrB,EAAOP,CAAO,EAC3C6B,EAAyBtB,EAAOP,CAAO,EACvC8B,EAAgCvB,EAAOP,CAAO,EAC9C+B,EAAuBxB,EAAOP,CAAO,EACrCgC,EAAuBzB,EAAOP,CAAO,EACrC,EAAQiC,EAA+B1B,EAAOP,CAAO,EACrDkC,EAAqB,SAAS3B,EAAOP,CAAO,EAC5C,IAAK,IAAMmC,KAAcC,EAAiC7B,CAAK,EAAGP,EAAQ,YAAYmC,EAAW,KAAMA,EAAW,QAASA,EAAW,QAAQ,EAC9I,IAAK,IAAMA,KAAcE,EAAyB9B,CAAK,EAAGP,EAAQ,YAAYmC,EAAW,KAAMA,EAAW,QAASA,EAAW,QAAQ,CAC1I,CACA,MAAO,CACH,QACA,YAAanC,EAAQ,YACrB,YAAaA,EAAQ,YACrB,UAAWA,EAAQ,UACnB,mBAAoBA,EAAQ,mBAC5B,oBAAqBA,EAAQ,oBAC7B,qBAAsBA,EAAQ,qBAC9B,gBAAiBA,EAAQ,gBACzB,QAAS,CAACA,EAAQ,YAAY,KAAK,GAAcmC,EAAW,WAAa,OAAO,CACpF,CACJ,CAmBA,SAAgB,gBAAgB,EAAgB,EAAe,EAAqD,CAChH,IAAMvC,EAAQC,EAAWC,EAAQ,GAAOC,CAAI,EAC5C,OAAON,EAAkBQ,EAAcL,EAAOG,EAAMG,CAAS,CAAC,CAClE"}
|
|
1
|
+
{"version":3,"file":"ScreenplayCompiler.js","names":["discoverImportsIn","discoverImports$1","documentPlacement","lines","splitLines","source","path","context","sourceContext","languages","placement","interactionAncestry","streamCandidates","CommandStreamCandidates","value","parseApplication","recordStructuralInteractions","validateResponseContracts","validateApplicationHandlers","validateIdentity","validatePurposes","validateInlineEvents","validateConstraintProperties","validateOperations","validatePublicEventUsage","validateSpecificationCases","validateSpecificationExampleTypes","effective","expandSpecificationExamples","validateResponses","validateEventSources","validateProjectionTargets","validateIdentifierCompliance","validateEventSubjects","validateReadModelKeys","validateReadModelMemberTypes","validateReactionRefusals","validateSpecificationRedelivery","validateGuardedActions","validatePersonaCallers","validateDependencyDeclarations","DeclaredDependencies","diagnostic","productionDestinationDiagnostics","timelineOrderDiagnostics"],"sources":["../../../../../Compiler/ScreenplayCompiler.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 { validateIdentity } from './Parsing/IdentityValidator';\nimport { validateApplicationHandlers } from './Parsing/CommandHandlerValidator';\nimport { recordStructuralInteractions } from './Parsing/StructuralInteractionSites';\nimport { Diagnostic } from './Diagnostics/Diagnostic';\nimport { validateSpecificationCases } from './Parsing/SpecificationCaseValidator';\nimport { expandSpecificationExamples, validateSpecificationExampleTypes } from './Parsing/SpecificationCommandExamples';\nimport { productionDestinationDiagnostics } from './Diagnostics/ProductionDestinationDiagnostics';\nimport { validateConstraintProperties } from './Parsing/ConstraintPropertyValidator';\nimport { validateDependencyDeclarations } from './Dependencies/DeclaredDependencyTargets';\nimport { DeclaredDependencies } from './Dependencies/DeclaredDependencies';\nimport { documentPlacement, PlayPlacement } from './Files/PlayPlacement';\nimport { DiscoveredImport, discoverImports as discoverImportsIn } from './Parsing/ImportDiscovery';\nimport { ContinuationValueUse } from './Parsing/ContinuationValueUse';\nimport { InputUse } from './Parsing/InputUses';\nimport { GuardedInteractionBinding, interactionAncestry } from './Parsing/InteractionAlternatives';\nimport { validateResponses } from './Parsing/ResponseValidator';\nimport { validatePublicEventUsage } from './Parsing/PublicEventUsageValidator';\nimport { sourceContext } from './Parsing/SourceOptionsParser';\nimport { validateInlineEvents } from './Parsing/InlineEventValidator';\nimport { validateOperations } from './Parsing/OperationValidator';\nimport { CommandStreamCandidates } from './Parsing/CommandStreamCandidates';\nimport { validateEventSources } from './Parsing/EventSourceValidator';\nimport { validateProjectionTargets } from './Parsing/ProjectionTargetValidator';\nimport { validateIdentifierCompliance } from './Parsing/IdentifierComplianceValidator';\nimport { validateEventSubjects } from './Parsing/EventSubjectValidator';\nimport { validateReadModelKeys } from './Parsing/ReadModelKeyValidator';\nimport { validateReadModelMemberTypes } from './Parsing/ReadModelMemberTypeValidator';\nimport { validateReactionRefusals } from './Parsing/ReactionRefusalValidator';\nimport { validateSpecificationRedelivery } from './Parsing/SpecificationRedeliveryValidator';\nimport { validateGuardedActions } from './Parsing/GuardedActionValidator';\nimport { validatePersonaCallers } from './Parsing/PersonaCallerValidator';\nimport { validatePurposes } from './Parsing/PurposeValidator';\nimport { parseApplication } from './Parsing/ScreenplayParser';\nimport { splitLines } from './Parsing/SourceLineSplitter';\nimport { PropertySyntax } from './Syntax/Declarations';\nimport { ApplicationSyntax } from './Syntax/Structure';\nimport { ApplicationSyntaxVisitor } from './Syntax/Visitors';\nimport { ProjectionSyntax } from './Syntax/Projections';\nimport { CaptureSyntax } from './Syntax/Captures';\nimport { SpecificationExampleSyntax, SpecificationSyntax } from './Syntax/Specifications';\nimport { SyntaxNode } from './Syntax/SyntaxNode';\nimport { ParserContext } from './Parsing/ParserContext';\nimport { parseProjection } from './Parsing/ProjectionParser';\nimport { parseCapture } from './Parsing/CaptureParser';\nimport { parseSpecification } from './Parsing/SpecificationParser';\nimport { parseExample } from './Parsing/SpecificationExampleParser';\nimport { firstWord } from './Parsing/LineText';\nimport { SourceLine, locationOf } from './Parsing/SourceLine';\nimport { DiagnosticCodes } from './Diagnostics/DiagnosticCodes';\nimport { timelineOrderDiagnostics } from './Files/TimelineOrder';\n\n// What compiling produced: the syntax tree, and the diagnostics found on the way. A tree is always\n// produced, so a document with errors still shows everything that could be read.\nexport interface CompilationResult<T> {\n readonly value: T;\n readonly diagnostics: readonly Diagnostic[];\n readonly success: boolean;\n}\n\n// Parses one .play document - the TypeScript counterpart of the C# ScreenplayCompiler.Parse. The path, when\n// given, is carried on every source location so a folder of documents can be merged and still point back\n// at the file each node came from. A placement says the document's top level belongs to the module or\n// feature an import placed it in: that module and feature are in the tree, marked as placements, holding what\n// the document declares at its top level.\nexport function parse(source: string, path?: string, placement: PlayPlacement = documentPlacement): CompilationResult<ApplicationSyntax> {\n const { value, diagnostics, success } = parseForAuthoring(source, path, placement);\n return { value, diagnostics, success };\n}\n\n// Additive authoring view: do not widen TypeRefSyntax or the cross-compiler SyntaxJson projection.\nexport function parseForAuthoring(source: string, path?: string, placement: PlayPlacement = documentPlacement, validateResponseContracts = true, streamCandidates?: CommandStreamCandidates, languages?: ReadonlySet<string>): CompilationResult<ApplicationSyntax> & { readonly triggerData: readonly PropertySyntax[]; readonly inputUses: readonly InputUse[]; readonly continuationValues: readonly ContinuationValueUse[]; readonly guardedInteractions: readonly GuardedInteractionBinding[]; readonly interactionBehaviors: ParserContext['interactionBehaviors']; readonly interactionUses: ParserContext['interactionUses'] } {\n const lines = splitLines(source, false, path);\n const context = sourceContext(lines, path, languages);\n context.scope = placement;\n context.interactionAncestors = interactionAncestry(lines);\n context.streamCandidates = streamCandidates ?? CommandStreamCandidates.capture([lines], placement, languages);\n let value = parseApplication(context, lines, placement);\n recordStructuralInteractions(value, context);\n // Folder assembly validates declaration-dependent contracts once against the merged inventory.\n if (validateResponseContracts) {\n validateApplicationHandlers(value, context);\n validateIdentity(value, context);\n validatePurposes(value, context);\n validateInlineEvents(value, context);\n validateConstraintProperties(value, context);\n validateOperations(value, context);\n validatePublicEventUsage(value, context);\n validateSpecificationCases(value, context);\n validateSpecificationExampleTypes(value, context, true);\n const effective = expandSpecificationExamples(value);\n validateResponses(effective, context);\n validateEventSources(value, context);\n validateProjectionTargets(value, context);\n validateIdentifierCompliance(effective, context);\n validateEventSubjects(value, context);\n validateReadModelKeys(value, context);\n validateReadModelMemberTypes(value, context);\n validateReactionRefusals(value, context);\n validateSpecificationRedelivery(value, context);\n validateGuardedActions(value, context);\n validatePersonaCallers(value, context);\n value = validateDependencyDeclarations(value, context);\n DeclaredDependencies.validate(value, context);\n for (const diagnostic of productionDestinationDiagnostics(value)) context.information(diagnostic.code, diagnostic.message, diagnostic.location);\n for (const diagnostic of timelineOrderDiagnostics(value)) context.information(diagnostic.code, diagnostic.message, diagnostic.location);\n }\n return {\n value,\n diagnostics: context.diagnostics,\n triggerData: context.triggerData,\n inputUses: context.inputUses,\n continuationValues: context.continuationValues,\n guardedInteractions: context.guardedInteractions,\n interactionBehaviors: context.interactionBehaviors,\n interactionUses: context.interactionUses,\n success: !context.diagnostics.some(diagnostic => diagnostic.severity === 'error'),\n };\n}\n\n/** Checks public boundaries on programmatically authored or decoded assembled syntax. */\nexport function publicEventDiagnostics(application: ApplicationSyntax): readonly Diagnostic[] {\n const context = sourceContext([], application.location.path);\n validatePublicEventUsage(application, context);\n return context.diagnostics;\n}\n\n// Parses a document and hands its syntax tree to a visitor - the counterpart of the C#\n// ScreenplayCompiler.Compile<T>(source, visitor). The visitor runs even when there are errors, over\n// everything that could be read.\nexport function compile<T>(source: string, visitor: ApplicationSyntaxVisitor<T>, path?: string): CompilationResult<T> {\n const parsed = parse(source, path);\n return { value: visitor.visit(parsed.value), diagnostics: parsed.diagnostics, success: parsed.success };\n}\n\n// Finds the files a document imports and where in it each import is written - each import with the module\n// and feature names around it, outermost first. Diagnostics are not collected; parsing the document reports them.\nexport function discoverImports(source: string, path?: string, languages?: ReadonlySet<string>): DiscoveredImport[] {\n const lines = splitLines(source, false, path);\n return discoverImportsIn(sourceContext(lines, path, languages));\n}\n\n// Additive entry points preserve the caller's registry; none can select numeric mode externally.\nexport function parseWithLanguages(source: string, languages: ReadonlySet<string>, path?: string, placement: PlayPlacement = documentPlacement): CompilationResult<ApplicationSyntax> {\n const { value, diagnostics, success } = parseForAuthoring(source, path, placement, true, undefined, languages);\n return { value, diagnostics, success };\n}\n\nexport function parseProjectionSource(source: string, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly ProjectionSyntax[]> {\n return parseSourceFamily(source, 'projection', parseProjection, path, languages);\n}\n\nexport function parseCaptureSource(source: string, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly CaptureSyntax[]> {\n return parseSourceFamily(source, 'capture', parseCapture, path, languages);\n}\n\nexport function parseSpecificationSource(source: string, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly SpecificationSyntax[]> {\n return parseSourceFamily(source, 'specification', parseSpecification, path, languages);\n}\n\nfunction parseSourceFamily<T extends SyntaxNode>(source: string, keyword: string, read: (context: ParserContext, line: SourceLine) => T, path?: string, languages?: ReadonlySet<string>): CompilationResult<readonly T[]> {\n const context = sourceContext(splitLines(source, true, path), path, languages, true);\n const value: T[] = [];\n const examples: SpecificationExampleSyntax[] = [];\n for (let line = context.reader.peekSignificant(); line !== undefined; line = context.reader.peekSignificant()) {\n context.reader.takeSignificant();\n if (keyword === 'specification' && firstWord(line.content) === 'example') examples.push(parseExample(context, line));\n else if (line.content.startsWith(keyword)) value.push(read(context, line));\n else {\n context.error(DiagnosticCodes.UnknownTopLevelConstruct, `Expected '${keyword}', got '${line.content}'`, locationOf(line));\n context.skipOpaqueBlock(line.indent);\n }\n }\n if (context.sourceOptions.numericMode === 'exact' && value.length === 0 && context.diagnostics.length === 0) {\n const code = keyword === 'projection' ? DiagnosticCodes.ProjectionDocumentWithoutProjection : keyword === 'capture' ? DiagnosticCodes.CaptureDocumentWithoutCapture : DiagnosticCodes.SpecificationDocumentWithoutSpecification;\n context.error(code, `Document must contain at least one ${keyword}`, context.start);\n }\n const roots = keyword === 'specification' && examples.length > 0 ? value.map(node => ({ ...node, examples })) : value;\n if (keyword === 'specification') {\n const application = parseApplication(sourceContext([], path, languages), [], documentPlacement);\n validateSpecificationCases({ ...application, examples }, context, roots as unknown as SpecificationSyntax[]);\n }\n return { value: roots, diagnostics: context.diagnostics, success: !context.diagnostics.some(diagnostic => diagnostic.severity === 'error') };\n}\n"],"mappings":"A,yqFAyEA,SAAgB,kBAAkB,EAAgB,EAAe,EAA2BE,EAAmB,EAA4B,GAAM,EAA4C,EAA0a,CACnmB,IAAMC,EAAQC,EAAWC,EAAQ,GAAOC,CAAI,EACtCC,EAAUC,EAAcL,EAAOG,EAAMG,CAAS,EACpD,EAAQ,MAAQC,EAChB,EAAQ,qBAAuBC,EAAoBR,CAAK,EACxD,EAAQ,iBAAmBS,GAAoBC,EAAwB,QAAQ,CAACV,CAAK,EAAGO,EAAWD,CAAS,EAC5G,IAAIK,EAAQC,EAAiBR,EAASJ,EAAOO,CAAS,EAGtD,GAFAM,EAA6BF,EAAOP,CAAO,EAEvCU,EAA2B,CAC3BC,EAA4BJ,EAAOP,CAAO,EAC1CY,EAAiBL,EAAOP,CAAO,EAC/Ba,EAAiBN,EAAOP,CAAO,EAC/Bc,EAAqBP,EAAOP,CAAO,EACnCe,EAA6BR,EAAOP,CAAO,EAC3CgB,EAAmBT,EAAOP,CAAO,EACjCiB,EAAyBV,EAAOP,CAAO,EACvCkB,EAA2BX,EAAOP,CAAO,EACzCmB,EAAkCZ,EAAOP,EAAS,EAAI,EACtD,IAAMoB,EAAYC,EAA4Bd,CAAK,EACnDe,EAAkBF,EAAWpB,CAAO,EACpCuB,EAAqBhB,EAAOP,CAAO,EACnCwB,EAA0BjB,EAAOP,CAAO,EACxCyB,EAA6BL,EAAWpB,CAAO,EAC/C0B,EAAsBnB,EAAOP,CAAO,EACpC2B,EAAsBpB,EAAOP,CAAO,EACpC4B,EAA6BrB,EAAOP,CAAO,EAC3C6B,EAAyBtB,EAAOP,CAAO,EACvC8B,EAAgCvB,EAAOP,CAAO,EAC9C+B,EAAuBxB,EAAOP,CAAO,EACrCgC,EAAuBzB,EAAOP,CAAO,EACrC,EAAQiC,EAA+B1B,EAAOP,CAAO,EACrDkC,EAAqB,SAAS3B,EAAOP,CAAO,EAC5C,IAAK,IAAMmC,KAAcC,EAAiC7B,CAAK,EAAGP,EAAQ,YAAYmC,EAAW,KAAMA,EAAW,QAASA,EAAW,QAAQ,EAC9I,IAAK,IAAMA,KAAcE,EAAyB9B,CAAK,EAAGP,EAAQ,YAAYmC,EAAW,KAAMA,EAAW,QAASA,EAAW,QAAQ,CAC1I,CACA,MAAO,CACH,QACA,YAAanC,EAAQ,YACrB,YAAaA,EAAQ,YACrB,UAAWA,EAAQ,UACnB,mBAAoBA,EAAQ,mBAC5B,oBAAqBA,EAAQ,oBAC7B,qBAAsBA,EAAQ,qBAC9B,gBAAiBA,EAAQ,gBACzB,QAAS,CAACA,EAAQ,YAAY,KAAK,GAAcmC,EAAW,WAAa,OAAO,CACpF,CACJ,CAmBA,SAAgB,gBAAgB,EAAgB,EAAe,EAAqD,CAChH,IAAMvC,EAAQC,EAAWC,EAAQ,GAAOC,CAAI,EAC5C,OAAON,EAAkBQ,EAAcL,EAAOG,EAAMG,CAAS,CAAC,CAClE,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionSubjectInvariants.js","names":["node","action","InvalidSyntaxJson","validateCollection","subject"],"sources":["../../../../../../Compiler/Syntax/ActionSubjectInvariants.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 { InvalidSyntaxJson } from './InvalidSyntaxJson';\nimport { ScreenActionSyntax, ScreenGuardedActionSyntax, ToolbarItemSyntax } from './Screens';\nimport { SyntaxNode } from './SyntaxNode';\n\nexport function validateActionSubject(node: SyntaxNode, validateCollection: (value: unknown, kind: string, message: string) => void): void {\n if (!['ScreenActionSyntax', 'ScreenGuardedActionSyntax', 'ToolbarItemSyntax'].includes(node.kind)) return;\n const action = node as ScreenActionSyntax | ScreenGuardedActionSyntax | ToolbarItemSyntax;\n if (!isValidActionSubject(action.subject)) throw new InvalidSyntaxJson('An action subject must be Item or Screen.');\n if (hasInapplicableToolbarSubject(action)) throw new InvalidSyntaxJson('Only an action toolbar item can have a subject.');\n if (action.kind === 'ScreenActionSyntax' && action.inputs !== undefined) validateCollection(action.inputs, 'InteractionArgumentSyntax', 'Action inputs must be a collection of arguments.');\n}\n\nfunction isValidActionSubject(subject: unknown): boolean {\n return subject == null || subject === 'Item' || subject === 'Screen';\n}\n\nfunction hasInapplicableToolbarSubject(action: ScreenActionSyntax | ScreenGuardedActionSyntax | ToolbarItemSyntax): boolean {\n return action.kind === 'ToolbarItemSyntax' && action.subject != null && action.syntaxKind !== 'Action';\n}\n"],"mappings":"gHAOA,SAAgB,sBAAsB,EAAkB,EAAmF,CACvI,GAAI,CAAC,CAAC,qBAAsB,4BAA6B,mBAAmB,CAAC,CAAC,SAASA,EAAK,IAAI,EAAG,OACnG,IAAMC,EAASD,EACf,GAAI,CAAC,qBAAqBC,EAAO,OAAO,EAAG,MAAM,IAAIC,EAAkB,2CAA2C,EAClH,GAAI,8BAA8BD,CAAM,EAAG,MAAM,IAAIC,EAAkB,iDAAiD,EACpHD,EAAO,OAAS,sBAAwBA,EAAO,SAAW,IAAA,IAAWE,EAAmBF,EAAO,OAAQ,4BAA6B,kDAAkD,CAC9L,CAEA,SAAS,qBAAqB,EAA2B,CACrD,OAAOG,GAAW,MAAQA,IAAY,QAAUA,IAAY,QAChE,CAEA,SAAS,8BAA8B,EAAqF,CACxH,OAAOH,EAAO,OAAS,qBAAuBA,EAAO,SAAW,MAAQA,EAAO,aAAe,QAClG"}
|
|
1
|
+
{"version":3,"file":"ActionSubjectInvariants.js","names":["node","action","InvalidSyntaxJson","validateCollection","subject"],"sources":["../../../../../../Compiler/Syntax/ActionSubjectInvariants.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 { InvalidSyntaxJson } from './InvalidSyntaxJson';\nimport { ScreenActionSyntax, ScreenGuardedActionSyntax, ToolbarItemSyntax } from './Screens';\nimport { SyntaxNode } from './SyntaxNode';\n\nexport function validateActionSubject(node: SyntaxNode, validateCollection: (value: unknown, kind: string, message: string) => void): void {\n if (!['ScreenActionSyntax', 'ScreenGuardedActionSyntax', 'ToolbarItemSyntax'].includes(node.kind)) return;\n const action = node as ScreenActionSyntax | ScreenGuardedActionSyntax | ToolbarItemSyntax;\n if (!isValidActionSubject(action.subject)) throw new InvalidSyntaxJson('An action subject must be Item or Screen.');\n if (hasInapplicableToolbarSubject(action)) throw new InvalidSyntaxJson('Only an action toolbar item can have a subject.');\n if (action.kind === 'ScreenActionSyntax' && action.inputs !== undefined) validateCollection(action.inputs, 'InteractionArgumentSyntax', 'Action inputs must be a collection of arguments.');\n}\n\nfunction isValidActionSubject(subject: unknown): boolean {\n return subject == null || subject === 'Item' || subject === 'Screen';\n}\n\nfunction hasInapplicableToolbarSubject(action: ScreenActionSyntax | ScreenGuardedActionSyntax | ToolbarItemSyntax): boolean {\n return action.kind === 'ToolbarItemSyntax' && action.subject != null && action.syntaxKind !== 'Action';\n}\n"],"mappings":"A,gHAOA,SAAgB,sBAAsB,EAAkB,EAAmF,CACvI,GAAI,CAAC,CAAC,qBAAsB,4BAA6B,mBAAmB,CAAC,CAAC,SAASA,EAAK,IAAI,EAAG,OACnG,IAAMC,EAASD,EACf,GAAI,CAAC,qBAAqBC,EAAO,OAAO,EAAG,MAAM,IAAIC,EAAkB,2CAA2C,EAClH,GAAI,8BAA8BD,CAAM,EAAG,MAAM,IAAIC,EAAkB,iDAAiD,EACpHD,EAAO,OAAS,sBAAwBA,EAAO,SAAW,IAAA,IAAWE,EAAmBF,EAAO,OAAQ,4BAA6B,kDAAkD,CAC9L,CAEA,SAAS,qBAAqB,EAA2B,CACrD,OAAOG,GAAW,MAAQA,IAAY,QAAUA,IAAY,QAChE,CAEA,SAAS,8BAA8B,EAAqF,CACxH,OAAOH,EAAO,OAAS,qBAAuBA,EAAO,SAAW,MAAQA,EAAO,aAAe,QAClG,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthoringProductionResolver.js","names":["feature","features","scope","parent","slice","application","module","events","event","eventDeclarations","generations","logicalEvents","latest","node","operationDeclarations","declarations","entry","named","cache","cached","reference","resolution","candidates","production","candidate","segments","segment","qualifiers","index","value","depth","from","visible"],"sources":["../../../../../../Compiler/Syntax/AuthoringProductionResolver.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 { eventDeclarations } from './EventDeclarations';\nimport { EventSyntax } from './Declarations';\nimport { operationDeclarations } from './Operations';\nimport { ProducesSyntax } from './Reactions';\nimport { ApplicationSyntax, FeatureSyntax, SliceSyntax } from './Structure';\n\nimport { AuthoringProductionKind } from './AuthoringProductionKind';\nimport { AuthoringProductionDeclaration } from './AuthoringProductionDeclaration';\nimport { AuthoringProductionResolution } from './AuthoringProductionResolution';\n\nexport { AuthoringProductionKind } from './AuthoringProductionKind';\nexport type { AuthoringProductionDeclaration } from './AuthoringProductionDeclaration';\nexport type { AuthoringProductionResolution } from './AuthoringProductionResolution';\n\nexport class AuthoringProductionResolver {\n readonly declarations: AuthoringProductionDeclaration[] = [];\n readonly slices: { slice: SliceSyntax; scope: readonly string[] }[] = [];\n private readonly byName = new Map<string, AuthoringProductionDeclaration[]>();\n private readonly scopes = new Map<SliceSyntax, readonly string[]>();\n private readonly resolutions = new Map<SliceSyntax, Map<string, AuthoringProductionResolution>>();\n\n constructor(application: ApplicationSyntax, declarations?: readonly AuthoringProductionDeclaration[]) {\n const collect = (features: readonly FeatureSyntax[], parent: readonly string[]): void => {\n for (const feature of features) {\n const scope = [...parent, feature.name];\n for (const slice of feature.slices) this.slices.push({ slice, scope: [...scope, slice.name] });\n collect(feature.features, scope);\n }\n };\n application.modules.forEach(module => collect(module.features, [module.name]));\n for (const { slice, scope } of this.slices) {\n this.scopes.set(slice, scope);\n const events = new Map<string, EventSyntax[]>();\n for (const event of eventDeclarations(slice)) {\n const generations = events.get(event.name) ?? [];\n generations.push(event);\n events.set(event.name, generations);\n }\n // Historical shapes are one logical contract. Duplicate generations remain\n // competing declarations; never erase invalid collision evidence.\n const logicalEvents = [...events.values()].flatMap(generations => new Set(generations.map(event => event.generation)).size !== generations.length\n ? generations : [generations.reduce((latest, event) => latest.generation >= event.generation ? latest : event)]);\n this.declarations.push(...logicalEvents.map(node => ({ kind: AuthoringProductionKind.Event as const, name: node.name, node, scope })),\n ...operationDeclarations(slice).map(node => ({ kind: AuthoringProductionKind.Operation as const, name: node.name, node, scope })));\n }\n if (declarations !== undefined) this.declarations.splice(0, this.declarations.length, ...declarations);\n for (const entry of this.declarations) {\n const named = this.byName.get(entry.name) ?? [];\n named.push(entry);\n this.byName.set(entry.name, named);\n }\n }\n\n resolve(reference: string, slice: SliceSyntax): AuthoringProductionResolution {\n const scope = this.scopes.get(slice);\n if (scope === undefined) return { kind: AuthoringProductionKind.Unresolved, declaration: null, candidates: [] };\n const cache = this.resolutions.get(slice) ?? new Map<string, AuthoringProductionResolution>();\n const cached = cache.get(reference);\n if (cached !== undefined) return cached;\n const resolution = this.resolveFromScope(reference, scope);\n cache.set(reference, resolution);\n this.resolutions.set(slice, cache);\n return resolution;\n }\n\n resolveFromScope(reference: string, scope: readonly string[]): AuthoringProductionResolution {\n const candidates = this.candidates(reference, scope);\n return candidates.length === 1\n ? { kind: candidates[0].kind, declaration: candidates[0], candidates: [] }\n : { kind: candidates.length === 0 ? AuthoringProductionKind.Unresolved : AuthoringProductionKind.Ambiguous, declaration: null, candidates };\n }\n\n isOperation(production: ProducesSyntax, slice: SliceSyntax): boolean {\n return production.inlineOperation != null || this.resolve(production.event, slice).kind === AuthoringProductionKind.Operation;\n }\n\n isEventProduction(production: ProducesSyntax, slice: SliceSyntax): boolean {\n if (production.inlineOperation != null) return false;\n const resolution = this.resolve(production.event, slice);\n return resolution.kind !== AuthoringProductionKind.Operation && !(resolution.kind === AuthoringProductionKind.Ambiguous && resolution.candidates.some(candidate => candidate.kind === AuthoringProductionKind.Operation));\n }\n\n private candidates(reference: string, from: readonly string[]): AuthoringProductionDeclaration[] {\n const segments = reference.split('.').filter(segment => segment.length > 0);\n if (segments.length === 0) return [];\n const named = this.byName.get(segments.at(-1)!) ?? [];\n const qualifiers = segments.slice(0, -1);\n if (qualifiers.length > 0) return named.filter(entry => qualifiers.length <= entry.scope.length && qualifiers.every((value, index) => entry.scope[entry.scope.length - qualifiers.length + index] === value));\n for (let depth = from.length; depth >= 0; depth--) {\n const visible = named.filter(entry => depth <= entry.scope.length && from.slice(0, depth).every((value, index) => entry.scope[index] === value));\n if (visible.length > 0) return visible;\n }\n return [];\n }\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"AuthoringProductionResolver.js","names":["feature","features","scope","parent","slice","application","module","events","event","eventDeclarations","generations","logicalEvents","latest","node","operationDeclarations","declarations","entry","named","cache","cached","reference","resolution","candidates","production","candidate","segments","segment","qualifiers","index","value","depth","from","visible"],"sources":["../../../../../../Compiler/Syntax/AuthoringProductionResolver.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 { eventDeclarations } from './EventDeclarations';\nimport { EventSyntax } from './Declarations';\nimport { operationDeclarations } from './Operations';\nimport { ProducesSyntax } from './Reactions';\nimport { ApplicationSyntax, FeatureSyntax, SliceSyntax } from './Structure';\n\nimport { AuthoringProductionKind } from './AuthoringProductionKind';\nimport { AuthoringProductionDeclaration } from './AuthoringProductionDeclaration';\nimport { AuthoringProductionResolution } from './AuthoringProductionResolution';\n\nexport { AuthoringProductionKind } from './AuthoringProductionKind';\nexport type { AuthoringProductionDeclaration } from './AuthoringProductionDeclaration';\nexport type { AuthoringProductionResolution } from './AuthoringProductionResolution';\n\nexport class AuthoringProductionResolver {\n readonly declarations: AuthoringProductionDeclaration[] = [];\n readonly slices: { slice: SliceSyntax; scope: readonly string[] }[] = [];\n private readonly byName = new Map<string, AuthoringProductionDeclaration[]>();\n private readonly scopes = new Map<SliceSyntax, readonly string[]>();\n private readonly resolutions = new Map<SliceSyntax, Map<string, AuthoringProductionResolution>>();\n\n constructor(application: ApplicationSyntax, declarations?: readonly AuthoringProductionDeclaration[]) {\n const collect = (features: readonly FeatureSyntax[], parent: readonly string[]): void => {\n for (const feature of features) {\n const scope = [...parent, feature.name];\n for (const slice of feature.slices) this.slices.push({ slice, scope: [...scope, slice.name] });\n collect(feature.features, scope);\n }\n };\n application.modules.forEach(module => collect(module.features, [module.name]));\n for (const { slice, scope } of this.slices) {\n this.scopes.set(slice, scope);\n const events = new Map<string, EventSyntax[]>();\n for (const event of eventDeclarations(slice)) {\n const generations = events.get(event.name) ?? [];\n generations.push(event);\n events.set(event.name, generations);\n }\n // Historical shapes are one logical contract. Duplicate generations remain\n // competing declarations; never erase invalid collision evidence.\n const logicalEvents = [...events.values()].flatMap(generations => new Set(generations.map(event => event.generation)).size !== generations.length\n ? generations : [generations.reduce((latest, event) => latest.generation >= event.generation ? latest : event)]);\n this.declarations.push(...logicalEvents.map(node => ({ kind: AuthoringProductionKind.Event as const, name: node.name, node, scope })),\n ...operationDeclarations(slice).map(node => ({ kind: AuthoringProductionKind.Operation as const, name: node.name, node, scope })));\n }\n if (declarations !== undefined) this.declarations.splice(0, this.declarations.length, ...declarations);\n for (const entry of this.declarations) {\n const named = this.byName.get(entry.name) ?? [];\n named.push(entry);\n this.byName.set(entry.name, named);\n }\n }\n\n resolve(reference: string, slice: SliceSyntax): AuthoringProductionResolution {\n const scope = this.scopes.get(slice);\n if (scope === undefined) return { kind: AuthoringProductionKind.Unresolved, declaration: null, candidates: [] };\n const cache = this.resolutions.get(slice) ?? new Map<string, AuthoringProductionResolution>();\n const cached = cache.get(reference);\n if (cached !== undefined) return cached;\n const resolution = this.resolveFromScope(reference, scope);\n cache.set(reference, resolution);\n this.resolutions.set(slice, cache);\n return resolution;\n }\n\n resolveFromScope(reference: string, scope: readonly string[]): AuthoringProductionResolution {\n const candidates = this.candidates(reference, scope);\n return candidates.length === 1\n ? { kind: candidates[0].kind, declaration: candidates[0], candidates: [] }\n : { kind: candidates.length === 0 ? AuthoringProductionKind.Unresolved : AuthoringProductionKind.Ambiguous, declaration: null, candidates };\n }\n\n isOperation(production: ProducesSyntax, slice: SliceSyntax): boolean {\n return production.inlineOperation != null || this.resolve(production.event, slice).kind === AuthoringProductionKind.Operation;\n }\n\n isEventProduction(production: ProducesSyntax, slice: SliceSyntax): boolean {\n if (production.inlineOperation != null) return false;\n const resolution = this.resolve(production.event, slice);\n return resolution.kind !== AuthoringProductionKind.Operation && !(resolution.kind === AuthoringProductionKind.Ambiguous && resolution.candidates.some(candidate => candidate.kind === AuthoringProductionKind.Operation));\n }\n\n private candidates(reference: string, from: readonly string[]): AuthoringProductionDeclaration[] {\n const segments = reference.split('.').filter(segment => segment.length > 0);\n if (segments.length === 0) return [];\n const named = this.byName.get(segments.at(-1)!) ?? [];\n const qualifiers = segments.slice(0, -1);\n if (qualifiers.length > 0) return named.filter(entry => qualifiers.length <= entry.scope.length && qualifiers.every((value, index) => entry.scope[entry.scope.length - qualifiers.length + index] === value));\n for (let depth = from.length; depth >= 0; depth--) {\n const visible = named.filter(entry => depth <= entry.scope.length && from.slice(0, depth).every((value, index) => entry.scope[index] === value));\n if (visible.length > 0) return visible;\n }\n return [];\n }\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaptureEventsSource.js","names":["eventsSourceKind","fromSetting","source","setting"],"sources":["../../../../../../Compiler/Syntax/CaptureEventsSource.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 { CaptureSourceSettingSyntax, CaptureSourceSyntax } from './Captures';\n\n/** The source kind of a capture that reads the public events of another application. */\nexport const eventsSourceKind = 'events';\n\n/** The setting that names one consumed event. */\nexport const fromSetting = 'from';\n\n/** Gets whether a capture source is `source events`. */\nexport function isEventsSource(source: CaptureSourceSyntax): boolean {\n return source.syntaxKind === eventsSourceKind;\n}\n\n/** Gets the `from <Event>` settings of an events source, in source order; empty for any other source. */\nexport function consumedEvents(source: CaptureSourceSyntax): readonly CaptureSourceSettingSyntax[] {\n return isEventsSource(source) ? source.settings.filter(setting => setting.name === fromSetting) : [];\n}\n"],"mappings":"qDAMA,MAAaA,EAAmB,SAGnBC,EAAc,OAG3B,SAAgB,eAAe,EAAsC,CACjE,OAAOC,EAAO,aAAeF,CACjC,CAGA,SAAgB,eAAe,EAAoE,CAC/F,OAAO,eAAeE,CAAM,EAAIA,EAAO,SAAS,OAAO,GAAWC,EAAQ,OAASF,CAAW,EAAI,CAAC,CACvG"}
|
|
1
|
+
{"version":3,"file":"CaptureEventsSource.js","names":["eventsSourceKind","fromSetting","source","setting"],"sources":["../../../../../../Compiler/Syntax/CaptureEventsSource.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 { CaptureSourceSettingSyntax, CaptureSourceSyntax } from './Captures';\n\n/** The source kind of a capture that reads the public events of another application. */\nexport const eventsSourceKind = 'events';\n\n/** The setting that names one consumed event. */\nexport const fromSetting = 'from';\n\n/** Gets whether a capture source is `source events`. */\nexport function isEventsSource(source: CaptureSourceSyntax): boolean {\n return source.syntaxKind === eventsSourceKind;\n}\n\n/** Gets the `from <Event>` settings of an events source, in source order; empty for any other source. */\nexport function consumedEvents(source: CaptureSourceSyntax): readonly CaptureSourceSettingSyntax[] {\n return isEventsSource(source) ? source.settings.filter(setting => setting.name === fromSetting) : [];\n}\n"],"mappings":"A,qDAMA,MAAaA,EAAmB,SAGnBC,EAAc,OAG3B,SAAgB,eAAe,EAAsC,CACjE,OAAOC,EAAO,aAAeF,CACjC,CAGA,SAAgB,eAAe,EAAoE,CAC/F,OAAO,eAAeE,CAAM,EAAIA,EAAO,SAAS,OAAO,GAAWC,EAAQ,OAASF,CAAW,EAAI,CAAC,CACvG,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencySources.js","names":["dependencySources","node"],"sources":["../../../../../../Compiler/Syntax/DependencySources.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 { ConcurrencySyntax } from './ConcurrencySyntax';\nimport { ReadsSyntax } from './ReadsSyntax';\nimport { ReducerSyntax } from './ReducerSyntax';\nimport { TriggerDataSyntax } from './TriggerDataSyntax';\nimport { SyntaxNode } from './SyntaxNode';\n\nexport type { ConcurrencySyntax } from './ConcurrencySyntax';\nexport type { ReadsSyntax } from './ReadsSyntax';\nexport type { ReducerSyntax } from './ReducerSyntax';\nexport type { ReducerRuleSyntax } from './ReducerRuleSyntax';\nexport type { FormSyntax } from './FormSyntax';\nexport type { FormPopulateViaQuerySyntax } from './FormPopulateViaQuerySyntax';\nexport type { TriggerDataSyntax } from './TriggerDataSyntax';\n\nexport interface DependencySources {\n readonly implementation?: boolean;\n readonly data?: readonly TriggerDataSyntax[];\n readonly reads?: readonly ReadsSyntax[];\n readonly concurrency?: ConcurrencySyntax | null;\n readonly reducers?: readonly ReducerSyntax[];\n}\n\n// These formerly opaque constructs are captured only for explicit syntax references, not realization.\n// Keep their partial payloads outside the narrowed wire contract and existing walker/board consumers.\n// Nodes and member names follow C#; none of this metadata claims executable admission.\nexport const dependencySources = new WeakMap<SyntaxNode, DependencySources>();\nexport const dependencySourcesOf = (node: SyntaxNode): DependencySources => dependencySources.get(node) ?? {};\n"],"mappings":"qDA4BA,MAAaA,kBAAoB,IAAI,QACxB,oBAAuB,GAAwCA,EAAkB,IAAIC,CAAI,GAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"DependencySources.js","names":["dependencySources","node"],"sources":["../../../../../../Compiler/Syntax/DependencySources.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 { ConcurrencySyntax } from './ConcurrencySyntax';\nimport { ReadsSyntax } from './ReadsSyntax';\nimport { ReducerSyntax } from './ReducerSyntax';\nimport { TriggerDataSyntax } from './TriggerDataSyntax';\nimport { SyntaxNode } from './SyntaxNode';\n\nexport type { ConcurrencySyntax } from './ConcurrencySyntax';\nexport type { ReadsSyntax } from './ReadsSyntax';\nexport type { ReducerSyntax } from './ReducerSyntax';\nexport type { ReducerRuleSyntax } from './ReducerRuleSyntax';\nexport type { FormSyntax } from './FormSyntax';\nexport type { FormPopulateViaQuerySyntax } from './FormPopulateViaQuerySyntax';\nexport type { TriggerDataSyntax } from './TriggerDataSyntax';\n\nexport interface DependencySources {\n readonly implementation?: boolean;\n readonly data?: readonly TriggerDataSyntax[];\n readonly reads?: readonly ReadsSyntax[];\n readonly concurrency?: ConcurrencySyntax | null;\n readonly reducers?: readonly ReducerSyntax[];\n}\n\n// These formerly opaque constructs are captured only for explicit syntax references, not realization.\n// Keep their partial payloads outside the narrowed wire contract and existing walker/board consumers.\n// Nodes and member names follow C#; none of this metadata claims executable admission.\nexport const dependencySources = new WeakMap<SyntaxNode, DependencySources>();\nexport const dependencySourcesOf = (node: SyntaxNode): DependencySources => dependencySources.get(node) ?? {};\n"],"mappings":"A,qDA4BA,MAAaA,kBAAoB,IAAI,QACxB,oBAAuB,GAAwCA,EAAkB,IAAIC,CAAI,GAAK,CAAC,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventDeclarations.js","names":["slice","command","produced"],"sources":["../../../../../../Compiler/Syntax/EventDeclarations.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 { EventSyntax } from './Declarations';\nimport { SliceSyntax } from './Structure';\n\n// An inline event belongs to its slice, not its command. Keep the authored tree intact.\nexport function eventDeclarations(slice: SliceSyntax): readonly EventSyntax[] {\n return [...slice.events, ...slice.commands.flatMap(command => command.produces).flatMap(produced => produced.inlineEvent === null ? [] : [produced.inlineEvent])];\n}\n"],"mappings":"qDAOA,SAAgB,kBAAkB,EAA4C,CAC1E,MAAO,CAAC,GAAGA,EAAM,OAAQ,GAAGA,EAAM,SAAS,QAAQ,GAAWC,EAAQ,QAAQ,CAAC,CAAC,QAAQ,GAAYC,EAAS,cAAgB,KAAO,CAAC,EAAI,CAACA,EAAS,WAAW,CAAC,CAAC,CACpK"}
|
|
1
|
+
{"version":3,"file":"EventDeclarations.js","names":["slice","command","produced"],"sources":["../../../../../../Compiler/Syntax/EventDeclarations.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 { EventSyntax } from './Declarations';\nimport { SliceSyntax } from './Structure';\n\n// An inline event belongs to its slice, not its command. Keep the authored tree intact.\nexport function eventDeclarations(slice: SliceSyntax): readonly EventSyntax[] {\n return [...slice.events, ...slice.commands.flatMap(command => command.produces).flatMap(produced => produced.inlineEvent === null ? [] : [produced.inlineEvent])];\n}\n"],"mappings":"A,qDAOA,SAAgB,kBAAkB,EAA4C,CAC1E,MAAO,CAAC,GAAGA,EAAM,OAAQ,GAAGA,EAAM,SAAS,QAAQ,GAAWC,EAAQ,QAAQ,CAAC,CAAC,QAAQ,GAAYC,EAAS,cAAgB,KAAO,CAAC,EAAI,CAACA,EAAS,WAAW,CAAC,CAAC,CACpK,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventSourceCatalog.js","names":["source","application","type","sources","streams","parent","candidate","stream","kind"],"sources":["../../../../../../Compiler/Syntax/EventSourceCatalog.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 { EventSourceSyntax, EventSourceResolution, EventSourceResolutionKind } from './EventSources';\nimport { ApplicationSyntax } from './Structure';\n\nexport { type EventSourceResolution, EventSourceResolutionKind } from './EventSources';\n// Exact application/source/local-name keys only. Paths identify physical occurrences, not semantic ids.\nexport class EventSourceCatalog {\n private readonly sources = new Map<string, EventSourceSyntax[]>();\n private readonly otherNames: ReadonlySet<string>;\n\n constructor(application: ApplicationSyntax) {\n for (const source of application.eventSources ?? []) this.sources.set(source.name, [...this.sources.get(source.name) ?? [], source]);\n this.otherNames = new Set([...application.concepts, ...application.types].map(type => type.name));\n }\n\n resolve(source: string, stream?: string): EventSourceResolution {\n const sources = this.sources.get(source) ?? [];\n const streams = sources.flatMap(parent => parent.streams).filter(candidate => candidate.name === stream);\n let kind: EventSourceResolutionKind;\n if (sources.length === 0) kind = this.otherNames.has(source) ? EventSourceResolutionKind.WrongKind : EventSourceResolutionKind.NotFound;\n else if (sources.length > 1 || streams.length > 1) kind = EventSourceResolutionKind.Ambiguous;\n else kind = stream === undefined || streams.length === 1 ? EventSourceResolutionKind.Unique : EventSourceResolutionKind.NotFound;\n return { kind, sources, streams };\n }\n}\n"],"mappings":"qDAQA,IAAa,mBAAb,KAAgC,CAC5B,wBAA2B,IAAI,IAC/B,WAEA,YAAY,EAAgC,CACxC,IAAK,IAAMA,KAAUC,EAAY,cAAgB,CAAC,EAAG,KAAK,QAAQ,IAAID,EAAO,KAAM,CAAC,GAAG,KAAK,QAAQ,IAAIA,EAAO,IAAI,GAAK,CAAC,EAAGA,CAAM,CAAC,EACnI,KAAK,WAAa,IAAI,IAAI,CAAC,GAAGC,EAAY,SAAU,GAAGA,EAAY,KAAK,CAAC,CAAC,IAAI,GAAQC,EAAK,IAAI,CAAC,CACpG,CAEA,QAAQ,EAAgB,EAAwC,CAC5D,IAAMC,EAAU,KAAK,QAAQ,IAAIH,CAAM,GAAK,CAAC,EACvCI,EAAUD,EAAQ,QAAQ,GAAUE,EAAO,OAAO,CAAC,CAAC,OAAO,GAAaC,EAAU,OAASC,CAAM,EACnGC,EAIJ,MAHA,CAEKA,EAFDL,EAAQ,SAAW,EAAU,KAAK,WAAW,IAAIH,CAAM,EAAA,YAAA,WAClDG,EAAQ,OAAS,GAAKC,EAAQ,OAAS,EAAG,YACvCG,IAAW,IAAA,IAAaH,EAAQ,SAAW,EAAA,SAAA,WAChD,CAAE,OAAM,UAAS,SAAQ,CACpC,CACJ"}
|
|
1
|
+
{"version":3,"file":"EventSourceCatalog.js","names":["source","application","type","sources","streams","parent","candidate","stream","kind"],"sources":["../../../../../../Compiler/Syntax/EventSourceCatalog.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 { EventSourceSyntax, EventSourceResolution, EventSourceResolutionKind } from './EventSources';\nimport { ApplicationSyntax } from './Structure';\n\nexport { type EventSourceResolution, EventSourceResolutionKind } from './EventSources';\n// Exact application/source/local-name keys only. Paths identify physical occurrences, not semantic ids.\nexport class EventSourceCatalog {\n private readonly sources = new Map<string, EventSourceSyntax[]>();\n private readonly otherNames: ReadonlySet<string>;\n\n constructor(application: ApplicationSyntax) {\n for (const source of application.eventSources ?? []) this.sources.set(source.name, [...this.sources.get(source.name) ?? [], source]);\n this.otherNames = new Set([...application.concepts, ...application.types].map(type => type.name));\n }\n\n resolve(source: string, stream?: string): EventSourceResolution {\n const sources = this.sources.get(source) ?? [];\n const streams = sources.flatMap(parent => parent.streams).filter(candidate => candidate.name === stream);\n let kind: EventSourceResolutionKind;\n if (sources.length === 0) kind = this.otherNames.has(source) ? EventSourceResolutionKind.WrongKind : EventSourceResolutionKind.NotFound;\n else if (sources.length > 1 || streams.length > 1) kind = EventSourceResolutionKind.Ambiguous;\n else kind = stream === undefined || streams.length === 1 ? EventSourceResolutionKind.Unique : EventSourceResolutionKind.NotFound;\n return { kind, sources, streams };\n }\n}\n"],"mappings":"A,qDAQA,IAAa,mBAAb,KAAgC,CAC5B,wBAA2B,IAAI,IAC/B,WAEA,YAAY,EAAgC,CACxC,IAAK,IAAMA,KAAUC,EAAY,cAAgB,CAAC,EAAG,KAAK,QAAQ,IAAID,EAAO,KAAM,CAAC,GAAG,KAAK,QAAQ,IAAIA,EAAO,IAAI,GAAK,CAAC,EAAGA,CAAM,CAAC,EACnI,KAAK,WAAa,IAAI,IAAI,CAAC,GAAGC,EAAY,SAAU,GAAGA,EAAY,KAAK,CAAC,CAAC,IAAI,GAAQC,EAAK,IAAI,CAAC,CACpG,CAEA,QAAQ,EAAgB,EAAwC,CAC5D,IAAMC,EAAU,KAAK,QAAQ,IAAIH,CAAM,GAAK,CAAC,EACvCI,EAAUD,EAAQ,QAAQ,GAAUE,EAAO,OAAO,CAAC,CAAC,OAAO,GAAaC,EAAU,OAASC,CAAM,EACnGC,EAIJ,MAHA,CAEKA,EAFDL,EAAQ,SAAW,EAAU,KAAK,WAAW,IAAIH,CAAM,EAAA,YAAA,WAClDG,EAAQ,OAAS,GAAKC,EAAQ,OAAS,EAAG,YACvCG,IAAW,IAAA,IAAaH,EAAQ,SAAW,EAAA,SAAA,WAChD,CAAE,OAAM,UAAS,SAAQ,CACpC,CACJ,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventSourceReadConfidence.js","names":["complete","entry","sources","diagnostics","diagnostic","parents","source","streams","stream","parent","child","ambiguous","incomplete","state","reasons"],"sources":["../../../../../../Compiler/Syntax/EventSourceReadConfidence.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 { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { EventSourceSyntax } from './EventSources';\n\n// Physical source-only read confidence; it never grants editing or executable identity.\nexport class EventSourceReadConfidence {\n private readonly sources = new Map<string, { source: EventSourceSyntax; placementResolved: boolean }[]>();\n\n constructor(sources: readonly { source: EventSourceSyntax; placementResolved: boolean }[], private readonly complete: boolean) {\n for (const entry of sources) this.sources.set(entry.source.name, [...this.sources.get(entry.source.name) ?? [], entry]);\n }\n\n static hasUnknownExtent(diagnostics: readonly Diagnostic[]) {\n return diagnostics.some(diagnostic => diagnostic.severity === 'error' && ['PLAY0001', 'PLAY0503', 'PLAY0164'].includes(diagnostic.code));\n }\n\n resolve(source: string, stream?: string) {\n const parents = this.sources.get(source) ?? [];\n const streams = stream === undefined ? [] : parents.flatMap(parent => parent.source.streams).filter(child => child.name === stream);\n const ambiguous = parents.length > 1 || streams.length > 1;\n const incomplete = !this.complete || parents.some(parent => !parent.placementResolved);\n const state = ambiguous ? 'ambiguous' : incomplete ? 'incomplete' : parents.length === 1 && (stream === undefined || streams.length === 1) ? 'unique' : 'notFound';\n const reasons: string[] = [];\n if (parents.length > 1) reasons.push('Multiple physical parent sources claim the exact name.');\n if (streams.length > 1) reasons.push('Multiple physical streams claim the exact parent and local name.');\n if (parents.some(parent => !parent.placementResolved)) reasons.push('A physical parent has unresolved import placement.');\n if (!this.complete) reasons.push('Physical source extent or placement is incomplete; missing declarations cannot be excluded.');\n return { state, sources: parents.map(parent => parent.source), streams, reasons };\n }\n}\n"],"mappings":"qDAOA,IAAa,0BAAb,KAAuC,CAGyE,SAF5G,wBAA2B,IAAI,IAE/B,YAAY,EAA+E,EAAoC,CAAnB,KAAA,SAAAA,EACxG,IAAK,IAAMC,KAASC,EAAS,KAAK,QAAQ,IAAID,EAAM,OAAO,KAAM,CAAC,GAAG,KAAK,QAAQ,IAAIA,EAAM,OAAO,IAAI,GAAK,CAAC,EAAGA,CAAK,CAAC,CAC1H,CAEA,OAAO,iBAAiB,EAAoC,CACxD,OAAOE,EAAY,KAAK,GAAcC,EAAW,WAAa,SAAW,CAAC,WAAY,WAAY,UAAU,CAAC,CAAC,SAASA,EAAW,IAAI,CAAC,CAC3I,CAEA,QAAQ,EAAgB,EAAiB,CACrC,IAAMC,EAAU,KAAK,QAAQ,IAAIC,CAAM,GAAK,CAAC,EACvCC,EAAUC,IAAW,IAAA,GAAY,CAAC,EAAIH,EAAQ,QAAQ,GAAUI,EAAO,OAAO,OAAO,CAAC,CAAC,OAAO,GAASC,EAAM,OAASF,CAAM,EAC5HG,EAAYN,EAAQ,OAAS,GAAKE,EAAQ,OAAS,EACnDK,EAAa,CAAC,KAAK,UAAYP,EAAQ,KAAK,GAAU,CAACI,EAAO,iBAAiB,EAC/EI,EAAQF,EAAY,YAAcC,EAAa,aAAeP,EAAQ,SAAW,IAAMG,IAAW,IAAA,IAAaD,EAAQ,SAAW,GAAK,SAAW,WAClJO,EAAoB,CAAC,EAK3B,OAJIT,EAAQ,OAAS,GAAGS,EAAQ,KAAK,wDAAwD,EACzFP,EAAQ,OAAS,GAAGO,EAAQ,KAAK,kEAAkE,EACnGT,EAAQ,KAAK,GAAU,CAACI,EAAO,iBAAiB,GAAGK,EAAQ,KAAK,oDAAoD,EACnH,KAAK,UAAUA,EAAQ,KAAK,6FAA6F,EACvH,CAAE,QAAO,QAAST,EAAQ,IAAI,GAAUI,EAAO,MAAM,EAAG,UAAS,SAAQ,CACpF,CACJ"}
|
|
1
|
+
{"version":3,"file":"EventSourceReadConfidence.js","names":["complete","entry","sources","diagnostics","diagnostic","parents","source","streams","stream","parent","child","ambiguous","incomplete","state","reasons"],"sources":["../../../../../../Compiler/Syntax/EventSourceReadConfidence.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 { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { EventSourceSyntax } from './EventSources';\n\n// Physical source-only read confidence; it never grants editing or executable identity.\nexport class EventSourceReadConfidence {\n private readonly sources = new Map<string, { source: EventSourceSyntax; placementResolved: boolean }[]>();\n\n constructor(sources: readonly { source: EventSourceSyntax; placementResolved: boolean }[], private readonly complete: boolean) {\n for (const entry of sources) this.sources.set(entry.source.name, [...this.sources.get(entry.source.name) ?? [], entry]);\n }\n\n static hasUnknownExtent(diagnostics: readonly Diagnostic[]) {\n return diagnostics.some(diagnostic => diagnostic.severity === 'error' && ['PLAY0001', 'PLAY0503', 'PLAY0164'].includes(diagnostic.code));\n }\n\n resolve(source: string, stream?: string) {\n const parents = this.sources.get(source) ?? [];\n const streams = stream === undefined ? [] : parents.flatMap(parent => parent.source.streams).filter(child => child.name === stream);\n const ambiguous = parents.length > 1 || streams.length > 1;\n const incomplete = !this.complete || parents.some(parent => !parent.placementResolved);\n const state = ambiguous ? 'ambiguous' : incomplete ? 'incomplete' : parents.length === 1 && (stream === undefined || streams.length === 1) ? 'unique' : 'notFound';\n const reasons: string[] = [];\n if (parents.length > 1) reasons.push('Multiple physical parent sources claim the exact name.');\n if (streams.length > 1) reasons.push('Multiple physical streams claim the exact parent and local name.');\n if (parents.some(parent => !parent.placementResolved)) reasons.push('A physical parent has unresolved import placement.');\n if (!this.complete) reasons.push('Physical source extent or placement is incomplete; missing declarations cannot be excluded.');\n return { state, sources: parents.map(parent => parent.source), streams, reasons };\n }\n}\n"],"mappings":"A,qDAOA,IAAa,0BAAb,KAAuC,CAGyE,SAF5G,wBAA2B,IAAI,IAE/B,YAAY,EAA+E,EAAoC,CAAnB,KAAA,SAAAA,EACxG,IAAK,IAAMC,KAASC,EAAS,KAAK,QAAQ,IAAID,EAAM,OAAO,KAAM,CAAC,GAAG,KAAK,QAAQ,IAAIA,EAAM,OAAO,IAAI,GAAK,CAAC,EAAGA,CAAK,CAAC,CAC1H,CAEA,OAAO,iBAAiB,EAAoC,CACxD,OAAOE,EAAY,KAAK,GAAcC,EAAW,WAAa,SAAW,CAAC,WAAY,WAAY,UAAU,CAAC,CAAC,SAASA,EAAW,IAAI,CAAC,CAC3I,CAEA,QAAQ,EAAgB,EAAiB,CACrC,IAAMC,EAAU,KAAK,QAAQ,IAAIC,CAAM,GAAK,CAAC,EACvCC,EAAUC,IAAW,IAAA,GAAY,CAAC,EAAIH,EAAQ,QAAQ,GAAUI,EAAO,OAAO,OAAO,CAAC,CAAC,OAAO,GAASC,EAAM,OAASF,CAAM,EAC5HG,EAAYN,EAAQ,OAAS,GAAKE,EAAQ,OAAS,EACnDK,EAAa,CAAC,KAAK,UAAYP,EAAQ,KAAK,GAAU,CAACI,EAAO,iBAAiB,EAC/EI,EAAQF,EAAY,YAAcC,EAAa,aAAeP,EAAQ,SAAW,IAAMG,IAAW,IAAA,IAAaD,EAAQ,SAAW,GAAK,SAAW,WAClJO,EAAoB,CAAC,EAK3B,OAJIT,EAAQ,OAAS,GAAGS,EAAQ,KAAK,wDAAwD,EACzFP,EAAQ,OAAS,GAAGO,EAAQ,KAAK,kEAAkE,EACnGT,EAAQ,KAAK,GAAU,CAACI,EAAO,iBAAiB,GAAGK,EAAQ,KAAK,oDAAoD,EACnH,KAAK,UAAUA,EAAQ,KAAK,6FAA6F,EACvH,CAAE,QAAO,QAAST,EAAQ,IAAI,GAAUI,EAAO,MAAM,EAAG,UAAS,SAAQ,CACpF,CACJ,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExactMathFacts.js","names":["number","parseExactNumber"],"sources":["../../../../../../Compiler/Syntax/ExactMathFacts.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 { ExactNumber, parseExactNumber } from './ExactNumber';\n\n/** A malformed or noncanonical explicitly typed exact numeric value. */\nexport class InvalidExactNumber extends Error {}\n\n/** Validates typed values again at programmatic boundaries; readonly interfaces alone are not admission. */\nexport function canonicalExactText(number: ExactNumber): string {\n if (number.literalType !== 'ExactNumber' || typeof number.value !== 'string'\n || parseExactNumber(number.value)?.value !== number.value) {\n throw new InvalidExactNumber('Expected a canonical, bounded ExactNumber value.');\n }\n return number.value;\n}\n\nexport function exactEqual(left: ExactNumber, right: ExactNumber): boolean {\n return canonicalExactText(left) === canonicalExactText(right);\n}\n\nexport function exactIsIntegral(number: ExactNumber): boolean {\n return !canonicalExactText(number).includes('.');\n}\n\n/** Compares bounded canonical decimal strings without JavaScript numeric conversion. */\nexport function exactCompare(left: ExactNumber, right: ExactNumber): number {\n const leftText = canonicalExactText(left);\n const rightText = canonicalExactText(right);\n if (leftText === rightText) return 0;\n const leftNegative = leftText.startsWith('-');\n const rightNegative = rightText.startsWith('-');\n if (leftNegative !== rightNegative) return leftNegative ? -1 : 1;\n const [leftInteger, leftFraction = ''] = (leftNegative ? leftText.substring(1) : leftText).split('.');\n const [rightInteger, rightFraction = ''] = (rightNegative ? rightText.substring(1) : rightText).split('.');\n const direction = leftNegative ? -1 : 1;\n if (leftInteger.length !== rightInteger.length) return (leftInteger.length < rightInteger.length ? -1 : 1) * direction;\n if (leftInteger !== rightInteger) return (leftInteger < rightInteger ? -1 : 1) * direction;\n const length = Math.max(leftFraction.length, rightFraction.length);\n return (leftFraction.padEnd(length, '0') < rightFraction.padEnd(length, '0') ? -1 : 1) * direction;\n}\n"],"mappings":"yGAMA,IAAa,mBAAb,cAAwC,KAAM,CAAC,EAG/C,SAAgB,mBAAmB,EAA6B,CAC5D,GAAIA,EAAO,cAAgB,eAAiB,OAAOA,EAAO,OAAU,UAC7DC,EAAiBD,EAAO,KAAK,CAAC,EAAE,QAAUA,EAAO,MACpD,MAAM,IAAI,mBAAmB,kDAAkD,EAEnF,OAAOA,EAAO,KAClB,CAMA,SAAgB,gBAAgB,EAA8B,CAC1D,MAAO,CAAC,mBAAmBA,CAAM,CAAC,CAAC,SAAS,GAAG,CACnD"}
|
|
1
|
+
{"version":3,"file":"ExactMathFacts.js","names":["number","parseExactNumber"],"sources":["../../../../../../Compiler/Syntax/ExactMathFacts.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 { ExactNumber, parseExactNumber } from './ExactNumber';\n\n/** A malformed or noncanonical explicitly typed exact numeric value. */\nexport class InvalidExactNumber extends Error {}\n\n/** Validates typed values again at programmatic boundaries; readonly interfaces alone are not admission. */\nexport function canonicalExactText(number: ExactNumber): string {\n if (number.literalType !== 'ExactNumber' || typeof number.value !== 'string'\n || parseExactNumber(number.value)?.value !== number.value) {\n throw new InvalidExactNumber('Expected a canonical, bounded ExactNumber value.');\n }\n return number.value;\n}\n\nexport function exactEqual(left: ExactNumber, right: ExactNumber): boolean {\n return canonicalExactText(left) === canonicalExactText(right);\n}\n\nexport function exactIsIntegral(number: ExactNumber): boolean {\n return !canonicalExactText(number).includes('.');\n}\n\n/** Compares bounded canonical decimal strings without JavaScript numeric conversion. */\nexport function exactCompare(left: ExactNumber, right: ExactNumber): number {\n const leftText = canonicalExactText(left);\n const rightText = canonicalExactText(right);\n if (leftText === rightText) return 0;\n const leftNegative = leftText.startsWith('-');\n const rightNegative = rightText.startsWith('-');\n if (leftNegative !== rightNegative) return leftNegative ? -1 : 1;\n const [leftInteger, leftFraction = ''] = (leftNegative ? leftText.substring(1) : leftText).split('.');\n const [rightInteger, rightFraction = ''] = (rightNegative ? rightText.substring(1) : rightText).split('.');\n const direction = leftNegative ? -1 : 1;\n if (leftInteger.length !== rightInteger.length) return (leftInteger.length < rightInteger.length ? -1 : 1) * direction;\n if (leftInteger !== rightInteger) return (leftInteger < rightInteger ? -1 : 1) * direction;\n const length = Math.max(leftFraction.length, rightFraction.length);\n return (leftFraction.padEnd(length, '0') < rightFraction.padEnd(length, '0') ? -1 : 1) * direction;\n}\n"],"mappings":"A,yGAMA,IAAa,mBAAb,cAAwC,KAAM,CAAC,EAG/C,SAAgB,mBAAmB,EAA6B,CAC5D,GAAIA,EAAO,cAAgB,eAAiB,OAAOA,EAAO,OAAU,UAC7DC,EAAiBD,EAAO,KAAK,CAAC,EAAE,QAAUA,EAAO,MACpD,MAAM,IAAI,mBAAmB,kDAAkD,EAEnF,OAAOA,EAAO,KAClB,CAMA,SAAgB,gBAAgB,EAA8B,CAC1D,MAAO,CAAC,mBAAmBA,CAAM,CAAC,CAAC,SAAS,GAAG,CACnD,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExactNumber.js","names":["scanned","text","digits","first","last","scale","appendedZeros","coefficient","normalizedScale","fixedPoint","negative","integerStart","position","integer","fraction","fractionStart","exponent","exponentNegative","exponentStart","limit","value"],"sources":["../../../../../../Compiler/Syntax/ExactNumber.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/** A lossless typed literal slot. The value is canonical fixed-point text, never a JavaScript number. */\nexport interface ExactNumber {\n readonly literalType: 'ExactNumber';\n readonly value: string;\n}\n\nconst maximumCoefficient = '79228162514264337593543950335';\n\ninterface ScannedNumber {\n readonly negative: boolean;\n readonly integer: string;\n readonly fraction: string;\n readonly exponent: number;\n}\n\n/** Reads a complete ASCII token in the normalized Decimal domain, without rounding or underflow. */\nexport function parseExactNumber(text: string): ExactNumber | undefined {\n const scanned = scan(text);\n if (scanned === undefined) return undefined;\n const digits = scanned.integer + scanned.fraction;\n let first = 0;\n while (first < digits.length && digits[first] === '0') first++;\n if (first === digits.length) return Object.freeze({ literalType: 'ExactNumber', value: '0' });\n let last = digits.length;\n while (digits[last - 1] === '0') last--;\n const scale = scanned.fraction.length - scanned.exponent - (digits.length - last);\n const appendedZeros = scale < 0 ? -scale : 0;\n if (scale > 28 || last - first + appendedZeros > maximumCoefficient.length) return undefined;\n // Only the bounded coefficient is materialized; the authored exponent never determines allocation.\n const coefficient = digits.substring(first, last) + '0'.repeat(appendedZeros);\n if (coefficient.length === maximumCoefficient.length && coefficient > maximumCoefficient) return undefined;\n const normalizedScale = Math.max(0, scale);\n const fixedPoint = normalizedScale === 0 ? coefficient\n : coefficient.length > normalizedScale\n ? `${coefficient.substring(0, coefficient.length - normalizedScale)}.${coefficient.substring(coefficient.length - normalizedScale)}`\n : `0.${'0'.repeat(normalizedScale - coefficient.length)}${coefficient}`;\n return Object.freeze({ literalType: 'ExactNumber', value: (scanned.negative ? '-' : '') + fixedPoint });\n}\n\n/** Recognizes the complete scalar grammar independently of representability. */\nexport function isExactNumberToken(text: string): boolean {\n return scan(text) !== undefined;\n}\n\nfunction scan(text: string): ScannedNumber | undefined {\n const negative = text.startsWith('-');\n const integerStart = negative ? 1 : 0;\n let position = integerStart;\n while (position < text.length && isDigit(text[position])) position++;\n if (position === integerStart) return undefined;\n const integer = text.substring(integerStart, position);\n let fraction = '';\n if (text[position] === '.') {\n const fractionStart = ++position;\n while (position < text.length && isDigit(text[position])) position++;\n if (position === fractionStart) return undefined;\n fraction = text.substring(fractionStart, position);\n }\n let exponent = 0;\n if (text[position] === 'e' || text[position] === 'E') {\n position++;\n const exponentNegative = text[position] === '-';\n if (text[position] === '+' || text[position] === '-') position++;\n const exponentStart = position;\n // Counts derived from this input cannot cancel an exponent beyond this bound.\n const limit = text.length + 29;\n while (position < text.length && isDigit(text[position])) {\n exponent = Math.min(limit, exponent * 10 + text.charCodeAt(position++) - 48);\n }\n if (position === exponentStart) return undefined;\n if (exponentNegative) exponent = -exponent;\n }\n return position === text.length ? { negative, integer, fraction, exponent } : undefined;\n}\n\nfunction isDigit(value: string): boolean {\n return value >= '0' && value <= '9';\n}\n"],"mappings":"qDAmBA,SAAgB,iBAAiB,EAAuC,CACpE,IAAMA,EAAU,KAAKC,CAAI,EACzB,GAAID,IAAY,IAAA,GAAW,OAC3B,IAAME,EAASF,EAAQ,QAAUA,EAAQ,SACrCG,EAAQ,EACZ,KAAOA,EAAQD,EAAO,QAAUA,EAAOC,KAAW,KAAK,IACvD,GAAIA,IAAUD,EAAO,OAAQ,OAAO,OAAO,OAAO,CAAE,YAAa,cAAe,MAAO,GAAI,CAAC,EAC5F,IAAIE,EAAOF,EAAO,OAClB,KAAOA,EAAOE,EAAO,KAAO,KAAK,IACjC,IAAMC,EAAQL,EAAQ,SAAS,OAASA,EAAQ,UAAYE,EAAO,OAASE,GACtEE,EAAgBD,EAAQ,EAAI,CAACA,EAAQ,EAC3C,GAAIA,EAAQ,IAAMD,EAAOD,EAAQG,EAAgB,GAA2B,OAE5E,IAAMC,EAAcL,EAAO,UAAUC,EAAOC,CAAI,EAAI,IAAI,OAAOE,CAAa,EAC5E,GAAIC,EAAY,SAAW,IAA6BA,EAAc,gCAAoB,OAC1F,IAAMC,EAAkB,KAAK,IAAI,EAAGH,CAAK,EACnCI,EAAaD,IAAoB,EAAID,EACrCA,EAAY,OAASC,EACjB,GAAGD,EAAY,UAAU,EAAGA,EAAY,OAASC,CAAe,EAAE,GAAGD,EAAY,UAAUA,EAAY,OAASC,CAAe,IAC/H,KAAK,IAAI,OAAOA,EAAkBD,EAAY,MAAM,IAAIA,IAClE,OAAO,OAAO,OAAO,CAAE,YAAa,cAAe,OAAQP,EAAQ,SAAW,IAAM,IAAMS,CAAW,CAAC,CAC1G,CAGA,SAAgB,mBAAmB,EAAuB,CACtD,OAAO,KAAKR,CAAI,IAAM,IAAA,EAC1B,CAEA,SAAS,KAAK,EAAyC,CACnD,IAAMS,EAAWT,EAAK,WAAW,GAAG,EAC9BU,EAAe,KACjBC,EAAWD,EACf,KAAOC,EAAWX,EAAK,QAAU,QAAQA,EAAKW,EAAS,GAAG,IAC1D,GAAIA,IAAaD,EAAc,OAC/B,IAAME,EAAUZ,EAAK,UAAUU,EAAcC,CAAQ,EACjDE,EAAW,GACf,GAAIb,EAAKW,KAAc,IAAK,CACxB,IAAMG,EAAgB,EAAEH,EACxB,KAAOA,EAAWX,EAAK,QAAU,QAAQA,EAAKW,EAAS,GAAG,IAC1D,GAAIA,IAAaG,EAAe,OAChC,EAAWd,EAAK,UAAUc,EAAeH,CAAQ,CACrD,CACA,IAAII,EAAW,EACf,GAAIf,EAAKW,KAAc,KAAOX,EAAKW,KAAc,IAAK,CAClD,IACA,IAAMK,EAAmBhB,EAAKW,KAAc,KACxCX,EAAKW,KAAc,KAAOX,EAAKW,KAAc,MAAK,IACtD,IAAMM,EAAgBN,EAEhBO,EAAQlB,EAAK,OAAS,GAC5B,KAAOW,EAAWX,EAAK,QAAU,QAAQA,EAAKW,EAAS,GACnD,EAAW,KAAK,IAAIO,EAAOH,EAAW,GAAKf,EAAK,WAAW,GAAU,EAAI,EAAE,EAE/E,GAAIW,IAAaM,EAAe,OAC5BD,IAAkB,EAAW,CAACD,EACtC,CACA,OAAOJ,IAAaX,EAAK,OAAS,CAAE,WAAU,UAAS,WAAU,UAAS,EAAI,IAAA,EAClF,CAEA,SAAS,QAAQ,EAAwB,CACrC,OAAOmB,GAAS,KAAOA,GAAS,GACpC"}
|
|
1
|
+
{"version":3,"file":"ExactNumber.js","names":["scanned","text","digits","first","last","scale","appendedZeros","coefficient","normalizedScale","fixedPoint","negative","integerStart","position","integer","fraction","fractionStart","exponent","exponentNegative","exponentStart","limit","value"],"sources":["../../../../../../Compiler/Syntax/ExactNumber.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/** A lossless typed literal slot. The value is canonical fixed-point text, never a JavaScript number. */\nexport interface ExactNumber {\n readonly literalType: 'ExactNumber';\n readonly value: string;\n}\n\nconst maximumCoefficient = '79228162514264337593543950335';\n\ninterface ScannedNumber {\n readonly negative: boolean;\n readonly integer: string;\n readonly fraction: string;\n readonly exponent: number;\n}\n\n/** Reads a complete ASCII token in the normalized Decimal domain, without rounding or underflow. */\nexport function parseExactNumber(text: string): ExactNumber | undefined {\n const scanned = scan(text);\n if (scanned === undefined) return undefined;\n const digits = scanned.integer + scanned.fraction;\n let first = 0;\n while (first < digits.length && digits[first] === '0') first++;\n if (first === digits.length) return Object.freeze({ literalType: 'ExactNumber', value: '0' });\n let last = digits.length;\n while (digits[last - 1] === '0') last--;\n const scale = scanned.fraction.length - scanned.exponent - (digits.length - last);\n const appendedZeros = scale < 0 ? -scale : 0;\n if (scale > 28 || last - first + appendedZeros > maximumCoefficient.length) return undefined;\n // Only the bounded coefficient is materialized; the authored exponent never determines allocation.\n const coefficient = digits.substring(first, last) + '0'.repeat(appendedZeros);\n if (coefficient.length === maximumCoefficient.length && coefficient > maximumCoefficient) return undefined;\n const normalizedScale = Math.max(0, scale);\n const fixedPoint = normalizedScale === 0 ? coefficient\n : coefficient.length > normalizedScale\n ? `${coefficient.substring(0, coefficient.length - normalizedScale)}.${coefficient.substring(coefficient.length - normalizedScale)}`\n : `0.${'0'.repeat(normalizedScale - coefficient.length)}${coefficient}`;\n return Object.freeze({ literalType: 'ExactNumber', value: (scanned.negative ? '-' : '') + fixedPoint });\n}\n\n/** Recognizes the complete scalar grammar independently of representability. */\nexport function isExactNumberToken(text: string): boolean {\n return scan(text) !== undefined;\n}\n\nfunction scan(text: string): ScannedNumber | undefined {\n const negative = text.startsWith('-');\n const integerStart = negative ? 1 : 0;\n let position = integerStart;\n while (position < text.length && isDigit(text[position])) position++;\n if (position === integerStart) return undefined;\n const integer = text.substring(integerStart, position);\n let fraction = '';\n if (text[position] === '.') {\n const fractionStart = ++position;\n while (position < text.length && isDigit(text[position])) position++;\n if (position === fractionStart) return undefined;\n fraction = text.substring(fractionStart, position);\n }\n let exponent = 0;\n if (text[position] === 'e' || text[position] === 'E') {\n position++;\n const exponentNegative = text[position] === '-';\n if (text[position] === '+' || text[position] === '-') position++;\n const exponentStart = position;\n // Counts derived from this input cannot cancel an exponent beyond this bound.\n const limit = text.length + 29;\n while (position < text.length && isDigit(text[position])) {\n exponent = Math.min(limit, exponent * 10 + text.charCodeAt(position++) - 48);\n }\n if (position === exponentStart) return undefined;\n if (exponentNegative) exponent = -exponent;\n }\n return position === text.length ? { negative, integer, fraction, exponent } : undefined;\n}\n\nfunction isDigit(value: string): boolean {\n return value >= '0' && value <= '9';\n}\n"],"mappings":"A,qDAmBA,SAAgB,iBAAiB,EAAuC,CACpE,IAAMA,EAAU,KAAKC,CAAI,EACzB,GAAID,IAAY,IAAA,GAAW,OAC3B,IAAME,EAASF,EAAQ,QAAUA,EAAQ,SACrCG,EAAQ,EACZ,KAAOA,EAAQD,EAAO,QAAUA,EAAOC,KAAW,KAAK,IACvD,GAAIA,IAAUD,EAAO,OAAQ,OAAO,OAAO,OAAO,CAAE,YAAa,cAAe,MAAO,GAAI,CAAC,EAC5F,IAAIE,EAAOF,EAAO,OAClB,KAAOA,EAAOE,EAAO,KAAO,KAAK,IACjC,IAAMC,EAAQL,EAAQ,SAAS,OAASA,EAAQ,UAAYE,EAAO,OAASE,GACtEE,EAAgBD,EAAQ,EAAI,CAACA,EAAQ,EAC3C,GAAIA,EAAQ,IAAMD,EAAOD,EAAQG,EAAgB,GAA2B,OAE5E,IAAMC,EAAcL,EAAO,UAAUC,EAAOC,CAAI,EAAI,IAAI,OAAOE,CAAa,EAC5E,GAAIC,EAAY,SAAW,IAA6BA,EAAc,gCAAoB,OAC1F,IAAMC,EAAkB,KAAK,IAAI,EAAGH,CAAK,EACnCI,EAAaD,IAAoB,EAAID,EACrCA,EAAY,OAASC,EACjB,GAAGD,EAAY,UAAU,EAAGA,EAAY,OAASC,CAAe,EAAE,GAAGD,EAAY,UAAUA,EAAY,OAASC,CAAe,IAC/H,KAAK,IAAI,OAAOA,EAAkBD,EAAY,MAAM,IAAIA,IAClE,OAAO,OAAO,OAAO,CAAE,YAAa,cAAe,OAAQP,EAAQ,SAAW,IAAM,IAAMS,CAAW,CAAC,CAC1G,CAGA,SAAgB,mBAAmB,EAAuB,CACtD,OAAO,KAAKR,CAAI,IAAM,IAAA,EAC1B,CAEA,SAAS,KAAK,EAAyC,CACnD,IAAMS,EAAWT,EAAK,WAAW,GAAG,EAC9BU,EAAe,KACjBC,EAAWD,EACf,KAAOC,EAAWX,EAAK,QAAU,QAAQA,EAAKW,EAAS,GAAG,IAC1D,GAAIA,IAAaD,EAAc,OAC/B,IAAME,EAAUZ,EAAK,UAAUU,EAAcC,CAAQ,EACjDE,EAAW,GACf,GAAIb,EAAKW,KAAc,IAAK,CACxB,IAAMG,EAAgB,EAAEH,EACxB,KAAOA,EAAWX,EAAK,QAAU,QAAQA,EAAKW,EAAS,GAAG,IAC1D,GAAIA,IAAaG,EAAe,OAChC,EAAWd,EAAK,UAAUc,EAAeH,CAAQ,CACrD,CACA,IAAII,EAAW,EACf,GAAIf,EAAKW,KAAc,KAAOX,EAAKW,KAAc,IAAK,CAClD,IACA,IAAMK,EAAmBhB,EAAKW,KAAc,KACxCX,EAAKW,KAAc,KAAOX,EAAKW,KAAc,MAAK,IACtD,IAAMM,EAAgBN,EAEhBO,EAAQlB,EAAK,OAAS,GAC5B,KAAOW,EAAWX,EAAK,QAAU,QAAQA,EAAKW,EAAS,GACnD,EAAW,KAAK,IAAIO,EAAOH,EAAW,GAAKf,EAAK,WAAW,GAAU,EAAI,EAAE,EAE/E,GAAIW,IAAaM,EAAe,OAC5BD,IAAkB,EAAW,CAACD,EACtC,CACA,OAAOJ,IAAaX,EAAK,OAAS,CAAE,WAAU,UAAS,WAAU,UAAS,EAAI,IAAA,EAClF,CAEA,SAAS,QAAQ,EAAwB,CACrC,OAAOmB,GAAS,KAAOA,GAAS,GACpC,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidSyntaxJson.js","names":[],"sources":["../../../../../../Compiler/Syntax/InvalidSyntaxJson.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\nexport class InvalidSyntaxJson extends Error {}\n"],"mappings":"qDAGA,IAAa,kBAAb,cAAuC,KAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"InvalidSyntaxJson.js","names":[],"sources":["../../../../../../Compiler/Syntax/InvalidSyntaxJson.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\nexport class InvalidSyntaxJson extends Error {}\n"],"mappings":"A,qDAGA,IAAa,kBAAb,cAAuC,KAAM,CAAC,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyWireProjection.js","names":["additions","entry","kind","members","mappingKind","member","node"],"sources":["../../../../../../Compiler/Syntax/LegacyWireProjection.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 { ValidationRuleSyntax } from './Commands';\nimport { SpecificationSyntax } from './Specifications';\nimport { SyntaxNode } from './SyntaxNode';\n\n// The members the syntax tree gained with exact numeric source. The internal tree keeps them for every\n// document, but an unmarked (Legacy) document writes the wire form it always had, so these are left out of it.\n// Exact documents write the complete expanded form.\nconst additions: Readonly<Record<string, ReadonlySet<string>>> = Object.fromEntries(\n ('ApplicationSyntax:policies,seeds;ConceptSyntax:validations;DeclarativeValidateSyntax:requirements;CodeValidateSyntax:code;' +\n 'CaptureAppendSyntax:when,mappings,tags;CaptureChildrenSyntax:map;CaptureNestedSyntax:map;CaptureSyntax:map;EventSpecSyntax:key;' +\n 'FromSyntax:key,parentKey;ChildrenSyntax:identifiedBy;RemoveWithSyntax:key,parentKey;RemoveViaJoinSyntax:key;ProjectionEntersOnSyntax:key;' +\n 'ProjectionSyntax:key;QueryParameterSyntax:source;ProducesSyntax:when;InvokesSyntax:mappings;ReactionSyntax:where;' +\n 'SpecificationSyntax:thenAbsentReadModels,thenQueries').split(';').map(entry => entry.split(':')).map(([kind, members]) => [kind, new Set(members.split(','))]));\n\n// Every projection mapping kind, but not the always-modeled PropertyMappingSyntax.\nconst mappingKind = /^(?:Set|Clear|Increment|Decrement|Count|Add|Subtract)MappingSyntax$/;\n\nexport function isExactOnlyMember(kind: string, member: string): boolean {\n return additions[kind]?.has(member) === true || (mappingKind.test(kind) && (member === 'source' || member === 'value'));\n}\n\nexport function isLegacyOmittedMember(node: SyntaxNode, member: string): boolean {\n // Legacy never modeled unwrapped rule payloads. Only an explicit wrapper opts into rule intent on wire.\n // A caller is only written when the specification states one; Legacy never wrote the member when it was absent.\n if (node.kind === 'SpecificationSyntax' && member === 'givenCaller') return (node as SpecificationSyntax).givenCaller == null;\n return isExactOnlyMember(node.kind, member) || (node.kind === 'ValidationRuleSyntax' && (node as ValidationRuleSyntax).implementation == null && (member === 'code' || member === 'file' || member === 'implementation'));\n}\n"],"mappings":"qDAUA,MAAMA,EAA2D,OAAO,YACnE,0iBAIuD,MAAM,GAAG,CAAC,CAAC,IAAI,GAASC,EAAM,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAACC,EAAMC,KAAa,CAACD,EAAM,IAAI,IAAIC,EAAQ,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAG7JC,EAAc,sEAEpB,SAAgB,kBAAkB,EAAc,EAAyB,CACrE,OAAOJ,EAAUE,EAAK,EAAE,IAAIG,CAAM,IAAM,IAASD,EAAY,KAAKF,CAAI,IAAMG,IAAW,UAAYA,IAAW,QAClH,CAEA,SAAgB,sBAAsB,EAAkB,EAAyB,CAI7E,OADIC,EAAK,OAAS,uBAAyBD,IAAW,cAAuBC,EAA6B,aAAe,KAClH,kBAAkBA,EAAK,KAAMD,CAAM,GAAMC,EAAK,OAAS,wBAA2BA,EAA8B,gBAAkB,OAASD,IAAW,QAAUA,IAAW,QAAUA,IAAW,iBAC3M"}
|
|
1
|
+
{"version":3,"file":"LegacyWireProjection.js","names":["additions","entry","kind","members","mappingKind","member","node"],"sources":["../../../../../../Compiler/Syntax/LegacyWireProjection.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 { ValidationRuleSyntax } from './Commands';\nimport { SpecificationSyntax } from './Specifications';\nimport { SyntaxNode } from './SyntaxNode';\n\n// The members the syntax tree gained with exact numeric source. The internal tree keeps them for every\n// document, but an unmarked (Legacy) document writes the wire form it always had, so these are left out of it.\n// Exact documents write the complete expanded form.\nconst additions: Readonly<Record<string, ReadonlySet<string>>> = Object.fromEntries(\n ('ApplicationSyntax:policies,seeds;ConceptSyntax:validations;DeclarativeValidateSyntax:requirements;CodeValidateSyntax:code;' +\n 'CaptureAppendSyntax:when,mappings,tags;CaptureChildrenSyntax:map;CaptureNestedSyntax:map;CaptureSyntax:map;EventSpecSyntax:key;' +\n 'FromSyntax:key,parentKey;ChildrenSyntax:identifiedBy;RemoveWithSyntax:key,parentKey;RemoveViaJoinSyntax:key;ProjectionEntersOnSyntax:key;' +\n 'ProjectionSyntax:key;QueryParameterSyntax:source;ProducesSyntax:when;InvokesSyntax:mappings;ReactionSyntax:where;' +\n 'SpecificationSyntax:thenAbsentReadModels,thenQueries').split(';').map(entry => entry.split(':')).map(([kind, members]) => [kind, new Set(members.split(','))]));\n\n// Every projection mapping kind, but not the always-modeled PropertyMappingSyntax.\nconst mappingKind = /^(?:Set|Clear|Increment|Decrement|Count|Add|Subtract)MappingSyntax$/;\n\nexport function isExactOnlyMember(kind: string, member: string): boolean {\n return additions[kind]?.has(member) === true || (mappingKind.test(kind) && (member === 'source' || member === 'value'));\n}\n\nexport function isLegacyOmittedMember(node: SyntaxNode, member: string): boolean {\n // Legacy never modeled unwrapped rule payloads. Only an explicit wrapper opts into rule intent on wire.\n // A caller is only written when the specification states one; Legacy never wrote the member when it was absent.\n if (node.kind === 'SpecificationSyntax' && member === 'givenCaller') return (node as SpecificationSyntax).givenCaller == null;\n return isExactOnlyMember(node.kind, member) || (node.kind === 'ValidationRuleSyntax' && (node as ValidationRuleSyntax).implementation == null && (member === 'code' || member === 'file' || member === 'implementation'));\n}\n"],"mappings":"A,qDAUA,MAAMA,EAA2D,OAAO,YACnE,0iBAIuD,MAAM,GAAG,CAAC,CAAC,IAAI,GAASC,EAAM,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAACC,EAAMC,KAAa,CAACD,EAAM,IAAI,IAAIC,EAAQ,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAG7JC,EAAc,sEAEpB,SAAgB,kBAAkB,EAAc,EAAyB,CACrE,OAAOJ,EAAUE,EAAK,EAAE,IAAIG,CAAM,IAAM,IAASD,EAAY,KAAKF,CAAI,IAAMG,IAAW,UAAYA,IAAW,QAClH,CAEA,SAAgB,sBAAsB,EAAkB,EAAyB,CAI7E,OADIC,EAAK,OAAS,uBAAyBD,IAAW,cAAuBC,EAA6B,aAAe,KAClH,kBAAkBA,EAAK,KAAMD,CAAM,GAAMC,EAAK,OAAS,wBAA2BA,EAA8B,gBAAkB,OAASD,IAAW,QAAUA,IAAW,QAAUA,IAAW,iBAC3M,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operations.js","names":["slice","command","production"],"sources":["../../../../../../Compiler/Syntax/Operations.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 { OperationSyntax } from './OperationSyntax';\nimport { SliceSyntax } from './Structure';\n\nexport type { SystemSyntax } from './SystemSyntax';\nexport type { OperationSyntax } from './OperationSyntax';\nexport type { OperationPhaseSyntax } from './OperationPhaseSyntax';\n\nexport function operationDeclarations(slice: SliceSyntax): readonly OperationSyntax[] {\n return [...slice.operations ?? [], ...slice.commands.flatMap(command => command.produces).flatMap(production => production.inlineOperation == null ? [] : [production.inlineOperation])];\n}\n"],"mappings":"qDAUA,SAAgB,sBAAsB,EAAgD,CAClF,MAAO,CAAC,GAAGA,EAAM,YAAc,CAAC,EAAG,GAAGA,EAAM,SAAS,QAAQ,GAAWC,EAAQ,QAAQ,CAAC,CAAC,QAAQ,GAAcC,EAAW,iBAAmB,KAAO,CAAC,EAAI,CAACA,EAAW,eAAe,CAAC,CAAC,CAC3L"}
|
|
1
|
+
{"version":3,"file":"Operations.js","names":["slice","command","production"],"sources":["../../../../../../Compiler/Syntax/Operations.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 { OperationSyntax } from './OperationSyntax';\nimport { SliceSyntax } from './Structure';\n\nexport type { SystemSyntax } from './SystemSyntax';\nexport type { OperationSyntax } from './OperationSyntax';\nexport type { OperationPhaseSyntax } from './OperationPhaseSyntax';\n\nexport function operationDeclarations(slice: SliceSyntax): readonly OperationSyntax[] {\n return [...slice.operations ?? [], ...slice.commands.flatMap(command => command.produces).flatMap(production => production.inlineOperation == null ? [] : [production.inlineOperation])];\n}\n"],"mappings":"A,qDAUA,SAAgB,sBAAsB,EAAgD,CAClF,MAAO,CAAC,GAAGA,EAAM,YAAc,CAAC,EAAG,GAAGA,EAAM,SAAS,QAAQ,GAAWC,EAAQ,QAAQ,CAAC,CAAC,QAAQ,GAAcC,EAAW,iBAAmB,KAAO,CAAC,EAAI,CAACA,EAAW,eAAe,CAAC,CAAC,CAC3L,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaCallers.js","names":["left","right","type","upper","character","contributions","policies","persona","name","policy","application","not","refusal","roles","atom","claims","claim","condition","values","target","first"],"sources":["../../../../../../Compiler/Syntax/PersonaCallers.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 { PersonaSyntax } from './Authorization';\nimport { ApplicationSyntax } from './Structure';\nimport { PolicyConditionSyntax, PolicySyntax } from './Policies';\nimport { PersonaCallerContribution } from './PersonaCallerContribution';\nimport { PersonaCallerRefusal } from './PersonaCallerRefusal';\nimport { PersonaCallerResult } from './PersonaCallerResult';\nimport { SpecificationCallerClaimSyntax } from './Specifications';\n\nconst roleClaimType = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role';\nconst ordinal = (left: string, right: string): number => left < right ? -1 : left > right ? 1 : 0;\n// Ordinal casing never expands a character (for example sharp s into SS).\nconst claimTypeKey = (type: string): string => Array.from(type, character => {\n const upper = character.toUpperCase();\n return upper.length === character.length && character !== '\\u0131' && character !== '\\u017f' ? upper : character;\n}).join('');\n\nexport function synthesizePersonaCaller(persona: PersonaSyntax, application: ApplicationSyntax): PersonaCallerResult {\n const contributions: PersonaCallerContribution[] = [];\n const policies: PolicySyntax[] = [];\n const refused = (refusal: PersonaCallerRefusal): PersonaCallerResult => ({ caller: null, contributions, refusal });\n if (persona.policies.length === 0) return refused({ policy: null, reason: 'noPolicies', location: persona.location });\n for (const name of persona.policies) {\n const policy = (application.policies ?? []).find(policy => policy.name === name);\n if (!policy) return refused({ policy: name, reason: 'unresolvedPolicy', location: persona.location });\n if (policy.condition === null || policy.code !== null || policy.file !== null) return refused({ policy: name, reason: 'opaqueImplementation', location: policy.location });\n const not = negation(policy.condition);\n if (not) return refused({ policy: name, reason: 'negation', location: not.location });\n policies.push(policy);\n }\n for (const policy of policies) {\n const refusal = required(policy.condition!, policy.name, contributions);\n if (refusal) return refused(refusal);\n }\n for (const policy of policies) {\n const refusal = complete(policy.condition!, policy.name, contributions);\n if (refusal) return refused(refusal);\n }\n const roles = [...new Set(contributions.filter(atom => atom.kind === 'role').map(atom => atom.value))].sort(ordinal);\n const claims: SpecificationCallerClaimSyntax[] = [];\n for (const atom of contributions.filter(atom => atom.kind === 'claim')) {\n if (!claims.some(claim => claimTypeKey(claim.type) === claimTypeKey(atom.type!) && claim.value === atom.value)) {\n claims.push({ kind: 'SpecificationCallerClaimSyntax', type: atom.type!, value: atom.value, location: atom.location });\n }\n }\n claims.sort((left, right) => ordinal(claimTypeKey(left.type), claimTypeKey(right.type)) || ordinal(left.value, right.value));\n return { caller: { kind: 'SpecificationCallerSyntax', authenticated: true, roles, claims, location: persona.location }, contributions, refusal: null };\n}\n\nfunction negation(condition: PolicyConditionSyntax): PolicyConditionSyntax | null {\n return condition.kind === 'NotPolicyConditionSyntax' ? condition : condition.kind === 'LogicalPolicyConditionSyntax' ? negation(condition.left) ?? negation(condition.right) : null;\n}\n\nfunction atom(condition: PolicyConditionSyntax, policy: string, values: PersonaCallerContribution[]): PersonaCallerRefusal | null {\n switch (condition.kind) {\n case 'AuthenticatedConditionSyntax': values.push({ kind: 'authenticated', value: 'true', type: null, policy, location: condition.location }); return null;\n case 'AnonymousConditionSyntax': return null;\n case 'RoleConditionSyntax': values.push({ kind: 'role', value: condition.role, type: null, policy, location: condition.location }); return null;\n case 'ClaimConditionSyntax':\n if (claimTypeKey(condition.claim) === claimTypeKey(roleClaimType)) return { policy, reason: 'roleClaim', location: condition.location };\n if (!condition.matchesSubject && condition.matches?.kind === 'LiteralExpressionSyntax' && typeof condition.matches.value === 'string') {\n values.push({ kind: 'claim', value: condition.matches.value, type: condition.claim, policy, location: condition.location }); return null;\n }\n }\n return { policy, reason: 'nonLiteralClaim', location: condition.location };\n}\n\nfunction required(condition: PolicyConditionSyntax, policy: string, values: PersonaCallerContribution[]): PersonaCallerRefusal | null {\n return condition.kind !== 'LogicalPolicyConditionSyntax' ? atom(condition, policy, values) : condition.operator === 'Or' ? null : required(condition.left, policy, values) ?? required(condition.right, policy, values);\n}\n\nfunction satisfied(condition: PolicyConditionSyntax, values: readonly PersonaCallerContribution[]): boolean {\n switch (condition.kind) {\n case 'AuthenticatedConditionSyntax': return true;\n case 'AnonymousConditionSyntax': return true;\n case 'RoleConditionSyntax': return values.some(atom => atom.kind === 'role' && atom.value === condition.role);\n case 'ClaimConditionSyntax': {\n const target = condition.matches;\n return !condition.matchesSubject && target?.kind === 'LiteralExpressionSyntax' && values.some(atom => atom.kind === 'claim' && claimTypeKey(atom.type!) === claimTypeKey(condition.claim) && atom.value === target.value);\n }\n case 'LogicalPolicyConditionSyntax': return condition.operator === 'And' ? satisfied(condition.left, values) && satisfied(condition.right, values) : satisfied(condition.left, values) || satisfied(condition.right, values);\n default: return false;\n }\n}\n\nfunction complete(condition: PolicyConditionSyntax, policy: string, values: PersonaCallerContribution[]): PersonaCallerRefusal | null {\n if (condition.kind !== 'LogicalPolicyConditionSyntax') return satisfied(condition, values) ? null : atom(condition, policy, values);\n if (condition.operator === 'And') return complete(condition.left, policy, values) ?? complete(condition.right, policy, values);\n if (satisfied(condition, values)) return null;\n const left = [...values];\n const first = complete(condition.left, policy, left);\n if (first === null) { values.push(...left.slice(values.length)); return null; }\n const right = [...values];\n if (complete(condition.right, policy, right) !== null) return first;\n values.push(...right.slice(values.length));\n return null;\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"PersonaCallers.js","names":["left","right","type","upper","character","contributions","policies","persona","name","policy","application","not","refusal","roles","atom","claims","claim","condition","values","target","first"],"sources":["../../../../../../Compiler/Syntax/PersonaCallers.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 { PersonaSyntax } from './Authorization';\nimport { ApplicationSyntax } from './Structure';\nimport { PolicyConditionSyntax, PolicySyntax } from './Policies';\nimport { PersonaCallerContribution } from './PersonaCallerContribution';\nimport { PersonaCallerRefusal } from './PersonaCallerRefusal';\nimport { PersonaCallerResult } from './PersonaCallerResult';\nimport { SpecificationCallerClaimSyntax } from './Specifications';\n\nconst roleClaimType = 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role';\nconst ordinal = (left: string, right: string): number => left < right ? -1 : left > right ? 1 : 0;\n// Ordinal casing never expands a character (for example sharp s into SS).\nconst claimTypeKey = (type: string): string => Array.from(type, character => {\n const upper = character.toUpperCase();\n return upper.length === character.length && character !== '\\u0131' && character !== '\\u017f' ? upper : character;\n}).join('');\n\nexport function synthesizePersonaCaller(persona: PersonaSyntax, application: ApplicationSyntax): PersonaCallerResult {\n const contributions: PersonaCallerContribution[] = [];\n const policies: PolicySyntax[] = [];\n const refused = (refusal: PersonaCallerRefusal): PersonaCallerResult => ({ caller: null, contributions, refusal });\n if (persona.policies.length === 0) return refused({ policy: null, reason: 'noPolicies', location: persona.location });\n for (const name of persona.policies) {\n const policy = (application.policies ?? []).find(policy => policy.name === name);\n if (!policy) return refused({ policy: name, reason: 'unresolvedPolicy', location: persona.location });\n if (policy.condition === null || policy.code !== null || policy.file !== null) return refused({ policy: name, reason: 'opaqueImplementation', location: policy.location });\n const not = negation(policy.condition);\n if (not) return refused({ policy: name, reason: 'negation', location: not.location });\n policies.push(policy);\n }\n for (const policy of policies) {\n const refusal = required(policy.condition!, policy.name, contributions);\n if (refusal) return refused(refusal);\n }\n for (const policy of policies) {\n const refusal = complete(policy.condition!, policy.name, contributions);\n if (refusal) return refused(refusal);\n }\n const roles = [...new Set(contributions.filter(atom => atom.kind === 'role').map(atom => atom.value))].sort(ordinal);\n const claims: SpecificationCallerClaimSyntax[] = [];\n for (const atom of contributions.filter(atom => atom.kind === 'claim')) {\n if (!claims.some(claim => claimTypeKey(claim.type) === claimTypeKey(atom.type!) && claim.value === atom.value)) {\n claims.push({ kind: 'SpecificationCallerClaimSyntax', type: atom.type!, value: atom.value, location: atom.location });\n }\n }\n claims.sort((left, right) => ordinal(claimTypeKey(left.type), claimTypeKey(right.type)) || ordinal(left.value, right.value));\n return { caller: { kind: 'SpecificationCallerSyntax', authenticated: true, roles, claims, location: persona.location }, contributions, refusal: null };\n}\n\nfunction negation(condition: PolicyConditionSyntax): PolicyConditionSyntax | null {\n return condition.kind === 'NotPolicyConditionSyntax' ? condition : condition.kind === 'LogicalPolicyConditionSyntax' ? negation(condition.left) ?? negation(condition.right) : null;\n}\n\nfunction atom(condition: PolicyConditionSyntax, policy: string, values: PersonaCallerContribution[]): PersonaCallerRefusal | null {\n switch (condition.kind) {\n case 'AuthenticatedConditionSyntax': values.push({ kind: 'authenticated', value: 'true', type: null, policy, location: condition.location }); return null;\n case 'AnonymousConditionSyntax': return null;\n case 'RoleConditionSyntax': values.push({ kind: 'role', value: condition.role, type: null, policy, location: condition.location }); return null;\n case 'ClaimConditionSyntax':\n if (claimTypeKey(condition.claim) === claimTypeKey(roleClaimType)) return { policy, reason: 'roleClaim', location: condition.location };\n if (!condition.matchesSubject && condition.matches?.kind === 'LiteralExpressionSyntax' && typeof condition.matches.value === 'string') {\n values.push({ kind: 'claim', value: condition.matches.value, type: condition.claim, policy, location: condition.location }); return null;\n }\n }\n return { policy, reason: 'nonLiteralClaim', location: condition.location };\n}\n\nfunction required(condition: PolicyConditionSyntax, policy: string, values: PersonaCallerContribution[]): PersonaCallerRefusal | null {\n return condition.kind !== 'LogicalPolicyConditionSyntax' ? atom(condition, policy, values) : condition.operator === 'Or' ? null : required(condition.left, policy, values) ?? required(condition.right, policy, values);\n}\n\nfunction satisfied(condition: PolicyConditionSyntax, values: readonly PersonaCallerContribution[]): boolean {\n switch (condition.kind) {\n case 'AuthenticatedConditionSyntax': return true;\n case 'AnonymousConditionSyntax': return true;\n case 'RoleConditionSyntax': return values.some(atom => atom.kind === 'role' && atom.value === condition.role);\n case 'ClaimConditionSyntax': {\n const target = condition.matches;\n return !condition.matchesSubject && target?.kind === 'LiteralExpressionSyntax' && values.some(atom => atom.kind === 'claim' && claimTypeKey(atom.type!) === claimTypeKey(condition.claim) && atom.value === target.value);\n }\n case 'LogicalPolicyConditionSyntax': return condition.operator === 'And' ? satisfied(condition.left, values) && satisfied(condition.right, values) : satisfied(condition.left, values) || satisfied(condition.right, values);\n default: return false;\n }\n}\n\nfunction complete(condition: PolicyConditionSyntax, policy: string, values: PersonaCallerContribution[]): PersonaCallerRefusal | null {\n if (condition.kind !== 'LogicalPolicyConditionSyntax') return satisfied(condition, values) ? null : atom(condition, policy, values);\n if (condition.operator === 'And') return complete(condition.left, policy, values) ?? complete(condition.right, policy, values);\n if (satisfied(condition, values)) return null;\n const left = [...values];\n const first = complete(condition.left, policy, left);\n if (first === null) { values.push(...left.slice(values.length)); return null; }\n const right = [...values];\n if (complete(condition.right, policy, right) !== null) return first;\n values.push(...right.slice(values.length));\n return null;\n}\n"],"mappings":"A,qDAWA,MACM,SAAW,EAAc,IAA0BA,EAAOC,EAAQ,GAAK,IAAOA,GAE9E,aAAgB,GAAyB,MAAM,KAAKC,EAAM,GAAa,CACzE,IAAMC,EAAQC,EAAU,YAAY,EACpC,OAAOD,EAAM,SAAWC,EAAU,QAAUA,IAAc,KAAYA,IAAc,IAAWD,EAAQC,CAC3G,CAAC,CAAC,CAAC,KAAK,EAAE,EAEV,SAAgB,wBAAwB,EAAwB,EAAqD,CACjH,IAAMC,EAA6C,CAAC,EAC9CC,EAA2B,CAAC,EAC5B,QAAW,IAAwD,CAAE,OAAQ,KAAM,gBAAe,SAAQ,GAChH,GAAIC,EAAQ,SAAS,SAAW,EAAG,OAAO,QAAQ,CAAE,OAAQ,KAAM,OAAQ,aAAc,SAAUA,EAAQ,QAAS,CAAC,EACpH,IAAK,IAAMC,KAAQD,EAAQ,SAAU,CACjC,IAAME,GAAUC,EAAY,UAAY,CAAC,EAAA,CAAG,KAAK,GAAUD,EAAO,OAASD,CAAI,EAC/E,GAAI,CAACC,EAAQ,OAAO,QAAQ,CAAE,OAAQD,EAAM,OAAQ,mBAAoB,SAAUD,EAAQ,QAAS,CAAC,EACpG,GAAIE,EAAO,YAAc,MAAQA,EAAO,OAAS,MAAQA,EAAO,OAAS,KAAM,OAAO,QAAQ,CAAE,OAAQD,EAAM,OAAQ,uBAAwB,SAAUC,EAAO,QAAS,CAAC,EACzK,IAAME,EAAM,SAASF,EAAO,SAAS,EACrC,GAAIE,EAAK,OAAO,QAAQ,CAAE,OAAQH,EAAM,OAAQ,WAAY,SAAUG,EAAI,QAAS,CAAC,EACpFL,EAAS,KAAKG,CAAM,CACxB,CACA,IAAK,IAAMA,KAAUH,EAAU,CAC3B,IAAMM,EAAU,SAASH,EAAO,UAAYA,EAAO,KAAMJ,CAAa,EACtE,GAAIO,EAAS,OAAO,QAAQA,CAAO,CACvC,CACA,IAAK,IAAMH,KAAUH,EAAU,CAC3B,IAAMM,EAAU,SAASH,EAAO,UAAYA,EAAO,KAAMJ,CAAa,EACtE,GAAIO,EAAS,OAAO,QAAQA,CAAO,CACvC,CACA,IAAMC,EAAQ,CAAC,GAAG,IAAI,IAAIR,EAAc,OAAO,GAAQS,EAAK,OAAS,MAAM,CAAC,CAAC,IAAI,GAAQA,EAAK,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,EAC7GC,EAA2C,CAAC,EAClD,IAAK,IAAMD,KAAQT,EAAc,OAAO,GAAQS,EAAK,OAAS,OAAO,EAC5DC,EAAO,KAAK,GAAS,aAAaC,EAAM,IAAI,IAAM,aAAaF,EAAK,IAAK,GAAKE,EAAM,QAAUF,EAAK,KAAK,GACzGC,EAAO,KAAK,CAAE,KAAM,iCAAkC,KAAMD,EAAK,KAAO,MAAOA,EAAK,MAAO,SAAUA,EAAK,QAAS,CAAC,EAI5H,OADAC,EAAO,MAAM,EAAM,IAAU,QAAQ,aAAaf,EAAK,IAAI,EAAG,aAAaC,EAAM,IAAI,CAAC,GAAK,QAAQD,EAAK,MAAOC,EAAM,KAAK,CAAC,EACpH,CAAE,OAAQ,CAAE,KAAM,4BAA6B,cAAe,GAAM,QAAO,SAAQ,SAAUM,EAAQ,QAAS,EAAG,gBAAe,QAAS,IAAK,CACzJ,CAEA,SAAS,SAAS,EAAgE,CAC9E,OAAOU,EAAU,OAAS,2BAA6BA,EAAYA,EAAU,OAAS,+BAAiC,SAASA,EAAU,IAAI,GAAK,SAASA,EAAU,KAAK,EAAI,IACnL,CAEA,SAAS,KAAK,EAAkC,EAAgB,EAAkE,CAC9H,OAAQA,EAAU,KAAlB,CACI,IAAK,+BAAyI,OAAzGC,EAAO,KAAK,CAAE,KAAM,gBAAiB,MAAO,OAAQ,KAAM,KAAM,SAAQ,SAAUD,EAAU,QAAS,CAAC,EAAU,KACrJ,IAAK,2BAA4B,OAAO,KACxC,IAAK,sBAA+H,OAAxGC,EAAO,KAAK,CAAE,KAAM,OAAQ,MAAOD,EAAU,KAAM,KAAM,KAAM,SAAQ,SAAUA,EAAU,QAAS,CAAC,EAAU,KAC3I,IAAK,uBACD,GAAI,aAAaA,EAAU,KAAK,IAAM,aAAa,8DAAa,EAAG,MAAO,CAAE,SAAQ,OAAQ,YAAa,SAAUA,EAAU,QAAS,EACtI,GAAI,CAACA,EAAU,gBAAkBA,EAAU,SAAS,OAAS,2BAA6B,OAAOA,EAAU,QAAQ,OAAU,SACI,OAA7HC,EAAO,KAAK,CAAE,KAAM,QAAS,MAAOD,EAAU,QAAQ,MAAO,KAAMA,EAAU,MAAO,SAAQ,SAAUA,EAAU,QAAS,CAAC,EAAU,IAEhJ,CACA,MAAO,CAAE,SAAQ,OAAQ,kBAAmB,SAAUA,EAAU,QAAS,CAC7E,CAEA,SAAS,SAAS,EAAkC,EAAgB,EAAkE,CAClI,OAAOA,EAAU,OAAS,+BAAmEA,EAAU,WAAa,KAAO,KAAO,SAASA,EAAU,KAAMR,EAAQS,CAAM,GAAK,SAASD,EAAU,MAAOR,EAAQS,CAAM,EAA3J,KAAKD,EAAWR,EAAQS,CAAM,CAC7F,CAEA,SAAS,UAAU,EAAkC,EAAuD,CACxG,OAAQD,EAAU,KAAlB,CACI,IAAK,+BAAgC,MAAO,GAC5C,IAAK,2BAA4B,MAAO,GACxC,IAAK,sBAAuB,OAAOC,EAAO,KAAK,GAAQJ,EAAK,OAAS,QAAUA,EAAK,QAAUG,EAAU,IAAI,EAC5G,IAAK,uBAAwB,CACzB,IAAME,EAASF,EAAU,QACzB,MAAO,CAACA,EAAU,gBAAkBE,GAAQ,OAAS,2BAA6BD,EAAO,KAAK,GAAQJ,EAAK,OAAS,SAAW,aAAaA,EAAK,IAAK,IAAM,aAAaG,EAAU,KAAK,GAAKH,EAAK,QAAUK,EAAO,KAAK,CAC5N,CACA,IAAK,+BAAgC,OAAOF,EAAU,WAAa,MAAQ,UAAUA,EAAU,KAAMC,CAAM,GAAK,UAAUD,EAAU,MAAOC,CAAM,EAAI,UAAUD,EAAU,KAAMC,CAAM,GAAK,UAAUD,EAAU,MAAOC,CAAM,EAC3N,QAAS,MAAO,EACpB,CACJ,CAEA,SAAS,SAAS,EAAkC,EAAgB,EAAkE,CAClI,GAAID,EAAU,OAAS,+BAAgC,OAAO,UAAUA,EAAWC,CAAM,EAAI,KAAO,KAAKD,EAAWR,EAAQS,CAAM,EAClI,GAAID,EAAU,WAAa,MAAO,OAAO,SAASA,EAAU,KAAMR,EAAQS,CAAM,GAAK,SAASD,EAAU,MAAOR,EAAQS,CAAM,EAC7H,GAAI,UAAUD,EAAWC,CAAM,EAAG,OAAO,KACzC,IAAMlB,EAAO,CAAC,GAAGkB,CAAM,EACjBE,EAAQ,SAASH,EAAU,KAAMR,EAAQT,CAAI,EACnD,GAAIoB,IAAU,KAAmD,OAA3CF,EAAO,KAAK,GAAGlB,EAAK,MAAMkB,EAAO,MAAM,CAAC,EAAU,KACxE,IAAMjB,EAAQ,CAAC,GAAGiB,CAAM,EAGxB,OAFI,SAASD,EAAU,MAAOR,EAAQR,CAAK,IAAM,MACjDiB,EAAO,KAAK,GAAGjB,EAAM,MAAMiB,EAAO,MAAM,CAAC,EAClC,MAFuDE,CAGlE,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductionDestinations.js","names":["command","produced","context","events","identifier","property","sibling","identifiers"],"sources":["../../../../../../Compiler/Syntax/ProductionDestinations.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 { CommandSyntax } from './Commands';\nimport { ProductionDestinationContext } from './ProductionDestinationContext';\nimport { ProducesSyntax } from './Reactions';\n\nexport type { ProductionDestinationContext } from './ProductionDestinationContext';\n\nfunction eventProductions(command: CommandSyntax, context?: ProductionDestinationContext): readonly ProducesSyntax[] {\n return command.produces.filter(produced => produced.inlineOperation == null && (context === undefined || context.resolver.isEventProduction(produced, context.slice)));\n}\n\nexport function requiresExplicitDestinations(command: CommandSyntax, context?: ProductionDestinationContext): boolean {\n const events = eventProductions(command, context);\n const identifier = command.properties.find(property => property.isIdentifier)?.name;\n return events.some(produced => produced.for !== null && (produced.for.kind !== 'PathExpressionSyntax' || produced.for.path !== identifier)) ||\n (events.some(produced => produced.inlineEvent !== null && produced.for === null) &&\n events.some(produced => produced.inlineEvent === null && produced.for === null));\n}\n\n// No inference of runtime equality or legacy command-level destination promotion.\nexport function implicitDestination(command: CommandSyntax, produced: ProducesSyntax, context?: ProductionDestinationContext): string | undefined {\n const events = eventProductions(command, context);\n if (produced.inlineOperation != null || context !== undefined && !context.resolver.isEventProduction(produced, context.slice) || produced.for !== null || requiresExplicitDestinations(command, context)) return undefined;\n if (produced.inlineEvent === null) {\n return events.some(sibling => sibling.for !== null || sibling.inlineEvent !== null) ? undefined : 'new event source';\n }\n const identifiers = command.properties.filter(property => property.isIdentifier && !property.type.isOptional && !property.type.isCollection);\n return identifiers.length === 1 ? identifiers[0].name : undefined;\n}\n"],"mappings":"qDASA,SAAS,iBAAiB,EAAwB,EAAmE,CACjH,OAAOA,EAAQ,SAAS,OAAO,GAAYC,EAAS,iBAAmB,OAASC,IAAY,IAAA,IAAaA,EAAQ,SAAS,kBAAkBD,EAAUC,EAAQ,KAAK,EAAE,CACzK,CAEA,SAAgB,6BAA6B,EAAwB,EAAiD,CAClH,IAAMC,EAAS,iBAAiBH,EAASE,CAAO,EAC1CE,EAAaJ,EAAQ,WAAW,KAAK,GAAYK,EAAS,YAAY,CAAC,EAAE,KAC/E,OAAOF,EAAO,KAAK,GAAYF,EAAS,MAAQ,OAASA,EAAS,IAAI,OAAS,wBAA0BA,EAAS,IAAI,OAASG,EAAW,GACrID,EAAO,KAAK,GAAYF,EAAS,cAAgB,MAAQA,EAAS,MAAQ,IAAI,GAC9EE,EAAO,KAAK,GAAYF,EAAS,cAAgB,MAAQA,EAAS,MAAQ,IAAI,CACvF,CAGA,SAAgB,oBAAoB,EAAwB,EAA0B,EAA4D,CAC9I,IAAME,EAAS,iBAAiBH,EAASE,CAAO,EAChD,GAAID,EAAS,iBAAmB,MAAQC,IAAY,IAAA,IAAa,CAACA,EAAQ,SAAS,kBAAkBD,EAAUC,EAAQ,KAAK,GAAKD,EAAS,MAAQ,MAAQ,6BAA6BD,EAASE,CAAO,EAAG,OAC1M,GAAID,EAAS,cAAgB,KACzB,OAAOE,EAAO,KAAK,GAAWG,EAAQ,MAAQ,MAAQA,EAAQ,cAAgB,IAAI,EAAI,IAAA,GAAY,mBAEtG,IAAMC,EAAcP,EAAQ,WAAW,OAAO,GAAYK,EAAS,cAAgB,CAACA,EAAS,KAAK,YAAc,CAACA,EAAS,KAAK,YAAY,EAC3I,OAAOE,EAAY,SAAW,EAAIA,EAAY,EAAE,CAAC,KAAO,IAAA,EAC5D"}
|
|
1
|
+
{"version":3,"file":"ProductionDestinations.js","names":["command","produced","context","events","identifier","property","sibling","identifiers"],"sources":["../../../../../../Compiler/Syntax/ProductionDestinations.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 { CommandSyntax } from './Commands';\nimport { ProductionDestinationContext } from './ProductionDestinationContext';\nimport { ProducesSyntax } from './Reactions';\n\nexport type { ProductionDestinationContext } from './ProductionDestinationContext';\n\nfunction eventProductions(command: CommandSyntax, context?: ProductionDestinationContext): readonly ProducesSyntax[] {\n return command.produces.filter(produced => produced.inlineOperation == null && (context === undefined || context.resolver.isEventProduction(produced, context.slice)));\n}\n\nexport function requiresExplicitDestinations(command: CommandSyntax, context?: ProductionDestinationContext): boolean {\n const events = eventProductions(command, context);\n const identifier = command.properties.find(property => property.isIdentifier)?.name;\n return events.some(produced => produced.for !== null && (produced.for.kind !== 'PathExpressionSyntax' || produced.for.path !== identifier)) ||\n (events.some(produced => produced.inlineEvent !== null && produced.for === null) &&\n events.some(produced => produced.inlineEvent === null && produced.for === null));\n}\n\n// No inference of runtime equality or legacy command-level destination promotion.\nexport function implicitDestination(command: CommandSyntax, produced: ProducesSyntax, context?: ProductionDestinationContext): string | undefined {\n const events = eventProductions(command, context);\n if (produced.inlineOperation != null || context !== undefined && !context.resolver.isEventProduction(produced, context.slice) || produced.for !== null || requiresExplicitDestinations(command, context)) return undefined;\n if (produced.inlineEvent === null) {\n return events.some(sibling => sibling.for !== null || sibling.inlineEvent !== null) ? undefined : 'new event source';\n }\n const identifiers = command.properties.filter(property => property.isIdentifier && !property.type.isOptional && !property.type.isCollection);\n return identifiers.length === 1 ? identifiers[0].name : undefined;\n}\n"],"mappings":"A,qDASA,SAAS,iBAAiB,EAAwB,EAAmE,CACjH,OAAOA,EAAQ,SAAS,OAAO,GAAYC,EAAS,iBAAmB,OAASC,IAAY,IAAA,IAAaA,EAAQ,SAAS,kBAAkBD,EAAUC,EAAQ,KAAK,EAAE,CACzK,CAEA,SAAgB,6BAA6B,EAAwB,EAAiD,CAClH,IAAMC,EAAS,iBAAiBH,EAASE,CAAO,EAC1CE,EAAaJ,EAAQ,WAAW,KAAK,GAAYK,EAAS,YAAY,CAAC,EAAE,KAC/E,OAAOF,EAAO,KAAK,GAAYF,EAAS,MAAQ,OAASA,EAAS,IAAI,OAAS,wBAA0BA,EAAS,IAAI,OAASG,EAAW,GACrID,EAAO,KAAK,GAAYF,EAAS,cAAgB,MAAQA,EAAS,MAAQ,IAAI,GAC9EE,EAAO,KAAK,GAAYF,EAAS,cAAgB,MAAQA,EAAS,MAAQ,IAAI,CACvF,CAGA,SAAgB,oBAAoB,EAAwB,EAA0B,EAA4D,CAC9I,IAAME,EAAS,iBAAiBH,EAASE,CAAO,EAChD,GAAID,EAAS,iBAAmB,MAAQC,IAAY,IAAA,IAAa,CAACA,EAAQ,SAAS,kBAAkBD,EAAUC,EAAQ,KAAK,GAAKD,EAAS,MAAQ,MAAQ,6BAA6BD,EAASE,CAAO,EAAG,OAC1M,GAAID,EAAS,cAAgB,KACzB,OAAOE,EAAO,KAAK,GAAWG,EAAQ,MAAQ,MAAQA,EAAQ,cAAgB,IAAI,EAAI,IAAA,GAAY,mBAEtG,IAAMC,EAAcP,EAAQ,WAAW,OAAO,GAAYK,EAAS,cAAgB,CAACA,EAAS,KAAK,YAAc,CAACA,EAAS,KAAK,YAAY,EAC3I,OAAOE,EAAY,SAAW,EAAIA,EAAY,EAAE,CAAC,KAAO,IAAA,EAC5D,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicEventInvariants.js","names":["blankOrigin","dotNetWhitespace","text","node","declaration","visibility","slice"],"sources":["../../../../../../Compiler/Syntax/PublicEventInvariants.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 { EventSyntax, ImportSyntax } from './Declarations';\nimport { EventVisibility } from './EventVisibility';\nimport { SliceSyntax } from './Structure';\nimport { SyntaxNode } from './SyntaxNode';\nimport { TranslationDirection } from './TranslationDirection';\nimport { dotNetWhitespace } from '../Text/patterns';\n\n// .NET whitespace differs from ECMAScript trim at NEL and BOM. Never normalize opaque text.\nconst blankOrigin = new RegExp(`^${dotNetWhitespace}*$`);\nexport const isBlankPublicEventOrigin = (text: string): boolean => blankOrigin.test(text);\n\n// The native PublicEventInvariants contract, shared by source and transport validation.\nexport function publicEventMetadataError(node: SyntaxNode): string | undefined {\n if (node.kind === 'EventSyntax' || node.kind === 'ImportSyntax') {\n const declaration = node as EventSyntax | ImportSyntax;\n const visibility = declaration.visibility === undefined ? EventVisibility.Private : declaration.visibility;\n if (visibility !== EventVisibility.Private && visibility !== EventVisibility.Public) return 'Event visibility must be Private or Public.';\n if (declaration.origin != null && (typeof declaration.origin !== 'string' || isBlankPublicEventOrigin(declaration.origin))) return 'An event or import origin must be a nonblank quoted string.';\n if (declaration.origin != null && visibility !== EventVisibility.Public) return 'An event or import with an origin is a public contract.';\n if (node.kind === 'ImportSyntax' && visibility === EventVisibility.Public && declaration.origin == null) return 'A public contract import requires an origin.';\n }\n if (node.kind === 'SliceSyntax') {\n const slice = node as SliceSyntax;\n if (slice.direction != null && slice.type !== 'Translate') return 'Only a Translate slice may declare a direction.';\n if (slice.direction != null && slice.direction !== TranslationDirection.Inbound && slice.direction !== TranslationDirection.Outbound) return 'A translation direction must be Inbound or Outbound.';\n }\n return undefined;\n}\n"],"mappings":"4GAWA,MAAMA,EAAkB,OAAO,IAAIC,EAAiB,GAAG,EAC1C,yBAA4B,GAA0BD,EAAY,KAAKE,CAAI,EAGxF,SAAgB,yBAAyB,EAAsC,CAC3E,GAAIC,EAAK,OAAS,eAAiBA,EAAK,OAAS,eAAgB,CAC7D,IAAMC,EAAcD,EACdE,EAAaD,EAAY,aAAe,IAAA,GAAA,UAAsCA,EAAY,WAChG,GAAIC,IAAA,WAA0CA,IAAA,SAAuC,MAAO,8CAC5F,GAAID,EAAY,QAAU,OAAS,OAAOA,EAAY,QAAW,UAAY,yBAAyBA,EAAY,MAAM,GAAI,MAAO,8DACnI,GAAIA,EAAY,QAAU,MAAQC,IAAA,SAAuC,MAAO,0DAChF,GAAIF,EAAK,OAAS,gBAAkBE,IAAA,UAAyCD,EAAY,QAAU,KAAM,MAAO,8CACpH,CACA,GAAID,EAAK,OAAS,cAAe,CAC7B,IAAMG,EAAQH,EACd,GAAIG,EAAM,WAAa,MAAQA,EAAM,OAAS,YAAa,MAAO,kDAClE,GAAIA,EAAM,WAAa,MAAQA,EAAM,YAAA,WAA8CA,EAAM,YAAA,WAA6C,MAAO,sDACjJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"PublicEventInvariants.js","names":["blankOrigin","dotNetWhitespace","text","node","declaration","visibility","slice"],"sources":["../../../../../../Compiler/Syntax/PublicEventInvariants.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 { EventSyntax, ImportSyntax } from './Declarations';\nimport { EventVisibility } from './EventVisibility';\nimport { SliceSyntax } from './Structure';\nimport { SyntaxNode } from './SyntaxNode';\nimport { TranslationDirection } from './TranslationDirection';\nimport { dotNetWhitespace } from '../Text/patterns';\n\n// .NET whitespace differs from ECMAScript trim at NEL and BOM. Never normalize opaque text.\nconst blankOrigin = new RegExp(`^${dotNetWhitespace}*$`);\nexport const isBlankPublicEventOrigin = (text: string): boolean => blankOrigin.test(text);\n\n// The native PublicEventInvariants contract, shared by source and transport validation.\nexport function publicEventMetadataError(node: SyntaxNode): string | undefined {\n if (node.kind === 'EventSyntax' || node.kind === 'ImportSyntax') {\n const declaration = node as EventSyntax | ImportSyntax;\n const visibility = declaration.visibility === undefined ? EventVisibility.Private : declaration.visibility;\n if (visibility !== EventVisibility.Private && visibility !== EventVisibility.Public) return 'Event visibility must be Private or Public.';\n if (declaration.origin != null && (typeof declaration.origin !== 'string' || isBlankPublicEventOrigin(declaration.origin))) return 'An event or import origin must be a nonblank quoted string.';\n if (declaration.origin != null && visibility !== EventVisibility.Public) return 'An event or import with an origin is a public contract.';\n if (node.kind === 'ImportSyntax' && visibility === EventVisibility.Public && declaration.origin == null) return 'A public contract import requires an origin.';\n }\n if (node.kind === 'SliceSyntax') {\n const slice = node as SliceSyntax;\n if (slice.direction != null && slice.type !== 'Translate') return 'Only a Translate slice may declare a direction.';\n if (slice.direction != null && slice.direction !== TranslationDirection.Inbound && slice.direction !== TranslationDirection.Outbound) return 'A translation direction must be Inbound or Outbound.';\n }\n return undefined;\n}\n"],"mappings":"A,4GAWA,MAAMA,EAAkB,OAAO,IAAIC,EAAiB,GAAG,EAC1C,yBAA4B,GAA0BD,EAAY,KAAKE,CAAI,EAGxF,SAAgB,yBAAyB,EAAsC,CAC3E,GAAIC,EAAK,OAAS,eAAiBA,EAAK,OAAS,eAAgB,CAC7D,IAAMC,EAAcD,EACdE,EAAaD,EAAY,aAAe,IAAA,GAAA,UAAsCA,EAAY,WAChG,GAAIC,IAAA,WAA0CA,IAAA,SAAuC,MAAO,8CAC5F,GAAID,EAAY,QAAU,OAAS,OAAOA,EAAY,QAAW,UAAY,yBAAyBA,EAAY,MAAM,GAAI,MAAO,8DACnI,GAAIA,EAAY,QAAU,MAAQC,IAAA,SAAuC,MAAO,0DAChF,GAAIF,EAAK,OAAS,gBAAkBE,IAAA,UAAyCD,EAAY,QAAU,KAAM,MAAO,8CACpH,CACA,GAAID,EAAK,OAAS,cAAe,CAC7B,IAAMG,EAAQH,EACd,GAAIG,EAAM,WAAa,MAAQA,EAAM,OAAS,YAAa,MAAO,kDAClE,GAAIA,EAAM,WAAa,MAAQA,EAAM,YAAA,WAA8CA,EAAM,YAAA,WAA6C,MAAO,sDACjJ,CAEJ,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../_virtual/_virtual/_rolldown/runtime.js";var ScreenplaySyntaxWalker=class{visitNode(e){}visitApplication(e){this.visitNode(e),e.domain!==null&&this.visitDomain(e.domain),e.timeZone!=null&&this.visitTimeZone(e.timeZone),e.imports.forEach(e=>this.visitImport(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.systems?.forEach(e=>this.visitSystem(e)),e.stateMachines?.forEach(e=>this.visitStateMachine(e)),e.workflows?.forEach(e=>this.visitWorkflow(e)),e.eventSources?.forEach(e=>this.visitEventSource(e)),e.concepts.forEach(e=>this.visitConcept(e)),e.types.forEach(e=>this.visitType(e)),e.personas.forEach(e=>this.visitPersona(e)),e.policies?.forEach(e=>this.visitPolicy(e)),e.stickyNotes?.forEach(e=>this.visitStickyNote(e)),e.exposures?.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitNode(e))}),e.instanceContributions?.forEach(e=>{this.visitNode(e),e.contributions.forEach(e=>{this.visitNode(e),e.value!==null&&this.visitExpression(e.value),e.items.forEach(e=>{this.visitNode(e),e.values.forEach(e=>{this.visitNode(e),this.visitExpression(e.value)})})})}),e.identity!=null&&this.visitIdentity(e.identity),e.purposes?.forEach(e=>this.visitPurpose(e)),e.seeds?.forEach(e=>this.visitSeed(e)),e.modules.forEach(e=>this.visitModule(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e))}visitIdentity(e){this.visitNode(e),e.details.forEach(e=>this.visitIdentityDetail(e))}visitIdentityDetail(e){this.visitNode(e),this.visitTypeRef(e.type),this.visitIdentitySource(e.source)}visitIdentitySource(e){switch(e.kind){case`ClaimIdentitySourceSyntax`:this.visitClaimIdentitySource(e);break;case`QueryIdentitySourceSyntax`:this.visitQueryIdentitySource(e);break;case`CodeIdentitySourceSyntax`:this.visitCodeIdentitySource(e);break;case`FileIdentitySourceSyntax`:this.visitFileIdentitySource(e);break;default:this.visitNode(e)}}visitClaimIdentitySource(e){this.visitNode(e)}visitQueryIdentitySource(e){this.visitNode(e),this.visitExpression(e.by)}visitCodeIdentitySource(e){this.visitNode(e),this.visitCodeBlock(e.code)}visitFileIdentitySource(e){this.visitNode(e),this.visitFileReference(e.file)}visitPurpose(e){this.visitNode(e),e.transfers.forEach(e=>this.visitPurposeTransfer(e))}visitPurposeReference(e){this.visitNode(e)}visitPurposeTransfer(e){this.visitNode(e)}visitPolicy(e){this.visitNode(e),e.condition!==null&&this.visitPolicyCondition(e.condition),e.code!==null&&this.visitCodeBlock(e.code),e.file!==null&&this.visitFileReference(e.file)}visitPolicyCondition(e){this.visitNode(e),e.kind===`ClaimConditionSyntax`&&e.matches!==null&&this.visitExpression(e.matches),e.kind===`NotPolicyConditionSyntax`&&this.visitPolicyCondition(e.operand),e.kind===`LogicalPolicyConditionSyntax`&&(this.visitPolicyCondition(e.left),this.visitPolicyCondition(e.right))}visitSeed(e){this.visitNode(e),e.groups.forEach(e=>{this.visitNode(e),e.events.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))})})}visitPersona(e){this.visitNode(e)}visitStickyNote(e){this.visitNode(e)}visitAuthorize(e){this.visitNode(e),this.visitPolicyRequirement(e.requirement)}visitPolicyRequirement(e){this.visitNode(e),e.kind===`LogicalPolicyRequirementSyntax`&&(this.visitPolicyRequirement(e.left),this.visitPolicyRequirement(e.right))}visitDomain(e){this.visitNode(e)}visitImport(e){this.visitNode(e)}visitFileImport(e){this.visitNode(e)}visitGeneration(e){this.visitNode(e),e.file&&this.visitFileReference(e.file),e.code&&this.visitCodeBlock(e.code)}visitConcept(e){this.visitNode(e),e.attributes.forEach(e=>this.visitNode(e)),e.generation&&this.visitGeneration(e.generation),e.validations?.forEach(e=>this.visitValidate(e))}visitType(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitDependsOn(e){this.visitNode(e)}visitModule(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.toolbars?.forEach(e=>this.visitScreenDirective(e)),e.features.forEach(e=>this.visitFeature(e))}visitFeature(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.features.forEach(e=>this.visitFeature(e)),e.slices.forEach(e=>this.visitSlice(e)),e.toolbars?.forEach(e=>this.visitScreenDirective(e))}visitSlice(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.commands.forEach(e=>this.visitCommand(e)),e.operations?.forEach(e=>this.visitOperation(e)),e.events.forEach(e=>this.visitEvent(e)),e.constraints.forEach(e=>this.visitConstraint(e)),e.queries.forEach(e=>this.visitQuery(e)),e.projections.forEach(e=>this.visitProjection(e)),e.readModels.forEach(e=>this.visitReadModel(e)),e.captures.forEach(e=>this.visitCapture(e)),e.reactions.forEach(e=>this.visitReaction(e)),e.screens.forEach(e=>this.visitScreen(e)),e.specifications.forEach(e=>this.visitSpecification(e))}visitTriggerData(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type)}visitReads(e){this.visitNode(e),e.byParts?.forEach(e=>this.visitPropertyMapping(e))}visitConcurrency(e){this.visitNode(e)}visitReducer(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.rules.forEach(e=>this.visitReducerRule(e))}visitReducerRule(e){this.visitNode(e),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitForm(e){this.visitNode(e),e.populate!==null&&this.visitNode(e.populate),e.fields.forEach(e=>this.visitNode(e)),e.columns?.forEach(e=>this.visitNode(e)),e.layout!==null&&e.layout!==void 0&&(this.visitNode(e.layout),e.layout.columns.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width),e.minWidth!==null&&this.visitNode(e.minWidth),e.maxWidth!==null&&this.visitNode(e.maxWidth)}),e.layout.columnGap!==null&&this.visitNode(e.layout.columnGap),e.layout.rowGap!==null&&this.visitNode(e.layout.rowGap),e.layout.placements.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width)})),e.onSubmit!==null&&this.visitScreenDirective(e.onSubmit)}visitTimeZone(e){this.visitNode(e)}visitCommandCalendar(e){this.visitNode(e)}visitSpecificationTimeZone(e){this.visitNode(e)}visitCommand(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.stream!=null&&this.visitCommandStream(e.stream),e.calendar!=null&&this.visitCommandCalendar(e.calendar),e.streamCandidates?.forEach(e=>this.visitCommandStream(e)),e.validations.forEach(e=>this.visitValidate(e)),e.produces.forEach(e=>this.visitProduces(e)),e.handler!=null&&this.visitHandler(e.handler),e.response!=null&&this.visitCommandResponse(e.response)}visitEventSource(e){this.visitNode(e),e.identifier!==null&&this.visitTypeRef(e.identifier),e.streams.forEach(e=>this.visitEventStream(e))}visitEventStream(e){this.visitNode(e),e.streamId!==null&&this.visitTypeRef(e.streamId),e.streamIdParts.forEach(e=>this.visitEventStreamIdPart(e))}visitEventStreamIdPart(e){this.visitNode(e),this.visitTypeRef(e.type)}visitObserverFilter(e){this.visitNode(e)}visitCommandStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e)),e.propertyCandidate!==null&&this.visitProperty(e.propertyCandidate)}visitSystem(e){this.visitNode(e)}visitStateMachine(e){this.visitNode(e),e.states.forEach(e=>this.visitState(e)),e.specifications.forEach(e=>this.visitLifecycleSpecification(e))}visitState(e){this.visitNode(e),e.entering.forEach(e=>this.visitStateEntry(e)),e.transitions.forEach(e=>this.visitStateTransition(e))}visitStateEntry(e){this.visitNode(e)}visitStateTransition(e){this.visitNode(e),e.when!==null&&this.visitCondition(e.when)}visitWorkflow(e){this.visitNode(e),e.nodes.forEach(e=>this.visitWorkflowNode(e)),e.specifications.forEach(e=>this.visitLifecycleSpecification(e))}visitWorkflowNode(e){this.visitNode(e),e.schedule!==null&&this.visitNode(e.schedule),e.timeout!==null&&this.visitNode(e.timeout),e.retryAfter!==null&&this.visitNode(e.retryAfter),e.condition!==null&&this.visitCondition(e.condition),e.duration!==null&&this.visitNode(e.duration),e.expiresAfter!==null&&this.visitNode(e.expiresAfter),e.edges.forEach(e=>this.visitWorkflowEdge(e))}visitWorkflowEdge(e){this.visitNode(e)}visitLifecycleSpecification(e){this.visitNode(e),e.given.forEach(e=>this.visitSpecificationEvent(e)),e.whenAppended!==null&&this.visitSpecificationEvent(e.whenAppended),e.whenStarted!==null&&this.visitExpression(e.whenStarted),e.outcomes.forEach(e=>this.visitNode(e)),e.then.forEach(e=>this.visitNode(e))}visitOperation(e){this.visitNode(e),e.inputs.forEach(e=>this.visitProperty(e)),e.execute!==null&&this.visitOperationPhase(e.execute),e.compensate!==null&&this.visitOperationPhase(e.compensate)}visitOperationPhase(e){this.visitNode(e),e.implementation!==null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitSpecificationOperationFailure(e){this.visitNode(e)}visitSpecificationCompensated(e){this.visitNode(e)}visitSpecificationOperation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitHandler(e){this.visitNode(e),e.possibleEvents!=null&&this.visitPossibleEvents(e.possibleEvents),e.implementation!=null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitPossibleEvents(e){this.visitNode(e),e.events.forEach(e=>this.visitPossibleEvent(e))}visitPossibleEvent(e){this.visitNode(e),e.stream!==null&&this.visitCommandStream(e.stream),e.tags.forEach(e=>this.visitTag(e))}visitImplementation(e){this.visitNode(e),e.hints.forEach(e=>this.visitImplementationHint(e))}visitImplementationHint(e){this.visitNode(e)}visitFileReference(e){this.visitNode(e)}visitCodeBlock(e){this.visitNode(e)}visitCommandResponse(e){e.kind===`ScalarCommandResponseSyntax`?this.visitScalarCommandResponse(e):this.visitRecordCommandResponse(e)}visitScalarCommandResponse(e){this.visitNode(e),this.visitPropertyResponseSource(e.source)}visitRecordCommandResponse(e){this.visitNode(e),e.fields.forEach(e=>this.visitResponseField(e))}visitResponseField(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type),this.visitPropertyResponseSource(e.source)}visitPropertyResponseSource(e){this.visitNode(e)}visitSpecificationReturn(e){e.kind===`ScalarSpecificationReturnSyntax`?this.visitScalarSpecificationReturn(e):this.visitRecordSpecificationReturn(e)}visitScalarSpecificationReturn(e){this.visitNode(e),this.visitExpression(e.value)}visitRecordSpecificationReturn(e){this.visitNode(e),e.fields.forEach(e=>this.visitPropertyMapping(e))}visitValidate(e){this.visitNode(e),e.kind===`DeclarativeValidateSyntax`?(e.rules.forEach(e=>this.visitValidationRule(e)),e.requirements?.forEach(e=>{this.visitNode(e),this.visitCondition(e.condition)})):e.kind===`FileValidateSyntax`?this.visitFileReference(e.file):e.code!=null&&this.visitCodeBlock(e.code)}visitValidationRule(e){this.visitNode(e),e.implementation!=null&&this.visitImplementation(e.implementation),e.value!==null&&this.visitExpression(e.value),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitEvent(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.tags.forEach(e=>this.visitTag(e))}visitTag(e){this.visitNode(e),this.visitExpression(e.value)}visitReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitConstraint(e){this.visitNode(e),e.kind===`FileConstraintSyntax`&&this.visitNode(e.file),e.additionalRules.forEach(e=>this.visitConstraint(e))}visitQuery(e){this.visitNode(e),this.visitTypeRef(e.returnType),e.by!==null&&this.visitQueryParameter(e.by),e.byParts?.forEach(e=>this.visitQueryParameter(e)),e.filters.forEach(e=>this.visitQueryParameter(e)),e.authorize!==null&&this.visitAuthorize(e.authorize)}visitQueryParameter(e){this.visitNode(e),this.visitTypeRef(e.type),e.source!=null&&this.visitExpression(e.source)}visitKey(e){this.visitNode(e),e.kind===`ExpressionKeySyntax`?this.visitExpression(e.expression):e.parts.forEach(e=>{this.visitNode(e),this.visitExpression(e.expression)})}visitProjection(e){this.visitNode(e),e.key!=null&&this.visitKey(e.key),e.blocks.forEach(e=>this.visitProjectionBlock(e))}visitProjectionBlock(e){switch(this.visitNode(e),e.kind){case`FromSyntax`:e.events.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.key!=null&&this.visitKey(e.key),e.parentKey!=null&&this.visitExpression(e.parentKey),e.mappings.forEach(e=>this.visitMapping(e));break;case`EverySyntax`:case`AllSyntax`:e.mappings.forEach(e=>this.visitMapping(e));break;case`JoinSyntax`:e.events.forEach(e=>this.visitJoinEvent(e));break;case`ProjectionVariantSyntax`:e.entersOn.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`ChildrenSyntax`:e.identifiedBy!==void 0&&this.visitExpression(e.identifiedBy),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`NestedSyntax`:e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`RemoveWithSyntax`:e.partsKey!=null&&this.visitKey(e.partsKey),e.parentKey!=null&&this.visitExpression(e.parentKey),e.key!=null&&this.visitExpression(e.key);break;case`RemoveViaJoinSyntax`:e.key!=null&&this.visitExpression(e.key)}}visitJoinEvent(e){this.visitNode(e),e.mappings.forEach(e=>this.visitMapping(e))}visitMapping(e){this.visitNode(e),e.source!==void 0&&this.visitExpression(e.source),e.value!==void 0&&this.visitExpression(e.value)}visitCondition(e){this.visitNode(e),e.kind===`ComparisonConditionSyntax`?(e.leftExpression!=null&&this.visitExpression(e.leftExpression),this.visitExpression(e.right)):(this.visitCondition(e.left),this.visitCondition(e.right))}visitReaction(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.runsAs!=null&&this.visitReactionIdentity(e.runsAs),e.where!=null&&this.visitCondition(e.where),e.triggers.forEach(e=>this.visitReactionTrigger(e))}visitReactionIdentity(e){this.visitNode(e)}visitReactionTrigger(e){this.visitNode(e),this.visitTriggerSource(e.source),e.produces.forEach(e=>this.visitProduces(e)),e.invokes.forEach(e=>this.visitInvokes(e))}visitProduces(e){this.visitNode(e),e.stream!=null&&this.visitCommandStream(e.stream),e.when!=null&&this.visitCondition(e.when),e.inlineEvent!==null&&this.visitEvent(e.inlineEvent),e.inlineOperation!=null&&this.visitOperation(e.inlineOperation),e.for!==null&&this.visitExpression(e.for),e.mappings.forEach(e=>this.visitPropertyMapping(e)),e.tags.forEach(e=>this.visitTag(e))}visitInvokes(e){this.visitNode(e),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.onRefused?.forEach(e=>this.visitInvocationRefusal(e))}visitInvocationRefusal(e){this.visitNode(e),e.produces.forEach(e=>this.visitProduces(e))}visitCapture(e){this.visitNode(e),e.source!==null&&this.visitCaptureSource(e.source),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e)),e.children.forEach(e=>this.visitCaptureChildren(e)),e.nested.forEach(e=>this.visitCaptureNested(e))}visitCaptureSource(e){this.visitNode(e),e.settings.forEach(e=>this.visitCaptureSourceSetting(e))}visitCaptureSourceSetting(e){this.visitNode(e)}visitCaptureMap(e){this.visitNode(e),this.visitExpression(e.source),e.kind===`CaptureMapEntrySyntax`&&e.translations.forEach(e=>this.visitNode(e))}visitCaptureAppend(e){this.visitNode(e),e.when!=null&&this.visitNode(e.when),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.tags?.forEach(e=>this.visitTag(e))}visitCaptureChildren(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitCaptureNested(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitTriggerSource(e){this.visitNode(e)}visitScreen(e){this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e)),e.contributions?.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))})}visitScreenDirective(e){if(e.kind===`ScreenGuardedActionSyntax`)this.visitScreenGuardedAction(e);else switch(this.visitNode(e),e.kind){case`ScreenDataSyntax`:this.visitTypeRef(e.type);break;case`ScreenActionSyntax`:e.inputs?.forEach(e=>this.visitInteractionArgument(e)),e.navigate!==null&&this.visitScreenDirective(e.navigate);break;case`ScreenNavigateSyntax`:e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)});break;case`ScreenTemplateReferenceSyntax`:e.slots.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenSectionSyntax`:e.directives.forEach(e=>this.visitScreenDirective(e));break;case`ScreenTableSyntax`:e.columns.forEach(e=>this.visitNode(e)),e.rowClick!==null&&this.visitScreenDirective(e.rowClick);break;case`ScreenSummarySyntax`:e.fields.forEach(e=>this.visitNode(e));break;case`ScreenComponentSyntax`:e.context!==null&&this.visitUiBinding(e.context),e.properties.forEach(e=>{this.visitNode(e),e.binding!==null&&this.visitUiBinding(e.binding),e.value!==null&&this.visitExpression(e.value)}),e.exposes.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e)),e.outlets.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenToolbarSyntax`:e.items.forEach(e=>{this.visitNode(e),e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e))}),(e.buttons??[]).forEach(e=>this.visitNode(e));break;case`ScreenCodeSyntax`:this.visitNode(e.code)}}visitScreenGuardedAction(e){this.visitNode(e),e.alternatives.forEach(e=>this.visitScreenActionAlternative(e)),e.otherwise!==null&&this.visitScreenActionOtherwise(e.otherwise),e.navigate!==null&&this.visitScreenDirective(e.navigate)}visitScreenActionAlternative(e){this.visitNode(e),this.visitCondition(e.condition),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitScreenActionOtherwise(e){this.visitNode(e),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitInteractionArgument(e){this.visitNode(e)}visitSpecification(e){this.visitNode(e),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.parameters?.forEach(e=>{this.visitNode(e),this.visitTypeRef(e.type)}),e.cases?.forEach(e=>{this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}),e.givenClock!==null&&this.visitSpecificationClock(e.givenClock),e.givenTimeZone!=null&&this.visitSpecificationTimeZone(e.givenTimeZone),e.givenOperationFailures?.forEach(e=>this.visitSpecificationOperationFailure(e)),e.thenOperations?.forEach(e=>this.visitSpecificationOperation(e)),e.thenCompensated?.forEach(e=>this.visitSpecificationCompensated(e)),e.givenCallerPersona!=null&&this.visitNode(e.givenCallerPersona),e.givenCaller!=null&&(this.visitNode(e.givenCaller),e.givenCaller.claims.forEach(e=>this.visitNode(e))),e.given.forEach(e=>this.visitSpecificationEvent(e)),e.givenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.when!==null&&this.visitSpecificationCommand(e.when),e.givenCaptures.forEach(e=>this.visitSpecificationCapture(e)),e.givenGenerated?.forEach(e=>this.visitSpecificationGeneratedValue(e)),e.whenAppended!==null&&this.visitSpecificationEvent(e.whenAppended),e.whenRedelivered!=null&&this.visitSpecificationRedelivery(e.whenRedelivered),e.whenClock!==null&&this.visitSpecificationClock(e.whenClock),e.whenTrigger!==null&&this.visitSpecificationTrigger(e.whenTrigger),e.whenCapture!==null&&this.visitSpecificationCapture(e.whenCapture),e.whenQuery!==null&&this.visitSpecificationWhenQuery(e.whenQuery),e.thenEvents.forEach(e=>this.visitSpecificationEvent(e)),e.thenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.thenAbsentReadModels?.forEach(e=>{this.visitNode(e),this.visitExpression(e.key)}),e.thenQueries?.forEach(e=>{this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e)),e.results.forEach(e=>this.visitSpecificationQueryResult(e))}),e.thenResults.forEach(e=>this.visitSpecificationQueryResult(e)),e.thenNoResult!==null&&this.visitNode(e.thenNoResult),e.thenDenied!=null&&this.visitNode(e.thenDenied),e.thenReturns!=null&&this.visitSpecificationReturn(e.thenReturns),e.thenErrors.forEach(e=>{this.visitNode(e),e.caseValue!=null&&this.visitExpression(e.caseValue)}),e.thenInvocations?.forEach(e=>this.visitSpecificationInvocation(e))}visitSpecificationInvocation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationRedelivery(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationClock(e){this.visitNode(e)}visitSpecificationTrigger(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationGeneratedValue(e){this.visitNode(e),this.visitExpression(e.source)}visitSpecificationCapture(e){this.visitNode(e),e.record.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationWhenQuery(e){this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationQueryResult(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationExample(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.generatedValues.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationEvent(e){this.visitNode(e),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationNoStream(e){this.visitNode(e)}visitSpecificationCommand(e){this.visitNode(e),(e.generatedValues??[]).forEach(e=>this.visitPropertyMapping(e)),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitPropertyMapping(e){this.visitNode(e),this.visitExpression(e.source)}visitProperty(e){this.visitNode(e),this.visitTypeRef(e.type)}visitTypeRef(e){this.visitNode(e)}visitUiBinding(e){this.visitNode(e),e.literal!==null&&this.visitExpression(e.literal)}visitIdentityExpression(e){this.visitNode(e)}visitExpression(e){e.kind===`IdentityExpressionSyntax`?this.visitIdentityExpression(e):(this.visitNode(e),e.kind===`ListExpressionSyntax`?e.items.forEach(e=>this.visitExpression(e)):e.kind===`ObjectExpressionSyntax`?e.members.forEach(e=>this.visitObjectMember(e)):e.kind===`DateOfExpressionSyntax`?this.visitExpression(e.operand):e.kind===`TemplateExpressionSyntax`&&e.parts.forEach(e=>{this.visitNode(e),e.kind===`TemplateInterpolationSyntax`&&this.visitExpression(e.expression)}))}visitObjectMember(e){this.visitNode(e),this.visitExpression(e.value)}};export{ScreenplaySyntaxWalker};
|
|
1
|
+
import"../../_virtual/_virtual/_rolldown/runtime.js";var ScreenplaySyntaxWalker=class{visitNode(e){}visitApplication(e){this.visitNode(e),e.domain!==null&&this.visitDomain(e.domain),e.timeZone!=null&&this.visitTimeZone(e.timeZone),e.context!=null&&this.visitApplicationContext(e.context),e.imports.forEach(e=>this.visitImport(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.systems?.forEach(e=>this.visitSystem(e)),e.stateMachines?.forEach(e=>this.visitStateMachine(e)),e.workflows?.forEach(e=>this.visitWorkflow(e)),e.eventSources?.forEach(e=>this.visitEventSource(e)),e.concepts.forEach(e=>this.visitConcept(e)),e.types.forEach(e=>this.visitType(e)),e.personas.forEach(e=>this.visitPersona(e)),e.policies?.forEach(e=>this.visitPolicy(e)),e.stickyNotes?.forEach(e=>this.visitStickyNote(e)),e.exposures?.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitNode(e))}),e.instanceContributions?.forEach(e=>{this.visitNode(e),e.contributions.forEach(e=>{this.visitNode(e),e.value!==null&&this.visitExpression(e.value),e.items.forEach(e=>{this.visitNode(e),e.values.forEach(e=>{this.visitNode(e),this.visitExpression(e.value)})})})}),e.identity!=null&&this.visitIdentity(e.identity),e.purposes?.forEach(e=>this.visitPurpose(e)),e.seeds?.forEach(e=>this.visitSeed(e)),e.modules.forEach(e=>this.visitModule(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e))}visitIdentity(e){this.visitNode(e),e.details.forEach(e=>this.visitIdentityDetail(e))}visitIdentityDetail(e){this.visitNode(e),this.visitTypeRef(e.type),this.visitIdentitySource(e.source)}visitIdentitySource(e){switch(e.kind){case`ClaimIdentitySourceSyntax`:this.visitClaimIdentitySource(e);break;case`QueryIdentitySourceSyntax`:this.visitQueryIdentitySource(e);break;case`CodeIdentitySourceSyntax`:this.visitCodeIdentitySource(e);break;case`FileIdentitySourceSyntax`:this.visitFileIdentitySource(e);break;default:this.visitNode(e)}}visitClaimIdentitySource(e){this.visitNode(e)}visitQueryIdentitySource(e){this.visitNode(e),this.visitExpression(e.by)}visitCodeIdentitySource(e){this.visitNode(e),this.visitCodeBlock(e.code)}visitFileIdentitySource(e){this.visitNode(e),this.visitFileReference(e.file)}visitPurpose(e){this.visitNode(e),e.transfers.forEach(e=>this.visitPurposeTransfer(e))}visitPurposeReference(e){this.visitNode(e)}visitPurposeTransfer(e){this.visitNode(e)}visitPolicy(e){this.visitNode(e),e.condition!==null&&this.visitPolicyCondition(e.condition),e.code!==null&&this.visitCodeBlock(e.code),e.file!==null&&this.visitFileReference(e.file)}visitPolicyCondition(e){this.visitNode(e),e.kind===`ClaimConditionSyntax`&&e.matches!==null&&this.visitExpression(e.matches),e.kind===`NotPolicyConditionSyntax`&&this.visitPolicyCondition(e.operand),e.kind===`LogicalPolicyConditionSyntax`&&(this.visitPolicyCondition(e.left),this.visitPolicyCondition(e.right))}visitSeed(e){this.visitNode(e),e.groups.forEach(e=>{this.visitNode(e),e.events.forEach(e=>{this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))})})}visitPersona(e){this.visitNode(e)}visitStickyNote(e){this.visitNode(e)}visitAuthorize(e){this.visitNode(e),this.visitPolicyRequirement(e.requirement)}visitPolicyRequirement(e){this.visitNode(e),e.kind===`LogicalPolicyRequirementSyntax`&&(this.visitPolicyRequirement(e.left),this.visitPolicyRequirement(e.right))}visitDomain(e){this.visitNode(e)}visitImport(e){this.visitNode(e)}visitFileImport(e){this.visitNode(e)}visitGeneration(e){this.visitNode(e),e.file&&this.visitFileReference(e.file),e.code&&this.visitCodeBlock(e.code)}visitConcept(e){this.visitNode(e),e.attributes.forEach(e=>this.visitNode(e)),e.generation&&this.visitGeneration(e.generation),e.validations?.forEach(e=>this.visitValidate(e))}visitType(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitDependsOn(e){this.visitNode(e)}visitModule(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.toolbars?.forEach(e=>this.visitScreenDirective(e)),e.features.forEach(e=>this.visitFeature(e))}visitFeature(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.dependsOn?.forEach(e=>this.visitDependsOn(e)),e.fileImports.forEach(e=>this.visitFileImport(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.features.forEach(e=>this.visitFeature(e)),e.slices.forEach(e=>this.visitSlice(e)),e.toolbars?.forEach(e=>this.visitScreenDirective(e))}visitSlice(e){this.visitNode(e),e.purposes?.forEach(e=>this.visitPurposeReference(e)),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.commands.forEach(e=>this.visitCommand(e)),e.operations?.forEach(e=>this.visitOperation(e)),e.events.forEach(e=>this.visitEvent(e)),e.constraints.forEach(e=>this.visitConstraint(e)),e.queries.forEach(e=>this.visitQuery(e)),e.projections.forEach(e=>this.visitProjection(e)),e.readModels.forEach(e=>this.visitReadModel(e)),e.captures.forEach(e=>this.visitCapture(e)),e.reactions.forEach(e=>this.visitReaction(e)),e.screens.forEach(e=>this.visitScreen(e)),e.specifications.forEach(e=>this.visitSpecification(e))}visitTriggerData(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type)}visitReads(e){this.visitNode(e),e.byParts?.forEach(e=>this.visitPropertyMapping(e))}visitConcurrency(e){this.visitNode(e)}visitReducer(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.rules.forEach(e=>this.visitReducerRule(e))}visitReducerRule(e){this.visitNode(e),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitForm(e){this.visitNode(e),e.populate!==null&&this.visitNode(e.populate),e.fields.forEach(e=>this.visitNode(e)),e.columns?.forEach(e=>this.visitNode(e)),e.layout!==null&&e.layout!==void 0&&(this.visitNode(e.layout),e.layout.columns.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width),e.minWidth!==null&&this.visitNode(e.minWidth),e.maxWidth!==null&&this.visitNode(e.maxWidth)}),e.layout.columnGap!==null&&this.visitNode(e.layout.columnGap),e.layout.rowGap!==null&&this.visitNode(e.layout.rowGap),e.layout.placements.forEach(e=>{this.visitNode(e),e.width!==null&&this.visitNode(e.width)})),e.onSubmit!==null&&this.visitScreenDirective(e.onSubmit)}visitApplicationContext(e){this.visitNode(e),e.members.forEach(e=>this.visitContextMember(e))}visitContextMember(e){this.visitNode(e)}visitTimeZone(e){this.visitNode(e)}visitCommandCalendar(e){this.visitNode(e)}visitSpecificationTimeZone(e){this.visitNode(e)}visitCommand(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.authorize!==null&&this.visitAuthorize(e.authorize),e.stream!=null&&this.visitCommandStream(e.stream),e.calendar!=null&&this.visitCommandCalendar(e.calendar),e.streamCandidates?.forEach(e=>this.visitCommandStream(e)),e.validations.forEach(e=>this.visitValidate(e)),e.produces.forEach(e=>this.visitProduces(e)),e.handler!=null&&this.visitHandler(e.handler),e.response!=null&&this.visitCommandResponse(e.response)}visitEventSource(e){this.visitNode(e),e.identifier!==null&&this.visitTypeRef(e.identifier),e.streams.forEach(e=>this.visitEventStream(e))}visitEventStream(e){this.visitNode(e),e.streamId!==null&&this.visitTypeRef(e.streamId),e.streamIdParts.forEach(e=>this.visitEventStreamIdPart(e))}visitEventStreamIdPart(e){this.visitNode(e),this.visitTypeRef(e.type)}visitObserverFilter(e){this.visitNode(e)}visitCommandStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e)),e.propertyCandidate!==null&&this.visitProperty(e.propertyCandidate)}visitSystem(e){this.visitNode(e)}visitStateMachine(e){this.visitNode(e),e.states.forEach(e=>this.visitState(e)),e.specifications.forEach(e=>this.visitLifecycleSpecification(e))}visitState(e){this.visitNode(e),e.entering.forEach(e=>this.visitStateEntry(e)),e.transitions.forEach(e=>this.visitStateTransition(e))}visitStateEntry(e){this.visitNode(e)}visitStateTransition(e){this.visitNode(e),e.when!==null&&this.visitCondition(e.when)}visitWorkflow(e){this.visitNode(e),e.nodes.forEach(e=>this.visitWorkflowNode(e)),e.specifications.forEach(e=>this.visitLifecycleSpecification(e))}visitWorkflowNode(e){this.visitNode(e),e.schedule!==null&&this.visitNode(e.schedule),e.timeout!==null&&this.visitNode(e.timeout),e.retryAfter!==null&&this.visitNode(e.retryAfter),e.condition!==null&&this.visitCondition(e.condition),e.duration!==null&&this.visitNode(e.duration),e.expiresAfter!==null&&this.visitNode(e.expiresAfter),e.edges.forEach(e=>this.visitWorkflowEdge(e))}visitWorkflowEdge(e){this.visitNode(e)}visitLifecycleSpecification(e){this.visitNode(e),e.given.forEach(e=>this.visitSpecificationEvent(e)),e.whenAppended!==null&&this.visitSpecificationEvent(e.whenAppended),e.whenStarted!==null&&this.visitExpression(e.whenStarted),e.outcomes.forEach(e=>this.visitNode(e)),e.then.forEach(e=>this.visitNode(e))}visitOperation(e){this.visitNode(e),e.inputs.forEach(e=>this.visitProperty(e)),e.execute!==null&&this.visitOperationPhase(e.execute),e.compensate!==null&&this.visitOperationPhase(e.compensate)}visitOperationPhase(e){this.visitNode(e),e.implementation!==null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitSpecificationOperationFailure(e){this.visitNode(e)}visitSpecificationCompensated(e){this.visitNode(e)}visitSpecificationOperation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitHandler(e){this.visitNode(e),e.possibleEvents!=null&&this.visitPossibleEvents(e.possibleEvents),e.implementation!=null&&this.visitImplementation(e.implementation),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitPossibleEvents(e){this.visitNode(e),e.events.forEach(e=>this.visitPossibleEvent(e))}visitPossibleEvent(e){this.visitNode(e),e.stream!==null&&this.visitCommandStream(e.stream),e.tags.forEach(e=>this.visitTag(e))}visitImplementation(e){this.visitNode(e),e.hints.forEach(e=>this.visitImplementationHint(e))}visitImplementationHint(e){this.visitNode(e)}visitFileReference(e){this.visitNode(e)}visitCodeBlock(e){this.visitNode(e)}visitCommandResponse(e){e.kind===`ScalarCommandResponseSyntax`?this.visitScalarCommandResponse(e):this.visitRecordCommandResponse(e)}visitScalarCommandResponse(e){this.visitNode(e),this.visitPropertyResponseSource(e.source)}visitRecordCommandResponse(e){this.visitNode(e),e.fields.forEach(e=>this.visitResponseField(e))}visitResponseField(e){this.visitNode(e),e.type!==null&&this.visitTypeRef(e.type),this.visitPropertyResponseSource(e.source)}visitPropertyResponseSource(e){this.visitNode(e)}visitSpecificationReturn(e){e.kind===`ScalarSpecificationReturnSyntax`?this.visitScalarSpecificationReturn(e):this.visitRecordSpecificationReturn(e)}visitScalarSpecificationReturn(e){this.visitNode(e),this.visitExpression(e.value)}visitRecordSpecificationReturn(e){this.visitNode(e),e.fields.forEach(e=>this.visitPropertyMapping(e))}visitValidate(e){this.visitNode(e),e.kind===`DeclarativeValidateSyntax`?(e.rules.forEach(e=>this.visitValidationRule(e)),e.requirements?.forEach(e=>{this.visitNode(e),this.visitCondition(e.condition)})):e.kind===`FileValidateSyntax`?this.visitFileReference(e.file):e.code!=null&&this.visitCodeBlock(e.code)}visitValidationRule(e){this.visitNode(e),e.implementation!=null&&this.visitImplementation(e.implementation),e.value!==null&&this.visitExpression(e.value),e.file!==null&&this.visitFileReference(e.file),e.code!==null&&this.visitCodeBlock(e.code)}visitEvent(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e)),e.tags.forEach(e=>this.visitTag(e))}visitTag(e){this.visitNode(e),this.visitExpression(e.value)}visitReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitProperty(e))}visitConstraint(e){this.visitNode(e),e.kind===`FileConstraintSyntax`&&this.visitNode(e.file),e.additionalRules.forEach(e=>this.visitConstraint(e))}visitQuery(e){this.visitNode(e),this.visitTypeRef(e.returnType),e.by!==null&&this.visitQueryParameter(e.by),e.byParts?.forEach(e=>this.visitQueryParameter(e)),e.filters.forEach(e=>this.visitQueryParameter(e)),e.authorize!==null&&this.visitAuthorize(e.authorize)}visitQueryParameter(e){this.visitNode(e),this.visitTypeRef(e.type),e.source!=null&&this.visitExpression(e.source)}visitKey(e){this.visitNode(e),e.kind===`ExpressionKeySyntax`?this.visitExpression(e.expression):e.parts.forEach(e=>{this.visitNode(e),this.visitExpression(e.expression)})}visitProjection(e){this.visitNode(e),e.key!=null&&this.visitKey(e.key),e.blocks.forEach(e=>this.visitProjectionBlock(e))}visitProjectionBlock(e){switch(this.visitNode(e),e.kind){case`FromSyntax`:e.events.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.key!=null&&this.visitKey(e.key),e.parentKey!=null&&this.visitExpression(e.parentKey),e.mappings.forEach(e=>this.visitMapping(e));break;case`EverySyntax`:case`AllSyntax`:e.mappings.forEach(e=>this.visitMapping(e));break;case`JoinSyntax`:e.events.forEach(e=>this.visitJoinEvent(e));break;case`ProjectionVariantSyntax`:e.entersOn.forEach(e=>{this.visitNode(e),e.key!=null&&this.visitExpression(e.key)}),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`ChildrenSyntax`:e.identifiedBy!==void 0&&this.visitExpression(e.identifiedBy),e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`NestedSyntax`:e.blocks.forEach(e=>this.visitProjectionBlock(e));break;case`RemoveWithSyntax`:e.partsKey!=null&&this.visitKey(e.partsKey),e.parentKey!=null&&this.visitExpression(e.parentKey),e.key!=null&&this.visitExpression(e.key);break;case`RemoveViaJoinSyntax`:e.key!=null&&this.visitExpression(e.key)}}visitJoinEvent(e){this.visitNode(e),e.mappings.forEach(e=>this.visitMapping(e))}visitMapping(e){this.visitNode(e),e.source!==void 0&&this.visitExpression(e.source),e.value!==void 0&&this.visitExpression(e.value)}visitCondition(e){this.visitNode(e),e.kind===`ComparisonConditionSyntax`?(e.leftExpression!=null&&this.visitExpression(e.leftExpression),this.visitExpression(e.right)):(this.visitCondition(e.left),this.visitCondition(e.right))}visitReaction(e){this.visitNode(e),e.from!=null&&this.visitObserverFilter(e.from),e.runsAs!=null&&this.visitReactionIdentity(e.runsAs),e.where!=null&&this.visitCondition(e.where),e.triggers.forEach(e=>this.visitReactionTrigger(e))}visitReactionIdentity(e){this.visitNode(e)}visitReactionTrigger(e){this.visitNode(e),this.visitTriggerSource(e.source),e.produces.forEach(e=>this.visitProduces(e)),e.invokes.forEach(e=>this.visitInvokes(e))}visitProduces(e){this.visitNode(e),e.stream!=null&&this.visitCommandStream(e.stream),e.when!=null&&this.visitCondition(e.when),e.inlineEvent!==null&&this.visitEvent(e.inlineEvent),e.inlineOperation!=null&&this.visitOperation(e.inlineOperation),e.for!==null&&this.visitExpression(e.for),e.mappings.forEach(e=>this.visitPropertyMapping(e)),e.tags.forEach(e=>this.visitTag(e))}visitInvokes(e){this.visitNode(e),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.onRefused?.forEach(e=>this.visitInvocationRefusal(e))}visitInvocationRefusal(e){this.visitNode(e),e.produces.forEach(e=>this.visitProduces(e))}visitCapture(e){this.visitNode(e),e.source!==null&&this.visitCaptureSource(e.source),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e)),e.children.forEach(e=>this.visitCaptureChildren(e)),e.nested.forEach(e=>this.visitCaptureNested(e))}visitCaptureSource(e){this.visitNode(e),e.settings.forEach(e=>this.visitCaptureSourceSetting(e))}visitCaptureSourceSetting(e){this.visitNode(e)}visitCaptureMap(e){this.visitNode(e),this.visitExpression(e.source),e.kind===`CaptureMapEntrySyntax`&&e.translations.forEach(e=>this.visitNode(e))}visitCaptureAppend(e){this.visitNode(e),e.when!=null&&this.visitNode(e.when),e.mappings?.forEach(e=>this.visitPropertyMapping(e)),e.tags?.forEach(e=>this.visitTag(e))}visitCaptureChildren(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitCaptureNested(e){this.visitNode(e),e.map?.forEach(e=>this.visitCaptureMap(e)),e.appends.forEach(e=>this.visitCaptureAppend(e))}visitTriggerSource(e){this.visitNode(e)}visitScreen(e){this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e)),e.contributions?.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))})}visitScreenDirective(e){if(e.kind===`ScreenGuardedActionSyntax`)this.visitScreenGuardedAction(e);else switch(this.visitNode(e),e.kind){case`ScreenDataSyntax`:this.visitTypeRef(e.type);break;case`ScreenActionSyntax`:e.inputs?.forEach(e=>this.visitInteractionArgument(e)),e.navigate!==null&&this.visitScreenDirective(e.navigate);break;case`ScreenNavigateSyntax`:e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)});break;case`ScreenTemplateReferenceSyntax`:e.slots.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenSectionSyntax`:e.directives.forEach(e=>this.visitScreenDirective(e));break;case`ScreenTableSyntax`:e.columns.forEach(e=>this.visitNode(e)),e.rowClick!==null&&this.visitScreenDirective(e.rowClick);break;case`ScreenSummarySyntax`:e.fields.forEach(e=>this.visitNode(e));break;case`ScreenComponentSyntax`:e.context!==null&&this.visitUiBinding(e.context),e.properties.forEach(e=>{this.visitNode(e),e.binding!==null&&this.visitUiBinding(e.binding),e.value!==null&&this.visitExpression(e.value)}),e.exposes.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e)),e.outlets.forEach(e=>{this.visitNode(e),e.directives.forEach(e=>this.visitScreenDirective(e))});break;case`ScreenToolbarSyntax`:e.items.forEach(e=>{this.visitNode(e),e.parameters.forEach(e=>{this.visitNode(e),this.visitUiBinding(e.binding)}),e.presentation.forEach(e=>this.visitNode(e))}),(e.buttons??[]).forEach(e=>this.visitNode(e));break;case`ScreenCodeSyntax`:this.visitNode(e.code)}}visitScreenGuardedAction(e){this.visitNode(e),e.alternatives.forEach(e=>this.visitScreenActionAlternative(e)),e.otherwise!==null&&this.visitScreenActionOtherwise(e.otherwise),e.navigate!==null&&this.visitScreenDirective(e.navigate)}visitScreenActionAlternative(e){this.visitNode(e),this.visitCondition(e.condition),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitScreenActionOtherwise(e){this.visitNode(e),e.arguments.forEach(e=>this.visitInteractionArgument(e))}visitInteractionArgument(e){this.visitNode(e)}visitSpecification(e){this.visitNode(e),e.examples?.forEach(e=>this.visitSpecificationExample(e)),e.parameters?.forEach(e=>{this.visitNode(e),this.visitTypeRef(e.type)}),e.cases?.forEach(e=>{this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}),e.givenClock!==null&&this.visitSpecificationClock(e.givenClock),e.givenTimeZone!=null&&this.visitSpecificationTimeZone(e.givenTimeZone),e.givenOperationFailures?.forEach(e=>this.visitSpecificationOperationFailure(e)),e.thenOperations?.forEach(e=>this.visitSpecificationOperation(e)),e.thenCompensated?.forEach(e=>this.visitSpecificationCompensated(e)),e.givenCallerPersona!=null&&this.visitNode(e.givenCallerPersona),e.givenCaller!=null&&(this.visitNode(e.givenCaller),e.givenCaller.claims.forEach(e=>this.visitNode(e))),e.given.forEach(e=>this.visitSpecificationEvent(e)),e.givenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.when!==null&&this.visitSpecificationCommand(e.when),e.givenCaptures.forEach(e=>this.visitSpecificationCapture(e)),e.givenGenerated?.forEach(e=>this.visitSpecificationGeneratedValue(e)),e.whenAppended!==null&&this.visitSpecificationEvent(e.whenAppended),e.whenRedelivered!=null&&this.visitSpecificationRedelivery(e.whenRedelivered),e.whenClock!==null&&this.visitSpecificationClock(e.whenClock),e.whenTrigger!==null&&this.visitSpecificationTrigger(e.whenTrigger),e.whenCapture!==null&&this.visitSpecificationCapture(e.whenCapture),e.whenQuery!==null&&this.visitSpecificationWhenQuery(e.whenQuery),e.thenEvents.forEach(e=>this.visitSpecificationEvent(e)),e.thenReadModels.forEach(e=>this.visitSpecificationReadModel(e)),e.thenAbsentReadModels?.forEach(e=>{this.visitNode(e),this.visitExpression(e.key)}),e.thenQueries?.forEach(e=>{this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e)),e.results.forEach(e=>this.visitSpecificationQueryResult(e))}),e.thenResults.forEach(e=>this.visitSpecificationQueryResult(e)),e.thenNoResult!==null&&this.visitNode(e.thenNoResult),e.thenDenied!=null&&this.visitNode(e.thenDenied),e.thenReturns!=null&&this.visitSpecificationReturn(e.thenReturns),e.thenErrors.forEach(e=>{this.visitNode(e),e.caseValue!=null&&this.visitExpression(e.caseValue)}),e.thenInvocations?.forEach(e=>this.visitSpecificationInvocation(e))}visitSpecificationInvocation(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationRedelivery(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationClock(e){this.visitNode(e)}visitSpecificationTrigger(e){this.visitNode(e),e.values.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationGeneratedValue(e){this.visitNode(e),this.visitExpression(e.source)}visitSpecificationCapture(e){this.visitNode(e),e.record.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationWhenQuery(e){this.visitNode(e),e.arguments.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationQueryResult(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationExample(e){this.visitNode(e),e.for!==null&&this.visitExpression(e.for),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.generatedValues.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationEvent(e){this.visitNode(e),e.stream!=null&&this.visitSpecificationStream(e.stream),e.noStream!=null&&this.visitSpecificationNoStream(e.noStream),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationStream(e){this.visitNode(e),e.streamId!==null&&this.visitPropertyMapping(e.streamId),e.streamIdParts.forEach(e=>this.visitPropertyMapping(e))}visitSpecificationNoStream(e){this.visitNode(e)}visitSpecificationCommand(e){this.visitNode(e),(e.generatedValues??[]).forEach(e=>this.visitPropertyMapping(e)),e.values.forEach(e=>this.visitPropertyMapping(e)),e.for!==null&&this.visitExpression(e.for)}visitSpecificationReadModel(e){this.visitNode(e),e.properties.forEach(e=>this.visitPropertyMapping(e))}visitPropertyMapping(e){this.visitNode(e),this.visitExpression(e.source)}visitProperty(e){this.visitNode(e),this.visitTypeRef(e.type)}visitTypeRef(e){this.visitNode(e)}visitUiBinding(e){this.visitNode(e),e.literal!==null&&this.visitExpression(e.literal)}visitIdentityExpression(e){this.visitNode(e)}visitExpression(e){e.kind===`IdentityExpressionSyntax`?this.visitIdentityExpression(e):(this.visitNode(e),e.kind===`ListExpressionSyntax`?e.items.forEach(e=>this.visitExpression(e)):e.kind===`ObjectExpressionSyntax`?e.members.forEach(e=>this.visitObjectMember(e)):e.kind===`DateOfExpressionSyntax`?this.visitExpression(e.operand):e.kind===`TemplateExpressionSyntax`&&e.parts.forEach(e=>{this.visitNode(e),e.kind===`TemplateInterpolationSyntax`&&this.visitExpression(e.expression)}))}visitObjectMember(e){this.visitNode(e),this.visitExpression(e.value)}};export{ScreenplaySyntaxWalker};
|
|
2
2
|
//# sourceMappingURL=ScreenplaySyntaxWalker.js.map
|