@cratis/screenplay-language 4.46.4 → 4.48.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/completion-items.ts +37 -1
- package/completion-planner.ts +15 -0
- package/completions.ts +26 -3
- package/diagnostic-codes.ts +1 -0
- package/dist/completion-items.d.ts +1 -0
- package/dist/completion-items.d.ts.map +1 -1
- package/dist/completion-items.js +36 -1
- package/dist/completion-items.js.map +1 -1
- package/dist/completion-planner.d.ts +3 -0
- package/dist/completion-planner.d.ts.map +1 -1
- package/dist/completion-planner.js +15 -0
- package/dist/completion-planner.js.map +1 -1
- package/dist/completions.d.ts +5 -2
- package/dist/completions.d.ts.map +1 -1
- package/dist/completions.js +13 -2
- package/dist/completions.js.map +1 -1
- package/dist/diagnostic-codes.d.ts +1 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/dist/diagnostic-codes.js +1 -0
- package/dist/diagnostic-codes.js.map +1 -1
- package/dist/file-imports.d.ts +11 -0
- package/dist/file-imports.d.ts.map +1 -0
- package/dist/file-imports.js +58 -0
- package/dist/file-imports.js.map +1 -0
- package/dist/hover-content.d.ts.map +1 -1
- package/dist/hover-content.js +5 -1
- package/dist/hover-content.js.map +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/keyword-docs.d.ts +1 -0
- package/dist/keyword-docs.d.ts.map +1 -1
- package/dist/keyword-docs.js +13 -2
- package/dist/keyword-docs.js.map +1 -1
- package/dist/language.d.ts.map +1 -1
- package/dist/language.js +2 -0
- package/dist/language.js.map +1 -1
- package/dist/symbols.d.ts +1 -0
- package/dist/symbols.d.ts.map +1 -1
- package/dist/symbols.js +15 -0
- package/dist/symbols.js.map +1 -1
- package/dist/themes/screenplay-dark.d.ts.map +1 -1
- package/dist/themes/screenplay-dark.js +1 -0
- package/dist/themes/screenplay-dark.js.map +1 -1
- package/dist/themes/screenplay-light.d.ts.map +1 -1
- package/dist/themes/screenplay-light.js +1 -0
- package/dist/themes/screenplay-light.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +6 -0
- package/dist/tokens.js.map +1 -1
- package/dist/validation.d.ts +5 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +29 -8
- package/dist/validation.js.map +1 -1
- package/file-imports.ts +70 -0
- package/for_fileImports/when_finding_file_imports.ts +38 -0
- package/for_importablePaths/when_listing_what_a_document_can_import.ts +34 -0
- package/for_planCompletions/when_completing_a_file_import.ts +26 -0
- package/for_planCompletions/when_completing_a_specification_step.ts +42 -0
- package/for_tokens/when_highlighting_a_file_import.ts +18 -0
- package/for_tokens/when_highlighting_specification_steps.ts +28 -0
- package/for_validateLines/when_validating_a_document/with_a_problem_of_every_coded_kind.ts +1 -0
- package/for_validateLines/when_validating_a_file_placed_by_an_import/with_names_declared_in_other_files.ts +43 -0
- package/for_validateLines/when_validating_file_imports/at_every_level.ts +36 -0
- package/hover-content.ts +6 -1
- package/index.ts +13 -7
- package/keyword-docs.ts +14 -2
- package/language.ts +2 -0
- package/package.json +1 -1
- package/symbols.ts +16 -0
- package/themes/screenplay-dark.ts +1 -0
- package/themes/screenplay-light.ts +1 -0
- package/tokens.ts +6 -0
- package/validation.ts +43 -7
package/completion-items.ts
CHANGED
|
@@ -13,6 +13,7 @@ const fenced = (tag: string) => `\`\`\`${tag}\n\${1}\n\`\`\``;
|
|
|
13
13
|
|
|
14
14
|
export const topLevelItems: CompletionEntry[] = [
|
|
15
15
|
{ label: 'import', insertText: 'import ${1:Module}.${2:Type}', documentation: 'Imports a type from another module by its qualified name.' },
|
|
16
|
+
{ label: 'import "…"', insertText: 'import "${1:**/*.play}"', documentation: 'Imports other `.play` files by path or glob, relative to this file\'s folder, as whole documents of the application.' },
|
|
16
17
|
{ label: 'concept', insertText: 'concept ${1:Name} : ${2|Uuid,String,Int,Decimal,Bool,Date,DateTime|}', documentation: 'Declares a formalized value type wrapping a primitive.' },
|
|
17
18
|
{ label: 'concept (enum)', insertText: 'concept ${1:Name} : Enum\n ${2:value}', documentation: 'Declares an enumeration concept with a fixed set of values.' },
|
|
18
19
|
{ label: 'concept (@pii with reason)', insertText: 'concept ${1:Name} : ${2|String,Uuid,Int,Decimal,Bool,Date,DateTime|} @pii\n pii reason "${3:why this is personal data, its purpose and lawful basis}"', documentation: 'Declares a personal-data concept together with the reason it is personal data.' },
|
|
@@ -35,11 +36,13 @@ export const typeItems: CompletionEntry[] = [
|
|
|
35
36
|
];
|
|
36
37
|
|
|
37
38
|
export const moduleItems: CompletionEntry[] = [
|
|
39
|
+
{ label: 'import "…"', insertText: 'import "${1:*/*.play}"', documentation: 'Imports `.play` files into this module — their top level is the module\'s body, so they hold features and module members without restating the module.' },
|
|
38
40
|
{ label: 'layout', insertText: 'layout ${1:Name}\n template\n ${2:slot}', documentation: 'Declares a reusable screen template with named slots.' },
|
|
39
41
|
{ label: 'feature', insertText: 'feature ${1:Name}\n ', documentation: 'Groups related slices into a vertical feature.' },
|
|
40
42
|
];
|
|
41
43
|
|
|
42
44
|
export const featureItems: CompletionEntry[] = [
|
|
45
|
+
{ label: 'import "…"', insertText: 'import "${1:*.play}"', documentation: 'Imports `.play` files into this feature — their top level is the feature\'s body, so they hold slices and nested features without restating where they belong.' },
|
|
43
46
|
{ label: 'feature', insertText: 'feature ${1:Name}\n ', documentation: 'Declares a nested sub-feature.' },
|
|
44
47
|
{ label: 'slice StateChange', insertText: 'slice StateChange ${1:Name}\n ', documentation: 'A command → events flow; something that changes the system.' },
|
|
45
48
|
{ label: 'slice StateView', insertText: 'slice StateView ${1:Name}\n ', documentation: 'A query + projection + screen; something that reads the system.' },
|
|
@@ -137,7 +140,40 @@ export const specificationItems: CompletionEntry[] = [
|
|
|
137
140
|
{ label: 'then query', insertText: 'then query ${1:QueryName}\n arguments\n ${2:argument} = ${3:value}\n result\n ${4:property} = ${5:value}', documentation: 'The ordered query results expected for explicit arguments. Remove the result block to assert an empty result.' },
|
|
138
141
|
{ label: 'then error', insertText: 'then error', documentation: 'A rejection, for a reason this specification does not name.' },
|
|
139
142
|
{ label: 'then error "..."', insertText: 'then error "${1:reason}"', documentation: 'A rejection, for the named reason.' },
|
|
140
|
-
|
|
143
|
+
{ label: 'given clock', insertText: 'given clock "${1:2026-10-05T08:00:00Z}"', documentation: 'The instant the scenario happens at - the occurrence time of everything it does. At most once.' },
|
|
144
|
+
{ label: 'given capture', insertText: 'given capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'A record the capture\'s source held before.' },
|
|
145
|
+
{ label: 'when clock', insertText: 'when clock "${1:2026-10-05T09:00:00Z}"', documentation: 'The clock reaches an instant, as the action.' },
|
|
146
|
+
{ label: 'when trigger', insertText: 'when trigger ${1:Trigger}\n ${2:value} = ${3:value}', documentation: 'An application trigger fires, as the action.' },
|
|
147
|
+
{ label: 'when capture', insertText: 'when capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'The record a capture\'s source holds now, as the action.' },
|
|
148
|
+
{ label: 'when query', insertText: 'when query ${1:Query}\n ${2:argument} = ${3:value}', documentation: 'Performs a query, as the action.' },
|
|
149
|
+
{ label: 'then result', insertText: 'then result\n ${1:property} = ${2:value}', documentation: 'One result the query performed by `when query` returns, in order.' },
|
|
150
|
+
{ label: 'then no result', insertText: 'then no result', documentation: 'The query performed by `when query` returns nothing.' },
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
// What follows a 'given', 'when' or 'then' already typed in a specification.
|
|
154
|
+
export const specificationStepItems: Record<'given' | 'when' | 'then', CompletionEntry[]> = {
|
|
155
|
+
given: [
|
|
156
|
+
{ label: 'clock', insertText: 'clock "${1:2026-10-05T08:00:00Z}"', documentation: 'The instant the scenario happens at - the occurrence time of everything it does.' },
|
|
157
|
+
{ label: 'capture', insertText: 'capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'A record the capture\'s source held before. Repeat it for several records.' },
|
|
158
|
+
{ label: 'readmodel', insertText: 'readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}', documentation: 'Establishes prior read model state directly.' },
|
|
159
|
+
{ label: 'caller', insertText: 'caller\n ${1:authenticated}', documentation: 'The identity the scenario runs as.' },
|
|
160
|
+
],
|
|
161
|
+
when: [
|
|
162
|
+
{ label: 'clock', insertText: 'clock "${1:2026-10-05T09:00:00Z}"', documentation: 'The clock reaches an instant - what a scheduled reaction responds to.' },
|
|
163
|
+
{ label: 'trigger', insertText: 'trigger ${1:Trigger}\n ${2:value} = ${3:value}', documentation: 'An application trigger fires, with the values it carries.' },
|
|
164
|
+
{ label: 'capture', insertText: 'capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'The record a capture\'s source holds now.' },
|
|
165
|
+
{ label: 'query', insertText: 'query ${1:Query}\n ${2:argument} = ${3:value}', documentation: 'Performs a query; assert what it returns with `then result` or `then no result`.' },
|
|
166
|
+
{ label: 'append', insertText: 'append ${1:EventType}\n ${2:property} = ${3:value}', documentation: 'An event occurs, instead of a command being executed.' },
|
|
167
|
+
],
|
|
168
|
+
then: [
|
|
169
|
+
{ label: 'result', insertText: 'result\n ${1:property} = ${2:value}', documentation: 'One result the query performed by `when query` returns, in order.' },
|
|
170
|
+
{ label: 'result exactly', insertText: 'result exactly\n ${1:property} = ${2:value}', documentation: 'One result, with every property asserted.' },
|
|
171
|
+
{ label: 'no result', insertText: 'no result', documentation: 'The query performed by `when query` returns nothing.' },
|
|
172
|
+
{ label: 'readmodel', insertText: 'readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}', documentation: 'The read model state expected afterwards.' },
|
|
173
|
+
{ label: 'error', insertText: 'error "${1:reason}"', documentation: 'A rejection, for the named reason.' },
|
|
174
|
+
{ label: 'denied', insertText: 'denied', documentation: 'The action is denied to the caller.' },
|
|
175
|
+
],
|
|
176
|
+
};
|
|
141
177
|
|
|
142
178
|
export const ruleItems: CompletionEntry[] = [
|
|
143
179
|
{ label: 'file', insertText: 'file ${1:Path}', documentation: 'Gives the named predicate its implementation in an external C# file.' },
|
package/completion-planner.ts
CHANGED
|
@@ -17,6 +17,7 @@ export type CompletionPlan =
|
|
|
17
17
|
| { kind: 'none' }
|
|
18
18
|
| { kind: 'entries'; entries: CompletionEntry[] }
|
|
19
19
|
| { kind: 'contextVariables'; replaceLength: number }
|
|
20
|
+
| { kind: 'playFiles'; replaceLength: number }
|
|
20
21
|
| { kind: 'policies' }
|
|
21
22
|
| { kind: 'events' }
|
|
22
23
|
| { kind: 'triggers' }
|
|
@@ -93,6 +94,15 @@ export function planCompletions(
|
|
|
93
94
|
const fences = fenceMap(lines);
|
|
94
95
|
if (fences[lineIndex]) return { kind: 'none' };
|
|
95
96
|
|
|
97
|
+
// Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.
|
|
98
|
+
const importPath = textBefore.match(/^\s*import\s+"([^"]*)$/);
|
|
99
|
+
if (importPath) {
|
|
100
|
+
return { kind: 'playFiles', replaceLength: importPath[1].length };
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// A quote or a slash only asks for a completion inside an import path.
|
|
104
|
+
if (/["/]$/.test(textBefore)) return { kind: 'none' };
|
|
105
|
+
|
|
96
106
|
const contextVariableMatch = textBefore.match(/\$[\w.]*$/);
|
|
97
107
|
if (contextVariableMatch) {
|
|
98
108
|
return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };
|
|
@@ -124,6 +134,11 @@ export function planCompletions(
|
|
|
124
134
|
if (/\bnavigate\s+to\s+\w*$/.test(textBefore)) {
|
|
125
135
|
return { kind: 'screens' };
|
|
126
136
|
}
|
|
137
|
+
if (chain[0] === 'specification') {
|
|
138
|
+
if (/^\s*when\s+query\s+[\w.]*$/.test(textBefore)) return { kind: 'queries' };
|
|
139
|
+
const step = textBefore.match(/^\s*(given|when|then)\s+\w*$/);
|
|
140
|
+
if (step) return { kind: 'entries', entries: items.specificationStepItems[step[1] as 'given' | 'when' | 'then'] };
|
|
141
|
+
}
|
|
127
142
|
if (/\b(?:via|then)\s+query\s+[\w.]*$/.test(textBefore)) {
|
|
128
143
|
return { kind: 'queries' };
|
|
129
144
|
}
|
package/completions.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
|
-
import type { languages } from 'monaco-editor';
|
|
4
|
+
import type { editor, languages } from 'monaco-editor';
|
|
5
5
|
import { Monaco, primitiveTypes } from './language';
|
|
6
6
|
import { knownEventNames, knownTriggerNames, scanDocument } from './symbols';
|
|
7
7
|
import { planCompletions } from './completion-planner';
|
|
8
8
|
import { contextVariableItems, producesItems, CompletionEntry } from './completion-items';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// What a host knows beyond the one model the editor holds.
|
|
11
|
+
export interface CompletionOptions {
|
|
12
|
+
// The paths a file import written in the model can name, relative to the model's folder - typically
|
|
13
|
+
// importablePaths over the host's .play files. Without it, an import path is not completed.
|
|
14
|
+
playFiles?: (model: editor.ITextModel) => readonly string[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function createCompletionProvider(monaco: Monaco, options: CompletionOptions = {}): languages.CompletionItemProvider {
|
|
11
18
|
return {
|
|
12
|
-
triggerCharacters: [' ', '$', '@', '.'],
|
|
19
|
+
triggerCharacters: [' ', '$', '@', '.', '"', '/'],
|
|
13
20
|
|
|
14
21
|
provideCompletionItems(model, position) {
|
|
15
22
|
const lines = model.getLinesContent();
|
|
@@ -53,6 +60,22 @@ export function createCompletionProvider(monaco: Monaco): languages.CompletionIt
|
|
|
53
60
|
[...new Set(knownEventNames(symbols))].map((name) => symbolItem(name, kinds.Event, 'event'));
|
|
54
61
|
|
|
55
62
|
switch (plan.kind) {
|
|
63
|
+
case 'playFiles': {
|
|
64
|
+
const pathRange = new monaco.Range(
|
|
65
|
+
position.lineNumber,
|
|
66
|
+
position.column - plan.replaceLength,
|
|
67
|
+
position.lineNumber,
|
|
68
|
+
position.column,
|
|
69
|
+
);
|
|
70
|
+
return {
|
|
71
|
+
suggestions: (options.playFiles?.(model) ?? []).map((path) => ({
|
|
72
|
+
label: path,
|
|
73
|
+
kind: path.includes('*') ? kinds.Folder : kinds.File,
|
|
74
|
+
insertText: path,
|
|
75
|
+
range: pathRange,
|
|
76
|
+
})),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
56
79
|
case 'contextVariables': {
|
|
57
80
|
const variableRange = new monaco.Range(
|
|
58
81
|
position.lineNumber,
|
package/diagnostic-codes.ts
CHANGED
|
@@ -27,6 +27,7 @@ export const diagnosticCodes = {
|
|
|
27
27
|
eventContextPathBelowCollection: 'PLAY0297',
|
|
28
28
|
missingEventContextPath: 'PLAY0298',
|
|
29
29
|
unresolvedDynamicKeySource: 'PLAY0299',
|
|
30
|
+
invalidFileImport: 'PLAY0454',
|
|
30
31
|
} as const;
|
|
31
32
|
|
|
32
33
|
export type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];
|
|
@@ -19,6 +19,7 @@ export declare const reactionItems: CompletionEntry[];
|
|
|
19
19
|
export declare const reactionTriggerItems: CompletionEntry[];
|
|
20
20
|
export declare const triggerItems: CompletionEntry[];
|
|
21
21
|
export declare const specificationItems: CompletionEntry[];
|
|
22
|
+
export declare const specificationStepItems: Record<'given' | 'when' | 'then', CompletionEntry[]>;
|
|
22
23
|
export declare const ruleItems: CompletionEntry[];
|
|
23
24
|
export declare const policyItems: CompletionEntry[];
|
|
24
25
|
export declare const validateItems: CompletionEntry[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-items.d.ts","sourceRoot":"","sources":["../completion-items.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID,eAAO,MAAM,aAAa,EAAE,eAAe,
|
|
1
|
+
{"version":3,"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AAO,MAAM,WAAW,EAAE,eAAe,EAYxC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAGxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAGvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,EAqBjD,CAAC"}
|
package/dist/completion-items.js
CHANGED
|
@@ -4,6 +4,7 @@ import { eventContextPaths } from './event-context';
|
|
|
4
4
|
const fenced = (tag) => `\`\`\`${tag}\n\${1}\n\`\`\``;
|
|
5
5
|
export const topLevelItems = [
|
|
6
6
|
{ label: 'import', insertText: 'import ${1:Module}.${2:Type}', documentation: 'Imports a type from another module by its qualified name.' },
|
|
7
|
+
{ label: 'import "…"', insertText: 'import "${1:**/*.play}"', documentation: 'Imports other `.play` files by path or glob, relative to this file\'s folder, as whole documents of the application.' },
|
|
7
8
|
{ label: 'concept', insertText: 'concept ${1:Name} : ${2|Uuid,String,Int,Decimal,Bool,Date,DateTime|}', documentation: 'Declares a formalized value type wrapping a primitive.' },
|
|
8
9
|
{ label: 'concept (enum)', insertText: 'concept ${1:Name} : Enum\n ${2:value}', documentation: 'Declares an enumeration concept with a fixed set of values.' },
|
|
9
10
|
{ label: 'concept (@pii with reason)', insertText: 'concept ${1:Name} : ${2|String,Uuid,Int,Decimal,Bool,Date,DateTime|} @pii\n pii reason "${3:why this is personal data, its purpose and lawful basis}"', documentation: 'Declares a personal-data concept together with the reason it is personal data.' },
|
|
@@ -23,10 +24,12 @@ export const typeItems = [
|
|
|
23
24
|
{ label: 'property', insertText: '${1:property} ${2:Type}', documentation: 'A property of the type — a name and a type reference.' },
|
|
24
25
|
];
|
|
25
26
|
export const moduleItems = [
|
|
27
|
+
{ label: 'import "…"', insertText: 'import "${1:*/*.play}"', documentation: 'Imports `.play` files into this module — their top level is the module\'s body, so they hold features and module members without restating the module.' },
|
|
26
28
|
{ label: 'layout', insertText: 'layout ${1:Name}\n template\n ${2:slot}', documentation: 'Declares a reusable screen template with named slots.' },
|
|
27
29
|
{ label: 'feature', insertText: 'feature ${1:Name}\n ', documentation: 'Groups related slices into a vertical feature.' },
|
|
28
30
|
];
|
|
29
31
|
export const featureItems = [
|
|
32
|
+
{ label: 'import "…"', insertText: 'import "${1:*.play}"', documentation: 'Imports `.play` files into this feature — their top level is the feature\'s body, so they hold slices and nested features without restating where they belong.' },
|
|
30
33
|
{ label: 'feature', insertText: 'feature ${1:Name}\n ', documentation: 'Declares a nested sub-feature.' },
|
|
31
34
|
{ label: 'slice StateChange', insertText: 'slice StateChange ${1:Name}\n ', documentation: 'A command → events flow; something that changes the system.' },
|
|
32
35
|
{ label: 'slice StateView', insertText: 'slice StateView ${1:Name}\n ', documentation: 'A query + projection + screen; something that reads the system.' },
|
|
@@ -113,7 +116,39 @@ export const specificationItems = [
|
|
|
113
116
|
{ label: 'then query', insertText: 'then query ${1:QueryName}\n arguments\n ${2:argument} = ${3:value}\n result\n ${4:property} = ${5:value}', documentation: 'The ordered query results expected for explicit arguments. Remove the result block to assert an empty result.' },
|
|
114
117
|
{ label: 'then error', insertText: 'then error', documentation: 'A rejection, for a reason this specification does not name.' },
|
|
115
118
|
{ label: 'then error "..."', insertText: 'then error "${1:reason}"', documentation: 'A rejection, for the named reason.' },
|
|
116
|
-
|
|
119
|
+
{ label: 'given clock', insertText: 'given clock "${1:2026-10-05T08:00:00Z}"', documentation: 'The instant the scenario happens at - the occurrence time of everything it does. At most once.' },
|
|
120
|
+
{ label: 'given capture', insertText: 'given capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'A record the capture\'s source held before.' },
|
|
121
|
+
{ label: 'when clock', insertText: 'when clock "${1:2026-10-05T09:00:00Z}"', documentation: 'The clock reaches an instant, as the action.' },
|
|
122
|
+
{ label: 'when trigger', insertText: 'when trigger ${1:Trigger}\n ${2:value} = ${3:value}', documentation: 'An application trigger fires, as the action.' },
|
|
123
|
+
{ label: 'when capture', insertText: 'when capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'The record a capture\'s source holds now, as the action.' },
|
|
124
|
+
{ label: 'when query', insertText: 'when query ${1:Query}\n ${2:argument} = ${3:value}', documentation: 'Performs a query, as the action.' },
|
|
125
|
+
{ label: 'then result', insertText: 'then result\n ${1:property} = ${2:value}', documentation: 'One result the query performed by `when query` returns, in order.' },
|
|
126
|
+
{ label: 'then no result', insertText: 'then no result', documentation: 'The query performed by `when query` returns nothing.' },
|
|
127
|
+
];
|
|
128
|
+
// What follows a 'given', 'when' or 'then' already typed in a specification.
|
|
129
|
+
export const specificationStepItems = {
|
|
130
|
+
given: [
|
|
131
|
+
{ label: 'clock', insertText: 'clock "${1:2026-10-05T08:00:00Z}"', documentation: 'The instant the scenario happens at - the occurrence time of everything it does.' },
|
|
132
|
+
{ label: 'capture', insertText: 'capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'A record the capture\'s source held before. Repeat it for several records.' },
|
|
133
|
+
{ label: 'readmodel', insertText: 'readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}', documentation: 'Establishes prior read model state directly.' },
|
|
134
|
+
{ label: 'caller', insertText: 'caller\n ${1:authenticated}', documentation: 'The identity the scenario runs as.' },
|
|
135
|
+
],
|
|
136
|
+
when: [
|
|
137
|
+
{ label: 'clock', insertText: 'clock "${1:2026-10-05T09:00:00Z}"', documentation: 'The clock reaches an instant - what a scheduled reaction responds to.' },
|
|
138
|
+
{ label: 'trigger', insertText: 'trigger ${1:Trigger}\n ${2:value} = ${3:value}', documentation: 'An application trigger fires, with the values it carries.' },
|
|
139
|
+
{ label: 'capture', insertText: 'capture ${1:Capture}\n ${2:field} = ${3:value}', documentation: 'The record a capture\'s source holds now.' },
|
|
140
|
+
{ label: 'query', insertText: 'query ${1:Query}\n ${2:argument} = ${3:value}', documentation: 'Performs a query; assert what it returns with `then result` or `then no result`.' },
|
|
141
|
+
{ label: 'append', insertText: 'append ${1:EventType}\n ${2:property} = ${3:value}', documentation: 'An event occurs, instead of a command being executed.' },
|
|
142
|
+
],
|
|
143
|
+
then: [
|
|
144
|
+
{ label: 'result', insertText: 'result\n ${1:property} = ${2:value}', documentation: 'One result the query performed by `when query` returns, in order.' },
|
|
145
|
+
{ label: 'result exactly', insertText: 'result exactly\n ${1:property} = ${2:value}', documentation: 'One result, with every property asserted.' },
|
|
146
|
+
{ label: 'no result', insertText: 'no result', documentation: 'The query performed by `when query` returns nothing.' },
|
|
147
|
+
{ label: 'readmodel', insertText: 'readmodel ${1:ReadModelType}\n ${2:property} = ${3:value}', documentation: 'The read model state expected afterwards.' },
|
|
148
|
+
{ label: 'error', insertText: 'error "${1:reason}"', documentation: 'A rejection, for the named reason.' },
|
|
149
|
+
{ label: 'denied', insertText: 'denied', documentation: 'The action is denied to the caller.' },
|
|
150
|
+
],
|
|
151
|
+
};
|
|
117
152
|
export const ruleItems = [
|
|
118
153
|
{ label: 'file', insertText: 'file ${1:Path}', documentation: 'Gives the named predicate its implementation in an external C# file.' },
|
|
119
154
|
{ label: 'csharp', insertText: fenced('csharp'), documentation: 'Gives the named predicate its implementation as inline C# returning a bool.' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-items.js","sourceRoot":"","sources":["../completion-items.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAQpD,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,SAAS,GAAG,iBAAiB,CAAC;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC5C,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,8BAA8B,EAAE,aAAa,EAAE,2DAA2D,EAAE;IAC3I,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,sEAAsE,EAAE,aAAa,EAAE,wDAAwD,EAAE;IACjL,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,0CAA0C,EAAE,aAAa,EAAE,6DAA6D,EAAE;IACjK,EAA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,CAAC,CAAC;CACtJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,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,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;AAExB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAuDvE;AAID,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,cAAc,
|
|
1
|
+
{"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,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;AAExB,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAuDvE;AAID,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,GACnB,cAAc,CAoEhB"}
|
|
@@ -74,6 +74,14 @@ export function planCompletions(lines, lineIndex, textBefore) {
|
|
|
74
74
|
const fences = fenceMap(lines);
|
|
75
75
|
if (fences[lineIndex])
|
|
76
76
|
return { kind: 'none' };
|
|
77
|
+
// Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.
|
|
78
|
+
const importPath = textBefore.match(/^\s*import\s+"([^"]*)$/);
|
|
79
|
+
if (importPath) {
|
|
80
|
+
return { kind: 'playFiles', replaceLength: importPath[1].length };
|
|
81
|
+
}
|
|
82
|
+
// A quote or a slash only asks for a completion inside an import path.
|
|
83
|
+
if (/["/]$/.test(textBefore))
|
|
84
|
+
return { kind: 'none' };
|
|
77
85
|
const contextVariableMatch = textBefore.match(/\$[\w.]*$/);
|
|
78
86
|
if (contextVariableMatch) {
|
|
79
87
|
return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };
|
|
@@ -102,6 +110,13 @@ export function planCompletions(lines, lineIndex, textBefore) {
|
|
|
102
110
|
if (/\bnavigate\s+to\s+\w*$/.test(textBefore)) {
|
|
103
111
|
return { kind: 'screens' };
|
|
104
112
|
}
|
|
113
|
+
if (chain[0] === 'specification') {
|
|
114
|
+
if (/^\s*when\s+query\s+[\w.]*$/.test(textBefore))
|
|
115
|
+
return { kind: 'queries' };
|
|
116
|
+
const step = textBefore.match(/^\s*(given|when|then)\s+\w*$/);
|
|
117
|
+
if (step)
|
|
118
|
+
return { kind: 'entries', entries: items.specificationStepItems[step[1]] };
|
|
119
|
+
}
|
|
105
120
|
if (/\b(?:via|then)\s+query\s+[\w.]*$/.test(textBefore)) {
|
|
106
121
|
return { kind: 'queries' };
|
|
107
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion-planner.js","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAG5C,mFAAmF;AACnF,6EAA6E;AAC7E,+EAA+E;AAC/E,kFAAkF;AAClF,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"completion-planner.js","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAG5C,mFAAmF;AACnF,6EAA6E;A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AAU,CAAC,EAAE,CAAC;QACxF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,MAAM,aAAa,GAAG,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACtF,IAAI,aAAa,IAAI,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QACzD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IACzD,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;AACrE,CAAC"}
|
package/dist/completions.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type { languages } from 'monaco-editor';
|
|
1
|
+
import type { editor, languages } from 'monaco-editor';
|
|
2
2
|
import { Monaco } from './language';
|
|
3
|
-
export
|
|
3
|
+
export interface CompletionOptions {
|
|
4
|
+
playFiles?: (model: editor.ITextModel) => readonly string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function createCompletionProvider(monaco: Monaco, options?: CompletionOptions): languages.CompletionItemProvider;
|
|
4
7
|
//# sourceMappingURL=completions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../completions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"completions.d.ts","sourceRoot":"","sources":["../completions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,MAAM,EAAkB,MAAM,YAAY,CAAC;AAMpD,MAAM,WAAW,iBAAiB;IAG9B,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,KAAK,SAAS,MAAM,EAAE,CAAC;CAC/D;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,SAAS,CAAC,sBAAsB,CAyI1H"}
|
package/dist/completions.js
CHANGED
|
@@ -4,9 +4,9 @@ import { primitiveTypes } from './language';
|
|
|
4
4
|
import { knownEventNames, knownTriggerNames, scanDocument } from './symbols';
|
|
5
5
|
import { planCompletions } from './completion-planner';
|
|
6
6
|
import { contextVariableItems, producesItems } from './completion-items';
|
|
7
|
-
export function createCompletionProvider(monaco) {
|
|
7
|
+
export function createCompletionProvider(monaco, options = {}) {
|
|
8
8
|
return {
|
|
9
|
-
triggerCharacters: [' ', '$', '@', '.'],
|
|
9
|
+
triggerCharacters: [' ', '$', '@', '.', '"', '/'],
|
|
10
10
|
provideCompletionItems(model, position) {
|
|
11
11
|
const lines = model.getLinesContent();
|
|
12
12
|
const lineIndex = position.lineNumber - 1;
|
|
@@ -37,6 +37,17 @@ export function createCompletionProvider(monaco) {
|
|
|
37
37
|
});
|
|
38
38
|
const eventNames = () => [...new Set(knownEventNames(symbols))].map((name) => symbolItem(name, kinds.Event, 'event'));
|
|
39
39
|
switch (plan.kind) {
|
|
40
|
+
case 'playFiles': {
|
|
41
|
+
const pathRange = new monaco.Range(position.lineNumber, position.column - plan.replaceLength, position.lineNumber, position.column);
|
|
42
|
+
return {
|
|
43
|
+
suggestions: (options.playFiles?.(model) ?? []).map((path) => ({
|
|
44
|
+
label: path,
|
|
45
|
+
kind: path.includes('*') ? kinds.Folder : kinds.File,
|
|
46
|
+
insertText: path,
|
|
47
|
+
range: pathRange,
|
|
48
|
+
})),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
40
51
|
case 'contextVariables': {
|
|
41
52
|
const variableRange = new monaco.Range(position.lineNumber, position.column - plan.replaceLength, position.lineNumber, word.endColumn);
|
|
42
53
|
return {
|
package/dist/completions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../completions.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAU,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAmB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"completions.js","sourceRoot":"","sources":["../completions.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAU,cAAc,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAmB,MAAM,oBAAoB,CAAC;AAS1F,MAAM,UAAU,wBAAwB,CAAC,MAAc,EAAE,UAA6B,EAAE;IACpF,OAAO;QACH,iBAAiB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;QAEjD,sBAAsB,CAAC,KAAK,EAAE,QAAQ;YAClC,MAAM,KAAK,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;YACtC,MAAM,SAAS,GAAG,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC;YAC1C,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YAC3C,MAAM,UAAU,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACjE,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU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AE,CAAC,CACzE;qBACJ,CAAC;gBACN,KAAK,OAAO;oBACR,OAAO;wBACH,WAAW,EAAE;4BACT,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAChC,UAAU,CACN,OAAO,CAAC,IAAI,EACZ,KAAK,CAAC,KAAK,EACX,aAAa,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CACzG,CACJ;4BACD,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAC1B,UAAU,CACN,IAAI,CAAC,IAAI,EACT,KAAK,CAAC,MAAM,EACZ,SAAS,IAAI,CAAC,UAAU,CAAC,MAAM,cAAc,CAChD,CACJ;4BACD,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAChC,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,CACnD;yBACJ;qBACJ,CAAC;gBACN,KAAK,SAAS;oBACV,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1D,CAAC;QACL,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -16,6 +16,7 @@ export declare const diagnosticCodes: {
|
|
|
16
16
|
readonly eventContextPathBelowCollection: "PLAY0297";
|
|
17
17
|
readonly missingEventContextPath: "PLAY0298";
|
|
18
18
|
readonly unresolvedDynamicKeySource: "PLAY0299";
|
|
19
|
+
readonly invalidFileImport: "PLAY0454";
|
|
19
20
|
};
|
|
20
21
|
export type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];
|
|
21
22
|
//# sourceMappingURL=diagnostic-codes.d.ts.map
|
|
@@ -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;;;;;;;;;;;;;;;;;;;CAmBlB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/diagnostic-codes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic-codes.js","sourceRoot":"","sources":["../diagnostic-codes.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,mGAAmG;AACnG,sGAAsG;AACtG,qGAAqG;AACrG,EAAE;AACF,sGAAsG;AACtG,wGAAwG;AACxG,qGAAqG;AACrG,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,cAAc,EAAE,UAAU;IAC1B,oBAAoB,EAAE,UAAU;IAChC,gBAAgB,EAAE,UAAU;IAC5B,0BAA0B,EAAE,UAAU;IACtC,kBAAkB,EAAE,UAAU;IAC9B,8BAA8B,EAAE,UAAU;IAC1C,8BAA8B,EAAE,UAAU;IAC1C,iBAAiB,EAAE,UAAU;IAC7B,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,UAAU;IACxB,aAAa,EAAE,UAAU;IACzB,oBAAoB,EAAE,UAAU;IAChC,yBAAyB,EAAE,UAAU;IACrC,uBAAuB,EAAE,UAAU;IACnC,+BAA+B,EAAE,UAAU;IAC3C,uBAAuB,EAAE,UAAU;IACnC,0BAA0B,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"diagnostic-codes.js","sourceRoot":"","sources":["../diagnostic-codes.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,mGAAmG;AACnG,sGAAsG;AACtG,qGAAqG;AACrG,EAAE;AACF,sGAAsG;AACtG,wGAAwG;AACxG,qGAAqG;AACrG,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,cAAc,EAAE,UAAU;IAC1B,oBAAoB,EAAE,UAAU;IAChC,gBAAgB,EAAE,UAAU;IAC5B,0BAA0B,EAAE,UAAU;IACtC,kBAAkB,EAAE,UAAU;IAC9B,8BAA8B,EAAE,UAAU;IAC1C,8BAA8B,EAAE,UAAU;IAC1C,iBAAiB,EAAE,UAAU;IAC7B,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,UAAU;IACxB,aAAa,EAAE,UAAU;IACzB,oBAAoB,EAAE,UAAU;IAChC,yBAAyB,EAAE,UAAU;IACrC,uBAAuB,EAAE,UAAU;IACnC,+BAA+B,EAAE,UAAU;IAC3C,uBAAuB,EAAE,UAAU;IACnC,0BAA0B,EAAE,UAAU;IACtC,iBAAiB,EAAE,UAAU;CACvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface FileImport {
|
|
2
|
+
pattern: string;
|
|
3
|
+
line: number;
|
|
4
|
+
startColumn: number;
|
|
5
|
+
endColumn: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function isFileImportLine(line: string): boolean;
|
|
8
|
+
export declare function fileImportOn(line: string, lineIndex: number): FileImport | undefined;
|
|
9
|
+
export declare function fileImports(lines: string[]): FileImport[];
|
|
10
|
+
export declare function importablePaths(documentPath: string, files: readonly string[]): string[];
|
|
11
|
+
//# sourceMappingURL=file-imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-imports.d.ts","sourceRoot":"","sources":["../file-imports.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACrB;AAOD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAGD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAMpF;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CASzD;AAcD,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAaxF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
import { fenceMap, indentOf } from './document-context';
|
|
4
|
+
// The compiler's own shape for a file import (FileImportParser): a quoted operand without quotes or escapes.
|
|
5
|
+
const fileImportPattern = /^import(\s+)"([^"\\]+)"\s*(?:\/\/.*)?$/;
|
|
6
|
+
const quotedImportPattern = /^import\s+"/;
|
|
7
|
+
// Whether a line imports files rather than a qualified name - its operand is quoted.
|
|
8
|
+
export function isFileImportLine(line) {
|
|
9
|
+
return quotedImportPattern.test(line.trim());
|
|
10
|
+
}
|
|
11
|
+
// The file import on a single line, or undefined when the line is not a well-formed one.
|
|
12
|
+
export function fileImportOn(line, lineIndex) {
|
|
13
|
+
const indent = indentOf(line);
|
|
14
|
+
const match = line.slice(indent).match(fileImportPattern);
|
|
15
|
+
if (!match)
|
|
16
|
+
return undefined;
|
|
17
|
+
const startColumn = indent + 'import'.length + match[1].length + 2;
|
|
18
|
+
return { pattern: match[2], line: lineIndex, startColumn, endColumn: startColumn + match[2].length };
|
|
19
|
+
}
|
|
20
|
+
// Every well-formed file import in a document, in document order, skipping code fences.
|
|
21
|
+
export function fileImports(lines) {
|
|
22
|
+
const fences = fenceMap(lines);
|
|
23
|
+
const found = [];
|
|
24
|
+
for (let index = 0; index < lines.length; index++) {
|
|
25
|
+
if (fences[index])
|
|
26
|
+
continue;
|
|
27
|
+
const fileImport = fileImportOn(lines[index], index);
|
|
28
|
+
if (fileImport)
|
|
29
|
+
found.push(fileImport);
|
|
30
|
+
}
|
|
31
|
+
return found;
|
|
32
|
+
}
|
|
33
|
+
const folderOf = (path) => path.split('/').slice(0, -1);
|
|
34
|
+
function relativeTo(from, path) {
|
|
35
|
+
const segments = path.split('/');
|
|
36
|
+
let common = 0;
|
|
37
|
+
while (common < from.length && common < segments.length - 1 && from[common] === segments[common])
|
|
38
|
+
common++;
|
|
39
|
+
return [...from.slice(common).map(() => '..'), ...segments.slice(common)].join('/');
|
|
40
|
+
}
|
|
41
|
+
// What an import written in a document can name: every other .play file, relative to the document's folder;
|
|
42
|
+
// a glob for the files directly in each folder holding one; and a glob for everything beneath each folder on
|
|
43
|
+
// the way to them. Paths are portable ('/' separated) and relative to one root, the way the compiler resolves them.
|
|
44
|
+
export function importablePaths(documentPath, files) {
|
|
45
|
+
const from = folderOf(documentPath);
|
|
46
|
+
const paths = new Set();
|
|
47
|
+
for (const file of files.filter((candidate) => candidate !== documentPath && candidate.toLowerCase().endsWith('.play'))) {
|
|
48
|
+
const relative = relativeTo(from, file);
|
|
49
|
+
const folders = folderOf(relative);
|
|
50
|
+
paths.add(relative);
|
|
51
|
+
paths.add([...folders, '*.play'].join('/'));
|
|
52
|
+
for (let depth = 0; depth <= folders.length; depth++) {
|
|
53
|
+
paths.add([...folders.slice(0, depth), '**', '*.play'].join('/'));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return [...paths].sort();
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=file-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-imports.js","sourceRoot":"","sources":["../file-imports.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,oB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AQ,CAAC,QAAQ,CAAC,CAAC;QACnC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACpB,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YACnD,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QACtE,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-content.d.ts","sourceRoot":"","sources":["../hover-content.ts"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,CACxB,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"hover-content.d.ts","sourceRoot":"","sources":["../hover-content.ts"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,CACxB,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAClB,MAAM,GAAG,IAAI,CA2Ff"}
|
package/dist/hover-content.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { enclosingChain, fenceMap, indentOf } from './document-context';
|
|
4
4
|
import { scanDocument } from './symbols';
|
|
5
5
|
import { getSubLanguage } from './sub-language-registry';
|
|
6
|
-
import { attributeDocs, contextVariableDocs, keywordDocs } from './keyword-docs';
|
|
6
|
+
import { attributeDocs, contextVariableDocs, keywordDocs, specificationKeywordDocs } from './keyword-docs';
|
|
7
7
|
// Produces the hover markdown for a word at a position, without any editor
|
|
8
8
|
// dependency — the Monaco service and the VSCode extension share this content.
|
|
9
9
|
// Columns are 1-based, matching both editors' word-at-position APIs.
|
|
@@ -78,6 +78,10 @@ export function hoverContent(lines, lineIndex, word, startColumn, endColumn) {
|
|
|
78
78
|
if (word === 'reads' && (chain[0] === 'every' || chain[0] === 'at') && chain.includes('reaction')) {
|
|
79
79
|
return '**reads** — Declares a whole view this clock trigger consults: `reads <View>`. Clock triggers take no values, so `by` is unavailable.';
|
|
80
80
|
}
|
|
81
|
+
const step = line.trim().match(/^(given|when|then)\s+(?:no\s+)?(\w+)/);
|
|
82
|
+
if (step && step[2] === word && chain[0] === 'specification' && specificationKeywordDocs[word]) {
|
|
83
|
+
return `**${word}** — ${specificationKeywordDocs[word]}`;
|
|
84
|
+
}
|
|
81
85
|
const keywordDoc = keywordDocs[word];
|
|
82
86
|
if (keywordDoc)
|
|
83
87
|
return `**${word}** — ${keywordDoc}`;
|