dirsql 0.4.29 → 0.4.30
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/docs/reference/cli.md +44 -0
- package/docs/reference/sdk.md +19 -0
- package/package.json +6 -6
package/docs/reference/cli.md
CHANGED
|
@@ -460,3 +460,47 @@ Turn discovery off with either:
|
|
|
460
460
|
|
|
461
461
|
A plugin that declares itself but is missing its module or its `dirsql.toml`
|
|
462
462
|
fragment is a launcher error naming the package — never a silent skip.
|
|
463
|
+
|
|
464
|
+
## Progress reporting
|
|
465
|
+
|
|
466
|
+
Building the index over a large tree is not instant: the walk visits every
|
|
467
|
+
file, then each matched file costs one `on-file` round trip plus whatever the
|
|
468
|
+
table's `ddl` fires on insert. On a big corpus that is minutes. dirsql reports
|
|
469
|
+
the two phases on **stderr** while they run:
|
|
470
|
+
|
|
471
|
+
```
|
|
472
|
+
dirsql: scanning 128413 files
|
|
473
|
+
dirsql: indexing 9204/41231 files (22%)
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Each line is rewritten in place. When a phase ends its line is erased and
|
|
477
|
+
replaced by one summary of what it cost:
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
dirsql: scanned 128413 files in 4.2s
|
|
481
|
+
dirsql: indexed 41231 files in 3m12s
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
stdout is untouched — it carries the query result and nothing else.
|
|
485
|
+
|
|
486
|
+
By default this is **terminal-only, and only for work slow enough to wonder
|
|
487
|
+
about**: a phase that finishes in under half a second prints nothing at all,
|
|
488
|
+
and a run whose stderr is a pipe or a file prints nothing regardless of how
|
|
489
|
+
long it takes. `dirsql "…" 2>run.log` and `dirsql "…" | jq` are byte-for-byte
|
|
490
|
+
what they were before.
|
|
491
|
+
|
|
492
|
+
Override with `DIRSQL_PROGRESS`:
|
|
493
|
+
|
|
494
|
+
| Value | Effect |
|
|
495
|
+
|---|---|
|
|
496
|
+
| unset, or `auto` | Report only on a terminal, and only once a phase has run for half a second. The default. |
|
|
497
|
+
| `always`, `1`, `true` | Report from the first update, terminal or not. Use it to watch a scan whose stderr is redirected. |
|
|
498
|
+
| `never`, `0`, `false` | Report nothing, ever. |
|
|
499
|
+
|
|
500
|
+
Values are case-insensitive and surrounding whitespace is ignored; anything
|
|
501
|
+
unrecognized reads as `auto`, so a typo cannot stop a scan from running.
|
|
502
|
+
|
|
503
|
+
The setting is read by the **core**, not the CLI, so it governs an index built
|
|
504
|
+
from any SDK as well — a Python or TypeScript program that builds a `DirSQL`
|
|
505
|
+
with a terminal attached gets the same two phases on stderr, and the same
|
|
506
|
+
silence when piped.
|
package/docs/reference/sdk.md
CHANGED
|
@@ -396,3 +396,22 @@ not fit that range is a hard error, not a lossy conversion: Python raises
|
|
|
396
396
|
A TypeScript `bigint` **within** `i64` range maps to `INTEGER`. Only a real
|
|
397
397
|
`bytes`/`bytearray` (Python) or `Buffer`/`Uint8Array` (TypeScript) maps to
|
|
398
398
|
`BLOB` — a list/array of integers does not.
|
|
399
|
+
|
|
400
|
+
## Progress on construction
|
|
401
|
+
|
|
402
|
+
Constructing a `DirSQL` walks the tree and ingests every matched file, which
|
|
403
|
+
on a large corpus is the slowest thing your program does. The core reports
|
|
404
|
+
both phases on **stderr** while they run, then erases the live line and leaves
|
|
405
|
+
one summary of what each cost:
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
dirsql: indexed 41231 files in 3m12s
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
This is terminal-only by default, and only for a phase that runs longer than
|
|
412
|
+
half a second — a program whose stderr is a pipe, a file, or a log collector
|
|
413
|
+
sees nothing, whatever the scan costs. Set `DIRSQL_PROGRESS=never` to
|
|
414
|
+
guarantee silence even on a terminal, or `DIRSQL_PROGRESS=always` to report
|
|
415
|
+
regardless. The full table is in the
|
|
416
|
+
[CLI reference](cli.md#progress-reporting); the setting lives in the shared
|
|
417
|
+
core, so it behaves identically from all three SDKs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.30",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -213,10 +213,10 @@
|
|
|
213
213
|
]
|
|
214
214
|
},
|
|
215
215
|
"optionalDependencies": {
|
|
216
|
-
"@dirsql/lib-linux-x64-gnu": "0.4.
|
|
217
|
-
"@dirsql/lib-linux-arm64-gnu": "0.4.
|
|
218
|
-
"@dirsql/lib-darwin-x64": "0.4.
|
|
219
|
-
"@dirsql/lib-darwin-arm64": "0.4.
|
|
220
|
-
"@dirsql/lib-win32-x64-msvc": "0.4.
|
|
216
|
+
"@dirsql/lib-linux-x64-gnu": "0.4.30",
|
|
217
|
+
"@dirsql/lib-linux-arm64-gnu": "0.4.30",
|
|
218
|
+
"@dirsql/lib-darwin-x64": "0.4.30",
|
|
219
|
+
"@dirsql/lib-darwin-arm64": "0.4.30",
|
|
220
|
+
"@dirsql/lib-win32-x64-msvc": "0.4.30"
|
|
221
221
|
}
|
|
222
222
|
}
|