@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.
- package/dist/index.js +4 -1
- 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
|
-
|
|
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