Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Change envd access token to protected (#867)

Jakub Novákfe214af0cef2
diff --git a/.changeset/twelve-pumas-fail.md b/.changeset/twelve-pumas-fail.md
new file mode 100644
index 000000000..e4a8a0dd3
--- /dev/null
+++ b/.changeset/twelve-pumas-fail.md
@@ -0,0 +1,5 @@
+---
+'e2b': patch
+---
+
+Change envdAccessToken to protected
diff --git a/packages/js-sdk/src/sandbox/index.ts b/packages/js-sdk/src/sandbox/index.ts
index 43c161885..cb95d33a1 100644
--- a/packages/js-sdk/src/sandbox/index.ts
+++ b/packages/js-sdk/src/sandbox/index.ts
@@ -91,8 +91,8 @@ export class Sandbox extends SandboxApi {
protected readonly envdPort = 49983
protected readonly connectionConfig: ConnectionConfig
+ protected readonly envdAccessToken?: string
private readonly envdApiUrl: string
- private readonly envdAccessToken?: string
private readonly envdApi: EnvdApiClient
/**
@@ -119,8 +119,9 @@ export class Sandbox extends SandboxApi {
this.sandboxDomain = opts.sandboxDomain ?? this.connectionConfig.domain
this.envdAccessToken = opts.envdAccessToken
- this.envdApiUrl = `${this.connectionConfig.debug ? 'http' : 'https'
- }://${this.getHost(this.envdPort)}`
+ this.envdApiUrl = `${
+ this.connectionConfig.debug ? 'http' : 'https'
+ }://${this.getHost(this.envdPort)}`
const rpcTransport = createConnectTransport({
baseUrl: this.envdApiUrl,
@@ -272,7 +273,7 @@ export class Sandbox extends SandboxApi {
* @beta This feature is in beta and may change in the future.
*
* Create a new sandbox from the specified sandbox template.
- *
+ *
* @param template sandbox template name or ID.
* @param opts connection options.
*
@@ -630,7 +631,7 @@ export class Sandbox extends SandboxApi {
if (compareVersions(this.envdApi.version, '0.1.5') < 0) {
throw new SandboxError(
'You need to update the template to use the new SDK. ' +
- 'You can do this by running `e2b template build` in the directory with the template.'
+ 'You can do this by running `e2b template build` in the directory with the template.'
)
}