mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Three phantom/path stragglers the prior normalization passes did not cover, all blocking the package build chain (`turbo run build --filter=./packages/*`): - packages/cli: `@hanzo/docs-cli/build` was imported by apps/docs + shared/radix-ui/base-ui registries but the cli package never exposed it. The real registry-build API is fuma-cli/compiler (cli already deps on fuma-cli). Add src/build.ts re-export + ./build export + tsdown entry so `@hanzo/docs-cli/build` resolves to the real symbols (compile, writeRegistry, Registry, Component, Reference, SubComponentReference, CompileOptions). - packages/hanzo-docs core/content/index.ts: barrel re-exported a bare fumadocs-core/content subpath that exists in no version (upstream or fork). Aggregate the real sibling modules (./github + ./toc) instead — no symbol collision (getGithubLastEdit vs getTableOfContents). - packages/openapi src/ui/client/full.tsx: import of ./components/codeblock resolved one dir too shallow (file lives in src/ui/client/, codeblock in src/ui/components/). Fix to ../components/codeblock, matching create-client.tsx. Verified: full package chain builds green from cold cache (29/29, node 24.18).
32 lines
737 B
TypeScript
32 lines
737 B
TypeScript
import { defineConfig } from 'tsdown';
|
|
import fs from 'node:fs/promises';
|
|
import { createConfigSchema } from './src/config.ts';
|
|
import { z } from 'zod';
|
|
|
|
export default defineConfig({
|
|
entry: ['./src/{index,config,build}.ts', './src/registry/installer.ts'],
|
|
format: 'esm',
|
|
dts: true,
|
|
fixedExtension: false,
|
|
target: 'node22',
|
|
deps: {
|
|
onlyBundle: [],
|
|
},
|
|
exports: {
|
|
enabled: true,
|
|
exclude: ['./index'],
|
|
},
|
|
async onSuccess() {
|
|
console.log('JSON schema generated');
|
|
await fs.mkdir('dist/schema', { recursive: true });
|
|
await fs.writeFile(
|
|
'dist/schema.json',
|
|
JSON.stringify(
|
|
z.toJSONSchema(await createConfigSchema(), {
|
|
io: 'input',
|
|
}),
|
|
),
|
|
);
|
|
},
|
|
});
|