Skip to content

armgit / E2B

Public Imported from GitHub
0

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

chore: remove unused dead code across SDK packages (#1388)

Mish Ushakove7a82ea9eb3b
diff --git a/.changeset/dead-code-cleanup.md b/.changeset/dead-code-cleanup.md
new file mode 100644
index 000000000..3a5d6569e
--- /dev/null
+++ b/.changeset/dead-code-cleanup.md
@@ -0,0 +1,7 @@
+---
+'@e2b/python-sdk': patch
+'@e2b/cli': patch
+'e2b': patch
+---
+
+Remove unused internal code: `wait` helper (js-sdk), `asSandboxTemplate`/`asHeadline`/`selectOption`/`basicDockerfile` (cli), and `format_execution_timeout_error` (python-sdk). No public API changes.
diff --git a/packages/cli/src/docker/constants.ts b/packages/cli/src/docker/constants.ts
index b9a2f1d3d..83fe4ad67 100644
--- a/packages/cli/src/docker/constants.ts
+++ b/packages/cli/src/docker/constants.ts
@@ -1,8 +1,2 @@
export const defaultDockerfileName = 'e2b.Dockerfile'
export const fallbackDockerfileName = 'Dockerfile'
-
-export const basicDockerfile = `# You can use most Debian-based base images
-FROM ubuntu:22.04
-
-# Install dependencies and customize sandbox
-`
diff --git a/packages/cli/src/options.ts b/packages/cli/src/options.ts
index 08e1f5fac..82bff22f4 100644
--- a/packages/cli/src/options.ts
+++ b/packages/cli/src/options.ts
@@ -16,11 +16,6 @@ export const configOption = new commander.Option(
)} in root directory. We recommend using the new build system (https://e2b.dev/docs/template/defining-template) that does not use config files.`
)
-export const selectOption = new commander.Option(
- '-s, --select',
- 'select multiple sandbox templates from interactive list'
-)
-
export const selectMultipleOption = new commander.Option(
'-s, --select',
'select sandbox template from interactive list'
diff --git a/packages/cli/src/utils/format.ts b/packages/cli/src/utils/format.ts
index 53b8825fd..3fa676070 100644
--- a/packages/cli/src/utils/format.ts
+++ b/packages/cli/src/utils/format.ts
@@ -72,10 +72,6 @@ export function asTimestamp(content: string) {
return chalk.default.blue(content)
}
-export function asSandboxTemplate(pathInTemplate?: string) {
- return chalk.default.green(pathInTemplate)
-}
-
export function asLocal(pathInLocal?: string) {
return chalk.default.blue(pathInLocal)
}
@@ -89,10 +85,6 @@ export function asBuildLogs(content: string) {
return chalk.default.blueBright(content)
}
-export function asHeadline(content: string) {
- return chalk.default.underline(asPrimary(asBold(content)))
-}
-
export function withUnderline(content: string) {
return chalk.default.underline(content)
}
diff --git a/packages/js-sdk/src/utils.ts b/packages/js-sdk/src/utils.ts
index d571e9104..1037ae810 100644
--- a/packages/js-sdk/src/utils.ts
+++ b/packages/js-sdk/src/utils.ts
@@ -103,10 +103,6 @@ export function stripAnsi(text: string): string {
return text.replace(ansiRegex(), '')
}
-export async function wait(ms: number) {
- return new Promise((resolve) => setTimeout(resolve, ms))
-}
-
/**
* Convert data to a Blob, avoiding unnecessary conversions when possible.
*/
diff --git a/packages/python-sdk/e2b/exceptions.py b/packages/python-sdk/e2b/exceptions.py
index 14587a5c0..c7ed37149 100644
--- a/packages/python-sdk/e2b/exceptions.py
+++ b/packages/python-sdk/e2b/exceptions.py
@@ -10,12 +10,6 @@ def format_request_timeout_error() -> Exception:
)
-def format_execution_timeout_error() -> Exception:
- return TimeoutException(
- "Execution timed out — the 'timeout' option can be used to increase this timeout",
- )
-
-
class SandboxException(Exception):
"""
Base class for all sandbox errors.