mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 13:26:10 +00:00
refactor(electron): reuse retention and capture contracts
This commit is contained in:
1 parent
ddce4bb446
commit
63fe0eb5db
2 files changed
+19
-38
No files matched your search
@@ -8,10 +8,7 @@ import {
|
||||
parseAtPath,
|
||||
} from "./javascriptRuntimeReconciliationInputValidation.js";
|
||||
|
||||
import {
|
||||
classifyBrowserCompleteness,
|
||||
type BrowserCompleteness,
|
||||
} from "../browserCompleteness.js";
|
||||
import { classifyBrowserCompleteness } from "../browserCompleteness.js";
|
||||
import {
|
||||
electronActiveObservationResultSchema,
|
||||
type ElectronActiveObservationResult,
|
||||
@@ -81,19 +78,10 @@ const assertIdentity = (evidence: Evidence): void => {
|
||||
};
|
||||
const normalizeInspection = (
|
||||
result: ElectronActiveObservationResult,
|
||||
): {
|
||||
readonly target: {
|
||||
readonly target_id: string;
|
||||
readonly type: string;
|
||||
readonly title: string;
|
||||
readonly attached: boolean;
|
||||
readonly file_path: string;
|
||||
};
|
||||
readonly frames: readonly [];
|
||||
readonly scripts: { readonly items: readonly [] };
|
||||
readonly workers: readonly [];
|
||||
readonly completeness: BrowserCompleteness;
|
||||
} => ({
|
||||
): Extract<
|
||||
ParsedRuntimeCapture,
|
||||
{ kind: "electron-active" }
|
||||
>["inspection"] => ({
|
||||
target: {
|
||||
target_id: `electron-active:${digestCanonicalValue(result.application.application_path, "Runtime reconciliation").slice(0, 32)}`,
|
||||
type: "electron-application",
|
||||
|
||||
Reference in new issue
Block a user