@wevu/web-apis 1.2.11 → 1.2.13

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { t as RequestGlobalsEventTarget } from "./shared-BB491DgN.mjs";
1
+ import { t as RequestGlobalsEventTarget } from "./shared-CoBapMO6.mjs";
2
2
  //#region src/abort.ts
3
3
  function createAbortError(reason) {
4
4
  if (reason instanceof Error) return reason;
package/dist/fetch.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { f as isUrlInstance, l as normalizeHeaderName, n as cloneArrayBuffer, p as isUrlSearchParamsInstance, r as cloneArrayBufferView } from "./shared-BB491DgN.mjs";
1
+ import { f as isUrlInstance, l as normalizeHeaderName, n as cloneArrayBuffer, p as isUrlSearchParamsInstance, r as cloneArrayBufferView } from "./shared-CoBapMO6.mjs";
2
2
  import { HeadersPolyfill, ResponsePolyfill } from "./http.mjs";
3
3
  import { resolveRequestMiniProgramOptions } from "./networkDefaults.mjs";
4
4
  import { wpi } from "@wevu/api";
package/dist/http.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { f as isUrlInstance, i as decodeText, l as normalizeHeaderName, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView } from "./shared-BB491DgN.mjs";
1
+ import { f as isUrlInstance, i as decodeText, l as normalizeHeaderName, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView } from "./shared-CoBapMO6.mjs";
2
2
  //#region src/http.ts
3
3
  function isIterableHeaders(input) {
4
4
  return Boolean(input) && typeof input[Symbol.iterator] === "function";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as decodeTextFallback, c as installRequestGlobalBinding, d as resolveRequestGlobalsHosts, g as getMiniProgramRuntimeGlobalKeys, s as encodeTextFallback, t as RequestGlobalsEventTarget, u as resolveRequestGlobalsHost } from "./shared-BB491DgN.mjs";
1
+ import { a as decodeTextFallback, c as installRequestGlobalBinding, d as resolveRequestGlobalsHosts, g as getMiniProgramRuntimeGlobalKeys, s as encodeTextFallback, t as RequestGlobalsEventTarget, u as resolveRequestGlobalsHost } from "./shared-CoBapMO6.mjs";
2
2
  import { URLPolyfill, URLSearchParamsPolyfill } from "./url.mjs";
3
3
  import { AbortControllerPolyfill, AbortSignalPolyfill } from "./abort.mjs";
4
4
  import { HeadersPolyfill, RequestPolyfill, ResponsePolyfill } from "./http.mjs";
@@ -21,7 +21,7 @@ const MINI_PROGRAM_SOCKET_OPTION_KEYS = [
21
21
  ];
22
22
  let miniProgramNetworkDefaults = {};
23
23
  function hasOwnProperty(source, key) {
24
- return Object.hasOwn(source, key);
24
+ return Object.prototype.hasOwnProperty.call(source, key);
25
25
  }
26
26
  function isObject(value) {
27
27
  return typeof value === "object" && value !== null;
@@ -43,22 +43,6 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
43
43
  }
44
44
  return object;
45
45
  }
46
- function createDefu(merger) {
47
- return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
48
- }
49
- createDefu();
50
- createDefu((object, key, currentValue) => {
51
- if (object[key] !== void 0 && typeof currentValue === "function") {
52
- object[key] = currentValue(object[key]);
53
- return true;
54
- }
55
- });
56
- createDefu((object, key, currentValue) => {
57
- if (Array.isArray(object[key]) && typeof currentValue === "function") {
58
- object[key] = currentValue(object[key]);
59
- return true;
60
- }
61
- });
62
46
  const DEFAULT_PROJECT_CONFIG_ROOT_KEYS = ["miniprogramRoot", "srcMiniprogramRoot"];
63
47
  const DEFAULT_RUNTIME_CAPABILITIES = Object.freeze({
64
48
  globalPageStack: true,
@@ -459,7 +443,13 @@ var require_is_plain_object = /* @__PURE__ */ __commonJSMin(((exports, module) =
459
443
  return true;
460
444
  };
461
445
  }));
462
- var import_set_value = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
446
+ /*!
447
+ * set-value <https://github.com/jonschlinkert/set-value>
448
+ *
449
+ * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
450
+ * Released under the MIT License.
451
+ */
452
+ (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
463
453
  const { deleteProperty } = Reflect;
464
454
  const isPrimitive = require_is_primitive();
465
455
  const isPlainObject = require_is_plain_object();
@@ -563,14 +553,7 @@ var import_set_value = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
563
553
  setValue.cache = /* @__PURE__ */ new Map();
564
554
  };
