2
0

📦 Upgrade packages

This commit is contained in:
Baptiste Arnaud
2022-11-02 19:45:46 +01:00
committed by GitHub
parent 48285479cc
commit 2c66c59dfc
64 changed files with 2518 additions and 3158 deletions

View File

@ -11,30 +11,30 @@
"lint": "eslint --fix -c ./.eslintrc.js \"./src/**/*.ts*\""
},
"dependencies": {
"@stripe/react-stripe-js": "1.13.0",
"@stripe/stripe-js": "1.41.0",
"@stripe/react-stripe-js": "1.14.1",
"@stripe/stripe-js": "1.42.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-phone-number-input": "3.2.12",
"react-scroll": "1.8.8",
"react-transition-group": "4.4.5",
"resize-observer": "1.0.4"
},
"devDependencies": {
"@types/node": "18.11.0",
"@types/node": "18.11.9",
"@types/qs": "6.9.7",
"@types/react": "18.0.21",
"@types/react": "18.0.24",
"@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.40.0",
"@typescript-eslint/parser": "5.40.0",
"autoprefixer": "10.4.12",
"@typescript-eslint/eslint-plugin": "5.42.0",
"@typescript-eslint/parser": "5.42.0",
"autoprefixer": "10.4.13",
"baptistearno-tsup": "^0.1.0",
"db": "workspace:*",
"eslint": "8.25.0",
"eslint-config-next": "12.3.1",
"eslint": "8.26.0",
"eslint-config-next": "13.0.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-react": "7.31.10",
@ -43,7 +43,7 @@
"prettier": "2.7.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.1.8",
"tailwindcss": "3.2.1",
"typescript": "4.8.4",
"utils": "workspace:*"
},

View File

