dirsql 0.4.6 → 0.4.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/docs/reference/cli.md +3 -0
- package/docs/reference/path-tables.md +34 -5
- package/package.json +11 -11
package/docs/reference/cli.md
CHANGED
|
@@ -69,6 +69,7 @@ Config flags are subcommand-local: pass them after `server`
|
|
|
69
69
|
| `--host <addr>` | `localhost` | Bind address. |
|
|
70
70
|
| `--port <n>` | `7117` | TCP port to bind. |
|
|
71
71
|
| `--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). |
|
|
72
|
+
| `--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 skips (`node_modules`/`.git`) and configured `ignore` patterns still apply. Also available on [`dirsql query`](#dirsql-query). |
|
|
72
73
|
| `--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. |
|
|
73
74
|
| `--version` | | Print the version and exit. |
|
|
74
75
|
| `--help` | | Print usage and exit. |
|
|
@@ -163,6 +164,8 @@ uses**, so behavior is identical to `POST /query` by construction:
|
|
|
163
164
|
on-disk cache. Because its value is optional, place a bare `--persist` after
|
|
164
165
|
the SQL (`dirsql query "SELECT …" --persist`) or use the `=` form
|
|
165
166
|
(`--persist=/path`) so it does not swallow the SQL argument.
|
|
167
|
+
- **`--no-ignore`** is honored: path-tables in the query scan files a
|
|
168
|
+
`.gitignore` would hide. See [Skip rules](./path-tables.md#skip-rules).
|
|
166
169
|
- **Hooks** ([`pre-query`](./hooks.md#pre-query) /
|
|
167
170
|
[`post-query`](./hooks.md#post-query)) and the
|
|
168
171
|
[`[dirsql].hook-timeout`](./config.md#dirsql-keys) apply identically.
|
|
@@ -179,19 +179,48 @@ A path-table scan applies the same [`ignore`](/reference/config) patterns your
|
|
|
179
179
|
declared tables use, plus two built-in defaults so a zero-config
|
|
180
180
|
`SELECT * FROM './'` does not drown in machinery:
|
|
181
181
|
|
|
182
|
-
-
|
|
183
|
-
-
|
|
182
|
+
- `**/node_modules/**`
|
|
183
|
+
- `**/.git/**`
|
|
184
|
+
|
|
185
|
+
Both apply at any depth, so a `node_modules` nested inside a subdirectory is
|
|
186
|
+
skipped just like one at the top.
|
|
187
|
+
|
|
188
|
+
### `.gitignore`
|
|
189
|
+
|
|
190
|
+
Path-table scans also respect `.gitignore` files by default, the way fd and
|
|
191
|
+
ripgrep do: a `.gitignore` anywhere in the tree applies below its own
|
|
192
|
+
directory, deeper files override shallower ones, `!pattern` re-includes, and
|
|
193
|
+
an ignored directory is pruned rather than walked. In a typical repo this
|
|
194
|
+
excludes build output, virtualenvs, and caches with zero ceremony. No `.git`
|
|
195
|
+
directory is required — a `.gitignore` in any scanned directory counts — and
|
|
196
|
+
the built-in defaults above remain as a floor for directories with no
|
|
197
|
+
`.gitignore` at all.
|
|
198
|
+
|
|
199
|
+
Pass [`--no-ignore`](./cli.md#flags) to restore the full walk — the
|
|
200
|
+
determinism switch for scripted use, since results otherwise depend on
|
|
201
|
+
`.gitignore` state. It disables only the `.gitignore` respect; the built-in
|
|
202
|
+
defaults and configured `ignore` patterns still apply.
|
|
203
|
+
|
|
204
|
+
### Naming a skipped directory
|
|
184
205
|
|
|
185
206
|
Skip rules are judged on the part of the path *below* what you named outright,
|
|
186
|
-
so pointing at a skipped directory still scans it:
|
|
207
|
+
so pointing at a skipped directory — built-in or gitignored — still scans it:
|
|
187
208
|
|
|
188
209
|
```sql
|
|
189
210
|
SELECT path FROM './'; -- no node_modules rows
|
|
190
211
|
SELECT path FROM './node_modules/*/package.json'; -- scans it anyway
|
|
212
|
+
SELECT path FROM './dist'; -- scans dist/ even when gitignored
|
|
191
213
|
```
|
|
192
214
|
|
|
193
|
-
|
|
194
|
-
|
|
215
|
+
A `.gitignore` at or below the directory you named still filters beneath it;
|
|
216
|
+
only rules inherited from above it are set aside.
|
|
217
|
+
|
|
218
|
+
### Hidden files
|
|
219
|
+
|
|
220
|
+
Dotfiles are ordinary files: `'./'` and `'./*'` include them, with or without
|
|
221
|
+
`--no-ignore`. This is a deliberate divergence from fd/ripgrep — querying
|
|
222
|
+
dotfile directories (`.claude/`, …) is a first-class `dirsql` use case. Add an
|
|
223
|
+
`ignore` pattern if you would rather not see them.
|
|
195
224
|
|
|
196
225
|
## Joining against declared tables
|
|
197
226
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -212,15 +212,15 @@
|
|
|
212
212
|
]
|
|
213
213
|
},
|
|
214
214
|
"optionalDependencies": {
|
|
215
|
-
"@dirsql/lib-linux-x64-gnu": "0.4.
|
|
216
|
-
"@dirsql/lib-linux-arm64-gnu": "0.4.
|
|
217
|
-
"@dirsql/lib-darwin-x64": "0.4.
|
|
218
|
-
"@dirsql/lib-darwin-arm64": "0.4.
|
|
219
|
-
"@dirsql/lib-win32-x64-msvc": "0.4.
|
|
220
|
-
"@dirsql/cli-linux-x64-gnu": "0.4.
|
|
221
|
-
"@dirsql/cli-linux-arm64-gnu": "0.4.
|
|
222
|
-
"@dirsql/cli-darwin-x64": "0.4.
|
|
223
|
-
"@dirsql/cli-darwin-arm64": "0.4.
|
|
224
|
-
"@dirsql/cli-win32-x64-msvc": "0.4.
|
|
215
|
+
"@dirsql/lib-linux-x64-gnu": "0.4.7",
|
|
216
|
+
"@dirsql/lib-linux-arm64-gnu": "0.4.7",
|
|
217
|
+
"@dirsql/lib-darwin-x64": "0.4.7",
|
|
218
|
+
"@dirsql/lib-darwin-arm64": "0.4.7",
|
|
219
|
+
"@dirsql/lib-win32-x64-msvc": "0.4.7",
|
|
220
|
+
"@dirsql/cli-linux-x64-gnu": "0.4.7",
|
|
221
|
+
"@dirsql/cli-linux-arm64-gnu": "0.4.7",
|
|
222
|
+
"@dirsql/cli-darwin-x64": "0.4.7",
|
|
223
|
+
"@dirsql/cli-darwin-arm64": "0.4.7",
|
|
224
|
+
"@dirsql/cli-win32-x64-msvc": "0.4.7"
|
|
225
225
|
}
|
|
226
226
|
}
|