@coana-tech/cli 15.0.1 → 15.0.3
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/cli.mjs +593 -474
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +14848 -13724
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/repos/coana-tech/javap-service/javap-service.jar +0 -0
- package/repos/coana-tech/jelly-private/dist/bundle/jelly.js +25 -6
- package/repos/coana-tech/spar/runtime/dist/approx.js +1060 -0
- package/repos/coana-tech/spar/runtime/dist/hints.js +131 -0
- package/repos/coana-tech/spar/runtime/dist/hooks.js +172 -0
- package/repos/coana-tech/spar/runtime/dist/logger.js +66 -0
- package/repos/coana-tech/spar/runtime/dist/options.js +10 -0
- package/repos/coana-tech/spar/runtime/dist/proxy.js +119 -0
- package/repos/coana-tech/spar/runtime/dist/sandbox.js +84 -0
- package/repos/coana-tech/spar/runtime/dist/types.js +3 -0
- package/repos/coana-tech/spar/sparjs-aarch64-apple-darwin.gz +0 -0
- package/repos/coana-tech/spar/sparjs-aarch64-unknown-linux-musl.gz +0 -0
- package/repos/coana-tech/spar/sparjs-x86_64-apple-darwin.gz +0 -0
- package/repos/coana-tech/spar/sparjs-x86_64-unknown-linux-musl.gz +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2166,6 +2166,10 @@ var require_telemetry_emitter = __commonJS({
|
|
|
2166
2166
|
exports.telemetryEmitter = void 0;
|
|
2167
2167
|
var fs_1 = __require("fs");
|
|
2168
2168
|
var filePath = process.env.ANALYZER_TELEMETRY_FILE_PATH;
|
|
2169
|
+
function enabled() {
|
|
2170
|
+
return !!filePath;
|
|
2171
|
+
}
|
|
2172
|
+
__name(enabled, "enabled");
|
|
2169
2173
|
function emit(eventType, data = {}) {
|
|
2170
2174
|
if (!filePath)
|
|
2171
2175
|
return;
|
|
@@ -2193,10 +2197,16 @@ var require_telemetry_emitter = __commonJS({
|
|
|
2193
2197
|
emit("diagnostics", metadata);
|
|
2194
2198
|
}
|
|
2195
2199
|
__name(diagnostics, "diagnostics");
|
|
2200
|
+
function graph(name, nodes) {
|
|
2201
|
+
emit("graph", { name, nodes });
|
|
2202
|
+
}
|
|
2203
|
+
__name(graph, "graph");
|
|
2196
2204
|
exports.telemetryEmitter = {
|
|
2205
|
+
enabled,
|
|
2197
2206
|
phaseStarted,
|
|
2198
2207
|
phaseCompleted,
|
|
2199
|
-
diagnostics
|
|
2208
|
+
diagnostics,
|
|
2209
|
+
graph
|
|
2200
2210
|
};
|
|
2201
2211
|
}
|
|
2202
2212
|
});
|
|
@@ -2384,6 +2394,7 @@ var require_escaping = __commonJS({
|
|
|
2384
2394
|
var accesspaths_1 = require_accesspaths();
|
|
2385
2395
|
var ecmascript_1 = require_ecmascript();
|
|
2386
2396
|
var options_1 = require_options();
|
|
2397
|
+
var SKIP_RESOLVED_READS = false;
|
|
2387
2398
|
function findEscapingObjects(ms, solver) {
|
|
2388
2399
|
const a = solver.globalState;
|
|
2389
2400
|
const f = solver.fragmentState;
|
|
@@ -2448,6 +2459,11 @@ var require_escaping = __commonJS({
|
|
|
2448
2459
|
if (!(0, ecmascript_1.isInternalProperty)(p)) {
|
|
2449
2460
|
const w = f.varProducer.objPropVar(t, p);
|
|
2450
2461
|
addToWorklist(w);
|
|
2462
|
+
if (SKIP_RESOLVED_READS) {
|
|
2463
|
+
const readResult = f.varProducer.readResultVar(t, p);
|
|
2464
|
+
if (f.processedReadResultVars.has(readResult) && f.getTokensSize(f.getRepresentative(readResult))[0] > 0)
|
|
2465
|
+
continue;
|
|
2466
|
+
}
|
|
2451
2467
|
solver.addToken(theUnknownAccessPathToken, f.getRepresentative(w));
|
|
2452
2468
|
}
|
|
2453
2469
|
}
|
|
@@ -4208,15 +4224,14 @@ var require_analysisstatereporter = __commonJS({
|
|
|
4208
4224
|
modules.push({ moduleName: dm.getOfficialName() });
|
|
4209
4225
|
return modules;
|
|
4210
4226
|
}
|
|
4211
|
-
modulesToJSON() {
|
|
4227
|
+
modulesToJSON(anonymize = false) {
|
|
4212
4228
|
const modules = new Array();
|
|
4213
4229
|
const ids = /* @__PURE__ */ new Map();
|
|
4214
|
-
|
|
4230
|
+
let appIdx = 0;
|
|
4215
4231
|
for (const m of this.f.a.moduleInfos.values()) {
|
|
4216
4232
|
ids.set(m, ids.size);
|
|
4217
|
-
mods.push(m);
|
|
4218
4233
|
const s = {
|
|
4219
|
-
name: m.toString(),
|
|
4234
|
+
name: anonymize && !m.packageInfo.dir.includes("node_modules/") ? `app${appIdx++}` : m.toString(),
|
|
4220
4235
|
dependencies: []
|
|
4221
4236
|
};
|
|
4222
4237
|
if (m.packageInfo.isEntry)
|
|
@@ -14028,6 +14043,7 @@ var require_main = __commonJS({
|
|
|
14028
14043
|
var apiexported_1 = require_apiexported();
|
|
14029
14044
|
var merge_1 = require_merge();
|
|
14030
14045
|
var processmanager_1 = require_processmanager();
|
|
14046
|
+
var telemetry_emitter_1 = require_telemetry_emitter();
|
|
14031
14047
|
var assert_1 = __importDefault(__require("assert"));
|
|
14032
14048
|
var semver_1 = __importDefault(require_semver2());
|
|
14033
14049
|
var ENGINES_NODE = require_package()?.engines?.node;
|
|
@@ -14293,8 +14309,11 @@ Memory limit is ${(0, memory_1.getMemoryLimit)()}MB.${options_1.PKG ? "" : " Cha
|
|
|
14293
14309
|
out.saveCallGraph(options_1.options.callgraphJson, files);
|
|
14294
14310
|
if (options_1.options.diagnosticsJson)
|
|
14295
14311
|
out.saveDiagnostics(solver.diagnostics, options_1.options.diagnosticsJson);
|
|
14296
|
-
if (options_1.options.modulesOnly)
|
|
14312
|
+
if (options_1.options.modulesOnly) {
|
|
14297
14313
|
out.reportReachablePackagesAndModules();
|
|
14314
|
+
if (telemetry_emitter_1.telemetryEmitter.enabled())
|
|
14315
|
+
telemetry_emitter_1.telemetryEmitter.graph("modules", out.modulesToJSON(true));
|
|
14316
|
+
}
|
|
14298
14317
|
if (options_1.options.soundness)
|
|
14299
14318
|
(0, compare_1.compareCallGraphs)(options_1.options.soundness, "<computed>", out.callGraphToJSON(files), false, options_1.options.reachability);
|
|
14300
14319
|
if (tapirPatterns && patterns)
|