Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-file upload and less flaky metrics test for 1.2.0 beta.1 release #626

Open
wants to merge 220 commits into
base: beta
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
220 commits
Select commit Hold shift + click to select a range
b2e80e1
Added multi-file write support
0div Oct 4, 2024
9e6bc17
address PR comments
0div Oct 4, 2024
966f0c7
[WIP] Cleanup
ValentaTomas Oct 5, 2024
eda88d0
address PR comments
0div Oct 7, 2024
a2d4ad7
boyscouting: fix some docstrings
0div Oct 7, 2024
a379a58
Add multi-file write support for python-sdk sync
0div Oct 7, 2024
608ef45
Use `@overload`
0div Oct 8, 2024
68ac038
merge beta
0div Oct 8, 2024
f010211
adapt multi file write tests for nested dirs
0div Oct 8, 2024
fbc4af4
allow passing empty array of files in python-sdk
0div Oct 8, 2024
2afb6d1
allow passing empty array of files in js-sdk
0div Oct 8, 2024
68e5efa
address PR comments
0div Oct 9, 2024
365af43
add extra tests to sandbox_sync write
0div Oct 9, 2024
7767d8f
updated js-sdk tests to check empty path behavior
0div Oct 9, 2024
f5cd1c0
add multifile upload to sanbox_async
0div Oct 9, 2024
834f84c
merge beta
0div Oct 10, 2024
2956a6e
better error messages in python-sdk
0div Oct 10, 2024
c277f9f
better error messages in js-sdk
0div Oct 10, 2024
86262f1
docstring for dataclass
0div Oct 10, 2024
97d0cc1
merge main
0div Dec 12, 2024
cf262ae
fix errors.ts comment
0div Dec 12, 2024
4ca2414
fixed typing syntax and watch tests
0div Dec 12, 2024
93dc1f9
update docs
0div Dec 12, 2024
741b329
add minor changeset
0div Dec 12, 2024
bbeeb04
upadte upload docs and improve read-write-docs
0div Dec 12, 2024
0e2a684
fix indentation in upload docs
0div Dec 13, 2024
b867fe4
Update apps/web/src/app/(docs)/docs/filesystem/read-write/page.mdx
0div Dec 13, 2024
e730810
Update apps/web/src/app/(docs)/docs/filesystem/read-write/page.mdx
0div Dec 13, 2024
d3b99fe
Update apps/web/src/app/(docs)/docs/filesystem/upload/page.mdx
0div Dec 13, 2024
424baec
Update apps/web/src/app/(docs)/docs/filesystem/upload/page.mdx
0div Dec 13, 2024
e73ad23
Update apps/web/src/app/(docs)/docs/filesystem/upload/page.mdx
0div Dec 13, 2024
d0fc09a
Update apps/web/src/app/(docs)/docs/filesystem/upload/page.mdx
0div Dec 13, 2024
1708cc0
Update apps/web/src/app/(docs)/docs/filesystem/upload/page.mdx
0div Dec 13, 2024
502c414
remove WriteData type in js-sdk
0div Dec 13, 2024
724fbc6
remove WriteData type in python-sdk
0div Dec 13, 2024
5b3f58b
Update e2b.toml
jakubno Jan 24, 2025
4520df8
Update e2b.toml
jakubno Jan 24, 2025
fd45f0e
Handle exception when iterating over process output
jakubno Jan 24, 2025
1829790
Merge branch 'main' into process-time-out-returns-incorrect-exception…
jakubno Jan 24, 2025
ae61d83
Add test
jakubno Jan 24, 2025
54c8315
add: skeletons + usage limits components
ben-fornefeld Jan 10, 2025
6d9a278
improve: billing limit components
ben-fornefeld Jan 10, 2025
93a6b9b
add: billing limits states + api layer
ben-fornefeld Jan 10, 2025
673272e
fix account selector billing url retrieval
ben-fornefeld Jan 17, 2025
e644a98
add billing api logic + improve billing alerts components
ben-fornefeld Jan 17, 2025
a742e8e
Update text for usage limits
mlejva Jan 18, 2025
eada5d4
Fix build error
mlejva Jan 19, 2025
1e45455
prevent form submission with empty values
ben-fornefeld Jan 20, 2025
379cc26
update fetch headers for billing alerts
ben-fornefeld Jan 24, 2025
062c6ca
add metrics docs page
0div Jan 24, 2025
c4a54fc
add metrics to routes
0div Jan 24, 2025
4450680
update docs based on feedback
0div Jan 24, 2025
295f4e2
fix code snippet and remove note
0div Jan 24, 2025
1337573
update teams retrieval for is_blocked & blocked_reason
ben-fornefeld Jan 24, 2025
830af85
add team blocked banner on page layout
ben-fornefeld Jan 24, 2025
04f223f
improve team blocked banner
ben-fornefeld Jan 24, 2025
fb0dcb7
Implement budget alerts & limit (#551)
ben-fornefeld Jan 24, 2025
3fcfd2b
Update wording for usage limits and alerts
mlejva Jan 25, 2025
525d053
Change button's text
mlejva Jan 25, 2025
8b5af4e
Update wording for usage limits and alerts (#553)
mlejva Jan 25, 2025
974d92e
update limitations section
0div Jan 25, 2025
61c7bfa
fix beta version typo and add private beta note
0div Jan 25, 2025
35c1837
use latest beta tag for npm installs
0div Jan 25, 2025
d3f0e37
Add sandbox metrics docs page (#552)
0div Jan 25, 2025
02b032a
fix thing
handlebauer Jan 25, 2025
43291b5
Fix typo in docs (#554)
mlejva Jan 26, 2025
5b3ef97
hide metrics in sidebar until it's shipped
mlejva Jan 27, 2025
90788ee
Hide metrics in sidebar (#555)
mlejva Jan 27, 2025
0524739
Add groq to docs
tizkovatereza Jan 27, 2025
aea3d3e
Add groq to docs (#557)
tizkovatereza Jan 27, 2025
90fb02c
uncomment metrics route
0div Jan 27, 2025
1e1d398
Show metrics in sidebar (#558)
0div Jan 27, 2025
25c4539
Add watch dir recursive option (missing python client regeneration)
dobrac Dec 2, 2024
d92a166
Update watch test file formatting
dobrac Dec 2, 2024
4adcfd8
Add python generated stubs
dobrac Dec 2, 2024
d35880c
Improve watchDir jsSDK default value
dobrac Dec 2, 2024
ca85407
Add recursive directory watching to the web documentation
dobrac Dec 2, 2024
225c156
Update documentation highlights
dobrac Dec 2, 2024
c8914c2
Improve recursive watch tests and folders naming
dobrac Dec 2, 2024
76b4ac0
Regenerated python stubs with version 5.28.3
dobrac Dec 2, 2024
6596eda
Test for recursive folder creation, add newline after code to docs
dobrac Dec 3, 2024
ea8f4ff
Run js tests cleanup using onTestFinished
dobrac Dec 3, 2024
f893f28
Add note to the recursive watch with rapid folder creation
dobrac Dec 19, 2024
29dc1a9
Add recursive watch envd version check
dobrac Dec 19, 2024
ec9288a
Add recursive watch envd version check python SDK, js SDK check
dobrac Dec 19, 2024
51e8f18
Cleanup tests only in debug
dobrac Dec 19, 2024
359d17d
Fix versions to match updated envd version
jakubno Jan 13, 2025
8c52e73
Lint
jakubno Jan 28, 2025
13f0c78
Add changeset
jakubno Jan 28, 2025
4fb4470
Add recursive directory watch (#488)
jakubno Jan 28, 2025
fe7ed15
Process time out returns incorrect exception in pythonsdk e2b 1476 (#…
jakubno Jan 28, 2025
dde83b7
[skip ci] Release new versions
github-actions[bot] Jan 28, 2025
e9480d5
Add X-Frame-Options header
jakubno Jan 29, 2025
b31dd7b
Fix type
jakubno Jan 29, 2025
e8e4cab
Fix X-Frame-Option to prevent clickjacking (#559)
jakubno Jan 29, 2025
9c6597b
Bump the pip group across 2 directories with 6 updates
dependabot[bot] Jan 29, 2025
892ae4f
Bump the npm_and_yarn group across 1 directory with 2 updates
dependabot[bot] Jan 29, 2025
7cd8781
Add page about start command
mlejva Jan 30, 2025
0e6610e
Remove legacy docs page
mlejva Jan 30, 2025
e3e9d38
Add page about start command (#566)
mlejva Jan 30, 2025
391f070
Fix socker closed build error
jakubno Jan 30, 2025
bf1e1b1
Add changeset
jakubno Jan 30, 2025
672622a
Fix Socket closed build error (#567)
jakubno Jan 30, 2025
d17bdaa
[skip ci] Release new versions
github-actions[bot] Jan 31, 2025
6728061
add assetPrefix to next config
ben-fornefeld Feb 2, 2025
8903a8b
limit asset prefixing to production
ben-fornefeld Feb 2, 2025
5e2a23f
Add assetPrefix to next config (#569)
jakubno Feb 2, 2025
6ebdb17
replace VERCEL_URL env variable with custom set NEXT_PUBLIC_DOMAIN in…
ben-fornefeld Feb 2, 2025
28748ee
update assetPrefix to new environment variable to not break vercel pr…
ben-fornefeld Feb 2, 2025
c47fdbd
Fix: assetPrefix refers to correct domains for production & preview e…
jakubno Feb 2, 2025
ffb6cef
redirect `/blog` to the new blog website
mlejva Feb 3, 2025
1fb2975
Redirect `/blog` to the new blog website (#572)
mlejva Feb 3, 2025
464db3f
Fix pnpm lock
jakubno Feb 4, 2025
5531185
Bump the npm_and_yarn group across 1 directory with 2 updates (#562)
jakubno Feb 4, 2025
7c38aa1
Bump the pip group across 2 directories with 6 updates (#561)
jakubno Feb 4, 2025
c68fa44
If in browser don't use process
jakubno Feb 5, 2025
5749120
Add changeset
jakubno Feb 5, 2025
0cc2b2f
Fix usage in browser (#574)
jakubno Feb 5, 2025
cff68d2
Fix check order
jakubno Feb 5, 2025
cd45aa4
[skip ci] Release new versions
github-actions[bot] Feb 5, 2025
c7b9fc2
Update vitest
jakubno Feb 5, 2025
8e3ead8
Update cross-spawn
jakubno Feb 5, 2025
0d09045
Update cross-spawn
jakubno Feb 5, 2025
66141ef
Update changeset to update cross-spawn
jakubno Feb 5, 2025
6e477ca
Update fast xml parser
jakubno Feb 5, 2025
67787e5
Bump packages
jakubno Feb 5, 2025
b91dbc1
Bump tsup
jakubno Feb 5, 2025
c84c76f
Bump braces
jakubno Feb 5, 2025
c9fa872
Update ip
jakubno Feb 5, 2025
3bbc0b9
Update packages
jakubno Feb 5, 2025
ee35b08
Bump postcss
jakubno Feb 5, 2025
cc8447b
Bump knip
jakubno Feb 5, 2025
6aee7bc
Bump knip
jakubno Feb 5, 2025
bbab1ff
Bump webpack
jakubno Feb 5, 2025
96a4557
Bump micromatch
jakubno Feb 5, 2025
7e88e33
Bump tar
jakubno Feb 5, 2025
71f6d36
Bump jose
jakubno Feb 5, 2025
3cffe51
Bump update notifier
jakubno Feb 5, 2025
5ccdc76
Bump es5-ext
jakubno Feb 5, 2025
eed7384
Drop support for Python 3.8
jakubno Feb 6, 2025
28fd11e
Drop support for Python 3.8 (#575)
jakubno Feb 6, 2025
e92aa08
add: gtm to apps/web
ben-fornefeld Feb 9, 2025
637f680
chore: remove chatlio-widget namespace declaration
ben-fornefeld Feb 9, 2025
db68947
E2B-1546: add google tag manager capibilites for /docs (#576)
ben-fornefeld Feb 9, 2025
c108afb
Update package manager to the latest 9.x version (9.15.5)
dobrac Feb 10, 2025
6d85cf5
Update package manager to the latest 9.x version (9.15.5) (#577)
jakubno Feb 11, 2025
26b2fe5
Fix browser test
jakubno Feb 11, 2025
429ec03
Load update notifier dynamically
jakubno Feb 11, 2025
3ef2046
update: middleware to rewrite /category
ben-fornefeld Feb 11, 2025
46aa4ec
fix incorrect code snippet
mlejva Feb 18, 2025
87b0110
Fix incorrect code snippets
mlejva Feb 18, 2025
f8d988e
Fix incorrect links
mlejva Feb 18, 2025
357be70
Fix code snippets
mlejva Feb 18, 2025
ff818fb
Fix incorrect code snippets and docs links (#583)
mlejva Feb 18, 2025
2a7efcd
feat: rewrite /blog/category/:path* to landing page categories
ben-fornefeld Feb 19, 2025
842f46c
improve: sitemap creation & category rewrite modifications
ben-fornefeld Feb 19, 2025
6a87672
test: fix sitemap runtime fs error by making sitemap cache on build time
ben-fornefeld Feb 19, 2025
b85d676
Merge branch 'main' into rewrite-category-in-middleware-e2b-1578
ben-fornefeld Feb 19, 2025
8aa8ef9
Rewrite /category in middleware (#579)
ben-fornefeld Feb 19, 2025
1653893
Update docs for persistence
mlejva Feb 21, 2025
e04c67d
Merge branch 'main' into update-persistence-docs
mlejva Feb 21, 2025
32e0b03
Update persistence docs (#585)
mlejva Feb 21, 2025
9ef3dcb
Explicitly mention docker commands when building template
mlejva Feb 21, 2025
d3945ac
Add changeset
mlejva Feb 21, 2025
fd6a80e
Merge branch 'main' into cli-better-messaging
mlejva Feb 21, 2025
cb6f762
Fix message
mlejva Feb 21, 2025
cd4880e
Explicitly mention Docker commands when building template (#586)
mlejva Feb 21, 2025
ec36840
update the update-notifier import to esm, remove it from the excluded…
dobrac Feb 21, 2025
aa7a2bf
add changeset
dobrac Feb 21, 2025
4bc7129
Fix CLI build issue (#578)
ValentaTomas Feb 21, 2025
f706f82
Bump package json version for the e2b/cli
dobrac Feb 21, 2025
6b71953
Bump package json version for the e2b/cli (#587)
ValentaTomas Feb 21, 2025
9f23f54
[skip ci] Release new versions
github-actions[bot] Feb 22, 2025
bc79f15
Fix broken link
mlejva Feb 22, 2025
2dc0580
Fix broken link in docs (#589)
mlejva Feb 22, 2025
4919993
Improve legacy banner visibility in /docs (#590)
ben-fornefeld Feb 22, 2025
fba2ce3
fix: filter shiki line highlight syntax when copying code blocks in docs
ben-fornefeld Feb 25, 2025
74de6eb
Filter Shiki HighlightLine syntax when copying code blocks in docs (#…
ben-fornefeld Feb 25, 2025
e419a61
Change twitter links to the new handle
jakubno Feb 26, 2025
e083bad
Change twitter links to the new handle (#595)
jakubno Feb 26, 2025
0619540
Display correct key name for api key (#594)
r33drichards Mar 1, 2025
ee90cd2
[skip ci] Release new versions
github-actions[bot] Mar 1, 2025
56ca5e0
Show resolvable url in error message (#596)
r33drichards Mar 4, 2025
ac87d9d
[skip ci] Release new versions
github-actions[bot] Mar 4, 2025
82fe7b3
Update CODEOWNERS (#601)
mlejva Mar 13, 2025
dad913e
pin typdoc and typedoc-markdown to non-breaking versions in js-sdk
0div Mar 13, 2025
cecb61d
Fix SDK reference generation in js-sdk (#602)
0div Mar 13, 2025
c04be45
update pnpm loockfile
0div Mar 13, 2025
81a8e8b
Update pnpm lockfile (#603)
0div Mar 13, 2025
2e637cb
Send releases notification to dedicated channel (#604)
jakubno Mar 14, 2025
e905d9b
Test sandbox closed port error (#597)
0div Mar 14, 2025
5c1a5a8
Update README.md (#606)
mlejva Mar 16, 2025
b357a40
Fix example code for the latest version of CrewAI
jamesmurdza Mar 18, 2025
cee8f00
Clean unused HTMLs (#610)
jakubno Mar 18, 2025
6a73f8d
fix: docs quick start issues
ben-fornefeld Mar 18, 2025
e5866ce
Fix docs quick start issues (#611)
ben-fornefeld Mar 18, 2025
71415ed
Fix flaky tests - Increase the timeout for pinging the server (#612)
jakubno Mar 18, 2025
e045df9
Fix comments in tests (#613)
jakubno Mar 18, 2025
43f3c12
Update apps/web/src/app/(docs)/docs/filesystem/read-write/page.mdx
0div Mar 18, 2025
a8e88de
fix merge conflict with main
0div Mar 18, 2025
ce8d130
Fix CrewAI example in the docs (#609)
jamesmurdza Mar 19, 2025
b3fe5e6
Add multi-file write support to the js and python sdks (#451)
0div Mar 19, 2025
ad73fab
Include build ID output for debugging purposes (#616)
r33drichards Mar 19, 2025
d26ff43
Fix release test for multi-file write support (#615)
0div Mar 19, 2025
82f1ba8
Add changeset (#618)
r33drichards Mar 19, 2025
60ece87
Run tests on prs to avoid broken builds (#619)
r33drichards Mar 19, 2025
dbcf014
doc: fix typo of file `apps/web/src/app/(docs)/docs/sandbox/internet-…
Mar 20, 2025
a45df0d
doc: fix type of file `apps/web/src/app/(docs)/docs/code-interpreting…
Mar 20, 2025
d56c19f
doc: fix typo (#620)
mlejva Mar 20, 2025
2904f3e
Fix failing write test (#621)
jakubno Mar 20, 2025
b402327
[skip ci] Release new versions
github-actions[bot] Mar 20, 2025
62eb819
add: docs redirects
ben-fornefeld Mar 21, 2025
51519ee
Merge branch 'main' into fix-docs-quickstart-e2b-1868
ben-fornefeld Mar 21, 2025
d939c04
Add temporary docs redirects (#623)
ben-fornefeld Mar 21, 2025
5c4d075
Add filtering option for listing sandboxes (#532)
jakubno Mar 21, 2025
b6b0ac6
[skip ci] Release new versions
github-actions[bot] Mar 21, 2025
e5a3f24
Fix code interpreting documentation snippets (#624)
ben-fornefeld Mar 21, 2025
dc0d161
make metrics test less flaky
0div Mar 21, 2025
d2f9415
Merge branch 'main' of https://github.com/e2b-dev/E2B into add-multif…
0div Mar 22, 2025
78180e6
fix typos and update lock and gens
0div Mar 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better error messages in js-sdk
0div committed Oct 10, 2024
commit c277f9f8a6727e07c3cc3bf0cbe81c74030fb91f
10 changes: 9 additions & 1 deletion packages/js-sdk/src/sandbox/filesystem/index.ts
Original file line number Diff line number Diff line change
@@ -147,8 +147,14 @@ export class Filesystem {
dataOrOpts?: WriteData | FilesystemRequestOpts,
opts?: FilesystemRequestOpts
): Promise<EntryInfo | EntryInfo[]> {
if (typeof pathOrFiles !== 'string' && !Array.isArray(pathOrFiles)) {
throw new Error('Path or files are required')
}

if (typeof pathOrFiles === 'string' && Array.isArray(dataOrOpts)) {
throw new Error('Cannot specify path with array of files')
throw new Error(
'Cannot specify both path and array of files. You have to specify either path and data for a single file or an array for multiple files.'
)
}

const { path, writeOpts, writeFiles } =
@@ -160,6 +166,8 @@ export class Filesystem {
}
: { path: undefined, writeOpts: dataOrOpts as FilesystemRequestOpts, writeFiles: pathOrFiles as WriteEntry[] }

if (writeFiles.length === 0) return [] as EntryInfo[]

const blobs = await Promise.all(writeFiles.map((f) => new Response(f.data).blob()))

const res = await this.envdApi.api.POST('/files', {
9 changes: 6 additions & 3 deletions packages/js-sdk/tests/sandbox/files/write.test.ts
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ sandboxTest('write file', async ({ sandbox }) => {
})
.catch((err) => {
assert.instanceOf(err, Error)
assert.include(err.message, 'Cannot read properties of undefined')
assert.include(err.message, 'Path or files are required')
})

const info = await sandbox.files.write(filename, content)
@@ -47,7 +47,7 @@ sandboxTest('write multiple files', async ({ sandbox }) => {
})
.catch((err) => {
assert.instanceOf(err, Error)
assert.include(err.message, 'Cannot read properties of undefined')
assert.include(err.message, 'Path or files are required')
})

// Attempt to write with path and file array
@@ -59,7 +59,10 @@ sandboxTest('write multiple files', async ({ sandbox }) => {
})
.catch((err) => {
assert.instanceOf(err, Error)
assert.include(err.message, 'Cannot specify path with array of files')
assert.include(
err.message,
'Cannot specify both path and array of files. You have to specify either path and data for a single file or an array for multiple files.'
)
})

// Attempt to write with one file in array