Commit Graph

4335 Commits

Author SHA1 Message Date
0div 2703f75370 Add minor changeset to python and js SDKs (#716)
`npx changeset` for the release of
https://github.com/e2b-dev/E2B/pull/649
@e2b/python-sdk@1.4.0 e2b@1.4.0
2025-05-05 16:29:35 +00:00
0div a5b08de85f Add optional depth parameter to SDK file listing methods. (#649)
# Description

Do not merge before https://github.com/e2b-dev/infra/pull/524 is merged
and deployed.

The DX would look like this:
```js
const files = await sandbox.files.list(dirName, { depth: 3 })
```
- [x] update `envd` pb spec 
- [x] generate for `js-sdk`
- [x] update `js-sdk` `file.list` method to include optional depth param
- [x] update `js-sdk` tests
- [x] generate for `python-sdk`
- [x] update `python-sdk` `file.list` method to include optional depth
param
  - [x] sync
  - [x] async
- [x] update `python-sdk` tests
  - [x] sync
  - [x] async

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
2025-05-05 09:17:08 -07:00
never not exploring a32bd71616 Remove HubSpot contact creation (#714)
This pr removes the HubSpot contact creation from our `/new_user` edge
function.
2025-05-04 10:01:52 -07:00
Mish Ushakov 2e6f3c6ae9 Vitest: continue after failing test (#711)
Like in pytest, we should be running all the tests before reporting test
results. Currently, vitest finishes after 1 test has failed, this could
cause confusion if your new test should be running after the failing
one.
2025-05-02 07:05:18 -07:00
Jakub Novák 0a4ffb0977 Update connect bucket docs page (#710)
# Description

Update connect bucket guide to new SDK version

---------

Co-authored-by: 0div <98087403+0div@users.noreply.github.com>
2025-05-01 09:33:54 +00:00
github-actions[bot] 5cb2edc0d1 [skip ci] Release new versions 2025-04-29 15:28:51 +00:00
Jakub Dobry e3021758f1 Update JS SDK target to es2017 (#708)
Updates the JS SDK target to es2017 (from es2015). This change improves
error logs that include user code. This is happening because before
es2017 (e.g. es2015) tsup adds polyfill for async (which we use in the
API) obfuscating the code execution path.

(The previously generated code)
```
var __async = (__this, __arguments, generator) => {
  return new Promise((resolve, reject) => {
    var fulfilled = (value) => {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    };
    var rejected = (value) => {
      try {
        step(generator.throw(value));
      } catch (e) {
        reject(e);
      }
    };
    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
    step((generator = generator.apply(__this, __arguments)).next());
  });
};
var __await = function(promise, isYieldStar) {
  this[0] = promise;
  this[1] = isYieldStar;
};
```
e2b@1.3.0
2025-04-29 08:23:47 -07:00
Mish Ushakov 10c6af28d4 docs: env > envs in Environment variable doc (#707)
- Minor change that fixes incorrect parameter in the docs
2025-04-29 12:16:17 +00:00
Jakub Novák 4ec6c82630 Security patches (#706)
# Description

Fixes:
https://github.com/e2b-dev/E2B/security/dependabot/163
https://github.com/e2b-dev/E2B/security/dependabot/157
https://github.com/e2b-dev/E2B/security/dependabot/156
https://github.com/e2b-dev/E2B/security/dependabot/148
https://github.com/e2b-dev/E2B/security/dependabot/147
2025-04-29 02:41:14 -07:00
0div 8bfd3c0eed Test new error handling indicating when the sandbox is not found (#540)
Added a test in `js-sdk` for https://github.com/e2b-dev/infra/pull/231

---------

Co-authored-by: Jakub Novák <jakub@e2b.dev>
2025-04-25 23:44:39 +02:00
Jakub Novák 3cfed0e4c0 Refactor workflows to enable requiring tests in PRs (#703)
# Description

Refactor to enable successful status checks for tests
2025-04-25 14:20:17 +02:00
github-actions[bot] 2c633a4ee9 [skip ci] Release new versions 2025-04-24 15:34:38 +00:00
Jakub Novák f81307c515 Allow for short sandbox id in e2b sbx connect (#702)
# Description

Allow for short sandbox ID in CLI when using `e2b sandbox connect
<sandbox-id>`
@e2b/cli@1.3.4
2025-04-24 08:31:04 -07:00
github-actions[bot] cde5128e96 [skip ci] Release new versions 2025-04-24 09:46:24 +00:00
Jakub Novák 64f2f71309 Respect E2B_DOMAIN for e2b auth login in CLI (#701)
# Description

- Respect `E2B_DOMAIN` for `e2b auth login` in CLI
- Keep `E2B_DOCS_BASE` to allow for running dashboard locally or towards
potentially different domain
@e2b/cli@1.3.3
2025-04-24 11:43:34 +02:00
Jakub Novák e1f1d9666e Fix codesnippet in docs for API Key (#699)
# Description

Updates code snippet for current SDK version

https://e2b-web-git-fix-docs-api-key.e2b-preview.dev/docs
2025-04-23 17:59:00 +02:00
Jakub Novák 93db2ed5ef Add API key page to docs (#698)
# Description

Adds a page on how to use API Keys and Access Tokens

Co-authored-by: never not exploring <50748440+ben-fornefeld@users.noreply.github.com>
2025-04-23 16:38:14 +02:00
github-actions[bot] 67f5230532 [skip ci] Release new versions 2025-04-18 22:43:01 +00:00
0div ba65bb5ad8 Fix publishing workflow (#696)
Fix package publishing workflow ([see
issue](https://github.com/e2b-dev/E2B/actions/runs/14542539046/job/40803167565))

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-04-19 01:38:49 +03:00
Tomas Valenta 74ff53c3bb Add option for proxying SDK requests to API and sandbox (#695)
PR that allows you to pass `proxy` (of the type ProxyTypes) when calling
methods in the SDK that send requests. Also, if you pass `proxy` when
creating a sandbox, all the sandbox requests (called on the
Sandbox/AsyncSandbox instance) will automatically use the same proxy.

The PR also contains a small bugfix—adding missing passing of limits and
passing these directly instead of through transport to be able to pass
the proxy parameter properly.

This change should also be compatible with the code interpreter—it uses
the client transport, which uses the passed proxy if there is any.
@e2b/python-sdk@1.3.5
2025-04-19 01:12:25 +03:00
Mish Ushakov 4f6563c27c Adde CLI beta list command docs (#691) 2025-04-17 19:39:28 +02:00
Mish Ushakov c8d338cf45 Updated docs on Sandbox.list v2 (#681)
- Added notices in "Connect to running sandbox", "Sandbox metadata"
docs.
- Updated "List sandboxes", "Sandbox persistence" docs.
- Renamed route "List running sandboxes"  > "List sandboxes".
2025-04-17 17:56:49 +02:00
never not exploring 34f8f2e244 Improve assetPrefix configuration for proxy / development setup (#683)
Because our docs nextjs app is being proxied by our dashboard nextjs
app, we need to ensure the docs nextjs app uses absolute urls to handle
it's assets. Because when it is proxied by another nextjs app, the proxy
tries to reference the docs nextjs apps assets relatively, which results
in assets not being found.

Before this pr, we set an assetPrefix for every node production
deployment, which caused issues on preview deployments, since these can
consist of multiple assigned domains and depending on which one was
opened, the asset prefixing failed.

These changes ensure that only the production deployment of the docs
application has an assetPrefix. Here we can be certain on which domain
it will live. I created a new environment variable `PRODUCTION_URL` here
to ensure 100% consistency with `e2b-dev/dashboard`s proxy domain
config, without relying on the vercel projects assigned domain setup.
2025-04-17 13:26:22 +02:00
0div 1b447a5761 Clone remote desktop & code-interpreter SDK refs into E2B sdk refs folder during publish (#682)
### Description 

This was initially performed in [the legacy
workflow](https://github.com/e2b-dev/E2B/blob/d27f81c5d3a85e2791258e388eb7ebd5f2e5eaa9/.github/workflows/generate_sdk_ref.yml#L101-L117)
but has since been removed, adding it back to have latest [desktop &
code-interpreter SDK references](https://e2b.dev/docs/sdk-reference) on
our docs

### Test
<img width="234" alt="Screenshot 2025-04-15 at 1 47 16 PM"
src="https://github.com/user-attachments/assets/b00347d9-794d-41f1-98db-c4704c59f50d"
/>


#### should become:

- [ ] desktop:
  - [ ] js-sdk `v1.7.01@latest`
  - [ ] python-sdk `v1.6.1@latest`
- [ ] code-interpreter
  - [ ] js-sdk `v1.1.1@latest`
  - [ ] python-sdk `v1.2.0@latest`
2025-04-16 18:49:02 +02:00
Tomas Valenta 6ac98dbe15 Fix dataclass declaration for WriteEntry (#679)
There was a type in dataclass declaration that caused the WriteEntry to
behave incorrectly.
2025-04-11 22:03:47 +02:00
github-actions[bot] 5a43e39579 [skip ci] Release new versions 2025-04-11 16:11:00 +00:00
Penny Templeton a1e2274eca Fix minor issue in python filesystem SDK (#678)
One should now be able to use sb.filesystem.write(WriteEntry[]) in a
typesafe way.

---------

Co-authored-by: Mish <10400064+mishushakov@users.noreply.github.com>
@e2b/python-sdk@1.3.4
2025-04-11 18:04:38 +02:00
github-actions[bot] 2822c7bec0 [skip ci] Release new versions 2025-04-10 16:09:43 +00:00
Mish Ushakov f4e0026583 Updates SandboxApiOpts type with added headers field (#677)
- Minor type fix
e2b@1.2.5
2025-04-10 18:04:25 +02:00
0div e0c1bc752d Make codegen robust and deterministic for js and python SDKs (#664)
# Description 

This PR allows to codegen without worrying about your environment and
dependencies for consistent outcomes in what code is generated from
openapi and envd protobuf spec. Will generate files for `js-sdk` and
`python-sdk`

- [x] create Docker image with all the pinned deps needed to codegen
- [x] create codegen script using this container with mapped volumes
- [x] adapt Makefiles to this new approach
- [x] adapt where we install the connect-python protobuf binary for this
to work

# Test

```sh
make codegen # this command is similar to `make generate` but w/o the hassle

Generating SDK code from openapi and envd spec
cd packages/js-sdk && pnpm generate

> e2b@1.2.1 generate /workspace/packages/js-sdk
> python ./../../spec/remove_extra_tags.py sandboxes templates && openapi-typescript ../../spec/openapi_generated.yml -x api_key --arr
ay-length --alphabetize --output src/api/schema.gen.ts

 openapi-typescript 7.6.1
🚀 ../../spec/openapi_generated.yml → src/api/schema.gen.ts [44.2ms]
cd packages/js-sdk && pnpm generate-envd-api

> e2b@1.2.1 generate-envd-api /workspace/packages/js-sdk
> openapi-typescript ../../spec/envd/envd.yaml -x api_key --array-length --alphabetize --output src/envd/schema.gen.ts

 openapi-typescript 7.6.1
🚀 ../../spec/envd/envd.yaml → src/envd/schema.gen.ts [22.7ms]

[...]

cd packages/python-sdk && make generate-api

All done!  🍰 
```

---------

Co-authored-by: Jiri Sveceny <jiri.sveceny@icloud.com>
2025-04-07 17:00:31 +02:00
Jakub Novák e9f39b07f1 Remove order check from SDK. (#675)
# Description

The test was moved to integration tests directly in infra repo
2025-04-07 07:00:57 -07:00
Jakub Novák 2aada562d1 Update esbuild to 0.25.0 (#673)
# Description

https://github.com/e2b-dev/E2B/security/dependabot/147
2025-04-07 15:54:56 +02:00
github-actions[bot] b02f93e7f4 [skip ci] Release new versions 2025-04-05 20:21:53 +00:00
Mish Ushakov e6aeb94ab8 (fix) re-release 1.2.3 version (#672) e2b@1.2.4 2025-04-05 21:15:00 +01:00
github-actions[bot] ac81f95529 [skip ci] Release new versions 2025-04-05 19:43:23 +00:00
Jakub Novák 74a6944140 Fix test for closed ports (#668)
# Description

The response from backend for port is actual integer
e2b@1.2.3
2025-04-05 20:38:38 +01:00
Mish Ushakov cf128195a5 (Workers) Patch connect-es fetch transport to always use redirect: follow (#671)
backports the changes from beta branch (#669)
2025-04-05 20:31:34 +01:00
Jiri Sveceny f686a7c2df Added security.txt under well-known (#666)
Added file under `/.well-known/security.txt` to match security standards
for security or abuse reports.

More details why this is well known address by search engines or
security researchers can be found here:
https://www.rfc-editor.org/rfc/rfc9116
2025-04-04 11:14:51 +02:00
dependabot[bot] 0543c33363 Bump the npm_and_yarn group across 2 directories with 1 update (#658)
Bumps the npm_and_yarn group with 1 update in the / directory:
[next](https://github.com/vercel/next.js).
Bumps the npm_and_yarn group with 1 update in the /apps/web directory:
[next](https://github.com/vercel/next.js).

Updates `next` from 14.2.25 to 14.2.26
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.26</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Match subrequest handling for edge and node (<a
href="https://redirect.github.com/vercel/next.js/issues/77476">#77476</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/10a042cdca294fd1c6852b320954bc6ccc6064e7"><code>10a042c</code></a>
v14.2.26</li>
<li><a
href="https://github.com/vercel/next.js/commit/8a511d6a22d38132c79b8f70ee29713d42225802"><code>8a511d6</code></a>
Match subrequest handling for edge and node (<a
href="https://redirect.github.com/vercel/next.js/issues/77476">#77476</a>)</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.25...v14.2.26">compare
view</a></li>
</ul>
</details>
<br />

Updates `next` from 14.2.25 to 14.2.26
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">next's
releases</a>.</em></p>
<blockquote>
<h2>v14.2.26</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Match subrequest handling for edge and node (<a
href="https://redirect.github.com/vercel/next.js/issues/77476">#77476</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vercel/next.js/commit/10a042cdca294fd1c6852b320954bc6ccc6064e7"><code>10a042c</code></a>
v14.2.26</li>
<li><a
href="https://github.com/vercel/next.js/commit/8a511d6a22d38132c79b8f70ee29713d42225802"><code>8a511d6</code></a>
Match subrequest handling for edge and node (<a
href="https://redirect.github.com/vercel/next.js/issues/77476">#77476</a>)</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/compare/v14.2.25...v14.2.26">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/e2b-dev/E2B/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: never not exploring <50748440+ben-fornefeld@users.noreply.github.com>
2025-04-04 10:18:54 +02:00
github-actions[bot] e8fadf947b [skip ci] Release new versions 2025-04-03 23:12:36 +00:00
Mish Ushakov 1bdf809e8b Make possible to pass custom headers in the SDKs (#656)
This feature allows passing custom headers in the Python and JS SDK. One
use-case for it currently is passing custom authorization (Supabase)
headers with the request.
@e2b/python-sdk@1.3.3 e2b@1.2.2
2025-04-04 00:08:12 +01:00
Jiri Sveceny 12f031ce6d docs: note delayed delivery of file system change events (#659) 2025-04-03 18:43:27 +02:00
never not exploring 2ffc63ec8e Forward user metadata is_fragments_user to hubspot (#663)
This pr forwards the is_fragments_user metadata field to our hubspot
integration in new_user edge function
2025-04-03 13:34:00 +02:00
never not exploring 9513b6c36e Ghost commit for new_user deploy trigger (#662) 2025-04-03 04:06:57 -07:00
Jakub Novák 7b30c657c3 Supabase Edge Function Workflow Fix (#661)
# Description

Clean up old function from the config
2025-04-03 04:03:49 -07:00
never not exploring 3f07b01a30 Add new_user hubspot contact creation (#660)
In order to populate our crm (hubspot) with new user sign-up data, we
need to send the data received by our edge function to the hubspot api.

The hubspot api call got tested via postman and works successfully.

The new environment variable is already added to our supabase production
projects edge function secrets.
2025-04-03 13:00:32 +02:00
Ben Fornefeld 9732573b6a add: new_user hubspot contact creation 2025-04-03 11:40:51 +02:00
r33drichards f9198474fa Add development shell to manage dependencies (#657) 2025-04-02 14:56:10 -07:00
github-actions[bot] 32664ea0fe [skip ci] Release new versions 2025-04-01 20:36:48 +00:00
0div 2db98557ba Show SDK ref dir only when it exists (#655)
# Description 
To avoid errors like https://github.com/e2b-dev/E2B/actions/runs/14200197836/job/39785152642
where we publish without any sdk ref changes.
2025-04-01 22:34:00 +02:00