@whitesev/utils 2.3.2 → 2.3.3
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.amd.js +13 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +13 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +13 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +13 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +13 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +13 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Httpx.d.ts +62 -12
- package/package.json +1 -1
- package/src/Httpx.ts +117 -38
- package/src/Utils.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1753,6 +1753,8 @@ class Httpx {
|
|
|
1753
1753
|
data: details.data || this.context.#defaultDetails.data,
|
|
1754
1754
|
redirect: details.redirect || this.context.#defaultDetails.redirect,
|
|
1755
1755
|
cookie: details.cookie || this.context.#defaultDetails.cookie,
|
|
1756
|
+
cookiePartition: details.cookiePartition ||
|
|
1757
|
+
this.context.#defaultDetails.cookiePartition,
|
|
1756
1758
|
binary: details.binary || this.context.#defaultDetails.binary,
|
|
1757
1759
|
nocache: details.nocache || this.context.#defaultDetails.nocache,
|
|
1758
1760
|
revalidate: details.revalidate || this.context.#defaultDetails.revalidate,
|
|
@@ -1854,6 +1856,15 @@ class Httpx {
|
|
|
1854
1856
|
else {
|
|
1855
1857
|
result.fetchInit = details.fetchInit;
|
|
1856
1858
|
}
|
|
1859
|
+
// 处理新的cookiePartition
|
|
1860
|
+
if (typeof result.cookiePartition === "object" &&
|
|
1861
|
+
result.cookiePartition != null) {
|
|
1862
|
+
if (Reflect.has(result.cookiePartition, "topLevelSite") &&
|
|
1863
|
+
typeof result.cookiePartition.topLevelSite !== "string") {
|
|
1864
|
+
// topLevelSite必须是字符串
|
|
1865
|
+
Reflect.deleteProperty(result.cookiePartition, "topLevelSite");
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1857
1868
|
return result;
|
|
1858
1869
|
},
|
|
1859
1870
|
/**
|
|
@@ -2343,6 +2354,7 @@ class Httpx {
|
|
|
2343
2354
|
data: void 0,
|
|
2344
2355
|
redirect: void 0,
|
|
2345
2356
|
cookie: void 0,
|
|
2357
|
+
cookiePartition: void 0,
|
|
2346
2358
|
binary: void 0,
|
|
2347
2359
|
nocache: void 0,
|
|
2348
2360
|
revalidate: void 0,
|
|
@@ -3926,7 +3938,7 @@ class Utils {
|
|
|
3926
3938
|
this.windowApi = new WindowApi(option);
|
|
3927
3939
|
}
|
|
3928
3940
|
/** 版本号 */
|
|
3929
|
-
version = "2024.9.
|
|
3941
|
+
version = "2024.9.28";
|
|
3930
3942
|
addStyle(cssText) {
|
|
3931
3943
|
if (typeof cssText !== "string") {
|
|
3932
3944
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|