Skip to content

Commit

Permalink
Cleanup; Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas committed Nov 24, 2023
1 parent 9b8d8eb commit eeeacf1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 0 additions & 3 deletions packages/js-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export type { ProcessManager } from './sandbox/process'
export type { EnvVars } from './sandbox/envVars'
export { runCode, CodeRuntime } from './runCode' // Export CodeRuntime enum as value, not as type, so it can be actually used in consumer code
import { Sandbox } from './sandbox/index'
// export { runCmd } from './runCmd'

import { DataAnalysis } from './templates/dataAnalysis'
export { DataAnalysis as CodeInterpreter }
Expand All @@ -32,5 +31,3 @@ export type { Action } from './sandbox/index'

export { Sandbox }
export default Sandbox

// export { Sandbox }
1 change: 0 additions & 1 deletion packages/js-sdk/src/runCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Sandbox } from './sandbox'

export async function runCmd(command: string, opts?: { apiKey?: string }) {
const sandbox = await Sandbox.create({
template: 'Bash',
apiKey: opts?.apiKey || process?.env?.E2B_API_KEY || '', // Sandbox.create will throw an error if the API key is not provided so no need to check here
})

Expand Down
5 changes: 5 additions & 0 deletions packages/js-sdk/src/sandbox/sandboxConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ export interface Logger {
}

export interface SandboxConnectionOpts {
/**
* Sandbox Template ID or name.
*
* If not specified, the 'base' template will be used.
*/
template?: string;
/**
* @deprecated Use `template` instead.
Expand Down
2 changes: 1 addition & 1 deletion packages/python-sdk/e2b/sandbox/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(
Create a new cloud sandbox.
:param id: [Deprecated] Use `template` param instead.
:param template: ID of the sandbox template or the name of prepared template.
:param template: ID of the sandbox template or the name of prepared template. If not specified a 'base' template will be used.
Can be one of the following premade sandbox templates or a custom sandbox template ID:
- `base` - A basic sandbox with a Linux environment
- `Python3-DataAnalysis` - A Python3 sandbox with data analysis tools
Expand Down

0 comments on commit eeeacf1

Please sign in to comment.