refactor(javascript): centralize package and JSON document facts
This commit is contained in:
1 parent
4cfc61147b
commit
37e92e430b
29 files changed
+748
-113
No files matched your search
@@ -4,6 +4,7 @@ import {
|
||||
resolveArtifactPathByContext,
|
||||
type ResolveArtifactPathInput,
|
||||
} from "./JavaScriptArtifactPathResolution.js";
|
||||
import { JavaScriptJsonDocuments } from "./JavaScriptJsonDocuments.js";
|
||||
import type { JavaScriptArtifactFile } from "../../domain/javascript/javascriptArtifactFiles.js";
|
||||
import { artifactLocalIdentity } from "./JavaScriptArtifactGraphContext.js";
|
||||
import { applicationNodeIdentitySchema } from "../../domain/javascript/javascriptApplicationEvidenceSchemas.js";
|
||||
@@ -3565,8 +3566,9 @@ describe("module-backed package main host paths", () => {
|
||||
);
|
||||
});
|
||||
|
||||
const resolve = (input: ResolveArtifactPathInput) =>
|
||||
resolveArtifactPathByContext(input);
|
||||
const jsonDocuments = new JavaScriptJsonDocuments();
|
||||
const resolve = (input: Omit<ResolveArtifactPathInput, "jsonDocuments">) =>
|
||||
resolveArtifactPathByContext({ ...input, jsonDocuments });
|
||||
|
||||
const fileMap = (files: readonly JavaScriptArtifactFile[]) =>
|
||||
new Map(files.map((value) => [value.path, value]));
|
||||
|
||||
Reference in new issue
Block a user