Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Cleanup playground

Tomas Valenta7828e6f7f4e8
diff --git a/api-service/playground/index.zip b/api-service/playground/index.zip
deleted file mode 100644
index e69de29bb..000000000
diff --git a/api-service/playground/package.json b/api-service/playground/package.json
index 0299e3927..bb3e76e57 100644
--- a/api-service/playground/package.json
+++ b/api-service/playground/package.json
@@ -7,6 +7,7 @@
"@aws-sdk/client-lambda": "^3.293.0",
"@devbookhq/sdk": "^2.6.74",
"@netlify/zip-it-and-ship-it": "^8.9.0",
+ "dotenv": "^16.0.3",
"express": "^4.18.2",
"intermock": "^0.2.5",
"morgan": "^1.10.0",
@@ -15,6 +16,7 @@
},
"devDependencies": {
"@types/express": "^4.17.17",
+ "@types/morgan": "^1.9.4",
"@types/node": "^18.15.0",
"concurrently": "^7.6.0",
"esbuild": "^0.17.11",
@@ -29,4 +31,4 @@
"build": "./scripts/build.js",
"start": "node lib/server.js"
}
-}
\ No newline at end of file
+}
diff --git a/api-service/playground/src/app.ts b/api-service/playground/src/app.ts
index 755cd6346..3cd1d5ae9 100644
--- a/api-service/playground/src/app.ts
+++ b/api-service/playground/src/app.ts
@@ -7,8 +7,12 @@ import express, {
} from 'express'
import { ValidateError } from 'tsoa'
import morgan from 'morgan'
+import * as dotenv from 'dotenv'
+
import { RegisterRoutes } from './generated/routes'
+dotenv.config()
+
export const app = express()
app.use(
diff --git a/api-service/playground/src/deployments/deployment.ts b/api-service/playground/src/deployments/deployment.ts
index d55699fbc..76de53f21 100644
--- a/api-service/playground/src/deployments/deployment.ts
+++ b/api-service/playground/src/deployments/deployment.ts
@@ -13,7 +13,12 @@ import { EnvVars, Session } from '@devbookhq/sdk'
import { packageFunction } from './packaging'
const credentials = {
+ accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
+ secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
+}
+if (!credentials.accessKeyId || !credentials.secretAccessKey) {
+ throw new Error('AWS credentials not found')
}
const region = 'us-east-1'
diff --git a/api-service/playground/yarn.lock b/api-service/playground/yarn.lock
index 77dbe36f0..7b40ef67a 100644
--- a/api-service/playground/yarn.lock
+++ b/api-service/playground/yarn.lock
@@ -1176,6 +1176,13 @@
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10"
integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==
+"@types/morgan@^1.9.4":
+ version "1.9.4"
+ resolved "https://registry.yarnpkg.com/@types/morgan/-/morgan-1.9.4.tgz#99965ad2bdc7c5cee28d8ce95cfa7300b19ea562"
+ integrity sha512-cXoc4k+6+YAllH3ZHmx4hf7La1dzUk6keTR4bF4b4Sc0mZxU/zK4wO7l+ZzezXm/jkYj/qC+uYGZrarZdIVvyQ==
+ dependencies:
+ "@types/node" "*"
+
"@types/multer@^1.4.7":
version "1.4.7"
resolved "https://registry.yarnpkg.com/@types/multer/-/multer-1.4.7.tgz#89cf03547c28c7bbcc726f029e2a76a7232cc79e"
@@ -1910,6 +1917,11 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"
+dotenv@^16.0.3:
+ version "16.0.3"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
+ integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==
+
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"