Skip to content

Commit 3b97d13

Browse files
committed
refactor: Refactor context collectors
1 parent 6272ab5 commit 3b97d13

29 files changed

+1264
-997
lines changed

packages/cli/src/cmds/search/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
} from '../../fulltext/FindEvents';
1717
import { openInBrowser } from '../open/openers';
1818
import { buildAppMapIndex, search } from '../../fulltext/appmap-index';
19-
import buildIndex from '../../rpc/explain/buildIndex';
19+
import buildIndexInTempDir from '../../rpc/explain/index/build-index-in-temp-dir';
2020

2121
export const command = 'search <query>';
2222
export const describe =
@@ -183,7 +183,7 @@ export const handler = async (argv: ArgumentTypes) => {
183183
maxResults,
184184
};
185185

186-
const index = await buildIndex('appmaps', async (indexFile) => {
186+
const index = await buildIndexInTempDir('appmaps', async (indexFile) => {
187187
const db = new sqlite3(indexFile);
188188
const fileIndex = new FileIndex(db);
189189
await buildAppMapIndex(fileIndex, [process.cwd()]);

packages/cli/src/fulltext/appmap-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import loadAppMapConfig from '../lib/loadAppMapConfig';
1919
export type ClassMapEntry = {
2020
name: string;
2121
type: string;
22-
labels: string[];
22+
labels?: string[];
2323
children: ClassMapEntry[];
2424
static?: boolean;
2525
sourceLocation?: string;

packages/cli/src/rpc/explain/EventCollector.ts

Lines changed: 0 additions & 78 deletions
This file was deleted.

packages/cli/src/rpc/explain/LocationContextCollector.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)