565
555
  module.exports = setValue;
566
- })))(), 1);
567
- createDefu((obj, key, value) => {
568
- if (Array.isArray(obj[key]) && Array.isArray(value)) {
569
- obj[key] = value;
570
- return true;
571
- }
572
- });
573
- import_set_value.default;
556
+ })))(), 1)).default;
574
557
  //#endregion
575
558
  //#region src/constructors.ts
576
559
  function resolveUrlConstructor() {
package/dist/shared.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as decodeTextFallback, c as installRequestGlobalBinding, d as resolveRequestGlobalsHosts, i as decodeText, l as normalizeHeaderName, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, s as encodeTextFallback, t as RequestGlobalsEventTarget, u as resolveRequestGlobalsHost } from "./shared-BB491DgN.mjs";
1
+ import { a as decodeTextFallback, c as installRequestGlobalBinding, d as resolveRequestGlobalsHosts, i as decodeText, l as normalizeHeaderName, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView, s as encodeTextFallback, t as RequestGlobalsEventTarget, u as resolveRequestGlobalsHost } from "./shared-CoBapMO6.mjs";
2
2
  export { RequestGlobalsEventTarget, cloneArrayBuffer, cloneArrayBufferView, decodeText, decodeTextFallback, encodeText, encodeTextFallback, installRequestGlobalBinding, normalizeHeaderName, resolveRequestGlobalsHost, resolveRequestGlobalsHosts };
package/dist/url.mjs CHANGED
@@ -67,6 +67,7 @@ function resolveRelativeUrl(input, base) {
67
67
  return `${parsedBase.origin}/${basePathSegments.join("/")}`;
68
68
  }
69
69
  var URLSearchParamsPolyfill = class {
70
+ onChange;
70
71
  entriesStore = [];
71
72
  constructor(init, onChange) {
72
73
  this.onChange = onChange;
package/dist/web.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as decodeText, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView } from "./shared-BB491DgN.mjs";
1
+ import { i as decodeText, n as cloneArrayBuffer, o as encodeText, r as cloneArrayBufferView } from "./shared-CoBapMO6.mjs";
2
2
  //#region src/web.ts
3
3
  function normalizeBlobPart(part) {
4
4
  if (typeof part === "string") return Promise.resolve(encodeText(part));
@@ -1,4 +1,4 @@
1
- import { h as resolveUrlConstructor$1, m as resolveTextEncoderConstructor, n as cloneArrayBuffer, r as cloneArrayBufferView, t as RequestGlobalsEventTarget } from "./shared-BB491DgN.mjs";
1
+ import { h as resolveUrlConstructor$1, m as resolveTextEncoderConstructor, n as cloneArrayBuffer, r as cloneArrayBufferView, t as RequestGlobalsEventTarget } from "./shared-CoBapMO6.mjs";
2
2
  import { URLPolyfill } from "./url.mjs";
3
3
  import { resolveWebSocketMiniProgramOptions } from "./networkDefaults.mjs";
4
4
  import { BlobPolyfill } from "./web.mjs";
package/dist/xhr.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as RequestGlobalsEventTarget, u as resolveRequestGlobalsHost } from "./shared-BB491DgN.mjs";
1
+ import { t as RequestGlobalsEventTarget, u as resolveRequestGlobalsHost } from "./shared-CoBapMO6.mjs";
2
2
  import { AbortControllerPolyfill } from "./abort.mjs";
3
3
  import { HeadersPolyfill, headersToObject } from "./http.mjs";
4
4
  import { fetch } from "./fetch.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wevu/web-apis",
3
3
  "type": "module",
4
- "version": "1.2.11",
4
+ "version": "1.2.13",
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,8 +74,8 @@
74
74
  "node": "^20.19.0 || >=22.12.0"
75
75
  },
76
76
  "dependencies": {
77
- "@weapp-core/constants": "^0.1.4",
78
- "@wevu/api": "0.2.7"
77
+ "@weapp-core/constants": "^0.1.7",
78
+ "@wevu/api": "0.2.9"
79
79
  },
80
80
  "publishConfig": {
81
81
  "access": "public",