E2B
E2B copied to clipboard
Improve language runtime detection for SDK
Currently, we're a bit naive when detecting a language runtime. We only detect if it's a browser or Node.
The platform
library we're using isn't able to detect well other runtimes besides Node
Relevant code: https://github.com/e2b-dev/E2B/blob/bd3b5b9f9b6ce847ebfeb8bf8b60a3268be17c84/packages/js-sdk/src/api/metadata.ts#L10 https://github.com/e2b-dev/E2B/blob/bd3b5b9f9b6ce847ebfeb8bf8b60a3268be17c84/packages/js-sdk/src/api/metadata.ts#L13
Describe the solution you'd like We should be able to detect at least Node, Deno, and Bun.