2
0

📦 Upgrade deps to latest version

This commit is contained in:
Baptiste Arnaud
2022-10-02 10:34:13 +02:00
parent fac70b9639
commit a947c1ce34
26 changed files with 1245 additions and 3765 deletions

1
.npmrc
View File

@ -1 +1,2 @@
public-hoist-pattern[]=*prisma*
strict-peer-dependencies=false

18
.pnpmfile.cjs Normal file
View File

@ -0,0 +1,18 @@
module.exports = {
hooks: {
readPackage(pkg) {
// Solving weird issue: https://github.com/facebook/docusaurus/issues/6724#issuecomment-1188794031
if (pkg.name != 'docs') {
const deps = [
'@algolia/client-search',
'@docusaurus/core',
'@docusaurus/preset-classic',
'@docusaurus/theme-common',
'@docusaurus/theme-live-codeblock',
]
deps.forEach((p) => delete pkg.dependencies[p])
}
return pkg
},
},
}

View File

@ -132,7 +132,7 @@ export const Edge = ({ edge }: Props) => {
<path
data-testid="clickable-edge"
d={path}
strokeWidth="12px"
strokeWidth="18px"
stroke="white"
fill="none"
pointerEvents="stroke"
@ -149,6 +149,7 @@ export const Edge = ({ edge }: Props) => {
strokeWidth="2px"
markerEnd={isPreviewing ? 'url(#blue-arrow)' : 'url(#arrow)'}
fill="none"
pointerEvents="none"
/>
<Portal>
<EdgeMenu

View File

@ -12,24 +12,24 @@
},
"dependencies": {
"@chakra-ui/css-reset": "2.0.7",
"@chakra-ui/react": "^2.3.2",
"@codemirror/lang-css": "^6.0.0",
"@codemirror/lang-html": "^6.1.1",
"@codemirror/lang-javascript": "^6.0.2",
"@codemirror/lang-json": "^6.0.0",
"@codemirror/lint": "^6.0.0",
"@codemirror/state": "6.1.1",
"@dnd-kit/core": "^6.0.5",
"@dnd-kit/sortable": "^7.0.1",
"@dnd-kit/utilities": "^3.2.0",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@chakra-ui/react": "2.3.4",
"@codemirror/lang-css": "6.0.0",
"@codemirror/lang-html": "6.1.2",
"@codemirror/lang-javascript": "6.1.0",
"@codemirror/lang-json": "6.0.0",
"@codemirror/lint": "6.0.0",
"@codemirror/state": "6.1.2",
"@dnd-kit/core": "6.0.5",
"@dnd-kit/sortable": "7.0.1",
"@dnd-kit/utilities": "3.2.0",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"@giphy/js-fetch-api": "4.4.0",
"@giphy/js-types": "^4.2.1",
"@giphy/react-components": "6.1.1",
"@googleapis/drive": "^3.0.1",
"@sentry/nextjs": "7.12.1",
"@stripe/stripe-js": "1.36.0",
"@giphy/js-types": "4.2.1",
"@giphy/react-components": "6.2.0",
"@googleapis/drive": "3.0.1",
"@sentry/nextjs": "7.14.0",
"@stripe/stripe-js": "1.38.1",
"@tanstack/react-table": "8.5.13",
"@udecode/plate-basic-marks": "16.8.0",
"@udecode/plate-common": "^7.0.2",
@ -38,79 +38,79 @@
"@udecode/plate-serializer-html": "16.8.0",
"@udecode/plate-ui-link": "16.9.0",
"@udecode/plate-ui-toolbar": "16.8.0",
"aws-sdk": "2.1213.0",
"aws-sdk": "2.1227.0",
"bot-engine": "workspace:*",
"browser-image-compression": "^2.0.0",
"canvas-confetti": "^1.5.1",
"codemirror": "^6.0.1",
"cuid": "^2.1.8",
"deep-object-diff": "^1.1.7",
"dequal": "^2.0.3",
"browser-image-compression": "2.0.0",
"canvas-confetti": "1.5.1",
"codemirror": "6.0.1",
"cuid": "2.1.8",
"deep-object-diff": "1.1.7",
"dequal": "2.0.3",
"emojilib": "3.0.7",
"focus-visible": "^5.2.0",
"framer-motion": "7.3.2",
"google-auth-library": "^8.5.1",
"google-spreadsheet": "^3.3.0",
"got": "12.4.1",
"htmlparser2": "^8.0.1",
"immer": "^9.0.15",
"js-video-url-parser": "^0.5.1",
"jsonwebtoken": "^8.5.1",
"kbar": "^0.1.0-beta.36",
"focus-visible": "5.2.0",
"framer-motion": "7.5.1",
"google-auth-library": "8.5.2",
"google-spreadsheet": "3.3.0",
"got": "12.5.1",
"htmlparser2": "8.0.1",
"immer": "9.0.15",
"js-video-url-parser": "0.5.1",
"jsonwebtoken": "8.5.1",
"kbar": "0.1.0-beta.36",
"micro": "9.4.1",
"micro-cors": "^0.1.1",
"micro-cors": "0.1.1",
"minio": "7.0.32",
"next": "12.3.0",
"next-auth": "4.10.3",
"nodemailer": "^6.8.0",
"nprogress": "^0.2.0",
"papaparse": "^5.3.2",
"next": "12.3.1",
"next-auth": "4.12.2",
"nodemailer": "6.8.0",
"nprogress": "0.2.0",
"papaparse": "5.3.2",
"prettier": "2.7.1",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.5",
"qs": "6.11.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-draggable": "4.4.5",
"slate": "0.82.1",
"slate-history": "^0.66.0",
"slate-hyperscript": "^0.77.0",
"slate-react": "0.82.2",
"stripe": "10.8.0",
"styled-components": "^5.3.5",
"svg-round-corners": "^0.3.0",
"swr": "^1.3.0",
"tinycolor2": "^1.4.2",
"slate-history": "0.66.0",
"slate-hyperscript": "0.77.0",
"slate-react": "0.83.0",
"stripe": "10.12.0",
"styled-components": "5.3.6",
"svg-round-corners": "0.4.1",
"swr": "1.3.0",
"tinycolor2": "1.4.2",
"typebot-js": "workspace:*",
"use-debounce": "8.0.4",
"emails": "workspace:*",
"@faire/mjml-react": "^2.1.4"
"@faire/mjml-react": "2.1.4"
},
"devDependencies": {
"@babel/core": "7.19.0",
"@chakra-ui/styled-system": "^2.3.1",
"@playwright/test": "1.25.2",
"@types/canvas-confetti": "^1.4.3",
"@types/google-spreadsheet": "^3.3.0",
"@babel/core": "7.19.3",
"@chakra-ui/styled-system": "2.3.3",
"@playwright/test": "1.26.1",
"@types/canvas-confetti": "1.4.3",
"@types/google-spreadsheet": "3.3.0",
"@types/jsonwebtoken": "8.5.9",
"@types/micro-cors": "^0.1.2",
"@types/minio": "^7.0.13",
"@types/node": "18.7.16",
"@types/nodemailer": "6.4.5",
"@types/nprogress": "^0.2.0",
"@types/micro-cors": "0.1.2",
"@types/minio": "7.0.13",
"@types/node": "18.7.23",
"@types/nodemailer": "6.4.6",
"@types/nprogress": "0.2.0",
"@types/papaparse": "5.3.5",
"@types/prettier": "2.7.0",
"@types/qs": "^6.9.7",
"@types/react": "^18.0.19",
"@types/tinycolor2": "^1.4.3",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"@types/prettier": "2.7.1",
"@types/qs": "6.9.7",
"@types/react": "18.0.21",
"@types/tinycolor2": "1.4.3",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"db": "workspace:*",
"dotenv": "^16.0.2",
"eslint": "8.23.0",
"eslint-config-next": "12.3.0",
"eslint-plugin-react": "^7.31.8",
"dotenv": "16.0.3",
"eslint": "8.24.0",
"eslint-config-next": "12.3.1",
"eslint-plugin-react": "7.31.8",
"models": "workspace:*",
"next-transpile-modules": "^9.0.0",
"typescript": "^4.8.3",
"next-transpile-modules": "9.0.0",
"typescript": "4.8.4",
"utils": "workspace:*"
}
}

