typebot.io/package.json
Baptiste Arnaud 9d2d7ead8e
🔧 Restore OpenAPI docs generation pipeline (#2553)
## Summary

- Restores OpenAPI docs generation, lost in the oRPC migration: new
`generate-openapi` nx targets regenerate
`apps/docs/openapi/{builder,viewer}.json` offline from the oRPC routers,
reusing the exact options served by the live `/api/openapi.json`
endpoints. Both specs are regenerated in this PR (builder.json was stale
since March).
- Fixes spec generation crashing on the spaces router (Effect Schema had
no JSON Schema converter — this also breaks the live builder
`/api/openapi.json` today) and sanitizes an `AppendValue(s)` component
name that made Mintlify silently render every builder API page empty.
- Keeps the docs from going stale again: pre-commit regenerates affected
specs and auto-stages them, CI fails PRs with stale specs, and a new
check requires lockstep `@typebot.io/js` / `@typebot.io/react` version
bumps whenever embed files change.

## Test plan

- [x] `bunx nx generate-openapi builder viewer` produces valid OpenAPI
3.1 files matching the live endpoints (works without env: isolated-vm
stubbed, dummy DATABASE_URL auto-matched to the generated Prisma client)
- [x] All 34 `openapi:` references in `apps/docs/api-reference/*.mdx`
resolve against the new specs; pages verified rendering in `mintlify
dev` (params, unions, curl samples)
- [x] Embeds version check: fails when js or react files change without
both bumps, passes on the historical 0.10.5 bump commit, ignores
unrelated changes
- [x] Pre-commit pipeline (lint, tests, generation, embeds check) passes
end to end
- [ ] Confirm the "Check OpenAPI docs are up to date" step passes on
this PR

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 20:19:08 +02:00

86 lines
2.9 KiB
JSON

{
"name": "@typebot.io/root",
"version": "3.17.2",
"private": true,
"workspaces": [
"packages/*",
"packages/services/*",
"packages/deprecated/*",
"packages/embeds/*",
"packages/forge/*",
"packages/forge/blocks/*",
"packages/blocks/*",
"apps/*"
],
"nx": {
"targets": {
"typecheck": {
"dependsOn": [
{
"projects": [
"@typebot.io/react"
],
"target": "build"
}
]
}
}
},
"scripts": {
"postinstall": "cd packages/env && bun run compile && nx db:generate prisma",
"prepare": "husky && effect-language-service patch",
"pre-commit": "bash scripts/assert-embeds-version-bumped.sh && nx affected -t format-and-lint,lint-repo,check-broken-links,test,generate-openapi --parallel=4 && git add apps/docs/openapi",
"dev": "nx run-many --configuration=development -t dev,watch-deps -p builder,viewer,workflows,@typebot.io/partykit",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write --unsafe",
"lint-repo": "sherif -r unordered-dependencies -r packages-without-package-json --ignore-package @typebot.io/legacy --ignore-package bot-engine",
"lint-repo:fix": "bun run lint-repo --fix",
"patch-embed-libs": "bun packages/scripts/src/patchEmbedLibs.ts && bun install",
"start-docker-compose-dev": "docker compose -f docker-compose.dev.yml up",
"build-docker-compose-prod": "docker compose -f docker-compose.build.yml build",
"start-docker-compose-prod": "docker compose -f docker-compose.yml up",
"sync-locales": "dotenv -e .env -- tolgee sync --continue-on-warning --remove-unused --no-strict-namespace --patterns './apps/builder/src/**/*.ts?(x)' --backup './.tolgee/backup'",
"pull-locales": "dotenv -e .env -- tolgee pull && bun format-and-lint:fix",
"push-locales": "dotenv -e .env -- tolgee push",
"create-new-block": "cd packages/forge/cli && bun start",
"check-unused-dependencies": "bun packages/scripts/src/checkDependencies.ts",
"restore": "echo 'Cleaning...' && bunx rimraf --glob '**/{node_modules,dist,.next}'",
"deploy-workflows": "fly deploy --config apps/workflows/fly.toml"
},
"devDependencies": {
"@biomejs/biome": "^2.4.7",
"@effect/language-service": "^0.81.0",
"@nx/esbuild": "22.5.4",
"@nx/js": "22.5.4",
"@nx/next": "22.5.4",
"@nx/vite": "22.5.4",
"@nx/vitest": "22.5.4",
"@tolgee/cli": "^2.16.1",
"@types/node": "^24.10.13",
"esbuild": "^0.28.1",
"husky": "^9.1.7",
"jiti": "2.6.1",
"nx": "22.5.4",
"rimraf": "^6.1.3",
"sherif": "^1.10.0",
"typescript": "^5.9.3"
},
"packageManager": "bun@1.3.9",
"engines": {
"node": "24.x"
},
"trustedDependencies": [
"nx",
"@biomejs/biome",
"@prisma/client",
"@prisma/engines",
"@sentry/cli",
"core-js",
"esbuild",
"isolated-vm",
"prisma",
"sharp",
"inngest-cli"
]
}