xgrep 0.3.0 → 0.4.2

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/index.d.ts CHANGED
@@ -30,6 +30,29 @@ export interface SearchOptions {
30
30
  pathPattern?: string
31
31
  /** Check index freshness before searching. */
32
32
  fresh?: boolean
33
+ /**
34
+ * Match only at word boundaries (wraps the pattern in `(?:...)`).
35
+ * Enabling this always runs the regex engine, even for literal patterns.
36
+ */
37
+ word?: boolean
38
+ /**
39
+ * Include/exclude result paths by glob (ripgrep -g compatible).
40
+ * Prefix a glob with `!` to exclude. Empty/omitted = no filtering.
41
+ */
42
+ globs?: Array<string>
43
+ }
44
+ /** Index status returned from xgrep. */
45
+ export interface IndexStatus {
46
+ /** Freshness state: "fresh", "stale", or "missing". */
47
+ state: string
48
+ /** Number of files changed since the last build. Present only when state is "stale". */
49
+ changedFiles?: number
50
+ /** Number of files in the index (0 if missing). */
51
+ indexedFiles: number
52
+ /** Index file size in bytes (0 if missing). */
53
+ indexSizeBytes: number
54
+ /** Path to the index file. */
55
+ indexPath: string
33
56
  }
34
57
  /** Ultra-fast indexed code search engine. */
35
58
  export declare class Xgrep {
@@ -41,8 +64,8 @@ export declare class Xgrep {
41
64
  buildIndex(): void
42
65
  /** Search for a pattern in the indexed codebase. */
43
66
  search(pattern: string, opts?: SearchOptions | undefined | null): Array<SearchResult>
44
- /** Get the current index status. */
45
- indexStatus(): string
67
+ /** Get the current index status as a structured object. */
68
+ indexStatus(): IndexStatus
46
69
  /** Get the root directory path. */
47
70
  get root(): string
48
71
  /** Get the index file path. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xgrep",
3
- "version": "0.3.0",
3
+ "version": "0.4.2",
4
4
  "description": "Ultra-fast indexed code search engine powered by trigram index. Native Rust bindings for Node.js.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
Binary file
Binary file
Binary file
Binary file
Binary file