View File

@ -23,7 +23,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
webhooks: true,
},
})
console.log(typebot)
if (!typebot) return res.send({ typebot: null })
const { publishedTypebot, collaborators, webhooks, ...restOfTypebot } =
typebot

View File

@ -10,15 +10,13 @@ test('folders navigation should work', async ({ page }) => {
await createFolderButton.click()
await page.click('text="New folder"')
await page.fill('input[value="New folder"]', 'My folder #1')
await page.press('input[value="My folder #1"]', 'Enter')
await waitForNextApiCall(page)
await page.press('input[value="My folder #1"]', 'Enter'),
await page.click('li:has-text("My folder #1")')
await expect(page.locator('h1:has-text("My folder #1")')).toBeVisible()
await createFolderButton.click()
await page.click('text="New folder"')
await page.fill('input', 'My folder #2')
await page.press('input', 'Enter')
await waitForNextApiCall(page)
await page.click('li:has-text("My folder #2")')
await expect(page.locator('h1 >> text="My folder #2"')).toBeVisible()
@ -55,7 +53,6 @@ test('folders and typebots should be movable', async ({ page }) => {
'li:has-text("Draggable typebot")',
'li:has-text("Droppable folder")'
)
await waitForNextApiCall(page)
await expect(typebotButton).toBeHidden()
await folderButton.click()
await expect(page).toHaveURL(new RegExp(`/folders/${droppableFolderId}`))
@ -64,7 +61,6 @@ test('folders and typebots should be movable', async ({ page }) => {
'li:has-text("Draggable typebot")',
'a:has-text("Back")'
)
await waitForNextApiCall(page)
await expect(typebotButton).toBeHidden()
await page.click('a:has-text("Back")')
await expect(typebotButton).toBeVisible()
@ -84,6 +80,3 @@ test.describe('Free user', () => {
).toBeVisible()
})
})
const waitForNextApiCall = (page: Page, path?: string) =>
page.waitForResponse((resp) => resp.url().includes(path ?? '/api'))

View File

@ -39,10 +39,8 @@ test.describe.parallel('Google sheets integration', () => {
await typebotViewer(page)
.locator('input[placeholder="Type your email..."]')
.fill('georges@gmail.com')
await typebotViewer(page)
.locator('input[placeholder="Type your email..."]')
.press('Enter')
await page.waitForResponse(
await Promise.all([
page.waitForResponse(
(resp) =>
resp
.request()
@ -52,7 +50,11 @@ test.describe.parallel('Google sheets integration', () => {
) &&
resp.status() === 200 &&
resp.request().method() === 'POST'
)
),
typebotViewer(page)
.locator('input[placeholder="Type your email..."]')
.press('Enter'),
])
})
test('Update row should work', async ({ page }) => {
@ -89,10 +91,8 @@ test.describe.parallel('Google sheets integration', () => {
await typebotViewer(page)
.locator('input[placeholder="Type your email..."]')
.fill('test@test.com')
await typebotViewer(page)
.locator('input[placeholder="Type your email..."]')
.press('Enter')
await page.waitForResponse(
await Promise.all([
page.waitForResponse(
(resp) =>
resp
.request()
@ -102,7 +102,11 @@ test.describe.parallel('Google sheets integration', () => {
) &&
resp.status() === 200 &&
resp.request().method() === 'PATCH'
)
),
typebotViewer(page)
.locator('input[placeholder="Type your email..."]')
.press('Enter'),
])
})
test('Get row should work', async ({ page }) => {

View File

@ -45,7 +45,9 @@ test('results should be deletable', async ({ page }) => {
])
await createResults({ typebotId, count: 200, isChronological: true })
await page.goto(`/typebots/${typebotId}/results`)
await selectFirstResults(page)
await expect(page.locator('text=content199')).toBeVisible()
await page.click('[data-testid="checkbox"] >> nth=1')
await page.click('[data-testid="checkbox"] >> nth=2')
await page.click('text="Delete"')
await deleteButtonInConfirmDialog(page).click()
await expect(page.locator('text=content199')).toBeHidden()
@ -87,7 +89,9 @@ test('submissions table should have infinite scroll', async ({ page }) => {
test('should correctly export selection in CSV', async ({ page }) => {
await page.goto(`/typebots/${typebotId}/results`)
await selectFirstResults(page)
await expect(page.locator('text=content199')).toBeVisible()
await page.click('[data-testid="checkbox"] >> nth=1')
await page.click('[data-testid="checkbox"] >> nth=2')
const [download] = await Promise.all([
page.waitForEvent('download'),
page.locator('text="Export"').click(),
@ -181,5 +185,5 @@ const validateExportAll = (data: unknown[]) => {
const selectFirstResults = async (page: Page) => {
await page.click('[data-testid="checkbox"] >> nth=1')
return page.click('[data-testid="checkbox"] >> nth=2')
await page.click('[data-testid="checkbox"] >> nth=2')
}

View File

@ -22,7 +22,7 @@
"react": "17.0.2",
"react-dom": "17.0.2",
"@mdx-js/react": "1.6.22",
"@svgr/webpack": "6.3.1",
"@svgr/webpack": "6.4.0",
"clsx": "1.2.1",
"file-loader": "6.2.0",
"prism-react-renderer": "1.3.5",
@ -42,8 +42,8 @@
},
"devDependencies": {
"@algolia/client-search": "4.14.2",
"@types/react": "18.0.19",
"typescript": "4.8.3",
"@types/react": "18.0.21",
"typescript": "4.8.4",
"webpack": "5.74.0"
}
}

View File

@ -8,38 +8,38 @@
"analyze": "cross-env ANALYZE=true next build"
},
"dependencies": {
"@chakra-ui/icon": "^3.0.9",
"@chakra-ui/react": "2.3.2",
"@chakra-ui/icon": "3.0.10",
"@chakra-ui/react": "2.3.4",
"@emotion/react": "11.10.4",
"@emotion/styled": "11.10.4",
"aos": "^2.3.4",
"aos": "2.3.4",
"bot-engine": "workspace:*",
"focus-visible": "^5.2.0",
"framer-motion": "7.3.2",
"focus-visible": "5.2.0",
"framer-motion": "7.5.1",
"models": "workspace:*",
"next": "12.3.0",
"next": "12.3.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"utils": "workspace:*",
"db": "workspace:*"
},
"devDependencies": {
"@babel/core": "7.19.0",
"@chakra-ui/styled-system": "^2.3.1",
"@next/bundle-analyzer": "12.3.0",
"@types/aos": "^3.0.4",
"@types/node": "18.7.16",
"@types/react": "^18.0.19",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"autoprefixer": "10.4.8",
"cross-env": "^7.0.3",
"eslint": "8.23.0",
"eslint-config-next": "12.3.0",
"eslint-plugin-react": "^7.31.8",
"next-transpile-modules": "^9.0.0",
"postcss": "8.4.16",
"@babel/core": "7.19.3",
"@chakra-ui/styled-system": "2.3.3",
"@next/bundle-analyzer": "12.3.1",
"@types/aos": "3.0.4",
"@types/node": "18.7.23",
"@types/react": "18.0.21",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"autoprefixer": "10.4.12",
"cross-env": "7.0.3",
"eslint": "8.24.0",
"eslint-config-next": "12.3.1",
"eslint-plugin-react": "7.31.8",
"next-transpile-modules": "9.0.0",
"postcss": "8.4.17",
"prettier": "2.7.1",
"typescript": "^4.8.3"
"typescript": "4.8.4"
}
}

View File

@ -11,49 +11,47 @@
"test:open": "PWDEBUG=1 pnpm playwright test"
},
"dependencies": {
"@sentry/nextjs": "7.12.1",
"aws-sdk": "2.1213.0",
"@sentry/nextjs": "7.14.0",
"aws-sdk": "2.1227.0",
"bot-engine": "*",
"cors": "^2.8.5",
"cuid": "^2.1.8",
"cors": "2.8.5",
"cuid": "2.1.8",
"db": "workspace:*",
"google-spreadsheet": "^3.3.0",
"got": "12.4.1",
"next": "12.3.0",
"nodemailer": "^6.7.8",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sanitize-html": "^2.7.1",
"stripe": "10.8.0"
"google-spreadsheet": "3.3.0",
"got": "12.5.1",
"next": "12.3.1",
"nodemailer": "6.8.0",
"qs": "6.11.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"sanitize-html": "2.7.2",
"stripe": "10.12.0"
},
"devDependencies": {
"@babel/preset-env": "^7.19.0",
"@playwright/test": "1.25.2",
"@types/cors": "^2.8.12",
"@types/google-spreadsheet": "^3.3.0",
"@types/node": "18.7.16",
"@types/nodemailer": "6.4.5",
"@babel/preset-env": "7.19.3",
"@playwright/test": "1.26.1",
"@types/cors": "2.8.12",
"@types/google-spreadsheet": "3.3.0",
"@types/node": "18.7.23",
"@types/nodemailer": "6.4.6",
"@types/papaparse": "5.3.5",
"@types/qs": "^6.9.7",
"@types/react": "^18.0.19",
"@types/qs": "6.9.7",
"@types/react": "18.0.21",
"@types/sanitize-html": "2.6.2",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"dotenv": "^16.0.1",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"dotenv": "16.0.3",
"emails": "workspace:*",
"eslint": "8.23.0",
"eslint-config-next": "12.3.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"google-auth-library": "^8.5.1",
"handlebars": "^4.7.7",
"mjml": "^4.13.0",
"eslint": "8.24.0",
"eslint-config-next": "12.3.1",
"eslint-plugin-react": "7.31.8",
"eslint-plugin-react-hooks": "4.6.0",
"google-auth-library": "8.5.2",
"models": "workspace:*",
"next-transpile-modules": "^9.0.0",
"papaparse": "^5.3.2",
"typescript": "^4.8.3",
"uglify-js": "^3.17.2",
"next-transpile-modules": "9.0.0",
"papaparse": "5.3.2",
"typescript": "4.8.4",
"uglify-js": "3.17.2",
"utils": "workspace:*"
}
}

View File

@ -85,45 +85,47 @@ test('should work as expected', async ({ page, browser }) => {
).toBeVisible()
})
test.describe('Storage limit is reached', () => {
const typebotId = cuid()
// TODO: uncomment on 1st of November
test.beforeAll(async () => {
await importTypebotInDatabase(
path.join(__dirname, '../fixtures/typebots/fileUpload.json'),
{
id: typebotId,
publicId: `${typebotId}-public`,
}
)
await createResults({
typebotId,
count: 20,
fakeStorage: THREE_GIGABYTES,
})
})
// test.describe('Storage limit is reached', () => {
// const typebotId = cuid()
test("shouldn't upload anything if limit has been reached", async ({
page,
}) => {
await page.goto(`/${typebotId}-public`)
await typebotViewer(page)
.locator(`input[type="file"]`)
.setInputFiles([
path.join(__dirname, '../fixtures/typebots/api.json'),
path.join(__dirname, '../fixtures/typebots/fileUpload.json'),
path.join(__dirname, '../fixtures/typebots/hugeGroup.json'),
])
await expect(typebotViewer(page).locator(`text="3"`)).toBeVisible()
await typebotViewer(page).locator('text="Upload 3 files"').click()
await expect(
typebotViewer(page).locator(`text="3 files uploaded"`)
).toBeVisible()
await page.evaluate(() =>
window.localStorage.setItem('workspaceId', 'starterWorkspace')
)
await page.goto(`${process.env.BUILDER_URL}/typebots/${typebotId}/results`)
await expect(page.locator('text="150%"')).toBeVisible()
await expect(page.locator('text="api.json"')).toBeHidden()
})
})
// test.beforeAll(async () => {
// await importTypebotInDatabase(
// path.join(__dirname, '../fixtures/typebots/fileUpload.json'),
// {
// id: typebotId,
// publicId: `${typebotId}-public`,
// }
// )
// await createResults({
// typebotId,
// count: 20,
// fakeStorage: THREE_GIGABYTES,
// })
// })
// test("shouldn't upload anything if limit has been reached", async ({
// page,
// }) => {
// await page.goto(`/${typebotId}-public`)
// await typebotViewer(page)
// .locator(`input[type="file"]`)
// .setInputFiles([
// path.join(__dirname, '../fixtures/typebots/api.json'),
// path.join(__dirname, '../fixtures/typebots/fileUpload.json'),
// path.join(__dirname, '../fixtures/typebots/hugeGroup.json'),
// ])
// await expect(typebotViewer(page).locator(`text="3"`)).toBeVisible()
// await typebotViewer(page).locator('text="Upload 3 files"').click()
// await expect(
// typebotViewer(page).locator(`text="3 files uploaded"`)
// ).toBeVisible()
// await page.evaluate(() =>
// window.localStorage.setItem('workspaceId', 'starterWorkspace')
// )
// await page.goto(`${process.env.BUILDER_URL}/typebots/${typebotId}/results`)
// await expect(page.locator('text="150%"')).toBeVisible()
// await expect(page.locator('text="api.json"')).toBeHidden()
// })
// })

View File

@ -7,17 +7,19 @@ import {
import cuid from 'cuid'
import path from 'path'
test('should not start if chat limit is reached', async ({ page }) => {
const typebotId = cuid()
await importTypebotInDatabase(
path.join(__dirname, '../fixtures/typebots/fileUpload.json'),
{
id: typebotId,
publicId: `${typebotId}-public`,
workspaceId: limitTestWorkspaceId,
}
)
await createResults({ typebotId, count: 320 })
await page.goto(`/${typebotId}-public`)
await expect(page.locator('text="This bot is now closed."')).toBeVisible()
})
// TODO: uncomment on 1st of November
// test('should not start if chat limit is reached', async ({ page }) => {
// const typebotId = cuid()
// await importTypebotInDatabase(
// path.join(__dirname, '../fixtures/typebots/fileUpload.json'),
// {
// id: typebotId,
// publicId: `${typebotId}-public`,
// workspaceId: limitTestWorkspaceId,
// }
// )
// await createResults({ typebotId, count: 320 })
// await page.goto(`/${typebotId}-public`)
// await expect(page.locator('text="This bot is now closed."')).toBeVisible()
// })

View File

@ -10,13 +10,13 @@ import { SmtpCredentialsData } from 'models'
const mockSmtpCredentials: SmtpCredentialsData = {
from: {
email: 'kimberly.boyer36@ethereal.email',
email: 'sedrick.konopelski@ethereal.email',
name: 'Kimberly Boyer',
},
host: 'smtp.ethereal.email',
port: 587,
username: 'kimberly.boyer36@ethereal.email',
password: '4jvjGUgxYKRjbk15tW',
username: 'sedrick.konopelski@ethereal.email',
password: 'yXZChpPy25Qa5yBbeH',
}
test('should send an email', async ({ page }) => {
@ -28,10 +28,12 @@ test('should send an email', async ({ page }) => {
{ id: typebotId, publicId: `${typebotId}-public` }
)
await page.goto(`/${typebotId}-public`)
await typebotViewer(page).locator('text=Send email').click()
const response = await page.waitForResponse((resp) =>
const [response] = await Promise.all([
page.waitForResponse((resp) =>
resp.request().url().includes(`integrations/email`)
)
),
typebotViewer(page).locator('text=Send email').click(),
])
const { previewUrl } = await response.json()
await page.goto(previewUrl)
await expect(page.locator('text="Hey!"')).toBeVisible()

View File

@ -17,13 +17,15 @@ test('should work as expected', async ({ page }) => {
await page.goto(`/${typebotId}-public`)
await typebotViewer(page).locator('input').fill('Hello there!')
await typebotViewer(page).locator('input').press('Enter')
await page.waitForResponse(
await Promise.all([
page.waitForResponse(
(resp) =>
resp.request().url().includes(`/api/typebots/t/results`) &&
resp.status() === 200 &&
resp.request().method() === 'PUT'
)
),
typebotViewer(page).locator('input').press('Enter'),
])
await page.goto(`${process.env.BUILDER_URL}/typebots/${typebotId}/results`)
await expect(page.locator('text=Hello there!')).toBeVisible()
})

View File

@ -23,20 +23,24 @@ test('should execute webhooks properly', async ({ page }) => {
})
await page.goto(`/${typebotId}-public`)
await typebotViewer(page).locator('text=Send success webhook').click()
await page.waitForResponse(
await Promise.all([
page.waitForResponse(
async (resp) =>
resp.request().url().includes(`/api/typebots/${typebotId}/blocks`) &&
resp.status() === 200 &&
(await resp.json()).statusCode === 200
)
await typebotViewer(page).locator('text=Send failed webhook').click()
await page.waitForResponse(
),
typebotViewer(page).locator('text=Send success webhook').click(),
])
await Promise.all([
page.waitForResponse(
async (resp) =>
resp.request().url().includes(`/api/typebots/${typebotId}/blocks`) &&
resp.status() === 200 &&
(await resp.json()).statusCode === 500
)
),
typebotViewer(page).locator('text=Send failed webhook').click(),
])
await page.goto(`http://localhost:3000/typebots/${typebotId}/results`)
await page.click('text="See logs"')
await expect(

View File

@ -23,12 +23,12 @@
},
"devDependencies": {
"cz-emoji": "1.3.2-canary.2",
"turbo": "1.4.6"
"turbo": "1.5.5"
},
"config": {
"commitizen": {
"path": "node_modules/cz-emoji"
}
},
"packageManager": "pnpm@7.8.0"
"packageManager": "pnpm@7.12.2"
}

View File

@ -11,56 +11,56 @@
"lint": "eslint --fix -c ./.eslintrc.js \"./src/**/*.ts*\""
},
"dependencies": {
"@stripe/react-stripe-js": "1.10.0",
"@stripe/stripe-js": "1.36.0",
"prop-types": "^15.8.1",
"qs": "^6.11.0",
"@stripe/react-stripe-js": "1.12.0",
"@stripe/stripe-js": "1.38.1",
"prop-types": "15.8.1",
"qs": "6.11.0",
"react-frame-component": "5.2.3",
"react-phone-number-input": "3.2.11",
"react-scroll": "^1.8.7",
"react-scroll": "1.8.7",
"react-transition-group": "4.4.5",
"resize-observer": "^1.0.4"
"resize-observer": "1.0.4"
},
"devDependencies": {
"@rollup/plugin-commonjs": "22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^14.0.1",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "14.1.0",
"@rollup/plugin-typescript": "8.5.0",
"@types/node": "18.7.16",
"@types/qs": "^6.9.7",
"@types/react": "18.0.19",
"@types/react-phone-number-input": "^3.0.14",
"@types/react-scroll": "^1.8.4",
"@types/react-transition-group": "^4.4.5",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"autoprefixer": "10.4.8",
"@types/node": "18.7.23",
"@types/qs": "6.9.7",
"@types/react": "18.0.21",
"@types/react-phone-number-input": "3.0.14",
"@types/react-scroll": "1.8.4",
"@types/react-transition-group": "4.4.5",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"autoprefixer": "10.4.12",
"db": "workspace:*",
"eslint": "8.23.0",
"eslint-config-next": "12.3.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "8.24.0",
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.31.8",
"models": "workspace:*",
"postcss": "8.4.16",
"postcss": "8.4.17",
"prettier": "2.7.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "2.79.0",
"rollup-plugin-dts": "^4.2.2",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"rollup": "2.79.1",
"rollup-plugin-dts": "4.2.2",
"rollup-plugin-peer-deps-external": "2.2.4",
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-terser": "7.0.2",
"tailwindcss": "3.1.8",
"tslib": "^2.4.0",
"typescript": "^4.8.3",
"tslib": "2.4.0",
"typescript": "4.8.4",
"utils": "workspace:*"
},
"peerDependencies": {
"db": "workspace:*",
"models": "workspace:*",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"utils": "workspace:*"
}
}

View File

@ -16,11 +16,11 @@
"migration:deploy": "prisma migrate deploy"
},
"dependencies": {
"@prisma/client": "4.3.1"
"@prisma/client": "4.4.0"
},
"devDependencies": {
"prisma": "4.3.1",
"typescript": "^4.8.3",
"prisma": "4.4.0",
"typescript": "4.8.4",
"dotenv-cli": "6.0.0"
}
}

View File

@ -13,20 +13,20 @@
"author": "Baptiste Arnaud",
"license": "ISC",
"devDependencies": {
"@faire/mjml-react": "^2.1.4",
"@types/node": "18.7.16",
"@types/nodemailer": "6.4.5",
"@types/react": "^18.0.21",
"concurrently": "^7.4.0",
"http-server": "^14.1.1",
"nodemailer": "^6.8.0",
"react": "^18.2.0",
"serve": "^14.0.1",
"tsx": "^3.9.0",
"@faire/mjml-react": "2.1.4",
"@types/node": "18.7.23",
"@types/nodemailer": "6.4.6",
"@types/react": "18.0.21",
"concurrently": "7.4.0",
"http-server": "14.1.1",
"nodemailer": "6.8.0",
"react": "18.2.0",
"serve": "14.0.1",
"tsx": "3.9.0",
"utils": "workspace:*"
},
"peerDependencies": {
"@faire/mjml-react": "^2.1.4",
"nodemailer": "^6.7.8"
"@faire/mjml-react": "2.1.4",
"nodemailer": "6.7.8"
}
}

View File

@ -6,15 +6,15 @@
"license": "AGPL-3.0-or-later",
"private": true,
"dependencies": {
"zod": "^3.19.0"
"zod": "3.19.1"
},
"devDependencies": {
"typescript": "^4.8.3",
"next": "12.3.0",
"typescript": "4.8.4",
"next": "12.3.1",
"db": "workspace:*"
},
"peerDependencies": {
"next": "^12.0.0",
"next": "12.0.0",
"db": "workspace:*"
}
}

View File

@ -10,11 +10,11 @@
"start:prod": "NODE_ENV=production ts-node index.ts"
},
"devDependencies": {
"@types/node": "18.7.16",
"@types/node": "18.7.23",
"db": "workspace:*",
"models": "workspace:*",
"ts-node": "^10.9.1",
"typescript": "^4.8.3",
"ts-node": "10.9.1",
"typescript": "4.8.4",
"utils": "workspace:*",
"emails": "workspace:*"
}

View File

@ -11,22 +11,22 @@
"test": "pnpm jest"
},
"devDependencies": {
"jest-environment-jsdom": "^29.0.3",
"jest-environment-jsdom": "29.1.2",
"@rollup/plugin-typescript": "8.5.0",
"@types/jest": "^29.0.1",
"@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.36.2",
"eslint": "8.23.0",
"eslint-plugin-functional": "^4.3.0",
"@types/jest": "29.1.1",
"@typescript-eslint/eslint-plugin": "5.38.1",
"@typescript-eslint/parser": "5.38.1",
"eslint": "8.24.0",
"eslint-plugin-functional": "4.4.0",
"eslint-plugin-jest": "27.0.4",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.0.3",
"eslint-plugin-prettier": "4.2.1",
"jest": "29.1.2",
"prettier": "2.7.1",
"rollup": "2.79.0",
"rollup-plugin-styles": "^4.0.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^29.0.0",
"tslib": "^2.4.0",
"typescript": "^4.8.3"
"rollup": "2.79.1",
"rollup-plugin-styles": "4.0.0",
"rollup-plugin-terser": "7.0.2",
"ts-jest": "29.0.3",
"tslib": "2.4.0",
"typescript": "4.8.4"
}
}

View File

@ -6,20 +6,20 @@
"main": "./index.ts",
"types": "./index.ts",
"devDependencies": {
"@types/nodemailer": "6.4.5",
"aws-sdk": "2.1213.0",
"cuid": "^2.1.8",
"@types/nodemailer": "6.4.6",
"aws-sdk": "2.1227.0",
"cuid": "2.1.8",
"db": "workspace:*",
"models": "workspace:*",
"next": "12.3.0",
"nodemailer": "^6.7.8",
"typescript": "^4.8.3"
"next": "12.3.1",
"nodemailer": "6.8.0",
"typescript": "4.8.4"
},
"peerDependencies": {
"aws-sdk": "^2.1152.0",
"aws-sdk": "2.1152.0",
"db": "workspace:*",
"models": "workspace:*",
"next": "^12.0.0",
"nodemailer": "^6.7.8"
"next": "12.0.0",
"nodemailer": "6.7.8"
}
}

View File

@ -6,7 +6,7 @@
"author": "baptisteArno",
"license": "AGPL-3.0-or-later",
"devDependencies": {
"@prettier/plugin-php": "^0.19.0",
"@prettier/plugin-php": "0.19.1",
"prettier": "2.7.1"
},
"scripts": {

4298
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff