Repository navigation
[FEAT]: Generic search UI, read-only existing servers and 4 new templates - #7
Nikhiladiga wants to merge 16 commits into
Conversation
… the CLI finishes
| * that change nothing when the key has it: an id that no document has, an empty | ||
| * import, and bodies that Typesense rejects as invalid. Measured on Typesense 30. | ||
| */ | ||
| function writeProbes(collection: string): [string, string, string | undefined, string][] { |
There was a problem hiding this comment.
This list can go stale over time.
Could we go back to how master did this? Take the admin key once, use it to read the schemas, and create a documents:search key scoped to the chosen collections (createSearchOnlyKey already does this). Then the browser key is safe by construction and we can drop these probes.
With the probes we have to list every write route ourselves, and that list goes stale every time we add a new one to Typesense Server. For eg, analytics, conversation models and NL search models are already missing, and a key with collections:delete gets through this probe already.
There was a problem hiding this comment.
Done in 00a8c2c. The CLI now takes the admin key, uses it for that run only to read the schemas, and creates a documents:search key scoped to the chosen collections and each alias's target. The admin key is never written to disk. The probes, the curl step and the clipboard helper are gone.
One related change: createSearchOnlyKey deleted every key with the shared description, so on a shared server a second project would have removed the first project's key. The description now includes the project name and a hash of its path, so a re-run replaces only its own key.
Change Summary
typesense.config.json(schema + what to search, filter and show), so the UI works with any collection, not only books.--server-url,--collections,--api-key-stdin. Several collections and aliases, with one query to all of them. The CLI never changes the server./health.--yes)..gitignorewhen the starter does not ignore it (Vite and Angular starters did not).npm run e2eper template, and a new test suite grouped by feature (51 tests, one against a real Typesense in Docker).package.json.Breaking changes (hence 0.2.0)
--dataset emptyis removed; a local server always loads the books sample.Testing
npm run check(lint, typecheck, 51 tests incl. Docker).npm run e2e -- vanilla.PR Checklist