Commit Graph

4475 Commits

Author SHA1 Message Date
Ben Fornefeld 592543937a Refactor: prebuild sitemap generation instead of statically cached dynamic sitemap (#760)
Since we do not use dynamic data inside the sitemap and we base the
sitemap generation on page files, we do want to avoid a re-build of the
sitemap in request-time, since this environment differs significantly
from a build-time environment. Hence we remove the dynamic sitemap
generation and move sitemap generation logic inside our already present
`prebuild.js` script
2025-06-06 10:51:06 +02:00
Ben Fornefeld 1bdda6099c Remove: api-reference routes and set up SEO redirect (#763)
Since we do not maintain the content behind `/api-reference` routes,
this pr removes the docs pages and setup permanent redirects for SEO
crawlers to find similar content
2025-06-06 08:42:40 +00:00
github-actions[bot] 27e292eedc [skip ci] Release new versions 2025-06-05 15:39:44 +00:00
Jakub Novák ca905b0639 Fix CLI regression (#762)
# Description 

Introduced in
[here](https://github.com/e2b-dev/E2B/pull/747/files#diff-69710e23d3c0765f64152a2be96bd62daf49732e11d1e46b607686ec0cf15e75)
@e2b/cli@1.4.3
2025-06-05 17:36:41 +02:00
github-actions[bot] 6c0927e358 [skip ci] Release new versions 2025-06-05 14:15:25 +00:00
Mish Ushakov fc182d63ef Added license sources to SDKs (#761)
- Added licenses source text to the SDKs, CLI
@e2b/cli@1.4.2 @e2b/python-sdk@1.5.1 e2b@1.5.2
2025-06-05 07:10:07 -07:00
Mish Ushakov b21f86c543 Added lint workflow for JS, Python SDKs (#759)
- Linted all existing files
- Added GitHub workflow to check everything is linted correctly
2025-06-05 14:52:48 +02:00
Ben Fornefeld 31fce90f6b Fix: path validation for metadata tags resolution (#757)
This pr fixes validating pathnames for SEO metadata tag generation, by
checking against already built time cached sitemap instead of doing
request time glob resolution. path resolutions in vercels request-time
are hard to optimize for & test, since the environment differs quite a
bit from what could be tested locally + this should be faster since the
fetch & sitemap are cached for the build.
2025-06-04 14:17:23 +02:00
Ben Fornefeld 1c063f7cc6 Add: server side metadata generation in root layout (#755)
- adds `generateMetadata` in root layout to generate canonical and
robots meta tags server side
- listens on a custom header which is set by our proxy before rewriting
`/docs` routes, to decide whether the document should have no-index
metadata or index metadata
- adds a middleware which appends a custom header to retrieve the
current pathname for server side canonical tag generation
2025-06-03 17:31:26 +02:00
github-actions[bot] f1afba0d74 [skip ci] Release new versions 2025-06-03 10:13:57 +00:00
Ben Fornefeld 8c43806f81 Fix: TypeScript union type resolution for Commands.run() method (#753)
## Fix TypeScript union type resolution for Commands.run() method

### What's Changed
Improved TypeScript type safety for the `Commands.run()` method by
adding proper function overloads to handle the union case when the
`background` parameter type is not known at compile time.

### Key Improvements

**Better Type Safety**
- Added a third function overload to correctly handle the `background?:
boolean` union case
- TypeScript now correctly infers return types:
  - `background: true` → returns `CommandHandle`
  - `background: false | undefined` → returns `CommandResult`
- `background: boolean` (unknown at compile time) → returns
`CommandHandle | CommandResult`

**Enhanced Developer Experience**
- Added comprehensive JSDoc overloads that clearly document each usage
pattern
- IntelliSense now provides accurate type hints and autocompletion
- Eliminates ambiguous union types when the `background` value is known
at compile time

**Prevents Runtime Errors**
- When `background` is a literal value, developers get precise types and
can't accidentally call wrong methods
- When `background` is a runtime boolean, TypeScript correctly shows the
union type requiring proper type narrowing

### Why This Matters for SDK Users

Before this change, developers had to ignore ts warning & manually cast
union types when using `commands.run()`:
```typescript
// Before: typescript was complaining, because it expected `true` or `false` as literals. 
// Required manual casting:

// @ts-ignore
const result = await sbx.commands.run('ls', { background: isBackground }) as CommandHandle | CommandResult
```

After this change, TypeScript automatically infers the correct type:
```typescript
// After: TypeScript knows this is CommandHandle
const handle = await sbx.commands.run('ls', { background: true })
await handle.wait() //  TypeScript knows .wait() is available

// TypeScript knows this is CommandResult  
const result = await sbx.commands.run('ls')
console.log(result.stdout) //  TypeScript knows .stdout is available

// When background value is unknown at compile time, returns union type
const isBackground: boolean = Math.random() > 0.5
const result = await commands.run('ls', { background: isBackground })
// result is CommandHandle | CommandResult - requires type narrowing or casting
```
e2b@1.5.1
2025-06-03 10:09:31 +00:00
Ben Fornefeld 1b9fd7a288 Chore: pass pathname as prop into navigation group to avoid layout shift on initial render (#754)
This pr improves the initial navigation sub groups expanded state, by
passing in the pathname as a prop instead of hooking it in and
determining the state in an effect. This avoid layout shifts when doing
initial page renders, while inside a navigation subgroup item
2025-06-02 17:25:41 +02:00
Jakub Novák 2ab29f8fd0 [Dependencies] Update Vite (#751)
# Description

Fixes:
https://github.com/e2b-dev/E2B/security/dependabot/162
https://github.com/e2b-dev/E2B/security/dependabot/164
2025-06-02 02:49:47 -07:00
Mish Ushakov d35f82a9e9 Updated docs on JS/TS kernel (#748)
- Added TypeScript to the JavaScript doc
- Updated the example showing top-level await, esm-style module imports
and promise resolution

---------

Co-authored-by: Vasek Mlejnsky <vasek@e2b.dev>
2025-05-28 20:11:58 +02:00
Jakub Dobry 4ffb211155 Fix CLI compilation (#747)
Fix CLI compilation. Fixes nullable res.data & non-existent /teams
endpoint in the OpenAPI generated client.
2025-05-28 05:42:23 -07:00
Mish Ushakov 1af267a324 Updated SDK beta versions in docs (#732)
- updated beta versions of code interpreter, core and desktop SDKs in
the install guide
2025-05-27 02:57:29 -07:00
Jakub Dobry 78fae7712b Fix browser tests domain (#744)
Fix browser tests domain when used not against production
2025-05-26 06:20:52 -07:00
Mish Ushakov 9d96b066b3 Connecting bucket > connecting storage bucket (#740) 2025-05-26 10:55:57 +02:00
Jakub Dobry 6abed99e81 Update template start command limits in docs (#741)
Network is now available when running a start command. Remove the
network limitation from the documentation.
2025-05-23 05:15:58 -07:00
Ben Fornefeld feeef09e89 Remove: legacy docs from search (#742)
This pr removes the legacy docs from the search indexing script, which
will also remove them from the actual search in runtime. Also it adds
logging to increase build observability.
2025-05-23 05:14:08 -07:00
Mish Ushakov bf7e862a07 Added skip if debug for some tests (#737) 2025-05-20 03:15:31 -07:00
dependabot[bot] 6842e9a33a Bump setuptools from 75.3.0 to 78.1.1 in /packages/python-sdk in the pip group across 1 directory (#739)
Bumps the pip group with 1 update in the /packages/python-sdk directory:
[setuptools](https://github.com/pypa/setuptools).

Updates `setuptools` from 75.3.0 to 78.1.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pypa/setuptools/blob/main/NEWS.rst">setuptools's
changelog</a>.</em></p>
<blockquote>
<h1>v78.1.1</h1>
<h2>Bugfixes</h2>
<ul>
<li>More fully sanitized the filename in PackageIndex._download. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4946">#4946</a>)</li>
</ul>
<h1>v78.1.0</h1>
<h2>Features</h2>
<ul>
<li>Restore access to _get_vc_env with a warning. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4874">#4874</a>)</li>
</ul>
<h1>v78.0.2</h1>
<h2>Bugfixes</h2>
<ul>
<li>Postponed removals of deprecated dash-separated and uppercase fields
in <code>setup.cfg</code>.
All packages with deprecated configurations are advised to move before
2026. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4911">#4911</a>)</li>
</ul>
<h1>v78.0.1</h1>
<h2>Misc</h2>
<ul>
<li><a
href="https://redirect.github.com/pypa/setuptools/issues/4909">#4909</a></li>
</ul>
<h1>v78.0.0</h1>
<h2>Bugfixes</h2>
<ul>
<li>Reverted distutils changes that broke the monkey patching of command
classes. (<a
href="https://redirect.github.com/pypa/setuptools/issues/4902">#4902</a>)</li>
</ul>
<h2>Deprecations and Removals</h2>
<ul>
<li>Setuptools no longer accepts options containing uppercase or dash
characters in <code>setup.cfg</code>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pypa/setuptools/commit/8e4868a036b7fae3208d16cb4e5fe6d63c3752df"><code>8e4868a</code></a>
Bump version: 78.1.0 → 78.1.1</li>
<li><a
href="https://github.com/pypa/setuptools/commit/100e9a61ad24d5a147ada57357425a8d40626d09"><code>100e9a6</code></a>
Merge pull request <a
href="https://redirect.github.com/pypa/setuptools/issues/4951">#4951</a></li>
<li><a
href="https://github.com/pypa/setuptools/commit/8faf1d7e0ca309983252e4f21837b73ee12e960f"><code>8faf1d7</code></a>
Add news fragment.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/2ca4a9fe4758fcd39d771d3d3a5b4840aacebdf7"><code>2ca4a9f</code></a>
Rely on re.sub to perform the decision in one expression.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/e409e8002932f2b86aae7b1abc8f8c2ebf96df2c"><code>e409e80</code></a>
Extract _sanitize method for sanitizing the filename.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/250a6d17978f9f6ac3ac887091f2d32886fbbb0b"><code>250a6d1</code></a>
Add a check to ensure the name resolves relative to the tmpdir.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/d8390feaa99091d1ba9626bec0e4ba7072fc507a"><code>d8390fe</code></a>
Extract _resolve_download_filename with test.</li>
<li><a
href="https://github.com/pypa/setuptools/commit/4e1e89392de5cb405e7844cdc8b20fc2755dbaba"><code>4e1e893</code></a>
Merge <a
href="https://github.com/jaraco/skeleton">https://github.com/jaraco/skeleton</a></li>
<li><a
href="https://github.com/pypa/setuptools/commit/3a3144f0d2887fa37c06550f42a101e9eebd953a"><code>3a3144f</code></a>
Fix typo: <code>pyproject.license</code> -&gt;
<code>project.license</code> (<a
href="https://redirect.github.com/pypa/setuptools/issues/4931">#4931</a>)</li>
<li><a
href="https://github.com/pypa/setuptools/commit/d751068fd2627d6d8f1729e39cbcd8119049998f"><code>d751068</code></a>
Fix typo: pyproject.license -&gt; project.license</li>
<li>Additional commits viewable in <a
href="https://github.com/pypa/setuptools/compare/v75.3.0...v78.1.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=setuptools&package-manager=pip&previous-version=75.3.0&new-version=78.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
2025-05-20 03:14:13 -07:00
github-actions[bot] 41ef82cbd2 [skip ci] Release new versions 2025-05-15 17:22:06 +00:00
Mish Ushakov 698959dddb Added --no-cache option for building templates without cache (#735)
- Adds `--no-cache` parameter to CLI `template build` command for
building templates without cache.
@e2b/cli@1.4.1
2025-05-15 19:19:04 +02:00
Ben Fornefeld 10db4e95e6 CLI: Improve auth login typing + browser sign in response usage (#733)
This pr improves the auth login code, to be more declarative and
realistic to the actual response that is sent by the dashboard sign in
flow.
2025-05-15 19:18:24 +02:00
github-actions[bot] 231e19694d [skip ci] Release new versions 2025-05-15 16:46:57 +00:00
Ben Fornefeld a1c2466841 Fix authErrorBox switch breaking (#734)
To show the correct error message in our cli, we need to break the
switch cases. Currently always the last case will be applied, no matter
the input.
@e2b/cli@1.4.0
2025-05-15 18:44:00 +02:00
Jakub Novák 90ffca91ff Remove sandbox streams (#731)
# Description

This route isn't used anymore
2025-05-15 05:54:12 -07:00
github-actions[bot] 286e70d689 [skip ci] Release new versions 2025-05-14 15:19:57 +00:00
Jiri Sveceny 2def1305f3 Flag for securing envd access with auth token (#688)
Waiting until secure flag will be available in production cluster.

---------

Co-authored-by: Jakub Novák <jakub@e2b.dev>
@e2b/python-sdk@1.5.0 e2b@1.5.0
2025-05-14 15:15:18 +00:00
Vasek Mlejnsky af0773b74d Add hugging face to the quickstart guide (#726)
Adds an example how to use E2B with Hugging Face's serverless inference
API to the quickstart guide.
2025-05-14 01:26:52 +02:00
Mish Ushakov fd0a097ca9 Added homebrew installation instructions to the docs (#721) 2025-05-13 11:40:12 +00:00
Jakub Novák 3b87ed9087 Update dependencies (#720)
# Description

Fixes: 
https://github.com/e2b-dev/E2B/security/dependabot/149
https://github.com/e2b-dev/E2B/security/dependabot/150
2025-05-12 20:35:21 +00:00
Jakub Novák 106d0a7715 Remove closed port tests (#722)
# Description

They will be moved to infra, they are integration tests
2025-05-12 13:32:30 -07:00
Tomas Valenta 209e3407da Fix sandbox not found test (#715)
- Fix error code in json
- Modify the error message to match the new returned error
2025-05-10 16:42:54 +00:00
0div 1d17b9d484 Fix and update integration test template (#712)
These changes were made while testing
https://github.com/e2b-dev/infra/pull/603
- fix and install [stress-ng](https://github.com/ColinIanKing/stress-ng)
in integration test template
- fix integration test e2b.toml
2025-05-07 10:12:36 -07:00
Tomas Valenta 88266d6ae6 Unify passing of template used in tests and log background commands output (#704)
- Show errors from background commands
- Unify passing of template used in tests
2025-05-06 00:55:03 -07:00
Jakub Novák 05721758c6 Revert "Update metrics docs beta note to be public " (#718)
Reverts e2b-dev/E2B#717

Metrics aren't public yet
2025-05-06 00:45:32 -07:00
0div 01174c8954 Update metrics docs beta note to be public (#717)
The metrics command is not in private beta as it does not require a
special cluster.
2025-05-06 02:24:34 +02:00
github-actions[bot] 41f42a1490 [skip ci] Release new versions 2025-05-05 16:34:23 +00:00
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