Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Clean up
Jakub Novak2c8fd8375091
diff --git a/packages/example.cjs/basic.cjs b/packages/example.cjs/basic.cjsdeleted file mode 100644index 794b596b4..000000000--- a/packages/example.cjs/basic.cjs+++ /dev/null@@ -1,16 +0,0 @@-const e2b = require('../js-sdk')-function wait(ms) {- return new Promise(resolve => setTimeout(resolve, ms))-}--async function main() {- for (let i = 0; i < 10; i++) {- console.log('Creating sandbox', i + 1)- e2b.Sandbox.create({id: 'base', apiKey: process.env.E2B_API_KEY})- }- await e2b.Sandbox.create({id: 'base', apiKey: process.env.E2B_API_KEY})--}--main().catch(console.error)-diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.jsonindex c7a8f290e..cdd2d9942 100644--- a/packages/js-sdk/package.json+++ b/packages/js-sdk/package.json@@ -43,6 +43,7 @@"@types/ws": "^8.5.10","@typescript-eslint/eslint-plugin": "^6.8.0","@typescript-eslint/parser": "^6.8.0",+ "dotenv": "^16.4.5","knip": "^2.34.0","npm-check-updates": "^16.14.6","openapi-typescript": "^5.4.1",diff --git a/packages/js-sdk/test/run.mjs b/packages/js-sdk/test/run.mjsindex 43e30d3a9..a59945d0d 100644--- a/packages/js-sdk/test/run.mjs+++ b/packages/js-sdk/test/run.mjs@@ -1,4 +1,7 @@import { Sandbox } from '../dist/index.js'+import { config } from 'dotenv'++config()const sandbox = await Sandbox.create({apiKey: process.env.E2B_API_KEY@@ -6,5 +9,6 @@ const sandbox = await Sandbox.create({// __debug_port: 49982,// __debug_devEnv: 'local',})+console.log(sandbox.id)await sandbox.close()diff --git a/packages/js-sdk/testground/README.md b/packages/js-sdk/testground/README.mddeleted file mode 100644index 67bd47984..000000000--- a/packages/js-sdk/testground/README.md+++ /dev/null@@ -1,4 +0,0 @@-Various example scripts that comes in handy when testing/debugging/reasoning about the SDK.-Probably only useful for the dev team behind the SDK.--/next-js - Next.js + AppRouter + SDK examplediff --git a/packages/js-sdk/testground/local-envd.cjs b/packages/js-sdk/testground/local-envd.cjsdeleted file mode 100644index 7da96ba3b..000000000--- a/packages/js-sdk/testground/local-envd.cjs+++ /dev/null@@ -1,27 +0,0 @@-const e2b = require('../dist')-function wait(ms) {- return new Promise(resolve => setTimeout(resolve, ms))-}--async function main() {- const sandbox = await e2b.Sandbox.create({- id: 'base',- apiKey: process.env.E2B_API_KEY,- __debug_hostname: 'localhost',- __debug_port: 49982,- __debug_devEnv: "local"- })-- await sandbox.filesystem.write(- '/code/hello.txt', "Hello World!"- )- const file = await sandbox.downloadFile('/code/hello.txt')-- const enc = new TextDecoder("utf-8");- console.log(enc.decode(file))-- await sandbox.close()-}--main().catch(console.error)-diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 087a0ec85..3f39e4f9c 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -362,6 +362,9 @@ importers:'@typescript-eslint/parser':specifier: ^6.8.0version: 6.8.0([email protected])([email protected])+ dotenv:+ specifier: ^16.4.5+ version: 16.4.5knip:specifier: ^2.34.0version: 2.35.0@@ -4852,6 +4855,11 @@ packages:is-obj: 2.0.0dev: true+ resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}+ engines: {node: '>=12'}+ dev: true+resolution: {integrity: sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==}dev: false