Skip to content

Commit 86b5572

Browse files
committed
Update CDS extractor flowchart diagram
Updates the mermaid flowchart for the CDS extractor in order to reflect recent changes to how the CDS extractor actually works.
1 parent 5aa2d54 commit 86b5572

File tree

1 file changed

+32
-18
lines changed

1 file changed

+32
-18
lines changed

extractors/README.md

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,20 @@ pre-finalize.sh`"]
3030
JSE[[javascript extractor]]
3131
DTRAC[codeql database<br>trace-command]
3232
SPF[[pre-finalize.sh]]
33-
DIDX[codeql database index-files<br> --language=cds<br>--include-extension=.cds]
34-
SIF[[index-files.sh]]
35-
SIT[[index-files.ts/js]]
36-
NPM[[npm install & build]]
37-
DETS[[Determine CDS command]]
38-
FIND[[Find package.json dirs]]
39-
INST[[Install dependencies]]
40-
CC[[cds compiler]]
33+
ABCMD[[autobuild.sh/cmd]]
34+
ABT[[cds-extractor.ts/js]]
35+
ENV[[setup & validate<br>environment]]
36+
PDG[[build project<br>dependency graph]]
37+
INSTC[[install dependencies<br>with caching]]
38+
PROC[[process CDS files<br>to JSON]]
39+
PMAP[[project-aware<br>dependency resolution]]
40+
FIND[[find project for<br>CDS file]]
41+
CDCMD[[determine CDS<br>command for project]]
42+
COMP[[compile CDS<br>to JSON]]
4143
CDJ([.cds.json files])
44+
FILT[[configure LGTM<br>index filters]]
4245
JSA[[javascript extractor<br>autobuild script]]
46+
DIAG[[add compilation<br>diagnostics]]
4347
TF([CodeQL TRAP files])
4448
DBF[codeql database finalize<br> -- /path/to/database]
4549
@@ -54,20 +58,30 @@ pre-finalize.sh`"]
5458
JSE ==> |run autobuild within<br>the javascript extractor| DTRAC
5559
5660
DTRAC ==> |run the build --command| SPF
57-
SPF ==> |run codeql index-files<br>for CDS files| DIDX
58-
DIDX ==> |invoke script via<br>--search-path| SIF
59-
SIF ==> |runs TypeScript version<br>after npm install| NPM
60-
NPM ==> |executes compiled<br>index-files.js| SIT
61+
SPF ==> |run autobuilder<br>for CDS files| ABCMD
62+
ABCMD ==> |runs TypeScript version<br>of CDS extractor| ABT
6163
62-
SIT ==> |finds project directories<br>with package.json| FIND
63-
FIND ==> |install CDS dependencies<br>in project directories| INST
64-
SIT ==> |determines which<br>cds command to use| DETS
65-
DETS ==> |processes each CDS file| CC
64+
ABT ==> |setup and validate<br>environment first| ENV
65+
ABT ==> |build project dependency<br>graph for source root| PDG
66+
PDG ==> |analyze CDS projects<br>structure & relationships| PMAP
67+
68+
ABT ==> |efficiently install<br>required dependencies| INSTC
69+
INSTC ==> |use cached approach for<br>dependency installation| PMAP
70+
71+
ABT ==> |process each CDS file<br>to generate JSON files| PROC
72+
PROC ==> |find which project<br>contains this CDS file| FIND
73+
FIND ==> |uses project-aware<br>dependency resolution| PMAP
74+
FIND ==> |determine appropriate<br>CDS command for project| CDCMD
75+
76+
CDCMD ==> |compile CDS file to JSON<br>with project context| COMP
77+
COMP ==> |generate JSON representation<br>with project awareness| CDJ
78+
COMP --x |if compilation fails,<br>report diagnostics| DIAG
79+
DIAG -.-> |diagnostics stored<br>in database| DB
6680
67-
CC ==> |compile .cds files to<br>create .cds.json files| CDJ
6881
CDJ -.-> |stored in same location<br>as original .cds files| DB
6982
70-
SIT ==> |configures extraction<br>filters for JSON files| JSA
83+
ABT ==> |configure extraction<br>filters for JSON files| FILT
84+
ABT ==> |run JavaScript extractor<br>to process JSON files| JSA
7185
JSA ==> |processes .cds.json files<br>via javascript extractor| CDJ
7286
7387
CDJ ==> |javascript extractor<br>generates TRAP files| TF

0 commit comments

Comments
 (0)