Files
docs/vitest.config.ts
hanzo-dev e90bc49760 docs: re-index on build, and gate pages against the document
Two things the build was carrying quietly.

post-build has thrown MODULE_NOT_FOUND on every build since March, when Orama
was replaced by Hanzo Search and lib/orama was deleted — but it kept calling
`await import('./update-orama-index.ts')`, and the throw landed in a catch that
only logs. Green build, and docs.hanzo.ai's search index has not been rebuilt
since. Call the indexer the repo actually has, statically, so a missing one is
a type error rather than a runtime surprise. Indexing stays non-fatal: a search
outage must not stop a deploy — it just must not hide either.

check-endpoints now runs at the end of pre-build. Generated pages that name an
endpoint the document does not have fail the build; authored prose that does is
counted and listed, because reconciling it is an editorial call. Today: 546
mentions checked, generated pages clean, 153 in authored prose — most of them
products hanzoai/openapi has since dropped as authored-but-served-nowhere.

vitest's projects list gains apps/docs (not apps/*, since apps/platform/e2e is
Playwright's) so the SDK-naming tests that pin the four surfaces actually run in
CI instead of sitting in a directory the runner never visits.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-31 08:42:52 -07:00

10 lines
256 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// `apps/docs` and not `apps/*`: apps/platform/e2e holds Playwright specs,
// which are not vitest's to run.
projects: ['packages/*', 'apps/docs'],
},
});