@effect-vfs/core 0.7.1 β 0.8.0
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/README.md +15 -238
- package/dist/LiveVolume.d.ts.map +1 -1
- package/dist/LiveVolume.js +9 -9
- package/dist/Search.d.ts +730 -0
- package/dist/Search.d.ts.map +1 -0
- package/dist/Search.js +568 -0
- package/dist/SnapshotDelta.d.ts +234 -0
- package/dist/SnapshotDelta.d.ts.map +1 -1
- package/dist/SnapshotDelta.js +107 -0
- package/dist/VirtualFileSystem.d.ts +53 -1
- package/dist/VirtualFileSystem.d.ts.map +1 -1
- package/dist/VirtualFileSystem.js +59 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/internal/fixture.js +3 -3
- package/dist/internal/glob.d.ts +66 -0
- package/dist/internal/glob.d.ts.map +1 -0
- package/dist/internal/glob.js +248 -0
- package/dist/internal/image.d.ts +7 -1
- package/dist/internal/image.d.ts.map +1 -1
- package/dist/internal/image.js +9 -7
- package/dist/internal/liveImage.d.ts +1 -1
- package/dist/internal/liveImage.d.ts.map +1 -1
- package/dist/internal/liveImage.js +2 -10
- package/dist/internal/resolution.d.ts +135 -0
- package/dist/internal/resolution.d.ts.map +1 -0
- package/dist/internal/resolution.js +277 -0
- package/dist/internal/search.d.ts +24 -0
- package/dist/internal/search.d.ts.map +1 -0
- package/dist/internal/search.js +78 -0
- package/dist/internal/searchContent.d.ts +77 -0
- package/dist/internal/searchContent.d.ts.map +1 -0
- package/dist/internal/searchContent.js +223 -0
- package/dist/internal/searchModel.d.ts +83 -0
- package/dist/internal/searchModel.d.ts.map +1 -0
- package/dist/internal/searchModel.js +23 -0
- package/dist/internal/snapshotDelta.d.ts +470 -1
- package/dist/internal/snapshotDelta.d.ts.map +1 -1
- package/dist/internal/snapshotDelta.js +59 -25
- package/dist/internal/snapshotMerge.d.ts +54 -0
- package/dist/internal/snapshotMerge.d.ts.map +1 -0
- package/dist/internal/snapshotMerge.js +959 -0
- package/dist/internal/tokenRegistry.d.ts +77 -0
- package/dist/internal/tokenRegistry.d.ts.map +1 -0
- package/dist/internal/tokenRegistry.js +128 -0
- package/dist/internal/virtualFileSystem.d.ts +32 -17
- package/dist/internal/virtualFileSystem.d.ts.map +1 -1
- package/dist/internal/virtualFileSystem.js +263 -661
- package/dist/internal/volumeLimits.d.ts +53 -0
- package/dist/internal/volumeLimits.d.ts.map +1 -0
- package/dist/internal/volumeLimits.js +63 -0
- package/dist/internal/volumeState.d.ts +2 -0
- package/dist/internal/volumeState.d.ts.map +1 -1
- package/dist/internal/volumeState.js +9 -0
- package/package.json +5 -1
package/dist/Search.d.ts
ADDED
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import * as Stream from "effect/Stream";
|
|
4
|
+
import { BytePath } from "./BytePath.js";
|
|
5
|
+
import type { Snapshot } from "./Snapshot.js";
|
|
6
|
+
import type { FsFailure, ImageFailure } from "./VfsError.js";
|
|
7
|
+
/**
|
|
8
|
+
* Entry kinds selected by filename queries.
|
|
9
|
+
*
|
|
10
|
+
* @category schemas
|
|
11
|
+
* @since 0.8.0
|
|
12
|
+
*/
|
|
13
|
+
export declare const Kind: Schema.Literals<readonly ["file", "directory", "symlink"]>;
|
|
14
|
+
/**
|
|
15
|
+
* Entry kinds selected by filename queries.
|
|
16
|
+
*
|
|
17
|
+
* @category models
|
|
18
|
+
* @since 0.8.0
|
|
19
|
+
*/
|
|
20
|
+
export type Kind = typeof Kind.Type;
|
|
21
|
+
/**
|
|
22
|
+
* Complete finite namespace, matching, content and output limits.
|
|
23
|
+
*
|
|
24
|
+
* @category schemas
|
|
25
|
+
* @since 0.8.0
|
|
26
|
+
*/
|
|
27
|
+
export declare const Limits: Schema.Struct<{
|
|
28
|
+
maxEntries: Schema.Natural;
|
|
29
|
+
maxDepth: Schema.Natural;
|
|
30
|
+
maxPathBytes: Schema.ByteSize;
|
|
31
|
+
maxResults: Schema.Natural;
|
|
32
|
+
maxResultBytes: Schema.ByteSize;
|
|
33
|
+
maxPatternBytes: Schema.ByteSize;
|
|
34
|
+
maxPatterns: Schema.Natural;
|
|
35
|
+
maxPatternListBytes: Schema.ByteSize;
|
|
36
|
+
maxExpansions: Schema.Natural;
|
|
37
|
+
maxTokens: Schema.Natural;
|
|
38
|
+
maxMatchingWork: Schema.Natural;
|
|
39
|
+
maxScannedBytes: Schema.ByteSize;
|
|
40
|
+
maxFileBytes: Schema.ByteSize;
|
|
41
|
+
maxLineEvaluations: Schema.Natural;
|
|
42
|
+
maxExcerptBytes: Schema.ByteSize;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Complete finite search limits.
|
|
46
|
+
*
|
|
47
|
+
* @category models
|
|
48
|
+
* @since 0.8.0
|
|
49
|
+
*/
|
|
50
|
+
export type Limits = typeof Limits.Type;
|
|
51
|
+
/**
|
|
52
|
+
* Optional overrides applied to default limits.
|
|
53
|
+
*
|
|
54
|
+
* @category schemas
|
|
55
|
+
* @since 0.8.0
|
|
56
|
+
*/
|
|
57
|
+
export declare const LimitOverrides: Schema.Struct<{
|
|
58
|
+
readonly maxEntries: Schema.optionalKey<Schema.Natural>;
|
|
59
|
+
readonly maxDepth: Schema.optionalKey<Schema.Natural>;
|
|
60
|
+
readonly maxPathBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
61
|
+
readonly maxResults: Schema.optionalKey<Schema.Natural>;
|
|
62
|
+
readonly maxResultBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
63
|
+
readonly maxPatternBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
64
|
+
readonly maxPatterns: Schema.optionalKey<Schema.Natural>;
|
|
65
|
+
readonly maxPatternListBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
66
|
+
readonly maxExpansions: Schema.optionalKey<Schema.Natural>;
|
|
67
|
+
readonly maxTokens: Schema.optionalKey<Schema.Natural>;
|
|
68
|
+
readonly maxMatchingWork: Schema.optionalKey<Schema.Natural>;
|
|
69
|
+
readonly maxScannedBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
70
|
+
readonly maxFileBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
71
|
+
readonly maxLineEvaluations: Schema.optionalKey<Schema.Natural>;
|
|
72
|
+
readonly maxExcerptBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Optional overrides applied to default limits.
|
|
76
|
+
*
|
|
77
|
+
* @category models
|
|
78
|
+
* @since 0.8.0
|
|
79
|
+
*/
|
|
80
|
+
export type LimitOverrides = typeof LimitOverrides.Type;
|
|
81
|
+
/**
|
|
82
|
+
* Names of compiler, traversal, output and content bounds.
|
|
83
|
+
*
|
|
84
|
+
* @category schemas
|
|
85
|
+
* @since 0.8.0
|
|
86
|
+
*/
|
|
87
|
+
export declare const Limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
88
|
+
/**
|
|
89
|
+
* Names of compiler, traversal, output and content bounds.
|
|
90
|
+
*
|
|
91
|
+
* @category models
|
|
92
|
+
* @since 0.8.0
|
|
93
|
+
*/
|
|
94
|
+
export type Limit = typeof Limit.Type;
|
|
95
|
+
/**
|
|
96
|
+
* Finite default work policy. Byte limits use exact `ByteSize` values.
|
|
97
|
+
*
|
|
98
|
+
* Defaults are 100,000 entries, depth 256, 4 KiB paths, 100 rows, 64 KiB
|
|
99
|
+
* result payload, 4 KiB per pattern, 128 pattern sources, 64 KiB aggregate
|
|
100
|
+
* sources, 1,024 expanded alternatives, 65,536 compiled tokens, and 10 million
|
|
101
|
+
* matching operations. Content defaults are 64 MiB scanned bytes, 1 MiB per
|
|
102
|
+
* file, 100,000 line evaluations and 1 KiB excerpts. Glob performs no content work. These bounds do not promise a deadline or
|
|
103
|
+
* measure JavaScript heap or serialized JSON size.
|
|
104
|
+
*
|
|
105
|
+
* @category defaults
|
|
106
|
+
* @since 0.8.0
|
|
107
|
+
*/
|
|
108
|
+
export declare const defaultLimits: Limits;
|
|
109
|
+
/**
|
|
110
|
+
* An explicit directory root, nonempty include list and optional exclusions,
|
|
111
|
+
* kinds and limits. All patterns are root-relative and case-sensitive.
|
|
112
|
+
*
|
|
113
|
+
* Wildcards and classes match Unicode code points without normalization.
|
|
114
|
+
* Supports `*`, `?`, classes, comma brace alternatives, whole-segment `**`,
|
|
115
|
+
* backslash escapes, and a directory-only trailing slash. Excluded directories
|
|
116
|
+
* prune traversal. Include selectors and kind filters do not prune directories.
|
|
117
|
+
*
|
|
118
|
+
* @category schemas
|
|
119
|
+
* @since 0.8.0
|
|
120
|
+
*/
|
|
121
|
+
export declare const GlobQuery: Schema.Struct<{
|
|
122
|
+
readonly root: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
123
|
+
readonly include: Schema.NonEmptyArray<Schema.String>;
|
|
124
|
+
readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
125
|
+
readonly kinds: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["file", "directory", "symlink"]>>>;
|
|
126
|
+
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
127
|
+
readonly maxEntries: Schema.optionalKey<Schema.Natural>;
|
|
128
|
+
readonly maxDepth: Schema.optionalKey<Schema.Natural>;
|
|
129
|
+
readonly maxPathBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
130
|
+
readonly maxResults: Schema.optionalKey<Schema.Natural>;
|
|
131
|
+
readonly maxResultBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
132
|
+
readonly maxPatternBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
133
|
+
readonly maxPatterns: Schema.optionalKey<Schema.Natural>;
|
|
134
|
+
readonly maxPatternListBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
135
|
+
readonly maxExpansions: Schema.optionalKey<Schema.Natural>;
|
|
136
|
+
readonly maxTokens: Schema.optionalKey<Schema.Natural>;
|
|
137
|
+
readonly maxMatchingWork: Schema.optionalKey<Schema.Natural>;
|
|
138
|
+
readonly maxScannedBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
139
|
+
readonly maxFileBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
140
|
+
readonly maxLineEvaluations: Schema.optionalKey<Schema.Natural>;
|
|
141
|
+
readonly maxExcerptBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
142
|
+
}>>;
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* Filename query decoded by `GlobQuery`.
|
|
146
|
+
*
|
|
147
|
+
* @category models
|
|
148
|
+
* @since 0.8.0
|
|
149
|
+
*/
|
|
150
|
+
export type GlobQuery = typeof GlobQuery.Type;
|
|
151
|
+
/**
|
|
152
|
+
* Work counts, with exact raw UTF-8 result bytes.
|
|
153
|
+
*
|
|
154
|
+
* @category schemas
|
|
155
|
+
* @since 0.8.0
|
|
156
|
+
*/
|
|
157
|
+
export declare const Work: Schema.Struct<{
|
|
158
|
+
readonly entries: Schema.Natural;
|
|
159
|
+
readonly matchingWork: Schema.Natural;
|
|
160
|
+
readonly resultBytes: Schema.ByteSize;
|
|
161
|
+
readonly scannedBytes: Schema.ByteSize;
|
|
162
|
+
readonly lineEvaluations: Schema.Natural;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Work counts, with exact raw UTF-8 result bytes.
|
|
166
|
+
*
|
|
167
|
+
* @category models
|
|
168
|
+
* @since 0.8.0
|
|
169
|
+
*/
|
|
170
|
+
export type Work = typeof Work.Type;
|
|
171
|
+
/**
|
|
172
|
+
* Counted policy skips. Descendants of skipped directories are not estimated.
|
|
173
|
+
*
|
|
174
|
+
* @category schemas
|
|
175
|
+
* @since 0.8.0
|
|
176
|
+
*/
|
|
177
|
+
export declare const Skips: Schema.Struct<{
|
|
178
|
+
readonly invalidNames: Schema.Natural;
|
|
179
|
+
readonly invalidNameSubtrees: Schema.Natural;
|
|
180
|
+
readonly oversizedFiles: Schema.Natural;
|
|
181
|
+
readonly invalidUtf8Files: Schema.Natural;
|
|
182
|
+
readonly binaryFiles: Schema.Natural;
|
|
183
|
+
}>;
|
|
184
|
+
/**
|
|
185
|
+
* Counted policy skips.
|
|
186
|
+
*
|
|
187
|
+
* @category models
|
|
188
|
+
* @since 0.8.0
|
|
189
|
+
*/
|
|
190
|
+
export type Skips = typeof Skips.Type;
|
|
191
|
+
/**
|
|
192
|
+
* `Complete` exhausts the eligible namespace, possibly with skips. `Stopped`
|
|
193
|
+
* names the exhausted bound and a root-relative path when representable.
|
|
194
|
+
* The empty string identifies the selected root. Stopping does not assert
|
|
195
|
+
* that another matching entry exists.
|
|
196
|
+
*
|
|
197
|
+
* @category schemas
|
|
198
|
+
* @since 0.8.0
|
|
199
|
+
*/
|
|
200
|
+
export declare const Completion: Schema.Union<readonly [Schema.TaggedStruct<"Complete", {}>, Schema.TaggedStruct<"Stopped", {
|
|
201
|
+
readonly limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
202
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
203
|
+
}>]>;
|
|
204
|
+
/**
|
|
205
|
+
* Query completion with an actual stopping bound.
|
|
206
|
+
*
|
|
207
|
+
* @category models
|
|
208
|
+
* @since 0.8.0
|
|
209
|
+
*/
|
|
210
|
+
export type Completion = typeof Completion.Type;
|
|
211
|
+
/**
|
|
212
|
+
* A selected root, preceding results, counters and completion.
|
|
213
|
+
*
|
|
214
|
+
* @category schemas
|
|
215
|
+
* @since 0.8.0
|
|
216
|
+
*/
|
|
217
|
+
export declare const GlobReport: Schema.Struct<{
|
|
218
|
+
readonly root: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
219
|
+
readonly results: Schema.$Array<Schema.String>;
|
|
220
|
+
readonly work: Schema.Struct<{
|
|
221
|
+
readonly entries: Schema.Natural;
|
|
222
|
+
readonly matchingWork: Schema.Natural;
|
|
223
|
+
readonly resultBytes: Schema.ByteSize;
|
|
224
|
+
readonly scannedBytes: Schema.ByteSize;
|
|
225
|
+
readonly lineEvaluations: Schema.Natural;
|
|
226
|
+
}>;
|
|
227
|
+
readonly skips: Schema.Struct<{
|
|
228
|
+
readonly invalidNames: Schema.Natural;
|
|
229
|
+
readonly invalidNameSubtrees: Schema.Natural;
|
|
230
|
+
readonly oversizedFiles: Schema.Natural;
|
|
231
|
+
readonly invalidUtf8Files: Schema.Natural;
|
|
232
|
+
readonly binaryFiles: Schema.Natural;
|
|
233
|
+
}>;
|
|
234
|
+
readonly completion: Schema.Union<readonly [Schema.TaggedStruct<"Complete", {}>, Schema.TaggedStruct<"Stopped", {
|
|
235
|
+
readonly limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
236
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
237
|
+
}>]>;
|
|
238
|
+
}>;
|
|
239
|
+
/**
|
|
240
|
+
* A selected root, preceding results, counters and completion.
|
|
241
|
+
*
|
|
242
|
+
* @category models
|
|
243
|
+
* @since 0.8.0
|
|
244
|
+
*/
|
|
245
|
+
export type GlobReport = typeof GlobReport.Type;
|
|
246
|
+
declare const QueryFailure_base: Schema.Class<QueryFailure, Schema.TaggedStruct<"SearchQueryFailure", {
|
|
247
|
+
readonly field: Schema.String;
|
|
248
|
+
readonly message: Schema.String;
|
|
249
|
+
readonly pattern: Schema.optionalKey<Schema.String>;
|
|
250
|
+
readonly limit: Schema.optionalKey<Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>>;
|
|
251
|
+
}>, import("effect/Cause").YieldableError>;
|
|
252
|
+
/**
|
|
253
|
+
* Invalid query, pattern syntax or aggregate compilation limit.
|
|
254
|
+
*
|
|
255
|
+
* @category errors
|
|
256
|
+
* @since 0.8.0
|
|
257
|
+
*/
|
|
258
|
+
export declare class QueryFailure extends QueryFailure_base {
|
|
259
|
+
}
|
|
260
|
+
declare const BudgetExceeded_base: Schema.Class<BudgetExceeded, Schema.TaggedStruct<"SearchBudgetExceeded", {
|
|
261
|
+
readonly limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
262
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
263
|
+
}>, import("effect/Cause").YieldableError>;
|
|
264
|
+
/**
|
|
265
|
+
* Typed runtime budget exhaustion.
|
|
266
|
+
*
|
|
267
|
+
* @category errors
|
|
268
|
+
* @since 0.8.0
|
|
269
|
+
*/
|
|
270
|
+
export declare class BudgetExceeded extends BudgetExceeded_base {
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Query and snapshot failures preserved by collectors.
|
|
274
|
+
*
|
|
275
|
+
* @category errors
|
|
276
|
+
* @since 0.8.0
|
|
277
|
+
*/
|
|
278
|
+
export type GlobFailure = QueryFailure | FsFailure | ImageFailure;
|
|
279
|
+
/**
|
|
280
|
+
* Stream failures, including exhaustion after earlier rows.
|
|
281
|
+
*
|
|
282
|
+
* @category errors
|
|
283
|
+
* @since 0.8.0
|
|
284
|
+
*/
|
|
285
|
+
export type ScanGlobFailure = GlobFailure | BudgetExceeded;
|
|
286
|
+
/**
|
|
287
|
+
* Explicit content interpretation. Literal strings never become regex implicitly.
|
|
288
|
+
*
|
|
289
|
+
* @category schemas
|
|
290
|
+
* @since 0.8.0
|
|
291
|
+
*/
|
|
292
|
+
export declare const Pattern: Schema.TaggedUnion<{
|
|
293
|
+
readonly Literal: Schema.TaggedStruct<"Literal", {
|
|
294
|
+
readonly pattern: Schema.NonEmptyString;
|
|
295
|
+
}>;
|
|
296
|
+
readonly Regex: Schema.TaggedStruct<"Regex", {
|
|
297
|
+
readonly pattern: Schema.String;
|
|
298
|
+
}>;
|
|
299
|
+
}>;
|
|
300
|
+
/**
|
|
301
|
+
* Explicit literal or native regex content pattern.
|
|
302
|
+
*
|
|
303
|
+
* @category models
|
|
304
|
+
* @since 0.8.0
|
|
305
|
+
*/
|
|
306
|
+
export type Pattern = typeof Pattern.Type;
|
|
307
|
+
/**
|
|
308
|
+
* Regular-file content selection using the same case-sensitive filename globs as
|
|
309
|
+
* `GlobQuery`. Content `ignoreCase` defaults to false and never affects filenames.
|
|
310
|
+
*
|
|
311
|
+
* @category schemas
|
|
312
|
+
* @since 0.8.0
|
|
313
|
+
*/
|
|
314
|
+
export declare const ContentQuery: Schema.Struct<{
|
|
315
|
+
readonly root: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
316
|
+
readonly include: Schema.NonEmptyArray<Schema.String>;
|
|
317
|
+
readonly exclude: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
318
|
+
readonly pattern: Schema.TaggedUnion<{
|
|
319
|
+
readonly Literal: Schema.TaggedStruct<"Literal", {
|
|
320
|
+
readonly pattern: Schema.NonEmptyString;
|
|
321
|
+
}>;
|
|
322
|
+
readonly Regex: Schema.TaggedStruct<"Regex", {
|
|
323
|
+
readonly pattern: Schema.String;
|
|
324
|
+
}>;
|
|
325
|
+
}>;
|
|
326
|
+
readonly ignoreCase: Schema.optionalKey<Schema.Boolean>;
|
|
327
|
+
readonly limits: Schema.optionalKey<Schema.Struct<{
|
|
328
|
+
readonly maxEntries: Schema.optionalKey<Schema.Natural>;
|
|
329
|
+
readonly maxDepth: Schema.optionalKey<Schema.Natural>;
|
|
330
|
+
readonly maxPathBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
331
|
+
readonly maxResults: Schema.optionalKey<Schema.Natural>;
|
|
332
|
+
readonly maxResultBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
333
|
+
readonly maxPatternBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
334
|
+
readonly maxPatterns: Schema.optionalKey<Schema.Natural>;
|
|
335
|
+
readonly maxPatternListBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
336
|
+
readonly maxExpansions: Schema.optionalKey<Schema.Natural>;
|
|
337
|
+
readonly maxTokens: Schema.optionalKey<Schema.Natural>;
|
|
338
|
+
readonly maxMatchingWork: Schema.optionalKey<Schema.Natural>;
|
|
339
|
+
readonly maxScannedBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
340
|
+
readonly maxFileBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
341
|
+
readonly maxLineEvaluations: Schema.optionalKey<Schema.Natural>;
|
|
342
|
+
readonly maxExcerptBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
343
|
+
}>>;
|
|
344
|
+
}>;
|
|
345
|
+
/**
|
|
346
|
+
* Validated snapshot content query.
|
|
347
|
+
*
|
|
348
|
+
* @category models
|
|
349
|
+
* @since 0.8.0
|
|
350
|
+
*/
|
|
351
|
+
export type ContentQuery = typeof ContentQuery.Type;
|
|
352
|
+
/**
|
|
353
|
+
* Half-open, file-absolute UTF-8 byte offsets. These are safe integers, not UTF-16
|
|
354
|
+
* indices or character columns.
|
|
355
|
+
*
|
|
356
|
+
* @category schemas
|
|
357
|
+
* @since 0.8.0
|
|
358
|
+
*/
|
|
359
|
+
export declare const MatchRange: Schema.Struct<{
|
|
360
|
+
readonly start: Schema.Natural;
|
|
361
|
+
readonly end: Schema.Natural;
|
|
362
|
+
}>;
|
|
363
|
+
/**
|
|
364
|
+
* First whole-match byte range.
|
|
365
|
+
*
|
|
366
|
+
* @category models
|
|
367
|
+
* @since 0.8.0
|
|
368
|
+
*/
|
|
369
|
+
export type MatchRange = typeof MatchRange.Type;
|
|
370
|
+
/**
|
|
371
|
+
* UTF-8-bounded text beginning at the match, with its original file-byte start.
|
|
372
|
+
* `truncated` is true when any line prefix or suffix is omitted. The full match
|
|
373
|
+
* range can extend beyond this text. A zero-width end match can have empty text.
|
|
374
|
+
*
|
|
375
|
+
* @category schemas
|
|
376
|
+
* @since 0.8.0
|
|
377
|
+
*/
|
|
378
|
+
export declare const Excerpt: Schema.Struct<{
|
|
379
|
+
readonly text: Schema.String;
|
|
380
|
+
readonly start: Schema.Natural;
|
|
381
|
+
readonly truncated: Schema.Boolean;
|
|
382
|
+
}>;
|
|
383
|
+
/**
|
|
384
|
+
* Bounded excerpt of one matching line.
|
|
385
|
+
*
|
|
386
|
+
* @category models
|
|
387
|
+
* @since 0.8.0
|
|
388
|
+
*/
|
|
389
|
+
export type Excerpt = typeof Excerpt.Type;
|
|
390
|
+
/**
|
|
391
|
+
* One matching line, its first whole match and bounded excerpt. Line numbers are
|
|
392
|
+
* 1-based; paths are root-relative. LF separates lines, CR is stripped only before
|
|
393
|
+
* LF, BOM and lone CR are preserved, and a final LF adds no synthetic empty line.
|
|
394
|
+
*
|
|
395
|
+
* @category schemas
|
|
396
|
+
* @since 0.8.0
|
|
397
|
+
*/
|
|
398
|
+
export declare const LineResult: Schema.Struct<{
|
|
399
|
+
readonly path: Schema.String;
|
|
400
|
+
readonly lineNumber: Schema.Int;
|
|
401
|
+
readonly range: Schema.Struct<{
|
|
402
|
+
readonly start: Schema.Natural;
|
|
403
|
+
readonly end: Schema.Natural;
|
|
404
|
+
}>;
|
|
405
|
+
readonly excerpt: Schema.Struct<{
|
|
406
|
+
readonly text: Schema.String;
|
|
407
|
+
readonly start: Schema.Natural;
|
|
408
|
+
readonly truncated: Schema.Boolean;
|
|
409
|
+
}>;
|
|
410
|
+
}>;
|
|
411
|
+
/**
|
|
412
|
+
* One matching line result.
|
|
413
|
+
*
|
|
414
|
+
* @category models
|
|
415
|
+
* @since 0.8.0
|
|
416
|
+
*/
|
|
417
|
+
export type LineResult = typeof LineResult.Type;
|
|
418
|
+
/**
|
|
419
|
+
* Exact matching-line count for one completely scanned matching file. This counts
|
|
420
|
+
* lines, not occurrences. Incomplete files never produce a count row.
|
|
421
|
+
*
|
|
422
|
+
* @category schemas
|
|
423
|
+
* @since 0.8.0
|
|
424
|
+
*/
|
|
425
|
+
export declare const CountResult: Schema.Struct<{
|
|
426
|
+
readonly path: Schema.String;
|
|
427
|
+
readonly count: Schema.Int;
|
|
428
|
+
}>;
|
|
429
|
+
/**
|
|
430
|
+
* One completed file matching-line count.
|
|
431
|
+
*
|
|
432
|
+
* @category models
|
|
433
|
+
* @since 0.8.0
|
|
434
|
+
*/
|
|
435
|
+
export type CountResult = typeof CountResult.Type;
|
|
436
|
+
/**
|
|
437
|
+
* Preceding line matches with coverage, work and skips.
|
|
438
|
+
* `Complete` covers eligible content and can still contain skips. Stopped or skipped
|
|
439
|
+
* query totals are lower bounds for the original scope.
|
|
440
|
+
*
|
|
441
|
+
* @category schemas
|
|
442
|
+
* @since 0.8.0
|
|
443
|
+
*/
|
|
444
|
+
export declare const LinesReport: Schema.Struct<{
|
|
445
|
+
readonly root: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
446
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
447
|
+
readonly path: Schema.String;
|
|
448
|
+
readonly lineNumber: Schema.Int;
|
|
449
|
+
readonly range: Schema.Struct<{
|
|
450
|
+
readonly start: Schema.Natural;
|
|
451
|
+
readonly end: Schema.Natural;
|
|
452
|
+
}>;
|
|
453
|
+
readonly excerpt: Schema.Struct<{
|
|
454
|
+
readonly text: Schema.String;
|
|
455
|
+
readonly start: Schema.Natural;
|
|
456
|
+
readonly truncated: Schema.Boolean;
|
|
457
|
+
}>;
|
|
458
|
+
}>>;
|
|
459
|
+
readonly work: Schema.Struct<{
|
|
460
|
+
readonly entries: Schema.Natural;
|
|
461
|
+
readonly matchingWork: Schema.Natural;
|
|
462
|
+
readonly resultBytes: Schema.ByteSize;
|
|
463
|
+
readonly scannedBytes: Schema.ByteSize;
|
|
464
|
+
readonly lineEvaluations: Schema.Natural;
|
|
465
|
+
}>;
|
|
466
|
+
readonly skips: Schema.Struct<{
|
|
467
|
+
readonly invalidNames: Schema.Natural;
|
|
468
|
+
readonly invalidNameSubtrees: Schema.Natural;
|
|
469
|
+
readonly oversizedFiles: Schema.Natural;
|
|
470
|
+
readonly invalidUtf8Files: Schema.Natural;
|
|
471
|
+
readonly binaryFiles: Schema.Natural;
|
|
472
|
+
}>;
|
|
473
|
+
readonly completion: Schema.Union<readonly [Schema.TaggedStruct<"Complete", {}>, Schema.TaggedStruct<"Stopped", {
|
|
474
|
+
readonly limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
475
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
476
|
+
}>]>;
|
|
477
|
+
}>;
|
|
478
|
+
/**
|
|
479
|
+
* Bounded snapshot content report.
|
|
480
|
+
*
|
|
481
|
+
* @category models
|
|
482
|
+
* @since 0.8.0
|
|
483
|
+
*/
|
|
484
|
+
export type LinesReport = typeof LinesReport.Type;
|
|
485
|
+
/**
|
|
486
|
+
* Preceding matching filenames with coverage, work and skips.
|
|
487
|
+
* `Complete` covers eligible content and can still contain skips. Stopped or skipped
|
|
488
|
+
* query totals are lower bounds for the original scope.
|
|
489
|
+
*
|
|
490
|
+
* @category schemas
|
|
491
|
+
* @since 0.8.0
|
|
492
|
+
*/
|
|
493
|
+
export declare const FilesReport: Schema.Struct<{
|
|
494
|
+
readonly root: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
495
|
+
readonly results: Schema.$Array<Schema.String>;
|
|
496
|
+
readonly work: Schema.Struct<{
|
|
497
|
+
readonly entries: Schema.Natural;
|
|
498
|
+
readonly matchingWork: Schema.Natural;
|
|
499
|
+
readonly resultBytes: Schema.ByteSize;
|
|
500
|
+
readonly scannedBytes: Schema.ByteSize;
|
|
501
|
+
readonly lineEvaluations: Schema.Natural;
|
|
502
|
+
}>;
|
|
503
|
+
readonly skips: Schema.Struct<{
|
|
504
|
+
readonly invalidNames: Schema.Natural;
|
|
505
|
+
readonly invalidNameSubtrees: Schema.Natural;
|
|
506
|
+
readonly oversizedFiles: Schema.Natural;
|
|
507
|
+
readonly invalidUtf8Files: Schema.Natural;
|
|
508
|
+
readonly binaryFiles: Schema.Natural;
|
|
509
|
+
}>;
|
|
510
|
+
readonly completion: Schema.Union<readonly [Schema.TaggedStruct<"Complete", {}>, Schema.TaggedStruct<"Stopped", {
|
|
511
|
+
readonly limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
512
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
513
|
+
}>]>;
|
|
514
|
+
}>;
|
|
515
|
+
/**
|
|
516
|
+
* Bounded snapshot content report.
|
|
517
|
+
*
|
|
518
|
+
* @category models
|
|
519
|
+
* @since 0.8.0
|
|
520
|
+
*/
|
|
521
|
+
export type FilesReport = typeof FilesReport.Type;
|
|
522
|
+
/**
|
|
523
|
+
* Preceding completed-file counts with coverage, work and skips.
|
|
524
|
+
* `Complete` covers eligible content and can still contain skips. Stopped or skipped
|
|
525
|
+
* query totals are lower bounds for the original scope.
|
|
526
|
+
*
|
|
527
|
+
* @category schemas
|
|
528
|
+
* @since 0.8.0
|
|
529
|
+
*/
|
|
530
|
+
export declare const CountLinesReport: Schema.Struct<{
|
|
531
|
+
readonly root: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
532
|
+
readonly results: Schema.$Array<Schema.Struct<{
|
|
533
|
+
readonly path: Schema.String;
|
|
534
|
+
readonly count: Schema.Int;
|
|
535
|
+
}>>;
|
|
536
|
+
readonly work: Schema.Struct<{
|
|
537
|
+
readonly entries: Schema.Natural;
|
|
538
|
+
readonly matchingWork: Schema.Natural;
|
|
539
|
+
readonly resultBytes: Schema.ByteSize;
|
|
540
|
+
readonly scannedBytes: Schema.ByteSize;
|
|
541
|
+
readonly lineEvaluations: Schema.Natural;
|
|
542
|
+
}>;
|
|
543
|
+
readonly skips: Schema.Struct<{
|
|
544
|
+
readonly invalidNames: Schema.Natural;
|
|
545
|
+
readonly invalidNameSubtrees: Schema.Natural;
|
|
546
|
+
readonly oversizedFiles: Schema.Natural;
|
|
547
|
+
readonly invalidUtf8Files: Schema.Natural;
|
|
548
|
+
readonly binaryFiles: Schema.Natural;
|
|
549
|
+
}>;
|
|
550
|
+
readonly completion: Schema.Union<readonly [Schema.TaggedStruct<"Complete", {}>, Schema.TaggedStruct<"Stopped", {
|
|
551
|
+
readonly limit: Schema.Literals<readonly ["maxEntries", "maxDepth", "maxPathBytes", "maxResults", "maxResultBytes", "maxPatternBytes", "maxPatterns", "maxPatternListBytes", "maxExpansions", "maxTokens", "maxMatchingWork", "maxScannedBytes", "maxFileBytes", "maxLineEvaluations", "maxExcerptBytes"]>;
|
|
552
|
+
readonly path: Schema.optionalKey<Schema.String>;
|
|
553
|
+
}>]>;
|
|
554
|
+
}>;
|
|
555
|
+
/**
|
|
556
|
+
* Bounded snapshot content report.
|
|
557
|
+
*
|
|
558
|
+
* @category models
|
|
559
|
+
* @since 0.8.0
|
|
560
|
+
*/
|
|
561
|
+
export type CountLinesReport = typeof CountLinesReport.Type;
|
|
562
|
+
/**
|
|
563
|
+
* Typed query, pattern-compilation and snapshot failures for content collectors.
|
|
564
|
+
*
|
|
565
|
+
* @category errors
|
|
566
|
+
* @since 0.8.0
|
|
567
|
+
*/
|
|
568
|
+
export type ContentFailure = QueryFailure | FsFailure | ImageFailure;
|
|
569
|
+
/**
|
|
570
|
+
* Content Stream failures, including budget exhaustion after earlier rows.
|
|
571
|
+
*
|
|
572
|
+
* @category errors
|
|
573
|
+
* @since 0.8.0
|
|
574
|
+
*/
|
|
575
|
+
export type ScanContentFailure = ContentFailure | BudgetExceeded;
|
|
576
|
+
/**
|
|
577
|
+
* Stream ordinary root-relative strings in depth-first preorder, with each
|
|
578
|
+
* directory sorted by raw name bytes. Resolve the root through directory
|
|
579
|
+
* symlinks; never follow discovered symlinks or emit the root itself.
|
|
580
|
+
*
|
|
581
|
+
* A budget failure may follow earlier rows. Taking a prefix establishes no
|
|
582
|
+
* completion. Use `glob` when skip counts or coverage matter. Each evaluation
|
|
583
|
+
* owns fresh traversal and counters, including repeated or concurrent runs.
|
|
584
|
+
*
|
|
585
|
+
* @example
|
|
586
|
+
* ```ts
|
|
587
|
+
* import * as BunCrypto from "@effect/platform-bun/BunCrypto"
|
|
588
|
+
* import { Search, VirtualFileSystem as Vfs } from "@effect-vfs/core"
|
|
589
|
+
* import { Effect, Stream } from "effect"
|
|
590
|
+
*
|
|
591
|
+
* const program = Effect.gen(function*() {
|
|
592
|
+
* const volume = yield* Vfs.fromFixture({ entries: [
|
|
593
|
+
* { kind: "file", path: "/π.ts", bytes: new Uint8Array() }
|
|
594
|
+
* ] })
|
|
595
|
+
* const snapshot = yield* volume.snapshot
|
|
596
|
+
* return yield* Stream.runCollect(Search.scanGlob(snapshot, { root: "/", include: ["?.ts"] }))
|
|
597
|
+
* })
|
|
598
|
+
* Effect.runPromise(program.pipe(Effect.provide(BunCrypto.layer))).then(console.log)
|
|
599
|
+
* // [ 'π.ts' ]
|
|
600
|
+
* ```
|
|
601
|
+
*
|
|
602
|
+
* @category operations
|
|
603
|
+
* @since 0.8.0
|
|
604
|
+
*/
|
|
605
|
+
export declare const scanGlob: (snapshot: Snapshot, query: GlobQuery) => Stream.Stream<string, ScanGlobFailure>;
|
|
606
|
+
/**
|
|
607
|
+
* Collect bounded matches and preserve preceding rows when a work or output
|
|
608
|
+
* budget stops the query. Invalid queries, malformed patterns and snapshot
|
|
609
|
+
* failures remain typed failures; interruption remains interruption.
|
|
610
|
+
*
|
|
611
|
+
* Reaching the row cap always reports `Stopped`, even for the last possible
|
|
612
|
+
* result. Invalid UTF-8 names are counted skips, and invalid-name directories
|
|
613
|
+
* count one skipped subtree without examining its descendants.
|
|
614
|
+
*
|
|
615
|
+
* @example
|
|
616
|
+
* ```ts
|
|
617
|
+
* import * as BunCrypto from "@effect/platform-bun/BunCrypto"
|
|
618
|
+
* import { Search, VirtualFileSystem as Vfs } from "@effect-vfs/core"
|
|
619
|
+
* import { Effect } from "effect"
|
|
620
|
+
*
|
|
621
|
+
* const program = Effect.gen(function*() {
|
|
622
|
+
* const volume = yield* Vfs.fromFixture({ entries: [
|
|
623
|
+
* { kind: "file", path: "/a.ts", bytes: new Uint8Array() },
|
|
624
|
+
* { kind: "file", path: "/b.ts", bytes: new Uint8Array() }
|
|
625
|
+
* ] })
|
|
626
|
+
* return yield* Search.glob(yield* volume.snapshot, {
|
|
627
|
+
* root: "/", include: ["*.ts"], limits: { maxResults: 1 }
|
|
628
|
+
* })
|
|
629
|
+
* })
|
|
630
|
+
* Effect.runPromise(program.pipe(Effect.provide(BunCrypto.layer))).then((report) => {
|
|
631
|
+
* console.log(report.results, report.completion._tag)
|
|
632
|
+
* })
|
|
633
|
+
* // [ "a.ts" ] Stopped
|
|
634
|
+
* ```
|
|
635
|
+
*
|
|
636
|
+
* @category operations
|
|
637
|
+
* @since 0.8.0
|
|
638
|
+
*/
|
|
639
|
+
export declare const glob: (snapshot: Snapshot, query: GlobQuery) => Effect.Effect<GlobReport, GlobFailure>;
|
|
640
|
+
/**
|
|
641
|
+
* Stream one result per matching line after classifying the complete file for
|
|
642
|
+
* strict UTF-8 and NUL. Each row contains the first whole-match byte range and
|
|
643
|
+
* a UTF-8-bounded excerpt beginning at the match. Files and hard-link names are
|
|
644
|
+
* selected independently; invalid, binary and oversized files are skipped.
|
|
645
|
+
*
|
|
646
|
+
* A budget failure can follow earlier rows. A prefix establishes no completion;
|
|
647
|
+
* use `lines` for coverage and skip counters. Each evaluation owns fresh state.
|
|
648
|
+
* Native regex can block within one call; Effect timeouts cannot preempt it.
|
|
649
|
+
*
|
|
650
|
+
* @example
|
|
651
|
+
* ```ts
|
|
652
|
+
* import * as BunCrypto from "@effect/platform-bun/BunCrypto"
|
|
653
|
+
* import { Search, VirtualFileSystem as Vfs } from "@effect-vfs/core"
|
|
654
|
+
* import { Effect, Stream } from "effect"
|
|
655
|
+
*
|
|
656
|
+
* const program = Effect.gen(function*() {
|
|
657
|
+
* const volume = yield* Vfs.fromFixture({ entries: [
|
|
658
|
+
* { kind: "file", path: "/note", bytes: new TextEncoder().encode("πTODO\n") }
|
|
659
|
+
* ] })
|
|
660
|
+
* return yield* Stream.runCollect(Search.scanLines(yield* volume.snapshot, {
|
|
661
|
+
* root: "/", include: ["**"], pattern: Search.Pattern.cases.Literal.make({ pattern: "TODO" })
|
|
662
|
+
* }))
|
|
663
|
+
* })
|
|
664
|
+
* Effect.runPromise(program.pipe(Effect.provide(BunCrypto.layer))).then((rows) => {
|
|
665
|
+
* console.log(rows[0]?.range)
|
|
666
|
+
* })
|
|
667
|
+
* // { start: 4, end: 8 }
|
|
668
|
+
* ```
|
|
669
|
+
*
|
|
670
|
+
* @category operations
|
|
671
|
+
* @since 0.8.0
|
|
672
|
+
*/
|
|
673
|
+
export declare const scanLines: (snapshot: Snapshot, query: ContentQuery) => Stream.Stream<LineResult, ScanContentFailure>;
|
|
674
|
+
/**
|
|
675
|
+
* Collect matching lines, preceding rows, skips, work and completion. Catch only
|
|
676
|
+
* budget exhaustion; query, pattern and snapshot failures remain typed failures,
|
|
677
|
+
* and interruption propagates. Reaching the result cap reports `Stopped` with
|
|
678
|
+
* no lookahead, even for the last possible result.
|
|
679
|
+
*
|
|
680
|
+
* Raw row bytes are UTF-8 path and excerpt bytes plus 16 bytes for the range.
|
|
681
|
+
* Scalar metadata is excluded; this is not heap or serialized JSON accounting.
|
|
682
|
+
* Complete classification charges full eligible file bytes, including skips and
|
|
683
|
+
* repeated hard-link scans. Empty files have no lines.
|
|
684
|
+
*
|
|
685
|
+
* @category operations
|
|
686
|
+
* @since 0.8.0
|
|
687
|
+
*/
|
|
688
|
+
export declare const lines: (snapshot: Snapshot, query: ContentQuery) => Effect.Effect<LinesReport, ContentFailure>;
|
|
689
|
+
/**
|
|
690
|
+
* Stream one root-relative filename per matching regular-file path. Classify
|
|
691
|
+
* the complete file before testing lines and stop matching after the first hit.
|
|
692
|
+
* Build no line-result ranges or excerpts. Budget exhaustion fails the Stream;
|
|
693
|
+
* use `files` for coverage and skip counters.
|
|
694
|
+
*
|
|
695
|
+
* @category operations
|
|
696
|
+
* @since 0.8.0
|
|
697
|
+
*/
|
|
698
|
+
export declare const scanFiles: (snapshot: Snapshot, query: ContentQuery) => Stream.Stream<string, ScanContentFailure>;
|
|
699
|
+
/**
|
|
700
|
+
* Collect matching filenames with preceding rows, work, skips and completion.
|
|
701
|
+
* Shares text classification and matching with `lines`, but evaluates only as
|
|
702
|
+
* far as the first hit in each classified file. Raw result bytes count paths
|
|
703
|
+
* only; scanned bytes still charge the full selected file before classification.
|
|
704
|
+
*
|
|
705
|
+
* @category operations
|
|
706
|
+
* @since 0.8.0
|
|
707
|
+
*/
|
|
708
|
+
export declare const files: (snapshot: Snapshot, query: ContentQuery) => Effect.Effect<FilesReport, ContentFailure>;
|
|
709
|
+
/**
|
|
710
|
+
* Stream exact matching-line counts for completely scanned matching files.
|
|
711
|
+
* Multiple occurrences on one line count once. A stopped file emits no partial
|
|
712
|
+
* count; earlier completed rows can precede a budget failure. Builds no line
|
|
713
|
+
* ranges or excerpts. Use `countLines` when coverage information matters.
|
|
714
|
+
*
|
|
715
|
+
* @category operations
|
|
716
|
+
* @since 0.8.0
|
|
717
|
+
*/
|
|
718
|
+
export declare const scanCountLines: (snapshot: Snapshot, query: ContentQuery) => Stream.Stream<CountResult, ScanContentFailure>;
|
|
719
|
+
/**
|
|
720
|
+
* Collect exact per-file matching-line counts with work, skips and completion.
|
|
721
|
+
* A stopped or skipped query's summed counts are lower bounds for its original
|
|
722
|
+
* scope. Raw result accounting is UTF-8 path bytes plus 8 bytes per count;
|
|
723
|
+
* scalar metadata is excluded, as in the other content modes.
|
|
724
|
+
*
|
|
725
|
+
* @category operations
|
|
726
|
+
* @since 0.8.0
|
|
727
|
+
*/
|
|
728
|
+
export declare const countLines: (snapshot: Snapshot, query: ContentQuery) => Effect.Effect<CountLinesReport, ContentFailure>;
|
|
729
|
+
export {};
|
|
730
|
+
//# sourceMappingURL=Search.d.ts.map
|