raggrep 0.1.6 → 0.1.7
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/app/indexer/index.d.ts +2 -2
- package/dist/cli/main.js +683 -489
- package/dist/cli/main.js.map +17 -16
- package/dist/{introspection/conventions/types.d.ts → domain/entities/conventions.d.ts} +6 -5
- package/dist/domain/entities/index.d.ts +2 -0
- package/dist/{introspection → domain/services}/conventions/configFiles.d.ts +1 -1
- package/dist/{introspection → domain/services}/conventions/entryPoints.d.ts +1 -1
- package/dist/{introspection → domain/services}/conventions/frameworks/convex.d.ts +1 -1
- package/dist/{introspection → domain/services}/conventions/frameworks/index.d.ts +1 -1
- package/dist/{introspection → domain/services}/conventions/frameworks/nextjs.d.ts +1 -1
- package/dist/{introspection → domain/services}/conventions/index.d.ts +5 -5
- package/dist/domain/services/introspection.d.ts +31 -0
- package/dist/index.js +646 -465
- package/dist/index.js.map +16 -16
- package/dist/{introspection/index.d.ts → infrastructure/introspection/IntrospectionIndex.d.ts} +3 -14
- package/dist/infrastructure/introspection/index.d.ts +9 -0
- package/dist/{introspection → infrastructure/introspection}/projectDetector.d.ts +3 -12
- package/dist/types.d.ts +4 -4
- package/package.json +1 -1
- package/dist/introspection/fileIntrospector.d.ts +0 -14
- /package/dist/{introspection/types.d.ts → domain/entities/introspection.d.ts} +0 -0
- /package/dist/{introspection → domain/services}/conventions/conventions.test.d.ts +0 -0
- /package/dist/{introspection → domain/services}/introspection.test.d.ts +0 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Types
|
|
2
|
+
* Convention Types
|
|
3
3
|
*
|
|
4
4
|
* Defines patterns for recognizing special files and their semantic meaning.
|
|
5
|
+
* Used by the conventions service to add semantic keywords to the search index.
|
|
5
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Categories for organizing conventions.
|
|
9
|
+
*/
|
|
10
|
+
export type ConventionCategory = "entry-point" | "configuration" | "framework" | "types" | "test" | "documentation" | "build" | "deployment";
|
|
6
11
|
/**
|
|
7
12
|
* A file convention pattern that matches files and provides keywords.
|
|
8
13
|
*/
|
|
@@ -33,10 +38,6 @@ export interface FileConvention {
|
|
|
33
38
|
*/
|
|
34
39
|
dynamicKeywords?: (filepath: string) => string[];
|
|
35
40
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Categories for organizing conventions.
|
|
38
|
-
*/
|
|
39
|
-
export type ConventionCategory = "entry-point" | "configuration" | "framework" | "types" | "test" | "documentation" | "build" | "deployment";
|
|
40
41
|
/**
|
|
41
42
|
* A framework convention provider.
|
|
42
43
|
* Frameworks can register their own conventions.
|
|
@@ -12,3 +12,5 @@ export type { SearchResult, SearchOptions, SearchContributions, CoreContribution
|
|
|
12
12
|
export { DEFAULT_SEARCH_OPTIONS } from "./searchResult";
|
|
13
13
|
export type { Config, ModuleConfig } from "./config";
|
|
14
14
|
export { DEFAULT_IGNORE_PATHS, DEFAULT_EXTENSIONS, createDefaultConfig, } from "./config";
|
|
15
|
+
export type { FileIntrospection, ProjectStructure, Project, ProjectType, Scope, IntrospectionConfig, } from "./introspection";
|
|
16
|
+
export type { FileConvention, ConventionCategory, FrameworkConventions, ConventionMatch, } from "./conventions";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Patterns for recognizing Convex backend files and structures.
|
|
5
5
|
* Convex is a backend platform with real-time sync.
|
|
6
6
|
*/
|
|
7
|
-
import type { FrameworkConventions } from "
|
|
7
|
+
import type { FrameworkConventions } from "../../../entities/conventions";
|
|
8
8
|
/**
|
|
9
9
|
* Convex framework conventions provider.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Central registry for framework-specific conventions.
|
|
5
5
|
* Add new frameworks here to extend convention support.
|
|
6
6
|
*/
|
|
7
|
-
import type { FrameworkConventions } from "
|
|
7
|
+
import type { FrameworkConventions } from "../../../entities/conventions";
|
|
8
8
|
/**
|
|
9
9
|
* All registered framework convention providers.
|
|
10
10
|
* Add new frameworks to this array.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* File Conventions
|
|
2
|
+
* File Conventions Service
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Pure functions for matching files against conventions and extracting keywords.
|
|
5
|
+
* No I/O operations - all functions operate on file paths.
|
|
6
6
|
*
|
|
7
7
|
* Categories:
|
|
8
8
|
* - Entry Points: index.ts, main.ts, App.tsx, etc.
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* - Add new conventions to entryPoints.ts or configFiles.ts
|
|
15
15
|
* - Add new frameworks in the frameworks/ directory
|
|
16
16
|
*/
|
|
17
|
-
import type { FileConvention, ConventionMatch } from "
|
|
18
|
-
export type { FileConvention, ConventionCategory, ConventionMatch, FrameworkConventions, } from "
|
|
17
|
+
import type { FileConvention, ConventionMatch } from "../../entities/conventions";
|
|
18
|
+
export type { FileConvention, ConventionCategory, ConventionMatch, FrameworkConventions, } from "../../entities/conventions";
|
|
19
19
|
/**
|
|
20
20
|
* Get all conventions including built-in ones.
|
|
21
21
|
*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Introspection Service
|
|
3
|
+
*
|
|
4
|
+
* Pure functions for extracting file metadata from paths and content.
|
|
5
|
+
* No I/O operations - all functions operate on provided data.
|
|
6
|
+
*/
|
|
7
|
+
import type { FileIntrospection, Project, ProjectStructure, Scope } from "../entities/introspection";
|
|
8
|
+
/**
|
|
9
|
+
* Extract introspection metadata for a file.
|
|
10
|
+
*
|
|
11
|
+
* @param filepath - Relative file path
|
|
12
|
+
* @param structure - Project structure (from detectProjectStructure)
|
|
13
|
+
* @param fileContent - Optional file content for framework detection
|
|
14
|
+
*/
|
|
15
|
+
export declare function introspectFile(filepath: string, structure: ProjectStructure, fileContent?: string): FileIntrospection;
|
|
16
|
+
/**
|
|
17
|
+
* Extract keywords from introspection for search boosting.
|
|
18
|
+
*/
|
|
19
|
+
export declare function introspectionToKeywords(intro: FileIntrospection): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Detect scope from project name.
|
|
22
|
+
*/
|
|
23
|
+
export declare function detectScopeFromName(name: string): Scope;
|
|
24
|
+
/**
|
|
25
|
+
* Find which project a file belongs to.
|
|
26
|
+
*/
|
|
27
|
+
export declare function findProjectForFile(filepath: string, structure: ProjectStructure): Project;
|
|
28
|
+
/**
|
|
29
|
+
* Calculate search boost based on introspection and query.
|
|
30
|
+
*/
|
|
31
|
+
export declare function calculateIntrospectionBoost(intro: FileIntrospection, query: string): number;
|