@e2b/code-interpreter
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -112,2 +112,18 @@ import { Sandbox, SandboxOpts, ProcessMessage } from 'e2b'; | ||
formats(): string[]; | ||
/** | ||
* Returns the serializable representation of the result. | ||
*/ | ||
toJSON(): { | ||
extra?: any; | ||
text: string | undefined; | ||
html: string | undefined; | ||
markdown: string | undefined; | ||
svg: string | undefined; | ||
png: string | undefined; | ||
jpeg: string | undefined; | ||
pdf: string | undefined; | ||
latex: string | undefined; | ||
json: string | undefined; | ||
javascript: string | undefined; | ||
}; | ||
} | ||
@@ -160,2 +176,10 @@ /** | ||
get text(): string | undefined; | ||
/** | ||
* Returns the serializable representation of the execution result. | ||
*/ | ||
toJSON(): { | ||
results: Result[]; | ||
logs: Logs; | ||
error: ExecutionError | undefined; | ||
}; | ||
} | ||
@@ -162,0 +186,0 @@ |
@@ -195,2 +195,19 @@ "use strict"; | ||
} | ||
/** | ||
* Returns the serializable representation of the result. | ||
*/ | ||
toJSON() { | ||
return __spreadValues({ | ||
text: this.text, | ||
html: this.html, | ||
markdown: this.markdown, | ||
svg: this.svg, | ||
png: this.png, | ||
jpeg: this.jpeg, | ||
pdf: this.pdf, | ||
latex: this.latex, | ||
json: this.json, | ||
javascript: this.javascript | ||
}, Object.keys(this.extra).length > 0 ? { extra: this.extra } : {}); | ||
} | ||
}; | ||
@@ -213,2 +230,12 @@ var Execution = class { | ||
} | ||
/** | ||
* Returns the serializable representation of the execution result. | ||
*/ | ||
toJSON() { | ||
return { | ||
results: this.results, | ||
logs: this.logs, | ||
error: this.error | ||
}; | ||
} | ||
}; | ||
@@ -215,0 +242,0 @@ var CellExecution = class { |
{ | ||
"name": "@e2b/code-interpreter", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "E2B Code Interpreter - Stateful code execution", | ||
@@ -5,0 +5,0 @@ "homepage": "https://e2b.dev", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
133111
1594