Skip to content

Commit

Permalink
Retain code for js route detection
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Aug 21, 2023
1 parent f1bbf1f commit 4dc5f8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/io/appthreat/atom/slicing/UsageSlicing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ object UsageSlicing {
if (baseCallCode.contains(" ")) {
baseCallCode = baseCallCode.split(" ").last
}
// Retain the full code for route detection purposes
if (language.get == Languages.JSSRC && (baseCallCode.startsWith("route") || baseCallCode.startsWith("app"))) {
baseCallCode = baseCall.code.replaceAll("\n", "").replaceAll(" ", "")
}
resolvedMethod = Option(baseCallCode)
}
Option(
Expand Down
4 changes: 2 additions & 2 deletions wrapper/nodejs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wrapper/nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@appthreat/atom",
"version": "1.1.2",
"version": "1.1.3",
"description": "Create atom (⚛) representation for your application, packages and libraries",
"exports": "./index.js",
"type": "module",
Expand Down

0 comments on commit 4dc5f8f

Please sign in to comment.