@pageops/sdk 0.1.33 → 0.1.34

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.
@@ -57,7 +57,7 @@ class K {
57
57
  streamQuestion(e, t, s, r) {
58
58
  return fetch(`${this.base()}/question/stream`, {
59
59
  method: "POST",
60
- credentials: "include",
60
+ credentials: "omit",
61
61
  headers: { "content-type": "application/json", ...this.ownerHeaders() },
62
62
  body: JSON.stringify({ app_id: this.options.appId, thread_id: e, question: t, user_role: s }),
63
63
  signal: r
@@ -65,7 +65,7 @@ class K {
65
65
  }
66
66
  async request(e, t) {
67
67
  var c, p;
68
- const s = (t == null ? void 0 : t.body) instanceof FormData ? t.headers : { "content-type": "application/json", ...(c = t == null ? void 0 : t.headers) != null ? c : {} }, r = await fetch(`${this.base()}${e}`, { ...t, credentials: "include", headers: s });
68
+ const s = (t == null ? void 0 : t.body) instanceof FormData ? t.headers : { "content-type": "application/json", ...(c = t == null ? void 0 : t.headers) != null ? c : {} }, r = await fetch(`${this.base()}${e}`, { ...t, credentials: "omit", headers: s });
69
69
  if (r.status === 204) return;
70
70
  const n = await r.json().catch(() => null);
71
71
  if (!r.ok) throw new Error((p = n == null ? void 0 : n.message) != null ? p : r.status === 413 ? "源码包超过网关上传大小限制,请压缩代码包或联系管理员调整上传限制。" : "PageOps 请求失败");
@@ -57,7 +57,7 @@ class K {
57
57
  streamQuestion(e, t, s, r) {
58
58
  return fetch(`${this.base()}/question/stream`, {
59
59
  method: "POST",
60
- credentials: "include",
60
+ credentials: "omit",
61
61
  headers: { "content-type": "application/json", ...this.ownerHeaders() },
62
62
  body: JSON.stringify({ app_id: this.options.appId, thread_id: e, question: t, user_role: s }),
63
63
  signal: r
@@ -65,7 +65,7 @@ class K {
65
65
  }
66
66
  async request(e, t) {
67
67
  var c, p;
68
- const s = (t == null ? void 0 : t.body) instanceof FormData ? t.headers : { "content-type": "application/json", ...(c = t == null ? void 0 : t.headers) != null ? c : {} }, r = await fetch(`${this.base()}${e}`, { ...t, credentials: "include", headers: s });
68
+ const s = (t == null ? void 0 : t.body) instanceof FormData ? t.headers : { "content-type": "application/json", ...(c = t == null ? void 0 : t.headers) != null ? c : {} }, r = await fetch(`${this.base()}${e}`, { ...t, credentials: "omit", headers: s });
69
69
  if (r.status === 204) return;
70
70
  const n = await r.json().catch(() => null);
71
71
  if (!r.ok) throw new Error((p = n == null ? void 0 : n.message) != null ? p : r.status === 413 ? "源码包超过网关上传大小限制,请压缩代码包或联系管理员调整上传限制。" : "PageOps 请求失败");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageops/sdk",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "PageOps embeddable frontend SDK",
5
5
  "type": "module",
6
6
  "main": "dist/pageops-sdk.umd.cjs",