refactor(javascript): group domain semantics and contracts (#907)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { browserCompletenessSchema } from "./browserCompleteness.js";
|
||||
import { browserEndpointSchema } from "./browserObservation.js";
|
||||
import { browserVersionSchema } from "./browserObservationSchemas.js";
|
||||
import { webTextArtifactSchema } from "./webContentArtifact.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { browserCompletenessSchema } from "../browserCompleteness.js";
|
||||
import { browserEndpointSchema } from "../browserObservation.js";
|
||||
import { browserVersionSchema } from "../browserObservationSchemas.js";
|
||||
import { webTextArtifactSchema } from "../webContentArtifact.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const approvedElectronInput = {
|
||||
cdp_endpoint: browserEndpointSchema,
|
||||
+1
-1
@@ -15,7 +15,7 @@ import {
|
||||
electronStaticValue,
|
||||
objectProperty,
|
||||
} from "./electronStaticAnalysisValues.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { addLocatedFinding } from "./javascriptStaticAnalysisFindings.js";
|
||||
import {
|
||||
argumentNode,
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import * as t from "@babel/types";
|
||||
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { stripQueryAndFragment } from "./artifactPathSyntax.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { stripQueryAndFragment } from "../artifactPathSyntax.js";
|
||||
import type { ElectronNativeAddonBindingFinding } from "./electronStaticAnalysisTypes.js";
|
||||
import { addLocatedFinding } from "./javascriptStaticAnalysisFindings.js";
|
||||
import {
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import * as t from "@babel/types";
|
||||
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { ElectronStaticValue } from "./electronStaticAnalysisTypes.js";
|
||||
import { semanticStaticPropertyName } from "./javascriptAstValues.js";
|
||||
import { sourceSlice } from "./javascriptStaticAnalysisHelpers.js";
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { z } from "zod";
|
||||
|
||||
import { javascriptApplicationGraphSchema } from "./javascriptApplicationGraph.js";
|
||||
import { javaScriptSemanticGraphSchema } from "./javascriptSemanticGraph.js";
|
||||
import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const countSchema = z.number().int().min(0);
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
type ApplicationNode,
|
||||
type JavaScriptApplicationGraph,
|
||||
} from "./javascriptApplicationGraph.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { ApplicationVersionComparisonItem } from "./javascriptApplicationVersionComparisonSchemas.js";
|
||||
|
||||
interface ChangeGraphInput {
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const boundedTextSchema = z.string().min(1);
|
||||
const boundedKeySchema = z.string().min(1);
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { canonicalDigest, canonicalJson } from "./comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { canonicalDigest, canonicalJson } from "../comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
|
||||
import type {
|
||||
ApplicationGraphEvidence,
|
||||
+2
-2
@@ -5,8 +5,8 @@ import {
|
||||
applicationGraphEvidenceSchema,
|
||||
applicationNodeIdentitySchema,
|
||||
} from "./javascriptApplicationEvidenceSchemas.js";
|
||||
import { jsonValueSchema } from "./jsonValue.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { jsonValueSchema } from "../jsonValue.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const boundedTextSchema = z.string().min(1);
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { canonicalDigest } from "./comparisonSemantics.js";
|
||||
import { uniqueSorted } from "./canonicalOrdering.js";
|
||||
import type { Evidence } from "./evidence.js";
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import { buildJavaScriptApplicationChangeGraph } from "./javascriptApplicationChangeGraph.js";
|
||||
import {
|
||||
applicationVersionComparisonResultSchema,
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { emptyArraySchema } from "./emptyArraySchema.js";
|
||||
import { evidenceSchema } from "./evidence.js";
|
||||
import { emptyArraySchema } from "../emptyArraySchema.js";
|
||||
import { evidenceSchema } from "../evidence.js";
|
||||
import { javascriptApplicationGraphSchema } from "./javascriptApplicationGraph.js";
|
||||
import { JAVASCRIPT_APPLICATION_NODE_KINDS } from "./javascriptApplicationGraphSchemas.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const evidenceIdSchema = prefixedDigestSchema("ev");
|
||||
const nodeIdSchema = prefixedDigestSchema("jag_node");
|
||||
+3
-3
@@ -2,9 +2,9 @@ import {
|
||||
absenceClaimable,
|
||||
canonicalDigest,
|
||||
canonicalJson,
|
||||
} from "./comparisonSemantics.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import type { Evidence } from "./evidence.js";
|
||||
} from "../comparisonSemantics.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import {
|
||||
type ApplicationEdge,
|
||||
type ApplicationNode,
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { ApplicationNode } from "./javascriptApplicationGraph.js";
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
|
||||
/** One deterministic one-to-one match between two graph versions. */
|
||||
type ApplicationVersionPairMatch =
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { parse } from "@babel/parser";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { fingerprintJavaScriptAst } from "../../src/domain/javascriptAstFingerprint.js";
|
||||
import { fingerprintJavaScriptAst } from "./javascriptAstFingerprint.js";
|
||||
|
||||
describe("JavaScript AST fingerprints", () => {
|
||||
it("includes complete literal values in the fingerprint", () => {
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
|
||||
|
||||
import * as t from "@babel/types";
|
||||
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { propertyName } from "./javascriptAstValues.js";
|
||||
import { stringValue } from "./javascriptStaticAnalysisHelpers.js";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import { digestExportShapeValue } from "./javascriptExportShapeComparisonIdentity.js";
|
||||
import {
|
||||
javaScriptExportShapeComparisonResultSchema,
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { evidenceSchema } from "./evidence.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { evidenceSchema } from "../evidence.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const evidenceIdSchema = prefixedDigestSchema("ev");
|
||||
const graphIdSchema = prefixedDigestSchema("jag");
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
type JavaScriptExportShapeComparisonResult,
|
||||
type ProjectedExportReturnShapes,
|
||||
} from "./javascriptExportShapeComparisonSchemas.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
|
||||
type Shape = ProjectedExportReturnShapes["static_return_shapes"][number];
|
||||
type SelectorResult = JavaScriptExportShapeComparisonResult["left"];
|
||||
+1
-1
@@ -7,7 +7,7 @@ import type {
|
||||
JavaScriptExportShapeComparisonResult,
|
||||
ProjectedExportReturnShapes,
|
||||
} from "./javascriptExportShapeComparisonSchemas.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { SelectedJavaScriptExport } from "./javascriptExportShapeSelection.js";
|
||||
|
||||
type Primitive = string | number | boolean | null;
|
||||
+1
-1
@@ -13,7 +13,7 @@ import { findApplicationFeatureSeeds } from "./javascriptFeatureSeed.js";
|
||||
import { traceApplicationFeature } from "./javascriptFeatureTrace.js";
|
||||
import type { ApplicationFeatureSeed } from "./javascriptFeatureTraceSchemas.js";
|
||||
import { analyzeJavaScriptStaticSource } from "./javascriptStaticAnalysis.js";
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
|
||||
const memberFields = [
|
||||
{ kind: "api", nodeKind: "context-bridge-api", field: "members" },
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { buildSyntheticJavaScriptApplicationGraph } from "./javascriptApplicationGraph.fixture.js";
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
import { findApplicationFeatureSeeds } from "./javascriptFeatureSeed.js";
|
||||
|
||||
describe("application feature seed property matching", () => {
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { ApplicationNode } from "./javascriptApplicationGraph.js";
|
||||
import {
|
||||
featureSeedMatchMode,
|
||||
type ApplicationFeatureSeed,
|
||||
} from "./javascriptFeatureTraceSchemas.js";
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
|
||||
/** One explicit field that matched a feature seed. */
|
||||
export interface ApplicationFeatureSeedMatch {
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { canonicalDigest } from "./comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import type { Evidence } from "./evidence.js";
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import {
|
||||
createJavaScriptApplicationGraph,
|
||||
type ApplicationEdge,
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { evidenceSchema, providerSchema } from "./evidence.js";
|
||||
import { evidenceSchema, providerSchema } from "../evidence.js";
|
||||
import { javascriptApplicationGraphSchema } from "./javascriptApplicationGraph.js";
|
||||
import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const evidenceIdSchema = prefixedDigestSchema("ev");
|
||||
const nodeIdSchema = prefixedDigestSchema("jag_node");
|
||||
+1
-1
@@ -3,7 +3,7 @@ import {
|
||||
type ApplicationNode,
|
||||
type JavaScriptApplicationGraph,
|
||||
} from "./javascriptApplicationGraph.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
|
||||
interface AdjacencyEntry {
|
||||
readonly edge: ApplicationEdge;
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import type { Evidence } from "./evidence.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import {
|
||||
type ApplicationEdge,
|
||||
type ApplicationNode,
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { digestSchema } from "./digests.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { analyzeJavaScriptApplicationInputSchema } from "./javascriptApplicationAnalysis.js";
|
||||
|
||||
/** Recover derived readable modules from one explicitly selected local script. */
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { type ApplicationNode } from "./javascriptApplicationGraph.js";
|
||||
import { uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { ParsedStaticLayer } from "./javascriptRuntimeReconciliationParsing.js";
|
||||
import type {
|
||||
JavaScriptRuntimeReconciliationItem,
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { browserEndpointSchema } from "./browserObservation.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { browserEndpointSchema } from "../browserObservation.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const observationTextSchema = z.string().min(1);
|
||||
|
||||
+4
-4
@@ -1,18 +1,18 @@
|
||||
import { isAbsolute } from "node:path";
|
||||
|
||||
import { canonicalDigest } from "./comparisonSemantics.js";
|
||||
import { isPathWithinRoot } from "./localPath.js";
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import { isPathWithinRoot } from "../localPath.js";
|
||||
import { z } from "zod";
|
||||
|
||||
import {
|
||||
classifyBrowserCompleteness,
|
||||
type BrowserCompleteness,
|
||||
} from "./browserCompleteness.js";
|
||||
} from "../browserCompleteness.js";
|
||||
import {
|
||||
electronActiveObservationResultSchema,
|
||||
type ElectronActiveObservationResult,
|
||||
} from "./electronActiveObservation.js";
|
||||
import type { Evidence } from "./evidence.js";
|
||||
import type { Evidence } from "../evidence.js";
|
||||
import type { ParsedRuntimeCapture } from "./javascriptRuntimeReconciliationParsing.js";
|
||||
|
||||
/** Parse active Electron Evidence as a bounded, target-only runtime capture. */
|
||||
+1
-1
@@ -9,7 +9,7 @@ import type {
|
||||
ParsedRuntimeCapture,
|
||||
ParsedStaticLayer,
|
||||
} from "./javascriptRuntimeReconciliationParsing.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { RuntimeProjection } from "./javascriptRuntimeReconciliationRuntime.js";
|
||||
|
||||
interface ReconciledGraphInput {
|
||||
+2
-2
@@ -3,9 +3,9 @@ import {
|
||||
type ApplicationEdge,
|
||||
type ApplicationGraphEvidence,
|
||||
} from "./javascriptApplicationGraph.js";
|
||||
import { canonicalDigest } from "./comparisonSemantics.js";
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import type { ParsedStaticLayer } from "./javascriptRuntimeReconciliationParsing.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { JavaScriptRuntimeReconciliationItem } from "./javascriptRuntimeReconciliationSchemas.js";
|
||||
import type { RuntimeReconciliationEntity } from "./javascriptRuntimeReconciliationRuntime.js";
|
||||
import {
|
||||
+5
-5
@@ -5,11 +5,11 @@ import {
|
||||
browserEndpointSchema,
|
||||
webPageInspectionSchema,
|
||||
type WebPageInspection,
|
||||
} from "./browserObservation.js";
|
||||
} from "../browserObservation.js";
|
||||
import {
|
||||
classifyBrowserCompleteness,
|
||||
type BrowserCompleteness,
|
||||
} from "./browserCompleteness.js";
|
||||
} from "../browserCompleteness.js";
|
||||
import {
|
||||
electronPageInspectionSchema,
|
||||
type ElectronPageInspection,
|
||||
@@ -20,9 +20,9 @@ import {
|
||||
type JavaScriptRuntimeObservation,
|
||||
type JavaScriptRuntimeLocation,
|
||||
} from "./javascriptRuntimeObservation.js";
|
||||
import { canonicalDigest } from "./comparisonSemantics.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { parseEvidence, type Evidence } from "./evidence.js";
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { parseEvidence, type Evidence } from "../evidence.js";
|
||||
import {
|
||||
javascriptApplicationAnalysisResultSchema,
|
||||
type JavaScriptApplicationAnalysisResult,
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { type JavaScriptApplicationGraph } from "./javascriptApplicationGraph.js";
|
||||
import { canonicalDigest } from "./comparisonSemantics.js";
|
||||
import { uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { canonicalDigest } from "../comparisonSemantics.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { StaticLoadStateProjection } from "./javascriptRuntimeLoadState.js";
|
||||
import type { RuntimeMatchingProjection } from "./javascriptRuntimeReconciliationMatching.js";
|
||||
import type {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
import {
|
||||
createJavaScriptApplicationEdge,
|
||||
createJavaScriptApplicationNode,
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { evidenceSchema } from "./evidence.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { evidenceSchema } from "../evidence.js";
|
||||
import { javascriptRuntimeUnresolvedLocationSchema } from "./javascriptRuntimeObservation.js";
|
||||
import { javascriptApplicationGraphSchema } from "./javascriptApplicationGraph.js";
|
||||
import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const evidenceIdSchema = prefixedDigestSchema("ev");
|
||||
const nodeIdSchema = prefixedDigestSchema("jag_node");
|
||||
+1
-1
@@ -4,7 +4,7 @@ import {
|
||||
type ApplicationNode,
|
||||
type JavaScriptApplicationGraph,
|
||||
} from "./javascriptApplicationGraph.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { ParsedStaticLayer } from "./javascriptRuntimeReconciliationParsing.js";
|
||||
import type { RuntimeReconciliationEntity } from "./javascriptRuntimeReconciliationRuntime.js";
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import type {
|
||||
JavaScriptSemanticArgumentFlow,
|
||||
JavaScriptSemanticCallable,
|
||||
} from "./javascriptSemanticIr.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { semanticCallableIdForNode } from "./javascriptSemanticProjection.js";
|
||||
import {
|
||||
resolveSemanticBindingState,
|
||||
+1
-1
@@ -16,7 +16,7 @@ import {
|
||||
type JavaScriptSemanticAnalysisState,
|
||||
type JavaScriptSemanticBindingState,
|
||||
} from "./javascriptSemanticState.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { traverseJavaScriptAst } from "./javascriptSemanticTraversal.js";
|
||||
import { range } from "./javascriptStaticAnalysisHelpers.js";
|
||||
import {
|
||||
+1
-1
@@ -8,7 +8,7 @@ import type {
|
||||
JavaScriptSemanticConfigurationOperation,
|
||||
JavaScriptSemanticRequestOperation,
|
||||
} from "./javascriptSemanticIr.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import {
|
||||
semanticStaticPropertyKey,
|
||||
semanticStaticPropertyName,
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { createHash } from "node:crypto";
|
||||
|
||||
import * as t from "@babel/types";
|
||||
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { JavaScriptSemanticCallAnalysis } from "./javascriptSemanticCalls.js";
|
||||
import type {
|
||||
JavaScriptSemanticCallable,
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { canonicalDigest, canonicalJson } from "./comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { canonicalDigest, canonicalJson } from "../comparisonSemantics.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { ApplicationGraphEvidence } from "./javascriptApplicationEvidenceSchemas.js";
|
||||
import {
|
||||
JAVASCRIPT_SEMANTIC_RELATION_FAMILIES,
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { applicationGraphEvidenceSchema } from "./javascriptApplicationEvidenceSchemas.js";
|
||||
import { jsonValueSchema } from "./jsonValue.js";
|
||||
import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { jsonValueSchema } from "../jsonValue.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const boundedTextSchema = z.string().min(1);
|
||||
const semanticNodeIdSchema = prefixedDigestSchema("jsrg_node");
|
||||
+1
-1
@@ -17,7 +17,7 @@ import {
|
||||
type JavaScriptSemanticGraphRelation,
|
||||
} from "./javascriptSemanticGraph.js";
|
||||
import { queryJavaScriptSemanticGraph } from "./javascriptSemanticQuery.js";
|
||||
import type { JsonValue } from "./jsonValue.js";
|
||||
import type { JsonValue } from "../jsonValue.js";
|
||||
|
||||
const SHA = "a".repeat(64);
|
||||
const JAG_ID = `jag_${"b".repeat(64)}`;
|
||||
+1
-1
@@ -4,7 +4,7 @@ import type {
|
||||
JavaScriptSemanticPrimitive,
|
||||
JavaScriptSemanticValue,
|
||||
} from "./javascriptSemanticIr.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { semanticPrimitiveKey } from "./javascriptSemanticProvenance.js";
|
||||
|
||||
/** Normalize one bounded collection of possible primitive values. */
|
||||
+1
-1
@@ -14,7 +14,7 @@ import {
|
||||
type JavaScriptSemanticAnalysisState,
|
||||
type JavaScriptSemanticScopeState,
|
||||
} from "./javascriptSemanticState.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { traverseJavaScriptAst } from "./javascriptSemanticTraversal.js";
|
||||
import {
|
||||
evaluateSemanticBinding,
|
||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
||||
semanticResolutionBlocked,
|
||||
type JavaScriptSemanticAnalysisState,
|
||||
} from "./javascriptSemanticState.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { traverseJavaScriptAst } from "./javascriptSemanticTraversal.js";
|
||||
import { range, sourceRangesEqual } from "./javascriptStaticAnalysisHelpers.js";
|
||||
import {
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
JavaScriptModuleOrigin,
|
||||
JavaScriptSemanticPrimitive,
|
||||
} from "./javascriptSemanticIr.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
|
||||
/** Construct exact local provenance without inventing module origins. */
|
||||
export const semanticLocalProvenance = (): JavaScriptBindingProvenance => ({
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
JavaScriptSemanticGraphNode,
|
||||
JavaScriptSemanticGraphRelation,
|
||||
} from "./javascriptSemanticGraph.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import type { JavaScriptSemanticGraphUnknown } from "./javascriptSemanticGraphSchemas.js";
|
||||
import { isJavaScriptSemanticOwnershipRelation as ownershipRelation } from "./javascriptSemanticQueryRelations.js";
|
||||
import {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { JavaScriptSemanticGraph } from "./javascriptSemanticGraph.js";
|
||||
import type { JavaScriptSemanticGraphUnknown } from "./javascriptSemanticGraphSchemas.js";
|
||||
import type { JavaScriptSemanticQueryResult } from "./javascriptSemanticQuerySchemas.js";
|
||||
+1
-1
@@ -6,7 +6,7 @@ import type {
|
||||
JavaScriptSemanticGraph,
|
||||
JavaScriptSemanticGraphNode,
|
||||
} from "./javascriptSemanticGraph.js";
|
||||
import { compareCodePoints, uniqueSorted } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints, uniqueSorted } from "../canonicalOrdering.js";
|
||||
import type { JavaScriptSemanticQueryInput } from "./javascriptSemanticQuerySchemas.js";
|
||||
|
||||
/** Canonical JSON used by semantic query commitments and ordering. */
|
||||
+3
-3
@@ -7,9 +7,9 @@ import {
|
||||
javaScriptSemanticRelationSchema,
|
||||
javaScriptSemanticUnknownSchema,
|
||||
} from "./javascriptSemanticGraphSchemas.js";
|
||||
import { jsonValueSchema } from "./jsonValue.js";
|
||||
import { digestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { jsonValueSchema } from "../jsonValue.js";
|
||||
import { digestSchema } from "../digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const semanticNodeIdSchema = prefixedDigestSchema("jsrg_node");
|
||||
const literalSeedSchema = z.strictObject({
|
||||
+1
-1
@@ -10,7 +10,7 @@ import type {
|
||||
ProjectedPropertyCoverage,
|
||||
ProjectedReturnField,
|
||||
} from "./javascriptExportShapeComparisonSchemas.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { semanticCallableIdForNode } from "./javascriptSemanticProjection.js";
|
||||
import {
|
||||
resolveSemanticBindingState,
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { evidenceSchema } from "./evidence.js";
|
||||
import { evidenceSchema } from "../evidence.js";
|
||||
import {
|
||||
javaScriptSemanticQueryInputSchema,
|
||||
javaScriptSemanticQueryResultSchema,
|
||||
} from "./javascriptSemanticQuerySchemas.js";
|
||||
import { prefixedDigestSchema } from "./../domain/digests.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const evidenceIdSchema = prefixedDigestSchema("ev");
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import {
|
||||
type JavaScriptSemanticBindingState,
|
||||
} from "./javascriptSemanticState.js";
|
||||
import { stringValue } from "./javascriptStaticAnalysisHelpers.js";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import { compareCodePoints } from "../canonicalOrdering.js";
|
||||
import { semanticStaticPropertyKey } from "./javascriptAstValues.js";
|
||||
import {
|
||||
semanticAmbiguousProvenance,
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user