@fastgpt-sdk/sandbox-adapter 0.0.14 → 0.0.15

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/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -650,7 +650,8 @@ class DevboxApi {
650
650
  headers.set("Content-Type", "application/json");
651
651
  }
652
652
  const res = await fetch(input, { ...init, headers });
653
- return await res.json();
653
+ const result = await res.json();
654
+ return result;
654
655
  }
655
656
  async create(name) {
656
657
  return this.request(this.url("/api/v1/devbox"), {
@@ -763,6 +764,8 @@ class SealosDevboxAdapter extends BaseSandboxAdapter {
763
764
  const res = await this.api.info(this._id);
764
765
  if (res.code !== 200)
765
766
  return null;
767
+ if (!res.data)
768
+ return Promise.reject(res.message);
766
769
  const data = res.data;
767
770
  this._status = { state: this.StatusAdapt(data), message: res.message };
768
771
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastgpt-sdk/sandbox-adapter",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Unified abstraction layer for cloud sandbox providers with adapter pattern and feature polyfilling",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",