@omnirun/sdk 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/sandbox.js +8 -1
  2. package/package.json +1 -1
package/dist/sandbox.js CHANGED
@@ -178,7 +178,14 @@ export class Sandbox {
178
178
  }
179
179
  }
180
180
  async getInfo() {
181
- return this.client.get(`/sandboxes/${this.sandboxId}`);
181
+ const raw = await this.client.get(`/sandboxes/${this.sandboxId}`);
182
+ const base = parseSandboxInfo(raw);
183
+ return {
184
+ ...base,
185
+ state: raw.state ?? "",
186
+ cpuCount: raw.cpuCount ?? 0,
187
+ memoryMB: raw.memoryMB ?? 0,
188
+ };
182
189
  }
183
190
  /** Execute code via the /code endpoint. */
184
191
  async runCode(code, language = "python") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnirun/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript SDK for omnirun sandboxes (e2b-compatible)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",