@pactor-app/runtime 1.18.0 → 1.20.0

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.cjs CHANGED
@@ -82,7 +82,14 @@ function createFetchHttpAdapter() {
82
82
  headers["content-type"] ?? (headers["content-type"] = "application/json");
83
83
  body = JSON.stringify(config.body);
84
84
  }
85
- const response = await fetch(url, { method, headers, body });
85
+ const response = await fetch(url, {
86
+ method,
87
+ headers,
88
+ body,
89
+ // 跨源 cookie 会话(服务端开通 CORS + Allow-Credentials 时生效;
90
+ // 同源行为不变)
91
+ credentials: "include"
92
+ });
86
93
  if (!response.ok) {
87
94
  throw new Error(
88
95
  `[@pactor-app/runtime] http request failed: ${response.status} ${response.statusText} (${config.url})`
package/dist/index.js CHANGED
@@ -34,7 +34,14 @@ function createFetchHttpAdapter() {
34
34
  headers["content-type"] ?? (headers["content-type"] = "application/json");
35
35
  body = JSON.stringify(config.body);
36
36
  }
37
- const response = await fetch(url, { method, headers, body });
37
+ const response = await fetch(url, {
38
+ method,
39
+ headers,
40
+ body,
41
+ // 跨源 cookie 会话(服务端开通 CORS + Allow-Credentials 时生效;
42
+ // 同源行为不变)
43
+ credentials: "include"
44
+ });
38
45
  if (!response.ok) {
39
46
  throw new Error(
40
47
  `[@pactor-app/runtime] http request failed: ${response.status} ${response.statusText} (${config.url})`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pactor-app/runtime",
3
- "version": "1.18.0",
3
+ "version": "1.20.0",
4
4
  "description": "Pactor runtime: RuntimeContext, StateStore, DataSource runtime, action engine, React renderer and page runtime",
5
5
  "keywords": [
6
6
  "pactor",
@@ -45,9 +45,9 @@
45
45
  "access": "public"
46
46
  },
47
47
  "dependencies": {
48
- "@pactor-app/expression": "1.18.0",
49
- "@pactor-app/schema": "1.18.0",
50
- "@pactor-app/core": "1.18.0"
48
+ "@pactor-app/core": "1.20.0",
49
+ "@pactor-app/schema": "1.20.0",
50
+ "@pactor-app/expression": "1.20.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=18"