Commit Graph

274 Commits

Author SHA1 Message Date
Baptiste Arnaud
6f289f647f
🔒️ Upgrade vulnerable deps (ai v5, nodemailer v8, otel sdk-node 0.217) (#2491)
## Summary

Fixes 18 open Dependabot alerts and migrates affected code to the new
major versions:

- `@opentelemetry/sdk-node` → `^0.217.0` (Prometheus exporter DoS,
GHSA-q7rr-3cgh-j5r3)
- `nodemailer` → `^8.0.5` across all manifests + root override
(GHSA-vvjj-xcjg-gr5g, GHSA-c7w3-x93f-qmm8)
- `ai` → `^5.0.52` (GHSA-rwvc-j5jr-mgvh); legacy 3.x dep removed from
`packages/deprecated/legacy` and replaced with a small in-tree
`OpenAIStream` + `StreamingTextResponse` shim
- Provider SDKs aligned to v5 peer: `@ai-sdk/openai`, `anthropic`,
`groq`, `mistral`, `perplexity`, `deepseek`, `togetherai`, `openRouter`,
`dify-ai-provider`

### AI SDK v4 → v5 migration

- `parseTools`: `parameters` renamed to `inputSchema`
- `runChatCompletion` / `runChatCompletionStream`: `maxSteps` replaced
by `stopWhen(stepCountIs(maxSteps))`;
`usage.{prompt,completion,total}Tokens` replaced by
`totalUsage.{input,output,total}Tokens`
- New `toLegacyDataStream` helper that re-emits the v4 data-stream
protocol (`0:text`, `3:error`, `9:tool_call`, …) so existing consumers
in `embeds/js` and the OpenAI `askAssistant` / `askModel` handlers keep
working
- `compatibility: "strict"` removed from `createOpenAI` (option dropped
in v5)
- `formatDataStreamPart` / `processDataStream` imports moved to
`@ai-sdk/ui-utils` (legacy package pinned at 1.2.11)

### E2E test follow-up

Second commit fixes Playwright tests that broke once the env-resolved
URLs / new SDK surface kicked in:
- `fileUpload`: assert exported URL contains `parseS3PublicBaseUrl()`
(not `S3_ENDPOINT`) so it works with `S3_PUBLIC_CUSTOM_DOMAIN`; verify
post-deletion via cache-busted `request.get` instead of a CDN-cached new
tab.
- `ssrf`: assert on the actual "Security validation failed" log emitted
by the pre-flight check; fixture now maps `response.statusCode` into a
`Status` variable so `Status: …` assertions resolve.
- Root `dev` script includes `@typebot.io/partykit` so the webhook
listener e2e test can hit PartyKit on `:1999`.

Also fixes a pre-existing broken anchor link in `whatsapp-ai-agent.mdx`
that blocked the landing-page link checker.

## Test plan

- [ ] `bunx nx test` passes
- [ ] `bunx nx typecheck` passes
- [ ] `bunx nx affected -t
format-and-lint,lint-repo,check-broken-links,test --parallel=4` passes
(pre-commit)
- [ ] `bun run dev` boots builder, viewer, workflows **and** PartyKit
- [ ] Viewer Playwright suite: `fileUpload.spec.ts`, `ssrf.spec.ts`,
`webhookListener.spec.ts` all green
- [ ] Manual smoke: OpenAI `askAssistant` block streams correctly in the
embed (v4 data-stream protocol preserved)
- [ ] Manual smoke: Anthropic / Mistral / Groq blocks still execute
end-to-end
- [ ] Manual smoke: send a test email through a workspace SMTP block
(nodemailer v8)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 16:30:36 +02:00
Baptiste Arnaud
2c3fc7267a
🐛 Fix stored XSS via javascript: URI in bubble links (GHSA-hqmv-v56g-4m47) (#2435)
## Summary
- Fix stored XSS vulnerability where `javascript:` URIs in text bubble
links, image click links, and toast popup links could execute arbitrary
JS in visitors' browsers
- Add `sanitizeUrl` utility that allowlists only `http:`, `https:`,
`mailto:`, and `tel:` protocols
- Add explicit `typecheck` Nx targets for `builder` and `viewer`
(Next.js projects don't get one inferred by `@nx/js/typescript`)
- Bump `@typebot.io/js` and `@typebot.io/react` to `0.10.1`

## Test plan
- [ ] Create a bot with a text bubble link set to `javascript:alert(1)`
and verify it renders as `#`
- [ ] Same test with an image click link
- [ ] Verify normal `https://` links still work
- [ ] Run `bunx nx typecheck builder` and `bunx nx typecheck viewer`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:46:09 +02:00
Baptiste Arnaud
1541877836
👌 Introduce Spaces 2026-03-25 18:17:05 +01:00
Baptiste Arnaud
e7ae260aaf
🔧 Improve default image compression 2026-03-25 17:04:25 +01:00
Baptiste Arnaud
e9186003a6
🔧 Upgrade Effect packages 2026-03-24 14:51:38 +01:00
Baptiste Arnaud
aa97084285
🐛 Remove builder html sanitizer 2026-03-23 18:51:10 +01:00
Baptiste Arnaud
474ecbf46b
🐛 Fix XSS possible on Rating and file upload inputs 2026-03-23 18:08:08 +01:00
Baptiste Arnaud
92a33129e4
🔧 Upgrade effect and fix workflows ci build 2026-03-23 10:23:08 +01:00
Baptiste Arnaud
9cf506c5d1
🔧 Add feature-flags service 2026-03-20 17:58:25 +01:00
Baptiste Arnaud
ac053fe498
♻️ Centralize EmojisList and EmojiOrImageIcon in UI package
Move emoji data and searchable grid to @typebot.io/ui, switch builder to shared EmojiOrImageIcon, drop duplicate builder emoji assets.
2026-03-20 16:29:11 +01:00
Baptiste Arnaud
c2b251c7e5
♻️ Migrate to NX (#2418) 2026-03-18 15:29:32 +00:00
Baptiste Arnaud
603fd903fb
🔧 Centralize runtime telemetry and Sentry reporting
Move builder, viewer, and workflows onto shared telemetry helpers so request logging, OTLP config, and workflow failures are reported consistently across runtimes.
2026-03-12 17:32:46 +01:00
Baptiste Arnaud
09b2446d04
🔧 Migrate workflows stack to Effect 4 beta
Switch the workflows, RPC clients, and shared service layers to the new Effect 4 APIs so the export and onboarding flows use a consistent runtime model. This also raises the background export threshold to keep smaller exports on the simpler path.
2026-03-11 18:05:25 +01:00
Baptiste Arnaud
ae5ea1f328
🔧 Fix Prisma scripts and refresh dependencies (#2389)
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
Deploy Workflows (Fly.io) / deploy (push) Has been cancelled
- Update workspace dependencies across apps and packages to align with
new lint/Effect expectations
- Adjust Prisma scripts and configs (db push, studio, adapters, read
replicas) for the latest CLI flags and tracing helpers
- Refresh generated locks and helper modules (emails, bot engine,
telemetry, rich text, scripts)
2026-02-12 12:45:01 +01:00
Baptiste Arnaud
5e0de89911
🔧 Add forward WA errors and campaign statuses option 2026-02-11 16:46:35 +01:00
Baptiste Arnaud
81b5970a1c
🔧 Add Resend webhook bounce handler (#2366) 2026-01-23 16:51:04 +01:00
Baptiste Arnaud
e9cec09cba
🔧 Use export results Effect workflow (#2363) 2026-01-22 17:11:00 +01:00
Baptiste Arnaud
c3868d3c70
🔧 Consolidate templates data and SEO metadata (#2357) 2026-01-19 18:00:02 +01:00
Baptiste Arnaud
80db9565cd
♻️ Upgrade to Zod v4 (#2355) 2026-01-19 10:51:20 +01:00
Baptiste Arnaud
a33289e4f1
🔧 Pin Node 22 for builder/viewer (#2354) 2026-01-19 10:01:34 +01:00
Baptiste Arnaud
ff728400d9
🔧 Upgrade bun and fix workflows ci 2026-01-16 13:22:27 +01:00
Baptiste Arnaud
a15673f5a6
♻️ Migrate builder from tRPC to oRPC (#2342) 2026-01-13 15:10:07 +01:00
Baptiste Arnaud
06110a8084
🔧 Fix @opentelemetry/winston-transport log error 2026-01-09 16:03:40 +01:00
Baptiste Arnaud
62d3ba83f0
🚸 Allow s3 private URL access with PAT 2025-12-18 10:38:00 +01:00
Baptiste Arnaud
0b14a21b37
⬆️ Upgrade Next.js and react 2025-12-12 10:28:27 +01:00
Baptiste Arnaud
7014069f5f
⬆️ Upgrade Next.js and react 2025-12-07 08:58:27 +01:00
Baptiste Arnaud
47c4931b79
🐛 Fix giphy picker app crash 2025-12-04 14:29:17 +01:00
Baptiste Arnaud
a68cc3cee2
🐛 Fix deploy buttons app crash
Upgrade from framer-motion to motion
2025-12-02 11:14:25 +01:00
Baptiste Arnaud
6a02a5b919
⬆️ Upgrade to React 19
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-12-01 16:42:23 +01:00
Baptiste Arnaud
dd82c4d318
♻️ Migrate to Bun test 2025-11-27 12:08:31 +01:00
Baptiste Arnaud
7f58205f83
(openai) Add instructions field for gpt-4o-tts 2025-11-25 11:59:06 +01:00
Baptiste Arnaud
0612192541
🔒️ Apply URL validation to HTTP request block 2025-11-19 15:24:02 +01:00
Baptiste Arnaud
27c9bf12e8
🧱 (results) Process results export in the background for big exports 2025-11-18 18:15:08 +01:00
Baptiste Arnaud
e30a3d3cd8
♻️ Upgrade to dndkit/react 2025-11-04 13:48:25 +01:00
Baptiste Arnaud
3d397601f7
♻️ Upgrade to Tailwind v4 2025-10-29 19:04:59 +01:00
Baptiste Arnaud
b53485067e
Remove Chakra UI 2025-10-29 10:35:05 +01:00
Baptiste Arnaud
8da6dde890
🔥 Remove e2e tests from builder 2025-10-21 18:39:32 +02:00
Baptiste Arnaud
2b5f51a9d7
🔧 Add churn agent daily script 2025-10-06 11:23:24 +02:00
Baptiste Arnaud
1b289f0ba6
♻️ Migrate Autocomplete to Base UI
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-10-03 16:01:26 +02:00
Baptiste Arnaud
9688a297ad
🔧 Revert to carret version pinning 2025-10-03 10:51:27 +02:00
Baptiste Arnaud
d7b4b8665f
♻️ Rename icon files to match hugeicons names 2025-09-24 21:50:48 +02:00
Baptiste Arnaud
765c4b2f8c
⬆️ Upgrade Plate
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-09-12 13:11:11 +02:00
Baptiste Arnaud
5c667938e4
⬆️ Upgrade posthog-node 2025-09-10 11:50:31 +02:00
Baptiste Arnaud
bec4a19aa1
♻️ Migrate mjml to react-email
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-09-04 12:38:09 +02:00
Baptiste Arnaud
0af84b185c
🔧 Enabled logs capture in Sentry 2025-09-02 17:43:39 +02:00
Baptiste Arnaud
c8926d5fad
💚 Fix missing react-dom types 2025-09-02 15:11:45 +02:00
Baptiste Arnaud
9a9a7e684c
🚸 Migrate floating components to Base UI (#2266)
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
Daily job / clean (push) Has been cancelled
2025-08-19 17:04:50 +02:00
Baptiste Arnaud
f33d3b224d
🚑️ Fix Google Sheet authentication not refreshing 2025-07-22 10:58:37 +02:00
Baptiste Arnaud
40884d5df9
Add Gmail block (#2253)
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-07-21 16:13:42 +02:00
Baptiste Arnaud
354b9e7893
♻️ Harmonize unit test execution across the workspace 2025-07-07 15:44:33 +02:00