Commit Graph

18 Commits

Author SHA1 Message Date
Jakub Novák 820bbdf88c Simplify codegen generate (#951)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Simplifies the `Makefile` `codegen` target to explicitly build
`codegen-env` and run generation, removing the dynamic image variable
logic.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4dc584dc94870657c82902c0911d10d013fa5ab6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-14 05:34:43 -07:00
Jakub Novák d117ba09e8 SDK v2 - Add beta pause and update Sandbox list (#854)
Introduce beta submodule with beta features - pause and resume
Update Sandbox list to also return paused sandboxes

---------

Co-authored-by: Tomas Valenta <valenta.and.thomas@gmail.com>
2025-08-19 00:37:07 -07:00
Jakub Novák 706ebd9af8 Fix generating files with docker (#829)
# Description

Fixes an issue in generating files in Docker. There has been an
incompatibility of `buf` (version `29.5`) and `protoc-gen-es` (version
`2.2.2`).

I updated `protoc-gen-es@` to `2.6.2`

Also refactored the code a little so it's easier to read
Added a CI pipeline job to check all files are properly generated
2025-07-28 13:47:26 +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
Tomas Valenta 6152287783 Move command to package; Remove phony 2024-11-28 10:47:30 -08:00
Tomas Valenta d2522c46e6 Add command for building dependencies for generating python envd client 2024-11-25 19:12:45 -08:00
Tomas Valenta 35083d2b0b Add vale linter 2024-10-15 11:52:54 -07:00
Jakub Novak 23ea4adfb1 Rename rpc methods for watcher 2024-10-14 19:51:05 -07:00
Jakub Novak c5aa13ea86 Fix command for generating from rpc spec 2024-10-14 11:29:20 -07:00
Tomas Valenta b1c3e01c96 Split buf generation 2024-08-20 14:29:57 -07:00
Jakub Novak 2357fa3da7 Add possibility to add env vars on sandbox create 2024-08-14 11:08:25 +02:00
Tomas Valenta 229c13524a Update scripts; Fix dir watch; Improve naming 2024-06-13 15:08:54 +02:00
Tomas Valenta 6bc7d7c9db Update generate script 2024-06-09 00:17:49 +02:00
Tomas Valenta ef19d8f822 Regenrate RPC; Fix namespacing 2024-06-07 21:35:34 +02:00
Tomas Valenta 5bfcc9a20e Imrpove connection config; [WIP] Rework Python SDK 2024-06-01 21:07:13 +02:00
Tomas Valenta 068ff5613f Regenerate APIs 2024-05-31 06:40:42 +02:00
Tomas Valenta 3b4c915a48 Generate clients 2024-05-17 02:05:12 -07:00
Jakub Novak 365ef328a5 Update api spec script 2023-09-15 14:10:27 +02:00