@cratis/screenplay-language 4.213.2 → 4.213.4
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/compiler/Diagnostics/DiagnosticCodes.js +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.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/Parsing/EventSourceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.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/SpecificationStreamValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -1
- package/dist/bundles/diagnostic-codes.js +1 -1
- package/dist/bundles/diagnostic-codes.js.map +1 -1
- package/dist/bundles/validation.js +1 -1
- package/dist/bundles/validation.js.map +1 -1
- package/dist/diagnostic-codes.d.ts +1 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e={UnknownMatchPattern:`PLAY0366`,InvalidMatchPattern:`PLAY0367`,PatternOutsidePortableMatchDialect:`PLAY0699`,DeprecatedStudioTextRulePattern:`PLAY0787`,InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,CaptureEventsFromSeveralOrigins:`PLAY0687`,DirectionlessTranslationReactsToOwnCapture:`PLAY0694`,PendingIntentWithOtherHandler:`PLAY0698`,CommandHandlerRequiresAttachment:`PLAY0800`,DescribedCommandNotImplemented:`PLAY0695`,DescribedCommandWithoutProductions:`PLAY0696`,DescribedCommandCardinalityNotAdmitted:`PLAY0697`,CaptureEventsKeyNotRequired:`PLAY0700`,CaptureEventsRecordFixture:`PLAY0701`,RefutedGeneratedConceptRule:`PLAY0688`,UnprovenGeneratedConceptRule:`PLAY0689`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,UnknownNavigationDestination:`PLAY0654`,UnknownScreenContributionPoint:`PLAY0655`,TemplateNestingCycle:`PLAY0656`,TemplateCategoryMissing:`PLAY0720`,InvalidTemplateVersionRange:`PLAY0721`,LegacyProfileLayout:`PLAY0791`,UnknownTemplateBlueprint:`PLAY0722`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,UnknownLayoutDirective:`PLAY0026`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateEventInProjectionScope:`PLAY0801`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,MismatchedSpecificationQueryResult:`PLAY0465`,UnknownSpecificationQueryArgument:`PLAY0468`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`,InvalidReadModelKey:`PLAY0660`,IncompleteReadModelKey:`PLAY0661`,InvalidReadModelKeyLookup:`PLAY0662`,ProductionRouteOutsideCommand:`PLAY0663`,RedundantProductionRoute:`PLAY0664`,InvalidObserverFilter:`PLAY0665`,ObserverFilterExcludesEveryProducer:`PLAY0666`,ReducerIdentityMismatch:`PLAY0690`,InvalidReactionBatchesDeclaration:`PLAY0693`,InvalidCommandReadsDeclaration:`PLAY0780`,GenerationSupportBudgetExceeded:`PLAY0691`,EmptyGenerationSupport:`PLAY0692`,MixedEnumerationNumbering:`PLAY0667`,DuplicateEnumerationNumber:`PLAY0668`,EnumerationNumberOutsideInt32:`PLAY0669`,MalformedEnumerationNumber:`PLAY0670`,UnpinnedStoredEnumeration:`PLAY0671`,ReadsWithChildren:`PLAY0451`,UnknownGenerationStrategy:`PLAY0672`,InvalidGenerationArgument:`PLAY0673`,InvalidGenerationModifier:`PLAY0674`,DuplicateGenerationModifier:`PLAY0675`,DuplicateGeneration:`PLAY0676`,InvalidGenerationPrimitive:`PLAY0677`,InvalidGenerationPrefix:`PLAY0678`,InvalidGenerationAlphabet:`PLAY0679`,InvalidTypeIdPrefix:`PLAY0680`,GenerationSizeOutsideRange:`PLAY0681`,ReservedSequenceGeneration:`PLAY0682`,LowGenerationEntropy:`PLAY0683`,LowGeneratedIdentifierEntropy:`PLAY0684`,ResponseNameUsedOnFailure:`PLAY0685`,EventIdPinNotCarriedToRenderers:`PLAY0686`,InvalidToolbarButton:`PLAY0760`};export{e as DiagnosticCodes};
|
|
1
|
+
const e={UnknownMatchPattern:`PLAY0366`,InvalidMatchPattern:`PLAY0367`,PatternOutsidePortableMatchDialect:`PLAY0699`,DeprecatedStudioTextRulePattern:`PLAY0787`,InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,CaptureEventsFromSeveralOrigins:`PLAY0687`,DirectionlessTranslationReactsToOwnCapture:`PLAY0694`,PendingIntentWithOtherHandler:`PLAY0698`,CommandHandlerRequiresAttachment:`PLAY0800`,DescribedCommandNotImplemented:`PLAY0695`,DescribedCommandWithoutProductions:`PLAY0696`,DescribedCommandCardinalityNotAdmitted:`PLAY0697`,CaptureEventsKeyNotRequired:`PLAY0700`,CaptureEventsRecordFixture:`PLAY0701`,RefutedGeneratedConceptRule:`PLAY0688`,UnprovenGeneratedConceptRule:`PLAY0689`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,UnknownNavigationDestination:`PLAY0654`,UnknownScreenContributionPoint:`PLAY0655`,TemplateNestingCycle:`PLAY0656`,TemplateCategoryMissing:`PLAY0720`,InvalidTemplateVersionRange:`PLAY0721`,LegacyProfileLayout:`PLAY0791`,UnknownTemplateBlueprint:`PLAY0722`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,UnknownLayoutDirective:`PLAY0026`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateEventInProjectionScope:`PLAY0801`,ReservedStoredName:`PLAY0802`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,MismatchedSpecificationQueryResult:`PLAY0465`,UnknownSpecificationQueryArgument:`PLAY0468`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`,InvalidReadModelKey:`PLAY0660`,IncompleteReadModelKey:`PLAY0661`,InvalidReadModelKeyLookup:`PLAY0662`,ProductionRouteOutsideCommand:`PLAY0663`,RedundantProductionRoute:`PLAY0664`,InvalidObserverFilter:`PLAY0665`,ObserverFilterExcludesEveryProducer:`PLAY0666`,ReducerIdentityMismatch:`PLAY0690`,InvalidReactionBatchesDeclaration:`PLAY0693`,InvalidCommandReadsDeclaration:`PLAY0780`,GenerationSupportBudgetExceeded:`PLAY0691`,EmptyGenerationSupport:`PLAY0692`,MixedEnumerationNumbering:`PLAY0667`,DuplicateEnumerationNumber:`PLAY0668`,EnumerationNumberOutsideInt32:`PLAY0669`,MalformedEnumerationNumber:`PLAY0670`,UnpinnedStoredEnumeration:`PLAY0671`,ReadsWithChildren:`PLAY0451`,UnknownGenerationStrategy:`PLAY0672`,InvalidGenerationArgument:`PLAY0673`,InvalidGenerationModifier:`PLAY0674`,DuplicateGenerationModifier:`PLAY0675`,DuplicateGeneration:`PLAY0676`,InvalidGenerationPrimitive:`PLAY0677`,InvalidGenerationPrefix:`PLAY0678`,InvalidGenerationAlphabet:`PLAY0679`,InvalidTypeIdPrefix:`PLAY0680`,GenerationSizeOutsideRange:`PLAY0681`,ReservedSequenceGeneration:`PLAY0682`,LowGenerationEntropy:`PLAY0683`,LowGeneratedIdentifierEntropy:`PLAY0684`,ResponseNameUsedOnFailure:`PLAY0685`,EventIdPinNotCarriedToRenderers:`PLAY0686`,InvalidToolbarButton:`PLAY0760`};export{e as DiagnosticCodes};
|
|
2
2
|
//# sourceMappingURL=DiagnosticCodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.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// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n UnknownMatchPattern: 'PLAY0366',\n InvalidMatchPattern: 'PLAY0367',\n PatternOutsidePortableMatchDialect: 'PLAY0699',\n DeprecatedStudioTextRulePattern: 'PLAY0787',\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n CaptureEventsFromSeveralOrigins: 'PLAY0687',\n DirectionlessTranslationReactsToOwnCapture: 'PLAY0694',\n PendingIntentWithOtherHandler: 'PLAY0698',\n CommandHandlerRequiresAttachment: 'PLAY0800', // C# only\n DescribedCommandNotImplemented: 'PLAY0695', // C# only\n DescribedCommandWithoutProductions: 'PLAY0696', // C# only\n DescribedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n CaptureEventsKeyNotRequired: 'PLAY0700',\n CaptureEventsRecordFixture: 'PLAY0701',\n RefutedGeneratedConceptRule: 'PLAY0688',\n UnprovenGeneratedConceptRule: 'PLAY0689',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n UnknownNavigationDestination: 'PLAY0654',\n UnknownScreenContributionPoint: 'PLAY0655',\n TemplateNestingCycle: 'PLAY0656',\n TemplateCategoryMissing: 'PLAY0720', // C# only: template declarations are not modeled by this compiler.\n InvalidTemplateVersionRange: 'PLAY0721',\n LegacyProfileLayout: 'PLAY0791', // The other ui profile root template rules (PLAY0790, PLAY0792-PLAY0799) are C# only: this compiler does not model a ui profile.\n UnknownTemplateBlueprint: 'PLAY0722', // C# only: ui profile packages are not modeled by this compiler.\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n UnknownLayoutDirective: 'PLAY0026',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n /** An event is used more than once in one projection level's event or join set. */\n DuplicateEventInProjectionScope: 'PLAY0801',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n MismatchedSpecificationQueryResult: 'PLAY0465',\n UnknownSpecificationQueryArgument: 'PLAY0468',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n InvalidReadModelKey: 'PLAY0660',\n IncompleteReadModelKey: 'PLAY0661', // C# only: scoped read-model key resolution.\n InvalidReadModelKeyLookup: 'PLAY0662', // Shape checks shared; scoped lookup checks are C# only.\n ProductionRouteOutsideCommand: 'PLAY0663',\n RedundantProductionRoute: 'PLAY0664',\n InvalidObserverFilter: 'PLAY0665',\n ObserverFilterExcludesEveryProducer: 'PLAY0666', // C# only: statically known producer routes.\n ReducerIdentityMismatch: 'PLAY0690',\n InvalidReactionBatchesDeclaration: 'PLAY0693',\n InvalidCommandReadsDeclaration: 'PLAY0780',\n GenerationSupportBudgetExceeded: 'PLAY0691',\n EmptyGenerationSupport: 'PLAY0692', // C# only: conservative nominal producer identity comparison.\n MixedEnumerationNumbering: 'PLAY0667',\n DuplicateEnumerationNumber: 'PLAY0668',\n EnumerationNumberOutsideInt32: 'PLAY0669',\n MalformedEnumerationNumber: 'PLAY0670',\n UnpinnedStoredEnumeration: 'PLAY0671',\n ReadsWithChildren: 'PLAY0451',\n UnknownGenerationStrategy: 'PLAY0672',\n InvalidGenerationArgument: 'PLAY0673',\n InvalidGenerationModifier: 'PLAY0674',\n DuplicateGenerationModifier: 'PLAY0675',\n DuplicateGeneration: 'PLAY0676',\n InvalidGenerationPrimitive: 'PLAY0677',\n InvalidGenerationPrefix: 'PLAY0678',\n InvalidGenerationAlphabet: 'PLAY0679',\n InvalidTypeIdPrefix: 'PLAY0680',\n GenerationSizeOutsideRange: 'PLAY0681',\n ReservedSequenceGeneration: 'PLAY0682',\n LowGenerationEntropy: 'PLAY0683',\n LowGeneratedIdentifierEntropy: 'PLAY0684',\n ResponseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserved for compatibility with earlier native compiler diagnostics.\n EventIdPinNotCarriedToRenderers: 'PLAY0686',\n InvalidToolbarButton: 'PLAY0760',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B,4BAA6B,WAE7B,2BAA4B,WAC5B,uCAAwC,WACxC,yBAA0B,WAC1B,2BAA4B,WAC5B,yBAA0B,WAC1B,yBAA0B,WAC1B,2BAA4B,WAC5B,mCAAoC,WACpC,8BAA+B,WAC/B,wBAAyB,WACzB,0BAA2B,WAC3B,sCAAuC,WACvC,sCAAuC,WACvC,2BAA4B,WAC5B,gCAAiC,WACjC,2CAA4C,WAC5C,8BAA+B,WAC/B,iCAAkC,WAClC,+BAAgC,WAChC,mCAAoC,WACpC,uCAAwC,WACxC,4BAA6B,WAC7B,2BAA4B,WAC5B,4BAA6B,WAC7B,6BAA8B,WAE9B,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC1B,2BAA4B,WAC5B,wBAAyB,WACzB,sBAAuB,WACvB,6BAA8B,WAC9B,6BAA8B,WAC9B,+BAAgC,WAChC,qBAAsB,WACtB,wBAAyB,WACzB,4BAA6B,WAC7B,oBAAqB,WACrB,yBAA0B,WAC1B,0BAA2B,WAC3B,uBAAwB,WACxB,wBAAyB,WACzB,mBA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AAsB,WACtB,uBAAwB,WACxB,wBAAyB,WACzB,wBAAyB,WACzB,aAAc,WACd,yBAA0B,WAC1B,4BAA6B,WAC7B,6BAA8B,WAC9B,wBAAyB,WACzB,8BAA+B,WAC/B,sBAAuB,WACvB,mBAAoB,WACpB,oBAAqB,WACrB,uBAAwB,WACxB,0BAA2B,WAC3B,8BAA+B,WAC/B,yBAA0B,WAC1B,sBAAuB,WACvB,oCAAqC,WACrC,wBAAyB,WACzB,kCAAmC,WACnC,+BAAgC,WAChC,gCAAiC,WACjC,uBAAwB,WACxB,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,kBAAmB,WACnB,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,WACjC,qBAAsB,UAC1B"}
|
|
1
|
+
{"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.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// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n UnknownMatchPattern: 'PLAY0366',\n InvalidMatchPattern: 'PLAY0367',\n PatternOutsidePortableMatchDialect: 'PLAY0699',\n DeprecatedStudioTextRulePattern: 'PLAY0787',\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n CaptureEventsFromSeveralOrigins: 'PLAY0687',\n DirectionlessTranslationReactsToOwnCapture: 'PLAY0694',\n PendingIntentWithOtherHandler: 'PLAY0698',\n CommandHandlerRequiresAttachment: 'PLAY0800', // C# only\n DescribedCommandNotImplemented: 'PLAY0695', // C# only\n DescribedCommandWithoutProductions: 'PLAY0696', // C# only\n DescribedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n CaptureEventsKeyNotRequired: 'PLAY0700',\n CaptureEventsRecordFixture: 'PLAY0701',\n RefutedGeneratedConceptRule: 'PLAY0688',\n UnprovenGeneratedConceptRule: 'PLAY0689',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n UnknownNavigationDestination: 'PLAY0654',\n UnknownScreenContributionPoint: 'PLAY0655',\n TemplateNestingCycle: 'PLAY0656',\n TemplateCategoryMissing: 'PLAY0720', // C# only: template declarations are not modeled by this compiler.\n InvalidTemplateVersionRange: 'PLAY0721',\n LegacyProfileLayout: 'PLAY0791', // The other ui profile root template rules (PLAY0790, PLAY0792-PLAY0799) are C# only: this compiler does not model a ui profile.\n UnknownTemplateBlueprint: 'PLAY0722', // C# only: ui profile packages are not modeled by this compiler.\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n UnknownLayoutDirective: 'PLAY0026',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n /** An event is used more than once in one projection level's event or join set. */\n DuplicateEventInProjectionScope: 'PLAY0801',\n /** An event source has the reserved stored name Default, or an event stream has the reserved stored name All, including through an id pin. */\n ReservedStoredName: 'PLAY0802',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n MismatchedSpecificationQueryResult: 'PLAY0465',\n UnknownSpecificationQueryArgument: 'PLAY0468',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n InvalidReadModelKey: 'PLAY0660',\n IncompleteReadModelKey: 'PLAY0661', // C# only: scoped read-model key resolution.\n InvalidReadModelKeyLookup: 'PLAY0662', // Shape checks shared; scoped lookup checks are C# only.\n ProductionRouteOutsideCommand: 'PLAY0663',\n RedundantProductionRoute: 'PLAY0664',\n InvalidObserverFilter: 'PLAY0665',\n ObserverFilterExcludesEveryProducer: 'PLAY0666', // C# only: statically known producer routes.\n ReducerIdentityMismatch: 'PLAY0690',\n InvalidReactionBatchesDeclaration: 'PLAY0693',\n InvalidCommandReadsDeclaration: 'PLAY0780',\n GenerationSupportBudgetExceeded: 'PLAY0691',\n EmptyGenerationSupport: 'PLAY0692', // C# only: conservative nominal producer identity comparison.\n MixedEnumerationNumbering: 'PLAY0667',\n DuplicateEnumerationNumber: 'PLAY0668',\n EnumerationNumberOutsideInt32: 'PLAY0669',\n MalformedEnumerationNumber: 'PLAY0670',\n UnpinnedStoredEnumeration: 'PLAY0671',\n ReadsWithChildren: 'PLAY0451',\n UnknownGenerationStrategy: 'PLAY0672',\n InvalidGenerationArgument: 'PLAY0673',\n InvalidGenerationModifier: 'PLAY0674',\n DuplicateGenerationModifier: 'PLAY0675',\n DuplicateGeneration: 'PLAY0676',\n InvalidGenerationPrimitive: 'PLAY0677',\n InvalidGenerationPrefix: 'PLAY0678',\n InvalidGenerationAlphabet: 'PLAY0679',\n InvalidTypeIdPrefix: 'PLAY0680',\n GenerationSizeOutsideRange: 'PLAY0681',\n ReservedSequenceGeneration: 'PLAY0682',\n LowGenerationEntropy: 'PLAY0683',\n LowGeneratedIdentifierEntropy: 'PLAY0684',\n ResponseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserved for compatibility with earlier native compiler diagnostics.\n EventIdPinNotCarriedToRenderers: 'PLAY0686',\n InvalidToolbarButton: 'PLAY0760',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B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,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,WACjC,qBAAsB,UAC1B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{validateIdentity as t}from"../Parsing/IdentityValidator.js";import{validateApplicationHandlers as n}from"../Parsing/CommandHandlerValidator.js";import{combineAuthorize as r}from"../Parsing/AuthorizeParser.js";import{LineReader as i}from"../Parsing/LineReader.js";import{InvalidSyntaxJson as a}from"../Syntax/InvalidSyntaxJson.js";import{invalidSourceOptions as o,isAuthoredDocument as s,legacySourceOptions as c,validatedSourceOptions as l}from"../Syntax/SourceOptions.js";import{ParserContext as u}from"../Parsing/ParserContext.js";import{toSyntaxJson as d}from"../Syntax/SyntaxJson.js";function mergeDocuments(r){let s=[],d=r.map(e=>e.value),f=/* @__PURE__ */ new Map,p=!1;for(let t of d)try{f.set(t,Object.hasOwn(t,`sourceOptions`)?l(t.sourceOptions):c)}catch(n){if(!(n instanceof a))throw n;p=!0,s.push(error(e.IncompatibleNumericSource,n.message,t.location))}let m=d.filter(e=>f.get(e)?.numericMode===`exact`||hasDeclarations(e)),h=f.get(m[0])??c;for(let t of m.slice(1))f.get(t)?.numericMode!==h.numericMode&&(p=!0,s.push(error(e.MixedNumericModes,`Declaration-bearing documents and marked import barrels must independently select the same numeric mode.`,t.location)));p&&(h=o);let g=/* @__PURE__ */ new Map,_=declaredInOneFile(d.flatMap(e=>e.concepts),`declaration of`,s,void 0,g),v=declaredInOneFile(d.flatMap(e=>e.types),`declaration of`,s,void 0,g),y=d.flatMap(e=>e.identity==null?[]:[e.identity]);for(let t of y.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares an identity block in '${describe(y[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let b=d.filter(e=>e.commandReadMode!=null);for(let t of b.slice(1))s.push(error(e.InvalidCommandReadsDeclaration,`Declare 'command reads protected' once at the application root.`,t.location));let x=d.filter(e=>e.reactionProductionMode!=null);for(let t of x.slice(1))s.push(error(e.InvalidReactionBatchesDeclaration,`Declare 'reaction batches atomic' once at the application root.`,t.location));let S=d.map(e=>e.domain).filter(e=>e!==null);for(let t of S.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares a domain in '${describe(S[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let C=mergeModules(d.flatMap(e=>e.modules),s),w=declaredInOneFile(d.flatMap(e=>e.personas),`persona`,s),T={kind:`ApplicationSyntax`,sourceOptions:h,...x.length===0?{}:{reactionProductionMode:x[0].reactionProductionMode},...b.length===0?{}:{commandReadMode:b[0].commandReadMode},...y.length===0?{}:{identity:y[0]},domain:S[0]??null,imports:firstOfEach(d.flatMap(e=>e.imports),e=>e.qualifiedName),concepts:_,types:v,examples:d.flatMap(e=>e.examples??[]),systems:d.flatMap(e=>e.systems??[]),purposes:declaredInOneFile(d.flatMap(e=>e.purposes??[]),`purpose`,s),eventSources:d.flatMap(e=>e.eventSources??[]),declaredTriggers:d.flatMap(e=>e.declaredTriggers??[]),modules:C,personas:w,policies:
|
|
1
|
+
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{validateIdentity as t}from"../Parsing/IdentityValidator.js";import{validateApplicationHandlers as n}from"../Parsing/CommandHandlerValidator.js";import{combineAuthorize as r}from"../Parsing/AuthorizeParser.js";import{LineReader as i}from"../Parsing/LineReader.js";import{InvalidSyntaxJson as a}from"../Syntax/InvalidSyntaxJson.js";import{invalidSourceOptions as o,isAuthoredDocument as s,legacySourceOptions as c,validatedSourceOptions as l}from"../Syntax/SourceOptions.js";import{ParserContext as u}from"../Parsing/ParserContext.js";import{toSyntaxJson as d}from"../Syntax/SyntaxJson.js";function mergeDocuments(r){let s=[],d=r.map(e=>e.value),f=/* @__PURE__ */ new Map,p=!1;for(let t of d)try{f.set(t,Object.hasOwn(t,`sourceOptions`)?l(t.sourceOptions):c)}catch(n){if(!(n instanceof a))throw n;p=!0,s.push(error(e.IncompatibleNumericSource,n.message,t.location))}let m=d.filter(e=>f.get(e)?.numericMode===`exact`||hasDeclarations(e)),h=f.get(m[0])??c;for(let t of m.slice(1))f.get(t)?.numericMode!==h.numericMode&&(p=!0,s.push(error(e.MixedNumericModes,`Declaration-bearing documents and marked import barrels must independently select the same numeric mode.`,t.location)));p&&(h=o);let g=/* @__PURE__ */ new Map,_=declaredInOneFile(d.flatMap(e=>e.concepts),`declaration of`,s,void 0,g),v=declaredInOneFile(d.flatMap(e=>e.types),`declaration of`,s,void 0,g),y=d.flatMap(e=>e.identity==null?[]:[e.identity]);for(let t of y.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares an identity block in '${describe(y[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let b=d.filter(e=>e.commandReadMode!=null);for(let t of b.slice(1))s.push(error(e.InvalidCommandReadsDeclaration,`Declare 'command reads protected' once at the application root.`,t.location));let x=d.filter(e=>e.reactionProductionMode!=null);for(let t of x.slice(1))s.push(error(e.InvalidReactionBatchesDeclaration,`Declare 'reaction batches atomic' once at the application root.`,t.location));let S=d.map(e=>e.domain).filter(e=>e!==null);for(let t of S.slice(1))s.push(error(e.RepeatedSingularDeclarationAcrossFiles,`The folder already declares a domain in '${describe(S[0].location.path)}' - a folder compiles to one application, which can have at most one`,t.location));let C=mergeModules(d.flatMap(e=>e.modules),s),w=declaredInOneFile(d.flatMap(e=>e.personas),`persona`,s),T=d.flatMap(e=>e.policies??[]),E=declaredInOneFile(T,`policy`,s),D=T.filter(e=>!E.includes(e)).map(e=>e.location),O={kind:`ApplicationSyntax`,sourceOptions:h,...x.length===0?{}:{reactionProductionMode:x[0].reactionProductionMode},...b.length===0?{}:{commandReadMode:b[0].commandReadMode},...y.length===0?{}:{identity:y[0]},domain:S[0]??null,imports:firstOfEach(d.flatMap(e=>e.imports),e=>e.qualifiedName),concepts:_,types:v,examples:d.flatMap(e=>e.examples??[]),systems:d.flatMap(e=>e.systems??[]),purposes:declaredInOneFile(d.flatMap(e=>e.purposes??[]),`purpose`,s),eventSources:d.flatMap(e=>e.eventSources??[]),declaredTriggers:d.flatMap(e=>e.declaredTriggers??[]),modules:C,personas:w,policies:E,seeds:d.flatMap(e=>e.seeds??[]),fileImports:d.flatMap(e=>e.fileImports),...presentOnly(`exposures`,d.flatMap(e=>e.exposures??[])),...presentOnly(`instanceContributions`,d.flatMap(e=>e.instanceContributions??[])),location:d[0]?.location??{line:1,column:1}},k=new u(new i([]));n(O,k),t(O,k),s.push(...k.diagnostics);let A=[...r.flatMap(e=>e.diagnostics).filter(t=>t.code!==e.DuplicateDeclaration||!D.some(e=>sameLocation(e,t.location))),...s];return{value:O,diagnostics:A,success:!A.some(e=>e.severity===`error`)}}function hasDeclarations(e){if(s(e)||e.identity!=null||e.domain!==null||e.concepts.length>0||e.types.length>0||e.personas.length>0||(e.policies?.length??0)>0||(e.purposes?.length??0)>0||(e.seeds?.length??0)>0||(e.systems?.length??0)>0||(e.eventSources?.length??0)>0||(e.examples?.length??0)>0)return!0;let feature=e=>!e.isPlacement||(e.examples?.length??0)>0||e.slices.length>0||e.features.some(feature);return e.modules.some(e=>!e.isPlacement||(e.examples?.length??0)>0||e.features.some(feature))}function mergeModules(e,t){return groupByName(e).map(placedLast).map(e=>e.length===1?{...e[0],isPlacement:!1,features:e[0].features.map(unplaced)}:{...e[0],isPlacement:!1,fileImports:e.flatMap(e=>e.fileImports),examples:e.flatMap(e=>e.examples??[]),purposes:firstOfEach(e.flatMap(e=>e.purposes??[]),e=>e.name),description:firstDescription(e,`module '${e[0].name}'`,t),documentation:firstDocumentation(e,`module '${e[0].name}'`,t),authorize:combineAuthorization(e.map(e=>e.authorize),`module '${e[0].name}'`,t),dependsOn:groupDependencies(e),features:mergeFeatures(e.flatMap(e=>e.features),t)})}function mergeFeatures(e,t){return groupByName(e).map(placedLast).map(e=>e.length===1?unplaced(e[0]):{...e[0],isPlacement:!1,fileImports:e.flatMap(e=>e.fileImports),examples:e.flatMap(e=>e.examples??[]),purposes:firstOfEach(e.flatMap(e=>e.purposes??[]),e=>e.name),description:firstDescription(e,`feature '${e[0].name}'`,t),documentation:firstDocumentation(e,`feature '${e[0].name}'`,t),authorize:combineAuthorization(e.map(e=>e.authorize),`feature '${e[0].name}'`,t),dependsOn:groupDependencies(e),features:mergeFeatures(e.flatMap(e=>e.features),t),slices:declaredInOneFile(e.flatMap(e=>e.slices),`slice`,t,`feature '${e[0].name}'`)})}function groupDependencies(e){return[...e].sort((e,t)=>(e.location.path??``)<(t.location.path??``)?-1:+((e.location.path??``)>(t.location.path??``))).flatMap(e=>e.dependsOn??[])}function placedLast(e){return[...e.filter(e=>!e.isPlacement),...e.filter(e=>e.isPlacement)]}function unplaced(e){return{...e,isPlacement:!1,features:e.features.map(unplaced)}}function combineAuthorization(t,n,i){let a=[];for(let r of t.filter(e=>e!==null)){let t=a.find(e=>e.location.path!==r.location.path&&JSON.stringify(d(e))===JSON.stringify(d(r)));t===void 0?a.push(r):i.push(warning(e.DuplicateAuthorizationAcrossFiles,`An identical authorization is already declared on the ${n} in '${describe(t.location.path)}' - this repeated gate is ignored`,r.location))}return a.reduce((e,t)=>r(e,t),null)}function firstOfEach(e,t){let n=/* @__PURE__ */ new Set;return e.filter(e=>!n.has(t(e))&&n.add(t(e))!==void 0)}function groupByName(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.name,[...t.get(n.name)??[],n]);return[...t.values()]}function firstDocumentation(t,n,r){let i=t.filter(e=>e.documentation!=null);for(let t of i.slice(1).filter(e=>e.documentation!==i[0].documentation))r.push(warning(e.ConflictingDocumentationAcrossFiles,`The ${n} is already documented in '${describe(i[0].location.path)}' - keeping that documentation`,t.location));return i[0]?.documentation??null}function firstDescription(t,n,r){let i=t.filter(e=>e.description!==null);for(let t of i.slice(1).filter(e=>e.description!==i[0].description))r.push(warning(e.ConflictingDescriptionAcrossFiles,`The ${n} is already described in '${describe(i[0].location.path)}' - keeping that description`,t.location));return i[0]?.description??null}function declaredInOneFile(t,n,r,i,a=/* @__PURE__ */ new Map){let o=[];for(let s of t){let t=a.get(s.name);t!==void 0&&t.path!==s.location.path?r.push(error(e.RepeatedDeclarationAcrossFiles,`Duplicate ${n} '${s.name}'${i===void 0?``:` in ${i}`} - already declared in '${describe(t.path)}'`,s.location)):(t===void 0&&a.set(s.name,s.location),o.push(s))}return o}const describe=e=>e??`another file`,sameLocation=(e,t)=>e.path===t.path&&e.line===t.line&&e.column===t.column,error=(e,t,n)=>({severity:`error`,code:e,message:t,location:n}),warning=(e,t,n)=>({severity:`warning`,code:e,message:t,location:n});function presentOnly(e,t){return t.length===0?{}:{[e]:t}}export{mergeDocuments};
|
|
2
2
|
//# sourceMappingURL=PlayFolderMerge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayFolderMerge.js","names":["diagnostics","applications","documents","document","options","invalid","application","validatedSourceOptions","legacySourceOptions","failure","InvalidSyntaxJson","DiagnosticCodes","asserted","sourceOptions","invalidSourceOptions","named","concepts","types","identities","extra","readModes","modes","domains","domain","modules","personas","value","item","identityContext","ParserContext","LineReader","validateApplicationHandlers","validateIdentity","all","diagnostic","isAuthoredDocument","node","module","parts","part","reference","features","left","right","feature","kept","authorization","declarations","declaration","first","earlier","toSyntaxJson","owner","combineAuthorize","combined","next","seen","items","key","groups","documented","disagreeing","described","claimed","keyword","within","path","values"],"sources":["../../../../../../Compiler/Files/PlayFolderMerge.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 { ParserContext } from '../Parsing/ParserContext';\nimport { LineReader } from '../Parsing/LineReader';\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { SourceLocation } from '../Diagnostics/SourceLocation';\nimport { combineAuthorize } from '../Parsing/AuthorizeParser';\nimport { CompilationResult } from '../ScreenplayCompiler';\nimport { AuthorizeSyntax, PersonaSyntax } from '../Syntax/Authorization';\nimport { ConceptSyntax, TypeSyntax } from '../Syntax/Declarations';\nimport { ApplicationSyntax, FeatureSyntax, ModuleSyntax } from '../Syntax/Structure';\nimport { toSyntaxJson } from '../Syntax/SyntaxJson';\nimport { invalidSourceOptions, isAuthoredDocument, legacySourceOptions, SourceOptions, validatedSourceOptions } from '../Syntax/SourceOptions';\nimport { InvalidSyntaxJson } from '../Syntax/InvalidSyntaxJson';\n\n// \"The documents of a folder are one document\": modules and features with the same name combine, and a\n// name declared in two files is reported - the port of the C# PlayFolderMerge for what this compiler\n// models. The semantic validation the C# merge runs afterwards is not ported.\nexport function mergeDocuments(documents: readonly CompilationResult<ApplicationSyntax>[]): CompilationResult<ApplicationSyntax> {\n const diagnostics: Diagnostic[] = [];\n const applications = documents.map(document => document.value);\n const options = new Map<ApplicationSyntax, SourceOptions>();\n let invalid = false;\n for (const application of applications) {\n try {\n options.set(application, Object.hasOwn(application, 'sourceOptions') ? validatedSourceOptions(application.sourceOptions) : legacySourceOptions);\n } catch (failure) {\n if (!(failure instanceof InvalidSyntaxJson)) throw failure;\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.IncompatibleNumericSource, failure.message, application.location));\n }\n }\n const asserted = applications.filter(application => options.get(application)?.numericMode === 'exact' || hasDeclarations(application));\n let sourceOptions = options.get(asserted[0]) ?? legacySourceOptions;\n for (const application of asserted.slice(1)) {\n if (options.get(application)?.numericMode !== sourceOptions.numericMode) {\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.MixedNumericModes, 'Declaration-bearing documents and marked import barrels must independently select the same numeric mode.', application.location));\n }\n }\n if (invalid) sourceOptions = invalidSourceOptions;\n const named = new Map<string, SourceLocation>();\n const concepts = declaredInOneFile<ConceptSyntax>(applications.flatMap(application => application.concepts), 'declaration of', diagnostics, undefined, named);\n const types = declaredInOneFile<TypeSyntax>(applications.flatMap(application => application.types), 'declaration of', diagnostics, undefined, named);\n const identities = applications.flatMap(application => application.identity == null ? [] : [application.identity]);\n for (const extra of identities.slice(1)) diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares an identity block in '${describe(identities[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n const readModes = applications.filter(application => application.commandReadMode != null);\n for (const extra of readModes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidCommandReadsDeclaration,\n \"Declare 'command reads protected' once at the application root.\", extra.location));\n const modes = applications.filter(application => application.reactionProductionMode != null);\n for (const extra of modes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidReactionBatchesDeclaration,\n \"Declare 'reaction batches atomic' once at the application root.\", extra.location));\n const domains = applications.map(application => application.domain).filter(domain => domain !== null);\n for (const extra of domains.slice(1)) {\n diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares a domain in '${describe(domains[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n }\n // Modules merge before personas are claimed, so the diagnostics come in the order the C# merge reports them.\n const modules = mergeModules(applications.flatMap(application => application.modules), diagnostics);\n const personas = declaredInOneFile<PersonaSyntax>(applications.flatMap(application => application.personas), 'persona', diagnostics);\n const value: ApplicationSyntax = {\n kind: 'ApplicationSyntax',\n sourceOptions,\n ...(modes.length === 0 ? {} : { reactionProductionMode: modes[0].reactionProductionMode }),\n ...(readModes.length === 0 ? {} : { commandReadMode: readModes[0].commandReadMode }),\n ...(identities.length === 0 ? {} : { identity: identities[0] }),\n domain: domains[0] ?? null,\n imports: firstOfEach(applications.flatMap(application => application.imports), item => item.qualifiedName),\n concepts,\n types,\n examples: applications.flatMap(application => application.examples ?? []),\n systems: applications.flatMap(application => application.systems ?? []),\n purposes: declaredInOneFile(applications.flatMap(application => application.purposes ?? []), 'purpose', diagnostics),\n eventSources: applications.flatMap(application => application.eventSources ?? []),\n declaredTriggers: applications.flatMap(application => application.declaredTriggers ?? []),\n modules,\n personas,\n policies: applications.flatMap(application => application.policies ?? []),\n seeds: applications.flatMap(application => application.seeds ?? []),\n fileImports: applications.flatMap(application => application.fileImports),\n ...presentOnly('exposures', applications.flatMap(application => application.exposures ?? [])),\n ...presentOnly('instanceContributions', applications.flatMap(application => application.instanceContributions ?? [])),\n location: applications[0]?.location ?? { line: 1, column: 1 },\n };\n const identityContext = new ParserContext(new LineReader([]));\n validateApplicationHandlers(value, identityContext);\n validateIdentity(value, identityContext);\n diagnostics.push(...identityContext.diagnostics);\n const all = [...documents.flatMap(document => document.diagnostics), ...diagnostics];\n return { value, diagnostics: all, success: !all.some(diagnostic => diagnostic.severity === 'error') };\n}\n\nfunction hasDeclarations(application: ApplicationSyntax): boolean {\n if (isAuthoredDocument(application)) return true;\n if (application.identity != null || application.domain !== null || application.concepts.length > 0 || application.types.length > 0 || application.personas.length > 0 || (application.policies?.length ?? 0) > 0 || (application.purposes?.length ?? 0) > 0 || (application.seeds?.length ?? 0) > 0 || (application.systems?.length ?? 0) > 0 || (application.eventSources?.length ?? 0) > 0 || (application.examples?.length ?? 0) > 0) return true;\n const feature = (node: FeatureSyntax): boolean => !node.isPlacement || (node.examples?.length ?? 0) > 0 || node.slices.length > 0 || node.features.some(feature);\n return application.modules.some(module => !module.isPlacement || (module.examples?.length ?? 0) > 0 || module.features.some(feature));\n}\n\nfunction mergeModules(modules: readonly ModuleSyntax[], diagnostics: Diagnostic[]): ModuleSyntax[] {\n return groupByName(modules).map(placedLast).map(parts => parts.length === 1 ? { ...parts[0], isPlacement: false, features: parts[0].features.map(unplaced) } : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `module '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `module '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `module '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n });\n}\n\nfunction mergeFeatures(features: readonly FeatureSyntax[], diagnostics: Diagnostic[]): FeatureSyntax[] {\n return groupByName(features).map(placedLast).map(parts => parts.length === 1 ? unplaced(parts[0]) : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `feature '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `feature '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `feature '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n slices: declaredInOneFile(parts.flatMap(part => part.slices), 'slice', diagnostics, `feature '${parts[0].name}'`),\n });\n}\n\n// Dependencies accumulate in path order, independently of which header owns the container.\nfunction groupDependencies(parts: readonly (ModuleSyntax | FeatureSyntax)[]) {\n return [...parts].sort((left, right) => (left.location.path ?? '') < (right.location.path ?? '') ? -1 : (left.location.path ?? '') > (right.location.path ?? '') ? 1 : 0).flatMap(part => part.dependsOn ?? []);\n}\n\n// Where a module or feature is written comes before files merely placed in it, so the merged one is located\n// at its declaration. Within each kind, path order is kept.\nfunction placedLast<T extends { readonly isPlacement: boolean }>(parts: readonly T[]): T[] {\n return [...parts.filter(part => !part.isPlacement), ...parts.filter(part => part.isPlacement)];\n}\n\n// Once merged, a feature is the feature - whether a file was placed in it no longer says anything.\nfunction unplaced(feature: FeatureSyntax): FeatureSyntax {\n return { ...feature, isPlacement: false, features: feature.features.map(unplaced) };\n}\n\n// Combines the gates files declare on one module or feature with 'and', never weakening an earlier one. The\n// same gate repeated in another file says nothing new and is reported and left out.\nfunction combineAuthorization(declarations: readonly (AuthorizeSyntax | null)[], owner: string, diagnostics: Diagnostic[]): AuthorizeSyntax | null {\n const kept: AuthorizeSyntax[] = [];\n for (const authorization of declarations.filter(declaration => declaration !== null)) {\n const first = kept.find(earlier => earlier.location.path !== authorization.location.path\n && JSON.stringify(toSyntaxJson(earlier)) === JSON.stringify(toSyntaxJson(authorization)));\n if (first !== undefined) {\n diagnostics.push(warning(DiagnosticCodes.DuplicateAuthorizationAcrossFiles,\n `An identical authorization is already declared on the ${owner} in '${describe(first.location.path)}' - this repeated gate is ignored`, authorization.location));\n continue;\n }\n kept.push(authorization);\n }\n return kept.reduce<AuthorizeSyntax | null>((combined, next) => combineAuthorize(combined, next), null);\n}\n\nfunction firstOfEach<T>(items: readonly T[], key: (item: T) => string): T[] {\n const seen = new Set<string>();\n return items.filter(item => !seen.has(key(item)) && seen.add(key(item)) !== undefined);\n}\n\n// Groups by name, keeping the order each name first appears in.\nfunction groupByName<T extends { readonly name: string }>(items: readonly T[]): T[][] {\n const groups = new Map<string, T[]>();\n for (const item of items) {\n groups.set(item.name, [...(groups.get(item.name) ?? []), item]);\n }\n return [...groups.values()];\n}\n\nfunction firstDocumentation(parts: readonly { documentation?: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const documented = parts.filter(part => part.documentation != null);\n for (const disagreeing of documented.slice(1).filter(part => part.documentation !== documented[0].documentation)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDocumentationAcrossFiles,\n `The ${owner} is already documented in '${describe(documented[0].location.path)}' - keeping that documentation`, disagreeing.location));\n }\n return documented[0]?.documentation ?? null;\n}\n\nfunction firstDescription(parts: readonly { description: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const described = parts.filter(part => part.description !== null);\n for (const disagreeing of described.slice(1).filter(part => part.description !== described[0].description)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDescriptionAcrossFiles,\n `The ${owner} is already described in '${describe(described[0].location.path)}' - keeping that description`, disagreeing.location));\n }\n return described[0]?.description ?? null;\n}\n\n// Keeps the first declaration of each name; one in another file with the same name is reported and dropped.\n// A repeat within one file is left for that file's own checks.\nfunction declaredInOneFile<T extends { readonly name: string; readonly location: SourceLocation }>(\n declarations: readonly T[], keyword: string, diagnostics: Diagnostic[], within?: string, claimed = new Map<string, SourceLocation>()): T[] {\n const kept: T[] = [];\n for (const declaration of declarations) {\n const first = claimed.get(declaration.name);\n if (first !== undefined && first.path !== declaration.location.path) {\n diagnostics.push(error(DiagnosticCodes.RepeatedDeclarationAcrossFiles,\n `Duplicate ${keyword} '${declaration.name}'${within === undefined ? '' : ` in ${within}`} - already declared in '${describe(first.path)}'`, declaration.location));\n continue;\n }\n if (first === undefined) {\n claimed.set(declaration.name, declaration.location);\n }\n kept.push(declaration);\n }\n return kept;\n}\n\nconst describe = (path: string | undefined): string => path ?? 'another file';\nconst error = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'error', code, message, location });\nconst warning = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'warning', code, message, location });\n\n// Composition members are written only when a document declares them, matching the C# canonical JSON.\nfunction presentOnly<TKey extends string, TValue>(key: TKey, values: readonly TValue[]): Partial<Record<TKey, readonly TValue[]>> {\n return values.length === 0 ? {} : { [key]: values } as Partial<Record<TKey, readonly TValue[]>>;\n}\n"],"mappings":"4sBAsBA,SAAgB,eAAe,EAAkG,CAC7H,IAAMA,EAA4B,CAAC,EAC7BC,EAAeC,EAAU,IAAI,GAAYC,EAAS,KAAK,EACvDC,kBAAU,IAAI,IAChBC,EAAU,GACd,IAAK,IAAMC,KAAeL,EACtB,GAAI,CACAG,EAAQ,IAAIE,EAA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AAqE,CAC9H,OAAOC,EAAO,SAAW,EAAI,CAAC,EAAI,EAAGT,GAAMS,CAAO,CACtD"}
|
|
1
|
+
{"version":3,"file":"PlayFolderMerge.js","names":["diagnostics","applications","documents","document","options","invalid","application","validatedSourceOptions","legacySourceOptions","failure","InvalidSyntaxJson","DiagnosticCodes","asserted","sourceOptions","invalidSourceOptions","named","concepts","types","identities","extra","readModes","modes","domains","domain","modules","personas","declaredPolicies","policies","droppedPolicies","policy","value","item","identityContext","ParserContext","LineReader","validateApplicationHandlers","validateIdentity","all","diagnostic","location","isAuthoredDocument","node","module","parts","part","reference","features","left","right","feature","kept","authorization","declarations","declaration","first","earlier","toSyntaxJson","owner","combineAuthorize","combined","next","seen","items","key","groups","documented","disagreeing","described","claimed","keyword","within","path","values"],"sources":["../../../../../../Compiler/Files/PlayFolderMerge.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 { ParserContext } from '../Parsing/ParserContext';\nimport { LineReader } from '../Parsing/LineReader';\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { SourceLocation } from '../Diagnostics/SourceLocation';\nimport { combineAuthorize } from '../Parsing/AuthorizeParser';\nimport { CompilationResult } from '../ScreenplayCompiler';\nimport { AuthorizeSyntax, PersonaSyntax } from '../Syntax/Authorization';\nimport { ConceptSyntax, TypeSyntax } from '../Syntax/Declarations';\nimport { ApplicationSyntax, FeatureSyntax, ModuleSyntax } from '../Syntax/Structure';\nimport { toSyntaxJson } from '../Syntax/SyntaxJson';\nimport { invalidSourceOptions, isAuthoredDocument, legacySourceOptions, SourceOptions, validatedSourceOptions } from '../Syntax/SourceOptions';\nimport { InvalidSyntaxJson } from '../Syntax/InvalidSyntaxJson';\n\n// \"The documents of a folder are one document\": modules and features with the same name combine, and a\n// name declared in two files is reported - the port of the C# PlayFolderMerge for what this compiler\n// models. The semantic validation the C# merge runs afterwards is not ported.\nexport function mergeDocuments(documents: readonly CompilationResult<ApplicationSyntax>[]): CompilationResult<ApplicationSyntax> {\n const diagnostics: Diagnostic[] = [];\n const applications = documents.map(document => document.value);\n const options = new Map<ApplicationSyntax, SourceOptions>();\n let invalid = false;\n for (const application of applications) {\n try {\n options.set(application, Object.hasOwn(application, 'sourceOptions') ? validatedSourceOptions(application.sourceOptions) : legacySourceOptions);\n } catch (failure) {\n if (!(failure instanceof InvalidSyntaxJson)) throw failure;\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.IncompatibleNumericSource, failure.message, application.location));\n }\n }\n const asserted = applications.filter(application => options.get(application)?.numericMode === 'exact' || hasDeclarations(application));\n let sourceOptions = options.get(asserted[0]) ?? legacySourceOptions;\n for (const application of asserted.slice(1)) {\n if (options.get(application)?.numericMode !== sourceOptions.numericMode) {\n invalid = true;\n diagnostics.push(error(DiagnosticCodes.MixedNumericModes, 'Declaration-bearing documents and marked import barrels must independently select the same numeric mode.', application.location));\n }\n }\n if (invalid) sourceOptions = invalidSourceOptions;\n const named = new Map<string, SourceLocation>();\n const concepts = declaredInOneFile<ConceptSyntax>(applications.flatMap(application => application.concepts), 'declaration of', diagnostics, undefined, named);\n const types = declaredInOneFile<TypeSyntax>(applications.flatMap(application => application.types), 'declaration of', diagnostics, undefined, named);\n const identities = applications.flatMap(application => application.identity == null ? [] : [application.identity]);\n for (const extra of identities.slice(1)) diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares an identity block in '${describe(identities[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n const readModes = applications.filter(application => application.commandReadMode != null);\n for (const extra of readModes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidCommandReadsDeclaration,\n \"Declare 'command reads protected' once at the application root.\", extra.location));\n const modes = applications.filter(application => application.reactionProductionMode != null);\n for (const extra of modes.slice(1)) diagnostics.push(error(DiagnosticCodes.InvalidReactionBatchesDeclaration,\n \"Declare 'reaction batches atomic' once at the application root.\", extra.location));\n const domains = applications.map(application => application.domain).filter(domain => domain !== null);\n for (const extra of domains.slice(1)) {\n diagnostics.push(error(DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles,\n `The folder already declares a domain in '${describe(domains[0].location.path)}' - a folder compiles to one application, which can have at most one`, extra.location));\n }\n // Modules merge before personas are claimed, so the diagnostics come in the order the C# merge reports them.\n const modules = mergeModules(applications.flatMap(application => application.modules), diagnostics);\n const personas = declaredInOneFile<PersonaSyntax>(applications.flatMap(application => application.personas), 'persona', diagnostics);\n const declaredPolicies = applications.flatMap(application => application.policies ?? []);\n const policies = declaredInOneFile(declaredPolicies, 'policy', diagnostics);\n // Like the C# merge, a policy dropped as repeated across files is not also reported as repeated within its file.\n const droppedPolicies = declaredPolicies.filter(policy => !policies.includes(policy)).map(policy => policy.location);\n const value: ApplicationSyntax = {\n kind: 'ApplicationSyntax',\n sourceOptions,\n ...(modes.length === 0 ? {} : { reactionProductionMode: modes[0].reactionProductionMode }),\n ...(readModes.length === 0 ? {} : { commandReadMode: readModes[0].commandReadMode }),\n ...(identities.length === 0 ? {} : { identity: identities[0] }),\n domain: domains[0] ?? null,\n imports: firstOfEach(applications.flatMap(application => application.imports), item => item.qualifiedName),\n concepts,\n types,\n examples: applications.flatMap(application => application.examples ?? []),\n systems: applications.flatMap(application => application.systems ?? []),\n purposes: declaredInOneFile(applications.flatMap(application => application.purposes ?? []), 'purpose', diagnostics),\n eventSources: applications.flatMap(application => application.eventSources ?? []),\n declaredTriggers: applications.flatMap(application => application.declaredTriggers ?? []),\n modules,\n personas,\n policies,\n seeds: applications.flatMap(application => application.seeds ?? []),\n fileImports: applications.flatMap(application => application.fileImports),\n ...presentOnly('exposures', applications.flatMap(application => application.exposures ?? [])),\n ...presentOnly('instanceContributions', applications.flatMap(application => application.instanceContributions ?? [])),\n location: applications[0]?.location ?? { line: 1, column: 1 },\n };\n const identityContext = new ParserContext(new LineReader([]));\n validateApplicationHandlers(value, identityContext);\n validateIdentity(value, identityContext);\n diagnostics.push(...identityContext.diagnostics);\n const documentDiagnostics = documents.flatMap(document => document.diagnostics).filter(diagnostic =>\n diagnostic.code !== DiagnosticCodes.DuplicateDeclaration || !droppedPolicies.some(location => sameLocation(location, diagnostic.location)));\n const all = [...documentDiagnostics, ...diagnostics];\n return { value, diagnostics: all, success: !all.some(diagnostic => diagnostic.severity === 'error') };\n}\n\nfunction hasDeclarations(application: ApplicationSyntax): boolean {\n if (isAuthoredDocument(application)) return true;\n if (application.identity != null || application.domain !== null || application.concepts.length > 0 || application.types.length > 0 || application.personas.length > 0 || (application.policies?.length ?? 0) > 0 || (application.purposes?.length ?? 0) > 0 || (application.seeds?.length ?? 0) > 0 || (application.systems?.length ?? 0) > 0 || (application.eventSources?.length ?? 0) > 0 || (application.examples?.length ?? 0) > 0) return true;\n const feature = (node: FeatureSyntax): boolean => !node.isPlacement || (node.examples?.length ?? 0) > 0 || node.slices.length > 0 || node.features.some(feature);\n return application.modules.some(module => !module.isPlacement || (module.examples?.length ?? 0) > 0 || module.features.some(feature));\n}\n\nfunction mergeModules(modules: readonly ModuleSyntax[], diagnostics: Diagnostic[]): ModuleSyntax[] {\n return groupByName(modules).map(placedLast).map(parts => parts.length === 1 ? { ...parts[0], isPlacement: false, features: parts[0].features.map(unplaced) } : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `module '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `module '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `module '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n });\n}\n\nfunction mergeFeatures(features: readonly FeatureSyntax[], diagnostics: Diagnostic[]): FeatureSyntax[] {\n return groupByName(features).map(placedLast).map(parts => parts.length === 1 ? unplaced(parts[0]) : {\n ...parts[0],\n isPlacement: false,\n fileImports: parts.flatMap(part => part.fileImports),\n examples: parts.flatMap(part => part.examples ?? []),\n purposes: firstOfEach(parts.flatMap(part => part.purposes ?? []), reference => reference.name),\n description: firstDescription(parts, `feature '${parts[0].name}'`, diagnostics),\n documentation: firstDocumentation(parts, `feature '${parts[0].name}'`, diagnostics),\n authorize: combineAuthorization(parts.map(part => part.authorize), `feature '${parts[0].name}'`, diagnostics),\n dependsOn: groupDependencies(parts),\n features: mergeFeatures(parts.flatMap(part => part.features), diagnostics),\n slices: declaredInOneFile(parts.flatMap(part => part.slices), 'slice', diagnostics, `feature '${parts[0].name}'`),\n });\n}\n\n// Dependencies accumulate in path order, independently of which header owns the container.\nfunction groupDependencies(parts: readonly (ModuleSyntax | FeatureSyntax)[]) {\n return [...parts].sort((left, right) => (left.location.path ?? '') < (right.location.path ?? '') ? -1 : (left.location.path ?? '') > (right.location.path ?? '') ? 1 : 0).flatMap(part => part.dependsOn ?? []);\n}\n\n// Where a module or feature is written comes before files merely placed in it, so the merged one is located\n// at its declaration. Within each kind, path order is kept.\nfunction placedLast<T extends { readonly isPlacement: boolean }>(parts: readonly T[]): T[] {\n return [...parts.filter(part => !part.isPlacement), ...parts.filter(part => part.isPlacement)];\n}\n\n// Once merged, a feature is the feature - whether a file was placed in it no longer says anything.\nfunction unplaced(feature: FeatureSyntax): FeatureSyntax {\n return { ...feature, isPlacement: false, features: feature.features.map(unplaced) };\n}\n\n// Combines the gates files declare on one module or feature with 'and', never weakening an earlier one. The\n// same gate repeated in another file says nothing new and is reported and left out.\nfunction combineAuthorization(declarations: readonly (AuthorizeSyntax | null)[], owner: string, diagnostics: Diagnostic[]): AuthorizeSyntax | null {\n const kept: AuthorizeSyntax[] = [];\n for (const authorization of declarations.filter(declaration => declaration !== null)) {\n const first = kept.find(earlier => earlier.location.path !== authorization.location.path\n && JSON.stringify(toSyntaxJson(earlier)) === JSON.stringify(toSyntaxJson(authorization)));\n if (first !== undefined) {\n diagnostics.push(warning(DiagnosticCodes.DuplicateAuthorizationAcrossFiles,\n `An identical authorization is already declared on the ${owner} in '${describe(first.location.path)}' - this repeated gate is ignored`, authorization.location));\n continue;\n }\n kept.push(authorization);\n }\n return kept.reduce<AuthorizeSyntax | null>((combined, next) => combineAuthorize(combined, next), null);\n}\n\nfunction firstOfEach<T>(items: readonly T[], key: (item: T) => string): T[] {\n const seen = new Set<string>();\n return items.filter(item => !seen.has(key(item)) && seen.add(key(item)) !== undefined);\n}\n\n// Groups by name, keeping the order each name first appears in.\nfunction groupByName<T extends { readonly name: string }>(items: readonly T[]): T[][] {\n const groups = new Map<string, T[]>();\n for (const item of items) {\n groups.set(item.name, [...(groups.get(item.name) ?? []), item]);\n }\n return [...groups.values()];\n}\n\nfunction firstDocumentation(parts: readonly { documentation?: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const documented = parts.filter(part => part.documentation != null);\n for (const disagreeing of documented.slice(1).filter(part => part.documentation !== documented[0].documentation)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDocumentationAcrossFiles,\n `The ${owner} is already documented in '${describe(documented[0].location.path)}' - keeping that documentation`, disagreeing.location));\n }\n return documented[0]?.documentation ?? null;\n}\n\nfunction firstDescription(parts: readonly { description: string | null; location: SourceLocation }[], owner: string, diagnostics: Diagnostic[]): string | null {\n const described = parts.filter(part => part.description !== null);\n for (const disagreeing of described.slice(1).filter(part => part.description !== described[0].description)) {\n diagnostics.push(warning(DiagnosticCodes.ConflictingDescriptionAcrossFiles,\n `The ${owner} is already described in '${describe(described[0].location.path)}' - keeping that description`, disagreeing.location));\n }\n return described[0]?.description ?? null;\n}\n\n// Keeps the first declaration of each name; one in another file with the same name is reported and dropped.\n// A repeat within one file is left for that file's own checks.\nfunction declaredInOneFile<T extends { readonly name: string; readonly location: SourceLocation }>(\n declarations: readonly T[], keyword: string, diagnostics: Diagnostic[], within?: string, claimed = new Map<string, SourceLocation>()): T[] {\n const kept: T[] = [];\n for (const declaration of declarations) {\n const first = claimed.get(declaration.name);\n if (first !== undefined && first.path !== declaration.location.path) {\n diagnostics.push(error(DiagnosticCodes.RepeatedDeclarationAcrossFiles,\n `Duplicate ${keyword} '${declaration.name}'${within === undefined ? '' : ` in ${within}`} - already declared in '${describe(first.path)}'`, declaration.location));\n continue;\n }\n if (first === undefined) {\n claimed.set(declaration.name, declaration.location);\n }\n kept.push(declaration);\n }\n return kept;\n}\n\nconst describe = (path: string | undefined): string => path ?? 'another file';\nconst sameLocation = (left: SourceLocation, right: SourceLocation): boolean => left.path === right.path && left.line === right.line && left.column === right.column;\nconst error = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'error', code, message, location });\nconst warning = (code: string, message: string, location: SourceLocation): Diagnostic => ({ severity: 'warning', code, message, location });\n\n// Composition members are written only when a document declares them, matching the C# canonical JSON.\nfunction presentOnly<TKey extends string, TValue>(key: TKey, values: readonly TValue[]): Partial<Record<TKey, readonly TValue[]>> {\n return values.length === 0 ? {} : { [key]: values } as Partial<Record<TKey, readonly TValue[]>>;\n}\n"],"mappings":"4sBAsBA,SAAgB,eAAe,EAAkG,CAC7H,IAAMA,EAA4B,CAAC,EAC7BC,EAAeC,EAAU,IAAI,GAAYC,EAAS,KAAK,EACvDC,kBAAU,IAAI,IAChBC,EAAU,GACd,IAAK,IAAMC,KAAeL,EACtB,GAAI,CACAG,EAAQ,IAAIE,EAAa,OAAO,OAAOA,EAAa,eAAe,EAAIC,EAAuBD,EAAY,aAAa,EAAIE,CAAmB,CAClJ,OAASC,EAAS,CACd,GAAI,EAAEA,aAAmBC,GAAoB,MAAMD,EACnD,EAAU,GACVT,EAAY,KAAK,MAAMW,EAAgB,0BAA2BF,EAAQ,QAASH,EAAY,QAAQ,CAAC,CAC5G,CAEJ,IAAMM,EAAWX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,EAAiB,KAA0C,CAAE,SAAU,QAAS,OAAM,UAAS,UAAS,GAC/H,SAAW,EAAc,EAAiB,KAA0C,CAAE,SAAU,UAAW,OAAM,UAAS,UAAS,GAGzI,SAAS,YAAyC,EAAW,EAAqE,CAC9H,OAAOwB,EAAO,SAAW,EAAI,CAAC,EAAI,EAAGT,GAAMS,CAAO,CACtD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{AuthoringProductionResolver as t}from"../Syntax/AuthoringProductionResolver.js";import{EventSourceCatalog as n}from"../Syntax/EventSourceCatalog.js";import{compatibleValue as r,uniqueByName as i}from"./ResponseValidator.js";import{commandDestinationType as a}from"./CommandDestinationTypes.js";import{validateObserverFilters as o}from"./ObserverFilterValidator.js";import{streamIdFailureMessage as s,tryFormatInteger as c,tryFormatText as l,tryFormatUuidText as u}from"../Syntax/StreamIdFormatter.js";import{validateStreamIdParts as d}from"./CompositeStreamIdValidator.js";import{validateSpecificationStreams as f}from"./SpecificationStreamValidator.js";const sameExpression=(e,t)=>e==null&&t==null||e?.kind===`PathExpressionSyntax`&&t?.kind===`PathExpressionSyntax`&&e.path===t.path||e?.kind===`LiteralExpressionSyntax`&&t?.kind===`LiteralExpressionSyntax`&&JSON.stringify(e.value)===JSON.stringify(t.value),sameRoute=(e,t)=>e.eventSource===t.eventSource&&e.stream===t.stream&&sameExpression(e.streamId?.source,t.streamId?.source)&&e.streamIdParts.length===t.streamIdParts.length&&e.streamIdParts.every(e=>t.streamIdParts.some(t=>e.property===t.property&&sameExpression(e.source,t.source))),p=/* @__PURE__ */ new Set([`String`,`Uuid`,`Int`,`Decimal`,`Bool`,`Date`,`DateTime`]);function supportsStreamIdentity(e,t){let n=t.concepts.filter(t=>t.name===e.name),r=n.length===1?n[0].type:n.length===0&&p.has(e.name)?e.name:null;return r===`String`||r===`Uuid`||r===`Int`&&n.length===1&&n[0].values.length===0}function formatStreamIdLiteral(e,t,n){if(e?.kind!==`LiteralExpressionSyntax`)return null;let r=e.value,a=t===null?null:i(n.concepts).get(t.name)?.type??t.name;return typeof r==`string`?a===`Uuid`?u(r):l(r):typeof r==`number`?c(r):typeof r==`object`&&r&&r.literalType===`ExactNumber`?r.value.includes(`.`)?c(NaN):c(BigInt(r.value),!1):null}function validateEventSources(c,l){let u=i(c.concepts),m=i(c.types),h=/* @__PURE__ */ new Set([...p,...u.keys(),...m.keys()]),g=new Map([...m].map(([e,t])=>[e,i(t.properties)])),compatible=(e,t)=>h.has(e.name)&&h.has(t.name)?e.name===t.name&&e.isCollection===t.isCollection&&(!e.isOptional||t.isOptional):null,validateType=(t,n)=>{if(t===null)return;if(t.isOptional||t.isCollection||c.types.some(e=>e.name===t.name)){l.error(e.InvalidEventSourceDeclaration,`Identifier and streamId declarations require a nonoptional scalar value type.`,t.location);return}let r=c.concepts.filter(e=>e.name===t.name),i=r.length===1?r[0].type:r.length===0&&p.has(t.name)?t.name:null;n&&i!==null&&!supportsStreamIdentity(t,c)&&l.error(e.UnsupportedStreamIdType,`Stream ids support text and UUID values and their nominal concepts, plus integer-backed concepts; other types need a future portable formatter.`,t.location),i===null&&!c.imports.some(e=>e.qualifiedName===t.name||e.qualifiedName.split(`.`).at(-1)===t.name)&&l.warning(e.UnknownType,`Unknown type '${t.name}' in event source declaration.`,t.location)},_=/* @__PURE__ */ new Set;for(let t of c.eventSources??[]){_.has(t.name)&&l.error(e.InvalidEventSourceDeclaration,`Event source '${t.name}' has multiple physical declarations.`,t.location),_.add(t.name),validateType(t.identifier,!1);let n=/* @__PURE__ */ new Set;for(let r of t.streams){n.has(r.name)&&l.error(e.InvalidEventSourceDeclaration,`Stream '${t.name}.${r.name}' has multiple declarations under this source.`,r.location),n.add(r.name),validateType(r.streamId,!0);let i=r.streamIdParts;if(i.length>0){i.length<2&&l.error(e.InvalidEventSourceDeclaration,`A composite stream id requires at least two named parts.`,r.directiveLocations?.streamId??r.location);for(let t of new Set(i.map(e=>e.name)))for(let n of i.filter(e=>e.name===t).slice(1))l.error(e.InvalidEventSourceDeclaration,`Stream id part '${n.name}' is declared more than once.`,n.location);for(let e of i)validateType(e.type,!0)}}}let pathProperty=(e,t)=>{let[n,...r]=t.split(`.`);if(e===null)return{property:null,missing:!1};let i=e.filter(e=>e.name===n);if(i.length!==1)return{property:null,missing:i.length===0};let a=i[0];if(r.length===0)return{property:a,missing:!1};if(p.has(a.type.name)||u.has(a.type.name)&&!m.has(a.type.name))return{property:null,missing:!0};let o=pathProperty(m.get(a.type.name)?.properties??null,r.join(`.`));return o.property===null?o:{property:{...o.property,type:{...o.property.type,isCollection:a.type.isCollection||o.property.type.isCollection,isOptional:a.type.isOptional||o.property.type.isOptional}},missing:!1}},v=new n(c),y=new t(c);o(c,l,y);for(let{slice:t}of y.slices)for(let n of t.commands)for(let{route:i,production:o}of[...n.stream==null?[]:[{route:n.stream,production:null}],...n.produces.filter(e=>e.stream!=null).map(e=>({route:e.stream,production:e}))]){if(i.propertyCandidate!==null)continue;o!==null&&n.stream!=null&&sameRoute(i,n.stream)&&l.warning(e.RedundantProductionRoute,`The production route repeats its command route; omit the override.`,i.location);let f=v.resolve(i.eventSource,i.stream);if(f.kind!==`unique`){let t={ambiguous:`Ambiguous`,notFound:`NotFound`,wrongKind:`WrongKind`}[f.kind];l.error(e.InvalidCommandStream,`Stream '${i.eventSource}.${i.stream}' is ${t}; routing requires one physical source and stream.`,i.location);continue}let m=f.sources[0],h=f.streams[0],_=n.properties.filter(e=>e.isIdentifier);o===null&&m.identifier!==null&&_.length===1&&compatible(_[0].type,m.identifier)===!1&&l.error(e.InvalidCommandStream,`Command identifier '${_[0].name}' does not have the source's nominal identifier type '${m.identifier.name}'. The stream does not supply a destination.`,_[0].location);for(let r of n.produces.filter(e=>y.isEventProduction(e,t)&&(o===null?e.stream==null:e===o))){if(m.identifier===null)continue;let i=a(n,r,c,{resolver:y,slice:t});if(i===null||o===null&&r.for===null&&r.inlineEvent!==null&&_.length===1&&compatible(_[0].type,m.identifier)===!1)continue;let s=r.for===null&&r.inlineEvent===null&&!n.properties.some(e=>e.isGenerated&&e.isIdentifier),d=u.get(m.identifier.name)?.type??(p.has(m.identifier.name)?m.identifier.name:null);(s?d===null?null:d===`Uuid`:compatible(i,m.identifier))===!1&&l.error(e.InvalidCommandStream,`Command production destination does not have the source's nominal identifier type '${m.identifier.name}'. The stream does not supply a destination.`,o?.stream?.location??r.for?.location??r.location)}let validateMapping=(t,i)=>{let a=t.source;if(a.kind===`PathExpressionSyntax`){let t=pathProperty(n.properties,a.path);(t.missing||t.property!==null&&compatible(t.property.type,i)===!1)&&l.error(e.InvalidCommandStream,`Stream id source '${a.path}' is absent or incompatible with nominal type '${i.name}'.`,a.location)}else if(a.kind===`LiteralExpressionSyntax`&&a.value!==null){let t=formatStreamIdLiteral(a,i,c);t?.failure==null?r(a,i,u,g)||l.error(e.InvalidCommandStream,`Stream id value is incompatible with nominal type '${i.name}'.`,a.location):l.error(e.InvalidCommandStream,s(t.failure),a.location)}else([`RawExpressionSyntax`,`ObjectExpressionSyntax`,`ListExpressionSyntax`].includes(a.kind)||a.kind===`LiteralExpressionSyntax`&&a.value===null)&&l.error(e.InvalidCommandStream,`A stream id needs a scalar value source, not a raw expression, collection or absence.`,a.location)};h.streamIdParts.length>0?d(h,i.streamIdParts,i.streamId!==null,i.location,e.InvalidCommandStream,l,validateMapping):i.streamIdParts.length>0?l.error(e.InvalidCommandStream,`A streamId part block requires a composite stream.`,i.location):((h.streamId===null&&i.streamId!==null||h.streamId!==null&&i.streamId===null)&&l.error(e.InvalidCommandStream,h.streamId===null?`An unkeyed stream cannot take a streamId mapping.`:`This keyed stream requires a streamId mapping.`,i.location),h.streamId!==null&&i.streamId!==null&&validateMapping(i.streamId,h.streamId))}f(c,l)}export{formatStreamIdLiteral,supportsStreamIdentity,validateEventSources};
|
|
1
|
+
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{AuthoringProductionResolver as t}from"../Syntax/AuthoringProductionResolver.js";import{EventSourceCatalog as n}from"../Syntax/EventSourceCatalog.js";import{compatibleValue as r,uniqueByName as i}from"./ResponseValidator.js";import{commandDestinationType as a}from"./CommandDestinationTypes.js";import{validateObserverFilters as o}from"./ObserverFilterValidator.js";import{streamIdFailureMessage as s,tryFormatInteger as c,tryFormatText as l,tryFormatUuidText as u}from"../Syntax/StreamIdFormatter.js";import{validateStreamIdParts as d}from"./CompositeStreamIdValidator.js";import{validateSpecificationStreams as f}from"./SpecificationStreamValidator.js";const sameExpression=(e,t)=>e==null&&t==null||e?.kind===`PathExpressionSyntax`&&t?.kind===`PathExpressionSyntax`&&e.path===t.path||e?.kind===`LiteralExpressionSyntax`&&t?.kind===`LiteralExpressionSyntax`&&JSON.stringify(e.value)===JSON.stringify(t.value),sameRoute=(e,t)=>e.eventSource===t.eventSource&&e.stream===t.stream&&sameExpression(e.streamId?.source,t.streamId?.source)&&e.streamIdParts.length===t.streamIdParts.length&&e.streamIdParts.every(e=>t.streamIdParts.some(t=>e.property===t.property&&sameExpression(e.source,t.source))),p=/* @__PURE__ */ new Set([`String`,`Uuid`,`Int`,`Decimal`,`Bool`,`Date`,`DateTime`]);function supportsStreamIdentity(e,t){let n=t.concepts.filter(t=>t.name===e.name),r=n.length===1?n[0].type:n.length===0&&p.has(e.name)?e.name:null;return r===`String`||r===`Uuid`||r===`Int`&&n.length===1&&n[0].values.length===0}function formatStreamIdLiteral(e,t,n){if(e?.kind!==`LiteralExpressionSyntax`)return null;let r=e.value,a=t===null?null:i(n.concepts).get(t.name)?.type??t.name;return typeof r==`string`?a===`Uuid`?u(r):l(r):typeof r==`number`?c(r):typeof r==`object`&&r&&r.literalType===`ExactNumber`?r.value.includes(`.`)?c(NaN):c(BigInt(r.value),!1):null}function validateEventSources(c,l){let u=i(c.concepts),m=i(c.types),h=/* @__PURE__ */ new Set([...p,...u.keys(),...m.keys()]),g=new Map([...m].map(([e,t])=>[e,i(t.properties)])),compatible=(e,t)=>h.has(e.name)&&h.has(t.name)?e.name===t.name&&e.isCollection===t.isCollection&&(!e.isOptional||t.isOptional):null,validateType=(t,n)=>{if(t===null)return;if(t.isOptional||t.isCollection||c.types.some(e=>e.name===t.name)){l.error(e.InvalidEventSourceDeclaration,`Identifier and streamId declarations require a nonoptional scalar value type.`,t.location);return}let r=c.concepts.filter(e=>e.name===t.name),i=r.length===1?r[0].type:r.length===0&&p.has(t.name)?t.name:null;n&&i!==null&&!supportsStreamIdentity(t,c)&&l.error(e.UnsupportedStreamIdType,`Stream ids support text and UUID values and their nominal concepts, plus integer-backed concepts; other types need a future portable formatter.`,t.location),i===null&&!c.imports.some(e=>e.qualifiedName===t.name||e.qualifiedName.split(`.`).at(-1)===t.name)&&l.warning(e.UnknownType,`Unknown type '${t.name}' in event source declaration.`,t.location)},_=/* @__PURE__ */ new Set;for(let t of c.eventSources??[]){_.has(t.name)&&l.error(e.InvalidEventSourceDeclaration,`Event source '${t.name}' has multiple physical declarations.`,t.location),_.add(t.name),(t.id??t.name)===`Default`&&l.error(e.ReservedStoredName,`Event source '${t.name}' has the reserved stored name 'Default'; choose a stored name other than 'Default'.`,t.location),validateType(t.identifier,!1);let n=/* @__PURE__ */ new Set;for(let r of t.streams){n.has(r.name)&&l.error(e.InvalidEventSourceDeclaration,`Stream '${t.name}.${r.name}' has multiple declarations under this source.`,r.location),n.add(r.name),(r.id??r.name)===`All`&&l.error(e.ReservedStoredName,`Stream '${t.name}.${r.name}' has the reserved stored name 'All'; choose a stored name other than 'All'.`,r.location),validateType(r.streamId,!0);let i=r.streamIdParts;if(i.length>0){i.length<2&&l.error(e.InvalidEventSourceDeclaration,`A composite stream id requires at least two named parts.`,r.directiveLocations?.streamId??r.location);for(let t of new Set(i.map(e=>e.name)))for(let n of i.filter(e=>e.name===t).slice(1))l.error(e.InvalidEventSourceDeclaration,`Stream id part '${n.name}' is declared more than once.`,n.location);for(let e of i)validateType(e.type,!0)}}}let pathProperty=(e,t)=>{let[n,...r]=t.split(`.`);if(e===null)return{property:null,missing:!1};let i=e.filter(e=>e.name===n);if(i.length!==1)return{property:null,missing:i.length===0};let a=i[0];if(r.length===0)return{property:a,missing:!1};if(p.has(a.type.name)||u.has(a.type.name)&&!m.has(a.type.name))return{property:null,missing:!0};let o=pathProperty(m.get(a.type.name)?.properties??null,r.join(`.`));return o.property===null?o:{property:{...o.property,type:{...o.property.type,isCollection:a.type.isCollection||o.property.type.isCollection,isOptional:a.type.isOptional||o.property.type.isOptional}},missing:!1}},v=new n(c),y=new t(c);o(c,l,y);for(let{slice:t}of y.slices)for(let n of t.commands)for(let{route:i,production:o}of[...n.stream==null?[]:[{route:n.stream,production:null}],...n.produces.filter(e=>e.stream!=null).map(e=>({route:e.stream,production:e}))]){if(i.propertyCandidate!==null)continue;o!==null&&n.stream!=null&&sameRoute(i,n.stream)&&l.warning(e.RedundantProductionRoute,`The production route repeats its command route; omit the override.`,i.location);let f=v.resolve(i.eventSource,i.stream);if(f.kind!==`unique`){let t={ambiguous:`Ambiguous`,notFound:`NotFound`,wrongKind:`WrongKind`}[f.kind];l.error(e.InvalidCommandStream,`Stream '${i.eventSource}.${i.stream}' is ${t}; routing requires one physical source and stream.`,i.location);continue}let m=f.sources[0],h=f.streams[0],_=n.properties.filter(e=>e.isIdentifier);o===null&&m.identifier!==null&&_.length===1&&compatible(_[0].type,m.identifier)===!1&&l.error(e.InvalidCommandStream,`Command identifier '${_[0].name}' does not have the source's nominal identifier type '${m.identifier.name}'. The stream does not supply a destination.`,_[0].location);for(let r of n.produces.filter(e=>y.isEventProduction(e,t)&&(o===null?e.stream==null:e===o))){if(m.identifier===null)continue;let i=a(n,r,c,{resolver:y,slice:t});if(i===null||o===null&&r.for===null&&r.inlineEvent!==null&&_.length===1&&compatible(_[0].type,m.identifier)===!1)continue;let s=r.for===null&&r.inlineEvent===null&&!n.properties.some(e=>e.isGenerated&&e.isIdentifier),d=u.get(m.identifier.name)?.type??(p.has(m.identifier.name)?m.identifier.name:null);(s?d===null?null:d===`Uuid`:compatible(i,m.identifier))===!1&&l.error(e.InvalidCommandStream,`Command production destination does not have the source's nominal identifier type '${m.identifier.name}'. The stream does not supply a destination.`,o?.stream?.location??r.for?.location??r.location)}let validateMapping=(t,i)=>{let a=t.source;if(a.kind===`PathExpressionSyntax`){let t=pathProperty(n.properties,a.path);(t.missing||t.property!==null&&compatible(t.property.type,i)===!1)&&l.error(e.InvalidCommandStream,`Stream id source '${a.path}' is absent or incompatible with nominal type '${i.name}'.`,a.location)}else if(a.kind===`LiteralExpressionSyntax`&&a.value!==null){let t=formatStreamIdLiteral(a,i,c);t?.failure==null?r(a,i,u,g)||l.error(e.InvalidCommandStream,`Stream id value is incompatible with nominal type '${i.name}'.`,a.location):l.error(e.InvalidCommandStream,s(t.failure),a.location)}else([`RawExpressionSyntax`,`ObjectExpressionSyntax`,`ListExpressionSyntax`].includes(a.kind)||a.kind===`LiteralExpressionSyntax`&&a.value===null)&&l.error(e.InvalidCommandStream,`A stream id needs a scalar value source, not a raw expression, collection or absence.`,a.location)};h.streamIdParts.length>0?d(h,i.streamIdParts,i.streamId!==null,i.location,e.InvalidCommandStream,l,validateMapping):i.streamIdParts.length>0?l.error(e.InvalidCommandStream,`A streamId part block requires a composite stream.`,i.location):((h.streamId===null&&i.streamId!==null||h.streamId!==null&&i.streamId===null)&&l.error(e.InvalidCommandStream,h.streamId===null?`An unkeyed stream cannot take a streamId mapping.`:`This keyed stream requires a streamId mapping.`,i.location),h.streamId!==null&&i.streamId!==null&&validateMapping(i.streamId,h.streamId))}f(c,l)}export{formatStreamIdLiteral,supportsStreamIdentity,validateEventSources};
|
|
2
2
|
//# sourceMappingURL=EventSourceValidator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventSourceValidator.js","names":["left","right","part","other","primitives","concepts","application","concept","type","primitive","expression","value","uniqueByName","tryFormatUuidText","tryFormatText","tryFormatInteger","composites","known","compositeProperties","name","source","target","composite","context","DiagnosticCodes","named","streamId","imported","names","streams","stream","parts","duplicate","remaining","path","properties","matches","property","resolved","catalog","EventSourceCatalog","resolver","AuthoringProductionResolver","validateObserverFilters","command","slice","produced","route","production","resolution","state","identifiers","destination","commandDestinationType","allocated","mapping","formatted","compatibleValue","streamIdFailureMessage","validateStreamIdParts","validateSpecificationStreams"],"sources":["../../../../../../Compiler/Parsing/EventSourceValidator.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { AuthoringProductionResolver } from '../Syntax/AuthoringProductionResolver';\nimport { PropertySyntax, TypeRefSyntax } from '../Syntax/Declarations';\nimport { EventSourceCatalog } from '../Syntax/EventSourceCatalog';\nimport { CommandStreamSyntax, EventSourceResolutionKind } from '../Syntax/EventSources';\nimport { validateObserverFilters } from './ObserverFilterValidator';\nimport { ApplicationSyntax } from '../Syntax/Structure';\nimport { ExpressionSyntax, PropertyMappingSyntax } from '../Syntax/Expressions';\nimport { StreamIdFormatResult, streamIdFailureMessage, tryFormatInteger, tryFormatText, tryFormatUuidText } from '../Syntax/StreamIdFormatter';\nimport { commandDestinationType } from './CommandDestinationTypes';\nimport { validateStreamIdParts } from './CompositeStreamIdValidator';\nimport { ParserContext } from './ParserContext';\nimport { compatibleValue, uniqueByName } from './ResponseValidator';\nimport { validateSpecificationStreams } from './SpecificationStreamValidator';\n\nconst sameExpression = (left: ExpressionSyntax | null | undefined, right: ExpressionSyntax | null | undefined): boolean =>\n left == null && right == null || left?.kind === 'PathExpressionSyntax' && right?.kind === 'PathExpressionSyntax' && left.path === right.path ||\n left?.kind === 'LiteralExpressionSyntax' && right?.kind === 'LiteralExpressionSyntax' && JSON.stringify(left.value) === JSON.stringify(right.value);\nconst sameRoute = (left: CommandStreamSyntax, right: CommandStreamSyntax): boolean => left.eventSource === right.eventSource && left.stream === right.stream &&\n sameExpression(left.streamId?.source, right.streamId?.source) && left.streamIdParts.length === right.streamIdParts.length &&\n left.streamIdParts.every(part => right.streamIdParts.some(other => part.property === other.property && sameExpression(part.source, other.source)));\n\nconst primitives = new Set(['String', 'Uuid', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime']);\n\nexport function supportsStreamIdentity(type: TypeRefSyntax, application: ApplicationSyntax): boolean {\n const concepts = application.concepts.filter(concept => concept.name === type.name);\n const primitive = concepts.length === 1 ? concepts[0].type : concepts.length === 0 && primitives.has(type.name) ? type.name : null;\n return primitive === 'String' || primitive === 'Uuid' || primitive === 'Int' && concepts.length === 1 && concepts[0].values.length === 0;\n}\n\nexport function formatStreamIdLiteral(expression: ExpressionSyntax | null | undefined, type: TypeRefSyntax | null, application: ApplicationSyntax): StreamIdFormatResult | null {\n if (expression?.kind !== 'LiteralExpressionSyntax') return null;\n const value = expression.value;\n const primitive = type === null ? null : uniqueByName(application.concepts).get(type.name)?.type ?? type.name;\n if (typeof value === 'string') return primitive === 'Uuid' ? tryFormatUuidText(value) : tryFormatText(value);\n if (typeof value === 'number') return tryFormatInteger(value);\n if (typeof value === 'object' && value !== null && value.literalType === 'ExactNumber') {\n if (value.value.includes('.')) return tryFormatInteger(NaN);\n return tryFormatInteger(BigInt(value.value), false);\n }\n return null;\n}\n\nexport function validateEventSources(application: ApplicationSyntax, context: ParserContext): void {\n const concepts = uniqueByName(application.concepts);\n const composites = uniqueByName(application.types);\n const known = new Set([...primitives, ...concepts.keys(), ...composites.keys()]);\n const compositeProperties = new Map([...composites].map(([name, type]) => [name, uniqueByName(type.properties)]));\n const compatible = (source: TypeRefSyntax, target: TypeRefSyntax): boolean | null => known.has(source.name) && known.has(target.name)\n ? source.name === target.name && source.isCollection === target.isCollection && (!source.isOptional || target.isOptional) : null;\n const validateType = (type: TypeRefSyntax | null, streamId: boolean): void => {\n if (type === null) return;\n if (type.isOptional || type.isCollection || application.types.some(composite => composite.name === type.name)) {\n context.error(DiagnosticCodes.InvalidEventSourceDeclaration, 'Identifier and streamId declarations require a nonoptional scalar value type.', type.location);\n return;\n }\n const named = application.concepts.filter(concept => concept.name === type.name);\n const primitive = named.length === 1 ? named[0].type : named.length === 0 && primitives.has(type.name) ? type.name : null;\n if (streamId && primitive !== null && !supportsStreamIdentity(type, application))\n context.error(DiagnosticCodes.UnsupportedStreamIdType, 'Stream ids support text and UUID values and their nominal concepts, plus integer-backed concepts; other types need a future portable formatter.', type.location);\n if (primitive === null && !application.imports.some(imported => imported.qualifiedName === type.name || imported.qualifiedName.split('.').at(-1) === type.name))\n context.warning(DiagnosticCodes.UnknownType, `Unknown type '${type.name}' in event source declaration.`, type.location);\n };\n const names = new Set<string>();\n for (const source of application.eventSources ?? []) {\n if (names.has(source.name)) context.error(DiagnosticCodes.InvalidEventSourceDeclaration, `Event source '${source.name}' has multiple physical declarations.`, source.location);\n names.add(source.name);\n validateType(source.identifier, false);\n const streams = new Set<string>();\n for (const stream of source.streams) {\n if (streams.has(stream.name)) context.error(DiagnosticCodes.InvalidEventSourceDeclaration, `Stream '${source.name}.${stream.name}' has multiple declarations under this source.`, stream.location);\n streams.add(stream.name);\n validateType(stream.streamId, true);\n const parts = stream.streamIdParts;\n if (parts.length > 0) {\n if (parts.length < 2) context.error(DiagnosticCodes.InvalidEventSourceDeclaration, 'A composite stream id requires at least two named parts.', stream.directiveLocations?.streamId ?? stream.location);\n for (const name of new Set(parts.map(part => part.name))) {\n for (const duplicate of parts.filter(part => part.name === name).slice(1))\n context.error(DiagnosticCodes.InvalidEventSourceDeclaration, `Stream id part '${duplicate.name}' is declared more than once.`, duplicate.location);\n }\n for (const part of parts) validateType(part.type, true);\n }\n }\n }\n const pathProperty = (properties: readonly PropertySyntax[] | null, path: string): { property: PropertySyntax | null; missing: boolean } => {\n const [name, ...remaining] = path.split('.');\n if (properties === null) return { property: null, missing: false };\n const matches = properties.filter(property => property.name === name);\n if (matches.length !== 1) return { property: null, missing: matches.length === 0 };\n const property = matches[0];\n if (remaining.length === 0) return { property, missing: false };\n if (primitives.has(property.type.name) || concepts.has(property.type.name) && !composites.has(property.type.name)) return { property: null, missing: true };\n const resolved = pathProperty(composites.get(property.type.name)?.properties ?? null, remaining.join('.'));\n return resolved.property === null ? resolved : { property: { ...resolved.property, type: { ...resolved.property.type, isCollection: property.type.isCollection || resolved.property.type.isCollection, isOptional: property.type.isOptional || resolved.property.type.isOptional } }, missing: false };\n };\n const catalog = new EventSourceCatalog(application);\n const resolver = new AuthoringProductionResolver(application);\n validateObserverFilters(application, context, resolver);\n for (const { slice } of resolver.slices) for (const command of slice.commands) for (const { route, production } of [\n ...(command.stream == null ? [] : [{ route: command.stream, production: null }]),\n ...command.produces.filter(produced => produced.stream != null).map(produced => ({ route: produced.stream!, production: produced }))\n ]) {\n if (route.propertyCandidate !== null) continue;\n if (production !== null && command.stream != null && sameRoute(route, command.stream))\n context.warning(DiagnosticCodes.RedundantProductionRoute, 'The production route repeats its command route; omit the override.', route.location);\n const resolution = catalog.resolve(route.eventSource, route.stream);\n if (resolution.kind !== EventSourceResolutionKind.Unique) {\n const state = { ambiguous: 'Ambiguous', notFound: 'NotFound', wrongKind: 'WrongKind' }[resolution.kind];\n context.error(DiagnosticCodes.InvalidCommandStream, `Stream '${route.eventSource}.${route.stream}' is ${state}; routing requires one physical source and stream.`, route.location);\n continue;\n }\n const source = resolution.sources[0];\n const stream = resolution.streams[0];\n const identifiers = command.properties.filter(property => property.isIdentifier);\n if (production === null && source.identifier !== null && identifiers.length === 1 && compatible(identifiers[0].type, source.identifier) === false)\n context.error(DiagnosticCodes.InvalidCommandStream, `Command identifier '${identifiers[0].name}' does not have the source's nominal identifier type '${source.identifier.name}'. The stream does not supply a destination.`, identifiers[0].location);\n for (const produced of command.produces.filter(produced => resolver.isEventProduction(produced, slice) && (production === null ? produced.stream == null : produced === production))) {\n if (source.identifier === null) continue;\n const destination = commandDestinationType(command, produced, application, { resolver, slice });\n if (destination === null) continue;\n if (production === null && produced.for === null && produced.inlineEvent !== null && identifiers.length === 1 && compatible(identifiers[0].type, source.identifier) === false) continue;\n const allocated = produced.for === null && produced.inlineEvent === null && !command.properties.some(property => property.isGenerated && property.isIdentifier);\n const primitive = concepts.get(source.identifier.name)?.type ?? (primitives.has(source.identifier.name) ? source.identifier.name : null);\n const matches = allocated ? primitive === null ? null : primitive === 'Uuid' : compatible(destination, source.identifier);\n if (matches === false) context.error(DiagnosticCodes.InvalidCommandStream, `Command production destination does not have the source's nominal identifier type '${source.identifier.name}'. The stream does not supply a destination.`, production?.stream?.location ?? produced.for?.location ?? produced.location);\n }\n const validateMapping = (mapping: PropertyMappingSyntax, target: TypeRefSyntax): void => {\n const expression = mapping.source;\n if (expression.kind === 'PathExpressionSyntax') {\n const resolved = pathProperty(command.properties, expression.path);\n if (resolved.missing || resolved.property !== null && compatible(resolved.property.type, target) === false)\n context.error(DiagnosticCodes.InvalidCommandStream, `Stream id source '${expression.path}' is absent or incompatible with nominal type '${target.name}'.`, expression.location);\n } else if (expression.kind === 'LiteralExpressionSyntax' && expression.value !== null) {\n const formatted = formatStreamIdLiteral(expression, target, application);\n if (formatted?.failure != null) context.error(DiagnosticCodes.InvalidCommandStream, streamIdFailureMessage(formatted.failure), expression.location);\n else if (!compatibleValue(expression, target, concepts, compositeProperties)) context.error(DiagnosticCodes.InvalidCommandStream, `Stream id value is incompatible with nominal type '${target.name}'.`, expression.location);\n } else if (['RawExpressionSyntax', 'ObjectExpressionSyntax', 'ListExpressionSyntax'].includes(expression.kind) || expression.kind === 'LiteralExpressionSyntax' && expression.value === null)\n context.error(DiagnosticCodes.InvalidCommandStream, 'A stream id needs a scalar value source, not a raw expression, collection or absence.', expression.location);\n };\n if (stream.streamIdParts.length > 0) {\n validateStreamIdParts(stream, route.streamIdParts, route.streamId !== null, route.location, DiagnosticCodes.InvalidCommandStream, context, validateMapping);\n continue;\n }\n if (route.streamIdParts.length > 0) {\n context.error(DiagnosticCodes.InvalidCommandStream, 'A streamId part block requires a composite stream.', route.location);\n continue;\n }\n if (stream.streamId === null && route.streamId !== null || stream.streamId !== null && route.streamId === null)\n context.error(DiagnosticCodes.InvalidCommandStream, stream.streamId === null ? 'An unkeyed stream cannot take a streamId mapping.' : 'This keyed stream requires a streamId mapping.', route.location);\n if (stream.streamId === null || route.streamId === null) continue;\n validateMapping(route.streamId, stream.streamId);\n }\n validateSpecificationStreams(application, context);\n}\n"],"mappings":"8wBAkBA,MAAM,gBAAkB,EAA2C,IAC/DA,GAAQ,MAAQC,GAAS,MAAQD,GAAM,OAAS,wBAA0BC,GAAO,OAAS,wBAA0BD,EAAK,OAASC,EAAM,MACxID,GAAM,OAAS,2BAA6BC,GAAO,OAAS,2BAA6B,KAAK,UAAUD,EAAK,KAAK,IAAM,KAAK,UAAUC,EAAM,KAAK,EAChJ,WAAa,EAA2B,IAAwCD,EAAK,cAAgBC,EAAM,aAAeD,EAAK,SAAWC,EAAM,QAClJ,eAAeD,EAAK,UAAU,OAAQC,EAAM,UAAU,MAAM,GAAKD,EAAK,cAAc,SAAWC,EAAM,cAAc,QACnHD,EAAK,cAAc,MAAM,GAAQC,EAAM,cAAc,KAAK,GAASC,EAAK,WAAaC,EAAM,UAAY,eAAeD,EAAK,OAAQC,EAAM,MAAM,CAAC,CAAC,EAE/IC,kBAAa,IAAI,IAAI,CAAC,SAAU,OAAQ,MAAO,UAAW,OAAQ,OAAQ,UAAU,CAAC,EAE3F,SAAgB,uBAAuB,EAAqB,EAAyC,CACjG,IAAMC,EAAWC,EAAY,SAAS,OAAO,GAAWC,EAAQ,OAASC,EAAK,IAAI,EAC5EC,EAAYJ,EAAS,SAAW,EAAIA,EAAS,EAAE,CAAC,KAAOA,EAAS,SAAW,GAAKD,EAAW,IAAII,EAAK,IAAI,EAAIA,EAAK,KAAO,KAC9H,OAAOC,IAAc,UAAYA,IAAc,QAAUA,IAAc,OAASJ,EAAS,SAAW,GAAKA,EAAS,EAAE,CAAC,OAAO,SAAW,CAC3I,CAEA,SAAgB,sBAAsB,EAAiD,EAA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,qBAAsB,qBAAqBd,EAAW,KAAK,iDAAiDW,EAAO,KAAK,IAAKX,EAAW,QAAQ,CACtL,MAAO,GAAIA,EAAW,OAAS,2BAA6BA,EAAW,QAAU,KAAM,CACnF,IAAM8C,EAAY,sBAAsB9C,EAAYW,EAAQf,CAAW,EACnEkD,GAAW,SAAW,KAChBC,EAAgB/C,EAAYW,EAAQhB,EAAUa,CAAmB,GAAGK,EAAQ,MAAMC,EAAgB,qBAAsB,sDAAsDH,EAAO,KAAK,IAAKX,EAAW,QAAQ,EAD5La,EAAQ,MAAMC,EAAgB,qBAAsBkC,EAAuBF,EAAU,OAAO,EAAG9C,EAAW,QAAQ,CAEtJ,MAAW,CAAC,sBAAuB,yBAA0B,sBAAsB,CAAC,CAAC,SAASA,EAAW,IAAI,GAAKA,EAAW,OAAS,2BAA6BA,EAAW,QAAU,OACpLa,EAAQ,MAAMC,EAAgB,qBAAsB,wFAAyFd,EAAW,QAAQ,CACxK,EACIoB,EAAO,cAAc,OAAS,EAC9B6B,EAAsB7B,EAAQiB,EAAM,cAAeA,EAAM,WAAa,KAAMA,EAAM,SAAUvB,EAAgB,qBAAsBD,EAAS,eAAe,EAG1JwB,EAAM,cAAc,OAAS,EAC7BxB,EAAQ,MAAMC,EAAgB,qBAAsB,qDAAsDuB,EAAM,QAAQ,IAGxHjB,EAAO,WAAa,MAAQiB,EAAM,WAAa,MAAQjB,EAAO,WAAa,MAAQiB,EAAM,WAAa,OACtGxB,EAAQ,MAAMC,EAAgB,qBAAsBM,EAAO,WAAa,KAAO,oDAAsD,iDAAkDiB,EAAM,QAAQ,EACrMjB,EAAO,WAAa,MAAQiB,EAAM,WAAa,MACnD,gBAAgBA,EAAM,SAAUjB,EAAO,QAAQ,EACnD,CACA8B,EAA6BtD,EAAaiB,CAAO,CACrD"}
|
|
1
|
+
{"version":3,"file":"EventSourceValidator.js","names":["left","right","part","other","primitives","concepts","application","concept","type","primitive","expression","value","uniqueByName","tryFormatUuidText","tryFormatText","tryFormatInteger","composites","known","compositeProperties","name","source","target","composite","context","DiagnosticCodes","named","streamId","imported","names","streams","stream","parts","duplicate","remaining","path","properties","matches","property","resolved","catalog","EventSourceCatalog","resolver","AuthoringProductionResolver","validateObserverFilters","command","slice","produced","route","production","resolution","state","identifiers","destination","commandDestinationType","allocated","mapping","formatted","compatibleValue","streamIdFailureMessage","validateStreamIdParts","validateSpecificationStreams"],"sources":["../../../../../../Compiler/Parsing/EventSourceValidator.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { AuthoringProductionResolver } from '../Syntax/AuthoringProductionResolver';\nimport { PropertySyntax, TypeRefSyntax } from '../Syntax/Declarations';\nimport { EventSourceCatalog } from '../Syntax/EventSourceCatalog';\nimport { CommandStreamSyntax, EventSourceResolutionKind } from '../Syntax/EventSources';\nimport { validateObserverFilters } from './ObserverFilterValidator';\nimport { ApplicationSyntax } from '../Syntax/Structure';\nimport { ExpressionSyntax, PropertyMappingSyntax } from '../Syntax/Expressions';\nimport { StreamIdFormatResult, streamIdFailureMessage, tryFormatInteger, tryFormatText, tryFormatUuidText } from '../Syntax/StreamIdFormatter';\nimport { commandDestinationType } from './CommandDestinationTypes';\nimport { validateStreamIdParts } from './CompositeStreamIdValidator';\nimport { ParserContext } from './ParserContext';\nimport { compatibleValue, uniqueByName } from './ResponseValidator';\nimport { validateSpecificationStreams } from './SpecificationStreamValidator';\n\nconst sameExpression = (left: ExpressionSyntax | null | undefined, right: ExpressionSyntax | null | undefined): boolean =>\n left == null && right == null || left?.kind === 'PathExpressionSyntax' && right?.kind === 'PathExpressionSyntax' && left.path === right.path ||\n left?.kind === 'LiteralExpressionSyntax' && right?.kind === 'LiteralExpressionSyntax' && JSON.stringify(left.value) === JSON.stringify(right.value);\nconst sameRoute = (left: CommandStreamSyntax, right: CommandStreamSyntax): boolean => left.eventSource === right.eventSource && left.stream === right.stream &&\n sameExpression(left.streamId?.source, right.streamId?.source) && left.streamIdParts.length === right.streamIdParts.length &&\n left.streamIdParts.every(part => right.streamIdParts.some(other => part.property === other.property && sameExpression(part.source, other.source)));\n\nconst primitives = new Set(['String', 'Uuid', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime']);\n\nexport function supportsStreamIdentity(type: TypeRefSyntax, application: ApplicationSyntax): boolean {\n const concepts = application.concepts.filter(concept => concept.name === type.name);\n const primitive = concepts.length === 1 ? concepts[0].type : concepts.length === 0 && primitives.has(type.name) ? type.name : null;\n return primitive === 'String' || primitive === 'Uuid' || primitive === 'Int' && concepts.length === 1 && concepts[0].values.length === 0;\n}\n\nexport function formatStreamIdLiteral(expression: ExpressionSyntax | null | undefined, type: TypeRefSyntax | null, application: ApplicationSyntax): StreamIdFormatResult | null {\n if (expression?.kind !== 'LiteralExpressionSyntax') return null;\n const value = expression.value;\n const primitive = type === null ? null : uniqueByName(application.concepts).get(type.name)?.type ?? type.name;\n if (typeof value === 'string') return primitive === 'Uuid' ? tryFormatUuidText(value) : tryFormatText(value);\n if (typeof value === 'number') return tryFormatInteger(value);\n if (typeof value === 'object' && value !== null && value.literalType === 'ExactNumber') {\n if (value.value.includes('.')) return tryFormatInteger(NaN);\n return tryFormatInteger(BigInt(value.value), false);\n }\n return null;\n}\n\nexport function validateEventSources(application: ApplicationSyntax, context: ParserContext): void {\n const concepts = uniqueByName(application.concepts);\n const composites = uniqueByName(application.types);\n const known = new Set([...primitives, ...concepts.keys(), ...composites.keys()]);\n const compositeProperties = new Map([...composites].map(([name, type]) => [name, uniqueByName(type.properties)]));\n const compatible = (source: TypeRefSyntax, target: TypeRefSyntax): boolean | null => known.has(source.name) && known.has(target.name)\n ? source.name === target.name && source.isCollection === target.isCollection && (!source.isOptional || target.isOptional) : null;\n const validateType = (type: TypeRefSyntax | null, streamId: boolean): void => {\n if (type === null) return;\n if (type.isOptional || type.isCollection || application.types.some(composite => composite.name === type.name)) {\n context.error(DiagnosticCodes.InvalidEventSourceDeclaration, 'Identifier and streamId declarations require a nonoptional scalar value type.', type.location);\n return;\n }\n const named = application.concepts.filter(concept => concept.name === type.name);\n const primitive = named.length === 1 ? named[0].type : named.length === 0 && primitives.has(type.name) ? type.name : null;\n if (streamId && primitive !== null && !supportsStreamIdentity(type, application))\n context.error(DiagnosticCodes.UnsupportedStreamIdType, 'Stream ids support text and UUID values and their nominal concepts, plus integer-backed concepts; other types need a future portable formatter.', type.location);\n if (primitive === null && !application.imports.some(imported => imported.qualifiedName === type.name || imported.qualifiedName.split('.').at(-1) === type.name))\n context.warning(DiagnosticCodes.UnknownType, `Unknown type '${type.name}' in event source declaration.`, type.location);\n };\n const names = new Set<string>();\n for (const source of application.eventSources ?? []) {\n if (names.has(source.name)) context.error(DiagnosticCodes.InvalidEventSourceDeclaration, `Event source '${source.name}' has multiple physical declarations.`, source.location);\n names.add(source.name);\n if ((source.id ?? source.name) === 'Default')\n context.error(DiagnosticCodes.ReservedStoredName, `Event source '${source.name}' has the reserved stored name 'Default'; choose a stored name other than 'Default'.`, source.location);\n validateType(source.identifier, false);\n const streams = new Set<string>();\n for (const stream of source.streams) {\n if (streams.has(stream.name)) context.error(DiagnosticCodes.InvalidEventSourceDeclaration, `Stream '${source.name}.${stream.name}' has multiple declarations under this source.`, stream.location);\n streams.add(stream.name);\n if ((stream.id ?? stream.name) === 'All')\n context.error(DiagnosticCodes.ReservedStoredName, `Stream '${source.name}.${stream.name}' has the reserved stored name 'All'; choose a stored name other than 'All'.`, stream.location);\n validateType(stream.streamId, true);\n const parts = stream.streamIdParts;\n if (parts.length > 0) {\n if (parts.length < 2) context.error(DiagnosticCodes.InvalidEventSourceDeclaration, 'A composite stream id requires at least two named parts.', stream.directiveLocations?.streamId ?? stream.location);\n for (const name of new Set(parts.map(part => part.name))) {\n for (const duplicate of parts.filter(part => part.name === name).slice(1))\n context.error(DiagnosticCodes.InvalidEventSourceDeclaration, `Stream id part '${duplicate.name}' is declared more than once.`, duplicate.location);\n }\n for (const part of parts) validateType(part.type, true);\n }\n }\n }\n const pathProperty = (properties: readonly PropertySyntax[] | null, path: string): { property: PropertySyntax | null; missing: boolean } => {\n const [name, ...remaining] = path.split('.');\n if (properties === null) return { property: null, missing: false };\n const matches = properties.filter(property => property.name === name);\n if (matches.length !== 1) return { property: null, missing: matches.length === 0 };\n const property = matches[0];\n if (remaining.length === 0) return { property, missing: false };\n if (primitives.has(property.type.name) || concepts.has(property.type.name) && !composites.has(property.type.name)) return { property: null, missing: true };\n const resolved = pathProperty(composites.get(property.type.name)?.properties ?? null, remaining.join('.'));\n return resolved.property === null ? resolved : { property: { ...resolved.property, type: { ...resolved.property.type, isCollection: property.type.isCollection || resolved.property.type.isCollection, isOptional: property.type.isOptional || resolved.property.type.isOptional } }, missing: false };\n };\n const catalog = new EventSourceCatalog(application);\n const resolver = new AuthoringProductionResolver(application);\n validateObserverFilters(application, context, resolver);\n for (const { slice } of resolver.slices) for (const command of slice.commands) for (const { route, production } of [\n ...(command.stream == null ? [] : [{ route: command.stream, production: null }]),\n ...command.produces.filter(produced => produced.stream != null).map(produced => ({ route: produced.stream!, production: produced }))\n ]) {\n if (route.propertyCandidate !== null) continue;\n if (production !== null && command.stream != null && sameRoute(route, command.stream))\n context.warning(DiagnosticCodes.RedundantProductionRoute, 'The production route repeats its command route; omit the override.', route.location);\n const resolution = catalog.resolve(route.eventSource, route.stream);\n if (resolution.kind !== EventSourceResolutionKind.Unique) {\n const state = { ambiguous: 'Ambiguous', notFound: 'NotFound', wrongKind: 'WrongKind' }[resolution.kind];\n context.error(DiagnosticCodes.InvalidCommandStream, `Stream '${route.eventSource}.${route.stream}' is ${state}; routing requires one physical source and stream.`, route.location);\n continue;\n }\n const source = resolution.sources[0];\n const stream = resolution.streams[0];\n const identifiers = command.properties.filter(property => property.isIdentifier);\n if (production === null && source.identifier !== null && identifiers.length === 1 && compatible(identifiers[0].type, source.identifier) === false)\n context.error(DiagnosticCodes.InvalidCommandStream, `Command identifier '${identifiers[0].name}' does not have the source's nominal identifier type '${source.identifier.name}'. The stream does not supply a destination.`, identifiers[0].location);\n for (const produced of command.produces.filter(produced => resolver.isEventProduction(produced, slice) && (production === null ? produced.stream == null : produced === production))) {\n if (source.identifier === null) continue;\n const destination = commandDestinationType(command, produced, application, { resolver, slice });\n if (destination === null) continue;\n if (production === null && produced.for === null && produced.inlineEvent !== null && identifiers.length === 1 && compatible(identifiers[0].type, source.identifier) === false) continue;\n const allocated = produced.for === null && produced.inlineEvent === null && !command.properties.some(property => property.isGenerated && property.isIdentifier);\n const primitive = concepts.get(source.identifier.name)?.type ?? (primitives.has(source.identifier.name) ? source.identifier.name : null);\n const matches = allocated ? primitive === null ? null : primitive === 'Uuid' : compatible(destination, source.identifier);\n if (matches === false) context.error(DiagnosticCodes.InvalidCommandStream, `Command production destination does not have the source's nominal identifier type '${source.identifier.name}'. The stream does not supply a destination.`, production?.stream?.location ?? produced.for?.location ?? produced.location);\n }\n const validateMapping = (mapping: PropertyMappingSyntax, target: TypeRefSyntax): void => {\n const expression = mapping.source;\n if (expression.kind === 'PathExpressionSyntax') {\n const resolved = pathProperty(command.properties, expression.path);\n if (resolved.missing || resolved.property !== null && compatible(resolved.property.type, target) === false)\n context.error(DiagnosticCodes.InvalidCommandStream, `Stream id source '${expression.path}' is absent or incompatible with nominal type '${target.name}'.`, expression.location);\n } else if (expression.kind === 'LiteralExpressionSyntax' && expression.value !== null) {\n const formatted = formatStreamIdLiteral(expression, target, application);\n if (formatted?.failure != null) context.error(DiagnosticCodes.InvalidCommandStream, streamIdFailureMessage(formatted.failure), expression.location);\n else if (!compatibleValue(expression, target, concepts, compositeProperties)) context.error(DiagnosticCodes.InvalidCommandStream, `Stream id value is incompatible with nominal type '${target.name}'.`, expression.location);\n } else if (['RawExpressionSyntax', 'ObjectExpressionSyntax', 'ListExpressionSyntax'].includes(expression.kind) || expression.kind === 'LiteralExpressionSyntax' && expression.value === null)\n context.error(DiagnosticCodes.InvalidCommandStream, 'A stream id needs a scalar value source, not a raw expression, collection or absence.', expression.location);\n };\n if (stream.streamIdParts.length > 0) {\n validateStreamIdParts(stream, route.streamIdParts, route.streamId !== null, route.location, DiagnosticCodes.InvalidCommandStream, context, validateMapping);\n continue;\n }\n if (route.streamIdParts.length > 0) {\n context.error(DiagnosticCodes.InvalidCommandStream, 'A streamId part block requires a composite stream.', route.location);\n continue;\n }\n if (stream.streamId === null && route.streamId !== null || stream.streamId !== null && route.streamId === null)\n context.error(DiagnosticCodes.InvalidCommandStream, stream.streamId === null ? 'An unkeyed stream cannot take a streamId mapping.' : 'This keyed stream requires a streamId mapping.', route.location);\n if (stream.streamId === null || route.streamId === null) continue;\n validateMapping(route.streamId, stream.streamId);\n }\n validateSpecificationStreams(application, context);\n}\n"],"mappings":"8wBAkBA,MAAM,gBAAkB,EAA2C,IAC/DA,GAAQ,MAAQC,GAAS,MAAQD,GAAM,OAAS,wBAA0BC,GAAO,OAAS,wBAA0BD,EAAK,OAASC,EAAM,MACxID,GAAM,OAAS,2BAA6BC,GAAO,OAAS,2BAA6B,KAAK,UAAUD,EAAK,KAAK,IAAM,KAAK,UAAUC,EAAM,KAAK,EAChJ,WAAa,EAA2B,IAAwCD,EAAK,cAAgBC,EAAM,aAAeD,EAAK,SAAWC,EAAM,QAClJ,eAAeD,EAAK,UAAU,OAAQC,EAAM,UAAU,MAAM,GAAKD,EAAK,cAAc,SAAWC,EAAM,cAAc,QACnHD,EAAK,cAAc,MAAM,GAAQC,EAAM,cAAc,KAAK,GAASC,EAAK,WAAaC,EAAM,UAAY,eAAeD,EAAK,OAAQC,EAAM,MAAM,CAAC,CAAC,EAE/IC,kBAAa,IAAI,IAAI,CAAC,SAAU,OAAQ,MAAO,UAAW,OAAQ,OAAQ,UAAU,CAAC,EAE3F,SAAgB,uBAAuB,EAAqB,EAAyC,CACjG,IAAMC,EAAWC,EAAY,SAAS,OAAO,GAAWC,EAAQ,OAASC,EAAK,IAAI,EAC5EC,EAAYJ,EAAS,SAAW,E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