-
-
Notifications
You must be signed in to change notification settings - Fork 271
Expand file tree
/
Copy pathkiira.config.ts
More file actions
84 lines (83 loc) · 3.52 KB
/
Copy pathkiira.config.ts
File metadata and controls
84 lines (83 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { defineConfig } from 'kiira-core'
export default defineConfig({
include: ['docs/**/*.md'],
exclude: [
// docs/reference/** is auto-generated by TypeDoc (`pnpm generate-docs`);
// hand-fixing those snippets would be overwritten on regeneration.
'docs/reference/**',
// @tanstack/ai-angular is an ng-packagr bundle: its only published entry
// is dist/types/*.d.ts, which kiira's dist->src heuristic can't map back
// to a source file (unlike every other package's dist/esm/index.d.ts ->
// src/index.ts). So these docs only resolve against the built package,
// which isn't available during a source-based docs check. Excluded until
// ai-angular exposes a source-resolvable entry.
'docs/api/ai-angular.md',
'docs/getting-started/quick-start-angular.md',
// docs/superpowers/** are internal planning/spec artifacts (design docs and
// implementation plans), not published, curated examples. Their snippets are
// illustrative pseudo-code, not meant to compile against package source.
'docs/superpowers/**',
],
defaultValidate: 'type',
languages: ['ts', 'tsx', 'js', 'jsx'],
// Third-party packages the docs import but the workspace doesn't depend on.
// kiira installs these into an isolated cache (node_modules/.kiira) and
// type-checks against them, so snippets that show real integrations (Vercel
// AI SDK migration, community adapters, redis/pino/otel/express/hono, other
// schema libs) are validated instead of `ignore`d.
externalPackages: {
// Vercel AI SDK (migration / comparison "before" examples)
ai: '^6.0.0',
'@ai-sdk/openai': '^3.0.0',
'@ai-sdk/anthropic': '^3.0.0',
'@ai-sdk/google': '^3.0.0',
'@ai-sdk/react': '^3.0.0',
// Provider SDKs / schema libraries shown in examples
openai: '^6.0.0',
arktype: '^2.0.0',
valibot: '^1.0.0',
'@valibot/to-json-schema': '^1.0.0',
'@modelcontextprotocol/sdk': '^1.29.0',
// Server / infra libraries used by real integration examples.
// (express is intentionally NOT declared here: it's already a transitive
// dependency in the workspace node_modules without its @types, which
// shadows any cache copy — so those two express snippets stay `ignore`d.)
hono: '^4.0.0',
'@hono/node-server': '^2.0.0',
redis: '^6.0.0',
pino: '^10.0.0',
'@opentelemetry/api': '^1.9.0',
// Community adapters (each documented page imports its published package)
'@cloudflare/tanstack-ai': '^0.1.0',
'@decartai/tanstack-ai-adapter': '^0.0.2',
'@mynthio/tanstack-ai-adapter': '^0.0.14',
'@cencori/ai-sdk': '^0.4.0',
'@soniox/tanstack-ai-adapter': '^0.1.2',
},
overrides: [
// React (and anything not overridden below) uses the automatic JSX
// runtime so snippets don't need an explicit `import React`.
// noImplicitReturns is off: doc snippets routinely show callbacks that
// return on some branches and fall through on others (e.g. a middleware
// hook that returns a decision or continues), which is valid and shouldn't
// force an explicit return type or trailing `return`.
{
include: ['docs/**/*.md'],
jsx: 'react-jsx',
jsxImportSource: 'react',
noImplicitReturns: false,
},
// Solid snippets compile JSX through solid-js.
{
include: ['docs/api/ai-solid.md'],
jsx: 'preserve',
jsxImportSource: 'solid-js',
},
// Preact snippets compile JSX through preact.
{
include: ['docs/api/ai-preact.md'],
jsx: 'react-jsx',
jsxImportSource: 'preact',
},
],
})