xpe 1.0.9 → 1.0.10

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.
@@ -2,7 +2,10 @@ export function createRuntimeFetch(runtimeCredentials, browserFetch = window.fet
2
2
  if (!runtimeCredentials)
3
3
  return undefined;
4
4
  return (input, init) => {
5
- const requestCredentials = input instanceof Request ? input.credentials : undefined;
5
+ // Request objects created inside an XPE child iframe belong to another
6
+ // JavaScript Realm, so `input instanceof Request` is false in the Host.
7
+ // RequestInfo is Request|string; use the contract shape instead.
8
+ const requestCredentials = typeof input === "string" ? undefined : input.credentials;
6
9
  return browserFetch(input, {
7
10
  ...init,
8
11
  credentials: init?.credentials ?? requestCredentials ?? runtimeCredentials,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xpe",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "下一代微前端应用运行底座",
5
5
  "type": "module",
6
6
  "license": "MIT",