@wevu/web-apis 1.2.29 → 1.2.30

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.
@@ -35,13 +35,14 @@ async function createMultipartPart(name, value) {
35
35
  encodeText(CRLF)
36
36
  ];
37
37
  const filename = getMultipartFilename(value);
38
+ const headers = [
39
+ `Content-Disposition: form-data; name="${escapeMultipartName(name)}"; filename="${escapeMultipartName(filename)}"`,
40
+ `Content-Type: ${value.type || "application/octet-stream"}`,
41
+ "",
42
+ ""
43
+ ].join(CRLF);
38
44
  return [
39
- encodeText([
40
- `Content-Disposition: form-data; name="${escapeMultipartName(name)}"; filename="${escapeMultipartName(filename)}"`,
41
- `Content-Type: ${value.type || "application/octet-stream"}`,
42
- "",
43
- ""
44
- ].join(CRLF)),
45
+ encodeText(headers),
45
46
  await value.arrayBuffer(),
46
47
  encodeText(CRLF)
47
48
  ];
package/dist/fetch.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./http.mjs";
2
- import { t as fetch } from "./fetch-CAk2XQY6.mjs";
2
+ import { t as fetch } from "./fetch-D1YS7Mx-.mjs";
3
3
  export { fetch };
package/dist/http.mjs CHANGED
@@ -94,7 +94,8 @@ async function readBodyAsArrayBuffer(body) {
94
94
  }
95
95
  async function readBodyAsText(body) {
96
96
  if (typeof body === "string") return body;
97
- return decodeText(await readBodyAsArrayBuffer(body));
97
+ const buffer = await readBodyAsArrayBuffer(body);
98
+ return decodeText(buffer);
98
99
  }
99
100
  function getRequestBodyValue(request) {
100
101
  return request ? requestBodyStore.get(request) : void 0;
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { URLPolyfill, URLSearchParamsPolyfill } from "./url.mjs";
3
3
  import { AbortControllerPolyfill, AbortSignalPolyfill } from "./abort.mjs";
4
4
  import { BlobPolyfill, FilePolyfill, FormDataPolyfill } from "./web.mjs";
5
5
  import { HeadersPolyfill, RequestPolyfill, ResponsePolyfill } from "./http.mjs";
6
- import { t as fetch } from "./fetch-CAk2XQY6.mjs";
6
+ import { t as fetch } from "./fetch-D1YS7Mx-.mjs";
7
7
  import { getMiniProgramNetworkDefaults, resetMiniProgramNetworkDefaults, setMiniProgramNetworkDefaults } from "./networkDefaults.mjs";
8
8
  import { WebSocketPolyfill } from "./websocket.mjs";
9
9
  import { XMLHttpRequestPolyfill } from "./xhr.mjs";
package/dist/xhr.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { f as resolveRequestGlobalsHost, t as RequestGlobalsEventTarget } from "./shared-L1rGUbe0.mjs";
2
2
  import { AbortControllerPolyfill } from "./abort.mjs";
3
3
  import { HeadersPolyfill, headersToObject } from "./http.mjs";
4
- import { t as fetch } from "./fetch-CAk2XQY6.mjs";
4
+ import { t as fetch } from "./fetch-D1YS7Mx-.mjs";
5
5
  //#region src/xhr.ts
6
6
  function createProgressEvent(type) {
7
7
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wevu/web-apis",
3
3
  "type": "module",
4
- "version": "1.2.29",
4
+ "version": "1.2.30",
5
5
  "description": "Web API polyfills and global installers for mini-program runtimes",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@weapp-core/constants": "0.1.15",
78
- "@wevu/api": "0.2.13"
78
+ "@wevu/api": "0.2.14"
79
79
  },
80
80
  "publishConfig": {
81
81
  "access": "public",