2
0

⬆️ Upgrade pnpm, turbo, isolated-vm (#1609)

Closes https://github.com/baptisteArno/typebot.io/issues/1554
This commit is contained in:
Baptiste Arnaud
2024-07-11 16:09:49 +02:00
committed by GitHub
parent c7263a17eb
commit 5a3fd84214
18 changed files with 14488 additions and 10916 deletions

View File

@ -3,6 +3,8 @@ ENCRYPTION_SECRET=do+UspMmB/rewbX2K/rskFmtgGSSZ8Ta
DATABASE_URL=postgresql://postgres:typebot@typebot-db:5432/typebot
NODE_OPTIONS=--no-node-snapshot
NEXTAUTH_URL=
NEXT_PUBLIC_VIEWER_URL=

View File

@ -5,7 +5,6 @@
"bradlc.vscode-tailwindcss",
"unifiedjs.vscode-mdx",
"lokalise.i18n-ally",
"ms-playwright.playwright",
"Prisma.prisma"
]
}

View File

@ -1,4 +1,4 @@
FROM node:18-bullseye-slim AS base
FROM node:20-bullseye-slim AS base
WORKDIR /app
ARG SCOPE
ENV SCOPE=${SCOPE}
@ -8,13 +8,13 @@ RUN apt-get -qy update \
&& apt-get autoremove -yq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN npm --global install pnpm@8
RUN npm --global install pnpm@9.5.0
FROM base AS pruner
RUN npm --global install turbo@1.11.3
RUN npm --global install turbo@2.0.5
WORKDIR /app
COPY . .
RUN turbo prune --scope=${SCOPE} --docker
RUN turbo prune ${SCOPE} --docker
FROM base AS builder
RUN apt-get -qy update && apt-get -qy --no-install-recommends install openssl git python3 g++ build-essential

View File

@ -69,7 +69,7 @@
"google-spreadsheet": "4.1.1",
"immer": "10.0.2",
"ioredis": "^5.4.1",
"isolated-vm": "4.7.2",
"isolated-vm": "5.0.1",
"jsonwebtoken": "9.0.1",
"ky": "1.2.4",
"libphonenumber-js": "1.10.37",

View File

@ -13,3 +13,5 @@ writeFileSync(
'./openapi/builder.json',
JSON.stringify(openApiDocument, null, 2)
)
process.exit()

View File

@ -1057,7 +1057,33 @@
"type": "object",
"properties": {
"message": {
"type": "string",
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
},
"text": {
"type": "string"
},
"attachedFileUrls": {
"type": "array",
"items": {
"type": "string"
},
"description": "Can only be provided if current input block is a text input block that allows attachments"
}
},
"required": [
"type",
"text"
]
}
],
"description": "Only provide it if your flow starts with an input block and you'd like to directly provide an answer to it."
},
"isStreamEnabled": {
@ -1448,7 +1474,33 @@
"type": "object",
"properties": {
"message": {
"type": "string"
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
},
"text": {
"type": "string"
},
"attachedFileUrls": {
"type": "array",
"items": {
"type": "string"
},
"description": "Can only be provided if current input block is a text input block that allows attachments"
}
},
"required": [
"type",
"text"
]
}
]
},
"textBubbleContentFormat": {
"type": "string",
@ -1792,7 +1844,33 @@
"default": false
},
"message": {
"type": "string"
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
},
"text": {
"type": "string"
},
"attachedFileUrls": {
"type": "array",
"items": {
"type": "string"
},
"description": "Can only be provided if current input block is a text input block that allows attachments"
}
},
"required": [
"type",
"text"
]
}
]
},
"isOnlyRegistering": {
"type": "boolean",
@ -2915,6 +2993,9 @@
"properties": {
"id": {
"type": "string"
},
"caption": {
"type": "string"
}
},
"required": [
@ -2949,6 +3030,9 @@
"properties": {
"id": {
"type": "string"
},
"caption": {
"type": "string"
}
},
"required": [
@ -3017,6 +3101,9 @@
"properties": {
"id": {
"type": "string"
},
"caption": {
"type": "string"
}
},
"required": [
@ -5872,6 +5959,25 @@
},
"isLong": {
"type": "boolean"
},
"attachments": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"saveVariableId": {
"type": "string"
},
"visibility": {
"type": "string",
"enum": [
"Auto",
"Public",
"Private"
]
}
}
}
}
}

View File

