proschi 0.1.0 → 0.2.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/README.md +32 -3
- package/dist/cli.cjs +15649 -49
- package/dist/render.cjs +420 -0
- package/dist/server.cjs +15766 -104
- package/grammar/proschi.tmLanguage.json +49 -0
- package/package.json +12 -2
- package/schema/proschi-diagram.schema.json +54 -1
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
{
|
|
13
13
|
"include": "#label"
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
"include": "#alt-condition"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"include": "#import"
|
|
20
|
+
},
|
|
15
21
|
{
|
|
16
22
|
"include": "#keyword"
|
|
17
23
|
},
|
|
@@ -42,6 +48,49 @@
|
|
|
42
48
|
"name": "comment.line.number-sign.proschi",
|
|
43
49
|
"match": "(?:^|(?<=\\s))#.*$"
|
|
44
50
|
},
|
|
51
|
+
"alt-condition": {
|
|
52
|
+
"comment": "`when` is a keyword only between an alt name and its condition: `alt \"Name\" when \"condition\" {`.",
|
|
53
|
+
"match": "^\\s*(?:(\\})\\s*)?(alt)\\s+(?:(\"(?:[^\"\\\\]|\\\\.)*\")|([A-Za-z_][A-Za-z0-9_]*))\\s+(when)\\b",
|
|
54
|
+
"captures": {
|
|
55
|
+
"1": {
|
|
56
|
+
"name": "punctuation.section.block.end.proschi"
|
|
57
|
+
},
|
|
58
|
+
"2": {
|
|
59
|
+
"name": "keyword.control.proschi"
|
|
60
|
+
},
|
|
61
|
+
"3": {
|
|
62
|
+
"patterns": [
|
|
63
|
+
{
|
|
64
|
+
"include": "#string"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"4": {
|
|
69
|
+
"name": "variable.other.node.proschi"
|
|
70
|
+
},
|
|
71
|
+
"5": {
|
|
72
|
+
"name": "keyword.control.proschi"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"import": {
|
|
77
|
+
"comment": "import \"path\": the path is a link to another .proschi file.",
|
|
78
|
+
"match": "^\\s*(import)\\b(?:\\s+(\")([^\"]*)(\")?)?",
|
|
79
|
+
"captures": {
|
|
80
|
+
"1": {
|
|
81
|
+
"name": "keyword.control.import.proschi"
|
|
82
|
+
},
|
|
83
|
+
"2": {
|
|
84
|
+
"name": "punctuation.definition.string.begin.proschi"
|
|
85
|
+
},
|
|
86
|
+
"3": {
|
|
87
|
+
"name": "string.quoted.double.path.proschi"
|
|
88
|
+
},
|
|
89
|
+
"4": {
|
|
90
|
+
"name": "punctuation.definition.string.end.proschi"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
45
94
|
"keyword": {
|
|
46
95
|
"comment": "Statement keywords start a line, or follow } as in `} alt \"Next\" {`.",
|
|
47
96
|
"match": "^\\s*(?:(\\})\\s*)?(title|group|usecase|par|alt)\\b",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proschi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Command-line checker and language server for Proschi architecture diagrams",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist/cli.cjs",
|
|
26
26
|
"dist/server.cjs",
|
|
27
|
+
"dist/render.cjs",
|
|
27
28
|
"grammar",
|
|
28
29
|
"schema",
|
|
29
30
|
"README.md",
|
|
@@ -41,16 +42,25 @@
|
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@types/node": "^24.19.1",
|
|
45
|
+
"@types/react": "^19.3.0",
|
|
46
|
+
"@types/react-dom": "^19.3.0",
|
|
44
47
|
"@types/vscode": "~1.91.0",
|
|
45
48
|
"@vscode/vsce": "^4.0.0",
|
|
46
49
|
"ajv": "^8.20.0",
|
|
50
|
+
"elkjs": "^0.10.2",
|
|
47
51
|
"esbuild": "^0.28.2",
|
|
52
|
+
"fast-xml-parser": "^5.11.2",
|
|
53
|
+
"lucide-react": "^0.454.0",
|
|
54
|
+
"react": "^19.3.0",
|
|
55
|
+
"react-dom": "^19.3.0",
|
|
56
|
+
"react-icons": "5.5.0",
|
|
48
57
|
"typescript": "~5.9.3",
|
|
49
58
|
"vitest": "^3.2.7",
|
|
50
59
|
"vscode-languageclient": "^10.1.2",
|
|
51
60
|
"vscode-languageserver": "^10.1.2",
|
|
52
61
|
"vscode-languageserver-textdocument": "^1.0.15",
|
|
53
62
|
"vscode-oniguruma": "^2.0.1",
|
|
54
|
-
"vscode-textmate": "^9.3.2"
|
|
63
|
+
"vscode-textmate": "^9.3.2",
|
|
64
|
+
"yaml": "^2.9.1"
|
|
55
65
|
}
|
|
56
66
|
}
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
"items": {
|
|
14
14
|
"$ref": "#/$defs/diagnostic"
|
|
15
15
|
}
|
|
16
|
+
},
|
|
17
|
+
"imports": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "#/$defs/import"
|
|
21
|
+
},
|
|
22
|
+
"description": "Every `import` statement read, in any file; left out when there are none."
|
|
16
23
|
}
|
|
17
24
|
},
|
|
18
25
|
"required": [
|
|
@@ -36,6 +43,10 @@
|
|
|
36
43
|
"length": {
|
|
37
44
|
"type": "integer",
|
|
38
45
|
"minimum": 0
|
|
46
|
+
},
|
|
47
|
+
"file": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "The imported file this is in; left out for the parsed file itself."
|
|
39
50
|
}
|
|
40
51
|
},
|
|
41
52
|
"required": [
|
|
@@ -68,6 +79,10 @@
|
|
|
68
79
|
"length": {
|
|
69
80
|
"type": "integer",
|
|
70
81
|
"minimum": 0
|
|
82
|
+
},
|
|
83
|
+
"file": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "The imported file this is in; left out for the parsed file itself."
|
|
71
86
|
}
|
|
72
87
|
},
|
|
73
88
|
"required": [
|
|
@@ -79,6 +94,27 @@
|
|
|
79
94
|
],
|
|
80
95
|
"additionalProperties": false
|
|
81
96
|
},
|
|
97
|
+
"import": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"path": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "The path as written."
|
|
103
|
+
},
|
|
104
|
+
"resolved": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "The file it resolved to; left out when it could not be found."
|
|
107
|
+
},
|
|
108
|
+
"loc": {
|
|
109
|
+
"$ref": "#/$defs/loc"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"path",
|
|
114
|
+
"loc"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
82
118
|
"diagram": {
|
|
83
119
|
"type": "object",
|
|
84
120
|
"properties": {
|
|
@@ -347,6 +383,10 @@
|
|
|
347
383
|
"type": "string",
|
|
348
384
|
"description": "`METHOD /path` of the first step, if it is an HTTP call."
|
|
349
385
|
},
|
|
386
|
+
"endpointGroup": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"description": "The endpoint with concrete ids folded into a `{param}` path template; use cases that share it hit the same endpoint."
|
|
389
|
+
},
|
|
350
390
|
"steps": {
|
|
351
391
|
"type": "array",
|
|
352
392
|
"items": {
|
|
@@ -389,6 +429,10 @@
|
|
|
389
429
|
"error"
|
|
390
430
|
]
|
|
391
431
|
},
|
|
432
|
+
"condition": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"description": "`when \"…\"` conditions of the branches on the scenario's path, joined with ' · '."
|
|
435
|
+
},
|
|
392
436
|
"steps": {
|
|
393
437
|
"type": "array",
|
|
394
438
|
"items": {
|
|
@@ -490,6 +534,14 @@
|
|
|
490
534
|
"failed": {
|
|
491
535
|
"type": "boolean",
|
|
492
536
|
"description": "Written `a -x b`: the call never got an answer."
|
|
537
|
+
},
|
|
538
|
+
"loc": {
|
|
539
|
+
"$ref": "#/$defs/loc",
|
|
540
|
+
"description": "The request line."
|
|
541
|
+
},
|
|
542
|
+
"responseLoc": {
|
|
543
|
+
"$ref": "#/$defs/loc",
|
|
544
|
+
"description": "The `-->` line that answered the request."
|
|
493
545
|
}
|
|
494
546
|
},
|
|
495
547
|
"required": [
|
|
@@ -504,7 +556,8 @@
|
|
|
504
556
|
"responseFormat",
|
|
505
557
|
"executionType",
|
|
506
558
|
"isParallel",
|
|
507
|
-
"isConditional"
|
|
559
|
+
"isConditional",
|
|
560
|
+
"loc"
|
|
508
561
|
],
|
|
509
562
|
"additionalProperties": false
|
|
510
563
|
}
|