Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ typings/

# Misc
.DS_Store
.*.swp

dist/
tmp/
Expand Down
5 changes: 5 additions & 0 deletions extractors/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Files to ignore under this "extractors" directory

## Ignore the debug directory
debug/

45 changes: 45 additions & 0 deletions extractors/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# codeql-sap-js:extractors/README.md

## CodeQL CDS Extractor : Flowchart

The following flowchart shows the flow of execution for the current implementation of the extractor.

```mermaid
flowchart TD
COM["`export _build_cmd=<br>$(pwd)/extractors/
javascript/tools/
pre-finalize.sh`"]
DCR[codeql database create<br>--command=$_build_cmd<br>--language=javascript<br>--search-path=./extractors/<br>--<br>/path/to/database]
DB@{ shape: cyl, label: "/path/to/database" }
DINIT[codeql database init]
CRE[codeql resolve extractor]
DTRAC[codeql database<br>trace-command]
SPF[[pre-finalize.sh]]
JSE[[javascript extractor]]
SIF[[index-files.sh]]
DIDX[codeql database index-files<br> --language=cds<br>--include-extension=.cds]
CC[[\`cds\` compiler]]
CDJ([.cds.json files])
TF([CodeQL TRAP files])
DBF[codeql database finalize<br> -- /path/to/database]

COM ==> DCR
DCR ==> |run internal CLI<br>plumbing command| DINIT
DINIT ----> |--language=javascript| CRE
CRE -..-> |/extractor/path/javascript| DINIT
DINIT -.initialize database.-> DB

DINIT ==> |run the<br>javascript extractor| JSE
SPF ==> |run the cds extractor| DIDX
JSE -.-> |extract javascript files:<br>_.html, .js, .json, .ts_| DB
DTRAC ==> |run the build --command| SPF
JSE ==> |run autobuild within<br>the javascript extractor| DTRAC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the autobuilder extracts the JavaScript files. The pre-finalize.sh is not run by the autobuilder, so I think this node is in the wrong place.

DIDX ==> |script discovered<br>via --search-path| SIF
SIF ==> |call the cds compiler| CC
CC ==> |compile .cds files to<br>create .cds.json files| CDJ
CDJ -.-> |extract .cds.json files<br>to database| DB

CDJ ==> |generate .trap files| TF
TF ==> |finalize database once<br>pre-finalize completes| DBF
DBF ==> |import TRAP files,<br>then cleanup| DB
```
3 changes: 3 additions & 0 deletions javascript/frameworks/cap/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore package-lock.json files for tests.
package-lock.json

Loading