@cratis/screenplay-language 4.214.1 → 4.214.3

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.
@@ -1,2 +1,2 @@
1
- import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{locationOf as i,startOf as a}from"./SourceLine.js";import{parseComplianceDirective as o,parseComplianceMarkers as s}from"./ConceptComplianceParser.js";import{firstWord as c,unescapeIdentifier as l}from"./LineText.js";import{describePlacement as u,documentPlacement as d,isDocumentPlacement as f}from"../Files/PlayPlacement.js";import{parseDescription as p}from"./DescriptionParser.js";import{parsePurpose as m}from"./PurposeParser.js";import{isFileImport as h,parseFileImport as g}from"./FileImportParser.js";import{recordAuthoredDocument as _}from"../Syntax/SourceOptions.js";import{collectInputUses as v}from"./InputUses.js";import{misplacedReactionIdentity as y}from"./ReactionIdentityParser.js";import{parseEventSource as b}from"./EventSourceParser.js";import{isFileDirective as x}from"./FileReferences.js";import{parseSystem as S}from"./OperationParser.js";import{parseExample as C}from"./SpecificationExampleParser.js";import{isBlankPublicEventOrigin as ee}from"../Syntax/PublicEventInvariants.js";import{parseType as w}from"./DeclarationParsers.js";import{parseValidate as T}from"./CommandParser.js";import{parseTriggerDeclaration as te}from"./TriggerDataParser.js";import{FeatureBody as E,featureBodyExpected as D}from"./FeatureBody.js";import{ModuleBody as ne,moduleBodyExpected as O,modulePattern as k,parseModule as re}from"./ModuleBody.js";import{EnumerationMembers as A}from"./EnumerationMembers.js";import{parseGeneration as j}from"./GenerationParser.js";import{parseIdentity as M}from"./IdentityParser.js";import{parsePolicy as N}from"./PolicyParser.js";import{parseSeed as P}from"./SeedParser.js";import{parseExposure as F,parseInstance as I}from"./CompositionParser.js";import{parseUiProfile as L}from"./UiProfileLegacyLayout.js";const R=r(`^domain\\s+([A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*)$`),z=r(`^import\\s+([\\w.]+)(?:\\s+from\\s+"(?<origin>${t})")?$`),B=r(`^concept\\s+(\\w+)\\s*:\\s*(\\w+)((?:\\s+@?\\w+)*)$`),V=r(`^@?[a-z_]\\w*$`),H=r(`^persona\\s+([A-Za-z_]\\w*)$`),U=r(`^policy\\s+([A-Za-z_]\\w*)$`),W=/^[ ]*\t/,G=[`Uuid`,`String`,`Int`,`Decimal`,`Bool`,`Date`,`DateTime`],K=/* @__PURE__ */ new Set([`policy`,`authentication`,`seed`,`ui`,`theme`,`trigger`,`layout`,`behavior`,`sample`]),q=/* @__PURE__ */ new Set([`slice`,`feature`,`description`,`documentation`,`authorize`,`screen`,`dialog`,`form`,`contribute`,`on`,`uses`]);function parseApplication(t,r,a=d){t.deferIdentityValidation=!0,warnOnTabIndentation(t,r);let o=a.length===1?new ne(a[0]):void 0,s=a.length>1?new E(a[a.length-1]):void 0,l=o??s,u=null,p=null,x=!1,T=null,D=!1,O=null,k=[],A=[],j=[],R=[],B=[],V=[],H=[],U=[],W=[],G=[],q=[],J=[],Y=[],X=[],Z=[],Q=!1;for(let r=t.reader.peekSignificant();r!==void 0;r=t.reader.peekSignificant()){t.reader.takeSignificant();let s=c(r.content);if(s===`command`&&/^command\s+reads(?:\s|$)/.test(r.content))D||!f(a)||!/^command\s+reads\s+protected$/.test(r.content)?t.error(e.InvalidCommandReadsDeclaration,`Declare 'command reads protected' once at the application root.`,i(r)):T=`Protected`,D=!0;else if(s===`reaction`)x||!f(a)||!/^reaction\s+batches\s+atomic$/.test(r.content)?t.error(e.InvalidReactionBatchesDeclaration,`Declare 'reaction batches atomic' once at the application root.`,i(r)):p=`Atomic`,x=!0;else if(s===`runs`)y(t,r);else if(s===`domain`)t.authoredDeclarations=!0,O=parseDomain(t,r,O,Q);else if(Q||=declaresConstruct(s,r,a),t.authoredDeclarations||=s!==`import`&&declaresConstruct(s,r,a),s===`import`&&h(r.content))l===void 0?g(t,r,A):l.tryParse(t,r);else if(s===`import`){let a=z.exec(r.content);if(a===null)t.error(e.InvalidImportDeclaration,`Invalid import '${r.content}' - expected 'import <Qualified.Name> [from "<origin>"]'`,i(r));else{let o=a.groups?.origin===void 0?null:n(a.groups.origin);o!==null&&ee(o)&&t.error(e.InvalidImportDeclaration,`An import origin must be a nonblank quoted string`,i(r)),k.push({kind:`ImportSyntax`,qualifiedName:a[1],origin:o,visibility:o===null?`Private`:`Public`,location:i(r)})}}else if(s===`example`)l===void 0?J.push(C(t,r)):l.tryParse(t,r);else if(s===`eventsource`)V.push(b(t,r));else if(s===`system`)B.push(S(t,r));else if(s===`concept`)j.push(parseConcept(t,r));else if(s===`type`)R.push(w(t,r));else if(s===`module`&&!f(a))parseModuleInPlacedFile(t,r,a,o);else if(s===`module`)H.push(re(t,r));else if(s===`persona`)U.push(parsePersona(t,r));else if(s===`seed`)q.push(P(t.valueContext,r));else if(s===`purpose`&&l!==void 0)l.tryParse(t,r);else if(s===`purpose`)G.push(m(t,r));else if(s===`identity`)u=M(t,r,u);else if(s===`policy`)W.push(N(t,r));else if(s===`exposure`)X.push(F(t,r));else if(s===`instance`)Z.push(I(t,r));else if(s===`trigger`){let e=te(t,r),n=/^trigger\s+([A-Za-z_]\w*)$/.exec(r.content)?.[1];n!==void 0&&Y.push({name:n,data:e})}else K.has(s)?s===`behavior`||s===`layout`?v(t,r):s===`ui`?L(t,r):t.skipOpaqueBlock(r.indent):l?.tryParse(t,r)!==!0&&reportUnexpectedTopLevel(t,r,a)}o===void 0?s!==void 0&&H.unshift(place(a,s.build(t.start,!0),t.start)):H.unshift(o.build(t.start,!0));let $={kind:`ApplicationSyntax`,...T===null?{}:{commandReadMode:T},...p===null?{}:{reactionProductionMode:p},...u===null?{}:{identity:u},sourceOptions:t.sourceOptions,domain:O,imports:k,concepts:j,types:R,systems:B,eventSources:V,examples:J,modules:H,personas:U,policies:W,purposes:G,seeds:q,declaredTriggers:Y,fileImports:A,...X.length>0?{exposures:X}:{},...Z.length>0?{instanceContributions:Z}:{},location:t.start};return t.authoredDeclarations&&_($),$}function declaresConstruct(e,t,n){return e===`import`?z.test(t.content):e===`module`?f(n):e===`identity`?t.content===`identity`:e===`purpose`||e===`example`||e===`exposure`||e===`instance`||e===`eventsource`||e===`system`||e===`concept`||e===`type`||e===`persona`||K.has(e)}function parseModuleInPlacedFile(t,n,r,a){let o=k.exec(n.content)?.[1]??``;a!==void 0&&o===r[0]?(t.authoredDeclarations=!0,a.parseChildren(t,n)):(t.error(e.ModuleInPlacedFile,`This file is imported into ${u(r)}, so it cannot declare module '${o}' - import it at the top level of a document instead`,i(n)),t.skipBlock(n.indent))}function reportUnexpectedTopLevel(t,n,r){let a=c(n.content);if(f(r)){let r=q.has(a)?` - '${a}' belongs in a module or feature; wrap it in one, or import this file from inside one`:` - expected domain, import, concept, type, policy, persona, authentication, identity, module, seed, trigger, behavior, ui profile, theme, sample data or layout`;t.error(e.UnknownTopLevelConstruct,`Unexpected '${a}' at the top level${r}`,i(n))}else{let o=r.length===1?O:D;t.error(e.UnexpectedInPlacedFile,`Unexpected '${a}' in a file imported into ${u(r)} - expected an application declaration or ${o}`,i(n))}t.skipBlock(n.indent)}function place(e,t,n){let r=t;for(let t=e.length-2;t>=1;t--)r={kind:`FeatureSyntax`,name:e[t],description:null,authorize:null,features:[r],slices:[],fileImports:[],isPlacement:!0,location:n};return{kind:`ModuleSyntax`,name:e[0],description:null,authorize:null,features:[r],fileImports:[],isPlacement:!0,location:n}}function parseDomain(t,n,r,a){let o=R.exec(n.content);return o===null?(t.error(e.InvalidDomainDeclaration,`Invalid domain declaration '${n.content}' - expected 'domain <Qualified.Name>'`,i(n)),r):r===null?(a&&t.error(e.DomainNotFirst,`'domain' must be declared before any other construct`,i(n)),{kind:`DomainSyntax`,name:o[1],location:i(n)}):(t.error(e.DuplicateDomain,`The document already declares a domain - a document can have at most one`,i(n)),r)}function warnOnTabIndentation(t,n){let r=!1;for(let i of n)i.raw.trimStart().startsWith("```")?r=!r:!r&&W.test(i.raw)&&t.warning(e.TabIndentation,`Screenplay is indentation based - use spaces, not tabs`,a(i))}function parseConcept(t,n){let r=B.exec(n.content);if(r===null)return t.error(e.InvalidConceptDeclaration,`Invalid concept declaration '${n.content}' - expected 'concept <Name> : <Type>'`,i(n)),t.skipBlock(n.indent),{kind:`ConceptSyntax`,name:c(n.content),type:``,attributes:[],values:[],location:i(n)};let[,a,u,d]=r,f=s(t,n,a,d);u!==`Enum`&&!G.includes(u)&&t.error(e.UnknownPrimitiveType,`Unknown primitive type '${u}' - expected ${G.join(`, `)} or Enum`,i(n));let m=[],h=new A,g=null,_=!1,v=null,y=[];for(let r=t.peekChild(n.indent);r!==void 0;r=t.peekChild(n.indent)){t.reader.takeSignificant();let n=u===`Enum`?h.tryNumbered(t,r):void 0;if(n!==void 0)m.push(n);else if(c(r.content)===`description`&&(u!==`Enum`||r.content!==`description`||t.peekChild(r.indent)?.content.startsWith("```")===!0))v=p(t,r,v,`Concept '${a}'`);else if(x(r))continue;else if(c(r.content)===`validate`){u===`Enum`&&r.content===`validate`&&t.peekChild(r.indent)===void 0&&t.warning(e.ValidateReadAsEnumerationBlock,`'validate' in enumeration concept '${a}' declares an empty validate block, not a value named 'validate' - write '@validate' for the value`,i(r));let n=T(t,r,`concept`,a);n!==void 0&&y.push(n)}else if(c(r.content)===`generate`&&(u!==`Enum`||r.content!==`generate`)){_&&t.error(e.DuplicateGeneration,`Concept '${a}' declares generation more than once.`,i(r));let n=j(t,r,u);_||(g=n),_=!0}else o(t,r,a,f)||(u===`Enum`&&V.test(r.content)?m.push(l(r.content)):u===`Enum`?t.error(e.InvalidEnumerationValue,`Invalid enum value '${r.content}' - expected an identifier`,i(r)):(t.error(e.UnknownConceptDirective,`Unexpected '${r.content}' in concept body - expected validate, generate, 'file <path>' or '<attribute> reason "<text>"'`,i(r)),t.skipBlock(r.indent)))}let b=h.finish(t,n,m.length);return{kind:`ConceptSyntax`,name:a,type:u,attributes:f,values:m,validations:y,description:v,...g===null?{}:{generation:g},...b===void 0?{}:{valueNumbers:b},location:i(n)}}function parsePersona(t,n){let r=H.exec(n.content)?.[1]??``;r===``&&t.error(e.InvalidPersonaDeclaration,`Invalid persona declaration '${n.content}' - expected 'persona <Name>'`,i(n));let a=null,o=[];for(let s=t.peekChild(n.indent);s!==void 0;s=t.peekChild(n.indent)){t.reader.takeSignificant();let n=c(s.content);if(n===`description`)a=p(t,s,a,`Persona '${r}'`);else if(n===`policy`){let n=U.exec(s.content);n===null?t.error(e.InvalidPersonaPolicyReference,`Invalid policy reference '${s.content}' - expected 'policy <Name>'`,i(s)):o.push(n[1])}else t.error(e.UnknownPersonaDirective,`Unexpected '${n}' in persona body - expected description or policy`,i(s)),t.skipBlock(s.indent)}return{kind:`PersonaSyntax`,name:r,description:a,policies:o,location:i(n)}}export{parseApplication};
1
+ import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{stringBodyPattern as t,unescapeString as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{locationOf as i,startOf as a}from"./SourceLine.js";import{parseComplianceDirective as o,parseComplianceMarkers as s}from"./ConceptComplianceParser.js";import{firstWord as c,unescapeIdentifier as l}from"./LineText.js";import{describePlacement as u,documentPlacement as d,isDocumentPlacement as f}from"../Files/PlayPlacement.js";import{parseDescription as p}from"./DescriptionParser.js";import{parsePurpose as m}from"./PurposeParser.js";import{isFileImport as h,parseFileImport as g}from"./FileImportParser.js";import{recordAuthoredDocument as _}from"../Syntax/SourceOptions.js";import{collectInputUses as v}from"./InputUses.js";import{misplacedReactionIdentity as y}from"./ReactionIdentityParser.js";import{parseEventSource as b}from"./EventSourceParser.js";import{isFileDirective as x}from"./FileReferences.js";import{parseSystem as S}from"./OperationParser.js";import{parseExample as C}from"./SpecificationExampleParser.js";import{isBlankPublicEventOrigin as w}from"../Syntax/PublicEventInvariants.js";import{parseType as ee}from"./DeclarationParsers.js";import{parseValidate as T}from"./CommandParser.js";import{parseTriggerDeclaration as te}from"./TriggerDataParser.js";import{FeatureBody as ne,featureBodyExpected as E}from"./FeatureBody.js";import{ModuleBody as D,moduleBodyExpected as O,modulePattern as k,parseModule as re}from"./ModuleBody.js";import{EnumerationMembers as A}from"./EnumerationMembers.js";import{parseGeneration as j}from"./GenerationParser.js";import{parseIdentity as M}from"./IdentityParser.js";import{parsePolicy as N}from"./PolicyParser.js";import{parseSeed as P}from"./SeedParser.js";import{parseExposure as F,parseInstance as I}from"./CompositionParser.js";import{parseUiProfile as L}from"./UiProfileLegacyLayout.js";const R=r(`^domain\\s+([A-Za-z_]\\w*(?:\\.[A-Za-z_]\\w*)*)$`),z=r(`^import\\s+([\\w.]+)(?:\\s+from\\s+"(?<origin>${t})")?$`),B=r(`^concept\\s+(\\w+)\\s*:\\s*(\\w+)((?:\\s+@?\\w+)*)$`),V=r(`^@?[a-z_]\\w*$`),H=r(`^persona\\s+([A-Za-z_]\\w*)$`),U=r(`^policy\\s+([A-Za-z_]\\w*)$`),W=/^[ ]*\t/,G=[`Uuid`,`String`,`Int`,`Decimal`,`Bool`,`Date`,`DateTime`],K=/* @__PURE__ */ new Set([`policy`,`authentication`,`seed`,`ui`,`theme`,`trigger`,`layout`,`behavior`,`sample`]),q=/* @__PURE__ */ new Set([`slice`,`feature`,`description`,`documentation`,`authorize`,`screen`,`dialog`,`form`,`contribute`,`on`,`uses`]);function parseApplication(t,r,a=d){t.deferIdentityValidation=!0,warnOnTabIndentation(t,r);let o=a.length===1?new D(a[0]):void 0,s=a.length>1?new ne(a[a.length-1]):void 0,l=o??s,u=null,p=null,x=!1,T=null,E=!1,O=null,k=[],A=[],j=[],R=[],B=[],V=[],H=[],U=[],W=[],G=[],q=[],J=[],Y=[],X=[],Z=[],Q=!1;for(let r=t.reader.peekSignificant();r!==void 0;r=t.reader.peekSignificant()){t.reader.takeSignificant();let s=c(r.content);if(s===`command`&&/^command\s+reads(?:\s|$)/.test(r.content))E||!f(a)||!/^command\s+reads\s+protected$/.test(r.content)?t.error(e.InvalidCommandReadsDeclaration,`Declare 'command reads protected' once at the application root.`,i(r)):T=`Protected`,E=!0;else if(s===`reaction`)x||!f(a)||!/^reaction\s+batches\s+atomic$/.test(r.content)?t.error(e.InvalidReactionBatchesDeclaration,`Declare 'reaction batches atomic' once at the application root.`,i(r)):p=`Atomic`,x=!0;else if(s===`runs`)y(t,r);else if(s===`domain`)t.authoredDeclarations=!0,O=parseDomain(t,r,O,Q);else if(Q||=declaresConstruct(s,r,a),t.authoredDeclarations||=s!==`import`&&declaresConstruct(s,r,a),s===`import`&&h(r.content))l===void 0?g(t,r,A):l.tryParse(t,r);else if(s===`import`){let a=z.exec(r.content);if(a===null)t.error(e.InvalidImportDeclaration,`Invalid import '${r.content}' - expected 'import <Qualified.Name> [from "<origin>"]'`,i(r));else{let o=a.groups?.origin===void 0?null:n(a.groups.origin);o!==null&&w(o)&&t.error(e.InvalidImportDeclaration,`An import origin must be a nonblank quoted string`,i(r)),k.push({kind:`ImportSyntax`,qualifiedName:a[1],origin:o,visibility:o===null?`Private`:`Public`,location:i(r)})}}else if(s===`example`)l===void 0?J.push(C(t,r)):l.tryParse(t,r);else if(s===`eventsource`)V.push(b(t,r));else if(s===`system`)B.push(S(t,r));else if(s===`concept`)j.push(parseConcept(t,r));else if(s===`type`)R.push(ee(t,r));else if(s===`module`&&!f(a))parseModuleInPlacedFile(t,r,a,o);else if(s===`module`)H.push(re(t,r));else if(s===`persona`)U.push(parsePersona(t,r));else if(s===`seed`)q.push(P(t.valueContext,r));else if(s===`purpose`&&l!==void 0)l.tryParse(t,r);else if(s===`purpose`)G.push(m(t,r));else if(s===`identity`)u=M(t,r,u);else if(s===`policy`){let n=N(t,r);W.some(e=>e.name===n.name)&&t.error(e.DuplicateDeclaration,`Duplicate declaration of policy '${n.name}' - policy names must be unique`,n.location),W.push(n)}else if(s===`exposure`)X.push(F(t,r));else if(s===`instance`)Z.push(I(t,r));else if(s===`trigger`){let e=te(t,r),n=/^trigger\s+([A-Za-z_]\w*)$/.exec(r.content)?.[1];n!==void 0&&Y.push({name:n,data:e})}else K.has(s)?s===`behavior`||s===`layout`?v(t,r):s===`ui`?L(t,r):t.skipOpaqueBlock(r.indent):l?.tryParse(t,r)!==!0&&reportUnexpectedTopLevel(t,r,a)}o===void 0?s!==void 0&&H.unshift(place(a,s.build(t.start,!0),t.start)):H.unshift(o.build(t.start,!0));let $={kind:`ApplicationSyntax`,...T===null?{}:{commandReadMode:T},...p===null?{}:{reactionProductionMode:p},...u===null?{}:{identity:u},sourceOptions:t.sourceOptions,domain:O,imports:k,concepts:j,types:R,systems:B,eventSources:V,examples:J,modules:H,personas:U,policies:W,purposes:G,seeds:q,declaredTriggers:Y,fileImports:A,...X.length>0?{exposures:X}:{},...Z.length>0?{instanceContributions:Z}:{},location:t.start};return t.authoredDeclarations&&_($),$}function declaresConstruct(e,t,n){return e===`import`?z.test(t.content):e===`module`?f(n):e===`identity`?t.content===`identity`:e===`purpose`||e===`example`||e===`exposure`||e===`instance`||e===`eventsource`||e===`system`||e===`concept`||e===`type`||e===`persona`||K.has(e)}function parseModuleInPlacedFile(t,n,r,a){let o=k.exec(n.content)?.[1]??``;a!==void 0&&o===r[0]?(t.authoredDeclarations=!0,a.parseChildren(t,n)):(t.error(e.ModuleInPlacedFile,`This file is imported into ${u(r)}, so it cannot declare module '${o}' - import it at the top level of a document instead`,i(n)),t.skipBlock(n.indent))}function reportUnexpectedTopLevel(t,n,r){let a=c(n.content);if(f(r)){let r=q.has(a)?` - '${a}' belongs in a module or feature; wrap it in one, or import this file from inside one`:` - expected domain, import, concept, type, policy, persona, authentication, identity, module, seed, trigger, behavior, ui profile, theme, sample data or layout`;t.error(e.UnknownTopLevelConstruct,`Unexpected '${a}' at the top level${r}`,i(n))}else{let o=r.length===1?O:E;t.error(e.UnexpectedInPlacedFile,`Unexpected '${a}' in a file imported into ${u(r)} - expected an application declaration or ${o}`,i(n))}t.skipBlock(n.indent)}function place(e,t,n){let r=t;for(let t=e.length-2;t>=1;t--)r={kind:`FeatureSyntax`,name:e[t],description:null,authorize:null,features:[r],slices:[],fileImports:[],isPlacement:!0,location:n};return{kind:`ModuleSyntax`,name:e[0],description:null,authorize:null,features:[r],fileImports:[],isPlacement:!0,location:n}}function parseDomain(t,n,r,a){let o=R.exec(n.content);return o===null?(t.error(e.InvalidDomainDeclaration,`Invalid domain declaration '${n.content}' - expected 'domain <Qualified.Name>'`,i(n)),r):r===null?(a&&t.error(e.DomainNotFirst,`'domain' must be declared before any other construct`,i(n)),{kind:`DomainSyntax`,name:o[1],location:i(n)}):(t.error(e.DuplicateDomain,`The document already declares a domain - a document can have at most one`,i(n)),r)}function warnOnTabIndentation(t,n){let r=!1;for(let i of n)i.raw.trimStart().startsWith("```")?r=!r:!r&&W.test(i.raw)&&t.warning(e.TabIndentation,`Screenplay is indentation based - use spaces, not tabs`,a(i))}function parseConcept(t,n){let r=B.exec(n.content);if(r===null)return t.error(e.InvalidConceptDeclaration,`Invalid concept declaration '${n.content}' - expected 'concept <Name> : <Type>'`,i(n)),t.skipBlock(n.indent),{kind:`ConceptSyntax`,name:c(n.content),type:``,attributes:[],values:[],location:i(n)};let[,a,u,d]=r,f=s(t,n,a,d);u!==`Enum`&&!G.includes(u)&&t.error(e.UnknownPrimitiveType,`Unknown primitive type '${u}' - expected ${G.join(`, `)} or Enum`,i(n));let m=[],h=new A,g=null,_=!1,v=null,y=[];for(let r=t.peekChild(n.indent);r!==void 0;r=t.peekChild(n.indent)){t.reader.takeSignificant();let n=u===`Enum`?h.tryNumbered(t,r):void 0;if(n!==void 0)m.push(n);else if(c(r.content)===`description`&&(u!==`Enum`||r.content!==`description`||t.peekChild(r.indent)?.content.startsWith("```")===!0))v=p(t,r,v,`Concept '${a}'`);else if(x(r))continue;else if(c(r.content)===`validate`){u===`Enum`&&r.content===`validate`&&t.peekChild(r.indent)===void 0&&t.warning(e.ValidateReadAsEnumerationBlock,`'validate' in enumeration concept '${a}' declares an empty validate block, not a value named 'validate' - write '@validate' for the value`,i(r));let n=T(t,r,`concept`,a);n!==void 0&&y.push(n)}else if(c(r.content)===`generate`&&(u!==`Enum`||r.content!==`generate`)){_&&t.error(e.DuplicateGeneration,`Concept '${a}' declares generation more than once.`,i(r));let n=j(t,r,u);_||(g=n),_=!0}else o(t,r,a,f)||(u===`Enum`&&V.test(r.content)?m.push(l(r.content)):u===`Enum`?t.error(e.InvalidEnumerationValue,`Invalid enum value '${r.content}' - expected an identifier`,i(r)):(t.error(e.UnknownConceptDirective,`Unexpected '${r.content}' in concept body - expected validate, generate, 'file <path>' or '<attribute> reason "<text>"'`,i(r)),t.skipBlock(r.indent)))}let b=h.finish(t,n,m.length);return{kind:`ConceptSyntax`,name:a,type:u,attributes:f,values:m,validations:y,description:v,...g===null?{}:{generation:g},...b===void 0?{}:{valueNumbers:b},location:i(n)}}function parsePersona(t,n){let r=H.exec(n.content)?.[1]??``;r===``&&t.error(e.InvalidPersonaDeclaration,`Invalid persona declaration '${n.content}' - expected 'persona <Name>'`,i(n));let a=null,o=[];for(let s=t.peekChild(n.indent);s!==void 0;s=t.peekChild(n.indent)){t.reader.takeSignificant();let n=c(s.content);if(n===`description`)a=p(t,s,a,`Persona '${r}'`);else if(n===`policy`){let n=U.exec(s.content);n===null?t.error(e.InvalidPersonaPolicyReference,`Invalid policy reference '${s.content}' - expected 'policy <Name>'`,i(s)):o.push(n[1])}else t.error(e.UnknownPersonaDirective,`Unexpected '${n}' in persona body - expected description or policy`,i(s)),t.skipBlock(s.indent)}return{kind:`PersonaSyntax`,name:r,description:a,policies:o,location:i(n)}}export{parseApplication};
2
2
  //# sourceMappingURL=ScreenplayParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenplayParser.js","names":["domainPattern","pattern","importPattern","stringBodyPattern","conceptPattern","enumValuePattern","personaPattern","personaPolicyPattern","tabIndentPattern","primitiveTypes","opaqueTopLevel","bodyKeywords","documentPlacement","context","lines","moduleBody","placement","ModuleBody","featureBody","FeatureBody","placedBody","identity","reactionProductionMode","sawReactionBatches","commandReadMode","sawCommandReads","domain","imports","fileImports","concepts","types","systems","eventSources","modules","personas","policies","purposes","seeds","examples","declaredTriggers","exposures","instanceContributions","sawOtherConstruct","line","keyword","firstWord","isDocumentPlacement","DiagnosticCodes","locationOf","misplacedReactionIdentity","isFileImport","parseFileImport","match","origin","unescapeString","isBlankPublicEventOrigin","parseExample","parseEventSource","parseSystem","parseType","parseModule","parseSeed","parsePurpose","parseIdentity","parsePolicy","parseExposure","parseInstance","data","parseTriggerDeclaration","name","collectInputUses","parseUiProfile","root","recordAuthoredDocument","modulePattern","describePlacement","word","hint","expected","moduleBodyExpected","featureBodyExpected","feature","innermost","index","start","existing","inFence","startOf","type","attributeText","attributes","parseComplianceMarkers","values","members","EnumerationMembers","generation","declaredGeneration","description","validations","child","memberName","parseDescription","isFileDirective","parsed","parseValidate","parseGeneration","parseComplianceDirective","unescapeIdentifier","valueNumbers","policy"],"sources":["../../../../../../Compiler/Parsing/ScreenplayParser.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 { CommandReadMode } from '../Syntax/CommandReadMode';\nimport { ReactionProductionMode } from '../Syntax/ReactionProductionMode';\nimport { EnumerationMembers } from './EnumerationMembers';\nimport { GenerationSyntax } from '../Syntax/GenerationSyntax';\nimport { parseGeneration } from './GenerationParser';\nimport { IdentitySyntax } from '../Syntax/IdentitySyntax';\nimport { parseIdentity } from './IdentityParser';\nimport { misplacedReactionIdentity } from './ReactionIdentityParser';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { recordAuthoredDocument } from '../Syntax/SourceOptions';\nimport { SourceLocation } from '../Diagnostics/SourceLocation';\nimport { describePlacement, documentPlacement, isDocumentPlacement, PlayPlacement } from '../Files/PlayPlacement';\nimport { PersonaSyntax } from '../Syntax/Authorization';\nimport { ConceptSyntax, DomainSyntax, ImportSyntax, TypeSyntax } from '../Syntax/Declarations';\nimport { SpecificationExampleSyntax } from '../Syntax/Specifications';\nimport { ApplicationSyntax, FeatureSyntax, FileImportSyntax, ModuleSyntax } from '../Syntax/Structure';\nimport { parseTriggerDeclaration } from './TriggerDataParser';\nimport { pattern } from '../Text/patterns';\nimport { parseComplianceDirective, parseComplianceMarkers } from './ConceptComplianceParser';\nimport { parseType } from './DeclarationParsers';\nimport { ValidateSyntax } from '../Syntax/Commands';\nimport { parseValidate } from './CommandParser';\nimport { parseDescription } from './DescriptionParser';\nimport { FeatureBody, featureBodyExpected } from './FeatureBody';\nimport { isFileImport, parseFileImport } from './FileImportParser';\nimport { isFileDirective } from './FileReferences';\nimport { collectInputUses } from './InputUses';\nimport { firstWord, unescapeIdentifier } from './LineText';\nimport { ModuleBody, moduleBodyExpected, modulePattern, parseModule } from './ModuleBody';\nimport { ParserContext } from './ParserContext';\nimport { PolicySyntax } from '../Syntax/Policies';\nimport { parsePolicy } from './PolicyParser';\nimport { PurposeSyntax } from '../Syntax/Purposes';\nimport { parsePurpose } from './PurposeParser';\nimport { SeedSyntax } from '../Syntax/Seeds';\nimport { parseSeed } from './SeedParser';\nimport { parseSystem } from './OperationParser';\nimport { EventVisibility } from '../Syntax/EventVisibility';\nimport { isBlankPublicEventOrigin } from '../Syntax/PublicEventInvariants';\nimport { stringBodyPattern, unescapeString } from '../Text/StringLiteral';\nimport { SystemSyntax } from '../Syntax/Operations';\nimport { EventSourceSyntax } from '../Syntax/EventSources';\nimport { parseEventSource } from './EventSourceParser';\nimport { parseExposure, parseInstance } from './CompositionParser';\nimport { ExposureSyntax, InstanceContributionsSyntax } from '../Syntax/CompositionSyntax';\nimport { parseExample } from './SpecificationExampleParser';\nimport { parseUiProfile } from './UiProfileLegacyLayout';\nimport { locationOf, SourceLine, startOf } from './SourceLine';\n\nconst domainPattern = pattern('^domain\\\\s+([A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)*)$');\nconst importPattern = pattern(`^import\\\\s+([\\\\w.]+)(?:\\\\s+from\\\\s+\"(?<origin>${stringBodyPattern})\")?$`);\nconst conceptPattern = pattern('^concept\\\\s+(\\\\w+)\\\\s*:\\\\s*(\\\\w+)((?:\\\\s+@?\\\\w+)*)$');\nconst enumValuePattern = pattern('^@?[a-z_]\\\\w*$');\nconst personaPattern = pattern('^persona\\\\s+([A-Za-z_]\\\\w*)$');\nconst personaPolicyPattern = pattern('^policy\\\\s+([A-Za-z_]\\\\w*)$');\nconst tabIndentPattern = /^[ ]*\\t/;\nconst primitiveTypes = ['Uuid', 'String', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime'];\n\n// Top-level, module and feature constructs the C# compiler knows that this compiler does not model. They\n// are skipped whole, not reported.\nconst opaqueTopLevel = new Set(['policy', 'authentication', 'seed', 'ui', 'theme', 'trigger', 'layout', 'behavior', 'sample']);\n\n// What belongs in a module or feature body; at the top level of a whole document it gets a hint saying so.\nconst bodyKeywords = new Set(['slice', 'feature', 'description', 'documentation', 'authorize', 'screen', 'dialog', 'form', 'contribute', 'on', 'uses']);\n\n// Parses one document into its application syntax - the port of the C# ScreenplayParser. The placement says\n// where the document's top level belongs: the application, unless an import placed it in a module or feature.\nexport function parseApplication(context: ParserContext, lines: readonly SourceLine[], placement: PlayPlacement = documentPlacement): ApplicationSyntax {\n context.deferIdentityValidation = true;\n warnOnTabIndentation(context, lines);\n const moduleBody = placement.length === 1 ? new ModuleBody(placement[0]) : undefined;\n const featureBody = placement.length > 1 ? new FeatureBody(placement[placement.length - 1]) : undefined;\n const placedBody = moduleBody ?? featureBody;\n let identity: IdentitySyntax | null = null;\n let reactionProductionMode: ReactionProductionMode | null = null;\n let sawReactionBatches = false;\n let commandReadMode: CommandReadMode | null = null;\n let sawCommandReads = false;\n let domain: DomainSyntax | null = null;\n const imports: ImportSyntax[] = [];\n const fileImports: FileImportSyntax[] = [];\n const concepts: ConceptSyntax[] = [];\n const types: TypeSyntax[] = [];\n const systems: SystemSyntax[] = [];\n const eventSources: EventSourceSyntax[] = [];\n const modules: ModuleSyntax[] = [];\n const personas: PersonaSyntax[] = [];\n const policies: PolicySyntax[] = [];\n const purposes: PurposeSyntax[] = [];\n const seeds: SeedSyntax[] = [];\n const examples: SpecificationExampleSyntax[] = [];\n const declaredTriggers: NonNullable<ApplicationSyntax['declaredTriggers']>[number][] = [];\n const exposures: ExposureSyntax[] = [];\n const instanceContributions: InstanceContributionsSyntax[] = [];\n let sawOtherConstruct = false;\n for (let line = context.reader.peekSignificant(); line !== undefined; line = context.reader.peekSignificant()) {\n context.reader.takeSignificant();\n const keyword = firstWord(line.content);\n if (keyword === 'command' && /^command\\s+reads(?:\\s|$)/.test(line.content)) {\n if (sawCommandReads || !isDocumentPlacement(placement) || !/^command\\s+reads\\s+protected$/.test(line.content)) {\n context.error(DiagnosticCodes.InvalidCommandReadsDeclaration, \"Declare 'command reads protected' once at the application root.\", locationOf(line));\n } else {\n commandReadMode = CommandReadMode.Protected;\n }\n sawCommandReads = true;\n continue;\n }\n if (keyword === 'reaction') {\n if (sawReactionBatches || !isDocumentPlacement(placement) || !/^reaction\\s+batches\\s+atomic$/.test(line.content)) {\n context.error(DiagnosticCodes.InvalidReactionBatchesDeclaration, \"Declare 'reaction batches atomic' once at the application root.\", locationOf(line));\n } else {\n reactionProductionMode = ReactionProductionMode.Atomic;\n }\n sawReactionBatches = true;\n continue;\n }\n if (keyword === 'runs') {\n misplacedReactionIdentity(context, line);\n continue;\n }\n if (keyword === 'domain') {\n context.authoredDeclarations = true;\n domain = parseDomain(context, line, domain, sawOtherConstruct);\n continue;\n }\n // The C# parser asks whether anything was declared before the domain, so an import it rejected,\n // a file import and an unknown construct do not count.\n sawOtherConstruct ||= declaresConstruct(keyword, line, placement);\n context.authoredDeclarations ||= keyword !== 'import' && declaresConstruct(keyword, line, placement);\n if (keyword === 'import' && isFileImport(line.content)) {\n // A top level import belongs to whatever the document's top level is - the application, or the\n // module or feature the document was itself imported into.\n if (placedBody !== undefined) {\n placedBody.tryParse(context, line);\n } else {\n parseFileImport(context, line, fileImports);\n }\n } else if (keyword === 'import') {\n const match = importPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidImportDeclaration, `Invalid import '${line.content}' - expected 'import <Qualified.Name> [from \"<origin>\"]'`, locationOf(line));\n } else {\n const origin = match.groups?.origin === undefined ? null : unescapeString(match.groups.origin);\n if (origin !== null && isBlankPublicEventOrigin(origin)) {\n context.error(DiagnosticCodes.InvalidImportDeclaration, 'An import origin must be a nonblank quoted string', locationOf(line));\n }\n imports.push({ kind: 'ImportSyntax', qualifiedName: match[1], origin, visibility: origin === null ? EventVisibility.Private : EventVisibility.Public, location: locationOf(line) });\n }\n } else if (keyword === 'example') {\n if (placedBody !== undefined) placedBody.tryParse(context, line);\n else examples.push(parseExample(context, line));\n } else if (keyword === 'eventsource') {\n eventSources.push(parseEventSource(context, line));\n } else if (keyword === 'system') {\n systems.push(parseSystem(context, line));\n } else if (keyword === 'concept') {\n concepts.push(parseConcept(context, line));\n } else if (keyword === 'type') {\n types.push(parseType(context, line));\n } else if (keyword === 'module' && !isDocumentPlacement(placement)) {\n parseModuleInPlacedFile(context, line, placement, moduleBody);\n } else if (keyword === 'module') {\n modules.push(parseModule(context, line));\n } else if (keyword === 'persona') {\n personas.push(parsePersona(context, line));\n } else if (keyword === 'seed') {\n seeds.push(parseSeed(context.valueContext, line));\n } else if (keyword === 'purpose' && placedBody !== undefined) {\n placedBody.tryParse(context, line);\n } else if (keyword === 'purpose') {\n purposes.push(parsePurpose(context, line));\n } else if (keyword === 'identity') {\n identity = parseIdentity(context, line, identity);\n } else if (keyword === 'policy') {\n // Legacy policies were opaque: enrich their structure without adding diagnostics.\n policies.push(parsePolicy(context, line));\n } else if (keyword === 'exposure') {\n exposures.push(parseExposure(context, line));\n } else if (keyword === 'instance') {\n instanceContributions.push(parseInstance(context, line));\n } else if (keyword === 'trigger') {\n const data = parseTriggerDeclaration(context, line);\n const name = /^trigger\\s+([A-Za-z_]\\w*)$/.exec(line.content)?.[1];\n if (name !== undefined) declaredTriggers.push({ name, data });\n } else if (opaqueTopLevel.has(keyword)) {\n if (keyword === 'behavior' || keyword === 'layout') collectInputUses(context, line);\n else if (keyword === 'ui') parseUiProfile(context, line);\n else context.skipOpaqueBlock(line.indent);\n } else if (placedBody?.tryParse(context, line) !== true) {\n reportUnexpectedTopLevel(context, line, placement);\n }\n }\n if (moduleBody !== undefined) {\n modules.unshift(moduleBody.build(context.start, true));\n } else if (featureBody !== undefined) {\n modules.unshift(place(placement, featureBody.build(context.start, true), context.start));\n }\n const root: ApplicationSyntax = { kind: 'ApplicationSyntax', ...(commandReadMode === null ? {} : { commandReadMode }), ...(reactionProductionMode === null ? {} : { reactionProductionMode }), ...(identity === null ? {} : { identity }), sourceOptions: context.sourceOptions, domain, imports, concepts, types, systems, eventSources, examples, modules, personas, policies, purposes, seeds, declaredTriggers, fileImports, ...(exposures.length > 0 ? { exposures } : {}), ...(instanceContributions.length > 0 ? { instanceContributions } : {}), location: context.start };\n if (context.authoredDeclarations) recordAuthoredDocument(root);\n return root;\n}\n\nfunction declaresConstruct(keyword: string, line: SourceLine, placement: PlayPlacement): boolean {\n if (keyword === 'import') {\n return importPattern.test(line.content);\n }\n if (keyword === 'module') {\n return isDocumentPlacement(placement);\n }\n if (keyword === 'identity') return line.content === 'identity';\n return keyword === 'purpose' || keyword === 'example' || keyword === 'exposure' || keyword === 'instance' || keyword === 'eventsource' || keyword === 'system' || keyword === 'concept' || keyword === 'type' || keyword === 'persona' || opaqueTopLevel.has(keyword);\n}\n\nfunction parseModuleInPlacedFile(context: ParserContext, line: SourceLine, placement: PlayPlacement, moduleBody: ModuleBody | undefined): void {\n const name = modulePattern.exec(line.content)?.[1] ?? '';\n\n // Restating the module a file is placed in says nothing new, so its body simply joins the placement.\n if (moduleBody !== undefined && name === placement[0]) {\n context.authoredDeclarations = true;\n moduleBody.parseChildren(context, line);\n return;\n }\n context.error(DiagnosticCodes.ModuleInPlacedFile,\n `This file is imported into ${describePlacement(placement)}, so it cannot declare module '${name}' - import it at the top level of a document instead`, locationOf(line));\n context.skipBlock(line.indent);\n}\n\nfunction reportUnexpectedTopLevel(context: ParserContext, line: SourceLine, placement: PlayPlacement): void {\n const word = firstWord(line.content);\n if (!isDocumentPlacement(placement)) {\n const expected = placement.length === 1 ? moduleBodyExpected : featureBodyExpected;\n context.error(DiagnosticCodes.UnexpectedInPlacedFile,\n `Unexpected '${word}' in a file imported into ${describePlacement(placement)} - expected an application declaration or ${expected}`, locationOf(line));\n } else {\n const hint = bodyKeywords.has(word)\n ? ` - '${word}' belongs in a module or feature; wrap it in one, or import this file from inside one`\n : ' - expected domain, import, concept, type, policy, persona, authentication, identity, module, seed, trigger, behavior, ui profile, theme, sample data or layout';\n context.error(DiagnosticCodes.UnknownTopLevelConstruct, `Unexpected '${word}' at the top level${hint}`, locationOf(line));\n }\n context.skipBlock(line.indent);\n}\n\n// Wraps the feature a file is placed in in the features and module around it, each marked as a placement.\nfunction place(placement: PlayPlacement, innermost: FeatureSyntax, start: SourceLocation): ModuleSyntax {\n let feature = innermost;\n for (let index = placement.length - 2; index >= 1; index--) {\n feature = {\n kind: 'FeatureSyntax', name: placement[index], description: null, authorize: null,\n features: [feature], slices: [], fileImports: [], isPlacement: true, location: start,\n };\n }\n return {\n kind: 'ModuleSyntax', name: placement[0], description: null, authorize: null,\n features: [feature], fileImports: [], isPlacement: true, location: start,\n };\n}\n\nfunction parseDomain(context: ParserContext, line: SourceLine, existing: DomainSyntax | null, sawOtherConstruct: boolean): DomainSyntax | null {\n const match = domainPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidDomainDeclaration, `Invalid domain declaration '${line.content}' - expected 'domain <Qualified.Name>'`, locationOf(line));\n return existing;\n }\n if (existing !== null) {\n context.error(DiagnosticCodes.DuplicateDomain, 'The document already declares a domain - a document can have at most one', locationOf(line));\n return existing;\n }\n if (sawOtherConstruct) {\n context.error(DiagnosticCodes.DomainNotFirst, '\\'domain\\' must be declared before any other construct', locationOf(line));\n }\n return { kind: 'DomainSyntax', name: match[1], location: locationOf(line) };\n}\n\nfunction warnOnTabIndentation(context: ParserContext, lines: readonly SourceLine[]): void {\n let inFence = false;\n for (const line of lines) {\n if (line.raw.trimStart().startsWith('```')) {\n inFence = !inFence;\n continue;\n }\n if (!inFence && tabIndentPattern.test(line.raw)) {\n context.warning(DiagnosticCodes.TabIndentation, 'Screenplay is indentation based - use spaces, not tabs', startOf(line));\n }\n }\n}\n\nfunction parseConcept(context: ParserContext, line: SourceLine): ConceptSyntax {\n const match = conceptPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidConceptDeclaration, `Invalid concept declaration '${line.content}' - expected 'concept <Name> : <Type>'`, locationOf(line));\n context.skipBlock(line.indent);\n return { kind: 'ConceptSyntax', name: firstWord(line.content), type: '', attributes: [], values: [], location: locationOf(line) };\n }\n const [, name, type, attributeText] = match;\n const attributes = parseComplianceMarkers(context, line, name, attributeText);\n if (type !== 'Enum' && !primitiveTypes.includes(type)) {\n context.error(DiagnosticCodes.UnknownPrimitiveType, `Unknown primitive type '${type}' - expected ${primitiveTypes.join(', ')} or Enum`, locationOf(line));\n }\n const values: string[] = [];\n const members = new EnumerationMembers();\n let generation: GenerationSyntax | null = null;\n let declaredGeneration = false;\n let description: string | null = null;\n const validations: ValidateSyntax[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const memberName = type === 'Enum' ? members.tryNumbered(context, child) : undefined;\n if (memberName !== undefined) {\n values.push(memberName);\n } else if (firstWord(child.content) === 'description' && (type !== 'Enum' || child.content !== 'description' || context.peekChild(child.indent)?.content.startsWith('```') === true)) {\n description = parseDescription(context, child, description, `Concept '${name}'`);\n } else if (isFileDirective(child)) {\n continue;\n } else if (firstWord(child.content) === 'validate') {\n if (type === 'Enum' && child.content === 'validate' && context.peekChild(child.indent) === undefined) {\n context.warning(DiagnosticCodes.ValidateReadAsEnumerationBlock,\n `'validate' in enumeration concept '${name}' declares an empty validate block, not a value named 'validate' - write '@validate' for the value`,\n locationOf(child));\n }\n const parsed = parseValidate(context, child, 'concept', name);\n if (parsed !== undefined) validations.push(parsed);\n } else if (firstWord(child.content) === 'generate' && !(type === 'Enum' && child.content === 'generate')) {\n if (declaredGeneration) context.error(DiagnosticCodes.DuplicateGeneration, `Concept '${name}' declares generation more than once.`, locationOf(child));\n const parsed = parseGeneration(context, child, type);\n if (!declaredGeneration) generation = parsed;\n declaredGeneration = true;\n } else if (parseComplianceDirective(context, child, name, attributes)) {\n // Compliance directives are modeled by their original concept marker.\n } else if (type === 'Enum' && enumValuePattern.test(child.content)) {\n values.push(unescapeIdentifier(child.content));\n } else if (type === 'Enum') {\n context.error(DiagnosticCodes.InvalidEnumerationValue, `Invalid enum value '${child.content}' - expected an identifier`, locationOf(child));\n } else {\n context.error(DiagnosticCodes.UnknownConceptDirective, `Unexpected '${child.content}' in concept body - expected validate, generate, 'file <path>' or '<attribute> reason \"<text>\"'`, locationOf(child));\n context.skipBlock(child.indent);\n }\n }\n const valueNumbers = members.finish(context, line, values.length);\n return { kind: 'ConceptSyntax', name, type, attributes, values, validations, description, ...(generation === null ? {} : { generation }), ...(valueNumbers === undefined ? {} : { valueNumbers }), location: locationOf(line) };\n}\n\n// 'persona <Name>' with an optional description and the policies it holds - the port of the C# ParsePersona.\nfunction parsePersona(context: ParserContext, line: SourceLine): PersonaSyntax {\n const name = personaPattern.exec(line.content)?.[1] ?? '';\n if (name === '') {\n context.error(DiagnosticCodes.InvalidPersonaDeclaration, `Invalid persona declaration '${line.content}' - expected 'persona <Name>'`, locationOf(line));\n }\n let description: string | null = null;\n const policies: string[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const keyword = firstWord(child.content);\n if (keyword === 'description') {\n description = parseDescription(context, child, description, `Persona '${name}'`);\n } else if (keyword === 'policy') {\n const policy = personaPolicyPattern.exec(child.content);\n if (policy === null) {\n context.error(DiagnosticCodes.InvalidPersonaPolicyReference, `Invalid policy reference '${child.content}' - expected 'policy <Name>'`, locationOf(child));\n } else {\n policies.push(policy[1]);\n }\n } else {\n context.error(DiagnosticCodes.UnknownPersonaDirective, `Unexpected '${keyword}' in persona body - expected description or policy`, locationOf(child));\n context.skipBlock(child.indent);\n }\n }\n return { kind: 'PersonaSyntax', name, description, policies, location: locationOf(line) };\n}\n"],"mappings":"k9DAoDA,MAAMA,EAAgBC,EAAQ,kDAAkD,EAC1EC,EAAgBD,EAAQ,iDAAiDE,EAAkB,MAAM,EACjGC,EAAiBH,EAAQ,qDAAqD,EAC9EI,EAAmBJ,EAAQ,gBAAgB,EAC3CK,EAAiBL,EAAQ,8BAA8B,EACvDM,EAAuBN,EAAQ,6BAA6B,EAC5DO,EAAmB,UACnBC,EAAiB,CAAC,OAAQ,SAAU,MAAO,UAAW,OAAQ,OAAQ,UAAU,EAIhFC,kBAAiB,IAAI,IAAI,CAAC,SAAU,iBAAkB,OAAQ,KAAM,QAAS,UAAW,SAAU,WAAY,QAAQ,CAAC,EAGvHC,kBAAe,IAAI,IAAI,CAAC,QAAS,UAAW,cAAe,gBAAiB,YAAa,SAAU,SAAU,OAAQ,aAAc,KAAM,MAAM,CAAC,EAItJ,SAAgB,iBAAiB,EAAwB,EAA8B,EAA2BC,EAAsC,CACpJ,EAAQ,wBAA0B,GAClC,qBAAqBC,EAASC,CAAK,EACnC,IAAMC,EAAaC,EAAU,SAAW,EAAI,IAAIC,GAAWD,EAAU,EAAE,EAAI,IAAA,GACrEE,EAAcF,EAAU,OAAS,EAAI,IAAIG,EAAYH,EAAUA,EAAU,OAAS,EAAE,EAAI,IAAA,GACxFI,EAAaL,GAAcG,EAC7BG,EAAkC,KAClCC,EAAwD,KACxDC,EAAqB,GACrBC,EAA0C,KAC1CC,EAAkB,GAClBC,EAA8B,KAC5BC,EAA0B,CAAC,EAC3BC,EAAkC,CAAC,EACnCC,EA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,MAAMkC,EAAgB,wBAAyB,eAAeH,EAAQ,oDAAqDI,EAAWmD,CAAK,CAAC,EACpJtF,EAAQ,UAAUsF,EAAM,MAAM,CAEtC,CACA,MAAO,CAAE,KAAM,gBAAiB,OAAM,cAAa,WAAU,SAAUnD,EAAWL,CAAI,CAAE,CAC5F"}
1
+ {"version":3,"file":"ScreenplayParser.js","names":["domainPattern","pattern","importPattern","stringBodyPattern","conceptPattern","enumValuePattern","personaPattern","personaPolicyPattern","tabIndentPattern","primitiveTypes","opaqueTopLevel","bodyKeywords","documentPlacement","context","lines","moduleBody","placement","ModuleBody","featureBody","FeatureBody","placedBody","identity","reactionProductionMode","sawReactionBatches","commandReadMode","sawCommandReads","domain","imports","fileImports","concepts","types","systems","eventSources","modules","personas","policies","purposes","seeds","examples","declaredTriggers","exposures","instanceContributions","sawOtherConstruct","line","keyword","firstWord","isDocumentPlacement","DiagnosticCodes","locationOf","misplacedReactionIdentity","isFileImport","parseFileImport","match","origin","unescapeString","isBlankPublicEventOrigin","parseExample","parseEventSource","parseSystem","parseType","parseModule","parseSeed","parsePurpose","parseIdentity","policy","parsePolicy","previous","parseExposure","parseInstance","data","parseTriggerDeclaration","name","collectInputUses","parseUiProfile","root","recordAuthoredDocument","modulePattern","describePlacement","word","hint","expected","moduleBodyExpected","featureBodyExpected","feature","innermost","index","start","existing","inFence","startOf","type","attributeText","attributes","parseComplianceMarkers","values","members","EnumerationMembers","generation","declaredGeneration","description","validations","child","memberName","parseDescription","isFileDirective","parsed","parseValidate","parseGeneration","parseComplianceDirective","unescapeIdentifier","valueNumbers"],"sources":["../../../../../../Compiler/Parsing/ScreenplayParser.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 { CommandReadMode } from '../Syntax/CommandReadMode';\nimport { ReactionProductionMode } from '../Syntax/ReactionProductionMode';\nimport { EnumerationMembers } from './EnumerationMembers';\nimport { GenerationSyntax } from '../Syntax/GenerationSyntax';\nimport { parseGeneration } from './GenerationParser';\nimport { IdentitySyntax } from '../Syntax/IdentitySyntax';\nimport { parseIdentity } from './IdentityParser';\nimport { misplacedReactionIdentity } from './ReactionIdentityParser';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { recordAuthoredDocument } from '../Syntax/SourceOptions';\nimport { SourceLocation } from '../Diagnostics/SourceLocation';\nimport { describePlacement, documentPlacement, isDocumentPlacement, PlayPlacement } from '../Files/PlayPlacement';\nimport { PersonaSyntax } from '../Syntax/Authorization';\nimport { ConceptSyntax, DomainSyntax, ImportSyntax, TypeSyntax } from '../Syntax/Declarations';\nimport { SpecificationExampleSyntax } from '../Syntax/Specifications';\nimport { ApplicationSyntax, FeatureSyntax, FileImportSyntax, ModuleSyntax } from '../Syntax/Structure';\nimport { parseTriggerDeclaration } from './TriggerDataParser';\nimport { pattern } from '../Text/patterns';\nimport { parseComplianceDirective, parseComplianceMarkers } from './ConceptComplianceParser';\nimport { parseType } from './DeclarationParsers';\nimport { ValidateSyntax } from '../Syntax/Commands';\nimport { parseValidate } from './CommandParser';\nimport { parseDescription } from './DescriptionParser';\nimport { FeatureBody, featureBodyExpected } from './FeatureBody';\nimport { isFileImport, parseFileImport } from './FileImportParser';\nimport { isFileDirective } from './FileReferences';\nimport { collectInputUses } from './InputUses';\nimport { firstWord, unescapeIdentifier } from './LineText';\nimport { ModuleBody, moduleBodyExpected, modulePattern, parseModule } from './ModuleBody';\nimport { ParserContext } from './ParserContext';\nimport { PolicySyntax } from '../Syntax/Policies';\nimport { parsePolicy } from './PolicyParser';\nimport { PurposeSyntax } from '../Syntax/Purposes';\nimport { parsePurpose } from './PurposeParser';\nimport { SeedSyntax } from '../Syntax/Seeds';\nimport { parseSeed } from './SeedParser';\nimport { parseSystem } from './OperationParser';\nimport { EventVisibility } from '../Syntax/EventVisibility';\nimport { isBlankPublicEventOrigin } from '../Syntax/PublicEventInvariants';\nimport { stringBodyPattern, unescapeString } from '../Text/StringLiteral';\nimport { SystemSyntax } from '../Syntax/Operations';\nimport { EventSourceSyntax } from '../Syntax/EventSources';\nimport { parseEventSource } from './EventSourceParser';\nimport { parseExposure, parseInstance } from './CompositionParser';\nimport { ExposureSyntax, InstanceContributionsSyntax } from '../Syntax/CompositionSyntax';\nimport { parseExample } from './SpecificationExampleParser';\nimport { parseUiProfile } from './UiProfileLegacyLayout';\nimport { locationOf, SourceLine, startOf } from './SourceLine';\n\nconst domainPattern = pattern('^domain\\\\s+([A-Za-z_]\\\\w*(?:\\\\.[A-Za-z_]\\\\w*)*)$');\nconst importPattern = pattern(`^import\\\\s+([\\\\w.]+)(?:\\\\s+from\\\\s+\"(?<origin>${stringBodyPattern})\")?$`);\nconst conceptPattern = pattern('^concept\\\\s+(\\\\w+)\\\\s*:\\\\s*(\\\\w+)((?:\\\\s+@?\\\\w+)*)$');\nconst enumValuePattern = pattern('^@?[a-z_]\\\\w*$');\nconst personaPattern = pattern('^persona\\\\s+([A-Za-z_]\\\\w*)$');\nconst personaPolicyPattern = pattern('^policy\\\\s+([A-Za-z_]\\\\w*)$');\nconst tabIndentPattern = /^[ ]*\\t/;\nconst primitiveTypes = ['Uuid', 'String', 'Int', 'Decimal', 'Bool', 'Date', 'DateTime'];\n\n// Top-level, module and feature constructs the C# compiler knows that this compiler does not model. They\n// are skipped whole, not reported.\nconst opaqueTopLevel = new Set(['policy', 'authentication', 'seed', 'ui', 'theme', 'trigger', 'layout', 'behavior', 'sample']);\n\n// What belongs in a module or feature body; at the top level of a whole document it gets a hint saying so.\nconst bodyKeywords = new Set(['slice', 'feature', 'description', 'documentation', 'authorize', 'screen', 'dialog', 'form', 'contribute', 'on', 'uses']);\n\n// Parses one document into its application syntax - the port of the C# ScreenplayParser. The placement says\n// where the document's top level belongs: the application, unless an import placed it in a module or feature.\nexport function parseApplication(context: ParserContext, lines: readonly SourceLine[], placement: PlayPlacement = documentPlacement): ApplicationSyntax {\n context.deferIdentityValidation = true;\n warnOnTabIndentation(context, lines);\n const moduleBody = placement.length === 1 ? new ModuleBody(placement[0]) : undefined;\n const featureBody = placement.length > 1 ? new FeatureBody(placement[placement.length - 1]) : undefined;\n const placedBody = moduleBody ?? featureBody;\n let identity: IdentitySyntax | null = null;\n let reactionProductionMode: ReactionProductionMode | null = null;\n let sawReactionBatches = false;\n let commandReadMode: CommandReadMode | null = null;\n let sawCommandReads = false;\n let domain: DomainSyntax | null = null;\n const imports: ImportSyntax[] = [];\n const fileImports: FileImportSyntax[] = [];\n const concepts: ConceptSyntax[] = [];\n const types: TypeSyntax[] = [];\n const systems: SystemSyntax[] = [];\n const eventSources: EventSourceSyntax[] = [];\n const modules: ModuleSyntax[] = [];\n const personas: PersonaSyntax[] = [];\n const policies: PolicySyntax[] = [];\n const purposes: PurposeSyntax[] = [];\n const seeds: SeedSyntax[] = [];\n const examples: SpecificationExampleSyntax[] = [];\n const declaredTriggers: NonNullable<ApplicationSyntax['declaredTriggers']>[number][] = [];\n const exposures: ExposureSyntax[] = [];\n const instanceContributions: InstanceContributionsSyntax[] = [];\n let sawOtherConstruct = false;\n for (let line = context.reader.peekSignificant(); line !== undefined; line = context.reader.peekSignificant()) {\n context.reader.takeSignificant();\n const keyword = firstWord(line.content);\n if (keyword === 'command' && /^command\\s+reads(?:\\s|$)/.test(line.content)) {\n if (sawCommandReads || !isDocumentPlacement(placement) || !/^command\\s+reads\\s+protected$/.test(line.content)) {\n context.error(DiagnosticCodes.InvalidCommandReadsDeclaration, \"Declare 'command reads protected' once at the application root.\", locationOf(line));\n } else {\n commandReadMode = CommandReadMode.Protected;\n }\n sawCommandReads = true;\n continue;\n }\n if (keyword === 'reaction') {\n if (sawReactionBatches || !isDocumentPlacement(placement) || !/^reaction\\s+batches\\s+atomic$/.test(line.content)) {\n context.error(DiagnosticCodes.InvalidReactionBatchesDeclaration, \"Declare 'reaction batches atomic' once at the application root.\", locationOf(line));\n } else {\n reactionProductionMode = ReactionProductionMode.Atomic;\n }\n sawReactionBatches = true;\n continue;\n }\n if (keyword === 'runs') {\n misplacedReactionIdentity(context, line);\n continue;\n }\n if (keyword === 'domain') {\n context.authoredDeclarations = true;\n domain = parseDomain(context, line, domain, sawOtherConstruct);\n continue;\n }\n // The C# parser asks whether anything was declared before the domain, so an import it rejected,\n // a file import and an unknown construct do not count.\n sawOtherConstruct ||= declaresConstruct(keyword, line, placement);\n context.authoredDeclarations ||= keyword !== 'import' && declaresConstruct(keyword, line, placement);\n if (keyword === 'import' && isFileImport(line.content)) {\n // A top level import belongs to whatever the document's top level is - the application, or the\n // module or feature the document was itself imported into.\n if (placedBody !== undefined) {\n placedBody.tryParse(context, line);\n } else {\n parseFileImport(context, line, fileImports);\n }\n } else if (keyword === 'import') {\n const match = importPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidImportDeclaration, `Invalid import '${line.content}' - expected 'import <Qualified.Name> [from \"<origin>\"]'`, locationOf(line));\n } else {\n const origin = match.groups?.origin === undefined ? null : unescapeString(match.groups.origin);\n if (origin !== null && isBlankPublicEventOrigin(origin)) {\n context.error(DiagnosticCodes.InvalidImportDeclaration, 'An import origin must be a nonblank quoted string', locationOf(line));\n }\n imports.push({ kind: 'ImportSyntax', qualifiedName: match[1], origin, visibility: origin === null ? EventVisibility.Private : EventVisibility.Public, location: locationOf(line) });\n }\n } else if (keyword === 'example') {\n if (placedBody !== undefined) placedBody.tryParse(context, line);\n else examples.push(parseExample(context, line));\n } else if (keyword === 'eventsource') {\n eventSources.push(parseEventSource(context, line));\n } else if (keyword === 'system') {\n systems.push(parseSystem(context, line));\n } else if (keyword === 'concept') {\n concepts.push(parseConcept(context, line));\n } else if (keyword === 'type') {\n types.push(parseType(context, line));\n } else if (keyword === 'module' && !isDocumentPlacement(placement)) {\n parseModuleInPlacedFile(context, line, placement, moduleBody);\n } else if (keyword === 'module') {\n modules.push(parseModule(context, line));\n } else if (keyword === 'persona') {\n personas.push(parsePersona(context, line));\n } else if (keyword === 'seed') {\n seeds.push(parseSeed(context.valueContext, line));\n } else if (keyword === 'purpose' && placedBody !== undefined) {\n placedBody.tryParse(context, line);\n } else if (keyword === 'purpose') {\n purposes.push(parsePurpose(context, line));\n } else if (keyword === 'identity') {\n identity = parseIdentity(context, line, identity);\n } else if (keyword === 'policy') {\n const policy = parsePolicy(context, line);\n if (policies.some(previous => previous.name === policy.name)) {\n context.error(DiagnosticCodes.DuplicateDeclaration, `Duplicate declaration of policy '${policy.name}' - policy names must be unique`, policy.location);\n }\n policies.push(policy);\n } else if (keyword === 'exposure') {\n exposures.push(parseExposure(context, line));\n } else if (keyword === 'instance') {\n instanceContributions.push(parseInstance(context, line));\n } else if (keyword === 'trigger') {\n const data = parseTriggerDeclaration(context, line);\n const name = /^trigger\\s+([A-Za-z_]\\w*)$/.exec(line.content)?.[1];\n if (name !== undefined) declaredTriggers.push({ name, data });\n } else if (opaqueTopLevel.has(keyword)) {\n if (keyword === 'behavior' || keyword === 'layout') collectInputUses(context, line);\n else if (keyword === 'ui') parseUiProfile(context, line);\n else context.skipOpaqueBlock(line.indent);\n } else if (placedBody?.tryParse(context, line) !== true) {\n reportUnexpectedTopLevel(context, line, placement);\n }\n }\n if (moduleBody !== undefined) {\n modules.unshift(moduleBody.build(context.start, true));\n } else if (featureBody !== undefined) {\n modules.unshift(place(placement, featureBody.build(context.start, true), context.start));\n }\n const root: ApplicationSyntax = { kind: 'ApplicationSyntax', ...(commandReadMode === null ? {} : { commandReadMode }), ...(reactionProductionMode === null ? {} : { reactionProductionMode }), ...(identity === null ? {} : { identity }), sourceOptions: context.sourceOptions, domain, imports, concepts, types, systems, eventSources, examples, modules, personas, policies, purposes, seeds, declaredTriggers, fileImports, ...(exposures.length > 0 ? { exposures } : {}), ...(instanceContributions.length > 0 ? { instanceContributions } : {}), location: context.start };\n if (context.authoredDeclarations) recordAuthoredDocument(root);\n return root;\n}\n\nfunction declaresConstruct(keyword: string, line: SourceLine, placement: PlayPlacement): boolean {\n if (keyword === 'import') {\n return importPattern.test(line.content);\n }\n if (keyword === 'module') {\n return isDocumentPlacement(placement);\n }\n if (keyword === 'identity') return line.content === 'identity';\n return keyword === 'purpose' || keyword === 'example' || keyword === 'exposure' || keyword === 'instance' || keyword === 'eventsource' || keyword === 'system' || keyword === 'concept' || keyword === 'type' || keyword === 'persona' || opaqueTopLevel.has(keyword);\n}\n\nfunction parseModuleInPlacedFile(context: ParserContext, line: SourceLine, placement: PlayPlacement, moduleBody: ModuleBody | undefined): void {\n const name = modulePattern.exec(line.content)?.[1] ?? '';\n\n // Restating the module a file is placed in says nothing new, so its body simply joins the placement.\n if (moduleBody !== undefined && name === placement[0]) {\n context.authoredDeclarations = true;\n moduleBody.parseChildren(context, line);\n return;\n }\n context.error(DiagnosticCodes.ModuleInPlacedFile,\n `This file is imported into ${describePlacement(placement)}, so it cannot declare module '${name}' - import it at the top level of a document instead`, locationOf(line));\n context.skipBlock(line.indent);\n}\n\nfunction reportUnexpectedTopLevel(context: ParserContext, line: SourceLine, placement: PlayPlacement): void {\n const word = firstWord(line.content);\n if (!isDocumentPlacement(placement)) {\n const expected = placement.length === 1 ? moduleBodyExpected : featureBodyExpected;\n context.error(DiagnosticCodes.UnexpectedInPlacedFile,\n `Unexpected '${word}' in a file imported into ${describePlacement(placement)} - expected an application declaration or ${expected}`, locationOf(line));\n } else {\n const hint = bodyKeywords.has(word)\n ? ` - '${word}' belongs in a module or feature; wrap it in one, or import this file from inside one`\n : ' - expected domain, import, concept, type, policy, persona, authentication, identity, module, seed, trigger, behavior, ui profile, theme, sample data or layout';\n context.error(DiagnosticCodes.UnknownTopLevelConstruct, `Unexpected '${word}' at the top level${hint}`, locationOf(line));\n }\n context.skipBlock(line.indent);\n}\n\n// Wraps the feature a file is placed in in the features and module around it, each marked as a placement.\nfunction place(placement: PlayPlacement, innermost: FeatureSyntax, start: SourceLocation): ModuleSyntax {\n let feature = innermost;\n for (let index = placement.length - 2; index >= 1; index--) {\n feature = {\n kind: 'FeatureSyntax', name: placement[index], description: null, authorize: null,\n features: [feature], slices: [], fileImports: [], isPlacement: true, location: start,\n };\n }\n return {\n kind: 'ModuleSyntax', name: placement[0], description: null, authorize: null,\n features: [feature], fileImports: [], isPlacement: true, location: start,\n };\n}\n\nfunction parseDomain(context: ParserContext, line: SourceLine, existing: DomainSyntax | null, sawOtherConstruct: boolean): DomainSyntax | null {\n const match = domainPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidDomainDeclaration, `Invalid domain declaration '${line.content}' - expected 'domain <Qualified.Name>'`, locationOf(line));\n return existing;\n }\n if (existing !== null) {\n context.error(DiagnosticCodes.DuplicateDomain, 'The document already declares a domain - a document can have at most one', locationOf(line));\n return existing;\n }\n if (sawOtherConstruct) {\n context.error(DiagnosticCodes.DomainNotFirst, '\\'domain\\' must be declared before any other construct', locationOf(line));\n }\n return { kind: 'DomainSyntax', name: match[1], location: locationOf(line) };\n}\n\nfunction warnOnTabIndentation(context: ParserContext, lines: readonly SourceLine[]): void {\n let inFence = false;\n for (const line of lines) {\n if (line.raw.trimStart().startsWith('```')) {\n inFence = !inFence;\n continue;\n }\n if (!inFence && tabIndentPattern.test(line.raw)) {\n context.warning(DiagnosticCodes.TabIndentation, 'Screenplay is indentation based - use spaces, not tabs', startOf(line));\n }\n }\n}\n\nfunction parseConcept(context: ParserContext, line: SourceLine): ConceptSyntax {\n const match = conceptPattern.exec(line.content);\n if (match === null) {\n context.error(DiagnosticCodes.InvalidConceptDeclaration, `Invalid concept declaration '${line.content}' - expected 'concept <Name> : <Type>'`, locationOf(line));\n context.skipBlock(line.indent);\n return { kind: 'ConceptSyntax', name: firstWord(line.content), type: '', attributes: [], values: [], location: locationOf(line) };\n }\n const [, name, type, attributeText] = match;\n const attributes = parseComplianceMarkers(context, line, name, attributeText);\n if (type !== 'Enum' && !primitiveTypes.includes(type)) {\n context.error(DiagnosticCodes.UnknownPrimitiveType, `Unknown primitive type '${type}' - expected ${primitiveTypes.join(', ')} or Enum`, locationOf(line));\n }\n const values: string[] = [];\n const members = new EnumerationMembers();\n let generation: GenerationSyntax | null = null;\n let declaredGeneration = false;\n let description: string | null = null;\n const validations: ValidateSyntax[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const memberName = type === 'Enum' ? members.tryNumbered(context, child) : undefined;\n if (memberName !== undefined) {\n values.push(memberName);\n } else if (firstWord(child.content) === 'description' && (type !== 'Enum' || child.content !== 'description' || context.peekChild(child.indent)?.content.startsWith('```') === true)) {\n description = parseDescription(context, child, description, `Concept '${name}'`);\n } else if (isFileDirective(child)) {\n continue;\n } else if (firstWord(child.content) === 'validate') {\n if (type === 'Enum' && child.content === 'validate' && context.peekChild(child.indent) === undefined) {\n context.warning(DiagnosticCodes.ValidateReadAsEnumerationBlock,\n `'validate' in enumeration concept '${name}' declares an empty validate block, not a value named 'validate' - write '@validate' for the value`,\n locationOf(child));\n }\n const parsed = parseValidate(context, child, 'concept', name);\n if (parsed !== undefined) validations.push(parsed);\n } else if (firstWord(child.content) === 'generate' && !(type === 'Enum' && child.content === 'generate')) {\n if (declaredGeneration) context.error(DiagnosticCodes.DuplicateGeneration, `Concept '${name}' declares generation more than once.`, locationOf(child));\n const parsed = parseGeneration(context, child, type);\n if (!declaredGeneration) generation = parsed;\n declaredGeneration = true;\n } else if (parseComplianceDirective(context, child, name, attributes)) {\n // Compliance directives are modeled by their original concept marker.\n } else if (type === 'Enum' && enumValuePattern.test(child.content)) {\n values.push(unescapeIdentifier(child.content));\n } else if (type === 'Enum') {\n context.error(DiagnosticCodes.InvalidEnumerationValue, `Invalid enum value '${child.content}' - expected an identifier`, locationOf(child));\n } else {\n context.error(DiagnosticCodes.UnknownConceptDirective, `Unexpected '${child.content}' in concept body - expected validate, generate, 'file <path>' or '<attribute> reason \"<text>\"'`, locationOf(child));\n context.skipBlock(child.indent);\n }\n }\n const valueNumbers = members.finish(context, line, values.length);\n return { kind: 'ConceptSyntax', name, type, attributes, values, validations, description, ...(generation === null ? {} : { generation }), ...(valueNumbers === undefined ? {} : { valueNumbers }), location: locationOf(line) };\n}\n\n// 'persona <Name>' with an optional description and the policies it holds - the port of the C# ParsePersona.\nfunction parsePersona(context: ParserContext, line: SourceLine): PersonaSyntax {\n const name = personaPattern.exec(line.content)?.[1] ?? '';\n if (name === '') {\n context.error(DiagnosticCodes.InvalidPersonaDeclaration, `Invalid persona declaration '${line.content}' - expected 'persona <Name>'`, locationOf(line));\n }\n let description: string | null = null;\n const policies: string[] = [];\n for (let child = context.peekChild(line.indent); child !== undefined; child = context.peekChild(line.indent)) {\n context.reader.takeSignificant();\n const keyword = firstWord(child.content);\n if (keyword === 'description') {\n description = parseDescription(context, child, description, `Persona '${name}'`);\n } else if (keyword === 'policy') {\n const policy = personaPolicyPattern.exec(child.content);\n if (policy === null) {\n context.error(DiagnosticCodes.InvalidPersonaPolicyReference, `Invalid policy reference '${child.content}' - expected 'policy <Name>'`, locationOf(child));\n } else {\n policies.push(policy[1]);\n }\n } else {\n context.error(DiagnosticCodes.UnknownPersonaDirective, `Unexpected '${keyword}' in persona body - expected description or policy`, locationOf(child));\n context.skipBlock(child.indent);\n }\n }\n return { kind: 'PersonaSyntax', name, description, policies, location: locationOf(line) };\n}\n"],"mappings":"k9DAoDA,MAAMA,EAAgBC,EAAQ,kDAAkD,EAC1EC,EAAgBD,EAAQ,iDAAiDE,EAAkB,MAAM,EACjGC,EAAiBH,EAAQ,qDAAqD,EAC9EI,EAAmBJ,EAAQ,gBAAgB,EAC3CK,EAAiBL,EAAQ,8BAA8B,EACvDM,EAAuBN,EAAQ,6BAA6B,EAC5DO,EAAmB,UACnBC,EAAiB,CAAC,OAAQ,SAAU,MAAO,UAAW,OAAQ,OAAQ,UAAU,EAIhFC,kBAAiB,IAAI,IAAI,CAAC,SAAU,iBAAkB,OAAQ,KAAM,QAAS,UAAW,SAAU,WAAY,QAAQ,CAAC,EAGvHC,kBAAe,IAAI,IAAI,CAAC,QAAS,UAAW,cAAe,gBAAiB,YAAa,SAAU,SAAU,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A2B,gCAAgCJ,EAAK,QAAQ,+BAAgCK,EAAWL,CAAI,CAAC,EAE1J,IAAIwD,EAA6B,KAC3BhE,EAAqB,CAAC,EAC5B,IAAK,IAAIkE,EAAQxF,EAAQ,UAAU8B,EAAK,MAAM,EAAG0D,IAAU,IAAA,GAAW,EAAQxF,EAAQ,UAAU8B,EAAK,MAAM,EAAG,CAC1G9B,EAAQ,OAAO,gBAAgB,EAC/B,IAAM+B,EAAUC,EAAUwD,EAAM,OAAO,EACvC,GAAIzD,IAAY,cACZ,EAAc2D,EAAiB1F,EAASwF,EAAOF,EAAa,YAAY5B,EAAK,EAAE,OAC5E,GAAI3B,IAAY,SAAU,CAC7B,IAAMoB,EAASzD,EAAqB,KAAK8F,EAAM,OAAO,EAClDrC,IAAW,KACXnD,EAAQ,MAAMkC,EAAgB,8BAA+B,6BAA6BsD,EAAM,QAAQ,8BAA+BrD,EAAWqD,CAAK,CAAC,EAExJlE,EAAS,KAAK6B,EAAO,EAAE,CAE/B,MACInD,EAAQ,MAAMkC,EAAgB,wBAAyB,eAAeH,EAAQ,oDAAqDI,EAAWqD,CAAK,CAAC,EACpJxF,EAAQ,UAAUwF,EAAM,MAAM,CAEtC,CACA,MAAO,CAAE,KAAM,gBAAiB,OAAM,cAAa,WAAU,SAAUrD,EAAWL,CAAI,CAAE,CAC5F"}
@@ -1,2 +1,2 @@
1
- const e={unknownMatchPattern:`PLAY0366`,invalidMatchPattern:`PLAY0367`,patternOutsidePortableMatchDialect:`PLAY0699`,deprecatedStudioTextRulePattern:`PLAY0787`,repeatedSingularDeclarationAcrossFiles:`PLAY0172`,directionlessTranslationReactsToOwnCapture:`PLAY0694`,pendingIntentWithOtherHandler:`PLAY0698`,commandHandlerRequiresAttachment:`PLAY0800`,duplicateEventInProjectionScope:`PLAY0801`,describedCommandNotImplemented:`PLAY0695`,describedCommandWithoutProductions:`PLAY0696`,describedCommandCardinalityNotAdmitted:`PLAY0697`,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`,unknownTemplateBlueprint:`PLAY0722`,mixedEnumerationNumbering:`PLAY0667`,duplicateEnumerationNumber:`PLAY0668`,enumerationNumberOutsideInt32:`PLAY0669`,malformedEnumerationNumber:`PLAY0670`,unpinnedStoredEnumeration:`PLAY0671`,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`,captureEventsKeyNotRequired:`PLAY0700`,captureEventsRecordFixture:`PLAY0701`,refutedGeneratedConceptRule:`PLAY0688`,unprovenGeneratedConceptRule:`PLAY0689`,invalidReadModelKey:`PLAY0660`,incompleteReadModelKey:`PLAY0661`,invalidReadModelKeyLookup:`PLAY0662`,productionRouteOutsideCommand:`PLAY0663`,redundantProductionRoute:`PLAY0664`,invalidObserverFilter:`PLAY0665`,observerFilterExcludesEveryProducer:`PLAY0666`,reducerIdentityMismatch:`PLAY0690`,generationSupportBudgetExceeded:`PLAY0691`,emptyGenerationSupport:`PLAY0692`,invalidReactionBatchesDeclaration:`PLAY0693`,invalidCommandReadsDeclaration:`PLAY0780`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,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`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,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`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,mismatchedSpecificationQueryResult:`PLAY0465`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`,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`};export{e as diagnosticCodes};
1
+ const e={unknownMatchPattern:`PLAY0366`,invalidMatchPattern:`PLAY0367`,patternOutsidePortableMatchDialect:`PLAY0699`,deprecatedStudioTextRulePattern:`PLAY0787`,repeatedSingularDeclarationAcrossFiles:`PLAY0172`,directionlessTranslationReactsToOwnCapture:`PLAY0694`,pendingIntentWithOtherHandler:`PLAY0698`,commandHandlerRequiresAttachment:`PLAY0800`,duplicateEventInProjectionScope:`PLAY0801`,reservedStoredName:`PLAY0802`,describedCommandNotImplemented:`PLAY0695`,describedCommandWithoutProductions:`PLAY0696`,describedCommandCardinalityNotAdmitted:`PLAY0697`,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`,unknownTemplateBlueprint:`PLAY0722`,mixedEnumerationNumbering:`PLAY0667`,duplicateEnumerationNumber:`PLAY0668`,enumerationNumberOutsideInt32:`PLAY0669`,malformedEnumerationNumber:`PLAY0670`,unpinnedStoredEnumeration:`PLAY0671`,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`,captureEventsKeyNotRequired:`PLAY0700`,captureEventsRecordFixture:`PLAY0701`,refutedGeneratedConceptRule:`PLAY0688`,unprovenGeneratedConceptRule:`PLAY0689`,invalidReadModelKey:`PLAY0660`,incompleteReadModelKey:`PLAY0661`,invalidReadModelKeyLookup:`PLAY0662`,productionRouteOutsideCommand:`PLAY0663`,redundantProductionRoute:`PLAY0664`,invalidObserverFilter:`PLAY0665`,observerFilterExcludesEveryProducer:`PLAY0666`,reducerIdentityMismatch:`PLAY0690`,generationSupportBudgetExceeded:`PLAY0691`,emptyGenerationSupport:`PLAY0692`,invalidReactionBatchesDeclaration:`PLAY0693`,invalidCommandReadsDeclaration:`PLAY0780`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,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`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,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`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,mismatchedSpecificationQueryResult:`PLAY0465`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`,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`};export{e as diagnosticCodes};
2
2
  //# sourceMappingURL=diagnostic-codes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.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// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n unknownMatchPattern: 'PLAY0366',\n invalidMatchPattern: 'PLAY0367',\n patternOutsidePortableMatchDialect: 'PLAY0699',\n deprecatedStudioTextRulePattern: 'PLAY0787',\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n directionlessTranslationReactsToOwnCapture: 'PLAY0694',\n pendingIntentWithOtherHandler: 'PLAY0698',\n commandHandlerRequiresAttachment: 'PLAY0800', // C# only\n duplicateEventInProjectionScope: 'PLAY0801',\n describedCommandNotImplemented: 'PLAY0695', // C# only\n describedCommandWithoutProductions: 'PLAY0696', // C# only\n describedCommandCardinalityNotAdmitted: 'PLAY0697', // 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',\n invalidTemplateVersionRange: 'PLAY0721',\n unknownTemplateBlueprint: 'PLAY0722',\n mixedEnumerationNumbering: 'PLAY0667',\n duplicateEnumerationNumber: 'PLAY0668',\n enumerationNumberOutsideInt32: 'PLAY0669',\n malformedEnumerationNumber: 'PLAY0670',\n unpinnedStoredEnumeration: 'PLAY0671',\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 // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\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 captureEventsKeyNotRequired: 'PLAY0700',\n captureEventsRecordFixture: 'PLAY0701',\n refutedGeneratedConceptRule: 'PLAY0688',\n unprovenGeneratedConceptRule: 'PLAY0689',\n invalidReadModelKey: 'PLAY0660',\n incompleteReadModelKey: 'PLAY0661',\n invalidReadModelKeyLookup: 'PLAY0662',\n productionRouteOutsideCommand: 'PLAY0663',\n redundantProductionRoute: 'PLAY0664',\n invalidObserverFilter: 'PLAY0665',\n observerFilterExcludesEveryProducer: 'PLAY0666',\n reducerIdentityMismatch: 'PLAY0690',\n generationSupportBudgetExceeded: 'PLAY0691',\n emptyGenerationSupport: 'PLAY0692',\n invalidReactionBatchesDeclaration: 'PLAY0693',\n invalidCommandReadsDeclaration: 'PLAY0780',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\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 duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\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 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 invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\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 tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n mismatchedSpecificationQueryResult: 'PLAY0465',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\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; preserve supplied warnings from earlier native compilers.\n eventIdPinNotCarriedToRenderers: 'PLAY0686',\n} as const;\n\nexport type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];\n"],"mappings":"AAWA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,uCAAwC,WACxC,2CAA4C,WAC5C,8BAA+B,WAC/B,iCAAkC,WAClC,gCAAiC,WACjC,+BAAgC,WAChC,mCAAoC,WACpC,uCAAwC,WACxC,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,yBAA0B,WAC1B,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uB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B,WAChB,qBAAsB,WACtB,mCAAoC,WACpC,iBAAkB,WAClB,2BAA4B,WAC5B,mBAAoB,WACpB,+BAAgC,WAChC,+BAAgC,WAChC,kBAAmB,WACnB,YAAa,WACb,aAAc,WACd,cAAe,WACf,qBAAsB,WACtB,0BAA2B,WAC3B,wBAAyB,WACzB,gCAAiC,WACjC,wBAAyB,WACzB,2BAA4B,WAC5B,kBAAmB,WACnB,6BAA8B,WAC9B,qBAAsB,WACtB,6BAA8B,WAC9B,0BAA2B,WAC3B,6BAA8B,WAC9B,gCAAiC,WACjC,qBAAsB,WACtB,8BAA+B,WAC/B,uBAAwB,WACxB,uBAAwB,WACxB,sBAAuB,WACvB,uBAAwB,WACxB,qBAAsB,WACtB,wBAAyB,WACzB,yBAA0B,WAC1B,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,UACrC"}
1
+ {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.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// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n unknownMatchPattern: 'PLAY0366',\n invalidMatchPattern: 'PLAY0367',\n patternOutsidePortableMatchDialect: 'PLAY0699',\n deprecatedStudioTextRulePattern: 'PLAY0787',\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n directionlessTranslationReactsToOwnCapture: 'PLAY0694',\n pendingIntentWithOtherHandler: 'PLAY0698',\n commandHandlerRequiresAttachment: 'PLAY0800', // C# only\n duplicateEventInProjectionScope: 'PLAY0801',\n reservedStoredName: 'PLAY0802',\n describedCommandNotImplemented: 'PLAY0695', // C# only\n describedCommandWithoutProductions: 'PLAY0696', // C# only\n describedCommandCardinalityNotAdmitted: 'PLAY0697', // 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',\n invalidTemplateVersionRange: 'PLAY0721',\n unknownTemplateBlueprint: 'PLAY0722',\n mixedEnumerationNumbering: 'PLAY0667',\n duplicateEnumerationNumber: 'PLAY0668',\n enumerationNumberOutsideInt32: 'PLAY0669',\n malformedEnumerationNumber: 'PLAY0670',\n unpinnedStoredEnumeration: 'PLAY0671',\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 // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\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 captureEventsKeyNotRequired: 'PLAY0700',\n captureEventsRecordFixture: 'PLAY0701',\n refutedGeneratedConceptRule: 'PLAY0688',\n unprovenGeneratedConceptRule: 'PLAY0689',\n invalidReadModelKey: 'PLAY0660',\n incompleteReadModelKey: 'PLAY0661',\n invalidReadModelKeyLookup: 'PLAY0662',\n productionRouteOutsideCommand: 'PLAY0663',\n redundantProductionRoute: 'PLAY0664',\n invalidObserverFilter: 'PLAY0665',\n observerFilterExcludesEveryProducer: 'PLAY0666',\n reducerIdentityMismatch: 'PLAY0690',\n generationSupportBudgetExceeded: 'PLAY0691',\n emptyGenerationSupport: 'PLAY0692',\n invalidReactionBatchesDeclaration: 'PLAY0693',\n invalidCommandReadsDeclaration: 'PLAY0780',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\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 duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\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 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 invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\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 tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n mismatchedSpecificationQueryResult: 'PLAY0465',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\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; preserve supplied warnings from earlier native compilers.\n eventIdPinNotCarriedToRenderers: 'PLAY0686',\n} as const;\n\nexport type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];\n"],"mappings":"AAWA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,uCAAwC,WACxC,2CAA4C,WAC5C,8BAA+B,WAC/B,iCAAkC,WAClC,gCAAiC,WACjC,mBAAoB,W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rolldown/runtime.js";import{causedByProperties as e,contextRoots as t,identityProperties as n,primitiveTypes as r,sliceTypes as i}from"./language.js";import{DiagnosticCodes as a}from"./compiler/Diagnostics/DiagnosticCodes.js";import{legacyOptionalTypeLength as o}from"./compiler/Authoring/QuickFixes.js";import"./compiler/index.js";import{enclosingChain as s,fenceMap as c,indentOf as l}from"./document-context.js";import{eventAnalysisSource as u}from"./event-analysis-source.js";import{resolveEventContextPath as d}from"./event-context.js";import{responseAnalysis as f}from"./response-analysis.js";import{knownEventNames as p,knownTypeNames as m,mergeSymbols as h,propertyTypeReference as g,scanDocument as _,symbolsForBuffer as v}from"./symbols.js";import{diagnosticCodes as y}from"./diagnostic-codes.js";import{validateInlineEvents as b}from"./inline-event-validation.js";import{fileImportOn as x,isFileImportLine as S}from"./file-imports.js";function issue(e,t,n,r,i,a){return{severity:e,message:i,line:t,startColumn:n,endColumn:n+r,code:a}}function tokenIssue(e,t,n,r,i,a){return issue(e,t,n.indexOf(r)+1,r.length,i,a)}function validateDeclarations(e,t,n){let i=[],a=/* @__PURE__ */ new Set([...m(t,r),...m(n,[])]),checkProperties=(e,t)=>{for(let n of e.filter(e=>!a.has(g(e).name))){let e=g(n).name;i.push(issue(`warning`,n.line,n.sourceType.startColumn,n.sourceType.text.length,e===`optional`?`Unknown type 'optional' on '${n.name}' of ${t} — did you forget the type before 'optional'?`:`Unknown type '${e}' on '${n.name}' of ${t} — declare it with 'concept ${e} : <Primitive>' or 'type ${e}'.`,y.unknownType))}};for(let e of t.types)checkProperties(e.properties,`type '${e.name}'`);for(let e of t.events)checkProperties(e.properties,`event '${e.name}'`);for(let e of t.queries)checkProperties(e.parameters,`query '${e.name}'`);for(let n of t.commands){checkProperties(n.properties,`command '${n.name}'`);let t=n.properties.filter(e=>e.isIdentifier);for(let r of t.slice(1))i.push(tokenIssue(`error`,r.line,e[r.line],`identifier`,`Command '${n.name}' already marks '${t[0].name}' as identifier — only one property can be the identifier.`,y.duplicateCommandIdentifier))}let o=/* @__PURE__ */ new Map;for(let n of[...t.concepts,...t.types])o.get(n.name)===void 0?o.set(n.name,n.line):i.push(tokenIssue(`error`,n.line,e[n.line],n.name,`Duplicate declaration of '${n.name}' — concept and type names must be unique.`,y.duplicateDeclaration));return i}function validateLines(s,u={}){let d=c(s),m=_(s),g=u.application??h(),x=v(s,{...g,authoringPath:u.path??g.authoringPath,authoringPlacement:u.placement??g.authoringPlacement}),S=f(s,x.authoringDocuments??x.authoringSources?.filter(e=>e!==s.join(`
2
- `)),x.authoringPlacement,x.authoringPath,x.authoringPlacementResolved),C=new Set(S.eventSources.routes.map(e=>e.location.line-1)),w={...m,commands:m.commands.map(e=>({...e,properties:e.properties.filter(e=>!C.has(e.line)),produces:e.produces?.filter(e=>!S.operationProductionLines?.has(e.line)),productionHeaders:e.productionHeaders?.filter(e=>!S.operationProductionLines?.has(e))}))},T=/* @__PURE__ */ new Set([...p(w),...p(g)]),E=new Set([...w.policies,...g.policies].map(e=>e.name)),D=validateDeclarations(s,w,g);D.push(...validateProductionDestinations(s,w));let O=/* @__PURE__ */ new Set([a.UnknownGenerationStrategy,a.InvalidGenerationArgument,a.InvalidGenerationModifier,a.DuplicateGenerationModifier,a.DuplicateGeneration,a.InvalidGenerationPrimitive,a.InvalidGenerationPrefix,a.InvalidGenerationAlphabet,a.InvalidTypeIdPrefix,a.GenerationSizeOutsideRange,a.ReservedSequenceGeneration,a.LowGenerationEntropy,a.LowGeneratedIdentifierEntropy,a.RefutedGeneratedConceptRule,a.UnprovenGeneratedConceptRule,a.GenerationSupportBudgetExceeded,a.EmptyGenerationSupport]),k=/* @__PURE__ */ new Set([a.MixedEnumerationNumbering,a.DuplicateEnumerationNumber,a.EnumerationNumberOutsideInt32,a.MalformedEnumerationNumber,a.UnpinnedStoredEnumeration]),A=/* @__PURE__ */ new Set([a.LegacyOptionalSuffix,a.InvalidOptionalModifierOrder,a.OptionalReadsNotSupported]),j=/* @__PURE__ */ new Set([a.UnexpectedTokenInPolicyCondition,a.ExpectedPolicyCondition,a.UnclosedPolicyConditionGroup,a.ExpectedRoleName,a.ExpectedClaimName,a.ExpectedClaimMatches,a.ExpectedClaimMatchTarget]),M=/* @__PURE__ */ new Set([a.UnknownEvent,a.UnknownReadModelProperty,a.PiiNotSupportedOnIdentifier]),N=/* @__PURE__ */ new Set([a.EventFromLaterSlice,a.TimelineCycleGroup]),P=/* @__PURE__ */ new Set([a.UndeclaredDependency,a.UnusedDependencyDeclaration,a.InvalidDependencyTarget,a.RepeatedDependencyDeclaration,a.MutualDependencyDeclarations,a.AmbiguousReference]),F=/* @__PURE__ */ new Set([a.InvalidCommandReadsDeclaration,a.UnknownMatchPattern,a.InvalidMatchPattern,a.PatternOutsidePortableMatchDialect,a.DeprecatedStudioTextRulePattern,a.MismatchedSpecificationQueryResult,a.DirectionlessTranslationReactsToOwnCapture,a.CaptureEventsFromSeveralOrigins,a.CaptureEventsKeyNotRequired,a.CaptureEventsRecordFixture,a.EventIdPinNotCarriedToRenderers,a.ResponseNameUsedOnFailure,a.InvalidEventDeclaration,a.InvalidImportDeclaration,a.InvalidSliceDeclaration,a.InvalidDescription,a.DuplicateDescription,a.EmptyDescription,a.DuplicateEventSubject,a.InvalidSubjectType,a.ProtectedSubjectType,a.InvalidSubjectOwner,a.ReadModelSubjectNotSupported,a.InvalidSubjectModifierOrder,a.UnsupportedInteractionAlternatives,a.MixedInteractionAlternatives,a.InteractionAlternativeWithoutActions,a.InlineInteractionAlternative,a.LegacyInteractionWhere,a.InvalidSpecificationParameter,a.InvalidSpecificationCase,a.DuplicateSpecificationParameter,a.DuplicateSpecificationCase,a.IncompleteSpecificationTable,a.InvalidSpecificationCaseAssignment,a.InvalidSpecificationCaseValue,a.InvalidSpecificationCaseReference,a.OptionalSpecificationParameterTarget,a.SpecificationCaseNameCollision,a.IncompatibleSpecificationParameterType,a.UnusedSpecificationParameter,a.SingularSpecificationTableExpansion,a.InvalidSpecificationCallerPersona,a.UnsynthesizablePersonaCaller,a.PersonaWithoutGate,a.GateWithoutPersona,a.AmbiguousPersonaCaller,a.InvalidDocumentation,a.ConflictingDocumentationAcrossFiles,a.InvalidAbsentReadModelStep,a.UnknownConstraintProperty,a.OmittedProductionDestination,a.InvalidSpecificationExample,a.DuplicateSpecificationAssignment,a.InvalidReactionBatchesDeclaration,a.DescribedCommandNotImplemented,a.DescribedCommandWithoutProductions,a.DescribedCommandCardinalityNotAdmitted,a.CommandHandlerRequiresAttachment,a.PendingIntentWithOtherHandler,a.DuplicateEventInProjectionScope]),I=/* @__PURE__ */ new Set([a.InvalidPurposeDeclaration,a.InvalidPurposeVocabulary,a.DuplicatePurposeField,a.DuplicatePurposeDeclaration,a.UnknownPurpose,a.PurposeInterestMismatch,a.PersonalDataWithoutPurpose,a.SpecialDataWithoutCondition,a.CriminalDataWithoutAuthorization,a.PurposeWithoutBasis,a.UnusedPurpose,a.UnknownConceptDirective,a.AttributeReasonWithoutAttribute,a.DuplicateAttributeReason,a.LegacyComplianceMarker,a.DuplicateComplianceMarker,a.UnknownComplianceMarker,a.InvalidSecretScope,a.DuplicateSecretScope,a.SecretScopeIgnoredForPii,a.InvalidPersonalDataQualifier,a.DuplicateSpecialCategory]),L=/* @__PURE__ */ new Set;for(let e of u.compilerDiagnostics??S.diagnostics){let t=e.code===a.UnknownType&&(S.identityDetails??[]).some(t=>t.line===e.location.line-1),n=e.code===a.RepeatedSingularDeclarationAcrossFiles&&e.message.includes(`identity block`);if(!t&&!n&&!O.has(e.code)&&!k.has(e.code)&&!I.has(e.code)&&!A.has(e.code)&&!j.has(e.code)&&!M.has(e.code)&&!N.has(e.code)&&!P.has(e.code)&&!F.has(e.code)&&e.code!==a.ReducerIdentityMismatch&&e.code!==a.InvalidSpecificationExampleBody&&e.code!==a.UnknownRuleImplementationDirective&&e.code!==a.InvalidValidationRule&&e.code!==a.RepeatedDeclarationAcrossFiles&&!/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY062[1-9]$|^PLAY063[0-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$|^PLAY065[4-6]$|^PLAY066[0-6]$|^PLAY072[0-2]$/.test(e.code))continue;let r=e.location.line-1;if(e.code===a.OmittedProductionDestination&&D.some(t=>t.code===e.code&&t.line===r))continue;if(e.code===a.UnknownEvent){if(L.has(r))continue;L.add(r)}let i=o(s[r],e)||s[r].length-e.location.column+1;D.push(issue(e.severity,r,e.location.column,i,e.message,e.code))}let checkEvent=(e,t,n)=>{!T.has(n)&&!L.has(e)&&D.push(tokenIssue(`warning`,e,t,n,`Unknown event type '${n}' — declare it in a slice or import it.`,y.unknownEvent))},R=-1;for(let a=0;a<s.length;a++){let o=s[a],c=o.trim();if(d[a]||c.length===0)continue;let u=o.match(/^[ ]*(\t+)/);if(u&&D.push(issue(`warning`,a,u[0].length-u[1].length+1,u[1].length,`Screenplay is indentation-based — use spaces, not tabs.`,y.tabIndentation)),R>=0){if(l(o)>R&&/^(?:or\s+)?[A-Z]\w*(?:\s+or\s+[A-Z]\w*)*$/.test(c)){for(let e of c.split(/\s+/).filter(e=>e!==`or`))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy));continue}R=-1}let f=validateImport(s,d,a);f&&D.push(f);let p=c.match(/^slice\s+(\w+)/);p&&!i.includes(p[1])&&D.push(tokenIssue(`error`,a,o,p[1],`Unknown slice type '${p[1]}' — expected ${i.join(`, `)}.`,y.unknownSliceType));let m=c.match(/^concept\s+\w+\s*:\s*(\w+)/);m&&m[1]!==`Enum`&&!r.includes(m[1])&&D.push(tokenIssue(`error`,a,o,m[1],`Unknown primitive type '${m[1]}' — expected ${r.join(`, `)} or Enum.`,y.unknownPrimitiveType));let h=c.match(/^authorize\s+(.*)$/);if(h){R=l(o);for(let e of h[1].split(/\s+/).filter(e=>e!==`or`&&e.length>0))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy))}let g=c.match(/^on\s+([A-Z]\w*)\s*$/);g&&checkEvent(a,o,g[1]);let _=c.match(/^produces\s+([A-Z]\w*)\s*$/);if(_&&!S.operationProductionLines?.has(a)&&checkEvent(a,o,_[1]),/^produces\s+when\b/.test(c)&&!S.operationProductionLines?.has(a))for(let e=a+1;e<s.length;e++){let t=s[e];if(!(d[e]||t.trim().length===0)){if(l(t)>l(o)){let n=t.trim().match(/^([A-Z]\w*)\s*$/);n&&checkEvent(e,t,n[1])}break}}let v=c.match(/^unique\s+event\s+([A-Z]\w*)/);v&&checkEvent(a,o,v[1]);let b=c.match(/^unique\s+[a-z_]\w*\s+on\s+([A-Z]\w*)/);b&&checkEvent(a,o,b[1]);for(let e of o.match(/\$identity\.[\w.]+/g)??[]){let t=e.substring(10).split(`.`)[0],r=[...n,...(S.identityDetails??[]).map(e=>e.name)];r.includes(t)||D.push(tokenIssue(`warning`,a,o,e,`Unknown $identity property '${t}' — expected ${r.join(`, `)}.`,y.unknownContextIdentityProperty))}for(let r of o.match(/\$context\.[\w.]+/g)??[]){let i=r.substring(9).split(`.`);t.includes(i[0])?i[0]===`causedBy`&&i.length>1&&!e.includes(i[1])?D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.causedBy property '${i[1]}' — expected ${e.join(`, `)}.`,y.unknownContextCausedByProperty)):i[0]===`identity`&&i.length>1&&!n.includes(i[1])&&D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.identity property '${i[1]}' — expected ${n.join(`, `)}.`,y.unknownContextIdentityProperty)):D.push(tokenIssue(`warning`,a,o,r,`Unknown $context path '${i.join(`.`)}' — expected one of ${t.join(`, `)}.`,y.unknownContextPath))}}D.push(...validateEventContextPaths(s,d)),D.push(...b(s,w,g,S.operationProductionLines));let z=s.map((e,t)=>({line:e,index:t})).filter(({line:e})=>/^\s*```(?:[a-z]+)?\s*$/.test(e));if(z.length%2==1){let e=z[z.length-1];D.push(issue(`error`,e.index,1,e.line.length+1,"Unclosed inline code block — expected a closing ``` line.",y.unclosedCodeBlock))}return D}function validateProductionDestinations(e,t){let n=[];e=u(e);for(let r of t.commands){let t=r.properties.filter(e=>e.isIdentifier&&!g(e).isOptional&&!g(e).isCollection);if(t.length===1)for(let i of r.produces??[]){if(i.inline||i.conditional||i.target!==void 0)continue;let r=i.line;n.push(issue(`information`,r,l(e[r])+1,e[r].trim().length,`Plain 'produces ${i.name}' omits its destination — use 'for ${t[0].name}' to explicitly select the command's identifier.`,y.omittedProductionDestination))}}return n}function validateImport(e,t,n){let r=e[n],i=r.trim().replace(/\s*\/\/.*$/,``);if(!/^import\b/.test(i)||x(r,n))return;let a=l(r);if(a>0&&[`module`,`feature`].includes(s(e,t,n,a)[0])||S(r))return issue(`error`,n,a+1,i.length,`Invalid import '${i}' — inside a module or feature, import names files: 'import "<path or glob>"'.`,y.invalidFileImport)}const C=/^(?:(?:increment|decrement|count|clear|add|subtract|set)\s+)?@?([$\w.]+)(?=\s|=|$)/;function validateEventContextPaths(e,t){let n=[],names=e=>e.map(e=>e.name).join(`, `);for(let r=0;r<e.length;r++){let i=e[r];if(t[r])continue;for(let e of i.matchAll(/(\.)?\$eventContext((?:\.(?:\w+(?:\(\))?)?)*)/g)){let t=e[0].substring(e[1]?.length??0),i=e[2];if(i.length===0){e[1]&&n.push(issue(`error`,r,(e.index??0)+2,t.length,`'$eventContext' names no member - expected one of ${names(d(``).expected)}.`,y.missingEventContextPath));continue}let a=i.substring(1),o=d(a),s=(e.index??0)+(e[1]?.length??0)+1;switch(o.status){case`missing`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' names no member - expected one of ${names(o.expected)}.`,y.missingEventContextPath));break;case`unknownMember`:n.push(issue(`warning`,r,s,t.length,`Unknown event context member '${o.segment}' in '$eventContext.${a}' - expected one of ${names(o.expected)}.`,y.unknownEventContextMember));break;case`unknownSubPath`:{let e=o.expected.length===0?`no members to address`:`members ${names(o.expected)}`;n.push(issue(`warning`,r,s,t.length,`Unknown event context path '$eventContext.${a}' - '${o.member?.name}' (${o.member?.type}) has ${e}.`,y.unknownEventContextPath));break}case`belowCollection`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' cannot resolve - '${o.member?.name}' is a collection (${o.member?.type}) and cannot be addressed below.`,y.eventContextPathBelowCollection))}}let a=i.trim().match(C)?.[1],o=a?.match(/\.\$(\w+)/)?.[1];a&&o&&o!==`eventContext`&&n.push(tokenIssue(`warning`,r,i,a,`Dynamic dictionary key '$${o}' in '${a}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${o}' becomes the key.`,y.unresolvedDynamicKeySource))}return n}export{validateEventContextPaths,validateLines};
2
+ `)),x.authoringPlacement,x.authoringPath,x.authoringPlacementResolved),C=new Set(S.eventSources.routes.map(e=>e.location.line-1)),w={...m,commands:m.commands.map(e=>({...e,properties:e.properties.filter(e=>!C.has(e.line)),produces:e.produces?.filter(e=>!S.operationProductionLines?.has(e.line)),productionHeaders:e.productionHeaders?.filter(e=>!S.operationProductionLines?.has(e))}))},T=/* @__PURE__ */ new Set([...p(w),...p(g)]),E=new Set([...w.policies,...g.policies].map(e=>e.name)),D=validateDeclarations(s,w,g);D.push(...validateProductionDestinations(s,w));let O=/* @__PURE__ */ new Set([a.UnknownGenerationStrategy,a.InvalidGenerationArgument,a.InvalidGenerationModifier,a.DuplicateGenerationModifier,a.DuplicateGeneration,a.InvalidGenerationPrimitive,a.InvalidGenerationPrefix,a.InvalidGenerationAlphabet,a.InvalidTypeIdPrefix,a.GenerationSizeOutsideRange,a.ReservedSequenceGeneration,a.LowGenerationEntropy,a.LowGeneratedIdentifierEntropy,a.RefutedGeneratedConceptRule,a.UnprovenGeneratedConceptRule,a.GenerationSupportBudgetExceeded,a.EmptyGenerationSupport]),k=/* @__PURE__ */ new Set([a.MixedEnumerationNumbering,a.DuplicateEnumerationNumber,a.EnumerationNumberOutsideInt32,a.MalformedEnumerationNumber,a.UnpinnedStoredEnumeration]),A=/* @__PURE__ */ new Set([a.LegacyOptionalSuffix,a.InvalidOptionalModifierOrder,a.OptionalReadsNotSupported]),j=/* @__PURE__ */ new Set([a.UnexpectedTokenInPolicyCondition,a.ExpectedPolicyCondition,a.UnclosedPolicyConditionGroup,a.ExpectedRoleName,a.ExpectedClaimName,a.ExpectedClaimMatches,a.ExpectedClaimMatchTarget]),M=/* @__PURE__ */ new Set([a.UnknownEvent,a.UnknownReadModelProperty,a.PiiNotSupportedOnIdentifier]),N=/* @__PURE__ */ new Set([a.EventFromLaterSlice,a.TimelineCycleGroup]),P=/* @__PURE__ */ new Set([a.UndeclaredDependency,a.UnusedDependencyDeclaration,a.InvalidDependencyTarget,a.RepeatedDependencyDeclaration,a.MutualDependencyDeclarations,a.AmbiguousReference]),F=/* @__PURE__ */ new Set([a.InvalidCommandReadsDeclaration,a.UnknownMatchPattern,a.InvalidMatchPattern,a.PatternOutsidePortableMatchDialect,a.DeprecatedStudioTextRulePattern,a.MismatchedSpecificationQueryResult,a.DirectionlessTranslationReactsToOwnCapture,a.CaptureEventsFromSeveralOrigins,a.CaptureEventsKeyNotRequired,a.CaptureEventsRecordFixture,a.EventIdPinNotCarriedToRenderers,a.ResponseNameUsedOnFailure,a.InvalidEventDeclaration,a.InvalidImportDeclaration,a.InvalidSliceDeclaration,a.InvalidDescription,a.DuplicateDescription,a.EmptyDescription,a.DuplicateEventSubject,a.InvalidSubjectType,a.ProtectedSubjectType,a.InvalidSubjectOwner,a.ReadModelSubjectNotSupported,a.InvalidSubjectModifierOrder,a.UnsupportedInteractionAlternatives,a.MixedInteractionAlternatives,a.InteractionAlternativeWithoutActions,a.InlineInteractionAlternative,a.LegacyInteractionWhere,a.InvalidSpecificationParameter,a.InvalidSpecificationCase,a.DuplicateSpecificationParameter,a.DuplicateSpecificationCase,a.IncompleteSpecificationTable,a.InvalidSpecificationCaseAssignment,a.InvalidSpecificationCaseValue,a.InvalidSpecificationCaseReference,a.OptionalSpecificationParameterTarget,a.SpecificationCaseNameCollision,a.IncompatibleSpecificationParameterType,a.UnusedSpecificationParameter,a.SingularSpecificationTableExpansion,a.InvalidSpecificationCallerPersona,a.UnsynthesizablePersonaCaller,a.PersonaWithoutGate,a.GateWithoutPersona,a.AmbiguousPersonaCaller,a.InvalidDocumentation,a.ConflictingDocumentationAcrossFiles,a.InvalidAbsentReadModelStep,a.UnknownConstraintProperty,a.OmittedProductionDestination,a.InvalidSpecificationExample,a.DuplicateSpecificationAssignment,a.InvalidReactionBatchesDeclaration,a.DescribedCommandNotImplemented,a.DescribedCommandWithoutProductions,a.DescribedCommandCardinalityNotAdmitted,a.CommandHandlerRequiresAttachment,a.PendingIntentWithOtherHandler,a.DuplicateEventInProjectionScope,a.ReservedStoredName]),I=/* @__PURE__ */ new Set([a.InvalidPurposeDeclaration,a.InvalidPurposeVocabulary,a.DuplicatePurposeField,a.DuplicatePurposeDeclaration,a.UnknownPurpose,a.PurposeInterestMismatch,a.PersonalDataWithoutPurpose,a.SpecialDataWithoutCondition,a.CriminalDataWithoutAuthorization,a.PurposeWithoutBasis,a.UnusedPurpose,a.UnknownConceptDirective,a.AttributeReasonWithoutAttribute,a.DuplicateAttributeReason,a.LegacyComplianceMarker,a.DuplicateComplianceMarker,a.UnknownComplianceMarker,a.InvalidSecretScope,a.DuplicateSecretScope,a.SecretScopeIgnoredForPii,a.InvalidPersonalDataQualifier,a.DuplicateSpecialCategory]),L=/* @__PURE__ */ new Set;for(let e of u.compilerDiagnostics??S.diagnostics){let t=e.code===a.UnknownType&&(S.identityDetails??[]).some(t=>t.line===e.location.line-1),n=e.code===a.RepeatedSingularDeclarationAcrossFiles&&e.message.includes(`identity block`);if(!(e.code===a.DuplicateDeclaration&&e.message.startsWith(`Duplicate declaration of policy `))&&!t&&!n&&!O.has(e.code)&&!k.has(e.code)&&!I.has(e.code)&&!A.has(e.code)&&!j.has(e.code)&&!M.has(e.code)&&!N.has(e.code)&&!P.has(e.code)&&!F.has(e.code)&&e.code!==a.ReducerIdentityMismatch&&e.code!==a.InvalidSpecificationExampleBody&&e.code!==a.UnknownRuleImplementationDirective&&e.code!==a.InvalidValidationRule&&e.code!==a.RepeatedDeclarationAcrossFiles&&!/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY062[1-9]$|^PLAY063[0-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$|^PLAY065[4-6]$|^PLAY066[0-6]$|^PLAY072[0-2]$/.test(e.code))continue;let r=e.location.line-1;if(e.code===a.OmittedProductionDestination&&D.some(t=>t.code===e.code&&t.line===r))continue;if(e.code===a.UnknownEvent){if(L.has(r))continue;L.add(r)}let i=o(s[r],e)||s[r].length-e.location.column+1;D.push(issue(e.severity,r,e.location.column,i,e.message,e.code))}let checkEvent=(e,t,n)=>{!T.has(n)&&!L.has(e)&&D.push(tokenIssue(`warning`,e,t,n,`Unknown event type '${n}' — declare it in a slice or import it.`,y.unknownEvent))},R=-1;for(let a=0;a<s.length;a++){let o=s[a],c=o.trim();if(d[a]||c.length===0)continue;let u=o.match(/^[ ]*(\t+)/);if(u&&D.push(issue(`warning`,a,u[0].length-u[1].length+1,u[1].length,`Screenplay is indentation-based — use spaces, not tabs.`,y.tabIndentation)),R>=0){if(l(o)>R&&/^(?:or\s+)?[A-Z]\w*(?:\s+or\s+[A-Z]\w*)*$/.test(c)){for(let e of c.split(/\s+/).filter(e=>e!==`or`))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy));continue}R=-1}let f=validateImport(s,d,a);f&&D.push(f);let p=c.match(/^slice\s+(\w+)/);p&&!i.includes(p[1])&&D.push(tokenIssue(`error`,a,o,p[1],`Unknown slice type '${p[1]}' — expected ${i.join(`, `)}.`,y.unknownSliceType));let m=c.match(/^concept\s+\w+\s*:\s*(\w+)/);m&&m[1]!==`Enum`&&!r.includes(m[1])&&D.push(tokenIssue(`error`,a,o,m[1],`Unknown primitive type '${m[1]}' — expected ${r.join(`, `)} or Enum.`,y.unknownPrimitiveType));let h=c.match(/^authorize\s+(.*)$/);if(h){R=l(o);for(let e of h[1].split(/\s+/).filter(e=>e!==`or`&&e.length>0))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy))}let g=c.match(/^on\s+([A-Z]\w*)\s*$/);g&&checkEvent(a,o,g[1]);let _=c.match(/^produces\s+([A-Z]\w*)\s*$/);if(_&&!S.operationProductionLines?.has(a)&&checkEvent(a,o,_[1]),/^produces\s+when\b/.test(c)&&!S.operationProductionLines?.has(a))for(let e=a+1;e<s.length;e++){let t=s[e];if(!(d[e]||t.trim().length===0)){if(l(t)>l(o)){let n=t.trim().match(/^([A-Z]\w*)\s*$/);n&&checkEvent(e,t,n[1])}break}}let v=c.match(/^unique\s+event\s+([A-Z]\w*)/);v&&checkEvent(a,o,v[1]);let b=c.match(/^unique\s+[a-z_]\w*\s+on\s+([A-Z]\w*)/);b&&checkEvent(a,o,b[1]);for(let e of o.match(/\$identity\.[\w.]+/g)??[]){let t=e.substring(10).split(`.`)[0],r=[...n,...(S.identityDetails??[]).map(e=>e.name)];r.includes(t)||D.push(tokenIssue(`warning`,a,o,e,`Unknown $identity property '${t}' — expected ${r.join(`, `)}.`,y.unknownContextIdentityProperty))}for(let r of o.match(/\$context\.[\w.]+/g)??[]){let i=r.substring(9).split(`.`);t.includes(i[0])?i[0]===`causedBy`&&i.length>1&&!e.includes(i[1])?D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.causedBy property '${i[1]}' — expected ${e.join(`, `)}.`,y.unknownContextCausedByProperty)):i[0]===`identity`&&i.length>1&&!n.includes(i[1])&&D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.identity property '${i[1]}' — expected ${n.join(`, `)}.`,y.unknownContextIdentityProperty)):D.push(tokenIssue(`warning`,a,o,r,`Unknown $context path '${i.join(`.`)}' — expected one of ${t.join(`, `)}.`,y.unknownContextPath))}}D.push(...validateEventContextPaths(s,d)),D.push(...b(s,w,g,S.operationProductionLines));let z=s.map((e,t)=>({line:e,index:t})).filter(({line:e})=>/^\s*```(?:[a-z]+)?\s*$/.test(e));if(z.length%2==1){let e=z[z.length-1];D.push(issue(`error`,e.index,1,e.line.length+1,"Unclosed inline code block — expected a closing ``` line.",y.unclosedCodeBlock))}return D}function validateProductionDestinations(e,t){let n=[];e=u(e);for(let r of t.commands){let t=r.properties.filter(e=>e.isIdentifier&&!g(e).isOptional&&!g(e).isCollection);if(t.length===1)for(let i of r.produces??[]){if(i.inline||i.conditional||i.target!==void 0)continue;let r=i.line;n.push(issue(`information`,r,l(e[r])+1,e[r].trim().length,`Plain 'produces ${i.name}' omits its destination — use 'for ${t[0].name}' to explicitly select the command's identifier.`,y.omittedProductionDestination))}}return n}function validateImport(e,t,n){let r=e[n],i=r.trim().replace(/\s*\/\/.*$/,``);if(!/^import\b/.test(i)||x(r,n))return;let a=l(r);if(a>0&&[`module`,`feature`].includes(s(e,t,n,a)[0])||S(r))return issue(`error`,n,a+1,i.length,`Invalid import '${i}' — inside a module or feature, import names files: 'import "<path or glob>"'.`,y.invalidFileImport)}const C=/^(?:(?:increment|decrement|count|clear|add|subtract|set)\s+)?@?([$\w.]+)(?=\s|=|$)/;function validateEventContextPaths(e,t){let n=[],names=e=>e.map(e=>e.name).join(`, `);for(let r=0;r<e.length;r++){let i=e[r];if(t[r])continue;for(let e of i.matchAll(/(\.)?\$eventContext((?:\.(?:\w+(?:\(\))?)?)*)/g)){let t=e[0].substring(e[1]?.length??0),i=e[2];if(i.length===0){e[1]&&n.push(issue(`error`,r,(e.index??0)+2,t.length,`'$eventContext' names no member - expected one of ${names(d(``).expected)}.`,y.missingEventContextPath));continue}let a=i.substring(1),o=d(a),s=(e.index??0)+(e[1]?.length??0)+1;switch(o.status){case`missing`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' names no member - expected one of ${names(o.expected)}.`,y.missingEventContextPath));break;case`unknownMember`:n.push(issue(`warning`,r,s,t.length,`Unknown event context member '${o.segment}' in '$eventContext.${a}' - expected one of ${names(o.expected)}.`,y.unknownEventContextMember));break;case`unknownSubPath`:{let e=o.expected.length===0?`no members to address`:`members ${names(o.expected)}`;n.push(issue(`warning`,r,s,t.length,`Unknown event context path '$eventContext.${a}' - '${o.member?.name}' (${o.member?.type}) has ${e}.`,y.unknownEventContextPath));break}case`belowCollection`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' cannot resolve - '${o.member?.name}' is a collection (${o.member?.type}) and cannot be addressed below.`,y.eventContextPathBelowCollection))}}let a=i.trim().match(C)?.[1],o=a?.match(/\.\$(\w+)/)?.[1];a&&o&&o!==`eventContext`&&n.push(tokenIssue(`warning`,r,i,a,`Dynamic dictionary key '$${o}' in '${a}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${o}' becomes the key.`,y.unresolvedDynamicKeySource))}return n}export{validateEventContextPaths,validateLines};
3
3
  //# sourceMappingURL=validation.js.map