feat(javascript): analyze selected application sources
Analyze exact selected sources in first-request order before unrelated static scopes, preserving full artifact identity and byte verification. Retain selection in CLI/MCP Evidence and summaries, with explicit unknowns and partial coverage for unselected sources. Keep default full analysis. Fixes #1848 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Kaoru0822
parent
0d8b728d24
commit
85c1d2587a
+24
@@ -0,0 +1,24 @@
|
||||
import { writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
|
||||
/** Selected entry sources with unrelated malformed text and source-map inputs. */
|
||||
export const writeJavaScriptSourceSelectionFixture = async (root: string) => {
|
||||
const sources = new Map<string, Buffer>([
|
||||
[
|
||||
"main.mjs",
|
||||
Buffer.from(
|
||||
'import "./vendor.js"; export function selected(value) { return value + 1; } throw new Error("must never execute");\n',
|
||||
),
|
||||
],
|
||||
[
|
||||
"package.json",
|
||||
Buffer.from('{"name":"rea-selected-source-fixture","main":"main.mjs"}\n'),
|
||||
],
|
||||
["vendor.js", Buffer.from("export const unrelated = ;\n")],
|
||||
["invalid.mjs", Buffer.from([0xff, 0xfe, 0x80])],
|
||||
["broken.json", Buffer.from("{")],
|
||||
["main.mjs.map", Buffer.from("{")],
|
||||
]);
|
||||
for (const [path, bytes] of sources) await writeFile(join(root, path), bytes);
|
||||
return sources;
|
||||
};
|
||||
Reference in New Issue
Block a user