@appthreat/atom 2.0.18 → 2.0.20
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/astgen.js +33 -20
- package/package.json +5 -5
- package/plugins/bin/atom +1 -1
- package/plugins/bin/atom.bat +1 -1
- package/plugins/composer/installed.php +6 -6
- package/plugins/lib/{com.github.javaparser.javaparser-core-3.26.1.jar → com.github.javaparser.javaparser-core-3.26.2.jar} +0 -0
- package/plugins/lib/{com.github.javaparser.javaparser-symbol-solver-core-3.26.1.jar → com.github.javaparser.javaparser-symbol-solver-core-3.26.2.jar} +0 -0
- package/plugins/lib/com.google.errorprone.error_prone_annotations-2.28.0.jar +0 -0
- package/plugins/lib/com.google.guava.guava-33.3.0-jre.jar +0 -0
- package/plugins/lib/com.michaelpollmeier.versionsort-1.0.13.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.0.20-classpath.jar +0 -0
- package/plugins/lib/{io.appthreat.atom-2.0.18.jar → io.appthreat.atom-2.0.20.jar} +0 -0
- package/plugins/lib/{io.appthreat.c2cpg_3-2.1.5.jar → io.appthreat.c2cpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.dataflowengineoss_3-2.1.5.jar → io.appthreat.dataflowengineoss_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.javasrc2cpg_3-2.1.5.jar → io.appthreat.javasrc2cpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.jimple2cpg_3-2.1.5.jar → io.appthreat.jimple2cpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.jssrc2cpg_3-2.1.5.jar → io.appthreat.jssrc2cpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.php2atom_3-2.1.5.jar → io.appthreat.php2atom_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.pysrc2cpg_3-2.1.5.jar → io.appthreat.pysrc2cpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.semanticcpg_3-2.1.5.jar → io.appthreat.semanticcpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.appthreat.x2cpg_3-2.1.5.jar → io.appthreat.x2cpg_3-2.1.8.jar} +0 -0
- package/plugins/lib/{io.circe.circe-core_3-0.14.9.jar → io.circe.circe-core_3-0.14.10.jar} +0 -0
- package/plugins/lib/{io.circe.circe-generic_3-0.14.9.jar → io.circe.circe-generic_3-0.14.10.jar} +0 -0
- package/plugins/lib/{io.circe.circe-jawn_3-0.14.9.jar → io.circe.circe-jawn_3-0.14.10.jar} +0 -0
- package/plugins/lib/{io.circe.circe-numbers_3-0.14.9.jar → io.circe.circe-numbers_3-0.14.10.jar} +0 -0
- package/plugins/lib/{io.circe.circe-parser_3-0.14.9.jar → io.circe.circe-parser_3-0.14.10.jar} +0 -0
- package/plugins/lib/net.java.dev.jna.jna-5.14.0.jar +0 -0
- package/plugins/lib/net.java.dev.jna.jna-platform-5.14.0.jar +0 -0
- package/plugins/lib/{org.antlr.antlr4-runtime-4.13.1.jar → org.antlr.antlr4-runtime-4.13.2.jar} +0 -0
- package/plugins/lib/{org.checkerframework.checker-qual-3.42.0.jar → org.checkerframework.checker-qual-3.43.0.jar} +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.filesystem-1.11.0.jar +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.core.resources-3.20.200.jar → org.eclipse.platform.org.eclipse.core.resources-3.21.0.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.osgi-3.20.0.jar → org.eclipse.platform.org.eclipse.osgi-3.21.0.jar} +0 -0
- package/plugins/lib/com.fasterxml.jackson.core.jackson-annotations-2.17.2.jar +0 -0
- package/plugins/lib/com.fasterxml.jackson.core.jackson-core-2.17.2.jar +0 -0
- package/plugins/lib/com.fasterxml.jackson.core.jackson-databind-2.17.2.jar +0 -0
- package/plugins/lib/com.google.errorprone.error_prone_annotations-2.26.1.jar +0 -0
- package/plugins/lib/com.google.guava.guava-33.2.1-jre.jar +0 -0
- package/plugins/lib/com.michaelpollmeier.versionsort-1.0.11.jar +0 -0
- package/plugins/lib/dev.scalapy.scalapy-core_3-0.5.3.jar +0 -0
- package/plugins/lib/dev.scalapy.scalapy-macros_3-0.5.3.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.0.18-classpath.jar +0 -0
- package/plugins/lib/net.java.dev.jna.jna-5.11.0.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.filesystem-1.10.400.jar +0 -0
- package/plugins/lib/org.gradle.gradle-tooling-api-8.9.jar +0 -0
package/astgen.js
CHANGED
|
@@ -62,14 +62,13 @@ const babelSafeParserOptions = {
|
|
|
62
62
|
*/
|
|
63
63
|
const getAllSrcJSAndTSFiles = (src) =>
|
|
64
64
|
Promise.all([
|
|
65
|
-
getAllFiles(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
getAllFiles(src, ".svelte")
|
|
65
|
+
getAllFiles(
|
|
66
|
+
src,
|
|
67
|
+
undefined,
|
|
68
|
+
undefined,
|
|
69
|
+
undefined,
|
|
70
|
+
new RegExp("\\.(js|jsx|cjs|mjs|ts|tsx|vue|svelte)$")
|
|
71
|
+
)
|
|
73
72
|
]);
|
|
74
73
|
|
|
75
74
|
/**
|
|
@@ -100,6 +99,15 @@ const vueBindRegex = /(:\[)([\s\S]*?)(\])/gi;
|
|
|
100
99
|
const vuePropRegex = /\s([.:@])([a-zA-Z]*?=)/gi;
|
|
101
100
|
const vueOpenImgTag = /(<img)((?!>)[\s\S]+?)( [^/]>)/gi;
|
|
102
101
|
|
|
102
|
+
const TSC_FLAGS =
|
|
103
|
+
tsc.TypeFormatFlags.NoTruncation |
|
|
104
|
+
tsc.TypeFormatFlags.InTypeAlias |
|
|
105
|
+
tsc.TypeFormatFlags.WriteArrayAsGenericType |
|
|
106
|
+
tsc.TypeFormatFlags.GenerateNamesForShadowedTypeParams |
|
|
107
|
+
tsc.TypeFormatFlags.WriteTypeArgumentsOfSignature |
|
|
108
|
+
tsc.TypeFormatFlags.UseFullyQualifiedType |
|
|
109
|
+
tsc.TypeFormatFlags.NoTypeReduction;
|
|
110
|
+
|
|
103
111
|
/**
|
|
104
112
|
* Convert a single vue file to AST
|
|
105
113
|
*/
|
|
@@ -132,6 +140,10 @@ function createTsc(srcFiles) {
|
|
|
132
140
|
const program = tsc.createProgram(srcFiles, {
|
|
133
141
|
target: tsc.ScriptTarget.ES2020,
|
|
134
142
|
module: tsc.ModuleKind.CommonJS,
|
|
143
|
+
allowImportingTsExtensions: false,
|
|
144
|
+
allowArbitraryExtensions: false,
|
|
145
|
+
allowSyntheticDefaultImports: true,
|
|
146
|
+
allowUmdGlobalAccess: true,
|
|
135
147
|
allowJs: true,
|
|
136
148
|
allowUnreachableCode: true,
|
|
137
149
|
allowUnusedLabels: true,
|
|
@@ -150,10 +162,7 @@ function createTsc(srcFiles) {
|
|
|
150
162
|
|
|
151
163
|
const safeTypeToString = (node) => {
|
|
152
164
|
try {
|
|
153
|
-
return typeChecker.typeToString(
|
|
154
|
-
node,
|
|
155
|
-
tsc.TypeFormatFlags.NoTruncation | tsc.TypeFormatFlags.InTypeAlias
|
|
156
|
-
);
|
|
165
|
+
return typeChecker.typeToString(node, TSC_FLAGS);
|
|
157
166
|
} catch (err) {
|
|
158
167
|
return "any";
|
|
159
168
|
}
|
|
@@ -161,11 +170,7 @@ function createTsc(srcFiles) {
|
|
|
161
170
|
|
|
162
171
|
const safeTypeWithContextToString = (node, context) => {
|
|
163
172
|
try {
|
|
164
|
-
return typeChecker.typeToString(
|
|
165
|
-
node,
|
|
166
|
-
context,
|
|
167
|
-
tsc.TypeFormatFlags.NoTruncation | tsc.TypeFormatFlags.InTypeAlias
|
|
168
|
-
);
|
|
173
|
+
return typeChecker.typeToString(node, context, TSC_FLAGS);
|
|
169
174
|
} catch (err) {
|
|
170
175
|
return "any";
|
|
171
176
|
}
|
|
@@ -176,10 +181,18 @@ function createTsc(srcFiles) {
|
|
|
176
181
|
if (
|
|
177
182
|
tsc.isSetAccessor(node) ||
|
|
178
183
|
tsc.isGetAccessor(node) ||
|
|
184
|
+
tsc.isGetAccessorDeclaration(node) ||
|
|
185
|
+
tsc.isCallSignatureDeclaration(node) ||
|
|
186
|
+
tsc.isIndexSignatureDeclaration(node) ||
|
|
187
|
+
tsc.isClassStaticBlockDeclaration(node) ||
|
|
179
188
|
tsc.isConstructSignatureDeclaration(node) ||
|
|
180
189
|
tsc.isMethodDeclaration(node) ||
|
|
181
190
|
tsc.isFunctionDeclaration(node) ||
|
|
182
|
-
tsc.isConstructorDeclaration(node)
|
|
191
|
+
tsc.isConstructorDeclaration(node) ||
|
|
192
|
+
tsc.isTypeAliasDeclaration(node) ||
|
|
193
|
+
tsc.isEnumDeclaration(node) ||
|
|
194
|
+
tsc.isNamespaceExportDeclaration(node) ||
|
|
195
|
+
tsc.isImportEqualsDeclaration(node)
|
|
183
196
|
) {
|
|
184
197
|
const signature = typeChecker.getSignatureFromDeclaration(node);
|
|
185
198
|
const returnType = typeChecker.getReturnTypeOfSignature(signature);
|
|
@@ -204,8 +217,9 @@ function createTsc(srcFiles) {
|
|
|
204
217
|
node
|
|
205
218
|
);
|
|
206
219
|
}
|
|
207
|
-
if (!["any", "unknown", "any[]", "unknown[]"].includes(typeStr))
|
|
220
|
+
if (!["any", "unknown", "any[]", "unknown[]"].includes(typeStr)) {
|
|
208
221
|
seenTypes.set(node.getStart(), typeStr);
|
|
222
|
+
}
|
|
209
223
|
tsc.forEachChild(node, addType);
|
|
210
224
|
};
|
|
211
225
|
|
|
@@ -232,7 +246,6 @@ const createJSAst = async (options) => {
|
|
|
232
246
|
if (options.tsTypes) {
|
|
233
247
|
ts = createTsc(srcFiles);
|
|
234
248
|
}
|
|
235
|
-
|
|
236
249
|
for (const file of srcFiles) {
|
|
237
250
|
try {
|
|
238
251
|
const ast = fileToJsAst(file);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appthreat/atom",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"description": "Create atom (⚛) representation for your application, packages and libraries",
|
|
5
5
|
"exports": "./index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/parser": "^7.25.6",
|
|
13
|
-
"typescript": "^5.
|
|
13
|
+
"typescript": "^5.6.2",
|
|
14
14
|
"yargs": "^17.7.2"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"eslint": "8.57.0"
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
|
-
"atom": "
|
|
21
|
-
"astgen": "
|
|
22
|
-
"phpastgen": "
|
|
20
|
+
"atom": "index.js",
|
|
21
|
+
"astgen": "astgen.js",
|
|
22
|
+
"phpastgen": "phpastgen.js"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=16.0.0"
|
package/plugins/bin/atom
CHANGED
|
@@ -360,7 +360,7 @@ declare -r lib_dir="$(realpath "${app_home}/../lib")"
|
|
|
360
360
|
declare -a app_mainclass=('io.appthreat.atom.Atom')
|
|
361
361
|
|
|
362
362
|
declare -r script_conf_file="${app_home}/../conf/application.ini"
|
|
363
|
-
declare -r app_classpath="$lib_dir/io.appthreat.atom-2.0.
|
|
363
|
+
declare -r app_classpath="$lib_dir/io.appthreat.atom-2.0.20-classpath.jar"
|
|
364
364
|
|
|
365
365
|
# java_cmd is overrode in process_args when -java-home is used
|
|
366
366
|
declare java_cmd=$(get_java_cmd)
|
package/plugins/bin/atom.bat
CHANGED
|
@@ -40,7 +40,7 @@ rem "-J" is stripped, "-D" is left as is, and everything is appended to JAVA_OPT
|
|
|
40
40
|
set _JAVA_PARAMS=
|
|
41
41
|
set _APP_ARGS=
|
|
42
42
|
|
|
43
|
-
set "APP_CLASSPATH=%APP_LIB_DIR%\io.appthreat.atom-2.0.
|
|
43
|
+
set "APP_CLASSPATH=%APP_LIB_DIR%\io.appthreat.atom-2.0.20-classpath.jar"
|
|
44
44
|
set "APP_MAIN_CLASS=io.appthreat.atom.Atom"
|
|
45
45
|
set "SCRIPT_CONF_FILE=%APP_HOME%\conf\application.ini"
|
|
46
46
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?php return array(
|
|
2
2
|
'root' => array(
|
|
3
3
|
'name' => '__root__',
|
|
4
|
-
'pretty_version' => 'v2.0.
|
|
5
|
-
'version' => '2.0.
|
|
6
|
-
'reference' => '
|
|
4
|
+
'pretty_version' => 'v2.0.20',
|
|
5
|
+
'version' => '2.0.20.0',
|
|
6
|
+
'reference' => '7a3b78a0e37f84fa8ca069367cb665896b024ccc',
|
|
7
7
|
'type' => 'library',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
),
|
|
12
12
|
'versions' => array(
|
|
13
13
|
'__root__' => array(
|
|
14
|
-
'pretty_version' => 'v2.0.
|
|
15
|
-
'version' => '2.0.
|
|
16
|
-
'reference' => '
|
|
14
|
+
'pretty_version' => 'v2.0.20',
|
|
15
|
+
'version' => '2.0.20.0',
|
|
16
|
+
'reference' => '7a3b78a0e37f84fa8ca069367cb665896b024ccc',
|
|
17
17
|
'type' => 'library',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
index 638d625..1806759 100644
|
|
|
Binary file
|
|
index b42e3b7..1903106 100644
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
index 41b2f3d..aa5a602 100644
|
|
|
Binary file
|
|
index 8bfcf09..6ce36e8 100644
|
|
|
Binary file
|
|
index 6b86c6b..cc1a76e 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.javasrc2cpg_3-2.1.5.jar → io.appthreat.javasrc2cpg_3-2.1.8.jar}
RENAMED
|
index 36b34d1..d44da38 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.jimple2cpg_3-2.1.5.jar → io.appthreat.jimple2cpg_3-2.1.8.jar}
RENAMED
|
index 63ea00c..3c19de2 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.jssrc2cpg_3-2.1.5.jar → io.appthreat.jssrc2cpg_3-2.1.8.jar}
RENAMED
|
index 9dc62ef..d7fd121 100644
|
|
|
Binary file
|
|
index e49e63e..e273710 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.pysrc2cpg_3-2.1.5.jar → io.appthreat.pysrc2cpg_3-2.1.8.jar}
RENAMED
|
index 2631533..334a4ae 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.semanticcpg_3-2.1.5.jar → io.appthreat.semanticcpg_3-2.1.8.jar}
RENAMED
|
index adf05f6..136431c 100644
|
|
|
Binary file
|
|
index 4a9173d..92a7409 100644
|
|
|
Binary file
|
|
index df92480..b215ec6 100644
|
|
|
Binary file
|
package/plugins/lib/{io.circe.circe-generic_3-0.14.9.jar → io.circe.circe-generic_3-0.14.10.jar}
RENAMED
|
index e2779dc..e18f000 100644
|
|
|
Binary file
|
|
index 56c07e6..b1f0eb3 100644
|
|
|
Binary file
|
package/plugins/lib/{io.circe.circe-numbers_3-0.14.9.jar → io.circe.circe-numbers_3-0.14.10.jar}
RENAMED
|
index 38c1c36..aac65b3 100644
|
|
|
Binary file
|
package/plugins/lib/{io.circe.circe-parser_3-0.14.9.jar → io.circe.circe-parser_3-0.14.10.jar}
RENAMED
|
index e114843..db5a0d4 100644
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/plugins/lib/{org.antlr.antlr4-runtime-4.13.1.jar → org.antlr.antlr4-runtime-4.13.2.jar}
RENAMED
|
index cff4198..350c1d0 100644
|
|
|
Binary file
|
|
index ebb14d6..cbb34f8 100644
|
|
|
Binary file
|
|
index 32c23ff..ca21853 100644
|
|
|
Binary file
|
|
index 3494039..e14b6a4 100644
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|