@cratis/screenplay-language 4.127.1 → 4.129.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/AuthoredReadModelKeys.d.ts +13 -0
- package/dist/AuthoredReadModelKeys.d.ts.map +1 -0
- package/dist/EventSourceAnalysis.d.ts +11 -0
- package/dist/EventSourceAnalysis.d.ts.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/Files/PlayApplicationAssembly.js +1 -1
- package/dist/bundles/compiler/Files/PlayApplicationAssembly.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CommandParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DeclarationParsers.js +1 -1
- package/dist/bundles/compiler/Parsing/DeclarationParsers.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DependencySourceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DependencySourceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterParser.js +2 -0
- package/dist/bundles/compiler/Parsing/ObserverFilterParser.js.map +1 -0
- package/dist/bundles/compiler/Parsing/ObserverFilterValidator.js +2 -0
- package/dist/bundles/compiler/Parsing/ObserverFilterValidator.js.map +1 -0
- package/dist/bundles/compiler/Parsing/ProducesParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PropertyLineParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PropertyLineParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/QueryParser.js +1 -1
- package/dist/bundles/compiler/Parsing/QueryParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadModelKeyValidator.js +2 -0
- package/dist/bundles/compiler/Parsing/ReadModelKeyValidator.js.map +1 -0
- package/dist/bundles/compiler/Parsing/ReadsParser.js +2 -0
- package/dist/bundles/compiler/Parsing/ReadsParser.js.map +1 -0
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/TriggerDataParser.js +1 -1
- package/dist/bundles/compiler/Parsing/TriggerDataParser.js.map +1 -1
- package/dist/bundles/compiler/ScreenplayCompiler.js +1 -1
- package/dist/bundles/compiler/ScreenplayCompiler.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventSourceCatalog.js +1 -1
- package/dist/bundles/compiler/Syntax/EventSourceCatalog.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js +1 -1
- package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxCollections.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxInvariants.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxJson.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -1
- package/dist/bundles/compiler/Syntax/index.js +1 -1
- package/dist/bundles/compiler/index.js +1 -1
- package/dist/bundles/completion-items.js +2 -2
- package/dist/bundles/completion-items.js.map +1 -1
- package/dist/bundles/completion-planner.js +2 -2
- package/dist/bundles/completion-planner.js.map +1 -1
- package/dist/bundles/diagnostic-codes.js +1 -1
- package/dist/bundles/diagnostic-codes.js.map +1 -1
- package/dist/bundles/event-source-authoring.js +10 -10
- package/dist/bundles/event-source-authoring.js.map +1 -1
- package/dist/bundles/keyword-docs.js +1 -1
- package/dist/bundles/keyword-docs.js.map +1 -1
- package/dist/bundles/read-model-key-completions.js +2 -0
- package/dist/bundles/read-model-key-completions.js.map +1 -0
- package/dist/bundles/response-analysis.js +6 -6
- package/dist/bundles/response-analysis.js.map +1 -1
- package/dist/bundles/scope-items.js +1 -1
- package/dist/bundles/scope-items.js.map +1 -1
- package/dist/bundles/tokens.js +1 -1
- package/dist/bundles/tokens.js.map +1 -1
- package/dist/bundles/validation.js +1 -1
- package/dist/bundles/validation.js.map +1 -1
- package/dist/completion-items.d.ts.map +1 -1
- package/dist/completion-planner.d.ts.map +1 -1
- package/dist/diagnostic-codes.d.ts +7 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/dist/event-source-authoring.d.ts.map +1 -1
- package/dist/keyword-docs.d.ts.map +1 -1
- package/dist/read-model-key-completions.d.ts +4 -0
- package/dist/read-model-key-completions.d.ts.map +1 -0
- package/dist/response-analysis.d.ts +2 -0
- package/dist/response-analysis.d.ts.map +1 -1
- package/dist/scope-items.d.ts.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":["contextualConstructs","embeddedLanguages","keyword","exitKeywords","constructKeywords","subLanguages","subLanguage","commonTokenRules","tokenizer","bmpWordCharacters","codeBlockTags","tag","clauseKeywords"],"sources":["../../tokens.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { languages } from 'monaco-editor';\nimport {\n clauseKeywords,\n codeBlockTags,\n constructKeywords,\n primitiveTypes,\n sliceTypes,\n} from './language';\nimport { MonarchTokenRules, SubLanguage } from './sub-language-registry';\nimport { bmpWordCharacters } from './bmp-word-characters';\n\n// Maps a Screenplay inline code tag to the Monaco language id used for embedded highlighting.\n// Declaration registration must not globally reserve existing property names.\n// Ambiguous standalone operation headers are supplied by typed semantic tokens.\nconst contextualConstructs = new Set(['operation', 'system', 'eventsource', 'purpose', 'runs']);\n\nconst embeddedLanguages: Record<string, string> = {\n csharp: 'csharp',\n typescript: 'typescript',\n react: 'typescript',\n html: 'html',\n sql: 'sql',\n};\n\nfunction subLanguageState(keyword: string): string {\n return `subLanguage_${keyword}`;\n}\n\n// A construct keyword at the start of a line ends any indented sub-language block.\nfunction subLanguageExitRule(subLanguages: SubLanguage[]): MonarchTokenRules[number] {\n const exitKeywords = [...constructKeywords.filter(keyword => !contextualConstructs.has(keyword)), ...subLanguages.map((subLanguage) => subLanguage.keyword)];\n return [\n new RegExp(`^\\\\s*(?:${exitKeywords.join('|')})\\\\b`),\n { token: '@rematch', next: '@pop' },\n ];\n}\n\n// Shared across the composite `.play` tokenizer and every standalone sub-language tokenizer\n// (comments, `$`-prefixed context variables, strings, numbers, operators, delimiters, whitespace).\nexport const commonTokenRules: MonarchTokenRules = [\n [/\\/\\/.*$/, 'comment'],\n [/\\$(?:context|identity|eventContext|eventSourceId|causedBy|refusal)(?:\\.\\w+)*/, 'variable.predefined'],\n [/\\$(?:env|secrets|strings)\\.[\\w.]+/, 'variable.predefined'],\n [/\\$\\.[\\w.]*/, 'variable.predefined'],\n [/\"(?:[^\"\\\\]|\\\\.)*\"/, 'string'],\n [/\"(?:[^\"\\\\]|\\\\.)*$/, 'string.invalid'],\n [/\\d+(?:ms|s|m|h|d)\\b/, 'number'],\n [/-?\\d+\\.\\d+/, 'number.float'],\n [/-?\\d+/, 'number'],\n [/=>|==|!=|>=|<=|[><=:?]/, 'operator'],\n [/[[\\](),.]/, 'delimiter'],\n [/\\s+/, 'white'],\n];\n\nexport function createTokensProvider(subLanguages: SubLanguage[]): languages.IMonarchLanguage {\n const tokenizer: Record<string, MonarchTokenRules> = {\n root: [\n [new RegExp(`^(\\\\s*)(example)(\\\\s+)([A-Z][${bmpWordCharacters}]*)(\\\\s*)(:)(\\\\s*)([A-Z][${bmpWordCharacters}.]*)(?=\\\\s*(?://.*)?$)`),\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'operator', 'white', 'type.identifier']],\n [/^(\\s*)(direction)(\\s+)(inbound|outbound)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [new RegExp(`^()(purpose)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`), ['white', 'keyword', 'white', { token: 'type.identifier', next: '@purposeBody.$1' }]],\n [/^(\\s*)(parameter)(\\s+)([a-z_]\\w*)(\\s+)([\\w.]+(?:\\[\\])?(?:\\s+optional)?)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'identifier', 'white', 'type.identifier']],\n [/^(\\s*)(case)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:[a-z_]\\w*\\s*=|\\/\\/|$))/, ['white', 'keyword', 'white', 'type.identifier']],\n [/\\b(case)(\\.)([a-z_]\\w*)\\b/, ['keyword', 'delimiter', 'identifier']],\n [/^(\\s*)(concept)(\\s+)([^\\s:]+)(\\s*:\\s*)(\\w+)((?:\\s+(?:@?pii|personal|@?sensitive|secret))*)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier', 'operator', { token: 'type.identifier', next: '@conceptBody.$1' }, 'keyword']],\n [/^(numbers)([ \\t]+)(exact)(?=[ \\t]*(?:(?:\\/\\/|#).*)?$)/, ['keyword', 'white', 'keyword']],\n [/^(eventsource)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', 'type.identifier']],\n [/^(system)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', 'type.identifier']],\n // 'runs' is contextual: only a reaction's identity line is a keyword; a property called runs keeps its name.\n [/^(\\s*)(runs)(\\s+)(as)(\\s+)(system)\\b/, ['white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(produces\\s+operation)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@operationBody.$1' }]],\n [/^(\\s*)(given\\s+operation)(\\s+)([\\w.]+)(\\s+)(fails)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'keyword']],\n [/^(\\s*)(then\\s+(?:operation|compensated))(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier']],\n [new RegExp(`^(\\\\s*)(command)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`), ['white', 'keyword', 'white', { token: 'type.identifier', next: '@commandBody.$1' }]],\n [/^(\\s*)(handler)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@handlerBody.$1' }]],\n [/^(\\s*@?[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?)(\\s+)(generated)(\\s+identifier|)(?=\\s*(?:\\/\\/.*)?$)/,\n ['identifier', 'type.identifier', 'white', 'keyword', 'keyword']],\n [/^(\\s*)(generated)(\\s+)([a-z_]\\w*)(\\s*=(?!=|>))/, ['white', 'keyword', 'white', 'identifier', 'operator']],\n [/^(\\s*)(then)(\\s+)(returns)\\b/, ['white', 'keyword', 'white', 'keyword']],\n // Only unambiguous response headers: two-token property declarations keep their names.\n [/^(\\s*)(returns)(?=\\s*(?:\\/\\/.*)?$|\\s+@\\w+\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n // A modifier only after a complete type; names called optional remain ordinary names.\n [/^(\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:from\\b|\\/\\/|$))/,\n ['identifier', 'type.identifier', 'white', 'keyword']],\n // Query prefixes cannot fall back to being property names.\n [/^(?!\\s*(?:by|filter)\\s+)(\\s*@?[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:identifier\\b|from\\b|=(?!=|>)|\\/\\/|$))/,\n ['identifier', 'type.identifier', 'white', 'keyword']],\n [/^(\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?!observable\\s+optional\\s*(?:\\/\\/.*)?$)(?:observable\\s+)?)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:\\/\\/.*)?$)/,\n ['keyword', 'type.identifier', 'white', 'keyword']],\n [new RegExp(`^(\\\\s*)(given)(\\\\s+)(caller)(\\\\s+)(as)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`),\n ['white', 'keyword', 'white', 'keyword', 'white', 'keyword', 'white', 'type.identifier']],\n // A specification's clock, trigger, capture and query steps - matched before a sub-language keyword\n // can claim 'capture' and read the rest of the specification as change data capture.\n [/^(\\s*)(given|when)(\\s+)(clock|capture|trigger|query)\\b/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(then)(\\s+)(result|no\\s+(?:result|events))\\b/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(then)(\\s+)(events)(\\s+)(in any order)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(when)(\\s+)(redelivered)(\\s+)([\\w.]+)(\\s+)(to)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'type.identifier', 'white', 'keyword', 'white', 'type.identifier']],\n // Guarded-action words are contextual; property names keep their ordinary meaning.\n [/^(\\s*)(otherwise)(\\s+)(hidden)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(otherwise)(\\s+)(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'type.identifier']],\n [/^(\\s*)(when)(\\s+)(?=.+\\s+execute\\s+[\\w.]+\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', { token: 'white', next: '@guardedActionCondition' }]],\n [/^(\\s*)(behavior)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@behaviorBody.$1' }]],\n [/^(\\s*)(on)(\\s+)(refused)(\\s+)(by)(\\s+)(validation|constraint|authorization)\\b/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(on)(\\s+)(refused)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(on)(\\s+)([\\w-]+)\\b/, ['white', 'keyword', 'white', { token: 'keyword', next: '@interactionBody.$1' }]],\n [/^(\\s*)(acknowledge)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n // A quoted import names .play files rather than a qualified name - the path reads as a link.\n [/^(\\s*)(import)(\\s+)(\"[^\"\\\\]*\")/, ['white', 'keyword', 'white', 'string.link']],\n // Retain the header indent so event metadata stops at the enclosing block boundary.\n [/^(\\s*)((?:(?:produces|public)\\s+)?event)(\\s+)([A-Za-z_]\\w*)(\\s+)(generation)(\\s+)(\\d+)(?=\\s*(?:from\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s*)?(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'keyword', 'white', { token: 'number', next: '@eventBody.$1' }]],\n [/^(\\s*)((?:(?:produces|public)\\s+)?event)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:from\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s*)?(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@eventBody.$1' }]],\n // A tagged opening fence carries the embedded language; legacy tag lines still highlight.\n ...codeBlockTags.map(\n (tag): MonarchTokenRules[number] => [\n new RegExp(`^\\\\s*\\\\x60\\\\x60\\\\x60${tag}\\\\s*$`),\n { token: 'string.quote', next: `@codeBlock.${embeddedLanguages[tag]}`, nextEmbedded: embeddedLanguages[tag] },\n ],\n ),\n // Inline code block tags at end of line open an embedded code block.\n ...codeBlockTags.map(\n (tag): MonarchTokenRules[number] => [\n new RegExp(`\\\\b${tag}\\\\b(?=\\\\s*$)`),\n { token: 'keyword.tag', next: `@codeBlockPending.${embeddedLanguages[tag]}` },\n ],\n ),\n // Sub-language constructs switch to the registered sub-language's token rules.\n ...subLanguages.map(\n (subLanguage): MonarchTokenRules[number] => [\n new RegExp(`\\\\b${subLanguage.keyword}\\\\b`),\n { token: 'keyword', next: `@${subLanguageState(subLanguage.keyword)}` },\n ],\n ),\n // Typed documentation names are properties, not metadata directives.\n [/^(\\s*)(documentation)(?=\\s+[\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?\\s*(?:identifier\\b|generated\\b|=(?!=|>)|\\/\\/|$))/,\n ['white', 'identifier']],\n // A bare description or documentation keyword opens a fenced prose block.\n [/\\b(?:description|documentation)\\b(?=\\s*(?:\\/\\/.*)?$)/, { token: 'keyword', next: '@descriptionBlockPending' }],\n [/\\brow-click\\b/, 'keyword'],\n // A leading @ escapes a name that collides with a directive keyword - it is a name, not an attribute.\n [/^\\s*@[a-z_]\\w*/, 'identifier'],\n [/@\\w+/, 'annotation'],\n [\n /[A-Z]\\w*/,\n {\n cases: {\n '@sliceTypes': 'keyword.type',\n '@primitiveTypes': 'type',\n '@default': 'type.identifier',\n },\n },\n ],\n [\n /[a-z_]\\w*/,\n {\n cases: {\n '@keywords': 'keyword',\n '@default': 'identifier',\n },\n },\n ],\n { include: '@common' },\n ],\n\n guardedActionCondition: [\n [/(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', { token: 'type.identifier', next: '@pop' }]],\n { include: '@root' },\n ],\n\n behaviorBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n { include: '@root' },\n ],\n\n interactionBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(otherwise)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n [/^(\\s*)(when)(\\s+)(?=item\\.|\\()/, ['white', 'keyword', 'white']],\n [/^(\\s*)(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier']],\n { include: '@root' },\n ],\n\n purposeBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(basis|interest|condition|authorization|subjects|retention|recipient|transfer|erasure)(\\s+)/, ['white', 'keyword', 'white']],\n [/\\b(safeguard|exception)\\b/, 'keyword'],\n { include: '@root' },\n ],\n\n conceptBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(@?pii|personal|@?sensitive|secret)(\\s+)(reason|scope|special|criminal)\\b/, ['white', 'keyword', 'white', 'keyword']],\n { include: '@root' },\n ],\n\n commandBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(validate)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@commandValidation.$1' }]],\n { include: '@root' },\n ],\n\n commandValidation: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [new RegExp(`^(\\\\s*)([${bmpWordCharacters}.]+)(\\\\s+)(rule)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?:severity\\\\s+\\\\w+|message\\\\s+.*|//.*|$))`),\n ['white', 'identifier', 'white', 'keyword', 'white', { token: 'type.identifier', next: '@namedRuleBody.$1' }]],\n { include: '@root' },\n ],\n\n namedRuleBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n operationBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(execute|compensate)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@operationPhase.$1' }]],\n [/^(\\s*)(uses)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier']],\n [/^(\\s*)(@?[a-z_]\\w*)(\\s+)([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?)(?=\\s*(?:=(?!=|>)|\\/\\/|$))/,\n ['white', 'identifier', 'white', 'type.identifier']],\n { include: '@root' },\n ],\n\n operationPhase: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n handlerBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n implementationBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(hint)(?=\\s+\")/, ['white', 'keyword']],\n { include: '@root' },\n ],\n\n eventBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(id)(?=\\s+\")/, ['white', 'keyword']],\n [/^(\\s*)(documentation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@descriptionBlockPending' }]],\n { include: '@root' },\n ],\n\n common: commonTokenRules,\n\n // After a code tag, the only thing allowed before the opening fence is whitespace.\n codeBlockPending: [\n [\n /^\\s*```\\s*$/,\n { token: 'string.quote', switchTo: '@codeBlock.$S2', nextEmbedded: '$S2' },\n ],\n [/^\\s*[^\\s`].*$/, { token: '@rematch', next: '@pop' }],\n [/\\s+/, 'white'],\n ],\n\n codeBlock: [\n [/^\\s*```\\s*$/, { token: 'string.quote', next: '@pop', nextEmbedded: '@pop' }],\n [/[^`]+/, ''],\n [/`/, ''],\n ],\n\n // After a bare description, the only thing allowed before the opening fence is whitespace.\n descriptionBlockPending: [\n [/\\/\\/.*$/, 'comment'],\n [/^\\s*```(?:text|markdown)?\\s*$/, { token: 'string.quote', switchTo: '@descriptionBlock' }],\n [/^\\s*[^\\s`].*$/, { token: '@rematch', next: '@pop' }],\n [/\\s+/, 'white'],\n ],\n\n descriptionBlock: [\n [/^\\s*```\\s*$/, { token: 'string.quote', next: '@pop' }],\n [/.+/, 'string'],\n ],\n };\n\n for (const subLanguage of subLanguages) {\n tokenizer[subLanguageState(subLanguage.keyword)] = [\n subLanguageExitRule(subLanguages),\n ...subLanguage.tokens,\n { include: '@common' },\n [/[A-Z]\\w*/, 'type.identifier'],\n [/[a-z_]\\w*/, 'identifier'],\n ];\n }\n\n return {\n defaultToken: '',\n tokenPostfix: '.play',\n ignoreCase: false,\n keywords: [...constructKeywords.filter(keyword => !contextualConstructs.has(keyword)), ...clauseKeywords, ...codeBlockTags],\n sliceTypes,\n primitiveTypes,\n tokenizer,\n } as languages.IMonarchLanguage;\n}\n"],"mappings":"2OAiBA,MAAMA,kBAAuB,IAAI,IAAI,CAAC,YAAa,SAAU,cAAe,UAAW,MAAM,CAAC,EAExFC,EAA4C,CAC9C,OAAQ,SACR,WAAY,aACZ,MAAO,aACP,KAAM,OACN,IAAK,KACT,EAEA,SAAS,iBAAiB,EAAyB,CAC/C,MAAO,eAAeC,GA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,CACnB,CACJ,EAEA,IAAK,IAAMD,KAAeD,EACtB,EAAU,iBAAiBC,EAAY,OAAO,GAAK,CAC/C,oBAAoBD,CAAY,EAChC,GAAGC,EAAY,OACf,CAAE,QAAS,SAAU,EACrB,CAAC,WAAY,iBAAiB,EAC9B,CAAC,YAAa,YAAY,CAC9B,EAGJ,MAAO,CACH,aAAc,GACd,aAAc,QACd,WAAY,GACZ,SAAU,CAAC,GAAGF,EAAkB,OAAO,GAAW,CAACJ,EAAqB,IAAIE,CAAO,CAAC,EAAG,GAAGU,EAAgB,GAAGF,CAAa,EAC1H,aACA,iBACA,WACJ,CACJ"}
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["contextualConstructs","embeddedLanguages","keyword","exitKeywords","constructKeywords","subLanguages","subLanguage","commonTokenRules","tokenizer","bmpWordCharacters","codeBlockTags","tag","clauseKeywords"],"sources":["../../tokens.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { languages } from 'monaco-editor';\nimport {\n clauseKeywords,\n codeBlockTags,\n constructKeywords,\n primitiveTypes,\n sliceTypes,\n} from './language';\nimport { MonarchTokenRules, SubLanguage } from './sub-language-registry';\nimport { bmpWordCharacters } from './bmp-word-characters';\n\n// Maps a Screenplay inline code tag to the Monaco language id used for embedded highlighting.\n// Declaration registration must not globally reserve existing property names.\n// Ambiguous standalone operation headers are supplied by typed semantic tokens.\nconst contextualConstructs = new Set(['operation', 'system', 'eventsource', 'purpose', 'runs']);\n\nconst embeddedLanguages: Record<string, string> = {\n csharp: 'csharp',\n typescript: 'typescript',\n react: 'typescript',\n html: 'html',\n sql: 'sql',\n};\n\nfunction subLanguageState(keyword: string): string {\n return `subLanguage_${keyword}`;\n}\n\n// A construct keyword at the start of a line ends any indented sub-language block.\nfunction subLanguageExitRule(subLanguages: SubLanguage[]): MonarchTokenRules[number] {\n const exitKeywords = [...constructKeywords.filter(keyword => !contextualConstructs.has(keyword)), ...subLanguages.map((subLanguage) => subLanguage.keyword)];\n return [\n new RegExp(`^\\\\s*(?:${exitKeywords.join('|')})\\\\b`),\n { token: '@rematch', next: '@pop' },\n ];\n}\n\n// Shared across the composite `.play` tokenizer and every standalone sub-language tokenizer\n// (comments, `$`-prefixed context variables, strings, numbers, operators, delimiters, whitespace).\nexport const commonTokenRules: MonarchTokenRules = [\n [/\\/\\/.*$/, 'comment'],\n [/\\$(?:context|identity|eventContext|eventSourceId|causedBy|refusal)(?:\\.\\w+)*/, 'variable.predefined'],\n [/\\$(?:env|secrets|strings)\\.[\\w.]+/, 'variable.predefined'],\n [/\\$\\.[\\w.]*/, 'variable.predefined'],\n [/\"(?:[^\"\\\\]|\\\\.)*\"/, 'string'],\n [/\"(?:[^\"\\\\]|\\\\.)*$/, 'string.invalid'],\n [/\\d+(?:ms|s|m|h|d)\\b/, 'number'],\n [/-?\\d+\\.\\d+/, 'number.float'],\n [/-?\\d+/, 'number'],\n [/=>|==|!=|>=|<=|[><=:?]/, 'operator'],\n [/[[\\](),.]/, 'delimiter'],\n [/\\s+/, 'white'],\n];\n\nexport function createTokensProvider(subLanguages: SubLanguage[]): languages.IMonarchLanguage {\n const tokenizer: Record<string, MonarchTokenRules> = {\n root: [\n [new RegExp(`^(\\\\s*)(example)(\\\\s+)([A-Z][${bmpWordCharacters}]*)(\\\\s*)(:)(\\\\s*)([A-Z][${bmpWordCharacters}.]*)(?=\\\\s*(?://.*)?$)`),\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'operator', 'white', 'type.identifier']],\n [/^(\\s*)(direction)(\\s+)(inbound|outbound)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [new RegExp(`^()(purpose)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`), ['white', 'keyword', 'white', { token: 'type.identifier', next: '@purposeBody.$1' }]],\n [/^(\\s*)(parameter)(\\s+)([a-z_]\\w*)(\\s+)([\\w.]+(?:\\[\\])?(?:\\s+optional)?)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'identifier', 'white', 'type.identifier']],\n [/^(\\s*)(case)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:[a-z_]\\w*\\s*=|\\/\\/|$))/, ['white', 'keyword', 'white', 'type.identifier']],\n [/\\b(case)(\\.)([a-z_]\\w*)\\b/, ['keyword', 'delimiter', 'identifier']],\n [/^(\\s*)(concept)(\\s+)([^\\s:]+)(\\s*:\\s*)(\\w+)((?:\\s+(?:@?pii|personal|@?sensitive|secret))*)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier', 'operator', { token: 'type.identifier', next: '@conceptBody.$1' }, 'keyword']],\n [/^(numbers)([ \\t]+)(exact)(?=[ \\t]*(?:(?:\\/\\/|#).*)?$)/, ['keyword', 'white', 'keyword']],\n [/^(eventsource)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', 'type.identifier']],\n [/^(system)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', 'type.identifier']],\n // 'runs' is contextual: only a reaction's identity line is a keyword; a property called runs keeps its name.\n [/^(\\s*)(runs)(\\s+)(as)(\\s+)(system)\\b/, ['white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(produces\\s+operation)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@operationBody.$1' }]],\n [/^(\\s*)(given\\s+operation)(\\s+)([\\w.]+)(\\s+)(fails)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'keyword']],\n [/^(\\s*)(then\\s+(?:operation|compensated))(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier']],\n [new RegExp(`^(\\\\s*)(command)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`), ['white', 'keyword', 'white', { token: 'type.identifier', next: '@commandBody.$1' }]],\n [/^(\\s*)(handler)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@handlerBody.$1' }]],\n [/^(\\s*@?[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?)(\\s+)(generated)(\\s+identifier|)(?=\\s*(?:\\/\\/.*)?$)/,\n ['identifier', 'type.identifier', 'white', 'keyword', 'keyword']],\n [/^(\\s*)(generated)(\\s+)([a-z_]\\w*)(\\s*=(?!=|>))/, ['white', 'keyword', 'white', 'identifier', 'operator']],\n [/^(\\s*)(then)(\\s+)(returns)\\b/, ['white', 'keyword', 'white', 'keyword']],\n // Only unambiguous response headers: two-token property declarations keep their names.\n [/^(\\s*)(returns)(?=\\s*(?:\\/\\/.*)?$|\\s+@\\w+\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n [/^(\\s*@?[a-z_]\\w*\\s+)([\\w.]+)(\\s+)(key)(?=\\s*(?:\\/\\/.*)?$)/, ['identifier', 'type.identifier', 'white', 'keyword']],\n // A modifier only after a complete type; names called optional remain ordinary names.\n [/^(\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:from\\b|\\/\\/|$))/,\n ['identifier', 'type.identifier', 'white', 'keyword']],\n // Query prefixes cannot fall back to being property names.\n [/^(?!\\s*(?:by|filter)\\s+)(\\s*@?[a-z_]\\w*\\s+)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:identifier\\b|from\\b|=(?!=|>)|\\/\\/|$))/,\n ['identifier', 'type.identifier', 'white', 'keyword']],\n [/^(\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?!observable\\s+optional\\s*(?:\\/\\/.*)?$)(?:observable\\s+)?)([\\w.]+(?:\\[\\])?)(\\s+)(optional)\\b(?=\\s*(?:\\/\\/.*)?$)/,\n ['keyword', 'type.identifier', 'white', 'keyword']],\n [new RegExp(`^(\\\\s*)(given)(\\\\s+)(caller)(\\\\s+)(as)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?://.*)?$)`),\n ['white', 'keyword', 'white', 'keyword', 'white', 'keyword', 'white', 'type.identifier']],\n // A specification's clock, trigger, capture and query steps - matched before a sub-language keyword\n // can claim 'capture' and read the rest of the specification as change data capture.\n [/^(\\s*)(given|when)(\\s+)(clock|capture|trigger|query)\\b/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(then)(\\s+)(result|no\\s+(?:result|events))\\b/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(then)(\\s+)(events)(\\s+)(in any order)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(when)(\\s+)(redelivered)(\\s+)([\\w.]+)(\\s+)(to)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'type.identifier', 'white', 'keyword', 'white', 'type.identifier']],\n // Guarded-action words are contextual; property names keep their ordinary meaning.\n [/^(\\s*)(otherwise)(\\s+)(hidden)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(otherwise)(\\s+)(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'type.identifier']],\n [/^(\\s*)(when)(\\s+)(?=.+\\s+execute\\s+[\\w.]+\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', { token: 'white', next: '@guardedActionCondition' }]],\n [/^(\\s*)(behavior)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@behaviorBody.$1' }]],\n [/^(\\s*)(on)(\\s+)(refused)(\\s+)(by)(\\s+)(validation|constraint|authorization)\\b/,\n ['white', 'keyword', 'white', 'keyword', 'white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(on)(\\s+)(refused)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'keyword']],\n [/^(\\s*)(on)(\\s+)([\\w-]+)\\b/, ['white', 'keyword', 'white', { token: 'keyword', next: '@interactionBody.$1' }]],\n [/^(\\s*)(acknowledge)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n // A quoted import names .play files rather than a qualified name - the path reads as a link.\n [/^(\\s*)(import)(\\s+)(\"[^\"\\\\]*\")/, ['white', 'keyword', 'white', 'string.link']],\n // Retain the header indent so event metadata stops at the enclosing block boundary.\n [/^(\\s*)((?:(?:produces|public)\\s+)?event)(\\s+)([A-Za-z_]\\w*)(\\s+)(generation)(\\s+)(\\d+)(?=\\s*(?:from\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s*)?(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', 'type.identifier', 'white', 'keyword', 'white', { token: 'number', next: '@eventBody.$1' }]],\n [/^(\\s*)((?:(?:produces|public)\\s+)?event)(\\s+)([A-Za-z_]\\w*)(?=\\s*(?:from\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s*)?(?:\\/\\/.*)?$)/,\n ['white', 'keyword', 'white', { token: 'type.identifier', next: '@eventBody.$1' }]],\n // A tagged opening fence carries the embedded language; legacy tag lines still highlight.\n ...codeBlockTags.map(\n (tag): MonarchTokenRules[number] => [\n new RegExp(`^\\\\s*\\\\x60\\\\x60\\\\x60${tag}\\\\s*$`),\n { token: 'string.quote', next: `@codeBlock.${embeddedLanguages[tag]}`, nextEmbedded: embeddedLanguages[tag] },\n ],\n ),\n // Inline code block tags at end of line open an embedded code block.\n ...codeBlockTags.map(\n (tag): MonarchTokenRules[number] => [\n new RegExp(`\\\\b${tag}\\\\b(?=\\\\s*$)`),\n { token: 'keyword.tag', next: `@codeBlockPending.${embeddedLanguages[tag]}` },\n ],\n ),\n // Sub-language constructs switch to the registered sub-language's token rules.\n ...subLanguages.map(\n (subLanguage): MonarchTokenRules[number] => [\n new RegExp(`\\\\b${subLanguage.keyword}\\\\b`),\n { token: 'keyword', next: `@${subLanguageState(subLanguage.keyword)}` },\n ],\n ),\n // Typed documentation names are properties, not metadata directives.\n [/^(\\s*)(documentation)(?=\\s+[\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?\\s*(?:identifier\\b|generated\\b|=(?!=|>)|\\/\\/|$))/,\n ['white', 'identifier']],\n // A bare description or documentation keyword opens a fenced prose block.\n [/\\b(?:description|documentation)\\b(?=\\s*(?:\\/\\/.*)?$)/, { token: 'keyword', next: '@descriptionBlockPending' }],\n [/\\brow-click\\b/, 'keyword'],\n // A leading @ escapes a name that collides with a directive keyword - it is a name, not an attribute.\n [/^\\s*@[a-z_]\\w*/, 'identifier'],\n [/@\\w+/, 'annotation'],\n [\n /[A-Z]\\w*/,\n {\n cases: {\n '@sliceTypes': 'keyword.type',\n '@primitiveTypes': 'type',\n '@default': 'type.identifier',\n },\n },\n ],\n [\n /[a-z_]\\w*/,\n {\n cases: {\n '@keywords': 'keyword',\n '@default': 'identifier',\n },\n },\n ],\n { include: '@common' },\n ],\n\n guardedActionCondition: [\n [/(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/, ['keyword', 'white', { token: 'type.identifier', next: '@pop' }]],\n { include: '@root' },\n ],\n\n behaviorBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n { include: '@root' },\n ],\n\n interactionBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(otherwise)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword']],\n [/^(\\s*)(when)(\\s+)(?=item\\.|\\()/, ['white', 'keyword', 'white']],\n [/^(\\s*)(execute)(\\s+)([\\w.]+)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier']],\n { include: '@root' },\n ],\n\n purposeBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(basis|interest|condition|authorization|subjects|retention|recipient|transfer|erasure)(\\s+)/, ['white', 'keyword', 'white']],\n [/\\b(safeguard|exception)\\b/, 'keyword'],\n { include: '@root' },\n ],\n\n conceptBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(@?pii|personal|@?sensitive|secret)(\\s+)(reason|scope|special|criminal)\\b/, ['white', 'keyword', 'white', 'keyword']],\n { include: '@root' },\n ],\n\n commandBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(validate)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@commandValidation.$1' }]],\n { include: '@root' },\n ],\n\n commandValidation: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [new RegExp(`^(\\\\s*)([${bmpWordCharacters}.]+)(\\\\s+)(rule)(\\\\s+)([A-Za-z_][${bmpWordCharacters}]*)(?=\\\\s*(?:severity\\\\s+\\\\w+|message\\\\s+.*|//.*|$))`),\n ['white', 'identifier', 'white', 'keyword', 'white', { token: 'type.identifier', next: '@namedRuleBody.$1' }]],\n { include: '@root' },\n ],\n\n namedRuleBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n operationBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(execute|compensate)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@operationPhase.$1' }]],\n [/^(\\s*)(uses)(\\s+)([A-Z]\\w*)(?=\\s*(?:\\/\\/.*)?$)/, ['white', 'keyword', 'white', 'type.identifier']],\n [/^(\\s*)(@?[a-z_]\\w*)(\\s+)([\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?)(?=\\s*(?:=(?!=|>)|\\/\\/|$))/,\n ['white', 'identifier', 'white', 'type.identifier']],\n { include: '@root' },\n ],\n\n operationPhase: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n handlerBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(implementation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@implementationBody.$1' }]],\n { include: '@root' },\n ],\n\n implementationBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(hint)(?=\\s+\")/, ['white', 'keyword']],\n { include: '@root' },\n ],\n\n eventBody: [\n [/^(?!$S2[ \\t]+|\\s*$)/, { token: '@rematch', next: '@pop' }],\n [/^(\\s*)(id)(?=\\s+\")/, ['white', 'keyword']],\n [/^(\\s*)(documentation)(?=\\s*(?:\\/\\/.*)?$)/, ['white', { token: 'keyword', next: '@descriptionBlockPending' }]],\n { include: '@root' },\n ],\n\n common: commonTokenRules,\n\n // After a code tag, the only thing allowed before the opening fence is whitespace.\n codeBlockPending: [\n [\n /^\\s*```\\s*$/,\n { token: 'string.quote', switchTo: '@codeBlock.$S2', nextEmbedded: '$S2' },\n ],\n [/^\\s*[^\\s`].*$/, { token: '@rematch', next: '@pop' }],\n [/\\s+/, 'white'],\n ],\n\n codeBlock: [\n [/^\\s*```\\s*$/, { token: 'string.quote', next: '@pop', nextEmbedded: '@pop' }],\n [/[^`]+/, ''],\n [/`/, ''],\n ],\n\n // After a bare description, the only thing allowed before the opening fence is whitespace.\n descriptionBlockPending: [\n [/\\/\\/.*$/, 'comment'],\n [/^\\s*```(?:text|markdown)?\\s*$/, { token: 'string.quote', switchTo: '@descriptionBlock' }],\n [/^\\s*[^\\s`].*$/, { token: '@rematch', next: '@pop' }],\n [/\\s+/, 'white'],\n ],\n\n descriptionBlock: [\n [/^\\s*```\\s*$/, { token: 'string.quote', next: '@pop' }],\n [/.+/, 'string'],\n ],\n };\n\n for (const subLanguage of subLanguages) {\n tokenizer[subLanguageState(subLanguage.keyword)] = [\n subLanguageExitRule(subLanguages),\n ...subLanguage.tokens,\n { include: '@common' },\n [/[A-Z]\\w*/, 'type.identifier'],\n [/[a-z_]\\w*/, 'identifier'],\n ];\n }\n\n return {\n defaultToken: '',\n tokenPostfix: '.play',\n ignoreCase: false,\n keywords: [...constructKeywords.filter(keyword => !contextualConstructs.has(keyword)), ...clauseKeywords, ...codeBlockTags],\n sliceTypes,\n primitiveTypes,\n tokenizer,\n } as languages.IMonarchLanguage;\n}\n"],"mappings":"2OAiBA,MAAMA,kBAAuB,IAAI,IAAI,CAAC,YAAa,SAAU,cAAe,UAAW,MAAM,CAAC,EAExFC,EAA4C,CAC9C,OAAQ,SACR,WAAY,aACZ,MAAO,aACP,KAAM,OACN,IAAK,KACT,EAEA,SAAS,iBAAiB,EAAyB,CAC/C,MAAO,eAAeC,GAC1B,CAGA,SAAS,oBAAoB,EAAwD,CACjF,IAAMC,EAAe,CAAC,GAAGC,EAAkB,OAAO,GAAW,CAACJ,EAAqB,IAAIE,CAAO,CAAC,EAAG,GAAGG,EAAa,IAAK,GAAgBC,EAAY,OAAO,CAAC,EAC3J,MAAO,CACC,OAAO,WAAWH,EAAa,KAAK,GAAG,EAAE,KAAK,EAClD,CAAE,MAAO,WAAY,KAAM,MAAO,CACtC,CACJ,CAIA,MAAaI,EAAsC,CAC/C,CAAC,UAAW,SAAS,EACr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AAGF,EAAkB,OAAO,GAAW,CAACJ,EAAqB,IAAIE,CAAO,CAAC,EAAG,GAAGU,EAAgB,GAAGF,CAAa,EAC1H,aACA,iBACA,WACJ,CACJ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import"./_virtual/_virtual/_rolldown/runtime.js";import{causedByProperties as e,contextRoots as t,identityProperties as n,primitiveTypes as r,sliceTypes as i}from"./language.js";import{DiagnosticCodes as a}from"./compiler/Diagnostics/DiagnosticCodes.js";import{legacyOptionalTypeLength as o}from"./compiler/Authoring/QuickFixes.js";import"./compiler/index.js";import{enclosingChain as s,fenceMap as c,indentOf as l}from"./document-context.js";import{eventAnalysisSource as u}from"./event-analysis-source.js";import{resolveEventContextPath as d}from"./event-context.js";import{responseAnalysis as f}from"./response-analysis.js";import{knownEventNames as p,knownTypeNames as m,mergeSymbols as h,propertyTypeReference as g,scanDocument as _,symbolsForBuffer as v}from"./symbols.js";import{diagnosticCodes as y}from"./diagnostic-codes.js";import{validateInlineEvents as b}from"./inline-event-validation.js";import{fileImportOn as x,isFileImportLine as S}from"./file-imports.js";function issue(e,t,n,r,i,a){return{severity:e,message:i,line:t,startColumn:n,endColumn:n+r,code:a}}function tokenIssue(e,t,n,r,i,a){return issue(e,t,n.indexOf(r)+1,r.length,i,a)}function validateDeclarations(e,t,n){let i=[],a=/* @__PURE__ */ new Set([...m(t,r),...m(n,[])]),checkProperties=(e,t)=>{for(let n of e.filter(e=>!a.has(g(e).name))){let e=g(n).name;i.push(issue(`warning`,n.line,n.sourceType.startColumn,n.sourceType.text.length,e===`optional`?`Unknown type 'optional' on '${n.name}' of ${t} — did you forget the type before 'optional'?`:`Unknown type '${e}' on '${n.name}' of ${t} — declare it with 'concept ${e} : <Primitive>' or 'type ${e}'.`,y.unknownType))}};for(let e of t.types)checkProperties(e.properties,`type '${e.name}'`);for(let e of t.events)checkProperties(e.properties,`event '${e.name}'`);for(let e of t.queries)checkProperties(e.parameters,`query '${e.name}'`);for(let n of t.commands){checkProperties(n.properties,`command '${n.name}'`);let t=n.properties.filter(e=>e.isIdentifier);for(let r of t.slice(1))i.push(tokenIssue(`error`,r.line,e[r.line],`identifier`,`Command '${n.name}' already marks '${t[0].name}' as identifier — only one property can be the identifier.`,y.duplicateCommandIdentifier))}let o=/* @__PURE__ */ new Map;for(let n of[...t.concepts,...t.types])o.get(n.name)===void 0?o.set(n.name,n.line):i.push(tokenIssue(`error`,n.line,e[n.line],n.name,`Duplicate declaration of '${n.name}' — concept and type names must be unique.`,y.duplicateDeclaration));return i}function validateLines(s,u={}){let d=c(s),m=_(s),g=u.application??h(),x=v(s,{...g,authoringPath:u.path??g.authoringPath,authoringPlacement:u.placement??g.authoringPlacement}),S=f(s,x.authoringDocuments??x.authoringSources?.filter(e=>e!==s.join(`
|
|
2
|
-
`)),x.authoringPlacement,x.authoringPath,x.authoringPlacementResolved),C=new Set(S.eventSources.routes.map(e=>e.location.line-1)),w={...m,commands:m.commands.map(e=>({...e,properties:e.properties.filter(e=>!C.has(e.line)),produces:e.produces?.filter(e=>!S.operationProductionLines?.has(e.line)),productionHeaders:e.productionHeaders?.filter(e=>!S.operationProductionLines?.has(e))}))},T=/* @__PURE__ */ new Set([...p(w),...p(g)]),E=new Set([...w.policies,...g.policies].map(e=>e.name)),D=validateDeclarations(s,w,g);D.push(...validateProductionDestinations(s,w));let O=/* @__PURE__ */ new Set([a.LegacyOptionalSuffix,a.InvalidOptionalModifierOrder,a.OptionalReadsNotSupported]),k=/* @__PURE__ */ new Set([a.UnexpectedTokenInPolicyCondition,a.ExpectedPolicyCondition,a.UnclosedPolicyConditionGroup,a.ExpectedRoleName,a.ExpectedClaimName,a.ExpectedClaimMatches,a.ExpectedClaimMatchTarget]),A=/* @__PURE__ */ new Set([a.UnknownEvent,a.UnknownReadModelProperty,a.PiiNotSupportedOnIdentifier]),j=/* @__PURE__ */ new Set([a.EventFromLaterSlice,a.TimelineCycleGroup]),M=/* @__PURE__ */ new Set([a.UndeclaredDependency,a.UnusedDependencyDeclaration,a.InvalidDependencyTarget,a.RepeatedDependencyDeclaration,a.MutualDependencyDeclarations,a.AmbiguousReference]),N=/* @__PURE__ */ new Set([a.InvalidEventDeclaration,a.InvalidImportDeclaration,a.InvalidSliceDeclaration,a.InvalidDescription,a.DuplicateDescription,a.EmptyDescription,a.DuplicateEventSubject,a.InvalidSubjectType,a.ProtectedSubjectType,a.InvalidSubjectOwner,a.ReadModelSubjectNotSupported,a.InvalidSubjectModifierOrder,a.UnsupportedInteractionAlternatives,a.MixedInteractionAlternatives,a.InteractionAlternativeWithoutActions,a.InlineInteractionAlternative,a.LegacyInteractionWhere,a.InvalidSpecificationParameter,a.InvalidSpecificationCase,a.DuplicateSpecificationParameter,a.DuplicateSpecificationCase,a.IncompleteSpecificationTable,a.InvalidSpecificationCaseAssignment,a.InvalidSpecificationCaseValue,a.InvalidSpecificationCaseReference,a.OptionalSpecificationParameterTarget,a.SpecificationCaseNameCollision,a.IncompatibleSpecificationParameterType,a.UnusedSpecificationParameter,a.SingularSpecificationTableExpansion,a.InvalidSpecificationCallerPersona,a.UnsynthesizablePersonaCaller,a.PersonaWithoutGate,a.GateWithoutPersona,a.AmbiguousPersonaCaller,a.InvalidDocumentation,a.ConflictingDocumentationAcrossFiles,a.InvalidAbsentReadModelStep,a.UnknownConstraintProperty,a.OmittedProductionDestination,a.InvalidSpecificationExample,a.DuplicateSpecificationAssignment]),P=/* @__PURE__ */ new Set([a.InvalidPurposeDeclaration,a.InvalidPurposeVocabulary,a.DuplicatePurposeField,a.DuplicatePurposeDeclaration,a.UnknownPurpose,a.PurposeInterestMismatch,a.PersonalDataWithoutPurpose,a.SpecialDataWithoutCondition,a.CriminalDataWithoutAuthorization,a.PurposeWithoutBasis,a.UnusedPurpose,a.UnknownConceptDirective,a.AttributeReasonWithoutAttribute,a.DuplicateAttributeReason,a.LegacyComplianceMarker,a.DuplicateComplianceMarker,a.UnknownComplianceMarker,a.InvalidSecretScope,a.DuplicateSecretScope,a.SecretScopeIgnoredForPii,a.InvalidPersonalDataQualifier,a.DuplicateSpecialCategory]),F=/* @__PURE__ */ new Set;for(let e of u.compilerDiagnostics??S.diagnostics){let t=e.code===a.UnknownType&&(S.identityDetails??[]).some(t=>t.line===e.location.line-1),n=e.code===a.RepeatedSingularDeclarationAcrossFiles&&e.message.includes(`identity block`);if(!t&&!n&&!P.has(e.code)&&!O.has(e.code)&&!k.has(e.code)&&!A.has(e.code)&&!j.has(e.code)&&!M.has(e.code)&&!N.has(e.code)&&e.code!==a.InvalidSpecificationExampleBody&&e.code!==a.UnknownRuleImplementationDirective&&e.code!==a.InvalidValidationRule&&e.code!==a.RepeatedDeclarationAcrossFiles&&!/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY063[3-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$/.test(e.code))continue;let r=e.location.line-1;if(e.code===a.OmittedProductionDestination&&D.some(t=>t.code===e.code&&t.line===r))continue;if(e.code===a.UnknownEvent){if(F.has(r))continue;F.add(r)}let i=o(s[r],e)||s[r].length-e.location.column+1;D.push(issue(e.severity,r,e.location.column,i,e.message,e.code))}let checkEvent=(e,t,n)=>{!T.has(n)&&!F.has(e)&&D.push(tokenIssue(`warning`,e,t,n,`Unknown event type '${n}' — declare it in a slice or import it.`,y.unknownEvent))},I=-1;for(let a=0;a<s.length;a++){let o=s[a],c=o.trim();if(d[a]||c.length===0)continue;let u=o.match(/^[ ]*(\t+)/);if(u&&D.push(issue(`warning`,a,u[0].length-u[1].length+1,u[1].length,`Screenplay is indentation-based — use spaces, not tabs.`,y.tabIndentation)),I>=0){if(l(o)>I&&/^(?:or\s+)?[A-Z]\w*(?:\s+or\s+[A-Z]\w*)*$/.test(c)){for(let e of c.split(/\s+/).filter(e=>e!==`or`))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy));continue}I=-1}let f=validateImport(s,d,a);f&&D.push(f);let p=c.match(/^slice\s+(\w+)/);p&&!i.includes(p[1])&&D.push(tokenIssue(`error`,a,o,p[1],`Unknown slice type '${p[1]}' — expected ${i.join(`, `)}.`,y.unknownSliceType));let m=c.match(/^concept\s+\w+\s*:\s*(\w+)/);m&&m[1]!==`Enum`&&!r.includes(m[1])&&D.push(tokenIssue(`error`,a,o,m[1],`Unknown primitive type '${m[1]}' — expected ${r.join(`, `)} or Enum.`,y.unknownPrimitiveType));let h=c.match(/^authorize\s+(.*)$/);if(h){I=l(o);for(let e of h[1].split(/\s+/).filter(e=>e!==`or`&&e.length>0))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy))}let g=c.match(/^on\s+([A-Z]\w*)\s*$/);g&&checkEvent(a,o,g[1]);let _=c.match(/^produces\s+([A-Z]\w*)\s*$/);if(_&&!S.operationProductionLines?.has(a)&&checkEvent(a,o,_[1]),/^produces\s+when\b/.test(c)&&!S.operationProductionLines?.has(a))for(let e=a+1;e<s.length;e++){let t=s[e];if(!(d[e]||t.trim().length===0)){if(l(t)>l(o)){let n=t.trim().match(/^([A-Z]\w*)\s*$/);n&&checkEvent(e,t,n[1])}break}}let v=c.match(/^unique\s+event\s+([A-Z]\w*)/);v&&checkEvent(a,o,v[1]);let b=c.match(/^unique\s+[a-z_]\w*\s+on\s+([A-Z]\w*)/);b&&checkEvent(a,o,b[1]);for(let e of o.match(/\$identity\.[\w.]+/g)??[]){let t=e.substring(10).split(`.`)[0],r=[...n,...(S.identityDetails??[]).map(e=>e.name)];r.includes(t)||D.push(tokenIssue(`warning`,a,o,e,`Unknown $identity property '${t}' — expected ${r.join(`, `)}.`,y.unknownContextIdentityProperty))}for(let r of o.match(/\$context\.[\w.]+/g)??[]){let i=r.substring(9).split(`.`);t.includes(i[0])?i[0]===`causedBy`&&i.length>1&&!e.includes(i[1])?D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.causedBy property '${i[1]}' — expected ${e.join(`, `)}.`,y.unknownContextCausedByProperty)):i[0]===`identity`&&i.length>1&&!n.includes(i[1])&&D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.identity property '${i[1]}' — expected ${n.join(`, `)}.`,y.unknownContextIdentityProperty)):D.push(tokenIssue(`warning`,a,o,r,`Unknown $context path '${i.join(`.`)}' — expected one of ${t.join(`, `)}.`,y.unknownContextPath))}}D.push(...validateEventContextPaths(s,d)),D.push(...b(s,w,g,S.operationProductionLines));let L=s.map((e,t)=>({line:e,index:t})).filter(({line:e})=>/^\s*```(?:[a-z]+)?\s*$/.test(e));if(L.length%2==1){let e=L[L.length-1];D.push(issue(`error`,e.index,1,e.line.length+1,"Unclosed inline code block — expected a closing ``` line.",y.unclosedCodeBlock))}return D}function validateProductionDestinations(e,t){let n=[];e=u(e);for(let r of t.commands){let t=r.properties.filter(e=>e.isIdentifier&&!g(e).isOptional&&!g(e).isCollection);if(t.length===1)for(let i of r.produces??[]){if(i.inline||i.conditional||i.target!==void 0)continue;let r=i.line;n.push(issue(`information`,r,l(e[r])+1,e[r].trim().length,`Plain 'produces ${i.name}' omits its destination — use 'for ${t[0].name}' to explicitly select the command's identifier.`,y.omittedProductionDestination))}}return n}function validateImport(e,t,n){let r=e[n],i=r.trim().replace(/\s*\/\/.*$/,``);if(!/^import\b/.test(i)||x(r,n))return;let a=l(r);if(a>0&&[`module`,`feature`].includes(s(e,t,n,a)[0])||S(r))return issue(`error`,n,a+1,i.length,`Invalid import '${i}' — inside a module or feature, import names files: 'import "<path or glob>"'.`,y.invalidFileImport)}const C=/^(?:(?:increment|decrement|count|clear|add|subtract|set)\s+)?@?([$\w.]+)(?=\s|=|$)/;function validateEventContextPaths(e,t){let n=[],names=e=>e.map(e=>e.name).join(`, `);for(let r=0;r<e.length;r++){let i=e[r];if(t[r])continue;for(let e of i.matchAll(/(\.)?\$eventContext((?:\.(?:\w+(?:\(\))?)?)*)/g)){let t=e[0].substring(e[1]?.length??0),i=e[2];if(i.length===0){e[1]&&n.push(issue(`error`,r,(e.index??0)+2,t.length,`'$eventContext' names no member - expected one of ${names(d(``).expected)}.`,y.missingEventContextPath));continue}let a=i.substring(1),o=d(a),s=(e.index??0)+(e[1]?.length??0)+1;switch(o.status){case`missing`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' names no member - expected one of ${names(o.expected)}.`,y.missingEventContextPath));break;case`unknownMember`:n.push(issue(`warning`,r,s,t.length,`Unknown event context member '${o.segment}' in '$eventContext.${a}' - expected one of ${names(o.expected)}.`,y.unknownEventContextMember));break;case`unknownSubPath`:{let e=o.expected.length===0?`no members to address`:`members ${names(o.expected)}`;n.push(issue(`warning`,r,s,t.length,`Unknown event context path '$eventContext.${a}' - '${o.member?.name}' (${o.member?.type}) has ${e}.`,y.unknownEventContextPath));break}case`belowCollection`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' cannot resolve - '${o.member?.name}' is a collection (${o.member?.type}) and cannot be addressed below.`,y.eventContextPathBelowCollection))}}let a=i.trim().match(C)?.[1],o=a?.match(/\.\$(\w+)/)?.[1];a&&o&&o!==`eventContext`&&n.push(tokenIssue(`warning`,r,i,a,`Dynamic dictionary key '$${o}' in '${a}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${o}' becomes the key.`,y.unresolvedDynamicKeySource))}return n}export{validateEventContextPaths,validateLines};
|
|
2
|
+
`)),x.authoringPlacement,x.authoringPath,x.authoringPlacementResolved),C=new Set(S.eventSources.routes.map(e=>e.location.line-1)),w={...m,commands:m.commands.map(e=>({...e,properties:e.properties.filter(e=>!C.has(e.line)),produces:e.produces?.filter(e=>!S.operationProductionLines?.has(e.line)),productionHeaders:e.productionHeaders?.filter(e=>!S.operationProductionLines?.has(e))}))},T=/* @__PURE__ */ new Set([...p(w),...p(g)]),E=new Set([...w.policies,...g.policies].map(e=>e.name)),D=validateDeclarations(s,w,g);D.push(...validateProductionDestinations(s,w));let O=/* @__PURE__ */ new Set([a.LegacyOptionalSuffix,a.InvalidOptionalModifierOrder,a.OptionalReadsNotSupported]),k=/* @__PURE__ */ new Set([a.UnexpectedTokenInPolicyCondition,a.ExpectedPolicyCondition,a.UnclosedPolicyConditionGroup,a.ExpectedRoleName,a.ExpectedClaimName,a.ExpectedClaimMatches,a.ExpectedClaimMatchTarget]),A=/* @__PURE__ */ new Set([a.UnknownEvent,a.UnknownReadModelProperty,a.PiiNotSupportedOnIdentifier]),j=/* @__PURE__ */ new Set([a.EventFromLaterSlice,a.TimelineCycleGroup]),M=/* @__PURE__ */ new Set([a.UndeclaredDependency,a.UnusedDependencyDeclaration,a.InvalidDependencyTarget,a.RepeatedDependencyDeclaration,a.MutualDependencyDeclarations,a.AmbiguousReference]),N=/* @__PURE__ */ new Set([a.InvalidEventDeclaration,a.InvalidImportDeclaration,a.InvalidSliceDeclaration,a.InvalidDescription,a.DuplicateDescription,a.EmptyDescription,a.DuplicateEventSubject,a.InvalidSubjectType,a.ProtectedSubjectType,a.InvalidSubjectOwner,a.ReadModelSubjectNotSupported,a.InvalidSubjectModifierOrder,a.UnsupportedInteractionAlternatives,a.MixedInteractionAlternatives,a.InteractionAlternativeWithoutActions,a.InlineInteractionAlternative,a.LegacyInteractionWhere,a.InvalidSpecificationParameter,a.InvalidSpecificationCase,a.DuplicateSpecificationParameter,a.DuplicateSpecificationCase,a.IncompleteSpecificationTable,a.InvalidSpecificationCaseAssignment,a.InvalidSpecificationCaseValue,a.InvalidSpecificationCaseReference,a.OptionalSpecificationParameterTarget,a.SpecificationCaseNameCollision,a.IncompatibleSpecificationParameterType,a.UnusedSpecificationParameter,a.SingularSpecificationTableExpansion,a.InvalidSpecificationCallerPersona,a.UnsynthesizablePersonaCaller,a.PersonaWithoutGate,a.GateWithoutPersona,a.AmbiguousPersonaCaller,a.InvalidDocumentation,a.ConflictingDocumentationAcrossFiles,a.InvalidAbsentReadModelStep,a.UnknownConstraintProperty,a.OmittedProductionDestination,a.InvalidSpecificationExample,a.DuplicateSpecificationAssignment]),P=/* @__PURE__ */ new Set([a.InvalidPurposeDeclaration,a.InvalidPurposeVocabulary,a.DuplicatePurposeField,a.DuplicatePurposeDeclaration,a.UnknownPurpose,a.PurposeInterestMismatch,a.PersonalDataWithoutPurpose,a.SpecialDataWithoutCondition,a.CriminalDataWithoutAuthorization,a.PurposeWithoutBasis,a.UnusedPurpose,a.UnknownConceptDirective,a.AttributeReasonWithoutAttribute,a.DuplicateAttributeReason,a.LegacyComplianceMarker,a.DuplicateComplianceMarker,a.UnknownComplianceMarker,a.InvalidSecretScope,a.DuplicateSecretScope,a.SecretScopeIgnoredForPii,a.InvalidPersonalDataQualifier,a.DuplicateSpecialCategory]),F=/* @__PURE__ */ new Set;for(let e of u.compilerDiagnostics??S.diagnostics){let t=e.code===a.UnknownType&&(S.identityDetails??[]).some(t=>t.line===e.location.line-1),n=e.code===a.RepeatedSingularDeclarationAcrossFiles&&e.message.includes(`identity block`);if(!t&&!n&&!P.has(e.code)&&!O.has(e.code)&&!k.has(e.code)&&!A.has(e.code)&&!j.has(e.code)&&!M.has(e.code)&&!N.has(e.code)&&e.code!==a.InvalidSpecificationExampleBody&&e.code!==a.UnknownRuleImplementationDirective&&e.code!==a.InvalidValidationRule&&e.code!==a.RepeatedDeclarationAcrossFiles&&!/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY063[3-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$|^PLAY066[0-6]$/.test(e.code))continue;let r=e.location.line-1;if(e.code===a.OmittedProductionDestination&&D.some(t=>t.code===e.code&&t.line===r))continue;if(e.code===a.UnknownEvent){if(F.has(r))continue;F.add(r)}let i=o(s[r],e)||s[r].length-e.location.column+1;D.push(issue(e.severity,r,e.location.column,i,e.message,e.code))}let checkEvent=(e,t,n)=>{!T.has(n)&&!F.has(e)&&D.push(tokenIssue(`warning`,e,t,n,`Unknown event type '${n}' — declare it in a slice or import it.`,y.unknownEvent))},I=-1;for(let a=0;a<s.length;a++){let o=s[a],c=o.trim();if(d[a]||c.length===0)continue;let u=o.match(/^[ ]*(\t+)/);if(u&&D.push(issue(`warning`,a,u[0].length-u[1].length+1,u[1].length,`Screenplay is indentation-based — use spaces, not tabs.`,y.tabIndentation)),I>=0){if(l(o)>I&&/^(?:or\s+)?[A-Z]\w*(?:\s+or\s+[A-Z]\w*)*$/.test(c)){for(let e of c.split(/\s+/).filter(e=>e!==`or`))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy));continue}I=-1}let f=validateImport(s,d,a);f&&D.push(f);let p=c.match(/^slice\s+(\w+)/);p&&!i.includes(p[1])&&D.push(tokenIssue(`error`,a,o,p[1],`Unknown slice type '${p[1]}' — expected ${i.join(`, `)}.`,y.unknownSliceType));let m=c.match(/^concept\s+\w+\s*:\s*(\w+)/);m&&m[1]!==`Enum`&&!r.includes(m[1])&&D.push(tokenIssue(`error`,a,o,m[1],`Unknown primitive type '${m[1]}' — expected ${r.join(`, `)} or Enum.`,y.unknownPrimitiveType));let h=c.match(/^authorize\s+(.*)$/);if(h){I=l(o);for(let e of h[1].split(/\s+/).filter(e=>e!==`or`&&e.length>0))E.has(e)||D.push(tokenIssue(`warning`,a,o,e,`Unknown policy '${e}' — declare it with 'policy ${e}'.`,y.unknownPolicy))}let g=c.match(/^on\s+([A-Z]\w*)\s*$/);g&&checkEvent(a,o,g[1]);let _=c.match(/^produces\s+([A-Z]\w*)\s*$/);if(_&&!S.operationProductionLines?.has(a)&&checkEvent(a,o,_[1]),/^produces\s+when\b/.test(c)&&!S.operationProductionLines?.has(a))for(let e=a+1;e<s.length;e++){let t=s[e];if(!(d[e]||t.trim().length===0)){if(l(t)>l(o)){let n=t.trim().match(/^([A-Z]\w*)\s*$/);n&&checkEvent(e,t,n[1])}break}}let v=c.match(/^unique\s+event\s+([A-Z]\w*)/);v&&checkEvent(a,o,v[1]);let b=c.match(/^unique\s+[a-z_]\w*\s+on\s+([A-Z]\w*)/);b&&checkEvent(a,o,b[1]);for(let e of o.match(/\$identity\.[\w.]+/g)??[]){let t=e.substring(10).split(`.`)[0],r=[...n,...(S.identityDetails??[]).map(e=>e.name)];r.includes(t)||D.push(tokenIssue(`warning`,a,o,e,`Unknown $identity property '${t}' — expected ${r.join(`, `)}.`,y.unknownContextIdentityProperty))}for(let r of o.match(/\$context\.[\w.]+/g)??[]){let i=r.substring(9).split(`.`);t.includes(i[0])?i[0]===`causedBy`&&i.length>1&&!e.includes(i[1])?D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.causedBy property '${i[1]}' — expected ${e.join(`, `)}.`,y.unknownContextCausedByProperty)):i[0]===`identity`&&i.length>1&&!n.includes(i[1])&&D.push(tokenIssue(`warning`,a,o,r,`Unknown $context.identity property '${i[1]}' — expected ${n.join(`, `)}.`,y.unknownContextIdentityProperty)):D.push(tokenIssue(`warning`,a,o,r,`Unknown $context path '${i.join(`.`)}' — expected one of ${t.join(`, `)}.`,y.unknownContextPath))}}D.push(...validateEventContextPaths(s,d)),D.push(...b(s,w,g,S.operationProductionLines));let L=s.map((e,t)=>({line:e,index:t})).filter(({line:e})=>/^\s*```(?:[a-z]+)?\s*$/.test(e));if(L.length%2==1){let e=L[L.length-1];D.push(issue(`error`,e.index,1,e.line.length+1,"Unclosed inline code block — expected a closing ``` line.",y.unclosedCodeBlock))}return D}function validateProductionDestinations(e,t){let n=[];e=u(e);for(let r of t.commands){let t=r.properties.filter(e=>e.isIdentifier&&!g(e).isOptional&&!g(e).isCollection);if(t.length===1)for(let i of r.produces??[]){if(i.inline||i.conditional||i.target!==void 0)continue;let r=i.line;n.push(issue(`information`,r,l(e[r])+1,e[r].trim().length,`Plain 'produces ${i.name}' omits its destination — use 'for ${t[0].name}' to explicitly select the command's identifier.`,y.omittedProductionDestination))}}return n}function validateImport(e,t,n){let r=e[n],i=r.trim().replace(/\s*\/\/.*$/,``);if(!/^import\b/.test(i)||x(r,n))return;let a=l(r);if(a>0&&[`module`,`feature`].includes(s(e,t,n,a)[0])||S(r))return issue(`error`,n,a+1,i.length,`Invalid import '${i}' — inside a module or feature, import names files: 'import "<path or glob>"'.`,y.invalidFileImport)}const C=/^(?:(?:increment|decrement|count|clear|add|subtract|set)\s+)?@?([$\w.]+)(?=\s|=|$)/;function validateEventContextPaths(e,t){let n=[],names=e=>e.map(e=>e.name).join(`, `);for(let r=0;r<e.length;r++){let i=e[r];if(t[r])continue;for(let e of i.matchAll(/(\.)?\$eventContext((?:\.(?:\w+(?:\(\))?)?)*)/g)){let t=e[0].substring(e[1]?.length??0),i=e[2];if(i.length===0){e[1]&&n.push(issue(`error`,r,(e.index??0)+2,t.length,`'$eventContext' names no member - expected one of ${names(d(``).expected)}.`,y.missingEventContextPath));continue}let a=i.substring(1),o=d(a),s=(e.index??0)+(e[1]?.length??0)+1;switch(o.status){case`missing`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' names no member - expected one of ${names(o.expected)}.`,y.missingEventContextPath));break;case`unknownMember`:n.push(issue(`warning`,r,s,t.length,`Unknown event context member '${o.segment}' in '$eventContext.${a}' - expected one of ${names(o.expected)}.`,y.unknownEventContextMember));break;case`unknownSubPath`:{let e=o.expected.length===0?`no members to address`:`members ${names(o.expected)}`;n.push(issue(`warning`,r,s,t.length,`Unknown event context path '$eventContext.${a}' - '${o.member?.name}' (${o.member?.type}) has ${e}.`,y.unknownEventContextPath));break}case`belowCollection`:n.push(issue(`error`,r,s,t.length,`'$eventContext.${a}' cannot resolve - '${o.member?.name}' is a collection (${o.member?.type}) and cannot be addressed below.`,y.eventContextPathBelowCollection))}}let a=i.trim().match(C)?.[1],o=a?.match(/\.\$(\w+)/)?.[1];a&&o&&o!==`eventContext`&&n.push(tokenIssue(`warning`,r,i,a,`Dynamic dictionary key '$${o}' in '${a}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${o}' becomes the key.`,y.unresolvedDynamicKeySource))}return n}export{validateEventContextPaths,validateLines};
|
|
3
3
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","names":["startColumn","length","severity","line","text","token","message","code","issues","types","knownTypeNames","symbols","primitiveTypes","application","property","properties","propertyTypeReference","candidate","bare","owner","diagnosticCodes","type","event","query","command","identifiers","extra","lines","declared","declaration","fences","fenceMap","scanned","scanDocument","context","mergeSymbols","input","symbolsForBuffer","analysis","responseAnalysis","source","routeLines","route","production","events","knownEventNames","policies","policy","optionalCodes","DiagnosticCodes","policyCodes","consistencyCodes","timelineCodes","dependencyCodes","authoringCodes","complianceCodes","compilerUnknownEventLines","diagnostic","identityType","detail","identityDuplicate","existing","legacyOptionalTypeLength","name","authorizeIndent","index","trimmed","leading","indentOf","fileImportIssue","slice","sliceTypes","concept","authorize","reactsOn","produces","next","uniqueEvent","uniqueProperty","path","member","knownIdentity","identityProperties","segments","contextRoots","causedByProperties","validateInlineEvents","fenceLines","last","eventAnalysisSource","fileImportOn","indent","enclosingChain","isFileImportLine","mappingTarget","members","match","written","resolveEventContextPath","resolution","column","has","target"],"sources":["../../validation.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, legacyOptionalTypeLength } from '@cratis/screenplay-compiler';\nimport { AnalysisDiagnostic, responseAnalysis } from './response-analysis';\nimport { validateInlineEvents } from './inline-event-validation';\nimport { causedByProperties, contextRoots, identityProperties, primitiveTypes, sliceTypes } from './language';\nimport { DiagnosticCode, diagnosticCodes } from './diagnostic-codes';\nimport { enclosingChain, fenceMap, indentOf } from './document-context';\nimport { eventAnalysisSource } from './event-analysis-source';\nimport { resolveEventContextPath } from './event-context';\nimport {\n DocumentSymbols,\n PropertySymbol,\n propertyTypeReference,\n knownEventNames,\n knownTypeNames,\n mergeSymbols,\n scanDocument,\n symbolsForBuffer,\n} from './symbols';\nimport { fileImportOn, isFileImportLine } from './file-imports';\n\nexport type ValidationSeverity = 'error' | 'warning' | 'information';\n\nexport interface ValidationIssue {\n line: number;\n startColumn: number;\n endColumn: number;\n message: string;\n severity: ValidationSeverity;\n\n // The compiler code for this condition, absent on the structural checks the editor makes and the\n // compiler does not. See ./diagnostic-codes.ts.\n code?: DiagnosticCode;\n}\n\n// What a document is validated against beyond itself.\nexport interface ValidationContext {\n // What the rest of the application declares - the other .play files of a folder, or the files an import\n // brings in - so a name declared in another file is not reported unknown. Merge the scanned symbols of\n // those files with mergeSymbols. The document's own declarations are always known.\n application?: DocumentSymbols;\n placement?: readonly string[];\n path?: string;\n compilerDiagnostics?: readonly AnalysisDiagnostic[];\n}\n\nfunction issue(\n severity: ValidationSeverity,\n line: number,\n startColumn: number,\n length: number,\n message: string,\n code: DiagnosticCode,\n): ValidationIssue {\n return { severity, message, line, startColumn, endColumn: startColumn + length, code };\n}\n\nfunction tokenIssue(\n severity: ValidationSeverity,\n line: number,\n text: string,\n token: string,\n message: string,\n code: DiagnosticCode,\n): ValidationIssue {\n const column = text.indexOf(token) + 1;\n return issue(severity, line, column, token.length, message, code);\n}\n\n// Reports every property whose type reference names nothing the document declares, and\n// every command that marks more than one property as its identifier.\nfunction validateDeclarations(lines: string[], symbols: DocumentSymbols, application: DocumentSymbols): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n const types = new Set([...knownTypeNames(symbols, primitiveTypes), ...knownTypeNames(application, [])]);\n\n const checkProperties = (properties: PropertySymbol[], owner: string) => {\n for (const property of properties.filter(\n (candidate) => !types.has(propertyTypeReference(candidate).name),\n )) {\n const bare = propertyTypeReference(property).name;\n issues.push(\n issue(\n 'warning',\n property.line,\n property.sourceType!.startColumn,\n property.sourceType!.text.length,\n bare === 'optional'\n ? `Unknown type 'optional' on '${property.name}' of ${owner} — did you forget the type before 'optional'?`\n : `Unknown type '${bare}' on '${property.name}' of ${owner} — declare it with 'concept ${bare} : <Primitive>' or 'type ${bare}'.`,\n diagnosticCodes.unknownType,\n ),\n );\n }\n };\n\n for (const type of symbols.types) checkProperties(type.properties, `type '${type.name}'`);\n for (const event of symbols.events) checkProperties(event.properties, `event '${event.name}'`);\n for (const query of symbols.queries) checkProperties(query.parameters, `query '${query.name}'`);\n for (const command of symbols.commands) {\n checkProperties(command.properties, `command '${command.name}'`);\n const identifiers = command.properties.filter((property) => property.isIdentifier);\n for (const extra of identifiers.slice(1)) {\n issues.push(\n tokenIssue(\n 'error',\n extra.line,\n lines[extra.line],\n 'identifier',\n `Command '${command.name}' already marks '${identifiers[0].name}' as identifier — only one property can be the identifier.`,\n diagnosticCodes.duplicateCommandIdentifier,\n ),\n );\n }\n }\n\n const declared = new Map<string, number>();\n for (const declaration of [...symbols.concepts, ...symbols.types]) {\n const first = declared.get(declaration.name);\n if (first === undefined) {\n declared.set(declaration.name, declaration.line);\n continue;\n }\n issues.push(\n tokenIssue(\n 'error',\n declaration.line,\n lines[declaration.line],\n declaration.name,\n `Duplicate declaration of '${declaration.name}' — concept and type names must be unique.`,\n diagnosticCodes.duplicateDeclaration,\n ),\n );\n }\n\n return issues;\n}\n\n// Validates a Screenplay document without any editor dependency — both the Monaco\n// service and the VSCode extension adapt these issues to their marker/diagnostic APIs.\n//\n// The checks read the document line by line, never as a whole document's top level, so a file an import\n// places in a module or feature - holding slices or features at its top level - validates as it is written.\n// Where it is placed, and whether its imports resolve, is the compiler's to say.\nexport function validateLines(lines: string[], context: ValidationContext = {}): ValidationIssue[] {\n const fences = fenceMap(lines);\n const scanned = scanDocument(lines);\n const application = context.application ?? mergeSymbols();\n const input = symbolsForBuffer(lines, { ...application, authoringPath: context.path ?? application.authoringPath, authoringPlacement: context.placement ?? application.authoringPlacement });\n const analysis = responseAnalysis(lines, input.authoringDocuments ?? input.authoringSources?.filter(source => source !== lines.join('\\n')), input.authoringPlacement, input.authoringPath, input.authoringPlacementResolved);\n const routeLines = new Set(analysis.eventSources.routes.map(route => route.location.line - 1));\n const symbols = { ...scanned, commands: scanned.commands.map(command => ({ ...command,\n properties: command.properties.filter(property => !routeLines.has(property.line)),\n produces: command.produces?.filter(production => !analysis.operationProductionLines?.has(production.line)),\n productionHeaders: command.productionHeaders?.filter(line => !analysis.operationProductionLines?.has(line)),\n })) };\n const events = new Set([...knownEventNames(symbols), ...knownEventNames(application)]);\n const policies = new Set([...symbols.policies, ...application.policies].map((policy) => policy.name));\n const issues: ValidationIssue[] = validateDeclarations(lines, symbols, application);\n issues.push(...validateProductionDestinations(lines, symbols));\n // One parser pass covers committed types, including query results and trigger data, without\n // speculative property scans mistaking tags, paths, strings or code for optionality.\n const optionalCodes = new Set<string>([DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.InvalidOptionalModifierOrder, DiagnosticCodes.OptionalReadsNotSupported]);\n const policyCodes = new Set<string>([DiagnosticCodes.UnexpectedTokenInPolicyCondition, DiagnosticCodes.ExpectedPolicyCondition, DiagnosticCodes.UnclosedPolicyConditionGroup, DiagnosticCodes.ExpectedRoleName, DiagnosticCodes.ExpectedClaimName, DiagnosticCodes.ExpectedClaimMatches, DiagnosticCodes.ExpectedClaimMatchTarget]);\n const consistencyCodes = new Set<string>([DiagnosticCodes.UnknownEvent, DiagnosticCodes.UnknownReadModelProperty, DiagnosticCodes.PiiNotSupportedOnIdentifier]);\n const timelineCodes = new Set<string>([DiagnosticCodes.EventFromLaterSlice, DiagnosticCodes.TimelineCycleGroup]);\n const dependencyCodes = new Set<string>([DiagnosticCodes.UndeclaredDependency, DiagnosticCodes.UnusedDependencyDeclaration, DiagnosticCodes.InvalidDependencyTarget, DiagnosticCodes.RepeatedDependencyDeclaration, DiagnosticCodes.MutualDependencyDeclarations, DiagnosticCodes.AmbiguousReference]);\n // These parser diagnostics must reach the marker adapter. C#-only completeness and reference\n // checks are not synthesized here, but are preserved when a caller supplies compiler diagnostics.\n const authoringCodes = new Set<string>([DiagnosticCodes.InvalidEventDeclaration, DiagnosticCodes.InvalidImportDeclaration, DiagnosticCodes.InvalidSliceDeclaration, DiagnosticCodes.InvalidDescription, DiagnosticCodes.DuplicateDescription, DiagnosticCodes.EmptyDescription,DiagnosticCodes.DuplicateEventSubject, DiagnosticCodes.InvalidSubjectType, DiagnosticCodes.ProtectedSubjectType, DiagnosticCodes.InvalidSubjectOwner, DiagnosticCodes.ReadModelSubjectNotSupported, DiagnosticCodes.InvalidSubjectModifierOrder, DiagnosticCodes.UnsupportedInteractionAlternatives, DiagnosticCodes.MixedInteractionAlternatives, DiagnosticCodes.InteractionAlternativeWithoutActions, DiagnosticCodes.InlineInteractionAlternative, DiagnosticCodes.LegacyInteractionWhere, DiagnosticCodes.InvalidSpecificationParameter, DiagnosticCodes.InvalidSpecificationCase, DiagnosticCodes.DuplicateSpecificationParameter, DiagnosticCodes.DuplicateSpecificationCase, DiagnosticCodes.IncompleteSpecificationTable, DiagnosticCodes.InvalidSpecificationCaseAssignment, DiagnosticCodes.InvalidSpecificationCaseValue, DiagnosticCodes.InvalidSpecificationCaseReference, DiagnosticCodes.OptionalSpecificationParameterTarget, DiagnosticCodes.SpecificationCaseNameCollision, DiagnosticCodes.IncompatibleSpecificationParameterType, DiagnosticCodes.UnusedSpecificationParameter, DiagnosticCodes.SingularSpecificationTableExpansion, DiagnosticCodes.InvalidSpecificationCallerPersona, DiagnosticCodes.UnsynthesizablePersonaCaller, DiagnosticCodes.PersonaWithoutGate, DiagnosticCodes.GateWithoutPersona, DiagnosticCodes.AmbiguousPersonaCaller, DiagnosticCodes.InvalidDocumentation, DiagnosticCodes.ConflictingDocumentationAcrossFiles, DiagnosticCodes.InvalidAbsentReadModelStep, DiagnosticCodes.UnknownConstraintProperty, DiagnosticCodes.OmittedProductionDestination, DiagnosticCodes.InvalidSpecificationExample, DiagnosticCodes.DuplicateSpecificationAssignment]);\n const complianceCodes = new Set<string>([DiagnosticCodes.InvalidPurposeDeclaration, DiagnosticCodes.InvalidPurposeVocabulary, DiagnosticCodes.DuplicatePurposeField, DiagnosticCodes.DuplicatePurposeDeclaration, DiagnosticCodes.UnknownPurpose, DiagnosticCodes.PurposeInterestMismatch, DiagnosticCodes.PersonalDataWithoutPurpose, DiagnosticCodes.SpecialDataWithoutCondition, DiagnosticCodes.CriminalDataWithoutAuthorization, DiagnosticCodes.PurposeWithoutBasis, DiagnosticCodes.UnusedPurpose, DiagnosticCodes.UnknownConceptDirective, DiagnosticCodes.AttributeReasonWithoutAttribute, DiagnosticCodes.DuplicateAttributeReason, DiagnosticCodes.LegacyComplianceMarker, DiagnosticCodes.DuplicateComplianceMarker, DiagnosticCodes.UnknownComplianceMarker, DiagnosticCodes.InvalidSecretScope, DiagnosticCodes.DuplicateSecretScope, DiagnosticCodes.SecretScopeIgnoredForPii, DiagnosticCodes.InvalidPersonalDataQualifier, DiagnosticCodes.DuplicateSpecialCategory]);\n const compilerUnknownEventLines = new Set<number>();\n for (const diagnostic of context.compilerDiagnostics ?? analysis.diagnostics) {\n const identityType = diagnostic.code === DiagnosticCodes.UnknownType && (analysis.identityDetails ?? []).some(detail => detail.line === diagnostic.location.line - 1);\n const identityDuplicate = diagnostic.code === DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles && diagnostic.message.includes('identity block');\n if (!identityType && !identityDuplicate && !complianceCodes.has(diagnostic.code) && !optionalCodes.has(diagnostic.code) && !policyCodes.has(diagnostic.code) && !consistencyCodes.has(diagnostic.code) && !timelineCodes.has(diagnostic.code) && !dependencyCodes.has(diagnostic.code) && !authoringCodes.has(diagnostic.code) && diagnostic.code !== DiagnosticCodes.InvalidSpecificationExampleBody && diagnostic.code !== DiagnosticCodes.UnknownRuleImplementationDirective && diagnostic.code !== DiagnosticCodes.InvalidValidationRule && diagnostic.code !== DiagnosticCodes.RepeatedDeclarationAcrossFiles && !/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY063[3-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$/.test(diagnostic.code)) continue;\n const line = diagnostic.location.line - 1;\n if (diagnostic.code === DiagnosticCodes.OmittedProductionDestination && issues.some(existing => existing.code === diagnostic.code && existing.line === line)) continue;\n if (diagnostic.code === DiagnosticCodes.UnknownEvent) {\n if (compilerUnknownEventLines.has(line)) continue;\n compilerUnknownEventLines.add(line);\n }\n const length = legacyOptionalTypeLength(lines[line], diagnostic) || lines[line].length - diagnostic.location.column + 1;\n issues.push(issue(diagnostic.severity, line, diagnostic.location.column, length, diagnostic.message, diagnostic.code as DiagnosticCode));\n }\n\n const checkEvent = (line: number, text: string, name: string) => {\n if (!events.has(name) && !compilerUnknownEventLines.has(line)) {\n issues.push(\n tokenIssue(\n 'warning',\n line,\n text,\n name,\n `Unknown event type '${name}' — declare it in a slice or import it.`,\n diagnosticCodes.unknownEvent,\n ),\n );\n }\n };\n\n let authorizeIndent = -1;\n\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n const trimmed = line.trim();\n\n if (fences[index] || trimmed.length === 0) continue;\n\n const leading = line.match(/^[ ]*(\\t+)/);\n if (leading) {\n issues.push(\n issue(\n 'warning',\n index,\n leading[0].length - leading[1].length + 1,\n leading[1].length,\n 'Screenplay is indentation-based — use spaces, not tabs.',\n diagnosticCodes.tabIndentation,\n ),\n );\n }\n\n // Policy references continue on indented lines below an authorize clause.\n if (authorizeIndent >= 0) {\n if (\n indentOf(line) > authorizeIndent &&\n /^(?:or\\s+)?[A-Z]\\w*(?:\\s+or\\s+[A-Z]\\w*)*$/.test(trimmed)\n ) {\n for (const name of trimmed.split(/\\s+/).filter((token) => token !== 'or')) {\n if (!policies.has(name)) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n name,\n `Unknown policy '${name}' — declare it with 'policy ${name}'.`,\n diagnosticCodes.unknownPolicy,\n ),\n );\n }\n }\n continue;\n }\n authorizeIndent = -1;\n }\n\n const fileImportIssue = validateImport(lines, fences, index);\n if (fileImportIssue) issues.push(fileImportIssue);\n\n const slice = trimmed.match(/^slice\\s+(\\w+)/);\n if (slice && !sliceTypes.includes(slice[1])) {\n issues.push(\n tokenIssue(\n 'error',\n index,\n line,\n slice[1],\n `Unknown slice type '${slice[1]}' — expected ${sliceTypes.join(', ')}.`,\n diagnosticCodes.unknownSliceType,\n ),\n );\n }\n\n const concept = trimmed.match(/^concept\\s+\\w+\\s*:\\s*(\\w+)/);\n if (concept && concept[1] !== 'Enum' && !primitiveTypes.includes(concept[1])) {\n issues.push(\n tokenIssue(\n 'error',\n index,\n line,\n concept[1],\n `Unknown primitive type '${concept[1]}' — expected ${primitiveTypes.join(', ')} or Enum.`,\n diagnosticCodes.unknownPrimitiveType,\n ),\n );\n }\n\n const authorize = trimmed.match(/^authorize\\s+(.*)$/);\n if (authorize) {\n authorizeIndent = indentOf(line);\n for (const name of authorize[1].split(/\\s+/).filter((token) => token !== 'or' && token.length > 0)) {\n if (!policies.has(name)) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n name,\n `Unknown policy '${name}' — declare it with 'policy ${name}'.`,\n diagnosticCodes.unknownPolicy,\n ),\n );\n }\n }\n }\n\n const reactsOn = trimmed.match(/^on\\s+([A-Z]\\w*)\\s*$/);\n if (reactsOn) checkEvent(index, line, reactsOn[1]);\n\n const produces = trimmed.match(/^produces\\s+([A-Z]\\w*)\\s*$/);\n if (produces && !analysis.operationProductionLines?.has(index)) checkEvent(index, line, produces[1]);\n\n if (/^produces\\s+when\\b/.test(trimmed) && !analysis.operationProductionLines?.has(index)) {\n for (let next = index + 1; next < lines.length; next++) {\n const candidate = lines[next];\n if (fences[next] || candidate.trim().length === 0) continue;\n if (indentOf(candidate) > indentOf(line)) {\n const name = candidate.trim().match(/^([A-Z]\\w*)\\s*$/);\n if (name) checkEvent(next, candidate, name[1]);\n }\n break;\n }\n }\n\n const uniqueEvent = trimmed.match(/^unique\\s+event\\s+([A-Z]\\w*)/);\n if (uniqueEvent) checkEvent(index, line, uniqueEvent[1]);\n\n const uniqueProperty = trimmed.match(/^unique\\s+[a-z_]\\w*\\s+on\\s+([A-Z]\\w*)/);\n if (uniqueProperty) checkEvent(index, line, uniqueProperty[1]);\n\n // Every $identity. path must name a member of the caller; anything after 'claims.' is a claim name.\n // A bare $identity is left to the compilers, which see it only where an expression is expected.\n for (const path of line.match(/\\$identity\\.[\\w.]+/g) ?? []) {\n const member = path.substring('$identity.'.length).split('.')[0];\n const knownIdentity = [...identityProperties, ...(analysis.identityDetails ?? []).map(detail => detail.name)];\n if (!knownIdentity.includes(member)) {\n issues.push(tokenIssue('warning', index, line, path,\n `Unknown $identity property '${member}' — expected ${knownIdentity.join(', ')}.`,\n diagnosticCodes.unknownContextIdentityProperty));\n }\n }\n\n // Every $context. path must name something CommandContext or QueryContext carries.\n for (const path of line.match(/\\$context\\.[\\w.]+/g) ?? []) {\n const segments = path.substring('$context.'.length).split('.');\n if (!contextRoots.includes(segments[0])) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context path '${segments.join('.')}' — expected one of ${contextRoots.join(', ')}.`,\n diagnosticCodes.unknownContextPath,\n ),\n );\n } else if (\n segments[0] === 'causedBy' &&\n segments.length > 1 &&\n !causedByProperties.includes(segments[1])\n ) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context.causedBy property '${segments[1]}' — expected ${causedByProperties.join(', ')}.`,\n diagnosticCodes.unknownContextCausedByProperty,\n ),\n );\n } else if (\n segments[0] === 'identity' &&\n segments.length > 1 &&\n !identityProperties.includes(segments[1])\n ) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context.identity property '${segments[1]}' — expected ${identityProperties.join(', ')}.`,\n diagnosticCodes.unknownContextIdentityProperty,\n ),\n );\n }\n }\n }\n\n issues.push(...validateEventContextPaths(lines, fences));\n issues.push(...validateInlineEvents(lines, symbols, application, analysis.operationProductionLines));\n\n const fenceLines = lines\n .map((line, index) => ({ line, index }))\n .filter(({ line }) => /^\\s*```(?:[a-z]+)?\\s*$/.test(line));\n if (fenceLines.length % 2 === 1) {\n const last = fenceLines[fenceLines.length - 1];\n issues.push(\n issue(\n 'error',\n last.index,\n 1,\n last.line.length + 1,\n 'Unclosed inline code block — expected a closing ``` line.',\n diagnosticCodes.unclosedCodeBlock,\n ),\n );\n }\n\n return issues;\n}\n\n// This is advice, not a semantic default: accepting the typed workspace repair changes routing.\nfunction validateProductionDestinations(lines: string[], symbols: DocumentSymbols): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n lines = eventAnalysisSource(lines);\n for (const command of symbols.commands) {\n const identifiers = command.properties.filter(property => property.isIdentifier && !propertyTypeReference(property).isOptional && !propertyTypeReference(property).isCollection);\n if (identifiers.length !== 1) continue;\n for (const production of command.produces ?? []) {\n if (production.inline || production.conditional || production.target !== undefined) continue;\n const line = production.line;\n issues.push(issue('information', line, indentOf(lines[line]) + 1, lines[line].trim().length,\n `Plain 'produces ${production.name}' omits its destination — use 'for ${identifiers[0].name}' to explicitly select the command's identifier.`,\n diagnosticCodes.omittedProductionDestination));\n }\n }\n return issues;\n}\n\n// Inside a module or feature an import names files, and a quoted import anywhere has the compiler's shape.\nfunction validateImport(lines: string[], fences: boolean[], index: number): ValidationIssue | undefined {\n const line = lines[index];\n const trimmed = line.trim().replace(/\\s*\\/\\/.*$/, '');\n if (!/^import\\b/.test(trimmed) || fileImportOn(line, index)) return undefined;\n const indent = indentOf(line);\n const inBody = indent > 0 && ['module', 'feature'].includes(enclosingChain(lines, fences, index, indent)[0]);\n if (!inBody && !isFileImportLine(line)) return undefined;\n return issue(\n 'error',\n index,\n indent + 1,\n trimmed.length,\n `Invalid import '${trimmed}' — inside a module or feature, import names files: 'import \"<path or glob>\"'.`,\n diagnosticCodes.invalidFileImport,\n );\n}\n\n// A mapping target: the first word of a mapping line, after the keyword that opens it if there is one.\nconst mappingTarget = /^(?:(?:increment|decrement|count|clear|add|subtract|set)\\s+)?@?([$\\w.]+)(?=\\s|=|$)/;\n\n// Every $eventContext.<path> - in an expression or as the dynamic key of a mapping target - checked against the\n// event-context catalog the way the compiler checks it (Parsing/EventContextPathValidator.cs).\nexport function validateEventContextPaths(lines: string[], fences: boolean[]): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n const names = (members: readonly { name: string }[]) => members.map((member) => member.name).join(', ');\n\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n if (fences[index]) continue;\n\n for (const match of line.matchAll(/(\\.)?\\$eventContext((?:\\.(?:\\w+(?:\\(\\))?)?)*)/g)) {\n const token = match[0].substring(match[1]?.length ?? 0);\n const written = match[2];\n if (written.length === 0) {\n // A bare $eventContext names nothing only as a dynamic key; in an expression the compiler rejects it as invalid.\n if (match[1]) {\n issues.push(issue('error', index, (match.index ?? 0) + 2, token.length, `'$eventContext' names no member - expected one of ${names(resolveEventContextPath('').expected)}.`, diagnosticCodes.missingEventContextPath));\n }\n continue;\n }\n\n const path = written.substring(1);\n const resolution = resolveEventContextPath(path);\n const column = (match.index ?? 0) + (match[1]?.length ?? 0) + 1;\n switch (resolution.status) {\n case 'missing':\n issues.push(issue('error', index, column, token.length, `'$eventContext.${path}' names no member - expected one of ${names(resolution.expected)}.`, diagnosticCodes.missingEventContextPath));\n break;\n case 'unknownMember':\n issues.push(issue('warning', index, column, token.length, `Unknown event context member '${resolution.segment}' in '$eventContext.${path}' - expected one of ${names(resolution.expected)}.`, diagnosticCodes.unknownEventContextMember));\n break;\n case 'unknownSubPath': {\n const has = resolution.expected.length === 0 ? 'no members to address' : `members ${names(resolution.expected)}`;\n issues.push(issue('warning', index, column, token.length, `Unknown event context path '$eventContext.${path}' - '${resolution.member?.name}' (${resolution.member?.type}) has ${has}.`, diagnosticCodes.unknownEventContextPath));\n break;\n }\n case 'belowCollection':\n issues.push(issue('error', index, column, token.length, `'$eventContext.${path}' cannot resolve - '${resolution.member?.name}' is a collection (${resolution.member?.type}) and cannot be addressed below.`, diagnosticCodes.eventContextPathBelowCollection));\n break;\n }\n }\n\n // Only $eventContext resolves in a dynamic key; any other $ source is kept as the literal key text.\n const target = line.trim().match(mappingTarget)?.[1];\n const source = target?.match(/\\.\\$(\\w+)/)?.[1];\n if (target && source && source !== 'eventContext') {\n issues.push(tokenIssue('warning', index, line, target, `Dynamic dictionary key '$${source}' in '${target}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${source}' becomes the key.`, diagnosticCodes.unresolvedDynamicKeySource));\n }\n }\n\n return issues;\n}\n"],"mappings":"88BAgDA,SAAS,MACL,EACA,EACA,EACA,EACA,EACA,EACe,CACf,MAAO,CAAE,WAAU,UAAS,OAAM,cAAa,UAAWA,EAAcC,EAAQ,MAAK,CACzF,CAEA,SAAS,WACL,EACA,EACA,EACA,EACA,EACA,EACe,CAEf,OAAO,MAAMC,EAAUC,EADRC,EAAK,QAAQC,CAAK,EAAI,EACAA,EAAM,OAAQC,EAASC,CAAI,CACpE,CAIA,SAAS,qBAAqB,EAAiB,EAA0B,EAAiD,CACtH,IAAMC,EAA4B,CAAC,EAC7BC,kBAAQ,IAAI,IAAI,CAAC,GAAGC,EAAeC,EAASC,CAAc,EAAG,GAAGF,EAAeG,EAAa,CAAC,CAAC,CAAC,CAAC,EAEhG,iBAAmB,EAA8B,IAAkB,CACrE,IAAK,IAAMC,KAAYC,EAAW,OAC7B,GAAc,CAACN,EAAM,IAAIO,EAAsBC,CAAS,CAAC,CAAC,IAAI,CACnE,EAAG,CACC,IAAMC,EAAOF,EAAsBF,CAAQ,CAAC,CAAC,KAC7CN,EAAO,KACH,MACI,UACAM,EAAS,KACTA,EAAS,WAAY,YACrBA,EAAS,WAAY,KAAK,O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kBACDZ,EAAO,KAAK,MAAM,QAASyD,EAAOmC,EAAQ/F,EAAM,OAAQ,kBAAkB0E,EAAK,sBAAsBoB,EAAW,QAAQ,KAAK,qBAAqBA,EAAW,QAAQ,KAAK,kCAAmC/E,EAAgB,+BAA+B,CAAC,CAErQ,CACJ,CAGA,IAAMkF,EAASnG,EAAK,KAAK,CAAC,CAAC,MAAM2F,CAAa,CAAC,GAAG,GAC5CtD,EAAS8D,GAAQ,MAAM,WAAW,CAAC,GAAG,GACxCA,GAAU9D,GAAUA,IAAW,gBAC/BhC,EAAO,KAAK,WAAW,UAAWyD,EAAO9D,EAAMmG,EAAQ,4BAA4B9D,EAAO,QAAQ8D,EAAO,8EAA8E9D,EAAO,oBAAqBpB,EAAgB,0BAA0B,CAAC,CAEtQ,CAEA,OAAOZ,CACX"}
|
|
1
|
+
{"version":3,"file":"validation.js","names":["startColumn","length","severity","line","text","token","message","code","issues","types","knownTypeNames","symbols","primitiveTypes","application","property","properties","propertyTypeReference","candidate","bare","owner","diagnosticCodes","type","event","query","command","identifiers","extra","lines","declared","declaration","fences","fenceMap","scanned","scanDocument","context","mergeSymbols","input","symbolsForBuffer","analysis","responseAnalysis","source","routeLines","route","production","events","knownEventNames","policies","policy","optionalCodes","DiagnosticCodes","policyCodes","consistencyCodes","timelineCodes","dependencyCodes","authoringCodes","complianceCodes","compilerUnknownEventLines","diagnostic","identityType","detail","identityDuplicate","existing","legacyOptionalTypeLength","name","authorizeIndent","index","trimmed","leading","indentOf","fileImportIssue","slice","sliceTypes","concept","authorize","reactsOn","produces","next","uniqueEvent","uniqueProperty","path","member","knownIdentity","identityProperties","segments","contextRoots","causedByProperties","validateInlineEvents","fenceLines","last","eventAnalysisSource","fileImportOn","indent","enclosingChain","isFileImportLine","mappingTarget","members","match","written","resolveEventContextPath","resolution","column","has","target"],"sources":["../../validation.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, legacyOptionalTypeLength } from '@cratis/screenplay-compiler';\nimport { AnalysisDiagnostic, responseAnalysis } from './response-analysis';\nimport { validateInlineEvents } from './inline-event-validation';\nimport { causedByProperties, contextRoots, identityProperties, primitiveTypes, sliceTypes } from './language';\nimport { DiagnosticCode, diagnosticCodes } from './diagnostic-codes';\nimport { enclosingChain, fenceMap, indentOf } from './document-context';\nimport { eventAnalysisSource } from './event-analysis-source';\nimport { resolveEventContextPath } from './event-context';\nimport {\n DocumentSymbols,\n PropertySymbol,\n propertyTypeReference,\n knownEventNames,\n knownTypeNames,\n mergeSymbols,\n scanDocument,\n symbolsForBuffer,\n} from './symbols';\nimport { fileImportOn, isFileImportLine } from './file-imports';\n\nexport type ValidationSeverity = 'error' | 'warning' | 'information';\n\nexport interface ValidationIssue {\n line: number;\n startColumn: number;\n endColumn: number;\n message: string;\n severity: ValidationSeverity;\n\n // The compiler code for this condition, absent on the structural checks the editor makes and the\n // compiler does not. See ./diagnostic-codes.ts.\n code?: DiagnosticCode;\n}\n\n// What a document is validated against beyond itself.\nexport interface ValidationContext {\n // What the rest of the application declares - the other .play files of a folder, or the files an import\n // brings in - so a name declared in another file is not reported unknown. Merge the scanned symbols of\n // those files with mergeSymbols. The document's own declarations are always known.\n application?: DocumentSymbols;\n placement?: readonly string[];\n path?: string;\n compilerDiagnostics?: readonly AnalysisDiagnostic[];\n}\n\nfunction issue(\n severity: ValidationSeverity,\n line: number,\n startColumn: number,\n length: number,\n message: string,\n code: DiagnosticCode,\n): ValidationIssue {\n return { severity, message, line, startColumn, endColumn: startColumn + length, code };\n}\n\nfunction tokenIssue(\n severity: ValidationSeverity,\n line: number,\n text: string,\n token: string,\n message: string,\n code: DiagnosticCode,\n): ValidationIssue {\n const column = text.indexOf(token) + 1;\n return issue(severity, line, column, token.length, message, code);\n}\n\n// Reports every property whose type reference names nothing the document declares, and\n// every command that marks more than one property as its identifier.\nfunction validateDeclarations(lines: string[], symbols: DocumentSymbols, application: DocumentSymbols): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n const types = new Set([...knownTypeNames(symbols, primitiveTypes), ...knownTypeNames(application, [])]);\n\n const checkProperties = (properties: PropertySymbol[], owner: string) => {\n for (const property of properties.filter(\n (candidate) => !types.has(propertyTypeReference(candidate).name),\n )) {\n const bare = propertyTypeReference(property).name;\n issues.push(\n issue(\n 'warning',\n property.line,\n property.sourceType!.startColumn,\n property.sourceType!.text.length,\n bare === 'optional'\n ? `Unknown type 'optional' on '${property.name}' of ${owner} — did you forget the type before 'optional'?`\n : `Unknown type '${bare}' on '${property.name}' of ${owner} — declare it with 'concept ${bare} : <Primitive>' or 'type ${bare}'.`,\n diagnosticCodes.unknownType,\n ),\n );\n }\n };\n\n for (const type of symbols.types) checkProperties(type.properties, `type '${type.name}'`);\n for (const event of symbols.events) checkProperties(event.properties, `event '${event.name}'`);\n for (const query of symbols.queries) checkProperties(query.parameters, `query '${query.name}'`);\n for (const command of symbols.commands) {\n checkProperties(command.properties, `command '${command.name}'`);\n const identifiers = command.properties.filter((property) => property.isIdentifier);\n for (const extra of identifiers.slice(1)) {\n issues.push(\n tokenIssue(\n 'error',\n extra.line,\n lines[extra.line],\n 'identifier',\n `Command '${command.name}' already marks '${identifiers[0].name}' as identifier — only one property can be the identifier.`,\n diagnosticCodes.duplicateCommandIdentifier,\n ),\n );\n }\n }\n\n const declared = new Map<string, number>();\n for (const declaration of [...symbols.concepts, ...symbols.types]) {\n const first = declared.get(declaration.name);\n if (first === undefined) {\n declared.set(declaration.name, declaration.line);\n continue;\n }\n issues.push(\n tokenIssue(\n 'error',\n declaration.line,\n lines[declaration.line],\n declaration.name,\n `Duplicate declaration of '${declaration.name}' — concept and type names must be unique.`,\n diagnosticCodes.duplicateDeclaration,\n ),\n );\n }\n\n return issues;\n}\n\n// Validates a Screenplay document without any editor dependency — both the Monaco\n// service and the VSCode extension adapt these issues to their marker/diagnostic APIs.\n//\n// The checks read the document line by line, never as a whole document's top level, so a file an import\n// places in a module or feature - holding slices or features at its top level - validates as it is written.\n// Where it is placed, and whether its imports resolve, is the compiler's to say.\nexport function validateLines(lines: string[], context: ValidationContext = {}): ValidationIssue[] {\n const fences = fenceMap(lines);\n const scanned = scanDocument(lines);\n const application = context.application ?? mergeSymbols();\n const input = symbolsForBuffer(lines, { ...application, authoringPath: context.path ?? application.authoringPath, authoringPlacement: context.placement ?? application.authoringPlacement });\n const analysis = responseAnalysis(lines, input.authoringDocuments ?? input.authoringSources?.filter(source => source !== lines.join('\\n')), input.authoringPlacement, input.authoringPath, input.authoringPlacementResolved);\n const routeLines = new Set(analysis.eventSources.routes.map(route => route.location.line - 1));\n const symbols = { ...scanned, commands: scanned.commands.map(command => ({ ...command,\n properties: command.properties.filter(property => !routeLines.has(property.line)),\n produces: command.produces?.filter(production => !analysis.operationProductionLines?.has(production.line)),\n productionHeaders: command.productionHeaders?.filter(line => !analysis.operationProductionLines?.has(line)),\n })) };\n const events = new Set([...knownEventNames(symbols), ...knownEventNames(application)]);\n const policies = new Set([...symbols.policies, ...application.policies].map((policy) => policy.name));\n const issues: ValidationIssue[] = validateDeclarations(lines, symbols, application);\n issues.push(...validateProductionDestinations(lines, symbols));\n // One parser pass covers committed types, including query results and trigger data, without\n // speculative property scans mistaking tags, paths, strings or code for optionality.\n const optionalCodes = new Set<string>([DiagnosticCodes.LegacyOptionalSuffix, DiagnosticCodes.InvalidOptionalModifierOrder, DiagnosticCodes.OptionalReadsNotSupported]);\n const policyCodes = new Set<string>([DiagnosticCodes.UnexpectedTokenInPolicyCondition, DiagnosticCodes.ExpectedPolicyCondition, DiagnosticCodes.UnclosedPolicyConditionGroup, DiagnosticCodes.ExpectedRoleName, DiagnosticCodes.ExpectedClaimName, DiagnosticCodes.ExpectedClaimMatches, DiagnosticCodes.ExpectedClaimMatchTarget]);\n const consistencyCodes = new Set<string>([DiagnosticCodes.UnknownEvent, DiagnosticCodes.UnknownReadModelProperty, DiagnosticCodes.PiiNotSupportedOnIdentifier]);\n const timelineCodes = new Set<string>([DiagnosticCodes.EventFromLaterSlice, DiagnosticCodes.TimelineCycleGroup]);\n const dependencyCodes = new Set<string>([DiagnosticCodes.UndeclaredDependency, DiagnosticCodes.UnusedDependencyDeclaration, DiagnosticCodes.InvalidDependencyTarget, DiagnosticCodes.RepeatedDependencyDeclaration, DiagnosticCodes.MutualDependencyDeclarations, DiagnosticCodes.AmbiguousReference]);\n // These parser diagnostics must reach the marker adapter. C#-only completeness and reference\n // checks are not synthesized here, but are preserved when a caller supplies compiler diagnostics.\n const authoringCodes = new Set<string>([DiagnosticCodes.InvalidEventDeclaration, DiagnosticCodes.InvalidImportDeclaration, DiagnosticCodes.InvalidSliceDeclaration, DiagnosticCodes.InvalidDescription, DiagnosticCodes.DuplicateDescription, DiagnosticCodes.EmptyDescription,DiagnosticCodes.DuplicateEventSubject, DiagnosticCodes.InvalidSubjectType, DiagnosticCodes.ProtectedSubjectType, DiagnosticCodes.InvalidSubjectOwner, DiagnosticCodes.ReadModelSubjectNotSupported, DiagnosticCodes.InvalidSubjectModifierOrder, DiagnosticCodes.UnsupportedInteractionAlternatives, DiagnosticCodes.MixedInteractionAlternatives, DiagnosticCodes.InteractionAlternativeWithoutActions, DiagnosticCodes.InlineInteractionAlternative, DiagnosticCodes.LegacyInteractionWhere, DiagnosticCodes.InvalidSpecificationParameter, DiagnosticCodes.InvalidSpecificationCase, DiagnosticCodes.DuplicateSpecificationParameter, DiagnosticCodes.DuplicateSpecificationCase, DiagnosticCodes.IncompleteSpecificationTable, DiagnosticCodes.InvalidSpecificationCaseAssignment, DiagnosticCodes.InvalidSpecificationCaseValue, DiagnosticCodes.InvalidSpecificationCaseReference, DiagnosticCodes.OptionalSpecificationParameterTarget, DiagnosticCodes.SpecificationCaseNameCollision, DiagnosticCodes.IncompatibleSpecificationParameterType, DiagnosticCodes.UnusedSpecificationParameter, DiagnosticCodes.SingularSpecificationTableExpansion, DiagnosticCodes.InvalidSpecificationCallerPersona, DiagnosticCodes.UnsynthesizablePersonaCaller, DiagnosticCodes.PersonaWithoutGate, DiagnosticCodes.GateWithoutPersona, DiagnosticCodes.AmbiguousPersonaCaller, DiagnosticCodes.InvalidDocumentation, DiagnosticCodes.ConflictingDocumentationAcrossFiles, DiagnosticCodes.InvalidAbsentReadModelStep, DiagnosticCodes.UnknownConstraintProperty, DiagnosticCodes.OmittedProductionDestination, DiagnosticCodes.InvalidSpecificationExample, DiagnosticCodes.DuplicateSpecificationAssignment]);\n const complianceCodes = new Set<string>([DiagnosticCodes.InvalidPurposeDeclaration, DiagnosticCodes.InvalidPurposeVocabulary, DiagnosticCodes.DuplicatePurposeField, DiagnosticCodes.DuplicatePurposeDeclaration, DiagnosticCodes.UnknownPurpose, DiagnosticCodes.PurposeInterestMismatch, DiagnosticCodes.PersonalDataWithoutPurpose, DiagnosticCodes.SpecialDataWithoutCondition, DiagnosticCodes.CriminalDataWithoutAuthorization, DiagnosticCodes.PurposeWithoutBasis, DiagnosticCodes.UnusedPurpose, DiagnosticCodes.UnknownConceptDirective, DiagnosticCodes.AttributeReasonWithoutAttribute, DiagnosticCodes.DuplicateAttributeReason, DiagnosticCodes.LegacyComplianceMarker, DiagnosticCodes.DuplicateComplianceMarker, DiagnosticCodes.UnknownComplianceMarker, DiagnosticCodes.InvalidSecretScope, DiagnosticCodes.DuplicateSecretScope, DiagnosticCodes.SecretScopeIgnoredForPii, DiagnosticCodes.InvalidPersonalDataQualifier, DiagnosticCodes.DuplicateSpecialCategory]);\n const compilerUnknownEventLines = new Set<number>();\n for (const diagnostic of context.compilerDiagnostics ?? analysis.diagnostics) {\n const identityType = diagnostic.code === DiagnosticCodes.UnknownType && (analysis.identityDetails ?? []).some(detail => detail.line === diagnostic.location.line - 1);\n const identityDuplicate = diagnostic.code === DiagnosticCodes.RepeatedSingularDeclarationAcrossFiles && diagnostic.message.includes('identity block');\n if (!identityType && !identityDuplicate && !complianceCodes.has(diagnostic.code) && !optionalCodes.has(diagnostic.code) && !policyCodes.has(diagnostic.code) && !consistencyCodes.has(diagnostic.code) && !timelineCodes.has(diagnostic.code) && !dependencyCodes.has(diagnostic.code) && !authoringCodes.has(diagnostic.code) && diagnostic.code !== DiagnosticCodes.InvalidSpecificationExampleBody && diagnostic.code !== DiagnosticCodes.UnknownRuleImplementationDirective && diagnostic.code !== DiagnosticCodes.InvalidValidationRule && diagnostic.code !== DiagnosticCodes.RepeatedDeclarationAcrossFiles && !/^PLAY049[0-9]$|^PLAY050[0-7]$|^PLAY054[7-9]$|^PLAY055[01]$|^PLAY048[2-9]$|^PLAY004[56]$|^PLAY053[0-9]$|^PLAY054[0-6]$|^PLAY034[1-8]$|^PLAY0557$|^PLAY060[7-9]$|^PLAY061[0-9]$|^PLAY0620$|^PLAY063[3-9]$|^PLAY064[0-9]$|^PLAY065[0-2]$|^PLAY066[0-6]$/.test(diagnostic.code)) continue;\n const line = diagnostic.location.line - 1;\n if (diagnostic.code === DiagnosticCodes.OmittedProductionDestination && issues.some(existing => existing.code === diagnostic.code && existing.line === line)) continue;\n if (diagnostic.code === DiagnosticCodes.UnknownEvent) {\n if (compilerUnknownEventLines.has(line)) continue;\n compilerUnknownEventLines.add(line);\n }\n const length = legacyOptionalTypeLength(lines[line], diagnostic) || lines[line].length - diagnostic.location.column + 1;\n issues.push(issue(diagnostic.severity, line, diagnostic.location.column, length, diagnostic.message, diagnostic.code as DiagnosticCode));\n }\n\n const checkEvent = (line: number, text: string, name: string) => {\n if (!events.has(name) && !compilerUnknownEventLines.has(line)) {\n issues.push(\n tokenIssue(\n 'warning',\n line,\n text,\n name,\n `Unknown event type '${name}' — declare it in a slice or import it.`,\n diagnosticCodes.unknownEvent,\n ),\n );\n }\n };\n\n let authorizeIndent = -1;\n\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n const trimmed = line.trim();\n\n if (fences[index] || trimmed.length === 0) continue;\n\n const leading = line.match(/^[ ]*(\\t+)/);\n if (leading) {\n issues.push(\n issue(\n 'warning',\n index,\n leading[0].length - leading[1].length + 1,\n leading[1].length,\n 'Screenplay is indentation-based — use spaces, not tabs.',\n diagnosticCodes.tabIndentation,\n ),\n );\n }\n\n // Policy references continue on indented lines below an authorize clause.\n if (authorizeIndent >= 0) {\n if (\n indentOf(line) > authorizeIndent &&\n /^(?:or\\s+)?[A-Z]\\w*(?:\\s+or\\s+[A-Z]\\w*)*$/.test(trimmed)\n ) {\n for (const name of trimmed.split(/\\s+/).filter((token) => token !== 'or')) {\n if (!policies.has(name)) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n name,\n `Unknown policy '${name}' — declare it with 'policy ${name}'.`,\n diagnosticCodes.unknownPolicy,\n ),\n );\n }\n }\n continue;\n }\n authorizeIndent = -1;\n }\n\n const fileImportIssue = validateImport(lines, fences, index);\n if (fileImportIssue) issues.push(fileImportIssue);\n\n const slice = trimmed.match(/^slice\\s+(\\w+)/);\n if (slice && !sliceTypes.includes(slice[1])) {\n issues.push(\n tokenIssue(\n 'error',\n index,\n line,\n slice[1],\n `Unknown slice type '${slice[1]}' — expected ${sliceTypes.join(', ')}.`,\n diagnosticCodes.unknownSliceType,\n ),\n );\n }\n\n const concept = trimmed.match(/^concept\\s+\\w+\\s*:\\s*(\\w+)/);\n if (concept && concept[1] !== 'Enum' && !primitiveTypes.includes(concept[1])) {\n issues.push(\n tokenIssue(\n 'error',\n index,\n line,\n concept[1],\n `Unknown primitive type '${concept[1]}' — expected ${primitiveTypes.join(', ')} or Enum.`,\n diagnosticCodes.unknownPrimitiveType,\n ),\n );\n }\n\n const authorize = trimmed.match(/^authorize\\s+(.*)$/);\n if (authorize) {\n authorizeIndent = indentOf(line);\n for (const name of authorize[1].split(/\\s+/).filter((token) => token !== 'or' && token.length > 0)) {\n if (!policies.has(name)) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n name,\n `Unknown policy '${name}' — declare it with 'policy ${name}'.`,\n diagnosticCodes.unknownPolicy,\n ),\n );\n }\n }\n }\n\n const reactsOn = trimmed.match(/^on\\s+([A-Z]\\w*)\\s*$/);\n if (reactsOn) checkEvent(index, line, reactsOn[1]);\n\n const produces = trimmed.match(/^produces\\s+([A-Z]\\w*)\\s*$/);\n if (produces && !analysis.operationProductionLines?.has(index)) checkEvent(index, line, produces[1]);\n\n if (/^produces\\s+when\\b/.test(trimmed) && !analysis.operationProductionLines?.has(index)) {\n for (let next = index + 1; next < lines.length; next++) {\n const candidate = lines[next];\n if (fences[next] || candidate.trim().length === 0) continue;\n if (indentOf(candidate) > indentOf(line)) {\n const name = candidate.trim().match(/^([A-Z]\\w*)\\s*$/);\n if (name) checkEvent(next, candidate, name[1]);\n }\n break;\n }\n }\n\n const uniqueEvent = trimmed.match(/^unique\\s+event\\s+([A-Z]\\w*)/);\n if (uniqueEvent) checkEvent(index, line, uniqueEvent[1]);\n\n const uniqueProperty = trimmed.match(/^unique\\s+[a-z_]\\w*\\s+on\\s+([A-Z]\\w*)/);\n if (uniqueProperty) checkEvent(index, line, uniqueProperty[1]);\n\n // Every $identity. path must name a member of the caller; anything after 'claims.' is a claim name.\n // A bare $identity is left to the compilers, which see it only where an expression is expected.\n for (const path of line.match(/\\$identity\\.[\\w.]+/g) ?? []) {\n const member = path.substring('$identity.'.length).split('.')[0];\n const knownIdentity = [...identityProperties, ...(analysis.identityDetails ?? []).map(detail => detail.name)];\n if (!knownIdentity.includes(member)) {\n issues.push(tokenIssue('warning', index, line, path,\n `Unknown $identity property '${member}' — expected ${knownIdentity.join(', ')}.`,\n diagnosticCodes.unknownContextIdentityProperty));\n }\n }\n\n // Every $context. path must name something CommandContext or QueryContext carries.\n for (const path of line.match(/\\$context\\.[\\w.]+/g) ?? []) {\n const segments = path.substring('$context.'.length).split('.');\n if (!contextRoots.includes(segments[0])) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context path '${segments.join('.')}' — expected one of ${contextRoots.join(', ')}.`,\n diagnosticCodes.unknownContextPath,\n ),\n );\n } else if (\n segments[0] === 'causedBy' &&\n segments.length > 1 &&\n !causedByProperties.includes(segments[1])\n ) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context.causedBy property '${segments[1]}' — expected ${causedByProperties.join(', ')}.`,\n diagnosticCodes.unknownContextCausedByProperty,\n ),\n );\n } else if (\n segments[0] === 'identity' &&\n segments.length > 1 &&\n !identityProperties.includes(segments[1])\n ) {\n issues.push(\n tokenIssue(\n 'warning',\n index,\n line,\n path,\n `Unknown $context.identity property '${segments[1]}' — expected ${identityProperties.join(', ')}.`,\n diagnosticCodes.unknownContextIdentityProperty,\n ),\n );\n }\n }\n }\n\n issues.push(...validateEventContextPaths(lines, fences));\n issues.push(...validateInlineEvents(lines, symbols, application, analysis.operationProductionLines));\n\n const fenceLines = lines\n .map((line, index) => ({ line, index }))\n .filter(({ line }) => /^\\s*```(?:[a-z]+)?\\s*$/.test(line));\n if (fenceLines.length % 2 === 1) {\n const last = fenceLines[fenceLines.length - 1];\n issues.push(\n issue(\n 'error',\n last.index,\n 1,\n last.line.length + 1,\n 'Unclosed inline code block — expected a closing ``` line.',\n diagnosticCodes.unclosedCodeBlock,\n ),\n );\n }\n\n return issues;\n}\n\n// This is advice, not a semantic default: accepting the typed workspace repair changes routing.\nfunction validateProductionDestinations(lines: string[], symbols: DocumentSymbols): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n lines = eventAnalysisSource(lines);\n for (const command of symbols.commands) {\n const identifiers = command.properties.filter(property => property.isIdentifier && !propertyTypeReference(property).isOptional && !propertyTypeReference(property).isCollection);\n if (identifiers.length !== 1) continue;\n for (const production of command.produces ?? []) {\n if (production.inline || production.conditional || production.target !== undefined) continue;\n const line = production.line;\n issues.push(issue('information', line, indentOf(lines[line]) + 1, lines[line].trim().length,\n `Plain 'produces ${production.name}' omits its destination — use 'for ${identifiers[0].name}' to explicitly select the command's identifier.`,\n diagnosticCodes.omittedProductionDestination));\n }\n }\n return issues;\n}\n\n// Inside a module or feature an import names files, and a quoted import anywhere has the compiler's shape.\nfunction validateImport(lines: string[], fences: boolean[], index: number): ValidationIssue | undefined {\n const line = lines[index];\n const trimmed = line.trim().replace(/\\s*\\/\\/.*$/, '');\n if (!/^import\\b/.test(trimmed) || fileImportOn(line, index)) return undefined;\n const indent = indentOf(line);\n const inBody = indent > 0 && ['module', 'feature'].includes(enclosingChain(lines, fences, index, indent)[0]);\n if (!inBody && !isFileImportLine(line)) return undefined;\n return issue(\n 'error',\n index,\n indent + 1,\n trimmed.length,\n `Invalid import '${trimmed}' — inside a module or feature, import names files: 'import \"<path or glob>\"'.`,\n diagnosticCodes.invalidFileImport,\n );\n}\n\n// A mapping target: the first word of a mapping line, after the keyword that opens it if there is one.\nconst mappingTarget = /^(?:(?:increment|decrement|count|clear|add|subtract|set)\\s+)?@?([$\\w.]+)(?=\\s|=|$)/;\n\n// Every $eventContext.<path> - in an expression or as the dynamic key of a mapping target - checked against the\n// event-context catalog the way the compiler checks it (Parsing/EventContextPathValidator.cs).\nexport function validateEventContextPaths(lines: string[], fences: boolean[]): ValidationIssue[] {\n const issues: ValidationIssue[] = [];\n const names = (members: readonly { name: string }[]) => members.map((member) => member.name).join(', ');\n\n for (let index = 0; index < lines.length; index++) {\n const line = lines[index];\n if (fences[index]) continue;\n\n for (const match of line.matchAll(/(\\.)?\\$eventContext((?:\\.(?:\\w+(?:\\(\\))?)?)*)/g)) {\n const token = match[0].substring(match[1]?.length ?? 0);\n const written = match[2];\n if (written.length === 0) {\n // A bare $eventContext names nothing only as a dynamic key; in an expression the compiler rejects it as invalid.\n if (match[1]) {\n issues.push(issue('error', index, (match.index ?? 0) + 2, token.length, `'$eventContext' names no member - expected one of ${names(resolveEventContextPath('').expected)}.`, diagnosticCodes.missingEventContextPath));\n }\n continue;\n }\n\n const path = written.substring(1);\n const resolution = resolveEventContextPath(path);\n const column = (match.index ?? 0) + (match[1]?.length ?? 0) + 1;\n switch (resolution.status) {\n case 'missing':\n issues.push(issue('error', index, column, token.length, `'$eventContext.${path}' names no member - expected one of ${names(resolution.expected)}.`, diagnosticCodes.missingEventContextPath));\n break;\n case 'unknownMember':\n issues.push(issue('warning', index, column, token.length, `Unknown event context member '${resolution.segment}' in '$eventContext.${path}' - expected one of ${names(resolution.expected)}.`, diagnosticCodes.unknownEventContextMember));\n break;\n case 'unknownSubPath': {\n const has = resolution.expected.length === 0 ? 'no members to address' : `members ${names(resolution.expected)}`;\n issues.push(issue('warning', index, column, token.length, `Unknown event context path '$eventContext.${path}' - '${resolution.member?.name}' (${resolution.member?.type}) has ${has}.`, diagnosticCodes.unknownEventContextPath));\n break;\n }\n case 'belowCollection':\n issues.push(issue('error', index, column, token.length, `'$eventContext.${path}' cannot resolve - '${resolution.member?.name}' is a collection (${resolution.member?.type}) and cannot be addressed below.`, diagnosticCodes.eventContextPathBelowCollection));\n break;\n }\n }\n\n // Only $eventContext resolves in a dynamic key; any other $ source is kept as the literal key text.\n const target = line.trim().match(mappingTarget)?.[1];\n const source = target?.match(/\\.\\$(\\w+)/)?.[1];\n if (target && source && source !== 'eventContext') {\n issues.push(tokenIssue('warning', index, line, target, `Dynamic dictionary key '$${source}' in '${target}' is never resolved - only '$eventContext.<path>' is, so the literal text '$${source}' becomes the key.`, diagnosticCodes.unresolvedDynamicKeySource));\n }\n }\n\n return issues;\n}\n"],"mappings":"88BAgDA,SAAS,MACL,EACA,EACA,EACA,EACA,EACA,EACe,CACf,MAAO,CAAE,WAAU,UAAS,OAAM,cAAa,UAAWA,EAAcC,EAAQ,MAAK,CACzF,CAEA,SAAS,WACL,EACA,EACA,EACA,EACA,EACA,EACe,CAEf,OAAO,MAAMC,EAAUC,EADRC,EAAK,QAAQC,CAAK,EAAI,EACAA,EAAM,OAAQC,EAASC,CAAI,CACpE,CAIA,SAAS,qBAAqB,EAAiB,EAA0B,EAAiD,CACtH,IAAMC,EAA4B,CAAC,EAC7BC,kBAAQ,IAAI,IAAI,CAAC,GAAGC,EAAeC,EAASC,CAAc,EAAG,GAAGF,EAAeG,EAAa,CAAC,CAAC,CAAC,CAAC,EAEhG,iBA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AM,sBAAsB,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,eAAe,EAAE,CA6BvF,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,eAAe,EAIzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAG7C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAGtC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAQxC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,EAU1C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAcxC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAGxC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAAe,EAK/C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAOnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAInD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAEhD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAGvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,EA0BjD,CAAC;AAEF,OAAO,EAAE,gBAAgB,IAAI,WAAW,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAUnG,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,EAAE,CAG9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AAK1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAgB,MAAM,WAAW,CAAC;AAK1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAarD,MAAM,MAAM,cAAc,GACpB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,eAAe,EAAE,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAKxB,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAkBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,GAAE,eAA+C,GAAG,eAAe,EAAE,CA0G/H;AAID,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,eAAqC,GAC/C,cAAc,CA+JhB"}
|
|
@@ -34,6 +34,13 @@ export declare const diagnosticCodes: {
|
|
|
34
34
|
readonly eventTargetOutsideOutboundTranslation: "PLAY0618";
|
|
35
35
|
readonly eventsSourceOutsideInboundTranslation: "PLAY0619";
|
|
36
36
|
readonly invalidCaptureEventsSource: "PLAY0620";
|
|
37
|
+
readonly invalidReadModelKey: "PLAY0660";
|
|
38
|
+
readonly incompleteReadModelKey: "PLAY0661";
|
|
39
|
+
readonly invalidReadModelKeyLookup: "PLAY0662";
|
|
40
|
+
readonly productionRouteOutsideCommand: "PLAY0663";
|
|
41
|
+
readonly redundantProductionRoute: "PLAY0664";
|
|
42
|
+
readonly invalidObserverFilter: "PLAY0665";
|
|
43
|
+
readonly observerFilterExcludesEveryProducer: "PLAY0666";
|
|
37
44
|
readonly invalidDescription: "PLAY0145";
|
|
38
45
|
readonly emptyDescription: "PLAY0146";
|
|
39
46
|
readonly duplicateDescription: "PLAY0147";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic-codes.d.ts","sourceRoot":"","sources":["../diagnostic-codes.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"diagnostic-codes.d.ts","sourceRoot":"","sources":["../diagnostic-codes.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsMlB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-source-authoring.d.ts","sourceRoot":"","sources":["../event-source-authoring.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,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MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"keyword-docs.d.ts","sourceRoot":"","sources":["../keyword-docs.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqJ9C,CAAC;AAIF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW3D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKhD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8BtD,CAAC;AAIF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAStD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DocumentSymbols } from './symbols';
|
|
2
|
+
import { CompletionEntry } from './completion-items';
|
|
3
|
+
export declare function readModelKeyCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null;
|
|
4
|
+
//# sourceMappingURL=read-model-key-completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-model-key-completions.d.ts","sourceRoot":"","sources":["../read-model-key-completions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI,CAazI"}
|
|
@@ -3,6 +3,7 @@ import { ExampleAnalysis } from './ExampleAnalysis';
|
|
|
3
3
|
import { personaAnalysis } from './persona-analysis';
|
|
4
4
|
import { dependencyTargetAnalysis } from './dependency-target-analysis';
|
|
5
5
|
import { EventSourceAnalysis } from './EventSourceAnalysis';
|
|
6
|
+
import { AuthoredReadModelKeys } from './AuthoredReadModelKeys';
|
|
6
7
|
import { AuthoringDocument } from './AuthoringDocument';
|
|
7
8
|
import { OperationAnalysis } from './OperationAnalysis';
|
|
8
9
|
export type { AuthoringDocument } from './AuthoringDocument';
|
|
@@ -19,6 +20,7 @@ export declare const responseAvailability = "Executable as ESM v7. Generated val
|
|
|
19
20
|
export declare function responseAnalysis(lines: string[], otherSources?: readonly (string | AuthoringDocument)[], placement?: readonly string[], path?: string, isPlacementResolved?: boolean): ResponseAnalysis & {
|
|
20
21
|
readonly operations: OperationAnalysis;
|
|
21
22
|
readonly eventSources: EventSourceAnalysis;
|
|
23
|
+
readonly readModels: readonly AuthoredReadModelKeys[];
|
|
22
24
|
readonly examples: ExampleAnalysis;
|
|
23
25
|
readonly personas: ReturnType<typeof personaAnalysis>;
|
|
24
26
|
readonly dependencies: ReturnType<typeof dependencyTargetAnalysis>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-analysis.d.ts","sourceRoot":"","sources":["../response-analysis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response-analysis.d.ts","sourceRoot":"","sources":["../response-analysis.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAA4C,MAAM,qBA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C"}
|
package/dist/tokens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../tokens.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAQ/C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+BzE,eAAO,MAAM,gBAAgB,EAAE,iBAa9B,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../tokens.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAQ/C,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+BzE,eAAO,MAAM,gBAAgB,EAAE,iBAa9B,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,gBAAgB,CA+P5F"}
|
package/package.json
CHANGED