freestyle-sandboxes 0.0.1-3 → 0.0.1-4

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.
package/dist/ai/index.cjs CHANGED
@@ -30,7 +30,8 @@ const executeTool = (config) => {
30
30
  }),
31
31
  execute: async ({ script }) => {
32
32
  try {
33
- return api.executeScript(script, config);
33
+ const res = await api.executeScript(script, config);
34
+ return res;
34
35
  } catch (e) {
35
36
  return `Error executing script:
36
37
 
package/dist/ai/index.mjs CHANGED
@@ -28,7 +28,8 @@ const executeTool = (config) => {
28
28
  }),
29
29
  execute: async ({ script }) => {
30
30
  try {
31
- return api.executeScript(script, config);
31
+ const res = await api.executeScript(script, config);
32
+ return res;
32
33
  } catch (e) {
33
34
  return `Error executing script:
34
35
 
package/dist/index.cjs CHANGED
@@ -58,7 +58,7 @@ class FreestyleSandboxes {
58
58
  if (response.data) {
59
59
  return response.data;
60
60
  } else {
61
- throw new Error("Failed to execute script: " + response.error);
61
+ throw new Error("Failed to execute script: " + JSON.stringify(response));
62
62
  }
63
63
  }
64
64
  /**
package/dist/index.mjs CHANGED
@@ -56,7 +56,7 @@ class FreestyleSandboxes {
56
56
  if (response.data) {
57
57
  return response.data;
58
58
  } else {
59
- throw new Error("Failed to execute script: " + response.error);
59
+ throw new Error("Failed to execute script: " + JSON.stringify(response));
60
60
  }
61
61
  }
62
62
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freestyle-sandboxes",
3
- "version": "0.0.1-3",
3
+ "version": "0.0.1-4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
package/src/ai/index.ts CHANGED
@@ -42,7 +42,8 @@ export const executeTool = (
42
42
  }),
43
43
  execute: async ({ script }) => {
44
44
  try {
45
- return api.executeScript(script, config);
45
+ const res = await api.executeScript(script, config);
46
+ return res;
46
47
  } catch (e) {
47
48
  return `Error executing script:\n\n${script}\n\n${JSON.stringify(e)}`;
48
49
  }
package/src/index.ts CHANGED
@@ -38,7 +38,7 @@ export class FreestyleSandboxes {
38
38
  if (response.data) {
39
39
  return response.data;
40
40
  } else {
41
- throw new Error("Failed to execute script: " + response.error);
41
+ throw new Error("Failed to execute script: " + JSON.stringify(response));
42
42
  }
43
43
  }
44
44