Skip to content

Commit 86f9534

Browse files
author
Gerome El-assaad
committed
fixed build errors
1 parent 5df8cbd commit 86f9534

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

app/api/files/sandbox/list/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { NextRequest, NextResponse } from 'next/server'
22
import { Sandbox, FileType } from '@e2b/code-interpreter'
33
import { FileSystemNode } from '@/components/file-tree'
44

5+
export const dynamic = 'force-dynamic'
6+
57
async function listFilesRecursively(
68
sandbox: Sandbox,
79
path: string,
@@ -30,8 +32,6 @@ async function listFilesRecursively(
3032

3133
const E2B_API_KEY = process.env.E2B_API_KEY
3234

33-
const sandboxTimeout = 10 * 60 * 1000
34-
3535
export async function GET(request: NextRequest) {
3636
if (!E2B_API_KEY) {
3737
return NextResponse.json(

lib/fragment-node-mapper.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ export class FragmentNodeMapper {
210210
* Convert a fragment to a workflow node
211211
*/
212212
fragmentToNode(fragment: FragmentSchema, position: { x: number; y: number }): FragmentNode {
213-
const templateConfig = this.templateConfigs[fragment.template]
213+
const templateId = fragment.template as TemplateId
214+
const templateConfig = this.templateConfigs[templateId]
214215
if (!templateConfig) {
215216
throw new Error(`Unsupported template: ${fragment.template}`)
216217
}
@@ -224,7 +225,7 @@ export class FragmentNodeMapper {
224225
inputs: templateConfig.inputs,
225226
outputs: templateConfig.outputs,
226227
config: {
227-
template: fragment.template,
228+
template: templateId,
228229
environment: {
229230
CODE: fragment.code,
230231
FILE_PATH: fragment.file_path,
@@ -256,7 +257,7 @@ export class FragmentNodeMapper {
256257
has_additional_dependencies: Boolean(env.DEPENDENCIES && env.DEPENDENCIES.trim()),
257258
install_dependencies_command: env.INSTALL_COMMAND || '',
258259
port: env.PORT ? parseInt(env.PORT, 10) : null,
259-
file_path: env.FILE_PATH || this.getDefaultFilePath(node.config.template),
260+
file_path: env.FILE_PATH || (this.isTemplateSupported(node.config.template) ? this.getDefaultFilePath(node.config.template) : 'main.py'),
260261
code: env.CODE || ''
261262
}
262263
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"dev": "next dev --turbo",
88
"build": "next build",
99
"start": "next start",
10-
"lint": "next lint",
11-
"migrate:workflows": "node scripts/check-workflow-migration.js"
10+
"lint": "next lint"
1211
},
1312
"dependencies": {
1413
"@21st-extension/react": "^0.5.14",

0 commit comments

Comments
 (0)