dirsql 0.3.100 → 0.3.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.
@@ -45,7 +45,7 @@ requests, closes open `/events` streams, and exits.
45
45
 
46
46
  | Flag | Default | Description |
47
47
  |---|---|---|
48
- | `-c, --config <path>` | `./.dirsql.toml` | Path to the [config file](./config.md). The index is always rooted at the **invocation directory** (the current working directory), regardless of where this file lives — so `--config /elsewhere/.dirsql.toml` still indexes the directory you ran `dirsql` from. When the file does not exist, the server runs in [zero-config mode](#zero-config-mode). |
48
+ | `-c, --config <path>` | `./.dirsql.toml` | Path to a [config file](./config.md). **Repeatable** (`-c a -c b`): the configs load and merge in argv order — see [Composing multiple configs](./config.md#composing-multiple-configs). The index is always rooted at the **invocation directory** (the current working directory), regardless of where a config lives — so `--config /elsewhere/.dirsql.toml` still indexes the directory you ran `dirsql` from. With none given, `./.dirsql.toml` is used; when it does not exist, the server runs in [zero-config mode](#zero-config-mode). |
49
49
  | `--host <addr>` | `localhost` | Bind address. |
50
50
  | `--port <n>` | `7117` | TCP port to bind. |
51
51
  | `--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). Global — also honored by [`dirsql query`](#dirsql-query). See [Keep the index across restarts](../howto/persist.md). |
@@ -131,6 +131,38 @@ by the command wins over a same-named fact. Output that is not a JSON array
131
131
  of objects is a per-file failure: the file is skipped with a stderr warning
132
132
  and the scan continues (see [failure semantics](./hooks.md#failure-semantics)).
133
133
 
134
+ ## Composing multiple configs
135
+
136
+ Pass [`-c`/`--config`](./cli.md#flags) more than once to compose several config
137
+ files — a shared team config plus local overrides, or a plugin's config
138
+ alongside your own:
139
+
140
+ ```bash
141
+ dirsql -c ./.dirsql.toml -c ~/team/embeddings.toml -c ./local.toml
142
+ ```
143
+
144
+ The configs load and merge in **argv order**:
145
+
146
+ - **`[[table]]`, `ignore`, and `[[dirsql.extension]]` entries accumulate** across
147
+ all configs, in order.
148
+ - **Each config's `on-file`, `pre-query`, and `post-query` hooks run from that
149
+ config file's own directory**, under that config's own
150
+ [`hook-timeout`](#dirsql-keys) — so a relative command like
151
+ `on-file = "sh ./extract.sh"` resolves against the config that declared it,
152
+ wherever it lives.
153
+ - **`pre-query` / `post-query` hooks chain FIFO**: the request body flows through
154
+ each `pre-query` stage in order to the final SQL, and the result rows flow
155
+ through each `post-query` stage to the response. See the
156
+ [hook contract](./hooks.md).
157
+ - Each config is **validated on its own** (the [parse errors](#parse-errors)
158
+ below apply per file). There is no cross-file merge validation, with one
159
+ structural exception: **two configs defining a table of the same name is an
160
+ error**, naming the table.
161
+
162
+ The index [root](./cli.md#flags) is the invocation directory regardless of where
163
+ any config lives. With no `-c`, `./.dirsql.toml` is used; a single `-c` behaves
164
+ exactly as before.
165
+
134
166
  ## Parse errors
135
167
 
136
168
  Loading fails (the CLI enters [degraded mode](./cli.md#degraded-mode); the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirsql",
3
- "version": "0.3.100",
3
+ "version": "0.3.101",
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.3.100",
216
- "@dirsql/lib-linux-arm64-gnu": "0.3.100",
217
- "@dirsql/lib-darwin-x64": "0.3.100",
218
- "@dirsql/lib-darwin-arm64": "0.3.100",
219
- "@dirsql/lib-win32-x64-msvc": "0.3.100",
220
- "@dirsql/cli-linux-x64-gnu": "0.3.100",
221
- "@dirsql/cli-linux-arm64-gnu": "0.3.100",
222
- "@dirsql/cli-darwin-x64": "0.3.100",
223
- "@dirsql/cli-darwin-arm64": "0.3.100",
224
- "@dirsql/cli-win32-x64-msvc": "0.3.100"
215
+ "@dirsql/lib-linux-x64-gnu": "0.3.101",
216
+ "@dirsql/lib-linux-arm64-gnu": "0.3.101",
217
+ "@dirsql/lib-darwin-x64": "0.3.101",
218
+ "@dirsql/lib-darwin-arm64": "0.3.101",
219
+ "@dirsql/lib-win32-x64-msvc": "0.3.101",
220
+ "@dirsql/cli-linux-x64-gnu": "0.3.101",
221
+ "@dirsql/cli-linux-arm64-gnu": "0.3.101",
222
+ "@dirsql/cli-darwin-x64": "0.3.101",
223
+ "@dirsql/cli-darwin-arm64": "0.3.101",
224
+ "@dirsql/cli-win32-x64-msvc": "0.3.101"
225
225
  }
226
226
  }