@wevu/web-apis 1.2.38 → 1.2.40
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/abort.mjs +1 -1
- package/dist/{fetch-CeiB6wK4.mjs → fetch-DdyBDcgF.mjs} +2 -2
- package/dist/fetch.mjs +1 -1
- package/dist/http.mjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{shared-Boj9gvKq.mjs → shared-DDRxxmRl.mjs} +7 -2
- package/dist/shared.mjs +1 -1
- package/dist/web.mjs +1 -1
- package/dist/websocket.mjs +1 -1
- package/dist/xhr.mjs +2 -2
- package/package.json +2 -2
package/dist/abort.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as normalizeHeaderName, h as isUrlSearchParamsInstance, l as isArrayBufferLike, m as isUrlInstance, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, u as isBlobLike } from "./shared-
|
|
1
|
+
import { d as normalizeHeaderName, h as isUrlSearchParamsInstance, l as isArrayBufferLike, m as isUrlInstance, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, u as isBlobLike } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
import { FormDataPolyfill } from "./web.mjs";
|
|
3
3
|
import { HeadersPolyfill, RequestPolyfill, ResponsePolyfill, getRequestBodyValue } from "./http.mjs";
|
|
4
4
|
import { resolveRequestMiniProgramOptions } from "./networkDefaults.mjs";
|
|
@@ -9,7 +9,7 @@ function createMultipartBoundary() {
|
|
|
9
9
|
return `----weapp-vite-formdata-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;
|
|
10
10
|
}
|
|
11
11
|
function escapeMultipartName(value) {
|
|
12
|
-
return String(value).
|
|
12
|
+
return String(value).replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
|
|
13
13
|
}
|
|
14
14
|
function concatArrayBuffers(buffers) {
|
|
15
15
|
const totalLength = buffers.reduce((sum, buffer) => sum + buffer.byteLength, 0);
|
package/dist/fetch.mjs
CHANGED
package/dist/http.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as normalizeHeaderName, i as decodeText, l as isArrayBufferLike, m as isUrlInstance, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, u as isBlobLike } from "./shared-
|
|
1
|
+
import { d as normalizeHeaderName, i as decodeText, l as isArrayBufferLike, m as isUrlInstance, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, u as isBlobLike } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
import { FormDataPolyfill } from "./web.mjs";
|
|
3
3
|
//#region src/http.ts
|
|
4
4
|
const SET_COOKIE_HEADER_NAME = "set-cookie";
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as decodeTextFallback, c as installRequestGlobalBinding, f as resolveRequestGlobalsHost, l as isArrayBufferLike, n as cloneArrayBuffer, p as resolveRequestGlobalsHosts, r as cloneArrayBufferView, s as encodeTextFallback, t as RequestGlobalsEventTarget, v as getMiniProgramRuntimeGlobalKeys } from "./shared-
|
|
1
|
+
import { a as decodeTextFallback, c as installRequestGlobalBinding, f as resolveRequestGlobalsHost, l as isArrayBufferLike, n as cloneArrayBuffer, p as resolveRequestGlobalsHosts, r as cloneArrayBufferView, s as encodeTextFallback, t as RequestGlobalsEventTarget, v as getMiniProgramRuntimeGlobalKeys } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
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-
|
|
6
|
+
import { t as fetch } from "./fetch-DdyBDcgF.mjs";
|
|
7
7
|
import { getMiniProgramNetworkDefaults, resetMiniProgramNetworkDefaults, setMiniProgramNetworkDefaults } from "./networkDefaults.mjs";
|
|
8
8
|
import { WebSocketPolyfill } from "./websocket.mjs";
|
|
9
9
|
import { XMLHttpRequestPolyfill } from "./xhr.mjs";
|
|
@@ -160,7 +160,7 @@ const performancePolyfill = {
|
|
|
160
160
|
function queueMicrotaskPolyfill(callback) {
|
|
161
161
|
if (typeof callback !== "function") throw new TypeError("Failed to execute 'queueMicrotask': callback must be a function");
|
|
162
162
|
const nativeQueueMicrotask = globalThis.queueMicrotask;
|
|
163
|
-
if (typeof nativeQueueMicrotask === "function" && nativeQueueMicrotask !== queueMicrotaskPolyfill) {
|
|
163
|
+
if (typeof nativeQueueMicrotask === "function" && nativeQueueMicrotask !== queueMicrotaskPolyfill && nativeQueueMicrotask[REQUEST_GLOBAL_PLACEHOLDER_KEY] !== true) {
|
|
164
164
|
nativeQueueMicrotask(callback);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { URLPolyfill, URLSearchParamsPolyfill } from "./url.mjs";
|
|
2
|
-
//#region ../../@weapp-core/shared/dist/platforms-
|
|
2
|
+
//#region ../../@weapp-core/shared/dist/platforms-CnaLvA5j.js
|
|
3
3
|
const DEFAULT_PROJECT_CONFIG_ROOT_KEYS = ["miniprogramRoot", "srcMiniprogramRoot"];
|
|
4
4
|
const DEFAULT_RUNTIME_CAPABILITIES = Object.freeze({
|
|
5
5
|
globalPageStack: true,
|
|
@@ -333,7 +333,12 @@ function getOrderedRuntimeGlobalKeysByPriority(priorityKey) {
|
|
|
333
333
|
}
|
|
334
334
|
getOrderedRuntimeGlobalKeysByPriority("globalResolvePriority");
|
|
335
335
|
getOrderedRuntimeGlobalKeysByPriority("routeGlobalResolvePriority");
|
|
336
|
-
|
|
336
|
+
/**
|
|
337
|
+
* @description 小程序平台别名映射表。
|
|
338
|
+
*/
|
|
339
|
+
const MINI_PROGRAM_PLATFORM_ALIAS_RECORD = {};
|
|
340
|
+
for (const [alias, platform] of MINI_PROGRAM_PLATFORM_ALIAS_TO_ID) MINI_PROGRAM_PLATFORM_ALIAS_RECORD[alias] = platform;
|
|
341
|
+
Object.freeze(MINI_PROGRAM_PLATFORM_ALIAS_RECORD);
|
|
337
342
|
/**
|
|
338
343
|
* @description 获取平台描述。
|
|
339
344
|
*/
|
package/dist/shared.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as decodeTextFallback, c as installRequestGlobalBinding, d as normalizeHeaderName, f as resolveRequestGlobalsHost, i as decodeText, l as isArrayBufferLike, n as cloneArrayBuffer, o as encodeText, p as resolveRequestGlobalsHosts, r as cloneArrayBufferView, s as encodeTextFallback, t as RequestGlobalsEventTarget, u as isBlobLike } from "./shared-
|
|
1
|
+
import { a as decodeTextFallback, c as installRequestGlobalBinding, d as normalizeHeaderName, f as resolveRequestGlobalsHost, i as decodeText, l as isArrayBufferLike, n as cloneArrayBuffer, o as encodeText, p as resolveRequestGlobalsHosts, r as cloneArrayBufferView, s as encodeTextFallback, t as RequestGlobalsEventTarget, u as isBlobLike } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
export { RequestGlobalsEventTarget, cloneArrayBuffer, cloneArrayBufferView, decodeText, decodeTextFallback, encodeText, encodeTextFallback, installRequestGlobalBinding, isArrayBufferLike, isBlobLike, normalizeHeaderName, resolveRequestGlobalsHost, resolveRequestGlobalsHosts };
|
package/dist/web.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as decodeText, l as isArrayBufferLike, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, u as isBlobLike } from "./shared-
|
|
1
|
+
import { i as decodeText, l as isArrayBufferLike, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, u as isBlobLike } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
//#region src/web.ts
|
|
3
3
|
function normalizeBlobPart(part) {
|
|
4
4
|
if (typeof part === "string") return Promise.resolve(encodeText(part));
|
package/dist/websocket.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as resolveUrlConstructor$1, g as resolveTextEncoderConstructor, l as isArrayBufferLike, n as cloneArrayBuffer, r as cloneArrayBufferView, t as RequestGlobalsEventTarget, u as isBlobLike } from "./shared-
|
|
1
|
+
import { _ as resolveUrlConstructor$1, g as resolveTextEncoderConstructor, l as isArrayBufferLike, n as cloneArrayBuffer, r as cloneArrayBufferView, t as RequestGlobalsEventTarget, u as isBlobLike } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
import { URLPolyfill } from "./url.mjs";
|
|
3
3
|
import { BlobPolyfill } from "./web.mjs";
|
|
4
4
|
import { resolveWebSocketMiniProgramOptions } from "./networkDefaults.mjs";
|
package/dist/xhr.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { f as resolveRequestGlobalsHost, t as RequestGlobalsEventTarget } from "./shared-
|
|
1
|
+
import { f as resolveRequestGlobalsHost, t as RequestGlobalsEventTarget } from "./shared-DDRxxmRl.mjs";
|
|
2
2
|
import { AbortControllerPolyfill } from "./abort.mjs";
|
|
3
3
|
import { HeadersPolyfill, headersToObject } from "./http.mjs";
|
|
4
|
-
import { t as fetch } from "./fetch-
|
|
4
|
+
import { t as fetch } from "./fetch-DdyBDcgF.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.
|
|
4
|
+
"version": "1.2.40",
|
|
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",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"node": "^20.19.0 || >=22.12.0"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@weapp-core/constants": "0.2.
|
|
77
|
+
"@weapp-core/constants": "0.2.1",
|
|
78
78
|
"@wevu/api": "0.3.0"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|