@pratik7368patil/anchor-core 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -574,6 +574,9 @@ type OrgGraphProgress = {
574
574
  edges: number;
575
575
  apiContracts: number;
576
576
  apiConsumers: number;
577
+ current?: number;
578
+ total?: number;
579
+ kind?: "edges" | "contracts" | "consumers";
577
580
  } | {
578
581
  stage: "completed_org_graph";
579
582
  org: string;
@@ -713,6 +716,8 @@ type IndexPullRequestsProgress = {
713
716
  type CodeIndexProgress = {
714
717
  stage: "discovering_code_files";
715
718
  repo: string;
719
+ scanned?: number;
720
+ total?: number;
716
721
  } | {
717
722
  stage: "discovered_code_files";
718
723
  repo: string;
@@ -762,6 +767,15 @@ type CodeIndexProgress = {
762
767
  stage: "writing_code_index";
763
768
  repo: string;
764
769
  phase: string;
770
+ } | {
771
+ stage: "inferring_test_awareness";
772
+ repo: string;
773
+ phase: "classifying_files" | "indexing_sources" | "linking_tests" | "completed";
774
+ current: number;
775
+ total: number;
776
+ testFiles: number;
777
+ testLinks: number;
778
+ filePath?: string;
765
779
  } | {
766
780
  stage: "deleting_existing_code_index";
767
781
  repo: string;
@@ -1121,6 +1135,7 @@ type CodeFileDiscoveryResult = {
1121
1135
  declare function isHardExcludedCodePath(filePath: string): boolean;
1122
1136
  declare function discoverCodeFiles(cwd: string, repo: string, options?: {
1123
1137
  maxFileBytes?: number;
1138
+ onScan?: (scanned: number, total: number) => void;
1124
1139
  }): CodeFileDiscoveryResult;
1125
1140
 
1126
1141
  declare function indexCodebase(db: AnchorDatabase, options: {
@@ -1131,8 +1146,11 @@ declare function indexCodebase(db: AnchorDatabase, options: {
1131
1146
  }): CodeIndexSummary;
1132
1147
  declare function emptyCodeIndexSummary(cwd: string): CodeIndexSummary;
1133
1148
 
1149
+ type TestAwarenessOptions = {
1150
+ onProgress?: (progress: CodeIndexProgress) => void;
1151
+ };
1134
1152
  declare function isTestFilePath(filePath: string): boolean;
1135
- declare function inferTestAwareness(repo: string, codeFiles: CodeFileRecord[], codeChunks: CodeChunk[]): {
1153
+ declare function inferTestAwareness(repo: string, codeFiles: CodeFileRecord[], codeChunks: CodeChunk[], options?: TestAwarenessOptions): {
1136
1154
  testFiles: TestFileRecord[];
1137
1155
  testLinks: TestLink[];
1138
1156
  };