dirsql 0.4.100 → 0.4.101
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.
|
@@ -67,5 +67,6 @@ why indexes belong to only one of them, are in
|
|
|
67
67
|
- Paths outside the root resolve too — `'/var/log/*.log'`, `'../notes'`,
|
|
68
68
|
`'~/notes/*.md'` — reporting absolute paths
|
|
69
69
|
([path-tables reference](../reference/path-tables.md#paths-outside-the-index-root)).
|
|
70
|
-
-
|
|
71
|
-
not drown in machinery
|
|
70
|
+
- `.git/` is skipped by default, and a git repo's `.gitignore` hides what it
|
|
71
|
+
lists, so a bare `'./**'` does not drown in machinery
|
|
72
|
+
([skip rules](../reference/path-tables.md#skip-rules)).
|
package/docs/reference/cli.md
CHANGED
|
@@ -249,7 +249,7 @@ Config flags are subcommand-local: pass them after `server`
|
|
|
249
249
|
| `--port <n>` | `7117` | TCP port to bind. |
|
|
250
250
|
| `--cors-origin <origin>` | off | Let browser pages on `<origin>` (an exact origin such as `http://localhost:3202`, or `*` for any) call `/query` and open `/events`. See [Cross-origin requests](#cross-origin-requests). |
|
|
251
251
|
| `--persist [<path>]` | off | Keep the SQLite index on disk between runs so a restart only re-parses files that actually changed. Bare `--persist` caches at `<root>/.dirsql/cache.db`; `--persist <path>` caches at `<path>`. Off by default (the index is ephemeral). Also available on [`dirsql query`](#dirsql-query). See [Keep the index across restarts](../howto/persist.md). |
|
|
252
|
-
| `--no-ignore` | off | Scan files a `.gitignore` would hide. [Path-tables](./path-tables.md#skip-rules) respect `.gitignore` files by default; this flag restores the full walk. The built-in
|
|
252
|
+
| `--no-ignore` | off | Scan files a `.gitignore` would hide. [Path-tables](./path-tables.md#skip-rules) respect `.gitignore` files by default; this flag restores the full walk. The built-in `.git` skip and configured `ignore` patterns still apply. Also available on [`dirsql query`](#dirsql-query). |
|
|
253
253
|
| `--extension <path>` | none | Load a SQLite extension by literal path, overriding the config's `[[dirsql.extension]]` entries. Repeatable. Format: `<path>` or `<path>::<entrypoint>`. Internal plumbing for the pip/npm launchers, which resolve package-name extensions and pass the resolved paths here — not intended for direct use. When any `--extension` is present, the config file's own extension entries are not loaded. |
|
|
254
254
|
| `--version` | | Print the version and exit. |
|
|
255
255
|
| `--help` | | Print usage and exit. |
|
package/docs/reference/glob.md
CHANGED
|
@@ -70,7 +70,7 @@ A test runs every row against dirsql as a path-table and, with the leading
|
|
|
70
70
|
| --- | --- | --- |
|
|
71
71
|
| `./*.md` | `1.md`, `2.md`, `3.md`, `4.md`, `[a].md`, `[z.md`, `a.md`, `b.md`, `c.md`, `link.md`, `my file.md`, `top.md`, `{q}.md` | |
|
|
72
72
|
| `./**/*.md` | `1.md`, `2.md`, `3.md`, `4.md`, `[a].md`, `[z.md`, `a.md`, `b.md`, `c.md`, `docs/api.md`, `docs/guide.md`, `docs/nested/deep.md`, `link.md`, `linkdir/r.md`, `my file.md`, `real/r.md`, `top.md`, `{q}.md` | |
|
|
73
|
-
| `./**` | `1.md`, `2.md`, `3.md`, `4.md`, `[a].md`, `[z.md`, `a.md`, `b.md`, `c.md`, `docs/api.md`, `docs/guide.md`, `docs/nested/deep.md`, `link.md`, `my file.md`, `real/r.md`, `top.md`, `x.txt`, `{q}.md` | |
|
|
73
|
+
| `./**` | `1.md`, `2.md`, `3.md`, `4.md`, `[a].md`, `[z.md`, `a.md`, `b.md`, `c.md`, `docs/api.md`, `docs/guide.md`, `docs/nested/deep.md`, `link.md`, `my file.md`, `node_modules/pkg/index.js`, `real/r.md`, `top.md`, `x.txt`, `{q}.md` | |
|
|
74
74
|
| `./?.md` | `1.md`, `2.md`, `3.md`, `4.md`, `a.md`, `b.md`, `c.md` | |
|
|
75
75
|
| `./[ab].md` | `a.md`, `b.md` | |
|
|
76
76
|
| `./[!a].md` | `1.md`, `2.md`, `3.md`, `4.md`, `b.md`, `c.md` | |
|
|
@@ -96,7 +96,7 @@ A test runs every row against dirsql as a path-table and, with the leading
|
|
|
96
96
|
| `./*/` | `docs/api.md`, `docs/guide.md`, `linkdir/r.md`, `real/r.md` | directory-name |
|
|
97
97
|
| `./d*` | none | files-only |
|
|
98
98
|
| `./*.log` | none | gitignore |
|
|
99
|
-
| `./**/*.js` |
|
|
99
|
+
| `./**/*.js` | `node_modules/pkg/index.js` | |
|
|
100
100
|
| `./node_modules/*/index.js` | `node_modules/pkg/index.js` | |
|
|
101
101
|
| `./docs/**/*.md` | `docs/api.md`, `docs/guide.md`, `docs/nested/deep.md` | |
|
|
102
102
|
| `./docs/*.md` | `docs/api.md`, `docs/guide.md` | |
|
|
@@ -111,7 +111,6 @@ A test runs every row against dirsql as a path-table and, with the leading
|
|
|
111
111
|
| `gitignore` | Inside a git repo, `.gitignore` files hide matching files and directories. `--no-ignore` turns it off. | A query over a repo should not drown in build output. |
|
|
112
112
|
| `directory-name` | A pattern's last component that names a directory lists the files directly inside it, like `ls docs`. A trailing `/` is `*` appended. | A table is rows of files, and `ls` is the shell habit. |
|
|
113
113
|
| `files-only` | A pattern that matches a directory but no file returns nothing. | Every row is a file. |
|
|
114
|
-
| `node-modules` | A `node_modules` directory is skipped unless the pattern spells its name. | A zero-config `./**` should not walk dependencies. |
|
|
115
114
|
| `absolute` | `/`, `~/` and `../` patterns report absolute `path` values, with `..` folded out textually. | The scanned root is derived from the pattern, so there is no relative base. |
|
|
116
115
|
|
|
117
116
|
`.git` needs no rule of its own: the dotfile rule hides it.
|
|
@@ -198,8 +198,8 @@ over a very large table. Its output *is* the table:
|
|
|
198
198
|
```
|
|
199
199
|
dirsql_parsed: parser produced no rows for `posts/*.md`; cannot infer a schema
|
|
200
200
|
```
|
|
201
|
-
- **The skip rules still apply.** A parsed scan honors the same `
|
|
202
|
-
|
|
201
|
+
- **The skip rules still apply.** A parsed scan honors the same `.git`
|
|
202
|
+
/`ignore` rules a stat scan does (see below).
|
|
203
203
|
- **The parser runs on every start.** A parsed path-table is not kept in the
|
|
204
204
|
[persistent cache](/howto/persist); declared tables are.
|
|
205
205
|
|
|
@@ -251,14 +251,9 @@ choice is stated as one trade in
|
|
|
251
251
|
A path-table scan applies the same [`ignore`](/reference/config) patterns your
|
|
252
252
|
declared tables use — matched against root-relative paths under the same
|
|
253
253
|
[glob rule](/reference/config#glob-rule) as the path itself, `*` one level and
|
|
254
|
-
`**` any depth — plus
|
|
255
|
-
`
|
|
256
|
-
|
|
257
|
-
- `**/node_modules/**`
|
|
258
|
-
- `**/.git/**`
|
|
259
|
-
|
|
260
|
-
Both apply at any depth, so a `node_modules` nested inside a subdirectory is
|
|
261
|
-
skipped just like one at the top.
|
|
254
|
+
`**` any depth — plus one built-in default, `**/.git/**`, which applies at any depth.
|
|
255
|
+
`node_modules` is an ordinary directory: a `.gitignore` that lists it hides it,
|
|
256
|
+
as it hides any other.
|
|
262
257
|
|
|
263
258
|
### `.gitignore`
|
|
264
259
|
|
|
@@ -266,9 +261,7 @@ Path-table scans also respect `.gitignore` files by default, inside a git
|
|
|
266
261
|
repo, the way git, fd and ripgrep do: a `.gitignore` applies below its own
|
|
267
262
|
directory, deeper files override shallower ones, `!pattern` re-includes, and
|
|
268
263
|
an ignored directory is pruned rather than walked. In a typical repo this
|
|
269
|
-
excludes build output, virtualenvs, and caches with zero ceremony.
|
|
270
|
-
built-in defaults above remain as a floor for directories with no
|
|
271
|
-
`.gitignore` at all.
|
|
264
|
+
excludes build output, virtualenvs, and caches with zero ceremony.
|
|
272
265
|
|
|
273
266
|
A `.gitignore` is in force only when a directory holding `.git` encloses it.
|
|
274
267
|
Outside a repo none applies, at the scan's start, above it or below it: a
|
|
@@ -280,7 +273,7 @@ applies, including those above the directory a scan starts in, so
|
|
|
280
273
|
Pass [`--no-ignore`](./cli.md#flags) to restore the full walk — the
|
|
281
274
|
determinism switch for scripted use, since results otherwise depend on
|
|
282
275
|
`.gitignore` state. It disables only the `.gitignore` respect; the built-in
|
|
283
|
-
|
|
276
|
+
default and configured `ignore` patterns still apply.
|
|
284
277
|
|
|
285
278
|
### Naming a skipped directory
|
|
286
279
|
|
|
@@ -288,23 +281,13 @@ Skip rules are judged from the directory the scan starts in, so pointing at a
|
|
|
288
281
|
skipped directory — built-in or gitignored — still scans it:
|
|
289
282
|
|
|
290
283
|
```sql
|
|
291
|
-
SELECT path FROM '
|
|
292
|
-
SELECT path FROM './node_modules/*/package.json'; -- scans it anyway
|
|
284
|
+
SELECT path FROM './.git/*'; -- scans .git anyway
|
|
293
285
|
SELECT path FROM './dist'; -- scans dist/ even when gitignored
|
|
294
286
|
```
|
|
295
287
|
|
|
296
288
|
The `.gitignore` files in force there, including those above it, still
|
|
297
289
|
filter what lies beneath it.
|
|
298
290
|
|
|
299
|
-
A `node_modules` component after a glob names it too, at any depth:
|
|
300
|
-
|
|
301
|
-
```sql
|
|
302
|
-
SELECT path FROM './**/node_modules/*/package.json'; -- every node_modules
|
|
303
|
-
SELECT path FROM './*/node_modules/**'; -- one level down
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
Only the literal name counts; `'./**/*.js'` still skips every `node_modules`.
|
|
307
|
-
|
|
308
291
|
### Hidden files
|
|
309
292
|
|
|
310
293
|
A path component starting with `.` is skipped unless the path spells it, the
|
package/docs/reference/sdk.md
CHANGED
|
@@ -123,7 +123,7 @@ shortcut was removed in #603 — use
|
|
|
123
123
|
matched files are skipped entirely (scan and watch).
|
|
124
124
|
- `no_ignore` / `noIgnore` — Scan files a `.gitignore` would hide.
|
|
125
125
|
[Path-tables](./path-tables.md#skip-rules) respect `.gitignore` files by
|
|
126
|
-
default; the built-in
|
|
126
|
+
default; the built-in `.git` skip and any `ignore` patterns
|
|
127
127
|
still apply. The CLI's [`--no-ignore`](./cli.md#flags).
|
|
128
128
|
- `config` — Path to a [`.dirsql.toml`](./config.md). Its `[[table]]`
|
|
129
129
|
entries are appended after any programmatic `tables`; its `ignore`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.101",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -221,10 +221,10 @@
|
|
|
221
221
|
]
|
|
222
222
|
},
|
|
223
223
|
"optionalDependencies": {
|
|
224
|
-
"@dirsql/lib-linux-x64-gnu": "0.4.
|
|
225
|
-
"@dirsql/lib-linux-arm64-gnu": "0.4.
|
|
226
|
-
"@dirsql/lib-darwin-x64": "0.4.
|
|
227
|
-
"@dirsql/lib-darwin-arm64": "0.4.
|
|
228
|
-
"@dirsql/lib-win32-x64-msvc": "0.4.
|
|
224
|
+
"@dirsql/lib-linux-x64-gnu": "0.4.101",
|
|
225
|
+
"@dirsql/lib-linux-arm64-gnu": "0.4.101",
|
|
226
|
+
"@dirsql/lib-darwin-x64": "0.4.101",
|
|
227
|
+
"@dirsql/lib-darwin-arm64": "0.4.101",
|
|
228
|
+
"@dirsql/lib-win32-x64-msvc": "0.4.101"
|
|
229
229
|
}
|
|
230
230
|
}
|