2
0

🔒 Use isolated-vm

This commit is contained in:
Baptiste Arnaud
2024-05-22 11:42:31 +02:00
parent 15b2901f8a
commit 8d66b52a39
14 changed files with 310 additions and 114 deletions

View File

@@ -50,21 +50,14 @@ const nextConfig = {
output: 'standalone',
experimental: {
outputFileTracingRoot: join(__dirname, '../../'),
serverComponentsExternalPackages: ['isolated-vm'],
},
webpack: (config, { nextRuntime }) => {
if (nextRuntime === 'nodejs') return config
webpack: (config, { isServer }) => {
if (isServer) return config
if (nextRuntime === 'edge') {
config.resolve.alias['minio'] = false
config.resolve.alias['got'] = false
config.resolve.alias['qrcode'] = false
return config
}
// These packages are imports from the integrations definition files that can be ignored for the client.
config.resolve.alias['minio'] = false
config.resolve.alias['got'] = false
config.resolve.alias['openai'] = false
config.resolve.alias['qrcode'] = false
config.resolve.alias['isolated-vm'] = false
return config
},
async redirects() {

View File

@@ -26,6 +26,7 @@
"cors": "2.8.5",
"google-spreadsheet": "4.1.1",
"got": "12.6.0",
"isolated-vm": "4.7.2",
"ky": "1.2.3",
"next": "14.1.0",
"nextjs-cors": "2.1.2",
@@ -37,7 +38,6 @@
"stripe": "12.13.0"
},
"devDependencies": {
"dotenv": "16.4.5",
"@faire/mjml-react": "3.3.0",
"@paralleldrive/cuid2": "2.2.1",
"@playwright/test": "1.43.1",
@@ -46,6 +46,8 @@
"@typebot.io/forge": "workspace:*",
"@typebot.io/forge-repository": "workspace:*",
"@typebot.io/lib": "workspace:*",
"@typebot.io/playwright": "workspace:*",
"@typebot.io/results": "workspace:*",
"@typebot.io/schemas": "workspace:*",
"@typebot.io/tsconfig": "workspace:*",
"@typebot.io/variables": "workspace:*",
@@ -55,8 +57,8 @@
"@types/papaparse": "5.3.7",
"@types/qs": "6.9.7",
"@types/react": "18.2.15",
"dotenv-cli": "7.4.1",
"dotenv": "16.4.5",
"dotenv-cli": "7.4.1",
"eslint": "8.44.0",
"eslint-config-custom": "workspace:*",
"google-auth-library": "8.9.0",
@@ -64,8 +66,6 @@
"papaparse": "5.4.1",
"superjson": "1.12.4",
"typescript": "5.4.5",
"zod": "3.22.4",
"@typebot.io/playwright": "workspace:*",
"@typebot.io/results": "workspace:*"
"zod": "3.22.4"
}
}