@cratis/screenplay-language 4.198.0 → 4.200.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/compiler/Authoring/QuickFixes.js +2 -2
- package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js +2 -0
- package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js.map +1 -0
- package/dist/bundles/keyword-docs.js +1 -1
- package/dist/bundles/keyword-docs.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{checkPortableMatchPattern as t}from"../Parsing/checkPortableMatchPattern.js";import{stringBodyPattern as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{complianceWireName as i}from"../Parsing/ConceptComplianceParser.js";import{commentStart as a,splitLines as o}from"../Parsing/SourceLineSplitter.js";import{ScreenplaySyntaxWalker as s}from"../Syntax/ScreenplaySyntaxWalker.js";import{parseForAuthoring as c}from"../ScreenplayCompiler.js";function isQuickFixDiagnostic(t){return t===e.DeprecatedStudioTextRulePattern||t===e.DuplicateComplianceMarker||t===e.LegacyOptionalSuffix||t===e.LegacyComplianceMarker||t===e.RedundantEventId||t===e.PublicTranslationRequiresDirection}function legacyOptionalTypeLength(t,n){return n.code===e.LegacyOptionalSuffix?/^[\p{L}\p{Mn}\p{Nd}\p{Pc}.]+(?:\[\])?\?/u.exec(t.slice(n.location.column-1))?.[0].length??0:0}function prepareQuickFixes(r,i={}){let l=c(r,void 0,i.placement),u=new Set(Array.from({length:14},(e,t)=>`PLAY0${607+t}`)),acceptable=e=>e.success||e.diagnostics.every(e=>e.severity!==`error`||u.has(e.code)),errorCodes=e=>new Set(e.diagnostics.filter(e=>e.severity===`error`).map(e=>e.code));if(!acceptable(l))return()=>[];let d=o(r),f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Map,m=/* @__PURE__ */ new Map;new class extends s{visitValidationRule(e){m.set(e.location.line,e),super.visitValidationRule(e)}visitEvent(e){f.set(e.location.line,e)}visitSlice(e){p.set(e.location.line,e),super.visitSlice(e)}}().visitApplication(l.value);let h=/* @__PURE__ */ new Map,g=/* @__PURE__ */ new Map,_=/* @__PURE__ */ new Map,v=/* @__PURE__ */ new Map,y=/* @__PURE__ */ new Map,b;for(let e of d)b=f.get(e.number)??b,b!==void 0&&y.set(e.number,b);for(let o of l.diagnostics){h.set(o.code,(h.get(o.code)??0)+1);let s=d[o.location.line-1];if(o.code===e.DuplicateComplianceMarker){let e=duplicateComplianceMarkerEdit(s.raw,s.startOffset);e!==void 0&&_.set(s.number,{diagnosticCode:o.code,title:`Remove duplicate compliance markers`,scope:`occurrence`,edits:[e]})}let u=legacyOptionalTypeLength(s.raw,o);if(u>0)g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Use 'optional' instead of '?'`,scope:`occurrence`,edits:[{start:s.startOffset+o.location.column+u-2,length:1,text:` optional`}]}});else if(o.code===e.DeprecatedStudioTextRulePattern){let e=m.get(s.number);if(e?.rule!==`Matches`||e.value?.kind!==`LiteralExpressionSyntax`||typeof e.value.value!=`string`)continue;let r=t(e.value.value).replacement,i=RegExp(`\\bmatches\\s+"${n}"`).exec(s.raw);if(r===void 0||i===null)continue;let a={Equal:`==`,NotEqual:`!=`,Contains:`contains`,NotContains:`not contains`,StartsWith:`starts with`,EndsWith:`ends with`},c=`"`+r.value.replace(/["\\\n\r\t]/g,e=>JSON.stringify(e).slice(1,-1))+`"`;g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Use the equivalent ordinal text rule`,scope:`occurrence`,edits:[{start:s.startOffset+i.index,length:i[0].length,text:a[r.kind]+` `+c}]},change:{node:e,replacement:{...e,rule:r.kind,value:{...e.value,value:r.value}}}})}else if(o.code===e.LegacyComplianceMarker){let e=complianceMarkerEdit(s.raw,s.startOffset);e!==void 0&&g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Use bare pii and secret compliance markers`,scope:`occurrence`,edits:[e]}})}else if(o.code===e.PublicTranslationRequiresDirection){let t=p.get(s.number),n=/^\s*/.exec(s.raw)[0],a=r.includes(`\r
|
|
1
|
+
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{checkPortableMatchPattern as t}from"../Parsing/checkPortableMatchPattern.js";import{stringBodyPattern as n}from"../Text/StringLiteral.js";import{pattern as r}from"../Text/patterns.js";import{complianceWireName as i}from"../Parsing/ConceptComplianceParser.js";import{commentStart as a,splitLines as o}from"../Parsing/SourceLineSplitter.js";import{ScreenplaySyntaxWalker as s}from"../Syntax/ScreenplaySyntaxWalker.js";import{parseForAuthoring as c}from"../ScreenplayCompiler.js";function isQuickFixDiagnostic(t){return t===e.DeprecatedStudioTextRulePattern||t===e.DuplicateComplianceMarker||t===e.LegacyOptionalSuffix||t===e.LegacyComplianceMarker||t===e.RedundantEventId||t===e.PublicTranslationRequiresDirection||t===e.LegacyProfileLayout}function legacyOptionalTypeLength(t,n){return n.code===e.LegacyOptionalSuffix?/^[\p{L}\p{Mn}\p{Nd}\p{Pc}.]+(?:\[\])?\?/u.exec(t.slice(n.location.column-1))?.[0].length??0:0}function prepareQuickFixes(r,i={}){let l=c(r,void 0,i.placement),u=new Set(Array.from({length:14},(e,t)=>`PLAY0${607+t}`)),acceptable=e=>e.success||e.diagnostics.every(e=>e.severity!==`error`||u.has(e.code)),errorCodes=e=>new Set(e.diagnostics.filter(e=>e.severity===`error`).map(e=>e.code));if(!acceptable(l))return()=>[];let d=o(r),f=/* @__PURE__ */ new Map,p=/* @__PURE__ */ new Map,m=/* @__PURE__ */ new Map;new class extends s{visitValidationRule(e){m.set(e.location.line,e),super.visitValidationRule(e)}visitEvent(e){f.set(e.location.line,e)}visitSlice(e){p.set(e.location.line,e),super.visitSlice(e)}}().visitApplication(l.value);let h=/* @__PURE__ */ new Map,g=/* @__PURE__ */ new Map,_=/* @__PURE__ */ new Map,v=/* @__PURE__ */ new Map,y=/* @__PURE__ */ new Map,b;for(let e of d)b=f.get(e.number)??b,b!==void 0&&y.set(e.number,b);for(let o of l.diagnostics){h.set(o.code,(h.get(o.code)??0)+1);let s=d[o.location.line-1];if(o.code===e.DuplicateComplianceMarker){let e=duplicateComplianceMarkerEdit(s.raw,s.startOffset);e!==void 0&&_.set(s.number,{diagnosticCode:o.code,title:`Remove duplicate compliance markers`,scope:`occurrence`,edits:[e]})}let u=legacyOptionalTypeLength(s.raw,o);if(u>0)g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Use 'optional' instead of '?'`,scope:`occurrence`,edits:[{start:s.startOffset+o.location.column+u-2,length:1,text:` optional`}]}});else if(o.code===e.DeprecatedStudioTextRulePattern){let e=m.get(s.number);if(e?.rule!==`Matches`||e.value?.kind!==`LiteralExpressionSyntax`||typeof e.value.value!=`string`)continue;let r=t(e.value.value).replacement,i=RegExp(`\\bmatches\\s+"${n}"`).exec(s.raw);if(r===void 0||i===null)continue;let a={Equal:`==`,NotEqual:`!=`,Contains:`contains`,NotContains:`not contains`,StartsWith:`starts with`,EndsWith:`ends with`},c=`"`+r.value.replace(/["\\\n\r\t]/g,e=>JSON.stringify(e).slice(1,-1))+`"`;g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Use the equivalent ordinal text rule`,scope:`occurrence`,edits:[{start:s.startOffset+i.index,length:i[0].length,text:a[r.kind]+` `+c}]},change:{node:e,replacement:{...e,rule:r.kind,value:{...e.value,value:r.value}}}})}else if(o.code===e.LegacyComplianceMarker){let e=complianceMarkerEdit(s.raw,s.startOffset);e!==void 0&&g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Use bare pii and secret compliance markers`,scope:`occurrence`,edits:[e]}})}else if(o.code===e.PublicTranslationRequiresDirection){let t=p.get(s.number),n=/^\s*/.exec(s.raw)[0],a=r.includes(`\r
|
|
2
2
|
`)?`\r
|
|
3
3
|
`:`
|
|
4
|
-
`,u=[`Inbound`,`Outbound`].map(e=>({direction:e,text:`${a}${n} direction ${e===`Inbound`?`inbound`:`outbound`}`})).filter(t=>{let n=applyQuickFixEdits(r,[{start:s.startOffset+s.raw.length,length:0,text:t.text}]),a=c(n,void 0,i.placement),o=errorCodes(l);return acceptable(a)&&![...errorCodes(a)].some(t=>t===e.PublicTranslationRequiresDirection||!o.has(t))});if(u.length===1){let[{direction:e,text:n}]=u;g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Declare 'direction ${e===`Inbound`?`inbound`:`outbound`}'`,scope:`occurrence`,edits:[{start:s.startOffset+s.raw.length,length:0,text:n}]},change:{node:t,replacement:{...t,direction:e}}})}}else if(o.code===e.RedundantEventId&&a(s.raw)<0){let e=y.get(s.number);if(e?.id!==e?.name||e===void 0)continue;g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Remove the redundant event id`,scope:`occurrence`,edits:[{start:s.startOffset,length:(d[s.number]?.startOffset??r.length)-s.startOffset,text:``}]},change:{node:e,replacement:{...e,id:null}}})}}let x=[e.LegacyOptionalSuffix,e.LegacyComplianceMarker],S=verificationShape(l),C=/* @__PURE__ */ new Map,w,T=/* @__PURE__ */ new Set,E=/* @__PURE__ */ new Map,verify=(e,t)=>{let n=applyQuickFixEdits(r,e.edits);if(n===void 0)return;let a=c(n,void 0,i.placement);if(acceptable(a)&&verificationShape(a)===(t===void 0?S:verificationShape(l,[t])))return a.diagnostics.filter(t=>t.code===e.diagnosticCode).length===(h.get(e.diagnosticCode)??0)-e.edits.length?e:void 0};return(t,n)=>{let a=typeof t==`number`||t===void 0?void 0:t,o=a===void 0?typeof t==`number`&&(n===void 0||n===e.DuplicateComplianceMarker)?[t]:[]:a.filter(t=>t.diagnosticCode===e.DuplicateComplianceMarker).map(e=>e.line),s=[...new Set(o)].flatMap(e=>{let t=_.get(e);if(t===void 0)return[];v.has(e)||v.set(e,verify(t));let n=v.get(e);return n===void 0?[]:[n]}),u=x.filter(e=>a===void 0?n===void 0||n===e:a.some(t=>t.diagnosticCode===e));for(let t of u.filter(e=>!T.has(e))){let n=[...g.values()].filter(e=>e.fix.diagnosticCode===t);if(n.length>0){let r=verify({diagnosticCode:t,title:t===e.LegacyOptionalSuffix?`Use 'optional' throughout this document`:`Use bare pii and secret throughout this document`,scope:`document`,edits:n.flatMap(e=>e.fix.edits)});r!==void 0&&E.set(t,r)}T.add(t)}let f=u.flatMap(e=>E.has(e)?[E.get(e)]:[]);if(a!==void 0){if(w===void 0){w=/* @__PURE__ */ new Map;let e=d.flatMap(e=>g.has(e.number)?[g.get(e.number)]:[]),t=e.flatMap(e=>e.fix.edits),n=applyQuickFixEdits(r,t);if(t.length>0&&n!==void 0){let t=c(n,void 0,i.placement),r=e.flatMap(e=>e.change===void 0?[]:[e.change]);if(acceptable(t)&&verificationShape(t)===verificationShape(l,r)){let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map;for(let e of t.diagnostics)n.set(e.code,(n.get(e.code)??0)+1);for(let t of e)r.set(t.fix.diagnosticCode,(r.get(t.fix.diagnosticCode)??0)+t.fix.edits.length);if([...r].every(([e,t])=>(n.get(e)??0)===(h.get(e)??0)-t))for(let t of e)w.set(t.line,t.fix)}}}let e=/* @__PURE__ */ new Map;for(let t of a){let n=w.get(t.line);n?.diagnosticCode===t.diagnosticCode&&e.set(t.line,n)}return[...e.values(),...s,...f]}let p=typeof t==`number`?t:void 0,m=p===void 0?void 0:g.get(p),y;return m!==void 0&&p!==void 0&&(n===void 0||m.fix.diagnosticCode===n)&&(C.has(p)||(C.size===32&&C.delete(C.keys().next().value),C.set(p,verify(m.fix,m.change))),y=C.get(p)),[...y===void 0?[]:[y],...s,...f]}}function duplicateComplianceMarkerEdit(e,t){let n=r(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(n===null)return;let a=n[2],o=/* @__PURE__ */ new Set,s=a.replace(new RegExp(r(`[^\\S\\r\\n]+(@?\\w+)`).source,`gu`),(e,t)=>{let n=i(t);return o.has(n)?``:(o.add(n),e)});return s===a?void 0:{start:t+n[1].length,length:a.length,text:s}}function complianceMarkerEdit(e,t){let n=r(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(n!==null){let e=n[2],r=e.replace(/@pii\b|@?sensitive\b/g,e=>e===`@pii`?`pii`:`secret`);return r===e?void 0:{start:t+n[1].length,length:e.length,text:r}}let i=r(`^(\\s*)(@pii|@?sensitive)\\b`).exec(e);return i===null?void 0:{start:t+i[1].length,length:i[2].length,text:i[2]===`@pii`?`pii`:`secret`}}function verificationShape(e,t=[]){let n=new Map(t.map(e=>[e.node,e.replacement]));return JSON.stringify([e.value,e.triggerData],(e,t)=>[`location`,`usesLocation`,`targetLocation`].includes(e)?void 0:n.get(t)??t)}function applyQuickFixEdits(e,t){let n=[],r=0;for(let i of t){if(i.start<r||i.start<0||i.length<0||i.start+i.length>e.length)return;n.push(e.slice(r,i.start),i.text),r=i.start+i.length}return n.push(e.slice(r)),n.join(``)}export{applyQuickFixEdits,isQuickFixDiagnostic,legacyOptionalTypeLength,prepareQuickFixes};
|
|
4
|
+
`,u=[`Inbound`,`Outbound`].map(e=>({direction:e,text:`${a}${n} direction ${e===`Inbound`?`inbound`:`outbound`}`})).filter(t=>{let n=applyQuickFixEdits(r,[{start:s.startOffset+s.raw.length,length:0,text:t.text}]),a=c(n,void 0,i.placement),o=errorCodes(l);return acceptable(a)&&![...errorCodes(a)].some(t=>t===e.PublicTranslationRequiresDirection||!o.has(t))});if(u.length===1){let[{direction:e,text:n}]=u;g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Declare 'direction ${e===`Inbound`?`inbound`:`outbound`}'`,scope:`occurrence`,edits:[{start:s.startOffset+s.raw.length,length:0,text:n}]},change:{node:t,replacement:{...t,direction:e}}})}}else if(o.code===e.LegacyProfileLayout){let e=legacyProfileLayoutFix(d,s.number-1,o.code);e!==void 0&&g.set(s.number,{line:s.number,fix:e})}else if(o.code===e.RedundantEventId&&a(s.raw)<0){let e=y.get(s.number);if(e?.id!==e?.name||e===void 0)continue;g.set(s.number,{line:s.number,fix:{diagnosticCode:o.code,title:`Remove the redundant event id`,scope:`occurrence`,edits:[{start:s.startOffset,length:(d[s.number]?.startOffset??r.length)-s.startOffset,text:``}]},change:{node:e,replacement:{...e,id:null}}})}}let x=[e.LegacyOptionalSuffix,e.LegacyComplianceMarker],S=verificationShape(l),C=/* @__PURE__ */ new Map,w,T=/* @__PURE__ */ new Set,E=/* @__PURE__ */ new Map,verify=(e,t)=>{let n=applyQuickFixEdits(r,e.edits);if(n===void 0)return;let a=c(n,void 0,i.placement);if(acceptable(a)&&verificationShape(a)===(t===void 0?S:verificationShape(l,[t])))return a.diagnostics.filter(t=>t.code===e.diagnosticCode).length===(h.get(e.diagnosticCode)??0)-e.edits.length?e:void 0};return(t,n)=>{let a=typeof t==`number`||t===void 0?void 0:t,o=a===void 0?typeof t==`number`&&(n===void 0||n===e.DuplicateComplianceMarker)?[t]:[]:a.filter(t=>t.diagnosticCode===e.DuplicateComplianceMarker).map(e=>e.line),s=[...new Set(o)].flatMap(e=>{let t=_.get(e);if(t===void 0)return[];v.has(e)||v.set(e,verify(t));let n=v.get(e);return n===void 0?[]:[n]}),u=x.filter(e=>a===void 0?n===void 0||n===e:a.some(t=>t.diagnosticCode===e));for(let t of u.filter(e=>!T.has(e))){let n=[...g.values()].filter(e=>e.fix.diagnosticCode===t);if(n.length>0){let r=verify({diagnosticCode:t,title:t===e.LegacyOptionalSuffix?`Use 'optional' throughout this document`:`Use bare pii and secret throughout this document`,scope:`document`,edits:n.flatMap(e=>e.fix.edits)});r!==void 0&&E.set(t,r)}T.add(t)}let f=u.flatMap(e=>E.has(e)?[E.get(e)]:[]);if(a!==void 0){if(w===void 0){w=/* @__PURE__ */ new Map;let e=d.flatMap(e=>g.has(e.number)?[g.get(e.number)]:[]),t=e.flatMap(e=>e.fix.edits),n=applyQuickFixEdits(r,t);if(t.length>0&&n!==void 0){let t=c(n,void 0,i.placement),r=e.flatMap(e=>e.change===void 0?[]:[e.change]);if(acceptable(t)&&verificationShape(t)===verificationShape(l,r)){let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map;for(let e of t.diagnostics)n.set(e.code,(n.get(e.code)??0)+1);for(let t of e)r.set(t.fix.diagnosticCode,(r.get(t.fix.diagnosticCode)??0)+t.fix.edits.length);if([...r].every(([e,t])=>(n.get(e)??0)===(h.get(e)??0)-t))for(let t of e)w.set(t.line,t.fix)}}}let e=/* @__PURE__ */ new Map;for(let t of a){let n=w.get(t.line);n?.diagnosticCode===t.diagnosticCode&&e.set(t.line,n)}return[...e.values(),...s,...f]}let p=typeof t==`number`?t:void 0,m=p===void 0?void 0:g.get(p),y;return m!==void 0&&p!==void 0&&(n===void 0||m.fix.diagnosticCode===n)&&(C.has(p)||(C.size===32&&C.delete(C.keys().next().value),C.set(p,verify(m.fix,m.change))),y=C.get(p)),[...y===void 0?[]:[y],...s,...f]}}function legacyProfileLayoutFix(e,t,n){let indentOf=e=>/^\s*/.exec(e)[0].length,r=indentOf(e[t].raw),i,a=!1;for(let n=t+1;n<e.length;n++){let t=e[n].raw;if(t.trim().length!==0){if(indentOf(t)<=r)break;i===void 0&&/^\s*layout\s+[A-Za-z_]\w*\s*$/.test(t)&&(i={index:n,indent:indentOf(t)}),/^\s*root\s+template(\s|$)/.test(t)&&(a=!0)}}if(i===void 0)return;let o=e[i.index];return a?{diagnosticCode:n,title:`Remove the ignored layout line`,scope:`occurrence`,edits:[{start:o.startOffset,length:(e[i.index+1]?.startOffset??o.startOffset+o.raw.length)-o.startOffset,text:``}]}:{diagnosticCode:n,title:`Use 'root template' instead of 'layout'`,scope:`occurrence`,edits:[{start:o.startOffset+i.indent,length:6,text:`root template`}]}}function duplicateComplianceMarkerEdit(e,t){let n=r(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(n===null)return;let a=n[2],o=/* @__PURE__ */ new Set,s=a.replace(new RegExp(r(`[^\\S\\r\\n]+(@?\\w+)`).source,`gu`),(e,t)=>{let n=i(t);return o.has(n)?``:(o.add(n),e)});return s===a?void 0:{start:t+n[1].length,length:a.length,text:s}}function complianceMarkerEdit(e,t){let n=r(`^(\\s*concept\\s+\\w+\\s*:\\s*\\w+)((?:[^\\S\\r\\n]+@?\\w+)*)`).exec(e);if(n!==null){let e=n[2],r=e.replace(/@pii\b|@?sensitive\b/g,e=>e===`@pii`?`pii`:`secret`);return r===e?void 0:{start:t+n[1].length,length:e.length,text:r}}let i=r(`^(\\s*)(@pii|@?sensitive)\\b`).exec(e);return i===null?void 0:{start:t+i[1].length,length:i[2].length,text:i[2]===`@pii`?`pii`:`secret`}}function verificationShape(e,t=[]){let n=new Map(t.map(e=>[e.node,e.replacement]));return JSON.stringify([e.value,e.triggerData],(e,t)=>[`location`,`usesLocation`,`targetLocation`].includes(e)?void 0:n.get(t)??t)}function applyQuickFixEdits(e,t){let n=[],r=0;for(let i of t){if(i.start<r||i.start<0||i.length<0||i.start+i.length>e.length)return;n.push(e.slice(r,i.start),i.text),r=i.start+i.length}return n.push(e.slice(r)),n.join(``)}export{applyQuickFixEdits,isQuickFixDiagnostic,legacyOptionalTypeLength,prepareQuickFixes};
|
|
5
5
|
//# sourceMappingURL=QuickFixes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickFixes.js","names":["code","DiagnosticCodes","diagnostic","line","original","parseForAuthoring","source","options","publicEventCodes","index","parsed","lines","splitLines","eventsByLine","slicesByLine","rulesByLine","ScreenplaySyntaxWalker","rule","event","slice","counts","byLine","duplicateByLine","duplicateVerdicts","events","edit","length","replacement","checkPortableMatchPattern","match","stringBodyPattern","spellings","quoted","character","indent","ending","candidates","direction","edited","candidate","originalCodes","commentStart","declaration","spellingCodes","syntax","verified","rangeVerdicts","documentChecked","documentFixes","fix","change","requests","duplicateLines","diagnosticCode","request","duplicates","number","selectedCodes","documents","edits","candidateSource","changes","remaining","removed","count","selected","occurrenceLine","occurrenceFix","header","pattern","raw","suffix","seen","text","wire","complianceWireName","marker","token","startOffset","directive","replacements","key","value","parts","end"],"sources":["../../../../../../Compiler/Authoring/QuickFixes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { PlayPlacement } from '../Files/PlayPlacement';\nimport { checkPortableMatchPattern } from '../Parsing/checkPortableMatchPattern';\nimport { ValidationRuleSyntax } from '../Syntax/Commands';\nimport { stringBodyPattern } from '../Text/StringLiteral';\nimport { complianceWireName } from '../Parsing/ConceptComplianceParser';\nimport { commentStart, splitLines } from '../Parsing/SourceLineSplitter';\nimport { parseForAuthoring } from '../ScreenplayCompiler';\nimport { EventSyntax } from '../Syntax/Declarations';\nimport { SliceSyntax } from '../Syntax/Structure';\nimport { TranslationDirection } from '../Syntax/TranslationDirection';\nimport { ScreenplaySyntaxWalker } from '../Syntax/ScreenplaySyntaxWalker';\nimport { pattern } from '../Text/patterns';\nimport { QuickFixCandidate } from './QuickFixCandidate';\n\nexport interface QuickFixEdit {\n readonly start: number;\n readonly length: number;\n readonly text: string;\n}\n\nexport interface QuickFix {\n readonly diagnosticCode: string;\n readonly title: string;\n readonly scope: 'occurrence' | 'document';\n readonly edits: readonly QuickFixEdit[];\n}\n\nexport interface QuickFixOptions {\n readonly line?: number;\n readonly placement?: PlayPlacement;\n readonly diagnosticCode?: string;\n}\n\nexport function isQuickFixDiagnostic(code: unknown): code is string {\n return code === DiagnosticCodes.DeprecatedStudioTextRulePattern || code === DiagnosticCodes.DuplicateComplianceMarker || code === DiagnosticCodes.LegacyOptionalSuffix || code === DiagnosticCodes.LegacyComplianceMarker || code === DiagnosticCodes.RedundantEventId || code === DiagnosticCodes.PublicTranslationRequiresDirection;\n}\n\n// Diagnostics point at the complete type, not at the suffix. Never derive edits from message text.\nexport function legacyOptionalTypeLength(line: string, diagnostic: Diagnostic): number {\n if (diagnostic.code !== DiagnosticCodes.LegacyOptionalSuffix) return 0;\n return /^[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}.]+(?:\\[\\])?\\?/u.exec(line.slice(diagnostic.location.column - 1))?.[0].length ?? 0;\n}\n\nexport function findQuickFixes(source: string, options: QuickFixOptions = {}): QuickFix[] {\n return prepareQuickFixes(source, options)(options.line, options.diagnosticCode);\n}\n\n// One immutable buffer version owns the analysis and document verdict. Cursor moves reuse them;\n// single-occurrence verdicts have a bounded cache. Range requests verify the independent recipes\n// together once per version, rather than reparsing N times for N intersecting markers.\nexport function prepareQuickFixes(source: string, options: Pick<QuickFixOptions, 'placement'> = {}): (line?: number | readonly { line: number; diagnosticCode: string }[], diagnosticCode?: string) => QuickFix[] {\n const original = parseForAuthoring(source, undefined, options.placement);\n // PLAY0614 and the public-event boundary errors that follow from a missing direction are errors the repair itself removes,\n // so a document whose only errors are public-event boundary errors stays repairable.\n const publicEventCodes: ReadonlySet<string> = new Set(Array.from({ length: 14 }, (_, index) => `PLAY0${607 + index}`));\n const acceptable = (parsed: ReturnType<typeof parseForAuthoring>): boolean => parsed.success || parsed.diagnostics.every(diagnostic => diagnostic.severity !== 'error' || publicEventCodes.has(diagnostic.code));\n const errorCodes = (parsed: ReturnType<typeof parseForAuthoring>): Set<string> => new Set(parsed.diagnostics.filter(diagnostic => diagnostic.severity === 'error').map(diagnostic => diagnostic.code));\n if (!acceptable(original)) return () => [];\n const lines = splitLines(source);\n const eventsByLine = new Map<number, EventSyntax>();\n const slicesByLine = new Map<number, SliceSyntax>();\n const rulesByLine = new Map<number, ValidationRuleSyntax>();\n // Index inline and standalone declarations once, without scanning the tree per diagnostic.\n const walker = new class extends ScreenplaySyntaxWalker {\n override visitValidationRule(rule: ValidationRuleSyntax): void { rulesByLine.set(rule.location.line, rule); super.visitValidationRule(rule); }\n override visitEvent(event: EventSyntax): void { eventsByLine.set(event.location.line, event); }\n override visitSlice(slice: SliceSyntax): void { slicesByLine.set(slice.location.line, slice); super.visitSlice(slice); }\n }();\n walker.visitApplication(original.value);\n const counts = new Map<string, number>();\n const byLine = new Map<number, QuickFixCandidate>();\n // Duplicate removal and legacy spelling can share a header. Keep their independently verified recipes separate.\n const duplicateByLine = new Map<number, QuickFix>();\n const duplicateVerdicts = new Map<number, QuickFix | undefined>();\n const events = new Map<number, EventSyntax>();\n let event: EventSyntax | undefined;\n for (const line of lines) {\n event = eventsByLine.get(line.number) ?? event;\n if (event !== undefined) events.set(line.number, event);\n }\n for (const diagnostic of original.diagnostics) {\n counts.set(diagnostic.code, (counts.get(diagnostic.code) ?? 0) + 1);\n const line = lines[diagnostic.location.line - 1];\n if (diagnostic.code === DiagnosticCodes.DuplicateComplianceMarker) {\n const edit = duplicateComplianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) duplicateByLine.set(line.number, { diagnosticCode: diagnostic.code, title: 'Remove duplicate compliance markers', scope: 'occurrence', edits: [edit] });\n }\n const length = legacyOptionalTypeLength(line.raw, diagnostic);\n if (length > 0) {\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: \"Use 'optional' instead of '?'\", scope: 'occurrence', edits: [{ start: line.startOffset + diagnostic.location.column + length - 2, length: 1, text: ' optional' }] } });\n } else if (diagnostic.code === DiagnosticCodes.DeprecatedStudioTextRulePattern) {\n const rule = rulesByLine.get(line.number);\n if (rule?.rule !== 'Matches' || rule.value?.kind !== 'LiteralExpressionSyntax' || typeof rule.value.value !== 'string') continue;\n const replacement = checkPortableMatchPattern(rule.value.value).replacement;\n const match = new RegExp(`\\\\bmatches\\\\s+\"${stringBodyPattern}\"`).exec(line.raw);\n if (replacement === undefined || match === null) continue;\n const spellings = { Equal: '==', NotEqual: '!=', Contains: 'contains', NotContains: 'not contains', StartsWith: 'starts with', EndsWith: 'ends with' };\n const quoted = '\"' + replacement.value.replace(/[\"\\\\\\n\\r\\t]/g, character => JSON.stringify(character).slice(1, -1)) + '\"';\n byLine.set(line.number, { line: line.number,\n fix: { diagnosticCode: diagnostic.code, title: 'Use the equivalent ordinal text rule', scope: 'occurrence', edits: [{ start: line.startOffset + match.index, length: match[0].length, text: spellings[replacement.kind] + ' ' + quoted }] },\n change: { node: rule, replacement: { ...rule, rule: replacement.kind, value: { ...rule.value, value: replacement.value } } as ValidationRuleSyntax } });\n } else if (diagnostic.code === DiagnosticCodes.LegacyComplianceMarker) {\n const edit = complianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Use bare pii and secret compliance markers', scope: 'occurrence', edits: [edit] } });\n } else if (diagnostic.code === DiagnosticCodes.PublicTranslationRequiresDirection) {\n // PLAY0614 is only reported on the declaration line of a Translate slice that has no direction.\n const slice = slicesByLine.get(line.number)!;\n // Offer a direction only when exactly one is consistent with the slice: the other would add errors.\n const indent = /^\\s*/.exec(line.raw)![0];\n const ending = source.includes('\\r\\n') ? '\\r\\n' : '\\n';\n const candidates = [TranslationDirection.Inbound, TranslationDirection.Outbound].map(direction => ({ direction, text: `${ending}${indent} direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}` }))\n .filter(candidate => {\n // The insertion point is the end of an existing line, so the edit is always in bounds.\n const edited = applyQuickFixEdits(source, [{ start: line.startOffset + line.raw.length, length: 0, text: candidate.text }])!;\n const parsed = parseForAuthoring(edited, undefined, options.placement);\n const originalCodes = errorCodes(original);\n // Valid when the missing-direction error is gone and the direction introduces no kind of error the document lacked.\n return acceptable(parsed) && ![...errorCodes(parsed)].some(code => code === DiagnosticCodes.PublicTranslationRequiresDirection || !originalCodes.has(code));\n });\n if (candidates.length === 1) {\n const [{ direction, text }] = candidates;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: `Declare 'direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}'`, scope: 'occurrence', edits: [{ start: line.startOffset + line.raw.length, length: 0, text }] },\n change: { node: slice, replacement: { ...slice, direction } as SliceSyntax } });\n }\n } else if (diagnostic.code === DiagnosticCodes.RedundantEventId && commentStart(line.raw) < 0) {\n const declaration = events.get(line.number);\n if (declaration?.id !== declaration?.name || declaration === undefined) continue;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Remove the redundant event id', scope: 'occurrence', edits: [{ start: line.startOffset, length: (lines[line.number]?.startOffset ?? source.length) - line.startOffset, text: '' }] },\n change: { node: declaration, replacement: { ...declaration, id: null } as EventSyntax } });\n }\n }\n const spellingCodes = [DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.LegacyComplianceMarker];\n const syntax = verificationShape(original);\n const verified = new Map<number, QuickFix | undefined>();\n let rangeVerdicts: Map<number, QuickFix> | undefined;\n const documentChecked = new Set<string>();\n const documentFixes = new Map<string, QuickFix>();\n const verify = (fix: QuickFix, change?: QuickFixCandidate['change']): QuickFix | undefined => {\n const candidate = applyQuickFixEdits(source, fix.edits);\n if (candidate === undefined) return undefined;\n const parsed = parseForAuthoring(candidate, undefined, options.placement);\n if (!acceptable(parsed) || verificationShape(parsed) !== (change === undefined ? syntax : verificationShape(original, [change]))) return undefined;\n return parsed.diagnostics.filter(diagnostic => diagnostic.code === fix.diagnosticCode).length === (counts.get(fix.diagnosticCode) ?? 0) - fix.edits.length ? fix : undefined;\n };\n return (line, diagnosticCode) => {\n const requests = typeof line === 'number' || line === undefined ? undefined : line;\n const duplicateLines = requests === undefined\n ? typeof line === 'number' && (diagnosticCode === undefined || diagnosticCode === DiagnosticCodes.DuplicateComplianceMarker) ? [line] : []\n : requests.filter(request => request.diagnosticCode === DiagnosticCodes.DuplicateComplianceMarker).map(request => request.line);\n const duplicates = [...new Set(duplicateLines)].flatMap(number => {\n const fix = duplicateByLine.get(number);\n if (fix === undefined) return [];\n if (!duplicateVerdicts.has(number)) duplicateVerdicts.set(number, verify(fix));\n const verified = duplicateVerdicts.get(number);\n return verified === undefined ? [] : [verified];\n });\n const selectedCodes = spellingCodes.filter(code => requests === undefined ? diagnosticCode === undefined || diagnosticCode === code : requests.some(request => request.diagnosticCode === code));\n for (const code of selectedCodes.filter(code => !documentChecked.has(code))) {\n const candidates = [...byLine.values()].filter(candidate => candidate.fix.diagnosticCode === code);\n if (candidates.length > 0) {\n const fix = verify({ diagnosticCode: code, title: code === DiagnosticCodes.LegacyOptionalSuffix ? \"Use 'optional' throughout this document\" : 'Use bare pii and secret throughout this document', scope: 'document', edits: candidates.flatMap(candidate => candidate.fix.edits) });\n if (fix !== undefined) documentFixes.set(code, fix);\n }\n documentChecked.add(code);\n }\n const documents = selectedCodes.flatMap(code => documentFixes.has(code) ? [documentFixes.get(code)!] : []);\n if (requests !== undefined) {\n if (rangeVerdicts === undefined) {\n rangeVerdicts = new Map();\n // Source order gives ordered, non-overlapping edits without sorting. Recipes replace\n // distinct nodes/lines; the batch must preserve every other modeled member and remove\n // exactly the expected diagnostics before any of its occurrence edits can be offered.\n const candidates = lines.flatMap(line => byLine.has(line.number) ? [byLine.get(line.number)!] : []);\n const edits = candidates.flatMap(candidate => candidate.fix.edits);\n const candidateSource = applyQuickFixEdits(source, edits);\n if (edits.length > 0 && candidateSource !== undefined) {\n const parsed = parseForAuthoring(candidateSource, undefined, options.placement);\n const changes = candidates.flatMap(candidate => candidate.change === undefined ? [] : [candidate.change]);\n if (acceptable(parsed) && verificationShape(parsed) === verificationShape(original, changes)) {\n const remaining = new Map<string, number>();\n const removed = new Map<string, number>();\n for (const diagnostic of parsed.diagnostics) remaining.set(diagnostic.code, (remaining.get(diagnostic.code) ?? 0) + 1);\n for (const candidate of candidates) removed.set(candidate.fix.diagnosticCode, (removed.get(candidate.fix.diagnosticCode) ?? 0) + candidate.fix.edits.length);\n if ([...removed].every(([code, count]) => (remaining.get(code) ?? 0) === (counts.get(code) ?? 0) - count)) {\n for (const candidate of candidates) rangeVerdicts.set(candidate.line, candidate.fix);\n }\n }\n }\n }\n const selected = new Map<number, QuickFix>();\n for (const request of requests) {\n const fix = rangeVerdicts.get(request.line);\n if (fix?.diagnosticCode === request.diagnosticCode) selected.set(request.line, fix);\n }\n return [...selected.values(), ...duplicates, ...documents];\n }\n const occurrenceLine = typeof line === 'number' ? line : undefined;\n const selected = occurrenceLine === undefined ? undefined : byLine.get(occurrenceLine);\n let occurrenceFix: QuickFix | undefined;\n if (selected !== undefined && occurrenceLine !== undefined && (diagnosticCode === undefined || selected.fix.diagnosticCode === diagnosticCode)) {\n if (!verified.has(occurrenceLine)) {\n if (verified.size === 32) verified.delete(verified.keys().next().value!);\n verified.set(occurrenceLine, verify(selected.fix, selected.change));\n }\n occurrenceFix = verified.get(occurrenceLine);\n }\n return [...(occurrenceFix === undefined ? [] : [occurrenceFix]), ...duplicates, ...documents];\n };\n}\n\nfunction duplicateComplianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header === null) return undefined;\n const suffix = header[2];\n const seen = new Set<string>();\n const text = suffix.replace(new RegExp(pattern('[^\\\\S\\\\r\\\\n]+(@?\\\\w+)').source, 'gu'), (token, marker: string) => {\n const wire = complianceWireName(marker);\n if (seen.has(wire)) return '';\n seen.add(wire);\n return token;\n });\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n}\n\nfunction complianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n // Restrict rewriting to the suffix or leading directive marker, never comments or quoted reasons.\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header !== null) {\n const suffix = header[2];\n const text = suffix.replace(/@pii\\b|@?sensitive\\b/g, marker => marker === '@pii' ? 'pii' : 'secret');\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n }\n const directive = pattern('^(\\\\s*)(@pii|@?sensitive)\\\\b').exec(raw);\n return directive === null ? undefined : { start: startOffset + directive[1].length, length: directive[2].length, text: directive[2] === '@pii' ? 'pii' : 'secret' };\n}\n\nfunction verificationShape(parsed: ReturnType<typeof parseForAuthoring>, changes: readonly NonNullable<QuickFixCandidate['change']>[] = []): string {\n // Compare every modeled member (including trigger data), ignoring only source locations. A recipe\n // may replace only its original node; no other id or destination is normalized away.\n const replacements = new Map(changes.map(change => [change.node, change.replacement]));\n return JSON.stringify([parsed.value, parsed.triggerData], (key, value: unknown) => ['location', 'usesLocation', 'targetLocation'].includes(key) ? undefined : replacements.get(value as NonNullable<QuickFixCandidate['change']>['node']) ?? value);\n}\n\n// One forward pass; applying N edits by repeatedly slicing the document would be quadratic.\nexport function applyQuickFixEdits(source: string, edits: readonly QuickFixEdit[]): string | undefined {\n const parts: string[] = [];\n let end = 0;\n for (const edit of edits) {\n if (edit.start < end || edit.start < 0 || edit.length < 0 || edit.start + edit.length > source.length) return undefined;\n parts.push(source.slice(end, edit.start), edit.text);\n end = edit.start + edit.length;\n }\n parts.push(source.slice(end));\n return parts.join('');\n}\n"],"mappings":"6lBAsCA,SAAgB,qBAAqB,EAA+B,CAChE,OAAOA,IAASC,EAAgB,iCAAmCD,IAASC,EAAgB,2BAA6BD,IAASC,EAAgB,sBAAwBD,IAASC,EAAgB,wBAA0BD,IAASC,EAAgB,kBAAoBD,IAASC,E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AOH,IAASF,EAAS,IAAA,GAAY,CAAE,MAAOO,EAAcV,EAAO,EAAE,CAAC,OAAQ,OAAQG,EAAO,OAAQ,MAAK,CAC9G,CACA,IAAMQ,EAAYV,EAAQ,8BAA8B,CAAC,CAAC,KAAKC,CAAG,EAClE,OAAOS,IAAc,KAAO,IAAA,GAAY,CAAE,MAAOD,EAAcC,EAAU,EAAE,CAAC,OAAQ,OAAQA,EAAU,EAAE,CAAC,OAAQ,KAAMA,EAAU,KAAO,OAAS,MAAQ,QAAS,CACtK,CAEA,SAAS,kBAAkB,EAA8C,EAA+D,CAAC,EAAW,CAGhJ,IAAMC,EAAe,IAAI,IAAInB,EAAQ,IAAI,GAAU,CAACX,EAAO,KAAMA,EAAO,WAAW,CAAC,CAAC,EACrF,OAAO,KAAK,UAAU,CAACxC,EAAO,MAAOA,EAAO,WAAW,GAAI,EAAK,IAAmB,CAAC,WAAY,eAAgB,gBAAgB,CAAC,CAAC,SAASuE,CAAG,EAAI,IAAA,GAAYD,EAAa,IAAIE,CAAyD,GAAKA,CAAK,CACtP,CAGA,SAAgB,mBAAmB,EAAgB,EAAoD,CACnG,IAAMC,EAAkB,CAAC,EACrBC,EAAM,EACV,IAAK,IAAM3D,KAAQkC,EAAO,CACtB,GAAIlC,EAAK,MAAQ2D,GAAO3D,EAAK,MAAQ,GAAKA,EAAK,OAAS,GAAKA,EAAK,MAAQA,EAAK,OAASnB,EAAO,OAAQ,OACvG6E,EAAM,KAAK7E,EAAO,MAAM8E,EAAK3D,EAAK,KAAK,EAAGA,EAAK,IAAI,EACnD,EAAMA,EAAK,MAAQA,EAAK,MAC5B,CAEA,OADA0D,EAAM,KAAK7E,EAAO,MAAM8E,CAAG,CAAC,EACrBD,EAAM,KAAK,EAAE,CACxB"}
|
|
1
|
+
{"version":3,"file":"QuickFixes.js","names":["code","DiagnosticCodes","diagnostic","line","original","parseForAuthoring","source","options","publicEventCodes","index","parsed","lines","splitLines","eventsByLine","slicesByLine","rulesByLine","ScreenplaySyntaxWalker","rule","event","slice","counts","byLine","duplicateByLine","duplicateVerdicts","events","edit","length","replacement","checkPortableMatchPattern","match","stringBodyPattern","spellings","quoted","character","indent","ending","candidates","direction","edited","candidate","originalCodes","fix","commentStart","declaration","spellingCodes","syntax","verified","rangeVerdicts","documentChecked","documentFixes","change","requests","duplicateLines","diagnosticCode","request","duplicates","number","selectedCodes","documents","edits","candidateSource","changes","remaining","removed","count","selected","occurrenceLine","occurrenceFix","raw","headerIndent","headerIndex","layout","hasRoot","header","pattern","suffix","seen","text","wire","complianceWireName","marker","token","startOffset","directive","replacements","key","value","parts","end"],"sources":["../../../../../../Compiler/Authoring/QuickFixes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Diagnostic } from '../Diagnostics/Diagnostic';\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { PlayPlacement } from '../Files/PlayPlacement';\nimport { checkPortableMatchPattern } from '../Parsing/checkPortableMatchPattern';\nimport { ValidationRuleSyntax } from '../Syntax/Commands';\nimport { stringBodyPattern } from '../Text/StringLiteral';\nimport { complianceWireName } from '../Parsing/ConceptComplianceParser';\nimport { commentStart, splitLines } from '../Parsing/SourceLineSplitter';\nimport { parseForAuthoring } from '../ScreenplayCompiler';\nimport { EventSyntax } from '../Syntax/Declarations';\nimport { SliceSyntax } from '../Syntax/Structure';\nimport { TranslationDirection } from '../Syntax/TranslationDirection';\nimport { ScreenplaySyntaxWalker } from '../Syntax/ScreenplaySyntaxWalker';\nimport { pattern } from '../Text/patterns';\nimport { QuickFixCandidate } from './QuickFixCandidate';\n\nexport interface QuickFixEdit {\n readonly start: number;\n readonly length: number;\n readonly text: string;\n}\n\nexport interface QuickFix {\n readonly diagnosticCode: string;\n readonly title: string;\n readonly scope: 'occurrence' | 'document';\n readonly edits: readonly QuickFixEdit[];\n}\n\nexport interface QuickFixOptions {\n readonly line?: number;\n readonly placement?: PlayPlacement;\n readonly diagnosticCode?: string;\n}\n\nexport function isQuickFixDiagnostic(code: unknown): code is string {\n return code === DiagnosticCodes.DeprecatedStudioTextRulePattern || code === DiagnosticCodes.DuplicateComplianceMarker || code === DiagnosticCodes.LegacyOptionalSuffix || code === DiagnosticCodes.LegacyComplianceMarker || code === DiagnosticCodes.RedundantEventId || code === DiagnosticCodes.PublicTranslationRequiresDirection || code === DiagnosticCodes.LegacyProfileLayout;\n}\n\n// Diagnostics point at the complete type, not at the suffix. Never derive edits from message text.\nexport function legacyOptionalTypeLength(line: string, diagnostic: Diagnostic): number {\n if (diagnostic.code !== DiagnosticCodes.LegacyOptionalSuffix) return 0;\n return /^[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}.]+(?:\\[\\])?\\?/u.exec(line.slice(diagnostic.location.column - 1))?.[0].length ?? 0;\n}\n\nexport function findQuickFixes(source: string, options: QuickFixOptions = {}): QuickFix[] {\n return prepareQuickFixes(source, options)(options.line, options.diagnosticCode);\n}\n\n// One immutable buffer version owns the analysis and document verdict. Cursor moves reuse them;\n// single-occurrence verdicts have a bounded cache. Range requests verify the independent recipes\n// together once per version, rather than reparsing N times for N intersecting markers.\nexport function prepareQuickFixes(source: string, options: Pick<QuickFixOptions, 'placement'> = {}): (line?: number | readonly { line: number; diagnosticCode: string }[], diagnosticCode?: string) => QuickFix[] {\n const original = parseForAuthoring(source, undefined, options.placement);\n // PLAY0614 and the public-event boundary errors that follow from a missing direction are errors the repair itself removes,\n // so a document whose only errors are public-event boundary errors stays repairable.\n const publicEventCodes: ReadonlySet<string> = new Set(Array.from({ length: 14 }, (_, index) => `PLAY0${607 + index}`));\n const acceptable = (parsed: ReturnType<typeof parseForAuthoring>): boolean => parsed.success || parsed.diagnostics.every(diagnostic => diagnostic.severity !== 'error' || publicEventCodes.has(diagnostic.code));\n const errorCodes = (parsed: ReturnType<typeof parseForAuthoring>): Set<string> => new Set(parsed.diagnostics.filter(diagnostic => diagnostic.severity === 'error').map(diagnostic => diagnostic.code));\n if (!acceptable(original)) return () => [];\n const lines = splitLines(source);\n const eventsByLine = new Map<number, EventSyntax>();\n const slicesByLine = new Map<number, SliceSyntax>();\n const rulesByLine = new Map<number, ValidationRuleSyntax>();\n // Index inline and standalone declarations once, without scanning the tree per diagnostic.\n const walker = new class extends ScreenplaySyntaxWalker {\n override visitValidationRule(rule: ValidationRuleSyntax): void { rulesByLine.set(rule.location.line, rule); super.visitValidationRule(rule); }\n override visitEvent(event: EventSyntax): void { eventsByLine.set(event.location.line, event); }\n override visitSlice(slice: SliceSyntax): void { slicesByLine.set(slice.location.line, slice); super.visitSlice(slice); }\n }();\n walker.visitApplication(original.value);\n const counts = new Map<string, number>();\n const byLine = new Map<number, QuickFixCandidate>();\n // Duplicate removal and legacy spelling can share a header. Keep their independently verified recipes separate.\n const duplicateByLine = new Map<number, QuickFix>();\n const duplicateVerdicts = new Map<number, QuickFix | undefined>();\n const events = new Map<number, EventSyntax>();\n let event: EventSyntax | undefined;\n for (const line of lines) {\n event = eventsByLine.get(line.number) ?? event;\n if (event !== undefined) events.set(line.number, event);\n }\n for (const diagnostic of original.diagnostics) {\n counts.set(diagnostic.code, (counts.get(diagnostic.code) ?? 0) + 1);\n const line = lines[diagnostic.location.line - 1];\n if (diagnostic.code === DiagnosticCodes.DuplicateComplianceMarker) {\n const edit = duplicateComplianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) duplicateByLine.set(line.number, { diagnosticCode: diagnostic.code, title: 'Remove duplicate compliance markers', scope: 'occurrence', edits: [edit] });\n }\n const length = legacyOptionalTypeLength(line.raw, diagnostic);\n if (length > 0) {\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: \"Use 'optional' instead of '?'\", scope: 'occurrence', edits: [{ start: line.startOffset + diagnostic.location.column + length - 2, length: 1, text: ' optional' }] } });\n } else if (diagnostic.code === DiagnosticCodes.DeprecatedStudioTextRulePattern) {\n const rule = rulesByLine.get(line.number);\n if (rule?.rule !== 'Matches' || rule.value?.kind !== 'LiteralExpressionSyntax' || typeof rule.value.value !== 'string') continue;\n const replacement = checkPortableMatchPattern(rule.value.value).replacement;\n const match = new RegExp(`\\\\bmatches\\\\s+\"${stringBodyPattern}\"`).exec(line.raw);\n if (replacement === undefined || match === null) continue;\n const spellings = { Equal: '==', NotEqual: '!=', Contains: 'contains', NotContains: 'not contains', StartsWith: 'starts with', EndsWith: 'ends with' };\n const quoted = '\"' + replacement.value.replace(/[\"\\\\\\n\\r\\t]/g, character => JSON.stringify(character).slice(1, -1)) + '\"';\n byLine.set(line.number, { line: line.number,\n fix: { diagnosticCode: diagnostic.code, title: 'Use the equivalent ordinal text rule', scope: 'occurrence', edits: [{ start: line.startOffset + match.index, length: match[0].length, text: spellings[replacement.kind] + ' ' + quoted }] },\n change: { node: rule, replacement: { ...rule, rule: replacement.kind, value: { ...rule.value, value: replacement.value } } as ValidationRuleSyntax } });\n } else if (diagnostic.code === DiagnosticCodes.LegacyComplianceMarker) {\n const edit = complianceMarkerEdit(line.raw, line.startOffset);\n if (edit !== undefined) byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Use bare pii and secret compliance markers', scope: 'occurrence', edits: [edit] } });\n } else if (diagnostic.code === DiagnosticCodes.PublicTranslationRequiresDirection) {\n // PLAY0614 is only reported on the declaration line of a Translate slice that has no direction.\n const slice = slicesByLine.get(line.number)!;\n // Offer a direction only when exactly one is consistent with the slice: the other would add errors.\n const indent = /^\\s*/.exec(line.raw)![0];\n const ending = source.includes('\\r\\n') ? '\\r\\n' : '\\n';\n const candidates = [TranslationDirection.Inbound, TranslationDirection.Outbound].map(direction => ({ direction, text: `${ending}${indent} direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}` }))\n .filter(candidate => {\n // The insertion point is the end of an existing line, so the edit is always in bounds.\n const edited = applyQuickFixEdits(source, [{ start: line.startOffset + line.raw.length, length: 0, text: candidate.text }])!;\n const parsed = parseForAuthoring(edited, undefined, options.placement);\n const originalCodes = errorCodes(original);\n // Valid when the missing-direction error is gone and the direction introduces no kind of error the document lacked.\n return acceptable(parsed) && ![...errorCodes(parsed)].some(code => code === DiagnosticCodes.PublicTranslationRequiresDirection || !originalCodes.has(code));\n });\n if (candidates.length === 1) {\n const [{ direction, text }] = candidates;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: `Declare 'direction ${direction === TranslationDirection.Inbound ? 'inbound' : 'outbound'}'`, scope: 'occurrence', edits: [{ start: line.startOffset + line.raw.length, length: 0, text }] },\n change: { node: slice, replacement: { ...slice, direction } as SliceSyntax } });\n }\n } else if (diagnostic.code === DiagnosticCodes.LegacyProfileLayout) {\n const fix = legacyProfileLayoutFix(lines, line.number - 1, diagnostic.code);\n if (fix !== undefined) byLine.set(line.number, { line: line.number, fix });\n } else if (diagnostic.code === DiagnosticCodes.RedundantEventId && commentStart(line.raw) < 0) {\n const declaration = events.get(line.number);\n if (declaration?.id !== declaration?.name || declaration === undefined) continue;\n byLine.set(line.number, { line: line.number, fix: { diagnosticCode: diagnostic.code, title: 'Remove the redundant event id', scope: 'occurrence', edits: [{ start: line.startOffset, length: (lines[line.number]?.startOffset ?? source.length) - line.startOffset, text: '' }] },\n change: { node: declaration, replacement: { ...declaration, id: null } as EventSyntax } });\n }\n }\n const spellingCodes = [DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.LegacyComplianceMarker];\n const syntax = verificationShape(original);\n const verified = new Map<number, QuickFix | undefined>();\n let rangeVerdicts: Map<number, QuickFix> | undefined;\n const documentChecked = new Set<string>();\n const documentFixes = new Map<string, QuickFix>();\n const verify = (fix: QuickFix, change?: QuickFixCandidate['change']): QuickFix | undefined => {\n const candidate = applyQuickFixEdits(source, fix.edits);\n if (candidate === undefined) return undefined;\n const parsed = parseForAuthoring(candidate, undefined, options.placement);\n if (!acceptable(parsed) || verificationShape(parsed) !== (change === undefined ? syntax : verificationShape(original, [change]))) return undefined;\n return parsed.diagnostics.filter(diagnostic => diagnostic.code === fix.diagnosticCode).length === (counts.get(fix.diagnosticCode) ?? 0) - fix.edits.length ? fix : undefined;\n };\n return (line, diagnosticCode) => {\n const requests = typeof line === 'number' || line === undefined ? undefined : line;\n const duplicateLines = requests === undefined\n ? typeof line === 'number' && (diagnosticCode === undefined || diagnosticCode === DiagnosticCodes.DuplicateComplianceMarker) ? [line] : []\n : requests.filter(request => request.diagnosticCode === DiagnosticCodes.DuplicateComplianceMarker).map(request => request.line);\n const duplicates = [...new Set(duplicateLines)].flatMap(number => {\n const fix = duplicateByLine.get(number);\n if (fix === undefined) return [];\n if (!duplicateVerdicts.has(number)) duplicateVerdicts.set(number, verify(fix));\n const verified = duplicateVerdicts.get(number);\n return verified === undefined ? [] : [verified];\n });\n const selectedCodes = spellingCodes.filter(code => requests === undefined ? diagnosticCode === undefined || diagnosticCode === code : requests.some(request => request.diagnosticCode === code));\n for (const code of selectedCodes.filter(code => !documentChecked.has(code))) {\n const candidates = [...byLine.values()].filter(candidate => candidate.fix.diagnosticCode === code);\n if (candidates.length > 0) {\n const fix = verify({ diagnosticCode: code, title: code === DiagnosticCodes.LegacyOptionalSuffix ? \"Use 'optional' throughout this document\" : 'Use bare pii and secret throughout this document', scope: 'document', edits: candidates.flatMap(candidate => candidate.fix.edits) });\n if (fix !== undefined) documentFixes.set(code, fix);\n }\n documentChecked.add(code);\n }\n const documents = selectedCodes.flatMap(code => documentFixes.has(code) ? [documentFixes.get(code)!] : []);\n if (requests !== undefined) {\n if (rangeVerdicts === undefined) {\n rangeVerdicts = new Map();\n // Source order gives ordered, non-overlapping edits without sorting. Recipes replace\n // distinct nodes/lines; the batch must preserve every other modeled member and remove\n // exactly the expected diagnostics before any of its occurrence edits can be offered.\n const candidates = lines.flatMap(line => byLine.has(line.number) ? [byLine.get(line.number)!] : []);\n const edits = candidates.flatMap(candidate => candidate.fix.edits);\n const candidateSource = applyQuickFixEdits(source, edits);\n if (edits.length > 0 && candidateSource !== undefined) {\n const parsed = parseForAuthoring(candidateSource, undefined, options.placement);\n const changes = candidates.flatMap(candidate => candidate.change === undefined ? [] : [candidate.change]);\n if (acceptable(parsed) && verificationShape(parsed) === verificationShape(original, changes)) {\n const remaining = new Map<string, number>();\n const removed = new Map<string, number>();\n for (const diagnostic of parsed.diagnostics) remaining.set(diagnostic.code, (remaining.get(diagnostic.code) ?? 0) + 1);\n for (const candidate of candidates) removed.set(candidate.fix.diagnosticCode, (removed.get(candidate.fix.diagnosticCode) ?? 0) + candidate.fix.edits.length);\n if ([...removed].every(([code, count]) => (remaining.get(code) ?? 0) === (counts.get(code) ?? 0) - count)) {\n for (const candidate of candidates) rangeVerdicts.set(candidate.line, candidate.fix);\n }\n }\n }\n }\n const selected = new Map<number, QuickFix>();\n for (const request of requests) {\n const fix = rangeVerdicts.get(request.line);\n if (fix?.diagnosticCode === request.diagnosticCode) selected.set(request.line, fix);\n }\n return [...selected.values(), ...duplicates, ...documents];\n }\n const occurrenceLine = typeof line === 'number' ? line : undefined;\n const selected = occurrenceLine === undefined ? undefined : byLine.get(occurrenceLine);\n let occurrenceFix: QuickFix | undefined;\n if (selected !== undefined && occurrenceLine !== undefined && (diagnosticCode === undefined || selected.fix.diagnosticCode === diagnosticCode)) {\n if (!verified.has(occurrenceLine)) {\n if (verified.size === 32) verified.delete(verified.keys().next().value!);\n verified.set(occurrenceLine, verify(selected.fix, selected.change));\n }\n occurrenceFix = verified.get(occurrenceLine);\n }\n return [...(occurrenceFix === undefined ? [] : [occurrenceFix]), ...duplicates, ...documents];\n };\n}\n\n// PLAY0791 is reported on the `ui profile` line. The canonical form is `root template <Name>`; beside a root template the legacy line is ignored, so it is removed.\nfunction legacyProfileLayoutFix(lines: readonly { readonly number: number; readonly raw: string; readonly startOffset: number }[], headerIndex: number, diagnosticCode: string): QuickFix | undefined {\n const indentOf = (raw: string): number => /^\\s*/.exec(raw)![0].length;\n const headerIndent = indentOf(lines[headerIndex].raw);\n let layout: { readonly index: number; readonly indent: number } | undefined;\n let hasRoot = false;\n for (let index = headerIndex + 1; index < lines.length; index++) {\n const raw = lines[index].raw;\n if (raw.trim().length === 0) continue;\n if (indentOf(raw) <= headerIndent) break;\n if (layout === undefined && /^\\s*layout\\s+[A-Za-z_]\\w*\\s*$/.test(raw)) layout = { index, indent: indentOf(raw) };\n if (/^\\s*root\\s+template(\\s|$)/.test(raw)) hasRoot = true;\n }\n if (layout === undefined) return undefined;\n const line = lines[layout.index];\n return hasRoot\n ? { diagnosticCode, title: 'Remove the ignored layout line', scope: 'occurrence', edits: [{ start: line.startOffset, length: (lines[layout.index + 1]?.startOffset ?? line.startOffset + line.raw.length) - line.startOffset, text: '' }] }\n : { diagnosticCode, title: \"Use 'root template' instead of 'layout'\", scope: 'occurrence', edits: [{ start: line.startOffset + layout.indent, length: 'layout'.length, text: 'root template' }] };\n}\n\nfunction duplicateComplianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header === null) return undefined;\n const suffix = header[2];\n const seen = new Set<string>();\n const text = suffix.replace(new RegExp(pattern('[^\\\\S\\\\r\\\\n]+(@?\\\\w+)').source, 'gu'), (token, marker: string) => {\n const wire = complianceWireName(marker);\n if (seen.has(wire)) return '';\n seen.add(wire);\n return token;\n });\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n}\n\nfunction complianceMarkerEdit(raw: string, startOffset: number): QuickFixEdit | undefined {\n // Restrict rewriting to the suffix or leading directive marker, never comments or quoted reasons.\n const header = pattern('^(\\\\s*concept\\\\s+\\\\w+\\\\s*:\\\\s*\\\\w+)((?:[^\\\\S\\\\r\\\\n]+@?\\\\w+)*)').exec(raw);\n if (header !== null) {\n const suffix = header[2];\n const text = suffix.replace(/@pii\\b|@?sensitive\\b/g, marker => marker === '@pii' ? 'pii' : 'secret');\n return text === suffix ? undefined : { start: startOffset + header[1].length, length: suffix.length, text };\n }\n const directive = pattern('^(\\\\s*)(@pii|@?sensitive)\\\\b').exec(raw);\n return directive === null ? undefined : { start: startOffset + directive[1].length, length: directive[2].length, text: directive[2] === '@pii' ? 'pii' : 'secret' };\n}\n\nfunction verificationShape(parsed: ReturnType<typeof parseForAuthoring>, changes: readonly NonNullable<QuickFixCandidate['change']>[] = []): string {\n // Compare every modeled member (including trigger data), ignoring only source locations. A recipe\n // may replace only its original node; no other id or destination is normalized away.\n const replacements = new Map(changes.map(change => [change.node, change.replacement]));\n return JSON.stringify([parsed.value, parsed.triggerData], (key, value: unknown) => ['location', 'usesLocation', 'targetLocation'].includes(key) ? undefined : replacements.get(value as NonNullable<QuickFixCandidate['change']>['node']) ?? value);\n}\n\n// One forward pass; applying N edits by repeatedly slicing the document would be quadratic.\nexport function applyQuickFixEdits(source: string, edits: readonly QuickFixEdit[]): string | undefined {\n const parts: string[] = [];\n let end = 0;\n for (const edit of edits) {\n if (edit.start < end || edit.start < 0 || edit.length < 0 || edit.start + edit.length > source.length) return undefined;\n parts.push(source.slice(end, edit.start), edit.text);\n end = edit.start + edit.length;\n }\n parts.push(source.slice(end));\n return parts.join('');\n}\n"],"mappings":"6lBAsCA,SAAgB,qBAAqB,EAA+B,CAChE,OAAOA,IAASC,EAAgB,iCAAmCD,IAASC,EAAgB,2BAA6BD,IAASC,EAAgB,sBAAwBD,IAASC,EAAgB,wBAA0BD,IAASC,EAAgB,kBAAoBD,IAASC,EAAgB,oCAAsCD,IAASC,EAAgB,mBACtW,CAGA,SAAgB,yBAAyB,EAAc,EAAgC,CAEnF,OADIC,EAAW,OAASD,EAAgB,qBACjC,2CAA2C,KAAKE,EAAK,MAAMD,EAAW,SAAS,OAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,QAAU,EAD7C,CAEzE,CASA,SAAgB,kBAAkB,EAAgB,EAA8C,CAAC,EAAiH,CAC9M,IAAME,EAAWC,EAAkBC,EAAQ,IAAA,GAAWC,EAAQ,SAAS,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C,EAAW,CAGhJ,IAAMC,EAAe,IAAI,IAAIvB,EAAQ,IAAI,GAAU,CAACX,EAAO,KAAMA,EAAO,WAAW,CAAC,CAAC,EACrF,OAAO,KAAK,UAAU,CAACxC,EAAO,MAAOA,EAAO,WAAW,GAAI,EAAK,IAAmB,CAAC,WAAY,eAAgB,gBAAgB,CAAC,CAAC,SAAS2E,CAAG,EAAI,IAAA,GAAYD,EAAa,IAAIE,CAAyD,GAAKA,CAAK,CACtP,CAGA,SAAgB,mBAAmB,EAAgB,EAAoD,CACnG,IAAMC,EAAkB,CAAC,EACrBC,EAAM,EACV,IAAK,IAAM/D,KAAQkC,EAAO,CACtB,GAAIlC,EAAK,MAAQ+D,GAAO/D,EAAK,MAAQ,GAAKA,EAAK,OAAS,GAAKA,EAAK,MAAQA,EAAK,OAASnB,EAAO,OAAQ,OACvGiF,EAAM,KAAKjF,EAAO,MAAMkF,EAAK/D,EAAK,KAAK,EAAGA,EAAK,IAAI,EACnD,EAAMA,EAAK,MAAQA,EAAK,MAC5B,CAEA,OADA8D,EAAM,KAAKjF,EAAO,MAAMkF,CAAG,CAAC,EACrBD,EAAM,KAAK,EAAE,CACxB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e={UnknownMatchPattern:`PLAY0366`,InvalidMatchPattern:`PLAY0367`,PatternOutsidePortableMatchDialect:`PLAY0699`,DeprecatedStudioTextRulePattern:`PLAY0787`,InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,CaptureEventsFromSeveralOrigins:`PLAY0687`,DirectionlessTranslationReactsToOwnCapture:`PLAY0694`,PendingIntentWithOtherHandler:`PLAY0698`,DescribedCommandNotImplemented:`PLAY0695`,DescribedCommandWithoutProductions:`PLAY0696`,DescribedCommandCardinalityNotAdmitted:`PLAY0697`,CaptureEventsKeyNotRequired:`PLAY0700`,CaptureEventsRecordFixture:`PLAY0701`,RefutedGeneratedConceptRule:`PLAY0688`,UnprovenGeneratedConceptRule:`PLAY0689`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,UnknownNavigationDestination:`PLAY0654`,UnknownScreenContributionPoint:`PLAY0655`,TemplateNestingCycle:`PLAY0656`,TemplateCategoryMissing:`PLAY0720`,InvalidTemplateVersionRange:`PLAY0721`,UnknownTemplateBlueprint:`PLAY0722`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,UnknownLayoutDirective:`PLAY0026`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,MismatchedSpecificationQueryResult:`PLAY0465`,UnknownSpecificationQueryArgument:`PLAY0468`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`,InvalidReadModelKey:`PLAY0660`,IncompleteReadModelKey:`PLAY0661`,InvalidReadModelKeyLookup:`PLAY0662`,ProductionRouteOutsideCommand:`PLAY0663`,RedundantProductionRoute:`PLAY0664`,InvalidObserverFilter:`PLAY0665`,ObserverFilterExcludesEveryProducer:`PLAY0666`,ReducerIdentityMismatch:`PLAY0690`,InvalidReactionBatchesDeclaration:`PLAY0693`,InvalidCommandReadsDeclaration:`PLAY0780`,GenerationSupportBudgetExceeded:`PLAY0691`,EmptyGenerationSupport:`PLAY0692`,MixedEnumerationNumbering:`PLAY0667`,DuplicateEnumerationNumber:`PLAY0668`,EnumerationNumberOutsideInt32:`PLAY0669`,MalformedEnumerationNumber:`PLAY0670`,UnpinnedStoredEnumeration:`PLAY0671`,ReadsWithChildren:`PLAY0451`,UnknownGenerationStrategy:`PLAY0672`,InvalidGenerationArgument:`PLAY0673`,InvalidGenerationModifier:`PLAY0674`,DuplicateGenerationModifier:`PLAY0675`,DuplicateGeneration:`PLAY0676`,InvalidGenerationPrimitive:`PLAY0677`,InvalidGenerationPrefix:`PLAY0678`,InvalidGenerationAlphabet:`PLAY0679`,InvalidTypeIdPrefix:`PLAY0680`,GenerationSizeOutsideRange:`PLAY0681`,ReservedSequenceGeneration:`PLAY0682`,LowGenerationEntropy:`PLAY0683`,LowGeneratedIdentifierEntropy:`PLAY0684`,ResponseNameUsedOnFailure:`PLAY0685`,EventIdPinNotCarriedToRenderers:`PLAY0686`,InvalidToolbarButton:`PLAY0760`};export{e as DiagnosticCodes};
|
|
1
|
+
const e={UnknownMatchPattern:`PLAY0366`,InvalidMatchPattern:`PLAY0367`,PatternOutsidePortableMatchDialect:`PLAY0699`,DeprecatedStudioTextRulePattern:`PLAY0787`,InvalidIdentityDeclaration:`PLAY0633`,DuplicateIdentity:`PLAY0634`,InvalidIdentityDetail:`PLAY0635`,UnknownIdentitySource:`PLAY0636`,IdentityDetailWithoutSource:`PLAY0637`,IdentitySourceWithBody:`PLAY0638`,DuplicateIdentityDetail:`PLAY0639`,BuiltInIdentityDetail:`PLAY0640`,UnknownIdentityQuery:`PLAY0641`,InvalidIdentityQuery:`PLAY0642`,IdentityQueryWithoutKey:`PLAY0643`,InvalidIdentityQueryKey:`PLAY0644`,IdentityQueryAuthorizationDependency:`PLAY0645`,IdentityQueryTypeMismatch:`PLAY0646`,InvalidReactionIdentity:`PLAY0647`,GatedInvocationWithoutIdentity:`PLAY0648`,UnusedReactionIdentity:`PLAY0649`,UnusedReactionRole:`PLAY0650`,UnsatisfiedReactionIdentity:`PLAY0651`,ReactionPrivilegeEscalation:`PLAY0652`,CommandProducesPublicEvent:`PLAY0607`,PublicEventRequiresOutboundTranslation:`PLAY0608`,OutboundPublicEventCount:`PLAY0609`,ForeignPublicEventConsumer:`PLAY0610`,OutboundTranslationInput:`PLAY0611`,InboundTranslationOutput:`PLAY0612`,ForeignPublicEventProduced:`PLAY0613`,PublicTranslationRequiresDirection:`PLAY0614`,TranslationConstructDirection:`PLAY0615`,InboundTranslationInput:`PLAY0616`,OutboundTranslationOutput:`PLAY0617`,EventTargetOutsideOutboundTranslation:`PLAY0618`,EventsSourceOutsideInboundTranslation:`PLAY0619`,InvalidCaptureEventsSource:`PLAY0620`,CaptureEventsFromSeveralOrigins:`PLAY0687`,DirectionlessTranslationReactsToOwnCapture:`PLAY0694`,PendingIntentWithOtherHandler:`PLAY0698`,DescribedCommandNotImplemented:`PLAY0695`,DescribedCommandWithoutProductions:`PLAY0696`,DescribedCommandCardinalityNotAdmitted:`PLAY0697`,CaptureEventsKeyNotRequired:`PLAY0700`,CaptureEventsRecordFixture:`PLAY0701`,RefutedGeneratedConceptRule:`PLAY0688`,UnprovenGeneratedConceptRule:`PLAY0689`,InvalidExposureDeclaration:`PLAY0621`,UnknownExposureOwner:`PLAY0622`,ReExposureCycle:`PLAY0623`,ReExposureBroken:`PLAY0624`,InvalidInstanceContribution:`PLAY0625`,UnknownContributionInstance:`PLAY0626`,ContributionNotExposed:`PLAY0627`,ContributionTypeMismatch:`PLAY0628`,UnknownTemplateContentSlot:`PLAY0629`,UnknownNavigationOutlet:`PLAY0630`,TemplateScopeMismatch:`PLAY0631`,IncompatibleComponentPackage:`PLAY0632`,UnknownNavigationDestination:`PLAY0654`,UnknownScreenContributionPoint:`PLAY0655`,TemplateNestingCycle:`PLAY0656`,TemplateCategoryMissing:`PLAY0720`,InvalidTemplateVersionRange:`PLAY0721`,LegacyProfileLayout:`PLAY0791`,UnknownTemplateBlueprint:`PLAY0722`,DuplicateComplianceMarker:`PLAY0653`,LegacyComplianceMarker:`PLAY0565`,UnknownComplianceMarker:`PLAY0566`,InvalidSecretScope:`PLAY0567`,DuplicateSecretScope:`PLAY0568`,SecretScopeIgnoredForPii:`PLAY0569`,InvalidPersonalDataQualifier:`PLAY0570`,DuplicateSpecialCategory:`PLAY0571`,InvalidPurposeDeclaration:`PLAY0596`,InvalidPurposeVocabulary:`PLAY0597`,DuplicatePurposeField:`PLAY0598`,DuplicatePurposeDeclaration:`PLAY0599`,UnknownPurpose:`PLAY0600`,PurposeInterestMismatch:`PLAY0601`,PersonalDataWithoutPurpose:`PLAY0602`,SpecialDataWithoutCondition:`PLAY0603`,CriminalDataWithoutAuthorization:`PLAY0604`,PurposeWithoutBasis:`PLAY0605`,UnusedPurpose:`PLAY0606`,ConflictingScreenDataBinding:`PLAY0530`,ScreenDataQueryMismatch:`PLAY0531`,ActionWithoutInputSurface:`PLAY0532`,CommandWithoutInputSurface:`PLAY0533`,ReadModelFieldWithoutOrigin:`PLAY0534`,QueryParameterNotHeldByView:`PLAY0535`,UnconsumedEvent:`PLAY0536`,UnreachableScreen:`PLAY0537`,UnknownActionSubjectField:`PLAY0345`,UnresolvedActionSubject:`PLAY0346`,UnreachableActionAlternative:`PLAY0347`,UnknownActionArgumentProperty:`PLAY0348`,UnreachableRefusalBranch:`PLAY0540`,InvalidRefusalValue:`PLAY0541`,UnknownRefusalConstraint:`PLAY0542`,UnknownRedeliveryReaction:`PLAY0544`,IndeterminateNegatedClaimTarget:`PLAY0546`,InvalidRefusalBranch:`PLAY0538`,InvalidRefusalBranchBody:`PLAY0539`,UnmatchedRedeliveredOccurrence:`PLAY0543`,InvalidNoEventsExpectation:`PLAY0545`,InvalidProducesDeclaration:`PLAY0042`,ProducesWhenWithoutEvent:`PLAY0043`,InvalidPropertyMapping:`PLAY0044`,DuplicateProducesTarget:`PLAY0193`,EventSourceIdInPayload:`PLAY0469`,ExplicitProducesTargetsRequired:`PLAY0470`,RedundantEventId:`PLAY0471`,InvalidEventId:`PLAY0472`,InlineEventCollision:`PLAY0473`,InlineEventOutsideCommand:`PLAY0474`,InlineEventGeneration:`PLAY0475`,ReservedProductionMetadata:`PLAY0476`,InvalidEventDocumentation:`PLAY0477`,OmittedProductionDestination:`PLAY0478`,UnknownConstraintProperty:`PLAY0391`,UnknownTopLevelConstruct:`PLAY0001`,InvalidDomainDeclaration:`PLAY0002`,DuplicateDomain:`PLAY0003`,DomainNotFirst:`PLAY0004`,InvalidImportDeclaration:`PLAY0005`,TabIndentation:`PLAY0006`,InvalidConceptDeclaration:`PLAY0007`,UnknownPrimitiveType:`PLAY0008`,InvalidEnumerationValue:`PLAY0009`,UnknownConceptDirective:`PLAY0010`,ValidateReadAsEnumerationBlock:`PLAY0011`,AttributeReasonWithoutAttribute:`PLAY0012`,DuplicateAttributeReason:`PLAY0013`,InvalidTypeDeclaration:`PLAY0014`,TypeWithoutProperties:`PLAY0015`,InvalidPropertyDeclaration:`PLAY0016`,IdentifierOutsideCommand:`PLAY0017`,InvalidEventDeclaration:`PLAY0018`,IdentifierOnEventProperty:`PLAY0019`,TagPropertyReadAsTag:`PLAY0020`,InvalidModuleDeclaration:`PLAY0021`,UnknownModuleDirective:`PLAY0022`,InvalidFeatureDeclaration:`PLAY0023`,UnknownFeatureDirective:`PLAY0024`,InvalidSliceDeclaration:`PLAY0027`,UnknownSliceType:`PLAY0028`,UnknownSliceDirective:`PLAY0029`,InvalidPersonaDeclaration:`PLAY0030`,InvalidPersonaPolicyReference:`PLAY0031`,UnknownPersonaDirective:`PLAY0032`,InvalidCommandDeclaration:`PLAY0033`,UnknownCommandDirective:`PLAY0034`,DuplicateCommandIdentifier:`PLAY0036`,InvalidQueryDeclaration:`PLAY0047`,UnknownQueryDirective:`PLAY0048`,InvalidQueryParameter:`PLAY0049`,InvalidProjectionDeclaration:`PLAY0056`,EmptyProjection:`PLAY0057`,UnknownProjectionDirective:`PLAY0058`,FromWithoutEvent:`PLAY0061`,InvalidEventReference:`PLAY0062`,InvalidJoinDeclaration:`PLAY0063`,JoinWithoutEvent:`PLAY0064`,InvalidChildrenDeclaration:`PLAY0065`,InvalidNestedDeclaration:`PLAY0066`,NestedBlockWithoutFrom:`PLAY0067`,InvalidRemoveDeclaration:`PLAY0068`,UnknownRemoveDirective:`PLAY0069`,InvalidClearDeclaration:`PLAY0070`,ClearWithOutsideNestedBlock:`PLAY0071`,InvalidSpecificationDeclaration:`PLAY0094`,UnknownSpecificationDirective:`PLAY0095`,InvalidSpecificationWhen:`PLAY0096`,DuplicateSpecificationWhen:`PLAY0097`,InvalidThenError:`PLAY0098`,InvalidReadModelStep:`PLAY0099`,InvalidEventStep:`PLAY0100`,InvalidSpecificationValue:`PLAY0101`,InvalidScreenDeclaration:`PLAY0102`,UnknownScreenDirective:`PLAY0103`,InvalidDataDirective:`PLAY0104`,InvalidActionDirective:`PLAY0105`,UnknownActionDirective:`PLAY0106`,InvalidNavigation:`PLAY0107`,InvalidScreenLayoutSlot:`PLAY0108`,UnknownLayoutDirective:`PLAY0026`,InvalidTitleDirective:`PLAY0109`,UnknownTableDirective:`PLAY0110`,UnknownSummaryDirective:`PLAY0111`,AuthorizeWithoutPolicy:`PLAY0122`,InvalidPolicyReference:`PLAY0123`,InvalidConstraintDeclaration:`PLAY0132`,ConstraintWithoutRule:`PLAY0133`,InvalidConstraintBody:`PLAY0134`,DuplicateConstraintBody:`PLAY0135`,InvalidReactionDeclaration:`PLAY0136`,InvalidReactionTrigger:`PLAY0137`,ReactionWithoutTrigger:`PLAY0138`,InvalidValidateDeclaration:`PLAY0140`,InvalidValidationRule:`PLAY0141`,InvalidRuleName:`PLAY0143`,UnknownRuleImplementationDirective:`PLAY0144`,InvalidDescription:`PLAY0145`,EmptyDescription:`PLAY0146`,DuplicateDescription:`PLAY0147`,TagWithoutValue:`PLAY0148`,InvalidTagValue:`PLAY0149`,UnknownContextPath:`PLAY0153`,UnknownContextCausedByProperty:`PLAY0154`,UnknownContextIdentityProperty:`PLAY0155`,ExpectedCodeFence:`PLAY0163`,UnclosedCodeBlock:`PLAY0164`,DuplicateDeclaration:`PLAY0168`,RepeatedSingularDeclarationAcrossFiles:`PLAY0172`,RepeatedDeclarationAcrossFiles:`PLAY0173`,ConflictingDescriptionAcrossFiles:`PLAY0174`,UnexpectedTokenInAuthorize:`PLAY0184`,UnclosedAuthorizeGroup:`PLAY0185`,InvalidReadModelDeclaration:`PLAY0186`,InvalidInvokesDeclaration:`PLAY0194`,InvalidScopeDeclaration:`PLAY0199`,DuplicateScope:`PLAY0200`,InvalidIntervalTrigger:`PLAY0249`,InvalidScheduleTrigger:`PLAY0250`,DuplicateReactionTrigger:`PLAY0253`,InvalidSpecificationEventSource:`PLAY0275`,DuplicateSpecificationEventSource:`PLAY0276`,InvalidProjectionVariantDeclaration:`PLAY0277`,InvalidEntersOnDeclaration:`PLAY0279`,NestedProjectionVariantNotAllowed:`PLAY0280`,InvalidStructuredValue:`PLAY0291`,DuplicateStructuredValueMember:`PLAY0294`,ConflictingSpecificationActions:`PLAY0358`,InvalidSpecificationEventOrder:`PLAY0359`,InvalidValidationSeverity:`PLAY0368`,VariantRequiresEnteringEvent:`PLAY0382`,DuplicateProjectionVariant:`PLAY0384`,DuplicateVariantEnteringEvent:`PLAY0385`,InvalidSpecificationDenied:`PLAY0388`,DuplicateAuthorizationAcrossFiles:`PLAY0394`,FileConstraintOnlySupportsUniqueness:`PLAY0396`,LegacyInlineCodeFence:`PLAY0397`,InvalidEventGeneration:`PLAY0446`,InvalidFileImport:`PLAY0454`,FileImportMatchesNothing:`PLAY0455`,ImportedFileNotFound:`PLAY0456`,ConflictingImportPlacement:`PLAY0457`,ImportCycle:`PLAY0458`,ModuleInPlacedFile:`PLAY0459`,UnexpectedInPlacedFile:`PLAY0460`,InvalidSpecificationClock:`PLAY0461`,InvalidSpecificationTrigger:`PLAY0462`,InvalidSpecificationCapture:`PLAY0463`,InvalidSpecificationQueryAction:`PLAY0464`,MismatchedSpecificationQueryResult:`PLAY0465`,UnknownSpecificationQueryArgument:`PLAY0468`,InvalidSpecificationQuery:`PLAY0265`,UnknownSpecificationQueryDirective:`PLAY0266`,DuplicateSpecificationQueryArguments:`PLAY0267`,InvalidAbsentReadModelStep:`PLAY0453`,LegacyOptionalSuffix:`PLAY0479`,InvalidOptionalModifierOrder:`PLAY0480`,OptionalReadsNotSupported:`PLAY0481`,InvalidSpecificationCaller:`PLAY0386`,DuplicateSpecificationCallerOrDenied:`PLAY0387`,GeneratedPropertyOutsideCommand:`PLAY0482`,InvalidGeneratedType:`PLAY0483`,InvalidGeneratedModifierOrder:`PLAY0484`,DuplicateEventSubject:`PLAY0590`,InvalidSubjectType:`PLAY0591`,ProtectedSubjectType:`PLAY0592`,InvalidSubjectOwner:`PLAY0593`,ReadModelSubjectNotSupported:`PLAY0594`,InvalidSubjectModifierOrder:`PLAY0595`,GeneratedPropertySuppliedAsInput:`PLAY0485`,InvalidCommandResponse:`PLAY0486`,InvalidResponseSource:`PLAY0487`,DuplicateResponseField:`PLAY0488`,InvalidResponseShape:`PLAY0489`,InvalidGeneratedFixture:`PLAY0490`,InvalidReturnExpectation:`PLAY0491`,InvalidImplementationBlock:`PLAY0492`,InvalidImplementationHint:`PLAY0493`,ConflictingImplementationSources:`PLAY0494`,UnknownType:`PLAY0165`,InvalidSystemDeclaration:`PLAY0495`,InvalidOperationDeclaration:`PLAY0496`,InvalidProductionReference:`PLAY0497`,ProductionDeclarationCollision:`PLAY0498`,OperationOutsideCommand:`PLAY0499`,InvalidSystemReference:`PLAY0500`,InvalidOperationMapping:`PLAY0501`,InvalidOperationSpecification:`PLAY0502`,InvalidCaptureDeclaration:`PLAY0078`,UnknownCaptureDirective:`PLAY0079`,InvalidMapEntry:`PLAY0080`,InvalidTranslation:`PLAY0081`,InvalidSplitDeclaration:`PLAY0082`,InvalidSplitTarget:`PLAY0083`,InvalidAppendDeclaration:`PLAY0084`,UnknownAppendDirective:`PLAY0085`,WhenWithoutTrigger:`PLAY0086`,InvalidWhenClause:`PLAY0087`,InvalidWhenTransitionClause:`PLAY0088`,MixedWhenCombinators:`PLAY0089`,WhenCombinatorWithoutProperty:`PLAY0090`,UnknownCaptureBlockDirective:`PLAY0091`,InvalidCompositeKeyPart:`PLAY0072`,TemplateInCompositeKey:`PLAY0073`,EmptyCompositeKey:`PLAY0074`,InvalidProjectionMapping:`PLAY0075`,ExpectedLiteralValue:`PLAY0150`,InvalidExpression:`PLAY0152`,UnterminatedInterpolation:`PLAY0157`,UnterminatedTemplateExpression:`PLAY0156`,ProjectionDocumentWithoutProjection:`PLAY0055`,CaptureDocumentWithoutCapture:`PLAY0077`,SpecificationDocumentWithoutSpecification:`PLAY0093`,InvalidSeedDeclaration:`PLAY0128`,InvalidSeedGroup:`PLAY0129`,InvalidSeedEvent:`PLAY0130`,InvalidSeedPropertyAssignment:`PLAY0131`,InvalidPolicyDeclaration:`PLAY0112`,UnknownPolicyDirective:`PLAY0113`,PolicyWithoutRequirement:`PLAY0114`,ExpectedRoleName:`PLAY0118`,ExpectedClaimName:`PLAY0119`,ExpectedClaimMatches:`PLAY0120`,ExpectedClaimMatchTarget:`PLAY0121`,MixedPolicyImplementation:`PLAY0440`,RepeatedPolicyRequirement:`PLAY0441`,UnexpectedTokenInPolicyCondition:`PLAY0115`,ExpectedPolicyCondition:`PLAY0116`,UnclosedPolicyConditionGroup:`PLAY0117`,UnexpectedTokenInCondition:`PLAY0158`,ExpectedCondition:`PLAY0159`,ExpectedComparisonOperator:`PLAY0161`,ExpectedComparisonValue:`PLAY0162`,InvalidActionAlternative:`PLAY0341`,GuardedActionWithoutAlternatives:`PLAY0342`,MisplacedActionOtherwise:`PLAY0343`,UnsupportedActionConditionOperand:`PLAY0344`,InvalidInteractionArgument:`PLAY0319`,UnclosedConditionGroup:`PLAY0160`,InvalidNumericDirective:`PLAY0508`,DuplicateNumericDirective:`PLAY0509`,LateNumericDirective:`PLAY0510`,InexactNumericLiteral:`PLAY0511`,MixedNumericModes:`PLAY0512`,IncompatibleNumericSource:`PLAY0513`,EventFromLaterSlice:`PLAY0516`,TimelineCycleGroup:`PLAY0517`,InvalidSpecificationExample:`PLAY0518`,DuplicateSpecificationAssignment:`PLAY0519`,UnresolvedSpecificationExampleType:`PLAY0520`,SpecificationExampleNameCollision:`PLAY0521`,SpecificationExampleKindMismatch:`PLAY0522`,InvalidSpecificationExampleValue:`PLAY0523`,MissingSpecificationProperty:`PLAY0524`,UnadmittedSpecificationExampleValue:`PLAY0525`,InvalidSpecificationExampleBody:`PLAY0526`,AmbiguousReference:`PLAY0198`,InvalidSpecificationStream:`PLAY0547`,SpecificationStreamOnCommand:`PLAY0548`,InvalidSpecificationStreamRoute:`PLAY0549`,InvalidSpecificationStreamEventSource:`PLAY0550`,SpecificationStreamContradictsCommand:`PLAY0551`,InvalidDependencyTarget:`PLAY0554`,RepeatedDependencyDeclaration:`PLAY0555`,UndeclaredDependency:`PLAY0552`,UnusedDependencyDeclaration:`PLAY0553`,MutualDependencyDeclarations:`PLAY0556`,AuthorizationRefusalWithoutIdentity:`PLAY0557`,InvalidDocumentation:`PLAY0558`,ConflictingDocumentationAcrossFiles:`PLAY0559`,InvalidSpecificationCallerPersona:`PLAY0572`,UnsynthesizablePersonaCaller:`PLAY0573`,PersonaWithoutGate:`PLAY0574`,GateWithoutPersona:`PLAY0575`,AmbiguousPersonaCaller:`PLAY0576`,InvalidSpecificationParameter:`PLAY0577`,InvalidSpecificationCase:`PLAY0578`,DuplicateSpecificationParameter:`PLAY0579`,DuplicateSpecificationCase:`PLAY0580`,IncompleteSpecificationTable:`PLAY0581`,InvalidSpecificationCaseAssignment:`PLAY0582`,InvalidSpecificationCaseValue:`PLAY0583`,InvalidSpecificationCaseReference:`PLAY0584`,OptionalSpecificationParameterTarget:`PLAY0585`,SpecificationCaseNameCollision:`PLAY0586`,IncompatibleSpecificationParameterType:`PLAY0587`,UnusedSpecificationParameter:`PLAY0588`,SingularSpecificationTableExpansion:`PLAY0589`,UnsupportedInteractionAlternatives:`PLAY0560`,MixedInteractionAlternatives:`PLAY0561`,InteractionAlternativeWithoutActions:`PLAY0562`,InlineInteractionAlternative:`PLAY0563`,LegacyInteractionWhere:`PLAY0564`,InvalidEventSourceDeclaration:`PLAY0503`,InvalidCommandStream:`PLAY0504`,AmbiguousCommandStream:`PLAY0505`,UnsupportedStreamIdType:`PLAY0506`,RedundantSourceStreamId:`PLAY0507`,UnknownEvent:`PLAY0166`,UnknownReadModelProperty:`PLAY0514`,PiiNotSupportedOnIdentifier:`PLAY0515`,HandlerWithoutImplementation:`PLAY0045`,UnknownHandlerDirective:`PLAY0046`,CommandWithProducesAndHandler:`PLAY0035`,AbsoluteFileReference:`PLAY0264`,InvalidTriggerData:`PLAY0246`,InvalidReadModelKey:`PLAY0660`,IncompleteReadModelKey:`PLAY0661`,InvalidReadModelKeyLookup:`PLAY0662`,ProductionRouteOutsideCommand:`PLAY0663`,RedundantProductionRoute:`PLAY0664`,InvalidObserverFilter:`PLAY0665`,ObserverFilterExcludesEveryProducer:`PLAY0666`,ReducerIdentityMismatch:`PLAY0690`,InvalidReactionBatchesDeclaration:`PLAY0693`,InvalidCommandReadsDeclaration:`PLAY0780`,GenerationSupportBudgetExceeded:`PLAY0691`,EmptyGenerationSupport:`PLAY0692`,MixedEnumerationNumbering:`PLAY0667`,DuplicateEnumerationNumber:`PLAY0668`,EnumerationNumberOutsideInt32:`PLAY0669`,MalformedEnumerationNumber:`PLAY0670`,UnpinnedStoredEnumeration:`PLAY0671`,ReadsWithChildren:`PLAY0451`,UnknownGenerationStrategy:`PLAY0672`,InvalidGenerationArgument:`PLAY0673`,InvalidGenerationModifier:`PLAY0674`,DuplicateGenerationModifier:`PLAY0675`,DuplicateGeneration:`PLAY0676`,InvalidGenerationPrimitive:`PLAY0677`,InvalidGenerationPrefix:`PLAY0678`,InvalidGenerationAlphabet:`PLAY0679`,InvalidTypeIdPrefix:`PLAY0680`,GenerationSizeOutsideRange:`PLAY0681`,ReservedSequenceGeneration:`PLAY0682`,LowGenerationEntropy:`PLAY0683`,LowGeneratedIdentifierEntropy:`PLAY0684`,ResponseNameUsedOnFailure:`PLAY0685`,EventIdPinNotCarriedToRenderers:`PLAY0686`,InvalidToolbarButton:`PLAY0760`};export{e as DiagnosticCodes};
|
|
2
2
|
//# sourceMappingURL=DiagnosticCodes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n UnknownMatchPattern: 'PLAY0366',\n InvalidMatchPattern: 'PLAY0367',\n PatternOutsidePortableMatchDialect: 'PLAY0699',\n DeprecatedStudioTextRulePattern: 'PLAY0787',\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n CaptureEventsFromSeveralOrigins: 'PLAY0687',\n DirectionlessTranslationReactsToOwnCapture: 'PLAY0694',\n PendingIntentWithOtherHandler: 'PLAY0698',\n DescribedCommandNotImplemented: 'PLAY0695', // C# only\n DescribedCommandWithoutProductions: 'PLAY0696', // C# only\n DescribedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n CaptureEventsKeyNotRequired: 'PLAY0700',\n CaptureEventsRecordFixture: 'PLAY0701',\n RefutedGeneratedConceptRule: 'PLAY0688',\n UnprovenGeneratedConceptRule: 'PLAY0689',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n UnknownNavigationDestination: 'PLAY0654',\n UnknownScreenContributionPoint: 'PLAY0655',\n TemplateNestingCycle: 'PLAY0656',\n TemplateCategoryMissing: 'PLAY0720', // C# only: template declarations are not modeled by this compiler.\n InvalidTemplateVersionRange: 'PLAY0721',\n UnknownTemplateBlueprint: 'PLAY0722', // C# only: ui profile packages are not modeled by this compiler.\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n UnknownLayoutDirective: 'PLAY0026',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n MismatchedSpecificationQueryResult: 'PLAY0465',\n UnknownSpecificationQueryArgument: 'PLAY0468',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n InvalidReadModelKey: 'PLAY0660',\n IncompleteReadModelKey: 'PLAY0661', // C# only: scoped read-model key resolution.\n InvalidReadModelKeyLookup: 'PLAY0662', // Shape checks shared; scoped lookup checks are C# only.\n ProductionRouteOutsideCommand: 'PLAY0663',\n RedundantProductionRoute: 'PLAY0664',\n InvalidObserverFilter: 'PLAY0665',\n ObserverFilterExcludesEveryProducer: 'PLAY0666', // C# only: statically known producer routes.\n ReducerIdentityMismatch: 'PLAY0690',\n InvalidReactionBatchesDeclaration: 'PLAY0693',\n InvalidCommandReadsDeclaration: 'PLAY0780',\n GenerationSupportBudgetExceeded: 'PLAY0691',\n EmptyGenerationSupport: 'PLAY0692', // C# only: conservative nominal producer identity comparison.\n MixedEnumerationNumbering: 'PLAY0667',\n DuplicateEnumerationNumber: 'PLAY0668',\n EnumerationNumberOutsideInt32: 'PLAY0669',\n MalformedEnumerationNumber: 'PLAY0670',\n UnpinnedStoredEnumeration: 'PLAY0671',\n ReadsWithChildren: 'PLAY0451',\n UnknownGenerationStrategy: 'PLAY0672',\n InvalidGenerationArgument: 'PLAY0673',\n InvalidGenerationModifier: 'PLAY0674',\n DuplicateGenerationModifier: 'PLAY0675',\n DuplicateGeneration: 'PLAY0676',\n InvalidGenerationPrimitive: 'PLAY0677',\n InvalidGenerationPrefix: 'PLAY0678',\n InvalidGenerationAlphabet: 'PLAY0679',\n InvalidTypeIdPrefix: 'PLAY0680',\n GenerationSizeOutsideRange: 'PLAY0681',\n ReservedSequenceGeneration: 'PLAY0682',\n LowGenerationEntropy: 'PLAY0683',\n LowGeneratedIdentifierEntropy: 'PLAY0684',\n ResponseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserved for compatibility with earlier native compiler diagnostics.\n EventIdPinNotCarriedToRenderers: 'PLAY0686',\n InvalidToolbarButton: 'PLAY0760',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,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nB,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,WACjC,qBAAsB,UAC1B"}
|
|
1
|
+
{"version":3,"file":"DiagnosticCodes.js","names":["DiagnosticCodes"],"sources":["../../../../../../Compiler/Diagnostics/DiagnosticCodes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Shared diagnostic names, including the explicitly C#-only checks below. Catalogue membership does\n// not imply TypeScript validation support; see Documentation/screenplay/editor-diagnostics.md.\nexport const DiagnosticCodes = {\n UnknownMatchPattern: 'PLAY0366',\n InvalidMatchPattern: 'PLAY0367',\n PatternOutsidePortableMatchDialect: 'PLAY0699',\n DeprecatedStudioTextRulePattern: 'PLAY0787',\n InvalidIdentityDeclaration: 'PLAY0633',\n DuplicateIdentity: 'PLAY0634',\n InvalidIdentityDetail: 'PLAY0635',\n UnknownIdentitySource: 'PLAY0636',\n IdentityDetailWithoutSource: 'PLAY0637',\n IdentitySourceWithBody: 'PLAY0638',\n DuplicateIdentityDetail: 'PLAY0639',\n BuiltInIdentityDetail: 'PLAY0640',\n UnknownIdentityQuery: 'PLAY0641',\n InvalidIdentityQuery: 'PLAY0642',\n IdentityQueryWithoutKey: 'PLAY0643',\n InvalidIdentityQueryKey: 'PLAY0644',\n IdentityQueryAuthorizationDependency: 'PLAY0645',\n IdentityQueryTypeMismatch: 'PLAY0646',\n InvalidReactionIdentity: 'PLAY0647',\n GatedInvocationWithoutIdentity: 'PLAY0648',\n UnusedReactionIdentity: 'PLAY0649',\n UnusedReactionRole: 'PLAY0650',\n UnsatisfiedReactionIdentity: 'PLAY0651',\n ReactionPrivilegeEscalation: 'PLAY0652',\n // C#-only whole-model public event boundaries; membership is not TypeScript validation support.\n CommandProducesPublicEvent: 'PLAY0607',\n PublicEventRequiresOutboundTranslation: 'PLAY0608',\n OutboundPublicEventCount: 'PLAY0609',\n ForeignPublicEventConsumer: 'PLAY0610',\n OutboundTranslationInput: 'PLAY0611',\n InboundTranslationOutput: 'PLAY0612',\n ForeignPublicEventProduced: 'PLAY0613',\n PublicTranslationRequiresDirection: 'PLAY0614',\n TranslationConstructDirection: 'PLAY0615',\n InboundTranslationInput: 'PLAY0616',\n OutboundTranslationOutput: 'PLAY0617',\n EventTargetOutsideOutboundTranslation: 'PLAY0618',\n EventsSourceOutsideInboundTranslation: 'PLAY0619',\n InvalidCaptureEventsSource: 'PLAY0620',\n CaptureEventsFromSeveralOrigins: 'PLAY0687',\n DirectionlessTranslationReactsToOwnCapture: 'PLAY0694',\n PendingIntentWithOtherHandler: 'PLAY0698',\n DescribedCommandNotImplemented: 'PLAY0695', // C# only\n DescribedCommandWithoutProductions: 'PLAY0696', // C# only\n DescribedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n CaptureEventsKeyNotRequired: 'PLAY0700',\n CaptureEventsRecordFixture: 'PLAY0701',\n RefutedGeneratedConceptRule: 'PLAY0688',\n UnprovenGeneratedConceptRule: 'PLAY0689',\n // Syntax shared with C#; the reference checks (owners, instances, cycles, outlets, scopes, packages) are C#-only.\n InvalidExposureDeclaration: 'PLAY0621',\n UnknownExposureOwner: 'PLAY0622',\n ReExposureCycle: 'PLAY0623',\n ReExposureBroken: 'PLAY0624',\n InvalidInstanceContribution: 'PLAY0625',\n UnknownContributionInstance: 'PLAY0626',\n ContributionNotExposed: 'PLAY0627',\n ContributionTypeMismatch: 'PLAY0628',\n UnknownTemplateContentSlot: 'PLAY0629',\n UnknownNavigationOutlet: 'PLAY0630',\n TemplateScopeMismatch: 'PLAY0631',\n IncompatibleComponentPackage: 'PLAY0632',\n UnknownNavigationDestination: 'PLAY0654',\n UnknownScreenContributionPoint: 'PLAY0655',\n TemplateNestingCycle: 'PLAY0656',\n TemplateCategoryMissing: 'PLAY0720', // C# only: template declarations are not modeled by this compiler.\n InvalidTemplateVersionRange: 'PLAY0721',\n LegacyProfileLayout: 'PLAY0791', // The other ui profile root template rules (PLAY0790, PLAY0792-PLAY0799) are C# only: this compiler does not model a ui profile.\n UnknownTemplateBlueprint: 'PLAY0722', // C# only: ui profile packages are not modeled by this compiler.\n DuplicateComplianceMarker: 'PLAY0653',\n LegacyComplianceMarker: 'PLAY0565',\n UnknownComplianceMarker: 'PLAY0566',\n InvalidSecretScope: 'PLAY0567',\n DuplicateSecretScope: 'PLAY0568',\n SecretScopeIgnoredForPii: 'PLAY0569',\n InvalidPersonalDataQualifier: 'PLAY0570',\n DuplicateSpecialCategory: 'PLAY0571',\n InvalidPurposeDeclaration: 'PLAY0596',\n InvalidPurposeVocabulary: 'PLAY0597',\n DuplicatePurposeField: 'PLAY0598',\n DuplicatePurposeDeclaration: 'PLAY0599',\n UnknownPurpose: 'PLAY0600',\n PurposeInterestMismatch: 'PLAY0601',\n PersonalDataWithoutPurpose: 'PLAY0602',\n SpecialDataWithoutCondition: 'PLAY0603',\n CriminalDataWithoutAuthorization: 'PLAY0604',\n PurposeWithoutBasis: 'PLAY0605',\n UnusedPurpose: 'PLAY0606',\n // C#-only: opt-in completeness, scoped action/refusal reference validation, and semantic binding.\n ConflictingScreenDataBinding: 'PLAY0530',\n ScreenDataQueryMismatch: 'PLAY0531',\n ActionWithoutInputSurface: 'PLAY0532',\n CommandWithoutInputSurface: 'PLAY0533',\n ReadModelFieldWithoutOrigin: 'PLAY0534',\n QueryParameterNotHeldByView: 'PLAY0535',\n UnconsumedEvent: 'PLAY0536',\n UnreachableScreen: 'PLAY0537',\n UnknownActionSubjectField: 'PLAY0345',\n UnresolvedActionSubject: 'PLAY0346',\n UnreachableActionAlternative: 'PLAY0347',\n UnknownActionArgumentProperty: 'PLAY0348',\n UnreachableRefusalBranch: 'PLAY0540',\n InvalidRefusalValue: 'PLAY0541',\n UnknownRefusalConstraint: 'PLAY0542',\n UnknownRedeliveryReaction: 'PLAY0544',\n IndeterminateNegatedClaimTarget: 'PLAY0546',\n InvalidRefusalBranch: 'PLAY0538',\n InvalidRefusalBranchBody: 'PLAY0539',\n UnmatchedRedeliveredOccurrence: 'PLAY0543',\n InvalidNoEventsExpectation: 'PLAY0545',\n InvalidProducesDeclaration: 'PLAY0042',\n ProducesWhenWithoutEvent: 'PLAY0043',\n InvalidPropertyMapping: 'PLAY0044',\n DuplicateProducesTarget: 'PLAY0193',\n EventSourceIdInPayload: 'PLAY0469',\n ExplicitProducesTargetsRequired: 'PLAY0470',\n RedundantEventId: 'PLAY0471',\n InvalidEventId: 'PLAY0472',\n InlineEventCollision: 'PLAY0473',\n InlineEventOutsideCommand: 'PLAY0474',\n InlineEventGeneration: 'PLAY0475',\n ReservedProductionMetadata: 'PLAY0476',\n InvalidEventDocumentation: 'PLAY0477',\n OmittedProductionDestination: 'PLAY0478',\n UnknownConstraintProperty: 'PLAY0391',\n UnknownTopLevelConstruct: 'PLAY0001',\n InvalidDomainDeclaration: 'PLAY0002',\n DuplicateDomain: 'PLAY0003',\n DomainNotFirst: 'PLAY0004',\n InvalidImportDeclaration: 'PLAY0005',\n TabIndentation: 'PLAY0006',\n InvalidConceptDeclaration: 'PLAY0007',\n UnknownPrimitiveType: 'PLAY0008',\n InvalidEnumerationValue: 'PLAY0009',\n UnknownConceptDirective: 'PLAY0010',\n ValidateReadAsEnumerationBlock: 'PLAY0011',\n AttributeReasonWithoutAttribute: 'PLAY0012',\n DuplicateAttributeReason: 'PLAY0013',\n InvalidTypeDeclaration: 'PLAY0014',\n TypeWithoutProperties: 'PLAY0015',\n InvalidPropertyDeclaration: 'PLAY0016',\n IdentifierOutsideCommand: 'PLAY0017',\n InvalidEventDeclaration: 'PLAY0018',\n IdentifierOnEventProperty: 'PLAY0019',\n TagPropertyReadAsTag: 'PLAY0020',\n InvalidModuleDeclaration: 'PLAY0021',\n UnknownModuleDirective: 'PLAY0022',\n InvalidFeatureDeclaration: 'PLAY0023',\n UnknownFeatureDirective: 'PLAY0024',\n InvalidSliceDeclaration: 'PLAY0027',\n UnknownSliceType: 'PLAY0028',\n UnknownSliceDirective: 'PLAY0029',\n InvalidPersonaDeclaration: 'PLAY0030',\n InvalidPersonaPolicyReference: 'PLAY0031',\n UnknownPersonaDirective: 'PLAY0032',\n InvalidCommandDeclaration: 'PLAY0033',\n UnknownCommandDirective: 'PLAY0034',\n DuplicateCommandIdentifier: 'PLAY0036',\n InvalidQueryDeclaration: 'PLAY0047',\n UnknownQueryDirective: 'PLAY0048',\n InvalidQueryParameter: 'PLAY0049',\n InvalidProjectionDeclaration: 'PLAY0056',\n EmptyProjection: 'PLAY0057',\n UnknownProjectionDirective: 'PLAY0058',\n FromWithoutEvent: 'PLAY0061',\n InvalidEventReference: 'PLAY0062',\n InvalidJoinDeclaration: 'PLAY0063',\n JoinWithoutEvent: 'PLAY0064',\n InvalidChildrenDeclaration: 'PLAY0065',\n InvalidNestedDeclaration: 'PLAY0066',\n NestedBlockWithoutFrom: 'PLAY0067',\n InvalidRemoveDeclaration: 'PLAY0068',\n UnknownRemoveDirective: 'PLAY0069',\n InvalidClearDeclaration: 'PLAY0070',\n ClearWithOutsideNestedBlock: 'PLAY0071',\n InvalidSpecificationDeclaration: 'PLAY0094',\n UnknownSpecificationDirective: 'PLAY0095',\n InvalidSpecificationWhen: 'PLAY0096',\n DuplicateSpecificationWhen: 'PLAY0097',\n InvalidThenError: 'PLAY0098',\n InvalidReadModelStep: 'PLAY0099',\n InvalidEventStep: 'PLAY0100',\n InvalidSpecificationValue: 'PLAY0101',\n InvalidScreenDeclaration: 'PLAY0102',\n UnknownScreenDirective: 'PLAY0103',\n InvalidDataDirective: 'PLAY0104',\n InvalidActionDirective: 'PLAY0105',\n UnknownActionDirective: 'PLAY0106',\n InvalidNavigation: 'PLAY0107',\n InvalidScreenLayoutSlot: 'PLAY0108',\n UnknownLayoutDirective: 'PLAY0026',\n InvalidTitleDirective: 'PLAY0109',\n UnknownTableDirective: 'PLAY0110',\n UnknownSummaryDirective: 'PLAY0111',\n AuthorizeWithoutPolicy: 'PLAY0122',\n InvalidPolicyReference: 'PLAY0123',\n InvalidConstraintDeclaration: 'PLAY0132',\n ConstraintWithoutRule: 'PLAY0133',\n InvalidConstraintBody: 'PLAY0134',\n DuplicateConstraintBody: 'PLAY0135',\n InvalidReactionDeclaration: 'PLAY0136',\n InvalidReactionTrigger: 'PLAY0137',\n ReactionWithoutTrigger: 'PLAY0138',\n InvalidValidateDeclaration: 'PLAY0140',\n InvalidValidationRule: 'PLAY0141',\n InvalidRuleName: 'PLAY0143',\n UnknownRuleImplementationDirective: 'PLAY0144',\n InvalidDescription: 'PLAY0145',\n EmptyDescription: 'PLAY0146',\n DuplicateDescription: 'PLAY0147',\n TagWithoutValue: 'PLAY0148',\n InvalidTagValue: 'PLAY0149',\n UnknownContextPath: 'PLAY0153',\n UnknownContextCausedByProperty: 'PLAY0154',\n UnknownContextIdentityProperty: 'PLAY0155',\n ExpectedCodeFence: 'PLAY0163',\n UnclosedCodeBlock: 'PLAY0164',\n DuplicateDeclaration: 'PLAY0168',\n RepeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n RepeatedDeclarationAcrossFiles: 'PLAY0173',\n ConflictingDescriptionAcrossFiles: 'PLAY0174',\n UnexpectedTokenInAuthorize: 'PLAY0184',\n UnclosedAuthorizeGroup: 'PLAY0185',\n InvalidReadModelDeclaration: 'PLAY0186',\n InvalidInvokesDeclaration: 'PLAY0194',\n InvalidScopeDeclaration: 'PLAY0199',\n DuplicateScope: 'PLAY0200',\n InvalidIntervalTrigger: 'PLAY0249',\n InvalidScheduleTrigger: 'PLAY0250',\n DuplicateReactionTrigger: 'PLAY0253',\n InvalidSpecificationEventSource: 'PLAY0275',\n DuplicateSpecificationEventSource: 'PLAY0276',\n InvalidProjectionVariantDeclaration: 'PLAY0277',\n InvalidEntersOnDeclaration: 'PLAY0279',\n NestedProjectionVariantNotAllowed: 'PLAY0280',\n InvalidStructuredValue: 'PLAY0291',\n DuplicateStructuredValueMember: 'PLAY0294',\n ConflictingSpecificationActions: 'PLAY0358',\n InvalidSpecificationEventOrder: 'PLAY0359',\n InvalidValidationSeverity: 'PLAY0368',\n VariantRequiresEnteringEvent: 'PLAY0382',\n DuplicateProjectionVariant: 'PLAY0384',\n DuplicateVariantEnteringEvent: 'PLAY0385',\n InvalidSpecificationDenied: 'PLAY0388',\n DuplicateAuthorizationAcrossFiles: 'PLAY0394',\n FileConstraintOnlySupportsUniqueness: 'PLAY0396',\n LegacyInlineCodeFence: 'PLAY0397',\n InvalidEventGeneration: 'PLAY0446',\n InvalidFileImport: 'PLAY0454',\n FileImportMatchesNothing: 'PLAY0455',\n ImportedFileNotFound: 'PLAY0456',\n ConflictingImportPlacement: 'PLAY0457',\n ImportCycle: 'PLAY0458',\n ModuleInPlacedFile: 'PLAY0459',\n UnexpectedInPlacedFile: 'PLAY0460',\n InvalidSpecificationClock: 'PLAY0461',\n InvalidSpecificationTrigger: 'PLAY0462',\n InvalidSpecificationCapture: 'PLAY0463',\n InvalidSpecificationQueryAction: 'PLAY0464',\n MismatchedSpecificationQueryResult: 'PLAY0465',\n UnknownSpecificationQueryArgument: 'PLAY0468',\n InvalidSpecificationQuery: 'PLAY0265',\n UnknownSpecificationQueryDirective: 'PLAY0266',\n DuplicateSpecificationQueryArguments: 'PLAY0267',\n InvalidAbsentReadModelStep: 'PLAY0453',\n LegacyOptionalSuffix: 'PLAY0479',\n InvalidOptionalModifierOrder: 'PLAY0480',\n OptionalReadsNotSupported: 'PLAY0481',\n InvalidSpecificationCaller: 'PLAY0386',\n DuplicateSpecificationCallerOrDenied: 'PLAY0387',\n GeneratedPropertyOutsideCommand: 'PLAY0482',\n InvalidGeneratedType: 'PLAY0483',\n InvalidGeneratedModifierOrder: 'PLAY0484',\n DuplicateEventSubject: 'PLAY0590',\n InvalidSubjectType: 'PLAY0591',\n ProtectedSubjectType: 'PLAY0592',\n InvalidSubjectOwner: 'PLAY0593',\n ReadModelSubjectNotSupported: 'PLAY0594',\n InvalidSubjectModifierOrder: 'PLAY0595',\n GeneratedPropertySuppliedAsInput: 'PLAY0485',\n InvalidCommandResponse: 'PLAY0486',\n InvalidResponseSource: 'PLAY0487',\n DuplicateResponseField: 'PLAY0488',\n InvalidResponseShape: 'PLAY0489',\n InvalidGeneratedFixture: 'PLAY0490',\n InvalidReturnExpectation: 'PLAY0491',\n InvalidImplementationBlock: 'PLAY0492',\n InvalidImplementationHint: 'PLAY0493',\n ConflictingImplementationSources: 'PLAY0494',\n UnknownType: 'PLAY0165',\n InvalidSystemDeclaration: 'PLAY0495',\n InvalidOperationDeclaration: 'PLAY0496',\n InvalidProductionReference: 'PLAY0497',\n ProductionDeclarationCollision: 'PLAY0498',\n OperationOutsideCommand: 'PLAY0499',\n InvalidSystemReference: 'PLAY0500',\n InvalidOperationMapping: 'PLAY0501',\n InvalidOperationSpecification: 'PLAY0502',\n InvalidCaptureDeclaration: 'PLAY0078',\n UnknownCaptureDirective: 'PLAY0079',\n InvalidMapEntry: 'PLAY0080',\n InvalidTranslation: 'PLAY0081',\n InvalidSplitDeclaration: 'PLAY0082',\n InvalidSplitTarget: 'PLAY0083',\n InvalidAppendDeclaration: 'PLAY0084',\n UnknownAppendDirective: 'PLAY0085',\n WhenWithoutTrigger: 'PLAY0086',\n InvalidWhenClause: 'PLAY0087',\n InvalidWhenTransitionClause: 'PLAY0088',\n MixedWhenCombinators: 'PLAY0089',\n WhenCombinatorWithoutProperty: 'PLAY0090',\n UnknownCaptureBlockDirective: 'PLAY0091',\n InvalidCompositeKeyPart: 'PLAY0072',\n TemplateInCompositeKey: 'PLAY0073',\n EmptyCompositeKey: 'PLAY0074',\n InvalidProjectionMapping: 'PLAY0075',\n ExpectedLiteralValue: 'PLAY0150',\n InvalidExpression: 'PLAY0152',\n UnterminatedInterpolation: 'PLAY0157',\n UnterminatedTemplateExpression: 'PLAY0156',\n ProjectionDocumentWithoutProjection: 'PLAY0055',\n CaptureDocumentWithoutCapture: 'PLAY0077',\n SpecificationDocumentWithoutSpecification: 'PLAY0093',\n InvalidSeedDeclaration: 'PLAY0128',\n InvalidSeedGroup: 'PLAY0129',\n InvalidSeedEvent: 'PLAY0130',\n InvalidSeedPropertyAssignment: 'PLAY0131',\n InvalidPolicyDeclaration: 'PLAY0112',\n UnknownPolicyDirective: 'PLAY0113',\n PolicyWithoutRequirement: 'PLAY0114',\n ExpectedRoleName: 'PLAY0118',\n ExpectedClaimName: 'PLAY0119',\n ExpectedClaimMatches: 'PLAY0120',\n ExpectedClaimMatchTarget: 'PLAY0121',\n MixedPolicyImplementation: 'PLAY0440',\n RepeatedPolicyRequirement: 'PLAY0441',\n UnexpectedTokenInPolicyCondition: 'PLAY0115',\n ExpectedPolicyCondition: 'PLAY0116',\n UnclosedPolicyConditionGroup: 'PLAY0117',\n UnexpectedTokenInCondition: 'PLAY0158',\n ExpectedCondition: 'PLAY0159',\n ExpectedComparisonOperator: 'PLAY0161',\n ExpectedComparisonValue: 'PLAY0162',\n InvalidActionAlternative: 'PLAY0341',\n GuardedActionWithoutAlternatives: 'PLAY0342',\n MisplacedActionOtherwise: 'PLAY0343',\n UnsupportedActionConditionOperand: 'PLAY0344',\n InvalidInteractionArgument: 'PLAY0319',\n UnclosedConditionGroup: 'PLAY0160',\n InvalidNumericDirective: 'PLAY0508',\n DuplicateNumericDirective: 'PLAY0509',\n LateNumericDirective: 'PLAY0510',\n InexactNumericLiteral: 'PLAY0511',\n MixedNumericModes: 'PLAY0512',\n IncompatibleNumericSource: 'PLAY0513',\n EventFromLaterSlice: 'PLAY0516',\n TimelineCycleGroup: 'PLAY0517',\n InvalidSpecificationExample: 'PLAY0518',\n DuplicateSpecificationAssignment: 'PLAY0519',\n UnresolvedSpecificationExampleType: 'PLAY0520',\n SpecificationExampleNameCollision: 'PLAY0521',\n SpecificationExampleKindMismatch: 'PLAY0522',\n InvalidSpecificationExampleValue: 'PLAY0523',\n MissingSpecificationProperty: 'PLAY0524',\n UnadmittedSpecificationExampleValue: 'PLAY0525',\n InvalidSpecificationExampleBody: 'PLAY0526',\n AmbiguousReference: 'PLAY0198',\n InvalidSpecificationStream: 'PLAY0547',\n SpecificationStreamOnCommand: 'PLAY0548',\n InvalidSpecificationStreamRoute: 'PLAY0549',\n InvalidSpecificationStreamEventSource: 'PLAY0550',\n SpecificationStreamContradictsCommand: 'PLAY0551',\n InvalidDependencyTarget: 'PLAY0554',\n RepeatedDependencyDeclaration: 'PLAY0555',\n UndeclaredDependency: 'PLAY0552',\n UnusedDependencyDeclaration: 'PLAY0553',\n MutualDependencyDeclarations: 'PLAY0556',\n AuthorizationRefusalWithoutIdentity: 'PLAY0557',\n InvalidDocumentation: 'PLAY0558',\n ConflictingDocumentationAcrossFiles: 'PLAY0559',\n InvalidSpecificationCallerPersona: 'PLAY0572',\n UnsynthesizablePersonaCaller: 'PLAY0573',\n PersonaWithoutGate: 'PLAY0574',\n GateWithoutPersona: 'PLAY0575',\n AmbiguousPersonaCaller: 'PLAY0576',\n InvalidSpecificationParameter: 'PLAY0577',\n InvalidSpecificationCase: 'PLAY0578',\n DuplicateSpecificationParameter: 'PLAY0579',\n DuplicateSpecificationCase: 'PLAY0580',\n IncompleteSpecificationTable: 'PLAY0581',\n InvalidSpecificationCaseAssignment: 'PLAY0582',\n InvalidSpecificationCaseValue: 'PLAY0583',\n InvalidSpecificationCaseReference: 'PLAY0584',\n OptionalSpecificationParameterTarget: 'PLAY0585',\n SpecificationCaseNameCollision: 'PLAY0586',\n IncompatibleSpecificationParameterType: 'PLAY0587',\n UnusedSpecificationParameter: 'PLAY0588',\n SingularSpecificationTableExpansion: 'PLAY0589',\n UnsupportedInteractionAlternatives: 'PLAY0560',\n MixedInteractionAlternatives: 'PLAY0561',\n InteractionAlternativeWithoutActions: 'PLAY0562',\n InlineInteractionAlternative: 'PLAY0563',\n LegacyInteractionWhere: 'PLAY0564',\n InvalidEventSourceDeclaration: 'PLAY0503',\n InvalidCommandStream: 'PLAY0504',\n AmbiguousCommandStream: 'PLAY0505',\n UnsupportedStreamIdType: 'PLAY0506',\n RedundantSourceStreamId: 'PLAY0507',\n UnknownEvent: 'PLAY0166',\n UnknownReadModelProperty: 'PLAY0514',\n PiiNotSupportedOnIdentifier: 'PLAY0515',\n HandlerWithoutImplementation: 'PLAY0045',\n UnknownHandlerDirective: 'PLAY0046',\n CommandWithProducesAndHandler: 'PLAY0035',\n AbsoluteFileReference: 'PLAY0264',\n InvalidTriggerData: 'PLAY0246',\n InvalidReadModelKey: 'PLAY0660',\n IncompleteReadModelKey: 'PLAY0661', // C# only: scoped read-model key resolution.\n InvalidReadModelKeyLookup: 'PLAY0662', // Shape checks shared; scoped lookup checks are C# only.\n ProductionRouteOutsideCommand: 'PLAY0663',\n RedundantProductionRoute: 'PLAY0664',\n InvalidObserverFilter: 'PLAY0665',\n ObserverFilterExcludesEveryProducer: 'PLAY0666', // C# only: statically known producer routes.\n ReducerIdentityMismatch: 'PLAY0690',\n InvalidReactionBatchesDeclaration: 'PLAY0693',\n InvalidCommandReadsDeclaration: 'PLAY0780',\n GenerationSupportBudgetExceeded: 'PLAY0691',\n EmptyGenerationSupport: 'PLAY0692', // C# only: conservative nominal producer identity comparison.\n MixedEnumerationNumbering: 'PLAY0667',\n DuplicateEnumerationNumber: 'PLAY0668',\n EnumerationNumberOutsideInt32: 'PLAY0669',\n MalformedEnumerationNumber: 'PLAY0670',\n UnpinnedStoredEnumeration: 'PLAY0671',\n ReadsWithChildren: 'PLAY0451',\n UnknownGenerationStrategy: 'PLAY0672',\n InvalidGenerationArgument: 'PLAY0673',\n InvalidGenerationModifier: 'PLAY0674',\n DuplicateGenerationModifier: 'PLAY0675',\n DuplicateGeneration: 'PLAY0676',\n InvalidGenerationPrimitive: 'PLAY0677',\n InvalidGenerationPrefix: 'PLAY0678',\n InvalidGenerationAlphabet: 'PLAY0679',\n InvalidTypeIdPrefix: 'PLAY0680',\n GenerationSizeOutsideRange: 'PLAY0681',\n ReservedSequenceGeneration: 'PLAY0682',\n LowGenerationEntropy: 'PLAY0683',\n LowGeneratedIdentifierEntropy: 'PLAY0684',\n ResponseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserved for compatibility with earlier native compiler diagnostics.\n EventIdPinNotCarriedToRenderers: 'PLAY0686',\n InvalidToolbarButton: 'PLAY0760',\n} as const;\n"],"mappings":"AAKA,MAAaA,EAAkB,CAC3B,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,sBAAuB,WACvB,4BAA6B,WAC7B,uBAAwB,WACxB,wBAAyB,WACzB,sBAAuB,WACvB,qBAAsB,WACtB,qBAAsB,WACtB,wBAAyB,WACzB,wBAAyB,WACzB,qCAAsC,WACtC,0BAA2B,WAC3B,wBAAyB,WACzB,+BAAgC,WAChC,uBAAwB,WACxB,mBAAoB,WACpB,4BAA6B,WAC7B,4BAA6B,WAE7B,2BAA4B,WAC5B,uCAAwC,WACxC,yBAA0B,WAC1B,2BAA4B,WAC5B,yBAA0B,WAC1B,yBAA0B,WAC1B,2BAA4B,WAC5B,mCAAoC,WACpC,8BAA+B,WAC/B,wBAAyB,WACzB,0BAA2B,WAC3B,sCAAuC,WACvC,sCAAuC,WACvC,2BAA4B,WAC5B,gCAAiC,WACjC,2CAA4C,WAC5C,8BAA+B,WAC/B,+BAAgC,WAChC,mCAAoC,WACpC,uCAAwC,WACxC,4BAA6B,WAC7B,2BAA4B,WAC5B,4BAA6B,WAC7B,6BAA8B,WAE9B,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC1B,2BAA4B,WAC5B,wBAAyB,WACzB,sBAAuB,WACvB,6BAA8B,WAC9B,6BAA8B,WAC9B,+BAAgC,WAChC,qBAAsB,WACtB,w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mCAAoC,WACpC,6BAA8B,WAC9B,qCAAsC,WACtC,6BAA8B,WAC9B,uBAAwB,WACxB,8BAA+B,WAC/B,qBAAsB,WACtB,uBAAwB,WACxB,wBAAyB,WACzB,wBAAyB,WACzB,aAAc,WACd,yBAA0B,WAC1B,4BAA6B,WAC7B,6BAA8B,WAC9B,wBAAyB,WACzB,8BAA+B,WAC/B,sBAAuB,WACvB,mBAAoB,WACpB,oBAAqB,WACrB,uBAAwB,WACxB,0BAA2B,WAC3B,8BAA+B,WAC/B,yBAA0B,WAC1B,sBAAuB,WACvB,oCAAqC,WACrC,wBAAyB,WACzB,kCAAmC,WACnC,+BAAgC,WAChC,gCAAiC,WACjC,uBAAwB,WACxB,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,kBAAmB,WACnB,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,WACjC,qBAAsB,UAC1B"}
|
|
@@ -1,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 w}from"../Syntax/PublicEventInvariants.js";import{parseType as ee}from"./DeclarationParsers.js";import{parseValidate as T}from"./CommandParser.js";import{parseTriggerDeclaration as E}from"./TriggerDataParser.js";import{FeatureBody as D,featureBodyExpected as O}from"./FeatureBody.js";import{ModuleBody as k,moduleBodyExpected as A,modulePattern as j,parseModule as M}from"./ModuleBody.js";import{EnumerationMembers as N}from"./EnumerationMembers.js";import{parseGeneration as P}from"./GenerationParser.js";import{parseIdentity as te}from"./IdentityParser.js";import{parsePolicy as ne}from"./PolicyParser.js";import{parseSeed as F}from"./SeedParser.js";import{parseExposure as I,parseInstance as L}from"./CompositionParser.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 k(a[0]):void 0,s=a.length>1?new D(a[a.length-1]):void 0,l=o??s,u=null,p=null,x=!1,T=null,O=!1,A=null,j=[],N=[],P=[],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))O||!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`,O=!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,A=parseDomain(t,r,A,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,N):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)),j.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`)P.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(M(t,r));else if(s===`persona`)U.push(parsePersona(t,r));else if(s===`seed`)q.push(F(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=te(t,r,u);else if(s===`policy`)W.push(ne(t,r));else if(s===`exposure`)X.push(I(t,r));else if(s===`instance`)Z.push(L(t,r));else if(s===`trigger`){let e=E(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):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:A,imports:j,concepts:P,types:R,systems:B,eventSources:V,examples:J,modules:H,personas:U,policies:W,purposes:G,seeds:q,declaredTriggers:Y,fileImports:N,...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=j.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?A:O;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 N,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`);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=P(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 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`);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","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 { 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 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');\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":"q5DAmDA,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,cA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rF,EAAQ,UAAU8B,EAAK,MAAM,EAAG,CAC1G9B,EAAQ,OAAO,gBAAgB,EAC/B,IAAM+B,EAAUC,EAAUqD,EAAM,OAAO,EACvC,GAAItD,IAAY,cACZ,EAAcwD,EAAiBvF,EAASqF,EAAOF,EAAa,YAAY3B,EAAK,EAAE,OAC5E,GAAIzB,IAAY,SAAU,CAC7B,IAAMgE,EAASrG,EAAqB,KAAK2F,EAAM,OAAO,EAClDU,IAAW,KACX/F,EAAQ,MAAMkC,EAAgB,8BAA+B,6BAA6BmD,EAAM,QAAQ,8BAA+BlD,EAAWkD,CAAK,CAAC,EAExJ/D,EAAS,KAAKyE,EAAO,EAAE,CAE/B,MACI/F,EAAQ,MAAMkC,EAAgB,wBAAyB,eAAeH,EAAQ,oDAAqDI,EAAWkD,CAAK,CAAC,EACpJrF,EAAQ,UAAUqF,EAAM,MAAM,CAEtC,CACA,MAAO,CAAE,KAAM,gBAAiB,OAAM,cAAa,WAAU,SAAUlD,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","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');\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,EA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,EAAWL,CAAI,CAAE,CAClO,CAGA,SAAS,aAAa,EAAwB,EAAiC,CAC3E,IAAM0B,EAAO/D,EAAe,KAAKqC,EAAK,OAAO,CAAC,GAAG,IAAM,GACnD0B,IAAS,IACTxD,EAAQ,MAAMkC,EAAgB,0BAA2B,gCAAgCJ,EAAK,QAAQ,+BAAgCK,EAAWL,CAAI,CAAC,EAE1J,IAAIsD,EAA6B,KAC3B9D,EAAqB,CAAC,EAC5B,IAAK,IAAIgE,EAAQtF,EAAQ,UAAU8B,EAAK,MAAM,EAAGwD,IAAU,IAAA,GAAW,EAAQtF,EAAQ,UAAU8B,EAAK,MAAM,EAAG,CAC1G9B,EAAQ,OAAO,gBAAgB,EAC/B,IAAM+B,EAAUC,EAAUsD,EAAM,OAAO,EACvC,GAAIvD,IAAY,cACZ,EAAcyD,EAAiBxF,EAASsF,EAAOF,EAAa,YAAY5B,EAAK,EAAE,OAC5E,GAAIzB,IAAY,SAAU,CAC7B,IAAMiE,EAAStG,EAAqB,KAAK4F,EAAM,OAAO,EAClDU,IAAW,KACXhG,EAAQ,MAAMkC,EAAgB,8BAA+B,6BAA6BoD,EAAM,QAAQ,8BAA+BnD,EAAWmD,CAAK,CAAC,EAExJhE,EAAS,KAAK0E,EAAO,EAAE,CAE/B,MACIhG,EAAQ,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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../../_virtual/_virtual/_rolldown/runtime.js";import{DiagnosticCodes as e}from"../Diagnostics/DiagnosticCodes.js";import{locationOf as t}from"./SourceLine.js";import{diagnosticText as n}from"../Diagnostics/DiagnosticArgument.js";const r=/^ui\s+profile\s+([A-Za-z_]\w*)$/,i=/^layout\s+([A-Za-z_]\w*)$/,a=/^root\s+template\s+(?:blueprint\s+[A-Za-z_]\w*(?:\.\w+)*\s+)?([A-Za-z_]\w*(?:\.\w+)*)(?:\s|$)/;function parseUiProfile(o,s){let c=r.exec(s.content);if(c===null||c[1]===void 0){o.skipOpaqueBlock(s.indent);return}let l,u,d=o.peekChild(s.indent);for(;d!==void 0;)o.reader.takeSignificant(),d.content.startsWith("```")?o.skipFencedBody():(l??=i.exec(d.content)?.[1],u??=a.exec(d.content)?.[1]),d=o.peekChild(s.indent);if(l===void 0)return;let f=u===void 0?`write 'root template ${l}'`:`the root template '${u}' is used and this line is ignored - remove it`;o.warning(e.LegacyProfileLayout,`The ui profile '${c[1]}' selects its shell with the legacy 'layout ${l}' - ${f}`,t(s),{...n(`profile`,c[1]),...n(`template`,l)})}export{parseUiProfile};
|
|
2
|
+
//# sourceMappingURL=UiProfileLegacyLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiProfileLegacyLayout.js","names":["profileHeader","layoutReference","rootTemplate","match","header","context","layout","root","child","consequence","DiagnosticCodes","locationOf","diagnosticText"],"sources":["../../../../../../Compiler/Parsing/UiProfileLegacyLayout.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DiagnosticCodes } from '../Diagnostics/DiagnosticCodes';\nimport { diagnosticText } from '../Diagnostics/DiagnosticArgument';\nimport { ParserContext } from './ParserContext';\nimport { SourceLine, locationOf } from './SourceLine';\n\nconst profileHeader = /^ui\\s+profile\\s+([A-Za-z_]\\w*)$/;\nconst layoutReference = /^layout\\s+([A-Za-z_]\\w*)$/;\nconst rootTemplate = /^root\\s+template\\s+(?:blueprint\\s+[A-Za-z_]\\w*(?:\\.\\w+)*\\s+)?([A-Za-z_]\\w*(?:\\.\\w+)*)(?:\\s|$)/;\n\n// A ui profile is otherwise skipped by this compiler (the C# compiler models it). The one rule that is shared with the editors is\n// the legacy `layout` line: PLAY0791 is reported on the profile, as the C# compiler does, so the quick fix can rewrite the line.\nexport function parseUiProfile(context: ParserContext, header: SourceLine): void {\n const match = profileHeader.exec(header.content);\n if (match === null || match[1] === undefined) {\n context.skipOpaqueBlock(header.indent);\n return;\n }\n\n let layout: string | undefined;\n let root: string | undefined;\n let child = context.peekChild(header.indent);\n while (child !== undefined) {\n context.reader.takeSignificant();\n if (child.content.startsWith('```')) {\n context.skipFencedBody();\n } else {\n layout ??= layoutReference.exec(child.content)?.[1];\n root ??= rootTemplate.exec(child.content)?.[1];\n }\n child = context.peekChild(header.indent);\n }\n\n if (layout === undefined) return;\n const consequence = root === undefined\n ? `write 'root template ${layout}'`\n : `the root template '${root}' is used and this line is ignored - remove it`;\n context.warning(\n DiagnosticCodes.LegacyProfileLayout,\n `The ui profile '${match[1]}' selects its shell with the legacy 'layout ${layout}' - ${consequence}`,\n locationOf(header),\n { ...diagnosticText('profile', match[1]), ...diagnosticText('template', layout) });\n}\n"],"mappings":"4OAQA,MAAMA,EAAgB,kCAChBC,EAAkB,4BAClBC,EAAe,gGAIrB,SAAgB,eAAe,EAAwB,EAA0B,CAC7E,IAAMC,EAAQH,EAAc,KAAKI,EAAO,OAAO,EAC/C,GAAID,IAAU,MAAQA,EAAM,KAAO,IAAA,GAAW,CAC1CE,EAAQ,gBAAgBD,EAAO,MAAM,EACrC,MACJ,CAEA,IAAIE,EACAC,EACAC,EAAQH,EAAQ,UAAUD,EAAO,MAAM,EAC3C,KAAOI,IAAU,IAAA,IACbH,EAAQ,OAAO,gBAAgB,EAC3BG,EAAM,QAAQ,WAAW,KAAK,EAC9BH,EAAQ,eAAe,GAEvB,IAAWJ,EAAgB,KAAKO,EAAM,OAAO,CAAC,GAAG,GACjD,IAASN,EAAa,KAAKM,EAAM,OAAO,CAAC,GAAG,IAEhD,EAAQH,EAAQ,UAAUD,EAAO,MAAM,EAG3C,GAAIE,IAAW,IAAA,GAAW,OAC1B,IAAMG,EAAcF,IAAS,IAAA,GACvB,wBAAwBD,EAAO,GAC/B,sBAAsBC,EAAK,gDACjCF,EAAQ,QACJK,EAAgB,oBAChB,mBAAmBP,EAAM,GAAG,8CAA8CG,EAAO,MAAMG,IACvFE,EAAWP,CAAM,EACjB,CAAE,GAAGQ,EAAe,UAAWT,EAAM,EAAE,EAAG,GAAGS,EAAe,WAAYN,CAAM,CAAE,CAAC,CACzF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./_virtual/_virtual/_rolldown/runtime.js";import{eventContextPaths as e}from"./event-context-catalog.js";import"./event-context.js";const t={implementation:`Handler-only intent with ordered hints and at most one file or tagged fence. No payload means pending. Handler execution is unsupported; this is not confirmation.`,hint:`One nonblank quoted implementation hint. Order and decoded text are retained; hints do not execute or confirm code.`},n={parameter:`A typed value declared by a specification table, or an argument of a named behavior. Table types are required; every case supplies each parameter exactly once.`,case:`One named concrete row of a specification table, expanded as <Specification>_<Case>. Use case.<parameter> for a whole step value.`,example:"One typed, possibly partial fixture: `example <Name> : <EventOrCommandOrReadModel>`. Use its name in a matching specification step; assignments override example values without changing matching or supplying defaults. Event examples may carry stream or no stream; a step replaces that route as a whole.",domain:`The domain the file belongs to — optional, at most one per file, before everything else.`,import:'Imports a type from another module by its qualified name — `import Module.Type` — making it available by its short name; or, quoted, other `.play` files by path or glob — `import "Orders/**/*.play"`, relative to this file\'s folder. Written inside a module or feature, a file import places the imported files there: their top level is that module\'s or feature\'s body. `import Module.Event from "origin"` is instead public contract metadata with an opaque origin; executable binding refuses it with PLAY0268.',concept:`A formalized value type wrapping a primitive. Bare pii and secret markers travel with every usage, with optional concept notes and qualifiers.`,type:`A composite value type — a named shape built from several properties, referenced by events, commands and other types the same way a concept is.`,reason:`A free-text concept note, not a lawful basis. Written as pii reason "..." or secret reason "..."; migration preserves it verbatim.`,optional:"Allows a value to be absent. Write it after the type: `note String optional` or `lines InvoiceLine[] optional`. The collection itself may be absent; its items keep their declared type.",identifier:`Marks the command property a runtime resolves the event source id from. At most one per command; without it a new Uuid is generated.`,policy:`A named authorization rule referenced by commands and queries. Multiple policies AND together.`,purpose:`A report-only processing declaration (GDPR Art. 30), referenced on modules, features and slices. Coverage is their union, not an authorization gate. Generated declarations are not legal advice.`,basis:`One declared Art. 6(1) basis: consent, contract, legalObligation, vitalInterests, publicTask or legitimateInterests; an optional quoted reference may follow.`,interest:`The legitimate-interest statement for basis legitimateInterests (Art. 13(1)(d)).`,condition:`One Art. 9(2) processing condition, optionally followed by a quoted reference.`,subjects:`Comma-separated categories of data subjects, as open identifiers.`,retention:`Declared retention period or criteria, not enforced by the model or Chronicle.`,recipient:`A quoted recipient category; repeatable on a purpose.`,transfer:`A declared destination followed by safeguard and quoted safeguards; repeatable.`,safeguard:`The declared safeguard accompanying a third-country transfer.`,erasure:`An erasure exception under Art. 17(3); Chronicle crypto-shredding remains per subject, not per purpose.`,exception:`One declared Art. 17(3) exception: expression, legalObligation, publicTask, publicHealth, archiving or legalClaims.`,persona:`A named role interacting with the application, with an optional description and its associated policies.`,identity:"Declares typed additional caller details from a claim, a keyed single-result query, inline code or a file. Authoring metadata only; executable use of `$identity.<detail>` reports PLAY0268 until admitted (#600).",authentication:`Declares the identity providers of the application — at most one block per file.`,provider:"A named identity provider within `authentication`, with free-form `name value` settings.",description:"A human-readable description, including the rule or case a specification witnesses, as a quoted single line or a fenced ```text block for multiple lines.",depends:"Declares `depends on <Name>` on a module or feature. This opts only that container into checking counted explicit references against its own declarations; it does not change executable bytes.",module:`The top-level namespace — maps to a bounded context.`,layout:`A reusable screen template with named slots.`,template:'Names a template to fill or assign: `template <Name>` for an own template, `template blueprint <Blueprint> <Name> [version "<range>"]` for a template a blueprint package ships.',blueprint:"In `template blueprint <Blueprint> <Name>`, the blueprint package the template comes from. A `ui profile` should list it under `packages`. In `ui profile` `sample data`, `active blueprint <id>` selects a sample data pack a blueprint ships, resolved by the build against its packages.",version:'In `template blueprint ... version "<range>"`, the semver range of the blueprint the reference accepts, such as `^1.4`.',scopes:"Where a template may be used: `application`, `module`, `feature`, `subfeature` or `slice`. `slice` can be followed by the kinds `statechange` and `stateview`, such as `scopes slice statechange|stateview`.",category:`The group a template picker lists a layout or template under. Every layout and template needs one.`,feature:`A vertical slice grouping. Features nest arbitrarily deep.`,slice:`The atomic unit of behavior, aligned with Event Modeling. Has a type and a name.`,public:`Marks an event as a public contract. An event with from "origin" is also public. Origin is opaque, not a path or declaration reference. Public events and origins are admitted by executable semantic model (ESM) v9.`,direction:`Declare direction inbound or direction outbound once inside a Translate slice. Admitted by executable semantic model (ESM) v9; a Translate slice that uses public events must declare it (PLAY0614).`,inbound:`Inbound Translate direction metadata. No transport or delivery guarantee is implied.`,outbound:`Outbound Translate direction metadata. No transport or delivery guarantee is implied.`,event:"An immutable, past-tense fact. Declare it in a slice or inline with `produces event <Name>` in a command. Inline properties are typed mappings; inline tags belong to the event type.",documentation:"Authoring-only reasoning on a module, feature, slice, command, event, read model or reaction in one nonempty fenced ```markdown block. It does not change executable model bytes.",id:`Preserves the previous persisted event name after a rename. Leave absent on new events; repeating the current name is redundant.`,command:`An imperative intent. Declares authorization, validation, and what events it produces — declaratively, or via a full handler.`,query:`A read-side entry point mapping to a return type, with an optional description, parameters and performer. The by key and every supplied filter value satisfy their concept rules after authorization; violations reject with Validation, not an empty result.`,observable:"Qualifies a query return type as a live read — `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.",performer:"The code that performs a query — a `file <Path>` reference or an inline `csharp`/`sql` block. The query's counterpart to a command handler.",from:"On a reaction or reducer, `from Source[.Stream]` observes only matching routed facts. It does not filter stream ids. Admitted by ESM v10. On a query parameter, fills it from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.",projection:`Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).`,capture:`Converts external data into events, using the embedded Change Data Capture Language (CDL).`,protected:"Application-root `command reads protected` admits eligible command reads (ESM v25). Required absence rejects with Validation before derive/provide and requirements; a matching intervening fact yields Conflict/DecisionStateChanged without facts. Without the preamble, legacy reads retain their existing refusals. Targets must separately admit the version.",batches:"Application-root `reaction batches atomic` opts into ESM v22 atomic direct and refusal-branch batches. Invoked commands remain separate transactions.",atomic:`All productions in one reaction trigger occurrence or selected refusal branch are adopted together or not at all. Absence retains legacy per-fact semantics.`,reaction:"Behavior that runs when something happens. Lives inside Automation slices. A trigger with no body states intent on its own — `file`/code is optional realization metadata.",runs:'`runs as system [role "Role" and role "Role"]` declares the identity for every returned or invoked command of a reaction, not imperative pipeline calls. Admitted by released ESM v10; claims are unknown for this identity. Clock and application triggers have no Stage realization yet.',trigger:`Declares a kind of occurrence a reaction can respond to, and the values it hands the reaction. What makes one occur belongs to whoever provides it, never to the compiler.`,where:`Narrows which occurrences actually run the reaction.`,contains:"Ordinal UTF-16 text comparison: the value holds the literal operand anywhere. In validation, `not contains` negates it; absent optional values pass. An empty operand always occurs.",starts:'Use `starts with "text"` for an ordinal UTF-16 literal prefix validation rule or condition.',ends:'Use `ends with "text"` for an ordinal UTF-16 literal suffix validation rule. An absent optional value passes.',every:"Runs a reaction on an interval — `every 15 minutes`, `every 1 day`.",refused:"Ordered invocation refusal branch, executable from ESM v19: first match wins and stops remaining invocations of this trigger. Bare `on refused` covers validation and constraints, not authorization. Other reactions and cascades continue; contract errors, concurrency and Unsupported never match.",acknowledge:`A refusal branch acknowledges alone without facts, or produces events instead. Executable from ESM v19; handling stops remaining invocations of this trigger.`,validation:"In `on refused by validation`, selects error-severity property, concept and require refusals. Executable from ESM v19.",authorization:"In `on refused by authorization`, explicitly selects unauthorized results, never Unsupported. Executable from ESM v19; bare refusal excludes authorization.",redelivered:"`when redelivered <Event> to <Reaction>` selects exactly one effective given occurrence by optional for, stated values and stream or no stream, delivering that event again to one named reaction without appending it again. Executable from ESM v17.",invokes:`A command a reaction hands on. A command is asked for, not produced — it may still be rejected.`,screen:`A UI declaration. Supports intent, structure, and layout-with-code levels, or a full file reference.`,constraint:`A server-side rule enforced in the Chronicle kernel before events are committed.`,authorize:`References the policies that must all pass for the construct to execute.`,validate:"Declarative validation rules, or `validate` followed by ```csharp for imperative rules — on commands and concepts.",checksum:`String-concept validation: exact trailing luhn/mod11 digit or two mod97 digits over preceding ASCII digits. Also applies to supplied and stored values; generation does not silently add validation.`,luhn:`Luhn check digit, with standard parity from the right. Generation appends it; validate checksum luhn checks the arithmetic.`,mod11:`Check digit (11 - weighted sum modulo 11) modulo 11, weights 2..7 cycling from the right. Output 10 is excluded from generation support.`,mod97:`ISO 7064 MOD 97-10, two zero-padded trailing digits. Validation checks the exact computed suffix, not only congruence.`,produces:"References a declared event with `produces <Name>`, or declares one inline with `produces event <Name>`. An inline omitted `for` uses the command identifier only when all destinations are the same source; legacy plain omission allocates an identity.",reads:"Declares a view consulted by a command or reaction trigger: `reads <View> [as <alias>] [by <value>]`. A reaction `by` names a value taken by its trigger; clock triggers cannot use `by`. A child by block supplies composite key parts by name, using part = source, but is refused for protected command reads (PLAY0781 ByParts). Repeated views require unique aliases. With `command reads protected`, command reads bind only over finite event-log projections keyed by event-source identity with removal handlers and required scalar non-generated input keys. Omitted `by` uses the command identifier. Single-level read/alias.property paths are admitted in validate require operands and produces mappings only. Reaction reads remain unadmitted.",as:"Names an instance of a view in a command or reaction trigger reads declaration, for example `reads Account as source by sourceId`.",handler:"A fully imperative command implementation — a `file <Path>` reference or an inline `csharp` block, instead of `produces`.",when:"Guards a produced event or a capture append with a condition. In a labeled screen action, `when item.<field> == <literal> execute <Command>` selects the first matching command. Inside on click, double click or select, block-form `when <condition>` selects one whole action list at gesture time.",rule:"Names a predicate. Bare, it states that a constraint exists without expressing what it computes — nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.",require:'A policy condition: `authenticated`, `role "..."`, or `claim "..." matches ...`. Unary `not` negates a condition or group; precedence is not, and, or.',authenticated:`Requires an authenticated caller.`,role:`Requires the caller to have the given role.`,claim:`Requires a claim on the caller to match a subject or value.`,subject:"In policy `matches subject`, the identifier of the thing acted on, not the caller. The caller is `$context.causedBy.subject`.",data:`Binds a read model to a screen through a query.`,action:'Makes a command available on a screen. `action "Label"` declares one button with ordered `when … execute` alternatives over the nearest data item or selected row. No subject hides it; commands still enforce authorization and validation.',otherwise:"The final fallback of a guarded action: `otherwise hidden` or `otherwise execute <Command>`. In an item interaction, bare `otherwise` opens a fallback action list. No subject runs nothing, including fallback; authorization never falls through.",hidden:`Hides a guarded action when no condition matches. Without a subject the action is always hidden, even with an execute fallback.`,execute:"Executes a command. A guarded screen action selects it by the first matching condition; explicit `with … from` bindings precede same-name item fields, its declared form and renderer input.",navigate:"Navigates to a screen, optionally passing a parameter with `by`.",section:`A named structural section of a screen.`,table:`A table widget over a read model or child collection.`,summary:`A summary widget showing labeled fields.`,column:`A table column bound to a property.`,field:`A summary field bound to a property.`,title:`The display title of a screen or section.`,label:`The display label of an action, column, or field.`,unique:"A uniqueness constraint — `unique <property> on <EventType>` or `unique event <EventType>`.",concurrency:"The concurrency scope enforced when the command appends events — dimensions: `eventSource`, `sourceType`, `streamType`, `streamId`, `events`.",eventSource:`Concurrency dimension — scope the check to the event source id of the command.`,sourceType:`Concurrency dimension — scope the check to an event source type.`,streamType:`Concurrency dimension — scope the check to an event stream type.`,streamId:`Concurrency dimension — scope the check to an event stream id.`,tag:"Attaches a tag to appended events — a static identifier or string, or a `$context.` expression resolved at append time.",seed:`Declares events to seed into the event store per event source id — multiple blocks accumulate.`,for:"Names the event source of a production or seed group. Inside `produces event`, omission uses the command identifier unless another production targets a different source.",readmodel:"Declares a read model — its name and properties — in a slice, or, in a specification, read model state: `given readmodel` establishes it, `then readmodel` asserts it, `then no readmodel <View> for <key>` asserts keyed absence.",reducer:"Builds a read model from events with imperative code — `reducer <Name> => <ReadModel>` with an `on <EventType>` rule per event. Use it when a projection cannot express the transition.",specification:`Given/when/then acceptance criteria for a slice: prior events and state, the command, query or appended event under test, and the events, state, results, errors or denials that follow.`,dialog:"A dialog opened over the shell, or with `dialog template` a reusable dialog shape.",form:"A form bound to a command — `form <Name> for <Command>` with a `field` per input.",contribute:"Contributes entries to a slot of the shell — `contribute to Navigation` with `navigate to`, `label` and `order`.",button:'A toolbar button that invokes a State Change slice — `button <id> title "…" slice <Module>.<Feature>.<Slice> [emphasis primary|secondary|quiet] [icon <name>]`. The slice names the command and the dialog it opens.',navigation:"A navigation region of the shell — `navigation topbar` or `navigation sidebar`. A layout declares the application's regions with a `logo` and `item` lines; a module adds `inherits`, `extends` or `overrides` to change what it shows.",theme:`A named theme and the component packages it is compatible with.`,sample:"Sample data — `sample data <Name>` declares a pack of demo rows per `shape` that a design surface or preview shows instead of a backend. Design and preview time only; it never reaches backend or production output. The application picks its active pack once, in the `ui profile`.",active:"The active sample data pack of the whole application, chosen once in the `ui profile` `sample data` block — one declared in the document, or `blueprint <id>` for one a blueprint ships.",bind:"Binds one read model to a sample data pack — `bind <ReadModel> to <pack>` — a rare override of the active pack for that read model only.",maps:"Maps a sample data shape to the read model it supplies rows for — `shape <Shape> maps to <ReadModel>` — where the names differ.",row:"One row of a sample data shape: `<field> = <literal>` lines, each field a property of the read model.",locale:"The BCP 47 locale tag of a sample data pack, such as `nb-NO`.",shape:"In sample data, the shape a set of rows is for; it matches the read model of the same name or the one a `ui profile` maps it to.",root:'In a `ui profile`, `root template [blueprint <Blueprint>] <Name> [version "<range>"]` names the template the whole application is drawn in, with `option <name> <value>` lines for what the shell exposes.',appearance:'In a `ui profile`, the `appearance` block holds `color scheme light|dark|system` and `accent "<#hex>"`.',accent:'In a `ui profile` `appearance` block, `accent "<#hex>"` is the accent colour of the application.',scheme:"In a `ui profile` `appearance` block, `color scheme light|dark|system` is the colour scheme of the application.",screens:"In a `ui profile`, `new screens use template [blueprint <Blueprint>] <Name>` is the template a new screen starts from.",ui:"A UI profile — `ui profile <Name>` binds a target platform and size to a layout, theme and packages.",behavior:"A named interaction wiring of `on <interaction>` handlers, attached to a screen, form or dialog with `uses`.",system:`An application-scoped external system that operations use.`,eventsource:`An application-owned event source with nested streams.`,operation:`A reusable operation intent that uses one external system.`,no:"A keyed absence assertion: `then no readmodel <View> for <key>`.",arguments:"The values supplied to a query asserted by `then query`.",result:"One expected result - `then result [exactly]` after `when query`, or a `result` block inside `then query`. Repeat it to assert several results in authored order.",clock:'The instant a specification happens at - `given clock "2026-10-05T08:00:00Z"` fixes when everything occurs, including every generated pattern date segment at that same UTC instant. Without given clock, generation fixtures check date digit widths only, never the wall clock. `when clock "<instant>"` is the clock reaching it, as the action.',exactly:"Requires every property to match, rather than only the ones asserted - on `then readmodel`, `then query` and `then result`.",file:`Delegates the implementation to an external file; the Screenplay contract stays visible.`,key:`Trailing modifier on a required top-level read-model property. Explicit keys replace inference. Composite keys remain authoring-only (PLAY0268, #599).`,stream:`On a command event production, replaces the whole command route for that event. Other productions keep the command route. Admitted by ESM v10.`,by:`Introduces one identifying parameter or a block of at least two named key parts. Reads use part = source; queries use part Type.`,via:`Connects screen data to the query that supplies it.`,filter:`An optional query filter parameter.`,on:"The event a constraint applies to, the day a schedule narrows to, or a widget interaction such as `on row-click`.",message:`The validation message reported when the rule fails.`,matches:"Searches text using the portable flagless JavaScript match dialect, or `email`. Use ^ and $ for the whole input. Exact Studio text-rule lookarounds warn with PLAY0787 and lower to ordinal rules; other lookarounds, backreferences and refused constructs report PLAY0699; patterns have at most 1000 source code units and 3000 expanded nodes, including optional, loop and alternative choice points.",all:`Applies a comparison to every element of a collection.`,max:`Maximum length or value.`,min:`Minimum length or value.`,length:`Constrains the exact length of a value.`,today:`The current date.`,empty:"Used with `not empty` — text needs a non-whitespace character; null, empty and whitespace-only text fail. Unicode White_Space is U+0009–U+000D, U+0020, U+0085, U+00A0, U+1680, U+2000–U+200A, U+2028, U+2029, U+202F, U+205F and U+3000 (not U+FEFF). Collections need at least one element. Applies to concept and command rules in every ESM version; no trimming. Identity text is unchanged: whitespace is a value.",not:"Negates a validation condition, as in `not empty`.",and:`Both conditions must hold.`,or:`Either condition may hold.`,csharp:"An inline C# block whose opening fence is ```csharp.",sql:`An inline SQL block between triple backticks — a query performer written against a relational store.`,typescript:`An inline TypeScript block between triple backticks.`,react:"An inline React/TSX block; receives the surrounding data contract as `Props`.",html:`An inline static HTML block.`,StateChange:`Slice type — a command → events flow; something that changes the system.`,StateView:`Slice type — a query + projection + screen; something that reads the system.`,Automation:`Slice type — a reaction or reducer; something that runs when something happens.`,Translate:`Slice type — a capture; converts external data into events.`,Uuid:`Primitive type — a universally unique identifier.`,String:`Primitive type — a string of characters.`,Int:`Primitive type — an integer number.`,Decimal:`Primitive type — a decimal number.`,Bool:`Primitive type — true or false.`,Date:`Primitive type — a date without time.`,DateTime:`Primitive type — a date and time.`,Enum:`An enumeration concept with named members. Members may all declare unique int32 numbers (draft = 1) or all omit them (zero-based positions). Never renumber or reuse a published number. Non-positional numbers select executable model (ESM) v12; consumers must explicitly admit v12. Specifications still name members.`},r={parameter:"Declares a required typed case value: `parameter <name> <Type>`. Every case assigns it once. `optional` permits literal null but supplies no default.",case:"One named complete row of a specification table. `case.<parameter>` substitutes a whole value after example overrides; each row runs as `<Specification>_<Case>`.",caller:"`given caller` states an explicit identity; `given caller as <Persona>` synthesizes an authenticated deterministic witness of the persona, with no body. Leftmost buildable policy alternatives are significant.",clock:n.clock,redelivered:n.redelivered,trigger:"`when trigger <Trigger>` - an application trigger fires, as the action, with the values on the lines beneath it.",capture:"`given capture <Capture>` - a record the capture's source held before; `when capture <Capture>` - the record it sees now, as the action. The fields go on the lines beneath.",query:"`when query <Query>` performs the query with arguments beneath it; assert returned rows with `then result` or genuine absence with `then no result`. From ESM v18, one actionless query with `then error` asserts exactly Validation and no other outcome. This also works with `then query` and an arguments block, without a result block.",events:"`then no events` - asserts the action appended no events, also after `when append`, where it means no reaction appended anything. Executable from ESM v17. Cannot accompany event, event-order, error or denial expectations.",result:"`then result [exactly]` - one result the query performed by `when query` returns, in order; `then no result` - it returns nothing."},i={pii:`personal data (GDPR Art. 4(1)); renders Chronicle [PII]. Bare suffix marker; @pii is deprecated (PLAY0565). Selects executable model (ESM) v13; consumers must explicitly admit it. Cannot classify identity or enum concepts. An event with personal values and an explicit subject mark refuses binding (PLAY0268) until lineage is admitted.`,personal:`Alias of pii: personal data (GDPR Art. 4(1)); renders Chronicle [PII]. No diagnostic; canonical printing writes pii. Selects executable model (ESM) v13, like pii.`,secret:`Operational secret, not personal data: encrypted at rest without erasure and withheld from causation. Provider mapping: [Encrypted] + [NotAudited], or [PII] only with pii. Selects executable model (ESM) v13; reference outcomes are unchanged. Cannot classify identity (PLAY0515) or enum concepts. Explicit scope is omitted next to pii. An event combining secret scope subject with an explicit subject mark refuses binding (PLAY0268).`,sensitive:`Deprecated spelling of secret (PLAY0565); repair to bare secret. Operational secret, not GDPR Art. 9 special-category data.`},a={"$context.occurred":`When the command or query was received.`,"$context.tenant":`The tenant the command or query is executing for.`,"$context.command":"The command being handled, shaped by its `command` declaration.","$context.arguments":`The arguments of the query being performed.`,"$context.causedBy":"The identity that caused the command or query — `subject`, `name`, `userName`.","$context.causedBy.subject":`The subject of the identity that caused the command or query.`,"$context.causedBy.name":`The display name of the identity that caused the command or query.`,"$context.causedBy.userName":`The user name of the identity that caused the command or query.`,"$context.causation":"What caused the command or query — `type`, `occurred`, `properties`.","$context.causation.type":`What caused the command or query — a command, a reactor, a schedule.`,$identity:"The caller — token built-ins `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`, plus declared identity details. Built-ins are equivalent to `$context.identity`; details are authoring-only until admitted (#600).","$identity.id":"The identifier of the caller from the auth token; equivalent to `$context.identity.id`.","$identity.name":"The display name of the caller; equivalent to `$context.identity.name`.","$identity.userName":"The user name of the caller; equivalent to `$context.identity.userName`.","$identity.isAuthenticated":`Whether the caller is authenticated.`,"$identity.roles":`The roles the caller holds.`,"$identity.claims":"The claims the caller carries — `$identity.claims.<name>` reads one.","$context.identity":"The caller a decision is made about — `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.","$context.identity.id":`The identifier of the caller from the auth token.`,"$context.identity.name":`The display name of the caller.`,"$context.identity.userName":`The user name of the caller.`,"$context.identity.isAuthenticated":`Whether the caller is authenticated.`,"$context.identity.roles":`The roles the caller holds.`,"$context.identity.claims":"The claims the caller carries — `$context.identity.claims.<name>` reads one.",$env:"An environment variable, e.g. `$env.SERVICE_NAME`.",$secrets:"An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` — stays symbolic in the compiled tree.",$strings:"A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.",...Object.fromEntries(e.map(e=>[`$eventContext.${e.path}`,e.description]))},o={racialOrEthnicOrigin:`Data revealing a person's racial or ethnic origin (GDPR Art. 9(1)).`,politicalOpinions:`Data revealing a person's political opinions (GDPR Art. 9(1)).`,religiousOrPhilosophicalBeliefs:`Data revealing a person's religious or philosophical beliefs (GDPR Art. 9(1)).`,tradeUnionMembership:`Data revealing whether a person belongs to a trade union (GDPR Art. 9(1)).`,genetic:`Data about inherited or acquired genetic characteristics that gives unique information about a person's physiology or health (GDPR Art. 9(1), Art. 4(13)).`,biometric:`Data from technical processing of physical, physiological or behavioral characteristics, special only when processed to uniquely identify a person (GDPR Art. 9(1), Art. 4(14)).`,health:`Data about a person's physical or mental health, including health care services, that reveals their health status (GDPR Art. 9(1), Art. 4(15)).`,sexLifeOrSexualOrientation:`Data concerning a person's sex life or sexual orientation (GDPR Art. 9(1)).`};export{i as attributeDocs,a as contextVariableDocs,t as handlerIntentDocs,n as keywordDocs,o as specialCategoryDocs,r as specificationKeywordDocs};
|
|
1
|
+
import"./_virtual/_virtual/_rolldown/runtime.js";import{eventContextPaths as e}from"./event-context-catalog.js";import"./event-context.js";const t={implementation:`Handler-only intent with ordered hints and at most one file or tagged fence. No payload means pending. Handler execution is unsupported; this is not confirmation.`,hint:`One nonblank quoted implementation hint. Order and decoded text are retained; hints do not execute or confirm code.`},n={parameter:`A typed value declared by a specification table, or an argument of a named behavior. Table types are required; every case supplies each parameter exactly once.`,case:`One named concrete row of a specification table, expanded as <Specification>_<Case>. Use case.<parameter> for a whole step value.`,example:"One typed, possibly partial fixture: `example <Name> : <EventOrCommandOrReadModel>`. Use its name in a matching specification step; assignments override example values without changing matching or supplying defaults. Event examples may carry stream or no stream; a step replaces that route as a whole.",domain:`The domain the file belongs to — optional, at most one per file, before everything else.`,import:'Imports a type from another module by its qualified name — `import Module.Type` — making it available by its short name; or, quoted, other `.play` files by path or glob — `import "Orders/**/*.play"`, relative to this file\'s folder. Written inside a module or feature, a file import places the imported files there: their top level is that module\'s or feature\'s body. `import Module.Event from "origin"` is instead public contract metadata with an opaque origin; executable binding refuses it with PLAY0268.',concept:`A formalized value type wrapping a primitive. Bare pii and secret markers travel with every usage, with optional concept notes and qualifiers.`,type:`A composite value type — a named shape built from several properties, referenced by events, commands and other types the same way a concept is.`,reason:`A free-text concept note, not a lawful basis. Written as pii reason "..." or secret reason "..."; migration preserves it verbatim.`,optional:"Allows a value to be absent. Write it after the type: `note String optional` or `lines InvoiceLine[] optional`. The collection itself may be absent; its items keep their declared type.",identifier:`Marks the command property a runtime resolves the event source id from. At most one per command; without it a new Uuid is generated.`,policy:`A named authorization rule referenced by commands and queries. Multiple policies AND together.`,purpose:`A report-only processing declaration (GDPR Art. 30), referenced on modules, features and slices. Coverage is their union, not an authorization gate. Generated declarations are not legal advice.`,basis:`One declared Art. 6(1) basis: consent, contract, legalObligation, vitalInterests, publicTask or legitimateInterests; an optional quoted reference may follow.`,interest:`The legitimate-interest statement for basis legitimateInterests (Art. 13(1)(d)).`,condition:`One Art. 9(2) processing condition, optionally followed by a quoted reference.`,subjects:`Comma-separated categories of data subjects, as open identifiers.`,retention:`Declared retention period or criteria, not enforced by the model or Chronicle.`,recipient:`A quoted recipient category; repeatable on a purpose.`,transfer:`A declared destination followed by safeguard and quoted safeguards; repeatable.`,safeguard:`The declared safeguard accompanying a third-country transfer.`,erasure:`An erasure exception under Art. 17(3); Chronicle crypto-shredding remains per subject, not per purpose.`,exception:`One declared Art. 17(3) exception: expression, legalObligation, publicTask, publicHealth, archiving or legalClaims.`,persona:`A named role interacting with the application, with an optional description and its associated policies.`,identity:"Declares typed additional caller details from a claim, a keyed single-result query, inline code or a file. Authoring metadata only; executable use of `$identity.<detail>` reports PLAY0268 until admitted (#600).",authentication:`Declares the identity providers of the application — at most one block per file.`,provider:"A named identity provider within `authentication`, with free-form `name value` settings.",description:"A human-readable description, including the rule or case a specification witnesses, as a quoted single line or a fenced ```text block for multiple lines.",depends:"Declares `depends on <Name>` on a module or feature. This opts only that container into checking counted explicit references against its own declarations; it does not change executable bytes.",module:`The top-level namespace — maps to a bounded context.`,layout:`A reusable screen template with named slots.`,template:'Names a template to fill or assign: `template <Name>` for an own template, `template blueprint <Blueprint> <Name> [version "<range>"]` for a template a blueprint package ships.',blueprint:"In `template blueprint <Blueprint> <Name>`, the blueprint package the template comes from. A `ui profile` should list it under `packages`. In `ui profile` `sample data`, `active blueprint <id>` selects a sample data pack a blueprint ships, resolved by the build against its packages.",version:'In `template blueprint ... version "<range>"`, the semver range of the blueprint the reference accepts, such as `^1.4`.',scopes:"Where a template may be used: `application`, `module`, `feature`, `subfeature` or `slice`. `slice` can be followed by the kinds `statechange` and `stateview`, such as `scopes slice statechange|stateview`.",category:`The group a template picker lists a layout or template under. Every layout and template needs one.`,feature:`A vertical slice grouping. Features nest arbitrarily deep.`,slice:`The atomic unit of behavior, aligned with Event Modeling. Has a type and a name.`,public:`Marks an event as a public contract. An event with from "origin" is also public. Origin is opaque, not a path or declaration reference. Public events and origins are admitted by executable semantic model (ESM) v9.`,direction:`Declare direction inbound or direction outbound once inside a Translate slice. Admitted by executable semantic model (ESM) v9; a Translate slice that uses public events must declare it (PLAY0614).`,inbound:`Inbound Translate direction metadata. No transport or delivery guarantee is implied.`,outbound:`Outbound Translate direction metadata. No transport or delivery guarantee is implied.`,event:"An immutable, past-tense fact. Declare it in a slice or inline with `produces event <Name>` in a command. Inline properties are typed mappings; inline tags belong to the event type.",documentation:"Authoring-only reasoning on a module, feature, slice, command, event, read model or reaction in one nonempty fenced ```markdown block. It does not change executable model bytes.",id:`Preserves the previous persisted event name after a rename. Leave absent on new events; repeating the current name is redundant.`,command:`An imperative intent. Declares authorization, validation, and what events it produces — declaratively, or via a full handler.`,query:`A read-side entry point mapping to a return type, with an optional description, parameters and performer. The by key and every supplied filter value satisfy their concept rules after authorization; violations reject with Validation, not an empty result.`,observable:"Qualifies a query return type as a live read — `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.",performer:"The code that performs a query — a `file <Path>` reference or an inline `csharp`/`sql` block. The query's counterpart to a command handler.",from:"On a reaction or reducer, `from Source[.Stream]` observes only matching routed facts. It does not filter stream ids. Admitted by ESM v10. On a query parameter, fills it from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.",projection:`Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).`,capture:`Converts external data into events, using the embedded Change Data Capture Language (CDL).`,protected:"Application-root `command reads protected` admits eligible command reads (ESM v25). Required absence rejects with Validation before derive/provide and requirements; a matching intervening fact yields Conflict/DecisionStateChanged without facts. Without the preamble, legacy reads retain their existing refusals. Targets must separately admit the version.",batches:"Application-root `reaction batches atomic` opts into ESM v22 atomic direct and refusal-branch batches. Invoked commands remain separate transactions.",atomic:`All productions in one reaction trigger occurrence or selected refusal branch are adopted together or not at all. Absence retains legacy per-fact semantics.`,reaction:"Behavior that runs when something happens. Lives inside Automation slices. A trigger with no body states intent on its own — `file`/code is optional realization metadata.",runs:'`runs as system [role "Role" and role "Role"]` declares the identity for every returned or invoked command of a reaction, not imperative pipeline calls. Admitted by released ESM v10; claims are unknown for this identity. Clock and application triggers have no Stage realization yet.',trigger:`Declares a kind of occurrence a reaction can respond to, and the values it hands the reaction. What makes one occur belongs to whoever provides it, never to the compiler.`,where:`Narrows which occurrences actually run the reaction.`,contains:"Ordinal UTF-16 text comparison: the value holds the literal operand anywhere. In validation, `not contains` negates it; absent optional values pass. An empty operand always occurs.",starts:'Use `starts with "text"` for an ordinal UTF-16 literal prefix validation rule or condition.',ends:'Use `ends with "text"` for an ordinal UTF-16 literal suffix validation rule. An absent optional value passes.',every:"Runs a reaction on an interval — `every 15 minutes`, `every 1 day`.",refused:"Ordered invocation refusal branch, executable from ESM v19: first match wins and stops remaining invocations of this trigger. Bare `on refused` covers validation and constraints, not authorization. Other reactions and cascades continue; contract errors, concurrency and Unsupported never match.",acknowledge:`A refusal branch acknowledges alone without facts, or produces events instead. Executable from ESM v19; handling stops remaining invocations of this trigger.`,validation:"In `on refused by validation`, selects error-severity property, concept and require refusals. Executable from ESM v19.",authorization:"In `on refused by authorization`, explicitly selects unauthorized results, never Unsupported. Executable from ESM v19; bare refusal excludes authorization.",redelivered:"`when redelivered <Event> to <Reaction>` selects exactly one effective given occurrence by optional for, stated values and stream or no stream, delivering that event again to one named reaction without appending it again. Executable from ESM v17.",invokes:`A command a reaction hands on. A command is asked for, not produced — it may still be rejected.`,screen:`A UI declaration. Supports intent, structure, and layout-with-code levels, or a full file reference.`,constraint:`A server-side rule enforced in the Chronicle kernel before events are committed.`,authorize:`References the policies that must all pass for the construct to execute.`,validate:"Declarative validation rules, or `validate` followed by ```csharp for imperative rules — on commands and concepts.",checksum:`String-concept validation: exact trailing luhn/mod11 digit or two mod97 digits over preceding ASCII digits. Also applies to supplied and stored values; generation does not silently add validation.`,luhn:`Luhn check digit, with standard parity from the right. Generation appends it; validate checksum luhn checks the arithmetic.`,mod11:`Check digit (11 - weighted sum modulo 11) modulo 11, weights 2..7 cycling from the right. Output 10 is excluded from generation support.`,mod97:`ISO 7064 MOD 97-10, two zero-padded trailing digits. Validation checks the exact computed suffix, not only congruence.`,produces:"References a declared event with `produces <Name>`, or declares one inline with `produces event <Name>`. An inline omitted `for` uses the command identifier only when all destinations are the same source; legacy plain omission allocates an identity.",reads:"Declares a view consulted by a command or reaction trigger: `reads <View> [as <alias>] [by <value>]`. A reaction `by` names a value taken by its trigger; clock triggers cannot use `by`. A child by block supplies composite key parts by name, using part = source, but is refused for protected command reads (PLAY0781 ByParts). Repeated views require unique aliases. With `command reads protected`, command reads bind only over finite event-log projections keyed by event-source identity with removal handlers and required scalar non-generated input keys. Omitted `by` uses the command identifier. Single-level read/alias.property paths are admitted in validate require operands and produces mappings only. Reaction reads remain unadmitted.",as:"Names an instance of a view in a command or reaction trigger reads declaration, for example `reads Account as source by sourceId`.",handler:"A fully imperative command implementation — a `file <Path>` reference or an inline `csharp` block, instead of `produces`.",when:"Guards a produced event or a capture append with a condition. In a labeled screen action, `when item.<field> == <literal> execute <Command>` selects the first matching command. Inside on click, double click or select, block-form `when <condition>` selects one whole action list at gesture time.",rule:"Names a predicate. Bare, it states that a constraint exists without expressing what it computes — nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.",require:'A policy condition: `authenticated`, `role "..."`, or `claim "..." matches ...`. Unary `not` negates a condition or group; precedence is not, and, or.',authenticated:`Requires an authenticated caller.`,role:`Requires the caller to have the given role.`,claim:`Requires a claim on the caller to match a subject or value.`,subject:"In policy `matches subject`, the identifier of the thing acted on, not the caller. The caller is `$context.causedBy.subject`.",data:`Binds a read model to a screen through a query.`,action:'Makes a command available on a screen. `action "Label"` declares one button with ordered `when … execute` alternatives over the nearest data item or selected row. No subject hides it; commands still enforce authorization and validation.',otherwise:"The final fallback of a guarded action: `otherwise hidden` or `otherwise execute <Command>`. In an item interaction, bare `otherwise` opens a fallback action list. No subject runs nothing, including fallback; authorization never falls through.",hidden:`Hides a guarded action when no condition matches. Without a subject the action is always hidden, even with an execute fallback.`,execute:"Executes a command. A guarded screen action selects it by the first matching condition; explicit `with … from` bindings precede same-name item fields, its declared form and renderer input.",navigate:"Navigates to a screen, optionally passing a parameter with `by`.",section:`A named structural section of a screen.`,table:`A table widget over a read model or child collection.`,summary:`A summary widget showing labeled fields.`,column:`A table column bound to a property.`,field:`A summary field bound to a property.`,title:`The display title of a screen or section.`,label:`The display label of an action, column, or field.`,unique:"A uniqueness constraint — `unique <property> on <EventType>` or `unique event <EventType>`.",concurrency:"The concurrency scope enforced when the command appends events — dimensions: `eventSource`, `sourceType`, `streamType`, `streamId`, `events`.",eventSource:`Concurrency dimension — scope the check to the event source id of the command.`,sourceType:`Concurrency dimension — scope the check to an event source type.`,streamType:`Concurrency dimension — scope the check to an event stream type.`,streamId:`Concurrency dimension — scope the check to an event stream id.`,tag:"Attaches a tag to appended events — a static identifier or string, or a `$context.` expression resolved at append time.",seed:`Declares events to seed into the event store per event source id — multiple blocks accumulate.`,for:"Names the event source of a production or seed group. Inside `produces event`, omission uses the command identifier unless another production targets a different source.",readmodel:"Declares a read model — its name and properties — in a slice, or, in a specification, read model state: `given readmodel` establishes it, `then readmodel` asserts it, `then no readmodel <View> for <key>` asserts keyed absence.",reducer:"Builds a read model from events with imperative code — `reducer <Name> => <ReadModel>` with an `on <EventType>` rule per event. Use it when a projection cannot express the transition.",specification:`Given/when/then acceptance criteria for a slice: prior events and state, the command, query or appended event under test, and the events, state, results, errors or denials that follow.`,dialog:"A dialog opened over the shell, or with `dialog template` a reusable dialog shape.",form:"A form bound to a command — `form <Name> for <Command>` with a `field` per input.",contribute:"Contributes entries to a slot of the shell — `contribute to Navigation` with `navigate to`, `label` and `order`.",button:'A toolbar button that invokes a State Change slice — `button <id> title "…" slice <Module>.<Feature>.<Slice> [emphasis primary|secondary|quiet] [icon <name>]`. The slice names the command and the dialog it opens.',navigation:"A navigation region of the shell — `navigation topbar` or `navigation sidebar`. A layout declares the application's regions with a `logo` and `item` lines; a module adds `inherits`, `extends` or `overrides` to change what it shows.",theme:`A named theme and the component packages it is compatible with.`,sample:"Sample data — `sample data <Name>` declares a pack of demo rows per `shape` that a design surface or preview shows instead of a backend. Design and preview time only; it never reaches backend or production output. The application picks its active pack once, in the `ui profile`.",active:"The active sample data pack of the whole application, chosen once in the `ui profile` `sample data` block — one declared in the document, or `blueprint <id>` for one a blueprint ships.",bind:"Binds one read model to a sample data pack — `bind <ReadModel> to <pack>` — a rare override of the active pack for that read model only.",maps:"Maps a sample data shape to the read model it supplies rows for — `shape <Shape> maps to <ReadModel>` — where the names differ.",row:"One row of a sample data shape: `<field> = <literal>` lines, each field a property of the read model.",locale:"The BCP 47 locale tag of a sample data pack, such as `nb-NO`.",shape:"In sample data, the shape a set of rows is for; it matches the read model of the same name or the one a `ui profile` maps it to.",root:'In a `ui profile`, `root template [blueprint <Blueprint>] <Name> [version "<range>"]` names the template the whole application is drawn in, with `option <name> <value>` lines for what the shell exposes.',appearance:'In a `ui profile`, the `appearance` block holds `color scheme light|dark|system` and `accent "<#hex>"`.',accent:'In a `ui profile` `appearance` block, `accent "<#hex>"` is the accent colour of the application.',scheme:"In a `ui profile` `appearance` block, `color scheme light|dark|system` is the colour scheme of the application.",screens:"In a `ui profile`, `new screens use template [blueprint <Blueprint>] <Name>` is the template a new screen starts from.",ui:"A UI profile — `ui profile <Name>` binds a target platform and size to a layout, theme and packages.",behavior:"A named interaction wiring of `on <interaction>` handlers, attached to a screen, form or dialog with `uses`.",system:`An application-scoped external system that operations use.`,eventsource:`An application-owned event source with nested streams.`,operation:`A reusable operation intent that uses one external system.`,no:"A keyed absence assertion: `then no readmodel <View> for <key>`.",arguments:"The values supplied to a query asserted by `then query`.",result:"One expected result - `then result [exactly]` after `when query`, or a `result` block inside `then query`. Repeat it to assert several results in authored order.",clock:'The instant a specification happens at - `given clock "2026-10-05T08:00:00Z"` fixes when everything occurs, including every generated pattern date segment at that same UTC instant. Without given clock, generation fixtures check date digit widths only, never the wall clock. `when clock "<instant>"` is the clock reaching it, as the action.',exactly:"Requires every property to match, rather than only the ones asserted - on `then readmodel`, `then query` and `then result`.",file:`Delegates the implementation to an external file; the Screenplay contract stays visible.`,key:`Trailing modifier on a required top-level read-model property. Explicit keys replace inference. Composite keys remain authoring-only (PLAY0268, #599).`,stream:`On a command event production, replaces the whole command route for that event. Other productions keep the command route. Admitted by ESM v10.`,by:`Introduces one identifying parameter or a block of at least two named key parts. Reads use part = source; queries use part Type.`,via:`Connects screen data to the query that supplies it.`,filter:`An optional query filter parameter.`,on:"The event a constraint applies to, the day a schedule narrows to, or a widget interaction such as `on row-click`.",message:`The validation message reported when the rule fails.`,matches:"Searches text using the portable flagless JavaScript match dialect, or `email`. Use ^ and $ for the whole input. Exact Studio text-rule lookarounds warn with PLAY0787 and lower to ordinal rules; other lookarounds, backreferences and refused constructs report PLAY0699; patterns have at most 1000 source code units and 3000 expanded nodes, including optional, loop and alternative choice points.",all:`Applies a comparison to every element of a collection.`,max:`Maximum length or value.`,min:`Minimum length or value.`,length:`Constrains the exact length of a value.`,today:`The current date.`,empty:"Used with `not empty` — text needs a non-whitespace character; null, empty and whitespace-only text fail. Unicode White_Space is U+0009–U+000D, U+0020, U+0085, U+00A0, U+1680, U+2000–U+200A, U+2028, U+2029, U+202F, U+205F and U+3000 (not U+FEFF). Collections need at least one element. Applies to concept and command rules in every ESM version; no trimming. Identity text is unchanged: whitespace is a value.",not:"Negates a validation condition, as in `not empty`.",and:`Both conditions must hold.`,or:`Either condition may hold.`,csharp:"An inline C# block whose opening fence is ```csharp.",sql:`An inline SQL block between triple backticks — a query performer written against a relational store.`,typescript:`An inline TypeScript block between triple backticks.`,react:"An inline React/TSX block; receives the surrounding data contract as `Props`.",html:`An inline static HTML block.`,StateChange:`Slice type — a command → events flow; something that changes the system.`,StateView:`Slice type — a query + projection + screen; something that reads the system.`,Automation:`Slice type — a reaction or reducer; something that runs when something happens.`,Translate:`Slice type — a capture; converts external data into events.`,Uuid:`Primitive type — a universally unique identifier.`,String:`Primitive type — a string of characters.`,Int:`Primitive type — an integer number.`,Decimal:`Primitive type — a decimal number.`,Bool:`Primitive type — true or false.`,Date:`Primitive type — a calendar date without a time zone. ESM v26 admits all six comparisons in command require, produces when and command/property rules. Conditions use required same-primitive command properties or a literal; rules use literals only. Canonical literals use yyyy-MM-dd. Concept rules, reaction where, read paths, context and today stay refused.`,DateTime:`Primitive type — a date and time. ESM v26 command comparisons order UTC instants at tick precision, including equality across offsets. Compared input requires an explicit offset or Z before any rule runs; literals canonicalize to UTC with seven fractional digits and Z. Targets without tick precision refuse comparisons; client validators omit date ordering. Other equality stays ordinal.`,Enum:`An enumeration concept with named members. Members may all declare unique int32 numbers (draft = 1) or all omit them (zero-based positions). Never renumber or reuse a published number. Non-positional numbers select executable model (ESM) v12; consumers must explicitly admit v12. Specifications still name members.`},r={parameter:"Declares a required typed case value: `parameter <name> <Type>`. Every case assigns it once. `optional` permits literal null but supplies no default.",case:"One named complete row of a specification table. `case.<parameter>` substitutes a whole value after example overrides; each row runs as `<Specification>_<Case>`.",caller:"`given caller` states an explicit identity; `given caller as <Persona>` synthesizes an authenticated deterministic witness of the persona, with no body. Leftmost buildable policy alternatives are significant.",clock:n.clock,redelivered:n.redelivered,trigger:"`when trigger <Trigger>` - an application trigger fires, as the action, with the values on the lines beneath it.",capture:"`given capture <Capture>` - a record the capture's source held before; `when capture <Capture>` - the record it sees now, as the action. The fields go on the lines beneath.",query:"`when query <Query>` performs the query with arguments beneath it; assert returned rows with `then result` or genuine absence with `then no result`. From ESM v18, one actionless query with `then error` asserts exactly Validation and no other outcome. This also works with `then query` and an arguments block, without a result block.",events:"`then no events` - asserts the action appended no events, also after `when append`, where it means no reaction appended anything. Executable from ESM v17. Cannot accompany event, event-order, error or denial expectations.",result:"`then result [exactly]` - one result the query performed by `when query` returns, in order; `then no result` - it returns nothing."},i={pii:`personal data (GDPR Art. 4(1)); renders Chronicle [PII]. Bare suffix marker; @pii is deprecated (PLAY0565). Selects executable model (ESM) v13; consumers must explicitly admit it. Cannot classify identity or enum concepts. An event with personal values and an explicit subject mark refuses binding (PLAY0268) until lineage is admitted.`,personal:`Alias of pii: personal data (GDPR Art. 4(1)); renders Chronicle [PII]. No diagnostic; canonical printing writes pii. Selects executable model (ESM) v13, like pii.`,secret:`Operational secret, not personal data: encrypted at rest without erasure and withheld from causation. Provider mapping: [Encrypted] + [NotAudited], or [PII] only with pii. Selects executable model (ESM) v13; reference outcomes are unchanged. Cannot classify identity (PLAY0515) or enum concepts. Explicit scope is omitted next to pii. An event combining secret scope subject with an explicit subject mark refuses binding (PLAY0268).`,sensitive:`Deprecated spelling of secret (PLAY0565); repair to bare secret. Operational secret, not GDPR Art. 9 special-category data.`},a={"$context.occurred":`When the command or query was received.`,"$context.tenant":`The tenant the command or query is executing for.`,"$context.command":"The command being handled, shaped by its `command` declaration.","$context.arguments":`The arguments of the query being performed.`,"$context.causedBy":"The identity that caused the command or query — `subject`, `name`, `userName`.","$context.causedBy.subject":`The subject of the identity that caused the command or query.`,"$context.causedBy.name":`The display name of the identity that caused the command or query.`,"$context.causedBy.userName":`The user name of the identity that caused the command or query.`,"$context.causation":"What caused the command or query — `type`, `occurred`, `properties`.","$context.causation.type":`What caused the command or query — a command, a reactor, a schedule.`,$identity:"The caller — token built-ins `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`, plus declared identity details. Built-ins are equivalent to `$context.identity`; details are authoring-only until admitted (#600).","$identity.id":"The identifier of the caller from the auth token; equivalent to `$context.identity.id`.","$identity.name":"The display name of the caller; equivalent to `$context.identity.name`.","$identity.userName":"The user name of the caller; equivalent to `$context.identity.userName`.","$identity.isAuthenticated":`Whether the caller is authenticated.`,"$identity.roles":`The roles the caller holds.`,"$identity.claims":"The claims the caller carries — `$identity.claims.<name>` reads one.","$context.identity":"The caller a decision is made about — `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.","$context.identity.id":`The identifier of the caller from the auth token.`,"$context.identity.name":`The display name of the caller.`,"$context.identity.userName":`The user name of the caller.`,"$context.identity.isAuthenticated":`Whether the caller is authenticated.`,"$context.identity.roles":`The roles the caller holds.`,"$context.identity.claims":"The claims the caller carries — `$context.identity.claims.<name>` reads one.",$env:"An environment variable, e.g. `$env.SERVICE_NAME`.",$secrets:"An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` — stays symbolic in the compiled tree.",$strings:"A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.",...Object.fromEntries(e.map(e=>[`$eventContext.${e.path}`,e.description]))},o={racialOrEthnicOrigin:`Data revealing a person's racial or ethnic origin (GDPR Art. 9(1)).`,politicalOpinions:`Data revealing a person's political opinions (GDPR Art. 9(1)).`,religiousOrPhilosophicalBeliefs:`Data revealing a person's religious or philosophical beliefs (GDPR Art. 9(1)).`,tradeUnionMembership:`Data revealing whether a person belongs to a trade union (GDPR Art. 9(1)).`,genetic:`Data about inherited or acquired genetic characteristics that gives unique information about a person's physiology or health (GDPR Art. 9(1), Art. 4(13)).`,biometric:`Data from technical processing of physical, physiological or behavioral characteristics, special only when processed to uniquely identify a person (GDPR Art. 9(1), Art. 4(14)).`,health:`Data about a person's physical or mental health, including health care services, that reveals their health status (GDPR Art. 9(1), Art. 4(15)).`,sexLifeOrSexualOrientation:`Data concerning a person's sex life or sexual orientation (GDPR Art. 9(1)).`};export{i as attributeDocs,a as contextVariableDocs,t as handlerIntentDocs,n as keywordDocs,o as specialCategoryDocs,r as specificationKeywordDocs};
|
|
2
2
|
//# sourceMappingURL=keyword-docs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyword-docs.js","names":["handlerIntentDocs","keywordDocs","specificationKeywordDocs","attributeDocs","contextVariableDocs","\"$identity\"","\"$env\"","\"$secrets\"","\"$strings\"","eventContextPaths","path","specialCategoryDocs"],"sources":["../../keyword-docs.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 { eventContextPaths } from './event-context';\n\n// These words are contextual beneath a handler, never global property keywords.\nexport const handlerIntentDocs = {\n implementation: 'Handler-only intent with ordered hints and at most one file or tagged fence. No payload means pending. Handler execution is unsupported; this is not confirmation.',\n hint: 'One nonblank quoted implementation hint. Order and decoded text are retained; hints do not execute or confirm code.',\n};\n\nexport const keywordDocs: Record<string, string> = {\n parameter: 'A typed value declared by a specification table, or an argument of a named behavior. Table types are required; every case supplies each parameter exactly once.',\n case: 'One named concrete row of a specification table, expanded as <Specification>_<Case>. Use case.<parameter> for a whole step value.',\n example: 'One typed, possibly partial fixture: `example <Name> : <EventOrCommandOrReadModel>`. Use its name in a matching specification step; assignments override example values without changing matching or supplying defaults. Event examples may carry stream or no stream; a step replaces that route as a whole.',\n domain: 'The domain the file belongs to — optional, at most one per file, before everything else.',\n import: 'Imports a type from another module by its qualified name — `import Module.Type` — making it available by its short name; or, quoted, other `.play` files by path or glob — `import \"Orders/**/*.play\"`, relative to this file\\'s folder. Written inside a module or feature, a file import places the imported files there: their top level is that module\\'s or feature\\'s body. `import Module.Event from \"origin\"` is instead public contract metadata with an opaque origin; executable binding refuses it with PLAY0268.',\n concept: 'A formalized value type wrapping a primitive. Bare pii and secret markers travel with every usage, with optional concept notes and qualifiers.',\n type: 'A composite value type — a named shape built from several properties, referenced by events, commands and other types the same way a concept is.',\n reason: 'A free-text concept note, not a lawful basis. Written as pii reason \"...\" or secret reason \"...\"; migration preserves it verbatim.',\n optional: 'Allows a value to be absent. Write it after the type: `note String optional` or `lines InvoiceLine[] optional`. The collection itself may be absent; its items keep their declared type.',\n identifier: 'Marks the command property a runtime resolves the event source id from. At most one per command; without it a new Uuid is generated.',\n policy: 'A named authorization rule referenced by commands and queries. Multiple policies AND together.',\n purpose: 'A report-only processing declaration (GDPR Art. 30), referenced on modules, features and slices. Coverage is their union, not an authorization gate. Generated declarations are not legal advice.',\n basis: 'One declared Art. 6(1) basis: consent, contract, legalObligation, vitalInterests, publicTask or legitimateInterests; an optional quoted reference may follow.',\n interest: 'The legitimate-interest statement for basis legitimateInterests (Art. 13(1)(d)).',\n condition: 'One Art. 9(2) processing condition, optionally followed by a quoted reference.',\n subjects: 'Comma-separated categories of data subjects, as open identifiers.',\n retention: 'Declared retention period or criteria, not enforced by the model or Chronicle.',\n recipient: 'A quoted recipient category; repeatable on a purpose.',\n transfer: 'A declared destination followed by safeguard and quoted safeguards; repeatable.',\n safeguard: 'The declared safeguard accompanying a third-country transfer.',\n erasure: 'An erasure exception under Art. 17(3); Chronicle crypto-shredding remains per subject, not per purpose.',\n exception: 'One declared Art. 17(3) exception: expression, legalObligation, publicTask, publicHealth, archiving or legalClaims.',\n persona: 'A named role interacting with the application, with an optional description and its associated policies.',\n identity: 'Declares typed additional caller details from a claim, a keyed single-result query, inline code or a file. Authoring metadata only; executable use of `$identity.<detail>` reports PLAY0268 until admitted (#600).',\n authentication: 'Declares the identity providers of the application — at most one block per file.',\n provider: 'A named identity provider within `authentication`, with free-form `name value` settings.',\n description: 'A human-readable description, including the rule or case a specification witnesses, as a quoted single line or a fenced ```text block for multiple lines.',\n depends: 'Declares `depends on <Name>` on a module or feature. This opts only that container into checking counted explicit references against its own declarations; it does not change executable bytes.',\n module: 'The top-level namespace — maps to a bounded context.',\n layout: 'A reusable screen template with named slots.',\n template: 'Names a template to fill or assign: `template <Name>` for an own template, `template blueprint <Blueprint> <Name> [version \"<range>\"]` for a template a blueprint package ships.',\n blueprint: 'In `template blueprint <Blueprint> <Name>`, the blueprint package the template comes from. A `ui profile` should list it under `packages`. In `ui profile` `sample data`, `active blueprint <id>` selects a sample data pack a blueprint ships, resolved by the build against its packages.',\n version: 'In `template blueprint ... version \"<range>\"`, the semver range of the blueprint the reference accepts, such as `^1.4`.',\n scopes: 'Where a template may be used: `application`, `module`, `feature`, `subfeature` or `slice`. `slice` can be followed by the kinds `statechange` and `stateview`, such as `scopes slice statechange|stateview`.',\n category: 'The group a template picker lists a layout or template under. Every layout and template needs one.',\n feature: 'A vertical slice grouping. Features nest arbitrarily deep.',\n slice: 'The atomic unit of behavior, aligned with Event Modeling. Has a type and a name.',\n public: 'Marks an event as a public contract. An event with from \"origin\" is also public. Origin is opaque, not a path or declaration reference. Public events and origins are admitted by executable semantic model (ESM) v9.',\n direction: 'Declare direction inbound or direction outbound once inside a Translate slice. Admitted by executable semantic model (ESM) v9; a Translate slice that uses public events must declare it (PLAY0614).',\n inbound: 'Inbound Translate direction metadata. No transport or delivery guarantee is implied.',\n outbound: 'Outbound Translate direction metadata. No transport or delivery guarantee is implied.',\n event: 'An immutable, past-tense fact. Declare it in a slice or inline with `produces event <Name>` in a command. Inline properties are typed mappings; inline tags belong to the event type.',\n documentation: 'Authoring-only reasoning on a module, feature, slice, command, event, read model or reaction in one nonempty fenced ```markdown block. It does not change executable model bytes.',\n id: 'Preserves the previous persisted event name after a rename. Leave absent on new events; repeating the current name is redundant.',\n command: 'An imperative intent. Declares authorization, validation, and what events it produces — declaratively, or via a full handler.',\n query: 'A read-side entry point mapping to a return type, with an optional description, parameters and performer. The by key and every supplied filter value satisfy their concept rules after authorization; violations reject with Validation, not an empty result.',\n observable: 'Qualifies a query return type as a live read — `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.',\n performer: 'The code that performs a query — a `file <Path>` reference or an inline `csharp`/`sql` block. The query\\'s counterpart to a command handler.',\n from: 'On a reaction or reducer, `from Source[.Stream]` observes only matching routed facts. It does not filter stream ids. Admitted by ESM v10. On a query parameter, fills it from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.',\n projection: 'Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).',\n capture: 'Converts external data into events, using the embedded Change Data Capture Language (CDL).',\n protected: 'Application-root `command reads protected` admits eligible command reads (ESM v25). Required absence rejects with Validation before derive/provide and requirements; a matching intervening fact yields Conflict/DecisionStateChanged without facts. Without the preamble, legacy reads retain their existing refusals. Targets must separately admit the version.',\n batches: 'Application-root `reaction batches atomic` opts into ESM v22 atomic direct and refusal-branch batches. Invoked commands remain separate transactions.',\n atomic: 'All productions in one reaction trigger occurrence or selected refusal branch are adopted together or not at all. Absence retains legacy per-fact semantics.',\n reaction: 'Behavior that runs when something happens. Lives inside Automation slices. A trigger with no body states intent on its own — `file`/code is optional realization metadata.',\n runs: '`runs as system [role \"Role\" and role \"Role\"]` declares the identity for every returned or invoked command of a reaction, not imperative pipeline calls. Admitted by released ESM v10; claims are unknown for this identity. Clock and application triggers have no Stage realization yet.',\n trigger: 'Declares a kind of occurrence a reaction can respond to, and the values it hands the reaction. What makes one occur belongs to whoever provides it, never to the compiler.',\n where: 'Narrows which occurrences actually run the reaction.',\n contains: 'Ordinal UTF-16 text comparison: the value holds the literal operand anywhere. In validation, `not contains` negates it; absent optional values pass. An empty operand always occurs.',\n starts: 'Use `starts with \"text\"` for an ordinal UTF-16 literal prefix validation rule or condition.',\n ends: 'Use `ends with \"text\"` for an ordinal UTF-16 literal suffix validation rule. An absent optional value passes.',\n every: 'Runs a reaction on an interval — `every 15 minutes`, `every 1 day`.',\n refused: 'Ordered invocation refusal branch, executable from ESM v19: first match wins and stops remaining invocations of this trigger. Bare `on refused` covers validation and constraints, not authorization. Other reactions and cascades continue; contract errors, concurrency and Unsupported never match.',\n acknowledge: 'A refusal branch acknowledges alone without facts, or produces events instead. Executable from ESM v19; handling stops remaining invocations of this trigger.',\n validation: 'In `on refused by validation`, selects error-severity property, concept and require refusals. Executable from ESM v19.',\n authorization: 'In `on refused by authorization`, explicitly selects unauthorized results, never Unsupported. Executable from ESM v19; bare refusal excludes authorization.',\n redelivered: '`when redelivered <Event> to <Reaction>` selects exactly one effective given occurrence by optional for, stated values and stream or no stream, delivering that event again to one named reaction without appending it again. Executable from ESM v17.',\n invokes: 'A command a reaction hands on. A command is asked for, not produced — it may still be rejected.',\n screen: 'A UI declaration. Supports intent, structure, and layout-with-code levels, or a full file reference.',\n constraint: 'A server-side rule enforced in the Chronicle kernel before events are committed.',\n authorize: 'References the policies that must all pass for the construct to execute.',\n validate: 'Declarative validation rules, or `validate` followed by ```csharp for imperative rules — on commands and concepts.',\n checksum: 'String-concept validation: exact trailing luhn/mod11 digit or two mod97 digits over preceding ASCII digits. Also applies to supplied and stored values; generation does not silently add validation.',\n luhn: 'Luhn check digit, with standard parity from the right. Generation appends it; validate checksum luhn checks the arithmetic.',\n mod11: 'Check digit (11 - weighted sum modulo 11) modulo 11, weights 2..7 cycling from the right. Output 10 is excluded from generation support.',\n mod97: 'ISO 7064 MOD 97-10, two zero-padded trailing digits. Validation checks the exact computed suffix, not only congruence.',\n produces: 'References a declared event with `produces <Name>`, or declares one inline with `produces event <Name>`. An inline omitted `for` uses the command identifier only when all destinations are the same source; legacy plain omission allocates an identity.',\n reads: 'Declares a view consulted by a command or reaction trigger: `reads <View> [as <alias>] [by <value>]`. A reaction `by` names a value taken by its trigger; clock triggers cannot use `by`. A child by block supplies composite key parts by name, using part = source, but is refused for protected command reads (PLAY0781 ByParts). Repeated views require unique aliases. With `command reads protected`, command reads bind only over finite event-log projections keyed by event-source identity with removal handlers and required scalar non-generated input keys. Omitted `by` uses the command identifier. Single-level read/alias.property paths are admitted in validate require operands and produces mappings only. Reaction reads remain unadmitted.',\n as: 'Names an instance of a view in a command or reaction trigger reads declaration, for example `reads Account as source by sourceId`.',\n handler: 'A fully imperative command implementation — a `file <Path>` reference or an inline `csharp` block, instead of `produces`.',\n when: 'Guards a produced event or a capture append with a condition. In a labeled screen action, `when item.<field> == <literal> execute <Command>` selects the first matching command. Inside on click, double click or select, block-form `when <condition>` selects one whole action list at gesture time.',\n rule: 'Names a predicate. Bare, it states that a constraint exists without expressing what it computes — nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.',\n require: 'A policy condition: `authenticated`, `role \"...\"`, or `claim \"...\" matches ...`. Unary `not` negates a condition or group; precedence is not, and, or.',\n authenticated: 'Requires an authenticated caller.',\n role: 'Requires the caller to have the given role.',\n claim: 'Requires a claim on the caller to match a subject or value.',\n subject: 'In policy `matches subject`, the identifier of the thing acted on, not the caller. The caller is `$context.causedBy.subject`.',\n data: 'Binds a read model to a screen through a query.',\n action: 'Makes a command available on a screen. `action \"Label\"` declares one button with ordered `when … execute` alternatives over the nearest data item or selected row. No subject hides it; commands still enforce authorization and validation.',\n otherwise: 'The final fallback of a guarded action: `otherwise hidden` or `otherwise execute <Command>`. In an item interaction, bare `otherwise` opens a fallback action list. No subject runs nothing, including fallback; authorization never falls through.',\n hidden: 'Hides a guarded action when no condition matches. Without a subject the action is always hidden, even with an execute fallback.',\n execute: 'Executes a command. A guarded screen action selects it by the first matching condition; explicit `with … from` bindings precede same-name item fields, its declared form and renderer input.',\n navigate: 'Navigates to a screen, optionally passing a parameter with `by`.',\n section: 'A named structural section of a screen.',\n table: 'A table widget over a read model or child collection.',\n summary: 'A summary widget showing labeled fields.',\n column: 'A table column bound to a property.',\n field: 'A summary field bound to a property.',\n title: 'The display title of a screen or section.',\n label: 'The display label of an action, column, or field.',\n unique: 'A uniqueness constraint — `unique <property> on <EventType>` or `unique event <EventType>`.',\n concurrency: 'The concurrency scope enforced when the command appends events — dimensions: `eventSource`, `sourceType`, `streamType`, `streamId`, `events`.',\n eventSource: 'Concurrency dimension — scope the check to the event source id of the command.',\n sourceType: 'Concurrency dimension — scope the check to an event source type.',\n streamType: 'Concurrency dimension — scope the check to an event stream type.',\n streamId: 'Concurrency dimension — scope the check to an event stream id.',\n tag: 'Attaches a tag to appended events — a static identifier or string, or a `$context.` expression resolved at append time.',\n seed: 'Declares events to seed into the event store per event source id — multiple blocks accumulate.',\n for: 'Names the event source of a production or seed group. Inside `produces event`, omission uses the command identifier unless another production targets a different source.',\n readmodel: 'Declares a read model — its name and properties — in a slice, or, in a specification, read model state: `given readmodel` establishes it, `then readmodel` asserts it, `then no readmodel <View> for <key>` asserts keyed absence.',\n reducer: 'Builds a read model from events with imperative code — `reducer <Name> => <ReadModel>` with an `on <EventType>` rule per event. Use it when a projection cannot express the transition.',\n specification: 'Given/when/then acceptance criteria for a slice: prior events and state, the command, query or appended event under test, and the events, state, results, errors or denials that follow.',\n dialog: 'A dialog opened over the shell, or with `dialog template` a reusable dialog shape.',\n form: 'A form bound to a command — `form <Name> for <Command>` with a `field` per input.',\n contribute: 'Contributes entries to a slot of the shell — `contribute to Navigation` with `navigate to`, `label` and `order`.',\n button: 'A toolbar button that invokes a State Change slice — `button <id> title \"…\" slice <Module>.<Feature>.<Slice> [emphasis primary|secondary|quiet] [icon <name>]`. The slice names the command and the dialog it opens.',\n navigation: 'A navigation region of the shell — `navigation topbar` or `navigation sidebar`. A layout declares the application\\'s regions with a `logo` and `item` lines; a module adds `inherits`, `extends` or `overrides` to change what it shows.',\n theme: 'A named theme and the component packages it is compatible with.',\n sample: 'Sample data — `sample data <Name>` declares a pack of demo rows per `shape` that a design surface or preview shows instead of a backend. Design and preview time only; it never reaches backend or production output. The application picks its active pack once, in the `ui profile`.',\n active: 'The active sample data pack of the whole application, chosen once in the `ui profile` `sample data` block — one declared in the document, or `blueprint <id>` for one a blueprint ships.',\n bind: 'Binds one read model to a sample data pack — `bind <ReadModel> to <pack>` — a rare override of the active pack for that read model only.',\n maps: 'Maps a sample data shape to the read model it supplies rows for — `shape <Shape> maps to <ReadModel>` — where the names differ.',\n row: 'One row of a sample data shape: `<field> = <literal>` lines, each field a property of the read model.',\n locale: 'The BCP 47 locale tag of a sample data pack, such as `nb-NO`.',\n shape: 'In sample data, the shape a set of rows is for; it matches the read model of the same name or the one a `ui profile` maps it to.',\n root: 'In a `ui profile`, `root template [blueprint <Blueprint>] <Name> [version \"<range>\"]` names the template the whole application is drawn in, with `option <name> <value>` lines for what the shell exposes.',\n appearance: 'In a `ui profile`, the `appearance` block holds `color scheme light|dark|system` and `accent \"<#hex>\"`.',\n accent: 'In a `ui profile` `appearance` block, `accent \"<#hex>\"` is the accent colour of the application.',\n scheme: 'In a `ui profile` `appearance` block, `color scheme light|dark|system` is the colour scheme of the application.',\n screens: 'In a `ui profile`, `new screens use template [blueprint <Blueprint>] <Name>` is the template a new screen starts from.',\n ui: 'A UI profile — `ui profile <Name>` binds a target platform and size to a layout, theme and packages.',\n behavior: 'A named interaction wiring of `on <interaction>` handlers, attached to a screen, form or dialog with `uses`.',\n system: 'An application-scoped external system that operations use.',\n eventsource: 'An application-owned event source with nested streams.',\n operation: 'A reusable operation intent that uses one external system.',\n no: 'A keyed absence assertion: `then no readmodel <View> for <key>`.',\n arguments: 'The values supplied to a query asserted by `then query`.',\n result: 'One expected result - `then result [exactly]` after `when query`, or a `result` block inside `then query`. Repeat it to assert several results in authored order.',\n clock: 'The instant a specification happens at - `given clock \"2026-10-05T08:00:00Z\"` fixes when everything occurs, including every generated pattern date segment at that same UTC instant. Without given clock, generation fixtures check date digit widths only, never the wall clock. `when clock \"<instant>\"` is the clock reaching it, as the action.',\n exactly: 'Requires every property to match, rather than only the ones asserted - on `then readmodel`, `then query` and `then result`.',\n file: 'Delegates the implementation to an external file; the Screenplay contract stays visible.',\n key: 'Trailing modifier on a required top-level read-model property. Explicit keys replace inference. Composite keys remain authoring-only (PLAY0268, #599).',\n stream: 'On a command event production, replaces the whole command route for that event. Other productions keep the command route. Admitted by ESM v10.',\n by: 'Introduces one identifying parameter or a block of at least two named key parts. Reads use part = source; queries use part Type.',\n via: 'Connects screen data to the query that supplies it.',\n filter: 'An optional query filter parameter.',\n on: 'The event a constraint applies to, the day a schedule narrows to, or a widget interaction such as `on row-click`.',\n message: 'The validation message reported when the rule fails.',\n matches: 'Searches text using the portable flagless JavaScript match dialect, or `email`. Use ^ and $ for the whole input. Exact Studio text-rule lookarounds warn with PLAY0787 and lower to ordinal rules; other lookarounds, backreferences and refused constructs report PLAY0699; patterns have at most 1000 source code units and 3000 expanded nodes, including optional, loop and alternative choice points.',\n all: 'Applies a comparison to every element of a collection.',\n max: 'Maximum length or value.',\n min: 'Minimum length or value.',\n length: 'Constrains the exact length of a value.',\n today: 'The current date.',\n empty: 'Used with `not empty` — text needs a non-whitespace character; null, empty and whitespace-only text fail. Unicode White_Space is U+0009–U+000D, U+0020, U+0085, U+00A0, U+1680, U+2000–U+200A, U+2028, U+2029, U+202F, U+205F and U+3000 (not U+FEFF). Collections need at least one element. Applies to concept and command rules in every ESM version; no trimming. Identity text is unchanged: whitespace is a value.',\n not: 'Negates a validation condition, as in `not empty`.',\n and: 'Both conditions must hold.',\n or: 'Either condition may hold.',\n csharp: 'An inline C# block whose opening fence is ```csharp.',\n sql: 'An inline SQL block between triple backticks — a query performer written against a relational store.',\n typescript: 'An inline TypeScript block between triple backticks.',\n react: 'An inline React/TSX block; receives the surrounding data contract as `Props`.',\n html: 'An inline static HTML block.',\n StateChange: 'Slice type — a command → events flow; something that changes the system.',\n StateView: 'Slice type — a query + projection + screen; something that reads the system.',\n Automation: 'Slice type — a reaction or reducer; something that runs when something happens.',\n Translate: 'Slice type — a capture; converts external data into events.',\n Uuid: 'Primitive type — a universally unique identifier.',\n String: 'Primitive type — a string of characters.',\n Int: 'Primitive type — an integer number.',\n Decimal: 'Primitive type — a decimal number.',\n Bool: 'Primitive type — true or false.',\n Date: 'Primitive type — a date without time.',\n DateTime: 'Primitive type — a date and time.',\n Enum: 'An enumeration concept with named members. Members may all declare unique int32 numbers (draft = 1) or all omit them (zero-based positions). Never renumber or reuse a published number. Non-positional numbers select executable model (ESM) v12; consumers must explicitly admit v12. Specifications still name members.',\n};\n\n// What the words of a specification's steps mean there - where 'trigger', 'capture' and 'query' name what the\n// scenario exercises rather than declare one.\nexport const specificationKeywordDocs: Record<string, string> = {\n parameter: 'Declares a required typed case value: `parameter <name> <Type>`. Every case assigns it once. `optional` permits literal null but supplies no default.',\n case: 'One named complete row of a specification table. `case.<parameter>` substitutes a whole value after example overrides; each row runs as `<Specification>_<Case>`.',\n caller: '`given caller` states an explicit identity; `given caller as <Persona>` synthesizes an authenticated deterministic witness of the persona, with no body. Leftmost buildable policy alternatives are significant.',\n clock: keywordDocs.clock,\n redelivered: keywordDocs.redelivered,\n trigger: '`when trigger <Trigger>` - an application trigger fires, as the action, with the values on the lines beneath it.',\n capture: '`given capture <Capture>` - a record the capture\\'s source held before; `when capture <Capture>` - the record it sees now, as the action. The fields go on the lines beneath.',\n query: '`when query <Query>` performs the query with arguments beneath it; assert returned rows with `then result` or genuine absence with `then no result`. From ESM v18, one actionless query with `then error` asserts exactly Validation and no other outcome. This also works with `then query` and an arguments block, without a result block.',\n events: '`then no events` - asserts the action appended no events, also after `when append`, where it means no reaction appended anything. Executable from ESM v17. Cannot accompany event, event-order, error or denial expectations.',\n result: '`then result [exactly]` - one result the query performed by `when query` returns, in order; `then no result` - it returns nothing.',\n};\n\nexport const attributeDocs: Record<string, string> = {\n pii: 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]. Bare suffix marker; @pii is deprecated (PLAY0565). Selects executable model (ESM) v13; consumers must explicitly admit it. Cannot classify identity or enum concepts. An event with personal values and an explicit subject mark refuses binding (PLAY0268) until lineage is admitted.',\n personal: 'Alias of pii: personal data (GDPR Art. 4(1)); renders Chronicle [PII]. No diagnostic; canonical printing writes pii. Selects executable model (ESM) v13, like pii.',\n secret: 'Operational secret, not personal data: encrypted at rest without erasure and withheld from causation. Provider mapping: [Encrypted] + [NotAudited], or [PII] only with pii. Selects executable model (ESM) v13; reference outcomes are unchanged. Cannot classify identity (PLAY0515) or enum concepts. Explicit scope is omitted next to pii. An event combining secret scope subject with an explicit subject mark refuses binding (PLAY0268).',\n sensitive: 'Deprecated spelling of secret (PLAY0565); repair to bare secret. Operational secret, not GDPR Art. 9 special-category data.',\n};\n\nexport const contextVariableDocs: Record<string, string> = {\n '$context.occurred': 'When the command or query was received.',\n '$context.tenant': 'The tenant the command or query is executing for.',\n '$context.command': 'The command being handled, shaped by its `command` declaration.',\n '$context.arguments': 'The arguments of the query being performed.',\n '$context.causedBy': 'The identity that caused the command or query — `subject`, `name`, `userName`.',\n '$context.causedBy.subject': 'The subject of the identity that caused the command or query.',\n '$context.causedBy.name': 'The display name of the identity that caused the command or query.',\n '$context.causedBy.userName': 'The user name of the identity that caused the command or query.',\n '$context.causation': 'What caused the command or query — `type`, `occurred`, `properties`.',\n '$context.causation.type': 'What caused the command or query — a command, a reactor, a schedule.',\n '$identity': 'The caller — token built-ins `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`, plus declared identity details. Built-ins are equivalent to `$context.identity`; details are authoring-only until admitted (#600).',\n '$identity.id': 'The identifier of the caller from the auth token; equivalent to `$context.identity.id`.',\n '$identity.name': 'The display name of the caller; equivalent to `$context.identity.name`.',\n '$identity.userName': 'The user name of the caller; equivalent to `$context.identity.userName`.',\n '$identity.isAuthenticated': 'Whether the caller is authenticated.',\n '$identity.roles': 'The roles the caller holds.',\n '$identity.claims': 'The claims the caller carries — `$identity.claims.<name>` reads one.',\n '$context.identity': 'The caller a decision is made about — `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.',\n '$context.identity.id': 'The identifier of the caller from the auth token.',\n '$context.identity.name': 'The display name of the caller.',\n '$context.identity.userName': 'The user name of the caller.',\n '$context.identity.isAuthenticated': 'Whether the caller is authenticated.',\n '$context.identity.roles': 'The roles the caller holds.',\n '$context.identity.claims': 'The claims the caller carries — `$context.identity.claims.<name>` reads one.',\n '$env': 'An environment variable, e.g. `$env.SERVICE_NAME`.',\n '$secrets': 'An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` — stays symbolic in the compiled tree.',\n '$strings': 'A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.',\n // Every $eventContext path the event-context catalog lists, for projections.\n ...Object.fromEntries(eventContextPaths.map((path) => [`$eventContext.${path.path}`, path.description])),\n};\n\n// One-sentence descriptions of the `pii special` categories (GDPR Art. 9(1)) and `pii criminal` (Art. 10).\n// The same sentences appear in Documentation/screenplay/concepts.md.\nexport const specialCategoryDocs: Record<string, string> = {\n racialOrEthnicOrigin: 'Data revealing a person\\'s racial or ethnic origin (GDPR Art. 9(1)).',\n politicalOpinions: 'Data revealing a person\\'s political opinions (GDPR Art. 9(1)).',\n religiousOrPhilosophicalBeliefs: 'Data revealing a person\\'s religious or philosophical beliefs (GDPR Art. 9(1)).',\n tradeUnionMembership: 'Data revealing whether a person belongs to a trade union (GDPR Art. 9(1)).',\n genetic: 'Data about inherited or acquired genetic characteristics that gives unique information about a person\\'s physiology or health (GDPR Art. 9(1), Art. 4(13)).',\n biometric: 'Data from technical processing of physical, physiological or behavioral characteristics, special only when processed to uniquely identify a person (GDPR Art. 9(1), Art. 4(14)).',\n health: 'Data about a person\\'s physical or mental health, including health care services, that reveals their health status (GDPR Art. 9(1), Art. 4(15)).',\n sexLifeOrSexualOrientation: 'Data concerning a person\\'s sex life or sexual orientation (GDPR Art. 9(1)).'\n};\n"],"mappings":"2IAMA,MAAaA,EAAoB,CAC7B,eAAgB,qKAChB,KAAM,qHACV,EAEaC,EAAsC,CAC/C,UAAW,kKACX,KAAM,oIACN,QAAS,gTACT,OAAQ,2FACR,OAAQ,ggBACR,QAAS,iJACT,KAAM,kJACN,OAAQ,qIACR,SAAU,2LACV,WAAY,uIACZ,OAAQ,iGACR,QAAS,oMACT,MAAO,gKACP,SAAU,mFACV,UAAW,iFACX,SAAU,oEACV,UAAW,iFACX,UAAW,wDACX,SAAU,kFACV,UAAW,gEACX,QAAS,0GACT,UAAW,sHACX,QAAS,2GACT,SAAU,qNACV,eAAgB,mFAChB,SAAU,2FACV,YAAa,4JACb,QAAS,kMACT,OAAQ,uDACR,OAAQ,+CACR,SAAU,mLACV,UAAW,8RACX,QAAS,0HACT,OAAQ,+MACR,SAAU,qGACV,QAAS,6DACT,MAAO,mFACP,OAAQ,wNACR,UAAW,uMACX,QAAS,uFACT,SAAU,wFACV,MAAO,wLACP,cAAe,oLACf,GAAI,mIACJ,QAAS,gIACT,MAAO,gQACP,WAAY,8JACZ,UAAW,8IACX,KAAM,gRACN,WAAY,2GACZ,QAAS,6FACT,UAAW,qWACX,QAAS,wJACT,OAAQ,+JACR,SAAU,6KACV,KAAM,6RACN,QAAS,6KACT,MAAO,uDACP,SAAU,uLACV,OAAQ,8FACR,KAAM,gHACN,MAAO,sEACP,QAAS,ySACT,YAAa,gKACb,WAAY,yHACZ,cAAe,8JACf,YAAa,yPACb,QAAS,kGACT,OAAQ,uGACR,WAAY,mFACZ,UAAW,2EACX,SAAU,qHACV,SAAU,uMACV,KAAM,8HACN,MAAO,2IACP,MAAO,yHACP,SAAU,4PACV,MAAO,ouBACP,GAAI,qIACJ,QAAS,4HACT,KAAM,ySACN,KAAM,qOACN,QAAS,yJACT,cAAe,oCACf,KAAM,8CACN,MAAO,8DACP,QAAS,gIACT,KAAM,kDACN,OAAQ,+OACR,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EAEaE,EAAwC,CACjD,IAAK,kVACL,SAAU,qKACV,OAAQ,mbACR,UAAW,6HACf,EAEaC,EAA8C,CACvD,oBAAqB,0CACrB,kBAAmB,oDACnB,mBAAoB,kEACpB,qBAAsB,8CACtB,oBAAqB,iFACrB,4BAA6B,gEAC7B,yBAA0B,qEAC1B,6BAA8B,kEAC9B,qBAAsB,uEACtB,0BAA2B,uEAC3BC,UAAa,kOACb,eAAgB,0FAChB,iBAAkB,0EAClB,qBAAsB,2EACtB,4BAA6B,uCAC7B,kBAAmB,8BACnB,mBAAoB,uEACpB,oBAAqB,wGACrB,uBAAwB,oDACxB,yBAA0B,kCAC1B,6BAA8B,+BAC9B,oCAAqC,uCACrC,0BAA2B,8BAC3B,2BAA4B,+EAC5BC,KAAQ,qDACRC,SAAY,kHACZC,SAAY,6GAEZ,GAAG,OAAO,YAAYC,EAAkB,IAAK,GAAS,CAAC,iBAAiBC,EAAK,OAAQA,EAAK,WAAW,CAAC,CAAC,CAC3G,EAIaC,EAA8C,CACvD,qBAAsB,sEACtB,kBAAmB,iEACnB,gCAAiC,iFACjC,qBAAsB,6EACtB,QAAS,6JACT,UAAW,mLACX,OAAQ,kJACR,2BAA4B,6EAChC"}
|
|
1
|
+
{"version":3,"file":"keyword-docs.js","names":["handlerIntentDocs","keywordDocs","specificationKeywordDocs","attributeDocs","contextVariableDocs","\"$identity\"","\"$env\"","\"$secrets\"","\"$strings\"","eventContextPaths","path","specialCategoryDocs"],"sources":["../../keyword-docs.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 { eventContextPaths } from './event-context';\n\n// These words are contextual beneath a handler, never global property keywords.\nexport const handlerIntentDocs = {\n implementation: 'Handler-only intent with ordered hints and at most one file or tagged fence. No payload means pending. Handler execution is unsupported; this is not confirmation.',\n hint: 'One nonblank quoted implementation hint. Order and decoded text are retained; hints do not execute or confirm code.',\n};\n\nexport const keywordDocs: Record<string, string> = {\n parameter: 'A typed value declared by a specification table, or an argument of a named behavior. Table types are required; every case supplies each parameter exactly once.',\n case: 'One named concrete row of a specification table, expanded as <Specification>_<Case>. Use case.<parameter> for a whole step value.',\n example: 'One typed, possibly partial fixture: `example <Name> : <EventOrCommandOrReadModel>`. Use its name in a matching specification step; assignments override example values without changing matching or supplying defaults. Event examples may carry stream or no stream; a step replaces that route as a whole.',\n domain: 'The domain the file belongs to — optional, at most one per file, before everything else.',\n import: 'Imports a type from another module by its qualified name — `import Module.Type` — making it available by its short name; or, quoted, other `.play` files by path or glob — `import \"Orders/**/*.play\"`, relative to this file\\'s folder. Written inside a module or feature, a file import places the imported files there: their top level is that module\\'s or feature\\'s body. `import Module.Event from \"origin\"` is instead public contract metadata with an opaque origin; executable binding refuses it with PLAY0268.',\n concept: 'A formalized value type wrapping a primitive. Bare pii and secret markers travel with every usage, with optional concept notes and qualifiers.',\n type: 'A composite value type — a named shape built from several properties, referenced by events, commands and other types the same way a concept is.',\n reason: 'A free-text concept note, not a lawful basis. Written as pii reason \"...\" or secret reason \"...\"; migration preserves it verbatim.',\n optional: 'Allows a value to be absent. Write it after the type: `note String optional` or `lines InvoiceLine[] optional`. The collection itself may be absent; its items keep their declared type.',\n identifier: 'Marks the command property a runtime resolves the event source id from. At most one per command; without it a new Uuid is generated.',\n policy: 'A named authorization rule referenced by commands and queries. Multiple policies AND together.',\n purpose: 'A report-only processing declaration (GDPR Art. 30), referenced on modules, features and slices. Coverage is their union, not an authorization gate. Generated declarations are not legal advice.',\n basis: 'One declared Art. 6(1) basis: consent, contract, legalObligation, vitalInterests, publicTask or legitimateInterests; an optional quoted reference may follow.',\n interest: 'The legitimate-interest statement for basis legitimateInterests (Art. 13(1)(d)).',\n condition: 'One Art. 9(2) processing condition, optionally followed by a quoted reference.',\n subjects: 'Comma-separated categories of data subjects, as open identifiers.',\n retention: 'Declared retention period or criteria, not enforced by the model or Chronicle.',\n recipient: 'A quoted recipient category; repeatable on a purpose.',\n transfer: 'A declared destination followed by safeguard and quoted safeguards; repeatable.',\n safeguard: 'The declared safeguard accompanying a third-country transfer.',\n erasure: 'An erasure exception under Art. 17(3); Chronicle crypto-shredding remains per subject, not per purpose.',\n exception: 'One declared Art. 17(3) exception: expression, legalObligation, publicTask, publicHealth, archiving or legalClaims.',\n persona: 'A named role interacting with the application, with an optional description and its associated policies.',\n identity: 'Declares typed additional caller details from a claim, a keyed single-result query, inline code or a file. Authoring metadata only; executable use of `$identity.<detail>` reports PLAY0268 until admitted (#600).',\n authentication: 'Declares the identity providers of the application — at most one block per file.',\n provider: 'A named identity provider within `authentication`, with free-form `name value` settings.',\n description: 'A human-readable description, including the rule or case a specification witnesses, as a quoted single line or a fenced ```text block for multiple lines.',\n depends: 'Declares `depends on <Name>` on a module or feature. This opts only that container into checking counted explicit references against its own declarations; it does not change executable bytes.',\n module: 'The top-level namespace — maps to a bounded context.',\n layout: 'A reusable screen template with named slots.',\n template: 'Names a template to fill or assign: `template <Name>` for an own template, `template blueprint <Blueprint> <Name> [version \"<range>\"]` for a template a blueprint package ships.',\n blueprint: 'In `template blueprint <Blueprint> <Name>`, the blueprint package the template comes from. A `ui profile` should list it under `packages`. In `ui profile` `sample data`, `active blueprint <id>` selects a sample data pack a blueprint ships, resolved by the build against its packages.',\n version: 'In `template blueprint ... version \"<range>\"`, the semver range of the blueprint the reference accepts, such as `^1.4`.',\n scopes: 'Where a template may be used: `application`, `module`, `feature`, `subfeature` or `slice`. `slice` can be followed by the kinds `statechange` and `stateview`, such as `scopes slice statechange|stateview`.',\n category: 'The group a template picker lists a layout or template under. Every layout and template needs one.',\n feature: 'A vertical slice grouping. Features nest arbitrarily deep.',\n slice: 'The atomic unit of behavior, aligned with Event Modeling. Has a type and a name.',\n public: 'Marks an event as a public contract. An event with from \"origin\" is also public. Origin is opaque, not a path or declaration reference. Public events and origins are admitted by executable semantic model (ESM) v9.',\n direction: 'Declare direction inbound or direction outbound once inside a Translate slice. Admitted by executable semantic model (ESM) v9; a Translate slice that uses public events must declare it (PLAY0614).',\n inbound: 'Inbound Translate direction metadata. No transport or delivery guarantee is implied.',\n outbound: 'Outbound Translate direction metadata. No transport or delivery guarantee is implied.',\n event: 'An immutable, past-tense fact. Declare it in a slice or inline with `produces event <Name>` in a command. Inline properties are typed mappings; inline tags belong to the event type.',\n documentation: 'Authoring-only reasoning on a module, feature, slice, command, event, read model or reaction in one nonempty fenced ```markdown block. It does not change executable model bytes.',\n id: 'Preserves the previous persisted event name after a rename. Leave absent on new events; repeating the current name is redundant.',\n command: 'An imperative intent. Declares authorization, validation, and what events it produces — declaratively, or via a full handler.',\n query: 'A read-side entry point mapping to a return type, with an optional description, parameters and performer. The by key and every supplied filter value satisfy their concept rules after authorization; violations reject with Validation, not an empty result.',\n observable: 'Qualifies a query return type as a live read — `query <Name> => observable <ReadModel>` keeps pushing as the read model changes, instead of answering once.',\n performer: 'The code that performs a query — a `file <Path>` reference or an inline `csharp`/`sql` block. The query\\'s counterpart to a command handler.',\n from: 'On a reaction or reducer, `from Source[.Stream]` observes only matching routed facts. It does not filter stream ids. Admitted by ESM v10. On a query parameter, fills it from the query context instead of the caller, as in `filter tenantId TenantId from $context.tenant`.',\n projection: 'Declares how events project into a read model, using the embedded Projection Declaration Language (PDL).',\n capture: 'Converts external data into events, using the embedded Change Data Capture Language (CDL).',\n protected: 'Application-root `command reads protected` admits eligible command reads (ESM v25). Required absence rejects with Validation before derive/provide and requirements; a matching intervening fact yields Conflict/DecisionStateChanged without facts. Without the preamble, legacy reads retain their existing refusals. Targets must separately admit the version.',\n batches: 'Application-root `reaction batches atomic` opts into ESM v22 atomic direct and refusal-branch batches. Invoked commands remain separate transactions.',\n atomic: 'All productions in one reaction trigger occurrence or selected refusal branch are adopted together or not at all. Absence retains legacy per-fact semantics.',\n reaction: 'Behavior that runs when something happens. Lives inside Automation slices. A trigger with no body states intent on its own — `file`/code is optional realization metadata.',\n runs: '`runs as system [role \"Role\" and role \"Role\"]` declares the identity for every returned or invoked command of a reaction, not imperative pipeline calls. Admitted by released ESM v10; claims are unknown for this identity. Clock and application triggers have no Stage realization yet.',\n trigger: 'Declares a kind of occurrence a reaction can respond to, and the values it hands the reaction. What makes one occur belongs to whoever provides it, never to the compiler.',\n where: 'Narrows which occurrences actually run the reaction.',\n contains: 'Ordinal UTF-16 text comparison: the value holds the literal operand anywhere. In validation, `not contains` negates it; absent optional values pass. An empty operand always occurs.',\n starts: 'Use `starts with \"text\"` for an ordinal UTF-16 literal prefix validation rule or condition.',\n ends: 'Use `ends with \"text\"` for an ordinal UTF-16 literal suffix validation rule. An absent optional value passes.',\n every: 'Runs a reaction on an interval — `every 15 minutes`, `every 1 day`.',\n refused: 'Ordered invocation refusal branch, executable from ESM v19: first match wins and stops remaining invocations of this trigger. Bare `on refused` covers validation and constraints, not authorization. Other reactions and cascades continue; contract errors, concurrency and Unsupported never match.',\n acknowledge: 'A refusal branch acknowledges alone without facts, or produces events instead. Executable from ESM v19; handling stops remaining invocations of this trigger.',\n validation: 'In `on refused by validation`, selects error-severity property, concept and require refusals. Executable from ESM v19.',\n authorization: 'In `on refused by authorization`, explicitly selects unauthorized results, never Unsupported. Executable from ESM v19; bare refusal excludes authorization.',\n redelivered: '`when redelivered <Event> to <Reaction>` selects exactly one effective given occurrence by optional for, stated values and stream or no stream, delivering that event again to one named reaction without appending it again. Executable from ESM v17.',\n invokes: 'A command a reaction hands on. A command is asked for, not produced — it may still be rejected.',\n screen: 'A UI declaration. Supports intent, structure, and layout-with-code levels, or a full file reference.',\n constraint: 'A server-side rule enforced in the Chronicle kernel before events are committed.',\n authorize: 'References the policies that must all pass for the construct to execute.',\n validate: 'Declarative validation rules, or `validate` followed by ```csharp for imperative rules — on commands and concepts.',\n checksum: 'String-concept validation: exact trailing luhn/mod11 digit or two mod97 digits over preceding ASCII digits. Also applies to supplied and stored values; generation does not silently add validation.',\n luhn: 'Luhn check digit, with standard parity from the right. Generation appends it; validate checksum luhn checks the arithmetic.',\n mod11: 'Check digit (11 - weighted sum modulo 11) modulo 11, weights 2..7 cycling from the right. Output 10 is excluded from generation support.',\n mod97: 'ISO 7064 MOD 97-10, two zero-padded trailing digits. Validation checks the exact computed suffix, not only congruence.',\n produces: 'References a declared event with `produces <Name>`, or declares one inline with `produces event <Name>`. An inline omitted `for` uses the command identifier only when all destinations are the same source; legacy plain omission allocates an identity.',\n reads: 'Declares a view consulted by a command or reaction trigger: `reads <View> [as <alias>] [by <value>]`. A reaction `by` names a value taken by its trigger; clock triggers cannot use `by`. A child by block supplies composite key parts by name, using part = source, but is refused for protected command reads (PLAY0781 ByParts). Repeated views require unique aliases. With `command reads protected`, command reads bind only over finite event-log projections keyed by event-source identity with removal handlers and required scalar non-generated input keys. Omitted `by` uses the command identifier. Single-level read/alias.property paths are admitted in validate require operands and produces mappings only. Reaction reads remain unadmitted.',\n as: 'Names an instance of a view in a command or reaction trigger reads declaration, for example `reads Account as source by sourceId`.',\n handler: 'A fully imperative command implementation — a `file <Path>` reference or an inline `csharp` block, instead of `produces`.',\n when: 'Guards a produced event or a capture append with a condition. In a labeled screen action, `when item.<field> == <literal> execute <Command>` selects the first matching command. Inside on click, double click or select, block-form `when <condition>` selects one whole action list at gesture time.',\n rule: 'Names a predicate. Bare, it states that a constraint exists without expressing what it computes — nothing resolves the name. Optionally followed by an indented `file <Path>` reference or inline `csharp` block giving it a body.',\n require: 'A policy condition: `authenticated`, `role \"...\"`, or `claim \"...\" matches ...`. Unary `not` negates a condition or group; precedence is not, and, or.',\n authenticated: 'Requires an authenticated caller.',\n role: 'Requires the caller to have the given role.',\n claim: 'Requires a claim on the caller to match a subject or value.',\n subject: 'In policy `matches subject`, the identifier of the thing acted on, not the caller. The caller is `$context.causedBy.subject`.',\n data: 'Binds a read model to a screen through a query.',\n action: 'Makes a command available on a screen. `action \"Label\"` declares one button with ordered `when … execute` alternatives over the nearest data item or selected row. No subject hides it; commands still enforce authorization and validation.',\n otherwise: 'The final fallback of a guarded action: `otherwise hidden` or `otherwise execute <Command>`. In an item interaction, bare `otherwise` opens a fallback action list. No subject runs nothing, including fallback; authorization never falls through.',\n hidden: 'Hides a guarded action when no condition matches. Without a subject the action is always hidden, even with an execute fallback.',\n execute: 'Executes a command. A guarded screen action selects it by the first matching condition; explicit `with … from` bindings precede same-name item fields, its declared form and renderer input.',\n navigate: 'Navigates to a screen, optionally passing a parameter with `by`.',\n section: 'A named structural section of a screen.',\n table: 'A table widget over a read model or child collection.',\n summary: 'A summary widget showing labeled fields.',\n column: 'A table column bound to a property.',\n field: 'A summary field bound to a property.',\n title: 'The display title of a screen or section.',\n label: 'The display label of an action, column, or field.',\n unique: 'A uniqueness constraint — `unique <property> on <EventType>` or `unique event <EventType>`.',\n concurrency: 'The concurrency scope enforced when the command appends events — dimensions: `eventSource`, `sourceType`, `streamType`, `streamId`, `events`.',\n eventSource: 'Concurrency dimension — scope the check to the event source id of the command.',\n sourceType: 'Concurrency dimension — scope the check to an event source type.',\n streamType: 'Concurrency dimension — scope the check to an event stream type.',\n streamId: 'Concurrency dimension — scope the check to an event stream id.',\n tag: 'Attaches a tag to appended events — a static identifier or string, or a `$context.` expression resolved at append time.',\n seed: 'Declares events to seed into the event store per event source id — multiple blocks accumulate.',\n for: 'Names the event source of a production or seed group. Inside `produces event`, omission uses the command identifier unless another production targets a different source.',\n readmodel: 'Declares a read model — its name and properties — in a slice, or, in a specification, read model state: `given readmodel` establishes it, `then readmodel` asserts it, `then no readmodel <View> for <key>` asserts keyed absence.',\n reducer: 'Builds a read model from events with imperative code — `reducer <Name> => <ReadModel>` with an `on <EventType>` rule per event. Use it when a projection cannot express the transition.',\n specification: 'Given/when/then acceptance criteria for a slice: prior events and state, the command, query or appended event under test, and the events, state, results, errors or denials that follow.',\n dialog: 'A dialog opened over the shell, or with `dialog template` a reusable dialog shape.',\n form: 'A form bound to a command — `form <Name> for <Command>` with a `field` per input.',\n contribute: 'Contributes entries to a slot of the shell — `contribute to Navigation` with `navigate to`, `label` and `order`.',\n button: 'A toolbar button that invokes a State Change slice — `button <id> title \"…\" slice <Module>.<Feature>.<Slice> [emphasis primary|secondary|quiet] [icon <name>]`. The slice names the command and the dialog it opens.',\n navigation: 'A navigation region of the shell — `navigation topbar` or `navigation sidebar`. A layout declares the application\\'s regions with a `logo` and `item` lines; a module adds `inherits`, `extends` or `overrides` to change what it shows.',\n theme: 'A named theme and the component packages it is compatible with.',\n sample: 'Sample data — `sample data <Name>` declares a pack of demo rows per `shape` that a design surface or preview shows instead of a backend. Design and preview time only; it never reaches backend or production output. The application picks its active pack once, in the `ui profile`.',\n active: 'The active sample data pack of the whole application, chosen once in the `ui profile` `sample data` block — one declared in the document, or `blueprint <id>` for one a blueprint ships.',\n bind: 'Binds one read model to a sample data pack — `bind <ReadModel> to <pack>` — a rare override of the active pack for that read model only.',\n maps: 'Maps a sample data shape to the read model it supplies rows for — `shape <Shape> maps to <ReadModel>` — where the names differ.',\n row: 'One row of a sample data shape: `<field> = <literal>` lines, each field a property of the read model.',\n locale: 'The BCP 47 locale tag of a sample data pack, such as `nb-NO`.',\n shape: 'In sample data, the shape a set of rows is for; it matches the read model of the same name or the one a `ui profile` maps it to.',\n root: 'In a `ui profile`, `root template [blueprint <Blueprint>] <Name> [version \"<range>\"]` names the template the whole application is drawn in, with `option <name> <value>` lines for what the shell exposes.',\n appearance: 'In a `ui profile`, the `appearance` block holds `color scheme light|dark|system` and `accent \"<#hex>\"`.',\n accent: 'In a `ui profile` `appearance` block, `accent \"<#hex>\"` is the accent colour of the application.',\n scheme: 'In a `ui profile` `appearance` block, `color scheme light|dark|system` is the colour scheme of the application.',\n screens: 'In a `ui profile`, `new screens use template [blueprint <Blueprint>] <Name>` is the template a new screen starts from.',\n ui: 'A UI profile — `ui profile <Name>` binds a target platform and size to a layout, theme and packages.',\n behavior: 'A named interaction wiring of `on <interaction>` handlers, attached to a screen, form or dialog with `uses`.',\n system: 'An application-scoped external system that operations use.',\n eventsource: 'An application-owned event source with nested streams.',\n operation: 'A reusable operation intent that uses one external system.',\n no: 'A keyed absence assertion: `then no readmodel <View> for <key>`.',\n arguments: 'The values supplied to a query asserted by `then query`.',\n result: 'One expected result - `then result [exactly]` after `when query`, or a `result` block inside `then query`. Repeat it to assert several results in authored order.',\n clock: 'The instant a specification happens at - `given clock \"2026-10-05T08:00:00Z\"` fixes when everything occurs, including every generated pattern date segment at that same UTC instant. Without given clock, generation fixtures check date digit widths only, never the wall clock. `when clock \"<instant>\"` is the clock reaching it, as the action.',\n exactly: 'Requires every property to match, rather than only the ones asserted - on `then readmodel`, `then query` and `then result`.',\n file: 'Delegates the implementation to an external file; the Screenplay contract stays visible.',\n key: 'Trailing modifier on a required top-level read-model property. Explicit keys replace inference. Composite keys remain authoring-only (PLAY0268, #599).',\n stream: 'On a command event production, replaces the whole command route for that event. Other productions keep the command route. Admitted by ESM v10.',\n by: 'Introduces one identifying parameter or a block of at least two named key parts. Reads use part = source; queries use part Type.',\n via: 'Connects screen data to the query that supplies it.',\n filter: 'An optional query filter parameter.',\n on: 'The event a constraint applies to, the day a schedule narrows to, or a widget interaction such as `on row-click`.',\n message: 'The validation message reported when the rule fails.',\n matches: 'Searches text using the portable flagless JavaScript match dialect, or `email`. Use ^ and $ for the whole input. Exact Studio text-rule lookarounds warn with PLAY0787 and lower to ordinal rules; other lookarounds, backreferences and refused constructs report PLAY0699; patterns have at most 1000 source code units and 3000 expanded nodes, including optional, loop and alternative choice points.',\n all: 'Applies a comparison to every element of a collection.',\n max: 'Maximum length or value.',\n min: 'Minimum length or value.',\n length: 'Constrains the exact length of a value.',\n today: 'The current date.',\n empty: 'Used with `not empty` — text needs a non-whitespace character; null, empty and whitespace-only text fail. Unicode White_Space is U+0009–U+000D, U+0020, U+0085, U+00A0, U+1680, U+2000–U+200A, U+2028, U+2029, U+202F, U+205F and U+3000 (not U+FEFF). Collections need at least one element. Applies to concept and command rules in every ESM version; no trimming. Identity text is unchanged: whitespace is a value.',\n not: 'Negates a validation condition, as in `not empty`.',\n and: 'Both conditions must hold.',\n or: 'Either condition may hold.',\n csharp: 'An inline C# block whose opening fence is ```csharp.',\n sql: 'An inline SQL block between triple backticks — a query performer written against a relational store.',\n typescript: 'An inline TypeScript block between triple backticks.',\n react: 'An inline React/TSX block; receives the surrounding data contract as `Props`.',\n html: 'An inline static HTML block.',\n StateChange: 'Slice type — a command → events flow; something that changes the system.',\n StateView: 'Slice type — a query + projection + screen; something that reads the system.',\n Automation: 'Slice type — a reaction or reducer; something that runs when something happens.',\n Translate: 'Slice type — a capture; converts external data into events.',\n Uuid: 'Primitive type — a universally unique identifier.',\n String: 'Primitive type — a string of characters.',\n Int: 'Primitive type — an integer number.',\n Decimal: 'Primitive type — a decimal number.',\n Bool: 'Primitive type — true or false.',\n Date: 'Primitive type — a calendar date without a time zone. ESM v26 admits all six comparisons in command require, produces when and command/property rules. Conditions use required same-primitive command properties or a literal; rules use literals only. Canonical literals use yyyy-MM-dd. Concept rules, reaction where, read paths, context and today stay refused.',\n DateTime: 'Primitive type — a date and time. ESM v26 command comparisons order UTC instants at tick precision, including equality across offsets. Compared input requires an explicit offset or Z before any rule runs; literals canonicalize to UTC with seven fractional digits and Z. Targets without tick precision refuse comparisons; client validators omit date ordering. Other equality stays ordinal.',\n Enum: 'An enumeration concept with named members. Members may all declare unique int32 numbers (draft = 1) or all omit them (zero-based positions). Never renumber or reuse a published number. Non-positional numbers select executable model (ESM) v12; consumers must explicitly admit v12. Specifications still name members.',\n};\n\n// What the words of a specification's steps mean there - where 'trigger', 'capture' and 'query' name what the\n// scenario exercises rather than declare one.\nexport const specificationKeywordDocs: Record<string, string> = {\n parameter: 'Declares a required typed case value: `parameter <name> <Type>`. Every case assigns it once. `optional` permits literal null but supplies no default.',\n case: 'One named complete row of a specification table. `case.<parameter>` substitutes a whole value after example overrides; each row runs as `<Specification>_<Case>`.',\n caller: '`given caller` states an explicit identity; `given caller as <Persona>` synthesizes an authenticated deterministic witness of the persona, with no body. Leftmost buildable policy alternatives are significant.',\n clock: keywordDocs.clock,\n redelivered: keywordDocs.redelivered,\n trigger: '`when trigger <Trigger>` - an application trigger fires, as the action, with the values on the lines beneath it.',\n capture: '`given capture <Capture>` - a record the capture\\'s source held before; `when capture <Capture>` - the record it sees now, as the action. The fields go on the lines beneath.',\n query: '`when query <Query>` performs the query with arguments beneath it; assert returned rows with `then result` or genuine absence with `then no result`. From ESM v18, one actionless query with `then error` asserts exactly Validation and no other outcome. This also works with `then query` and an arguments block, without a result block.',\n events: '`then no events` - asserts the action appended no events, also after `when append`, where it means no reaction appended anything. Executable from ESM v17. Cannot accompany event, event-order, error or denial expectations.',\n result: '`then result [exactly]` - one result the query performed by `when query` returns, in order; `then no result` - it returns nothing.',\n};\n\nexport const attributeDocs: Record<string, string> = {\n pii: 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]. Bare suffix marker; @pii is deprecated (PLAY0565). Selects executable model (ESM) v13; consumers must explicitly admit it. Cannot classify identity or enum concepts. An event with personal values and an explicit subject mark refuses binding (PLAY0268) until lineage is admitted.',\n personal: 'Alias of pii: personal data (GDPR Art. 4(1)); renders Chronicle [PII]. No diagnostic; canonical printing writes pii. Selects executable model (ESM) v13, like pii.',\n secret: 'Operational secret, not personal data: encrypted at rest without erasure and withheld from causation. Provider mapping: [Encrypted] + [NotAudited], or [PII] only with pii. Selects executable model (ESM) v13; reference outcomes are unchanged. Cannot classify identity (PLAY0515) or enum concepts. Explicit scope is omitted next to pii. An event combining secret scope subject with an explicit subject mark refuses binding (PLAY0268).',\n sensitive: 'Deprecated spelling of secret (PLAY0565); repair to bare secret. Operational secret, not GDPR Art. 9 special-category data.',\n};\n\nexport const contextVariableDocs: Record<string, string> = {\n '$context.occurred': 'When the command or query was received.',\n '$context.tenant': 'The tenant the command or query is executing for.',\n '$context.command': 'The command being handled, shaped by its `command` declaration.',\n '$context.arguments': 'The arguments of the query being performed.',\n '$context.causedBy': 'The identity that caused the command or query — `subject`, `name`, `userName`.',\n '$context.causedBy.subject': 'The subject of the identity that caused the command or query.',\n '$context.causedBy.name': 'The display name of the identity that caused the command or query.',\n '$context.causedBy.userName': 'The user name of the identity that caused the command or query.',\n '$context.causation': 'What caused the command or query — `type`, `occurred`, `properties`.',\n '$context.causation.type': 'What caused the command or query — a command, a reactor, a schedule.',\n '$identity': 'The caller — token built-ins `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`, plus declared identity details. Built-ins are equivalent to `$context.identity`; details are authoring-only until admitted (#600).',\n '$identity.id': 'The identifier of the caller from the auth token; equivalent to `$context.identity.id`.',\n '$identity.name': 'The display name of the caller; equivalent to `$context.identity.name`.',\n '$identity.userName': 'The user name of the caller; equivalent to `$context.identity.userName`.',\n '$identity.isAuthenticated': 'Whether the caller is authenticated.',\n '$identity.roles': 'The roles the caller holds.',\n '$identity.claims': 'The claims the caller carries — `$identity.claims.<name>` reads one.',\n '$context.identity': 'The caller a decision is made about — `id`, `name`, `userName`, `isAuthenticated`, `roles`, `claims`.',\n '$context.identity.id': 'The identifier of the caller from the auth token.',\n '$context.identity.name': 'The display name of the caller.',\n '$context.identity.userName': 'The user name of the caller.',\n '$context.identity.isAuthenticated': 'Whether the caller is authenticated.',\n '$context.identity.roles': 'The roles the caller holds.',\n '$context.identity.claims': 'The claims the caller carries — `$context.identity.claims.<name>` reads one.',\n '$env': 'An environment variable, e.g. `$env.SERVICE_NAME`.',\n '$secrets': 'An encrypted secret resolved at runtime, e.g. `$secrets.azureAdClientId` — stays symbolic in the compiled tree.',\n '$strings': 'A localized string resolved from the `.strings` file of the active locale, e.g. `$strings.invoices.title`.',\n // Every $eventContext path the event-context catalog lists, for projections.\n ...Object.fromEntries(eventContextPaths.map((path) => [`$eventContext.${path.path}`, path.description])),\n};\n\n// One-sentence descriptions of the `pii special` categories (GDPR Art. 9(1)) and `pii criminal` (Art. 10).\n// The same sentences appear in Documentation/screenplay/concepts.md.\nexport const specialCategoryDocs: Record<string, string> = {\n racialOrEthnicOrigin: 'Data revealing a person\\'s racial or ethnic origin (GDPR Art. 9(1)).',\n politicalOpinions: 'Data revealing a person\\'s political opinions (GDPR Art. 9(1)).',\n religiousOrPhilosophicalBeliefs: 'Data revealing a person\\'s religious or philosophical beliefs (GDPR Art. 9(1)).',\n tradeUnionMembership: 'Data revealing whether a person belongs to a trade union (GDPR Art. 9(1)).',\n genetic: 'Data about inherited or acquired genetic characteristics that gives unique information about a person\\'s physiology or health (GDPR Art. 9(1), Art. 4(13)).',\n biometric: 'Data from technical processing of physical, physiological or behavioral characteristics, special only when processed to uniquely identify a person (GDPR Art. 9(1), Art. 4(14)).',\n health: 'Data about a person\\'s physical or mental health, including health care services, that reveals their health status (GDPR Art. 9(1), Art. 4(15)).',\n sexLifeOrSexualOrientation: 'Data concerning a person\\'s sex life or sexual orientation (GDPR Art. 9(1)).'\n};\n"],"mappings":"2IAMA,MAAaA,EAAoB,CAC7B,eAAgB,qKAChB,KAAM,qHACV,EAEaC,EAAsC,CAC/C,UAAW,kKACX,KAAM,oIACN,QAAS,gTACT,OAAQ,2FACR,OAAQ,ggBACR,QAAS,iJACT,KAAM,kJACN,OAAQ,qIACR,SAAU,2LACV,WAAY,uIACZ,OAAQ,iGACR,QAAS,oMACT,MAAO,gKACP,SAAU,mFACV,UAAW,iFACX,SAAU,oEACV,UAAW,iFACX,UAAW,wDACX,SAAU,kFACV,UAAW,gEACX,QAAS,0GACT,UAAW,sHACX,QAAS,2GACT,SAAU,qNACV,eAAgB,mFAChB,SAAU,2FACV,YAAa,4JACb,QAAS,kMACT,OAAQ,uDACR,OAAQ,+CACR,SAAU,mLACV,UAAW,8RACX,QAAS,0HACT,OAAQ,+MACR,SAAU,qGACV,QAAS,6DACT,MAAO,mFACP,OAAQ,wNACR,UAAW,uMACX,QAAS,uFACT,SAAU,wFACV,MAAO,wLACP,cAAe,oLACf,GAAI,mIACJ,QAAS,gIACT,MAAO,gQACP,WAAY,8JACZ,UAAW,8IACX,KAAM,gRACN,WAAY,2GACZ,QAAS,6FACT,UAAW,qWACX,QAAS,wJACT,OAAQ,+JACR,SAAU,6KACV,KAAM,6RACN,QAAS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