Commit Graph

51 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
55b290043b
🐛 Fix PostHog tracking by updating cookie domain to typebot.com (#2447)
## Summary
- Update `DEFAULT_COOKIE_DOMAIN` from `typebot.io` to `typebot.com` in
telemetry constants
- Fixes "Failed to execute 'set' on 'CookieStore': Cookie domain must
domain-match current host" error that was preventing all PostHog
pageview tracking since the domain migration

## Test plan
- [ ] Verify PostHog pageviews are being recorded on typebot.com
- [ ] Confirm no cookie domain mismatch errors in browser console

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

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 12:08:18 +00:00
Baptiste Arnaud
acd2f2971b
🔧 Remove "baseUrl": "." from tsconfigs 2026-03-25 16:40:12 +01:00
Baptiste Arnaud
e9186003a6
🔧 Upgrade Effect packages 2026-03-24 14:51:38 +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
a9b2af116d
🐛 Fix code scanning findings 2026-03-19 10:21:03 +01:00
Baptiste Arnaud
c2b251c7e5
♻️ Migrate to NX (#2418) 2026-03-18 15:29:32 +00:00
Baptiste Arnaud
e33cb1fb23
🐛 Fix CookieStore domain error when declining cookie consent 2026-03-17 15:16:45 +01:00
Baptiste Arnaud
14ec3a2598
🔧 Enable PR2 Biome rules and mechanical autofixes 2026-03-13 11:46:28 +01: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
30ddd69a9c
🔧 Improve logging in daily job 2026-02-02 17:41:46 +01:00
Baptiste Arnaud
43c2459252
🔧 Centralize telemetry layer and trim export logs (#2372)
Move the OTEL TelemetryLayer into @typebot.io/telemetry and reuse it for
builder export triggers and auth onboarding RPC so root spans are
exported. Remove the local builder telemetry helper. Trim noisy export
CSV workflow logging.
2026-01-26 16:02:20 +01:00
Baptiste Arnaud
80db9565cd
♻️ Upgrade to Zod v4 (#2355) 2026-01-19 10:51:20 +01:00
Baptiste Arnaud
69efa2f3c9
🚑️ Fix app router automatically adding transfer-encoding: chunked header to backend requests
Fixes #2336
2026-01-11 21:47:24 +01:00
Baptiste Arnaud
b0326406f8
🛂 Automatically detect and take down abusing workspace usage 2026-01-08 16:10:21 +01:00
Baptiste Arnaud
48cdd3b6cd
🚸 Add confirm dialog before plan upgrade with existing customer 2025-12-08 19:06:48 +01:00
Baptiste Arnaud
dd82c4d318
♻️ Migrate to Bun test 2025-11-27 12:08:31 +01:00
Baptiste Arnaud
0b029d832d
📈 Add "Workspace unpaid" event tracking 2025-10-15 08:46:38 +02:00
Baptiste Arnaud
9688a297ad
🔧 Revert to carret version pinning 2025-10-03 10:51:27 +02:00
Baptiste Arnaud
5c667938e4
⬆️ Upgrade posthog-node 2025-09-10 11:50:31 +02:00
Baptiste Arnaud
e928987623
⬆️ Upgrade tooling
TS v5.9, Biome v2 + fixes
2025-09-09 10:32:38 +02:00
Baptiste Arnaud
6da4c37609
🔨 Add plan prop to Subscription cancelletion event and fix script parsing 2025-06-27 19:16:16 +02:00
Baptiste Arnaud
20f0f6324f
📈 Update Stripe webhook handler to track subscription cancellations 2025-06-25 12:52:32 +02:00
Baptiste Arnaud
e087a30a01
💚 Fix missing cookie dep 2025-06-23 16:47:45 +02:00
Baptiste Arnaud
86967047c9
📈 Add device type tracking in page view 2025-06-04 09:53:35 +02:00
Baptiste Arnaud
e2ccc7c26b
📈 Add landing page view tracking 2025-06-04 09:05:17 +02:00
Baptiste Arnaud
3d3f192c0d
🔧 Improve new results tracking only tracking non-zero, per typebot
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-03-05 11:09:22 +01:00
Baptiste Arnaud
b406f6c620
👷 Renovate cron jobs 2025-02-19 22:32:41 +01:00
Baptiste Arnaud
9738b4d2c0
📈 Re-introduce group identifies
This is necessary for proper analytics on PostHog's side. But it is not necessary to capture the associated "create" event as well.
2025-02-08 12:24:50 +01:00
Baptiste Arnaud
4b277bec27
⬇️ Downgrade posthog-node to 4.3.2
4.4.0 is not compatible with Next.js (https://github.com/PostHog/posthog-js-lite/issues/344)
2025-02-06 12:13:25 +01:00
Baptiste Arnaud
ce965e0a4d
♻️ Add sendMessage utility for webhook notifications 2025-02-05 12:41:42 +01:00
Baptiste Arnaud
39b9c478f6
💚 Update PostHog client shutdown method 2025-02-05 11:36:18 +01:00
Baptiste Arnaud
c46c132f8f
⬆️ Upgrade posthog-node and remove useless group indentify events 2025-02-05 11:12:15 +01:00
Baptiste Arnaud
27366dde5a
💚 Add missing packages and clean up unused packages 2025-02-04 11:39:17 +01:00
Baptiste Arnaud
aae6caaa0a
Revert "build: add ts references for better DX"
This reverts commit b8ffad0159.
2025-01-29 17:44:06 +01:00
Baptiste Arnaud
d693023147
📈 Remove useless PostHog client identify 2025-01-28 08:32:13 +01:00
Baptiste Arnaud
eae685e6be
📈 simplify tracking data 2025-01-27 17:03:55 +01:00
Baptiste Arnaud
b8ffad0159
build: add ts references for better DX 2025-01-25 14:57:01 +01:00
Baptiste Arnaud
5233c794e0
♻️ Add distinctId to groupIdentify methods
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2025-01-03 15:27:56 +01:00
Baptiste Arnaud
ddec8351bb
📈 add "User logged out" telemetry event 2024-12-07 10:49:06 +01:00
Baptiste Arnaud
a7a15fd4d5
📈 Add limit warning email telemetry events
Some checks failed
Create Tag / create-tag (push) Has been cancelled
Deploy Partykit server / deploy (push) Has been cancelled
2024-11-26 10:20:28 +01:00
Baptiste Arnaud
698eda7079
🔧 Add version filed in package json files 2024-10-09 08:31:03 +02:00
Baptiste Arnaud
10750f54d1
♻️ Use bun, biome, better ts config, new license and remove all barrel files (#1801)
Closes [#1754](https://github.com/baptisteArno/typebot.io/issues/1754)
2024-09-25 14:50:13 +02:00
Baptiste Arnaud
bec9cb68ca
⬆️ Upgrade chakra version 2024-06-17 14:12:14 +02:00
Baptiste Arnaud
0eacbebbbe
📄 Add Commercial License for ee folder (#1532) 2024-05-23 10:42:23 +02:00
Baptiste Arnaud
d96f384e02
♻️ Migrate from got to ky (#1416)
Closes #1415
2024-04-05 09:01:16 +02:00