@ -35,7 +35,7 @@ export const InputChatBlock = ({
) => void
onSkip: () => void
}) => {
const { typebot } = useTypebot()
const { typebot, isLoading } = useTypebot()
const { addAnswer } = useAnswers()
const [answer, setAnswer] = useState<string>()
const [isEditting, setIsEditting] = useState(false)
@ -66,6 +66,8 @@ export const InputChatBlock = ({
setIsEditting(true)
}
if (isLoading) return null
if (answer) {
const avatarUrl = typebot.theme.chat.guestAvatar?.url
return (

View File

@ -0,0 +1,14 @@
{
"name": "configs",
"version": "1.0.0",
"main": "./index.ts",
"types": "./index.ts",
"license": "AGPL-3.0-or-later",
"private": true,
"devDependencies": {
"@playwright/test": "1.27.1",
"@types/node": "18.11.9",
"dotenv": "16.0.3",
"utils": "workspace:*"
}
}

View File

@ -0,0 +1,47 @@
import { PlaywrightTestConfig } from '@playwright/test'
import path from 'path'
import fs from 'fs'
const builderLocalEnvPath = path.join(
__dirname,
'../../../apps/builder/.env.local'
)
const localViewerEnvPath = path.join(
__dirname,
'../../../apps/viewer/.env.local'
)
if (fs.existsSync(builderLocalEnvPath))
require('dotenv').config({
path: builderLocalEnvPath,
})
if (fs.existsSync(localViewerEnvPath))
require('dotenv').config({
path: localViewerEnvPath,
})
export const playwrightBaseConfig: PlaywrightTestConfig = {
globalSetup: require.resolve(path.join(__dirname, 'globalSetup')),
timeout: process.env.CI ? 50 * 1000 : 20 * 1000,
expect: {
timeout: process.env.CI ? 10 * 1000 : 5 * 1000,
},
retries: process.env.NO_RETRIES ? 0 : 1,
workers: process.env.CI ? 2 : 3,
reporter: [[process.env.CI ? 'github' : 'list'], ['html']],
maxFailures: process.env.CI ? 10 : undefined,
webServer: process.env.CI
? {
command: 'pnpm run start',
timeout: 60_000,
reuseExistingServer: true,
}
: undefined,
use: {
trace: 'on-first-retry',
video: 'retain-on-failure',
locale: 'en-US',
browserName: 'chromium',
viewport: { width: 1400, height: 1000 },
},
}

View File

@ -0,0 +1,11 @@
import { FullConfig } from '@playwright/test'
import { setupDatabase, teardownDatabase } from 'utils/playwright/databaseSetup'
async function globalSetup(config: FullConfig) {
const { baseURL } = config.projects[0].use
if (!baseURL) throw new Error('baseURL is missing')
await teardownDatabase()
await setupDatabase()
}
export default globalSetup

View File

@ -0,0 +1 @@
export { playwrightBaseConfig } from './baseConfig'

View File

@ -0,0 +1,6 @@
{
"compilerOptions": {
"moduleResolution": "node",
"esModuleInterop": true
}
}

View File

@ -5,7 +5,7 @@
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"dev": "dotenv -e ../../apps/builder/.env.local prisma db push && pnpm generate:schema && pnpm start:sutdio ",
"dev": "dotenv -e ../../apps/builder/.env.local prisma db push && pnpm generate:schema",
"build": "pnpm generate:schema",
"start:sutdio": "dotenv -e ../../apps/builder/.env.local -v BROWSER=none prisma studio",
"generate:schema": "dotenv -e ../../apps/builder/.env.local prisma generate",
@ -16,10 +16,10 @@
"migration:deploy": "prisma migrate deploy"
},
"dependencies": {
"@prisma/client": "4.4.0"
"@prisma/client": "4.5.0"
},
"devDependencies": {
"prisma": "4.4.0",
"prisma": "4.5.0",
"typescript": "4.8.4",
"dotenv-cli": "6.0.0"
}

View File

@ -14,15 +14,15 @@
"license": "ISC",
"devDependencies": {
"@faire/mjml-react": "2.1.4",
"@types/node": "18.11.0",
"@types/node": "18.11.9",
"@types/nodemailer": "6.4.6",
"@types/react": "18.0.21",
"concurrently": "7.4.0",
"@types/react": "18.0.24",
"concurrently": "7.5.0",
"http-server": "14.1.1",
"nodemailer": "6.8.0",
"react": "18.2.0",
"serve": "14.0.1",
"tsx": "3.10.1",
"tsx": "3.11.0",
"utils": "workspace:*"
},
"peerDependencies": {

View File

@ -10,7 +10,7 @@
},
"devDependencies": {
"typescript": "4.8.4",
"next": "12.3.1",
"next": "13.0.1",
"db": "workspace:*"
},
"peerDependencies": {

View File

@ -5,17 +5,19 @@
"license": "AGPL-3.0-or-later",
"private": true,
"scripts": {
"start:local": "ts-node index.ts",
"start:staging": "NODE_ENV=staging ts-node index.ts",
"start:prod": "NODE_ENV=production ts-node index.ts"
"start:local": "tsx index.ts",
"start:staging": "NODE_ENV=staging tsx index.ts",
"start:prod": "NODE_ENV=production tsx index.ts"
},
"devDependencies": {
"@types/node": "18.11.0",
"@types/node": "18.11.9",
"axios": "^1.1.3",
"db": "workspace:*",
"emails": "workspace:*",
"got": "12.5.2",
"models": "workspace:*",
"ts-node": "10.9.1",
"tsx": "3.11.0",
"typescript": "4.8.4",
"utils": "workspace:*",
"emails": "workspace:*"
"utils": "workspace:*"
}
}

View File

@ -11,16 +11,16 @@
"test": "pnpm jest"
},
"devDependencies": {
"@types/jest": "29.1.2",
"@typescript-eslint/eslint-plugin": "5.40.0",
"@typescript-eslint/parser": "5.40.0",
"@types/jest": "29.2.1",
"@typescript-eslint/eslint-plugin": "5.42.0",
"@typescript-eslint/parser": "5.42.0",
"baptistearno-tsup": "^0.1.0",
"eslint": "8.25.0",
"eslint": "8.26.0",
"eslint-plugin-functional": "4.4.1",
"eslint-plugin-jest": "27.1.2",
"eslint-plugin-jest": "27.1.3",
"eslint-plugin-prettier": "4.2.1",
"jest": "29.2.0",
"jest-environment-jsdom": "29.2.0",
"jest": "29.2.2",
"jest-environment-jsdom": "29.2.2",
"prettier": "2.7.1",
"ts-jest": "29.0.3",
"typescript": "4.8.4"

View File

@ -8,11 +8,11 @@
"devDependencies": {
"@playwright/test": "1.27.1",
"@types/nodemailer": "6.4.6",
"aws-sdk": "2.1233.0",
"aws-sdk": "2.1245.0",
"cuid": "2.1.8",
"db": "workspace:*",
"models": "workspace:*",
"next": "12.3.1",
"next": "13.0.1",
"nodemailer": "6.8.0",
"typescript": "4.8.4"
},

View File

@ -62,7 +62,7 @@ const createAnswers = ({
resultId: `${resultIdPrefix}-result${idx}`,
content: `content${idx}`,
blockId: 'block1',
groupId: 'block1',
groupId: 'group1',
storageUsed: fakeStorage ? Math.round(fakeStorage / count) : null,
})),
],
@ -95,6 +95,24 @@ export const deleteWorkspaces = async (workspaceIds: string[]) => {
})
}
export const deleteTypebots = async (typebotIds: string[]) => {
await prisma.typebot.deleteMany({
where: { id: { in: typebotIds } },
})
}
export const deleteCredentials = async (credentialIds: string[]) => {
await prisma.credentials.deleteMany({
where: { id: { in: credentialIds } },
})
}
export const deleteWebhooks = async (webhookIds: string[]) => {
await prisma.webhook.deleteMany({
where: { id: { in: webhookIds } },
})
}
export const createWorkspaces = async (workspaces: Partial<Workspace>[]) => {
const workspaceIds = workspaces.map((workspace) => workspace.id ?? cuid())
await prisma.workspace.createMany({

View File

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