mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
refactor(domain): move the tshark JSON packet envelope reader into src/domain/pcap (#11503)
* refactor(domain): move the tshark JSON packet envelope reader into src/domain/pcap * refactor(captures): declare live capture's use of the pcap Wireshark tool configuration (#11504) * chore(verify): count the tshark envelope's JSON.parse now that domain/pcap is parser scope #11526 brought src/domain/pcap into the parser guards. The envelope reader keeps its one JSON.parse: both tshark callers pass --no-duplicate-keys, so tshark merges repeated members into arrays before REA parses them.
This commit is contained in:
1 parent
5f718ce30e
commit
f1fc603b12
8 files changed
+20
-9
No files matched your search
@@ -9,7 +9,6 @@
|
||||
],
|
||||
"crossProvider": {
|
||||
"apktool -> artifacts": 2,
|
||||
"captures -> pcap": 2,
|
||||
"desktop -> electron": 1,
|
||||
"gpu -> artifacts": 2,
|
||||
"model -> artifacts": 1
|
||||
|
||||
@@ -442,6 +442,17 @@ export const PROVIDER_DEPENDENCIES = Object.freeze([
|
||||
reason:
|
||||
"active Electron capture checks the inspect-arguments fuse with the electron provider's fuse reader",
|
||||
}),
|
||||
Object.freeze({
|
||||
from: "captures",
|
||||
to: "pcap",
|
||||
files: Object.freeze(["PcapConfiguration.ts"]),
|
||||
// Live packet capture runs the same Wireshark tshark that the pcap
|
||||
// provider runs. It locates, selects, versions and identity-checks it
|
||||
// through pcap's Wireshark tool configuration, so REA_TSHARK_COMMAND and
|
||||
// the executable identity rules have one owner.
|
||||
reason:
|
||||
"live packet capture selects and verifies tshark with the pcap provider's Wireshark tool configuration",
|
||||
}),
|
||||
]);
|
||||
|
||||
/** Whether one provider-to-provider import is a declared dependency. */
|
||||
|
||||
@@ -474,14 +474,14 @@ checkCounted(
|
||||
[],
|
||||
);
|
||||
|
||||
// `tshark -T json` has one envelope reader, src/pcap/TsharkJsonPackets.ts,
|
||||
// `tshark -T json` has one envelope reader, src/domain/pcap/tsharkJsonPackets.ts,
|
||||
// which owns malformed JSON, the packet array and each packet's layers.
|
||||
checkCounted(
|
||||
"local tshark JSON envelope read (use parseTsharkJsonPackets or readTsharkJsonPackets from src/pcap/TsharkJsonPackets)",
|
||||
"local tshark JSON envelope read (use parseTsharkJsonPackets or readTsharkJsonPackets from src/domain/pcap/tsharkJsonPackets)",
|
||||
"tshark-json-envelope",
|
||||
files,
|
||||
/\b_source\s*\.\s*layers\b/gu,
|
||||
["src/pcap/TsharkJsonPackets.ts"],
|
||||
["src/domain/pcap/tsharkJsonPackets.ts"],
|
||||
);
|
||||
|
||||
// Text from an unknown caught value has one owner, src/kernel/errorMessage.ts.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"src/artifacts/deno/DenoSectionLayout.ts": 1,
|
||||
"src/domain/android/proguardMapping.ts": 1,
|
||||
"src/domain/apple/interfaceBuilderKeyedArchive.ts": 1,
|
||||
"src/domain/pcap/tsharkJsonPackets.ts": 1,
|
||||
"src/evm/EvmoleInterfaceWorker.ts": 2,
|
||||
"src/firmware/FirmwareReports.ts": 1,
|
||||
"src/model/SafetensorsHeader.ts": 1,
|
||||
|
||||
Reference in new issue
Block a user