Skip to content

Commit

Permalink
🛂 (radar) Enable multiple RADAR_CUMULATIVE_KEYWORDS sets
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jan 8, 2024
1 parent f3a4922 commit 56e0342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/env/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const baseEnv = {
RADAR_CUMULATIVE_KEYWORDS: z
.string()
.min(1)
.transform((val) => val.split(','))
.transform((val) => val.split('/').map((s) => s.split(',')))
.optional(),
},
client: {
Expand Down
4 changes: 2 additions & 2 deletions packages/radar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const computeRiskLevel = (typebot: any) => {
)
return 100
if (
env.RADAR_CUMULATIVE_KEYWORDS?.every((keyword) =>
stringifiedTypebot.toLowerCase().includes(keyword)
env.RADAR_CUMULATIVE_KEYWORDS?.some((set) =>
set.every((keyword) => stringifiedTypebot.toLowerCase().includes(keyword))
)
)
return 100
Expand Down

2 comments on commit 56e0342

@vercel
Copy link

@vercel vercel bot commented on 56e0342 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

landing-page-v2 – ./apps/landing-page

landing-page-v2-typebot-io.vercel.app
landing-page-v2-git-main-typebot-io.vercel.app
home.typebot.io

@vercel
Copy link

@vercel vercel bot commented on 56e0342 Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

app.typebot.io
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app

Please sign in to comment.