Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Search snippets and appmap events using sqlite #2123

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/cli/src/cmds/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import { FileIndex } from '@appland/search';
import { handleWorkingDirectory } from '../../lib/handleWorkingDirectory';
import { verbose } from '../../utils';
import searchSingleAppMap, { SearchOptions as SingleSearchOptions } from './searchSingleAppMap';
import { SearchResponse as DiagramsSearchResponse } from '../../fulltext/appmap-match';
import { SearchResponse as DiagramsSearchResponse } from '../../rpc/explain/index/appmap-match';
import {
SearchResult as EventSearchResult,
SearchResponse as EventSearchResponse,
} from '../../fulltext/FindEvents';
import { openInBrowser } from '../open/openers';
import { buildAppMapIndex, search } from '../../fulltext/appmap-index';
import buildIndexInTempDir from '../../rpc/explain/build-index-in-temp-dir';
import { buildAppMapIndex, search } from '../../rpc/explain/index/appmap-index';
import buildIndexInTempDir from '../../rpc/explain/index/build-index-in-temp-dir';

export const command = 'search <query>';
export const describe =
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/cmds/search/searchSingleAppMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default async function searchSingleAppMap(
query: string,
options: SearchOptions = {}
): Promise<SearchResponse> {
// eslint-disable-next-line no-param-reassign
if (appmap.endsWith('.appmap.json')) appmap = appmap.slice(0, -'.appmap.json'.length);

const findEvents = new FindEvents(appmap);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/fulltext/FindEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import assert from 'assert';

import { verbose } from '../utils';
import { collectParameters } from './collectParameters';
import { fileNameMatchesFilterPatterns } from './filter-patterns';
import { fileNameMatchesFilterPatterns } from '../rpc/explain/index/filter-patterns';

type IndexItem = {
fqid: string;
Expand Down
14 changes: 0 additions & 14 deletions packages/cli/src/fulltext/ref.ts

This file was deleted.

78 changes: 0 additions & 78 deletions packages/cli/src/rpc/explain/EventCollector.ts

This file was deleted.

93 changes: 0 additions & 93 deletions packages/cli/src/rpc/explain/LocationContextCollector.ts

This file was deleted.

165 changes: 0 additions & 165 deletions packages/cli/src/rpc/explain/SearchContextCollector.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cli/src/rpc/explain/appmap-location.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SearchRpc } from '@appland/rpc';
import { SearchRpc } from "@appland/rpc";

export default function appmapLocation(appmap: string, event?: SearchRpc.EventMatch): string {
const appmapFile = [appmap, 'appmap.json'].join('.');
Expand Down
Loading
Loading