@ -12,4 +12,4 @@
"tsx": "4.6.2",
"dotenv-cli": "7.4.1"
}
}
}

View File

@ -22,7 +22,7 @@ title: Manual
## Requirements
- A PostgresDB database hosted somewhere. [Supabase](https://supabase.com/) offer great free options. But you can also setup your own database on your server.
- A server with Node.js 14+, Nginx, and PM2 installed.
- A server with Node.js 20+, Nginx, and PM2 installed.
- Experience deploying Next.js applications with PM2. Check out [this guide](https://www.coderrocketfuel.com/article/how-to-deploy-a-next-js-website-to-a-digital-ocean-server/) for more information.
## Getting Started

View File

@ -26,7 +26,7 @@
"cors": "2.8.5",
"google-spreadsheet": "4.1.1",
"got": "12.6.0",
"isolated-vm": "4.7.2",
"isolated-vm": "5.0.1",
"ky": "1.2.4",
"next": "14.1.0",
"nextjs-cors": "2.1.2",

View File

@ -10,3 +10,5 @@ const openApiDocument = generateOpenApiDocument(appRouter, {
})
writeFileSync('./openapi/viewer.json', JSON.stringify(openApiDocument, null, 2))
process.exit()

View File

@ -35,12 +35,12 @@
"cz-emoji": "1.3.2-canary.2",
"husky": "8.0.3",
"prettier": "2.8.8",
"turbo": "1.11.3"
"turbo": "2.0.5"
},
"config": {
"commitizen": {
"path": "node_modules/cz-emoji"
}
},
"packageManager": "pnpm@8.15.4"
"packageManager": "pnpm@9.5.0"
}

View File

@ -33,7 +33,7 @@
"openai": "4.47.1",
"qs": "6.11.2",
"stripe": "12.13.0",
"isolated-vm": "4.7.2"
"isolated-vm": "5.0.1"
},
"devDependencies": {
"@typebot.io/forge": "workspace:*",

View File

@ -22,6 +22,9 @@ const indexConfig = {
format: 'es',
},
onwarn,
watch: {
clearScreen: false,
},
plugins: [
resolve({ extensions }),
babel({

View File

@ -18,6 +18,9 @@ const indexConfig = {
format: 'es',
},
external: ['next/dynamic', 'react', 'react/jsx-runtime'],
watch: {
clearScreen: false,
},
plugins: [
resolve({ extensions }),
babel({

View File

@ -18,6 +18,9 @@ const indexConfig = {
format: 'es',
},
external: ['react', 'react/jsx-runtime'],
watch: {
clearScreen: false,
},
plugins: [
resolve({ extensions }),
babel({

View File

@ -6,6 +6,6 @@
"dependencies": {
"@typebot.io/lib": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"isolated-vm": "4.7.2"
"isolated-vm": "5.0.1"
}
}

25232
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,9 @@
{
"baseBranch": "origin/main",
"globalDotEnv": [".env"],
"pipeline": {
"$schema": "https://turbo.build/schema.json",
"ui": "stream",
"globalDependencies": [".env"],
"globalEnv": ["DATABASE_URL", "SKIP_ENV_CHECK"],
"tasks": {
"lint": {
"outputs": []
},
@ -14,9 +16,12 @@
"@typebot.io/prisma#db:generate",
"@typebot.io/prisma#db:push"
],
"cache": false
"cache": false,
"persistent": true
},
"build": {
"passThroughEnv": ["ENCRYPTION_SECRET"],
"env": ["VERCEL_*", "NEXTAUTH_URL", "SENTRY_*"],
"dependsOn": ["^build", "@typebot.io/prisma#db:generate"],
"outputs": [
".next/**",
@ -25,13 +30,13 @@
"build/**",
"public/__ENV.js"
],
"outputMode": "new-only",
"dotEnv": [".env"]
"inputs": ["$TURBO_DEFAULT$", ".env"],
"outputLogs": "new-only"
},
"docs#build": {
"dependsOn": ["api:generate"],
"outputs": ["build/**"],
"outputMode": "new-only"
"outputLogs": "new-only"
},
"api:generate": {
"dependsOn": ["bot-engine#build", "@typebot.io/prisma#db:generate"],
@ -48,6 +53,7 @@
"cache": false
},
"checkAndReportChatsUsage": {
"env": ["STRIPE_*", "NEXTAUTH_URL", "SMTP_*"],
"dependsOn": ["@typebot.io/prisma#db:generate"],
"cache": false
}