@appthreat/atom 2.3.0 → 2.4.1
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/package.json +1 -1
- package/packages/atom-parsetools/astgen.js +67 -17
- package/plugins/bin/atom +1 -1
- package/plugins/bin/atom.bat +1 -1
- package/plugins/lib/com.lihaoyi.ujson_3-4.3.2.jar +0 -0
- package/plugins/lib/com.lihaoyi.upack_3-4.3.2.jar +0 -0
- package/plugins/lib/{com.lihaoyi.upickle-core_3-4.2.1.jar → com.lihaoyi.upickle-core_3-4.3.2.jar} +0 -0
- package/plugins/lib/com.lihaoyi.upickle-implicits_3-4.3.2.jar +0 -0
- package/plugins/lib/com.lihaoyi.upickle_3-4.3.2.jar +0 -0
- package/plugins/lib/{com.typesafe.config-1.4.4.jar → com.typesafe.config-1.4.5.jar} +0 -0
- package/plugins/lib/io.appthreat.atom-2.4.1-classpath.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.4.1.jar +0 -0
- package/plugins/lib/{io.appthreat.c2cpg_3-2.4.7.jar → io.appthreat.c2cpg_3-2.5.3.jar} +0 -0
- package/plugins/lib/{io.appthreat.cpg2-domain-classes_3-1.0.1.jar → io.appthreat.cpg2-domain-classes_3-2.0.0.jar} +0 -0
- package/plugins/lib/{io.appthreat.cpg2-protos_3-1.0.1.jar → io.appthreat.cpg2-protos_3-2.0.0.jar} +0 -0
- package/plugins/lib/io.appthreat.cpg2_3-2.0.0.jar +0 -0
- package/plugins/lib/{io.appthreat.dataflowengineoss_3-2.4.7.jar → io.appthreat.dataflowengineoss_3-2.5.3.jar} +0 -0
- package/plugins/lib/{io.appthreat.javasrc2cpg_3-2.4.7.jar → io.appthreat.javasrc2cpg_3-2.5.3.jar} +0 -0
- package/plugins/lib/io.appthreat.jimple2cpg_3-2.5.3.jar +0 -0
- package/plugins/lib/{io.appthreat.jssrc2cpg_3-2.4.7.jar → io.appthreat.jssrc2cpg_3-2.5.3.jar} +0 -0
- package/plugins/lib/io.appthreat.odb2-core_3-2.0.0.jar +0 -0
- package/plugins/lib/{io.appthreat.odb2-formats_3-1.0.1.jar → io.appthreat.odb2-formats_3-2.0.0.jar} +0 -0
- package/plugins/lib/io.appthreat.odb2-traversal_3-2.0.0.jar +0 -0
- package/plugins/lib/{io.appthreat.php2atom_3-2.4.7.jar → io.appthreat.php2atom_3-2.5.3.jar} +0 -0
- package/plugins/lib/{io.appthreat.pysrc2cpg_3-2.4.7.jar → io.appthreat.pysrc2cpg_3-2.5.3.jar} +0 -0
- package/plugins/lib/{io.appthreat.ruby2atom_3-2.4.7.jar → io.appthreat.ruby2atom_3-2.5.3.jar} +0 -0
- package/plugins/lib/{io.appthreat.semanticcpg_3-2.4.7.jar → io.appthreat.semanticcpg_3-2.5.3.jar} +0 -0
- package/plugins/lib/{io.appthreat.x2cpg_3-2.4.7.jar → io.appthreat.x2cpg_3-2.5.3.jar} +0 -0
- package/plugins/lib/{org.eclipse.cdt.core_9.1.0.202505200054.jar → org.eclipse.cdt.core_9.2.100.202507101054.jar} +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.contenttype-3.9.700.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.expressions-3.9.500.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.filesystem-1.11.300.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.jobs-3.15.700.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.resources-3.23.0.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.runtime-3.34.0.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.equinox.app-1.7.500.jar +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.equinox.common-3.20.100.jar → org.eclipse.platform.org.eclipse.equinox.common-3.20.200.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.equinox.preferences-3.11.400.jar → org.eclipse.platform.org.eclipse.equinox.preferences-3.12.0.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.equinox.registry-3.12.400.jar → org.eclipse.platform.org.eclipse.equinox.registry-3.12.500.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.osgi-3.23.100.jar → org.eclipse.platform.org.eclipse.osgi-3.23.200.jar} +0 -0
- package/plugins/lib/{org.projectlombok.lombok-1.18.38.jar → org.projectlombok.lombok-1.18.40.jar} +0 -0
- package/plugins/lib/org.scala-lang.scala3-library_3-3.7.3.jar +0 -0
- package/plugins/lib/com.lihaoyi.ujson_3-4.2.1.jar +0 -0
- package/plugins/lib/com.lihaoyi.upack_3-4.2.1.jar +0 -0
- package/plugins/lib/com.lihaoyi.upickle-implicits_3-4.2.1.jar +0 -0
- package/plugins/lib/com.lihaoyi.upickle_3-4.2.1.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.3.0-classpath.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.cpg2_3-1.0.1.jar +0 -0
- package/plugins/lib/io.appthreat.jimple2cpg_3-2.4.7.jar +0 -0
- package/plugins/lib/io.appthreat.odb2-core_3-1.0.1.jar +0 -0
- package/plugins/lib/io.appthreat.odb2-traversal_3-1.0.1.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.contenttype-3.9.600.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.expressions-3.9.400.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.filesystem-1.11.200.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.jobs-3.15.600.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.resources-3.22.200.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.runtime-3.33.100.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.equinox.app-1.7.400.jar +0 -0
- package/plugins/lib/org.scala-lang.scala3-library_3-3.7.2.jar +0 -0
package/package.json
CHANGED
|
@@ -59,17 +59,53 @@ const babelSafeParserOptions = {
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Return paths to all (j|tsx?) files.
|
|
62
|
+
* Optionally includes specific bundled files from node_modules if:
|
|
63
|
+
* 1. ASTGEN_INCLUDE_NODE_MODULES_BUNDLES is "true", OR
|
|
64
|
+
* 2. ASTGEN_IGNORE_DIRS is non-empty and doesn't include "node_modules"
|
|
62
65
|
*/
|
|
63
|
-
const getAllSrcJSAndTSFiles = (src) =>
|
|
64
|
-
|
|
66
|
+
const getAllSrcJSAndTSFiles = (src) => {
|
|
67
|
+
const filePattern = "\\.(js|jsx|cjs|mjs|ts|tsx|vue|svelte|xsjs|xsjslib|ejs)$";
|
|
68
|
+
const bundledNodeModulesPattern =
|
|
69
|
+
"node_modules/.*\\.(bundle|dist|index|min|app)\\.(js|cjs|mjs)$";
|
|
70
|
+
|
|
71
|
+
// Step 1: Collect all JS/TS files EXCLUDING node_modules
|
|
72
|
+
const allFilesPromise = Promise.resolve(
|
|
65
73
|
getAllFiles(
|
|
66
74
|
src,
|
|
67
75
|
undefined,
|
|
68
76
|
undefined,
|
|
69
77
|
undefined,
|
|
70
|
-
new RegExp(
|
|
78
|
+
new RegExp(filePattern),
|
|
79
|
+
true // ignore node_modules
|
|
71
80
|
)
|
|
72
|
-
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
// Step 2: Check if we should include node_modules bundles
|
|
84
|
+
const shouldIncludeNodeModulesBundles =
|
|
85
|
+
process.env?.ASTGEN_INCLUDE_NODE_MODULES_BUNDLES === "true" ||
|
|
86
|
+
(process.env?.ASTGEN_IGNORE_DIRS &&
|
|
87
|
+
process.env.ASTGEN_IGNORE_DIRS.length > 0 &&
|
|
88
|
+
!process.env.ASTGEN_IGNORE_DIRS.toLowerCase().includes("node_modules"));
|
|
89
|
+
|
|
90
|
+
let bundledFilesPromise = Promise.resolve([]);
|
|
91
|
+
if (shouldIncludeNodeModulesBundles) {
|
|
92
|
+
bundledFilesPromise = Promise.resolve(
|
|
93
|
+
getAllFiles(
|
|
94
|
+
src,
|
|
95
|
+
undefined,
|
|
96
|
+
undefined,
|
|
97
|
+
undefined,
|
|
98
|
+
new RegExp(bundledNodeModulesPattern),
|
|
99
|
+
false // DO NOT ignore node_modules
|
|
100
|
+
)
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Step 3: Combine both lists
|
|
105
|
+
return Promise.all([allFilesPromise, bundledFilesPromise]).then(
|
|
106
|
+
([allFiles, bundledFiles]) => [...allFiles, ...bundledFiles]
|
|
107
|
+
);
|
|
108
|
+
};
|
|
73
109
|
|
|
74
110
|
/**
|
|
75
111
|
* Convert a single JS/TS file to AST
|
|
@@ -242,30 +278,44 @@ const createJSAst = async (options) => {
|
|
|
242
278
|
try {
|
|
243
279
|
const promiseMap = await getAllSrcJSAndTSFiles(options.src);
|
|
244
280
|
const srcFiles = promiseMap.flatMap((d) => d);
|
|
281
|
+
const CONCURRENCY_LIMIT = 10;
|
|
282
|
+
const chunks = [];
|
|
283
|
+
for (let i = 0; i < srcFiles.length; i += CONCURRENCY_LIMIT) {
|
|
284
|
+
chunks.push(srcFiles.slice(i, i + CONCURRENCY_LIMIT));
|
|
285
|
+
}
|
|
245
286
|
let ts;
|
|
246
287
|
if (options.tsTypes) {
|
|
247
|
-
|
|
288
|
+
const projectFiles = srcFiles.filter(
|
|
289
|
+
(file) => !file.includes("node_modules")
|
|
290
|
+
);
|
|
291
|
+
ts = createTsc(projectFiles);
|
|
248
292
|
}
|
|
249
|
-
for (const
|
|
293
|
+
for (const chunk of chunks) {
|
|
294
|
+
await Promise.all(chunk.map((file) => processFile(file, options, ts)));
|
|
295
|
+
}
|
|
296
|
+
} catch (err) {
|
|
297
|
+
console.error(err);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
const processFile = (file, options, ts) => {
|
|
302
|
+
try {
|
|
303
|
+
const ast = fileToJsAst(file);
|
|
304
|
+
writeAstFile(file, ast, options);
|
|
305
|
+
if (ts) {
|
|
250
306
|
try {
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
} catch (err) {
|
|
254
|
-
console.error(file, err.message);
|
|
255
|
-
}
|
|
256
|
-
if (ts) {
|
|
257
|
-
try {
|
|
258
|
-
const tsAst = ts.program.getSourceFile(file);
|
|
307
|
+
const tsAst = ts.program.getSourceFile(file);
|
|
308
|
+
if (tsAst) {
|
|
259
309
|
tsc.forEachChild(tsAst, ts.addType);
|
|
260
310
|
writeTypesFile(file, ts.seenTypes, options);
|
|
261
311
|
ts.seenTypes.clear();
|
|
262
|
-
} catch (err) {
|
|
263
|
-
console.warn("Retrieving types", file, ":", err.message);
|
|
264
312
|
}
|
|
313
|
+
} catch (err) {
|
|
314
|
+
console.warn("Retrieving types", file, ":", err.message);
|
|
265
315
|
}
|
|
266
316
|
}
|
|
267
317
|
} catch (err) {
|
|
268
|
-
console.error(err);
|
|
318
|
+
console.error(file, err.message);
|
|
269
319
|
}
|
|
270
320
|
};
|
|
271
321
|
|
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.
|
|
363
|
+
declare -r app_classpath="$lib_dir/io.appthreat.atom-2.4.1-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.
|
|
43
|
+
set "APP_CLASSPATH=%APP_LIB_DIR%\io.appthreat.atom-2.4.1-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
|
|
|
Binary file
|
|
Binary file
|
package/plugins/lib/{com.lihaoyi.upickle-core_3-4.2.1.jar → com.lihaoyi.upickle-core_3-4.3.2.jar}
RENAMED
|
index bd017b3..733e62a 100644
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
index 85e1808..b1e4075 100644
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
index 9f1f7da..857925d 100644
|
|
|
Binary file
|
|
index 602eca3..15d9ab5 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.cpg2-protos_3-1.0.1.jar → io.appthreat.cpg2-protos_3-2.0.0.jar}
RENAMED
|
index 367fba8..689172e 100644
|
|
|
Binary file
|
|
Binary file
|
|
index e905327..5532f36 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.javasrc2cpg_3-2.4.7.jar → io.appthreat.javasrc2cpg_3-2.5.3.jar}
RENAMED
|
index f117fbf..89d3c8c 100644
|
|
|
Binary file
|
|
Binary file
|
package/plugins/lib/{io.appthreat.jssrc2cpg_3-2.4.7.jar → io.appthreat.jssrc2cpg_3-2.5.3.jar}
RENAMED
|
index 5d5fc98..02a8147 100644
|
|
|
Binary file
|
|
Binary file
|
package/plugins/lib/{io.appthreat.odb2-formats_3-1.0.1.jar → io.appthreat.odb2-formats_3-2.0.0.jar}
RENAMED
|
index 045e818..75e6848 100644
|
|
|
Binary file
|
|
Binary file
|
|
index b3ea53c..1486408 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.pysrc2cpg_3-2.4.7.jar → io.appthreat.pysrc2cpg_3-2.5.3.jar}
RENAMED
|
index 5ea35ac..54a2862 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.ruby2atom_3-2.4.7.jar → io.appthreat.ruby2atom_3-2.5.3.jar}
RENAMED
|
index ae63c31..523a35b 100644
|
|
|
Binary file
|
package/plugins/lib/{io.appthreat.semanticcpg_3-2.4.7.jar → io.appthreat.semanticcpg_3-2.5.3.jar}
RENAMED
|
index 56d6131..730cd89 100644
|
|
|
Binary file
|
|
index 7f2a6b8..8cec9a5 100644
|
|
|
Binary file
|
|
index 1584507..4f34466 100644
|
|
|
Binary file
|
|
index 9de8224..b8b4236 100644
|
|
|
Binary file
|
|
index 0544451..65da48f 100644
|
|
|
Binary file
|
|
index b3f7ae5..9d0d3c4 100644
|
|
|
Binary file
|
|
index 836624a..24dfd1b 100644
|
|
|
Binary file
|
package/plugins/lib/{org.projectlombok.lombok-1.18.38.jar → org.projectlombok.lombok-1.18.40.jar}
RENAMED
|
index 977dadc..9b031db 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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|