@wevu/api 0.2.0 → 0.2.2

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/README.md CHANGED
@@ -34,11 +34,11 @@
34
34
 
35
35
  | 平台 | 可调用 API 数 | 语义对齐 API 数 | fallback API 数 | API 总数 | 可调用覆盖率 | 语义对齐覆盖率 |
36
36
  | --- | --- | --- | --- | --- | --- | --- |
37
- | 微信小程序 (`wx`) | 479 | 479 | 0 | 479 | 100.00% | 100.00% |
38
- | 支付宝小程序 (`my`) | 201 | 201 | 0 | 479 | 41.96% | 41.96% |
39
- | 抖音小程序 (`tt`) | 133 | 133 | 0 | 479 | 27.77% | 27.77% |
40
- | 三端可调用完全对齐 (wx/my/tt) | 117 | - | - | 479 | 24.43% | - |
41
- | 三端语义完全对齐 (wx/my/tt) | - | 117 | - | 479 | - | 24.43% |
37
+ | 微信小程序 (`wx`) | 481 | 481 | 0 | 481 | 100.00% | 100.00% |
38
+ | 支付宝小程序 (`my`) | 201 | 201 | 0 | 481 | 41.79% | 41.79% |
39
+ | 抖音小程序 (`tt`) | 133 | 133 | 0 | 481 | 27.65% | 27.65% |
40
+ | 三端可调用完全对齐 (wx/my/tt) | 117 | - | - | 481 | 24.32% | - |
41
+ | 三端语义完全对齐 (wx/my/tt) | - | 117 | - | 481 | - | 24.32% |
42
42
 
43
43
  > 该报告由 `WEAPI_METHOD_SUPPORT_MATRIX` 与映射规则自动计算生成。
44
44
 
package/dist/index.mjs CHANGED
@@ -83,8 +83,10 @@ function hasCallbacks(value) {
83
83
  function isSyncMethod(name) {
84
84
  return name.endsWith("Sync");
85
85
  }
86
+ const ON_EVENT_RE = /^on[A-Z]/;
87
+ const OFF_EVENT_RE = /^off[A-Z]/;
86
88
  function isEventMethod(name) {
87
- return /^on[A-Z]/.test(name) || /^off[A-Z]/.test(name);
89
+ return ON_EVENT_RE.test(name) || OFF_EVENT_RE.test(name);
88
90
  }
89
91
  function shouldSkipPromise(name) {
90
92
  return isSyncMethod(name) || isEventMethod(name) || name === "createInterstitialAd" || name === "createRewardedVideoAd" || name === "createVKSession" || name === "createCameraContext" || name === "cancelIdleCallback" || name === "nextTick" || name === "getLogManager" || name === "reportAnalytics";
@@ -96,7 +98,7 @@ function createNotSupportedError(methodName, platform) {
96
98
  //#region src/core/callBridge.ts
97
99
  function resolveOptionsArg$1(args) {
98
100
  const nextArgs = args.slice();
99
- const lastArg = nextArgs.length > 0 ? nextArgs[nextArgs.length - 1] : void 0;
101
+ const lastArg = nextArgs.length > 0 ? nextArgs.at(-1) : void 0;
100
102
  if (isPlainObject(lastArg)) {
101
103
  const options = { ...lastArg };
102
104
  nextArgs[nextArgs.length - 1] = options;
@@ -116,7 +118,7 @@ function resolveOptionsArg$1(args) {
116
118
  * @description 将错误按小程序回调风格分发;若无回调则返回 reject Promise。
117
119
  */
118
120
  function callWithError(error, args) {
119
- const lastArg = args.length > 0 ? args[args.length - 1] : void 0;
121
+ const lastArg = args.length > 0 ? args.at(-1) : void 0;
120
122
  if (hasCallbacks(lastArg)) {
121
123
  lastArg.fail?.(error);
122
124
  lastArg.complete?.(error);
@@ -874,12 +876,12 @@ const WEAPI_WX_METHODS_ADD_CARD_TO_JOIN_VO_IPCHAT = [
874
876
  "joinVoIPChat"
875
877
  ];
876
878
  //#endregion
877
- //#region src/core/apiCatalog/wxMethodsLoadBuiltInFontFaceToPreloadAssets.ts
879
+ //#region src/core/apiCatalog/wxMethodsLoadBuiltInFontFaceToPostMessageToReferrerPage.ts
878
880
  /**
879
881
  * @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
880
882
  * @generated by scripts/sync-api-catalog.mjs
881
883
  */
882
- const WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_PRELOAD_ASSETS = [
884
+ const WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_POST_MESSAGE_TO_REFERRER_PAGE = [
883
885
  "loadBuiltInFontFace",
884
886
  "loadFontFace",
885
887
  "login",
@@ -937,13 +939,14 @@ const WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_PRELOAD_ASSETS = [
937
939
  "offMenuButtonBoundingClientRectWeightChange",
938
940
  "offNetworkStatusChange",
939
941
  "offNetworkWeakChange",
940
- "offOnUserTriggerTranslation",
941
942
  "offPageNotFound",
942
943
  "offParallelStateChange",
943
944
  "offScreenRecordingStateChanged",
944
945
  "offThemeChange",
945
946
  "offUnhandledRejection",
946
947
  "offUserCaptureScreen",
948
+ "offUserOffTranslation",
949
+ "offUserTriggerTranslation",
947
950
  "offVoIPChatInterrupted",
948
951
  "offVoIPChatMembersChanged",
949
952
  "offVoIPChatSpeakersChanged",
@@ -1003,7 +1006,6 @@ const WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_PRELOAD_ASSETS = [
1003
1006
  "onNeedPrivacyAuthorization",
1004
1007
  "onNetworkStatusChange",
1005
1008
  "onNetworkWeakChange",
1006
- "onOnUserTriggerTranslation",
1007
1009
  "onPageNotFound",
1008
1010
  "onParallelStateChange",
1009
1011
  "onScreenRecordingStateChanged",
@@ -1014,6 +1016,8 @@ const WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_PRELOAD_ASSETS = [
1014
1016
  "onThemeChange",
1015
1017
  "onUnhandledRejection",
1016
1018
  "onUserCaptureScreen",
1019
+ "onUserOffTranslation",
1020
+ "onUserTriggerTranslation",
1017
1021
  "onVoIPChatInterrupted",
1018
1022
  "onVoIPChatMembersChanged",
1019
1023
  "onVoIPChatSpeakersChanged",
@@ -1057,17 +1061,17 @@ const WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_PRELOAD_ASSETS = [
1057
1061
  "playVoice",
1058
1062
  "pluginLogin",
1059
1063
  "postMessageToReferrerMiniProgram",
1060
- "postMessageToReferrerPage",
1061
- "preDownloadSubpackage",
1062
- "preloadAssets"
1064
+ "postMessageToReferrerPage"
1063
1065
  ];
1064
1066
  //#endregion
1065
- //#region src/core/apiCatalog/wxMethodsPreloadSkylineViewToWriteBLECharacteristicValue.ts
1067
+ //#region src/core/apiCatalog/wxMethodsPreDownloadSubpackageToWriteBLECharacteristicValue.ts
1066
1068
  /**
1067
1069
  * @description 三端 API 名单(由 typings 自动提取,请勿手工修改)
1068
1070
  * @generated by scripts/sync-api-catalog.mjs
1069
1071
  */
1070
- const WEAPI_WX_METHODS_PRELOAD_SKYLINE_VIEW_TO_WRITE_BLECHARACTERISTIC_VALUE = [
1072
+ const WEAPI_WX_METHODS_PRE_DOWNLOAD_SUBPACKAGE_TO_WRITE_BLECHARACTERISTIC_VALUE = [
1073
+ "preDownloadSubpackage",
1074
+ "preloadAssets",
1071
1075
  "preloadSkylineView",
1072
1076
  "preloadWebview",
1073
1077
  "previewImage",
@@ -1190,8 +1194,8 @@ const WEAPI_WX_METHODS_PRELOAD_SKYLINE_VIEW_TO_WRITE_BLECHARACTERISTIC_VALUE = [
1190
1194
  ];
1191
1195
  [
1192
1196
  ...WEAPI_WX_METHODS_ADD_CARD_TO_JOIN_VO_IPCHAT,
1193
- ...WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_PRELOAD_ASSETS,
1194
- ...WEAPI_WX_METHODS_PRELOAD_SKYLINE_VIEW_TO_WRITE_BLECHARACTERISTIC_VALUE
1197
+ ...WEAPI_WX_METHODS_LOAD_BUILT_IN_FONT_FACE_TO_POST_MESSAGE_TO_REFERRER_PAGE,
1198
+ ...WEAPI_WX_METHODS_PRE_DOWNLOAD_SUBPACKAGE_TO_WRITE_BLECHARACTERISTIC_VALUE
1195
1199
  ];
1196
1200
  //#endregion
1197
1201
  //#region src/core/methodMapping/rules/helpersDeviceAndStorage.ts
@@ -1206,7 +1210,7 @@ function mapSaveFileArgs(args) {
1206
1210
  const lastArg = nextArgs[lastIndex];
1207
1211
  if (!isPlainObject(lastArg)) return nextArgs;
1208
1212
  const nextOptions = { ...lastArg };
1209
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "apFilePath") && Object.prototype.hasOwnProperty.call(nextOptions, "tempFilePath")) nextOptions.apFilePath = nextOptions.tempFilePath;
1213
+ if (!Object.hasOwn(nextOptions, "apFilePath") && Object.hasOwn(nextOptions, "tempFilePath")) nextOptions.apFilePath = nextOptions.tempFilePath;
1210
1214
  nextArgs[lastIndex] = nextOptions;
1211
1215
  return nextArgs;
1212
1216
  }
@@ -1216,15 +1220,15 @@ function mapCreateRewardedVideoAdArgs(args) {
1216
1220
  const lastIndex = nextArgs.length - 1;
1217
1221
  const lastArg = nextArgs[lastIndex];
1218
1222
  if (!isPlainObject(lastArg)) return nextArgs;
1219
- if (Object.prototype.hasOwnProperty.call(lastArg, "multiton") && lastArg.multiton === true) throw createNotSupportedError("createRewardedVideoAd", "my");
1220
- if (Object.prototype.hasOwnProperty.call(lastArg, "disableFallbackSharePage") && lastArg.disableFallbackSharePage === true) throw createNotSupportedError("createRewardedVideoAd", "my");
1223
+ if (Object.hasOwn(lastArg, "multiton") && lastArg.multiton === true) throw createNotSupportedError("createRewardedVideoAd", "my");
1224
+ if (Object.hasOwn(lastArg, "disableFallbackSharePage") && lastArg.disableFallbackSharePage === true) throw createNotSupportedError("createRewardedVideoAd", "my");
1221
1225
  const adUnitId = lastArg.adUnitId;
1222
1226
  if (typeof adUnitId === "string" && adUnitId.length > 0) nextArgs[lastIndex] = adUnitId;
1223
1227
  return nextArgs;
1224
1228
  }
1225
1229
  function mapRewardedAdInstance(result, args = []) {
1226
1230
  if (typeof result !== "object" || result === null) return result;
1227
- const adUnitIdArg = args.length > 0 ? args[args.length - 1] : void 0;
1231
+ const adUnitIdArg = args.length > 0 ? args.at(-1) : void 0;
1228
1232
  const adUnitId = typeof adUnitIdArg === "string" ? adUnitIdArg : void 0;
1229
1233
  if (!adUnitId) return result;
1230
1234
  const rewardedAd = result;
@@ -1256,7 +1260,7 @@ function mapCheckIsSoterEnrolledInDeviceArgs(args) {
1256
1260
  }
1257
1261
  function mapSoterCheckResult(methodName, result) {
1258
1262
  if (!isPlainObject(result)) return result;
1259
- if (Object.prototype.hasOwnProperty.call(result, "errMsg")) return result;
1263
+ if (Object.hasOwn(result, "errMsg")) return result;
1260
1264
  return {
1261
1265
  ...result,
1262
1266
  errMsg: `${methodName}:ok`
@@ -1272,11 +1276,11 @@ function toNumberCode(value) {
1272
1276
  function mapBleConnectionResult(methodName, codeKey, result) {
1273
1277
  if (!isPlainObject(result)) return result;
1274
1278
  const nextResult = { ...result };
1275
- if (!Object.prototype.hasOwnProperty.call(nextResult, "errCode")) {
1279
+ if (!Object.hasOwn(nextResult, "errCode")) {
1276
1280
  const code = toNumberCode(nextResult[codeKey]);
1277
1281
  if (typeof code === "number") nextResult.errCode = code;
1278
1282
  }
1279
- if (!Object.prototype.hasOwnProperty.call(nextResult, "errMsg")) {
1283
+ if (!Object.hasOwn(nextResult, "errMsg")) {
1280
1284
  if (typeof nextResult.errorMessage === "string" && nextResult.errorMessage.length > 0) nextResult.errMsg = nextResult.errorMessage;
1281
1285
  else if (nextResult.errCode === 0) nextResult.errMsg = `${methodName}:ok`;
1282
1286
  }
@@ -1290,7 +1294,7 @@ function mapCloseBleConnectionResult(result) {
1290
1294
  }
1291
1295
  function mapSaveFileResult(result) {
1292
1296
  if (!isPlainObject(result)) return result;
1293
- if (!Object.prototype.hasOwnProperty.call(result, "savedFilePath") && Object.prototype.hasOwnProperty.call(result, "apFilePath")) return {
1297
+ if (!Object.hasOwn(result, "savedFilePath") && Object.hasOwn(result, "apFilePath")) return {
1294
1298
  ...result,
1295
1299
  savedFilePath: result.apFilePath
1296
1300
  };
@@ -1298,7 +1302,7 @@ function mapSaveFileResult(result) {
1298
1302
  }
1299
1303
  function mapDouyinSaveFileResult(result) {
1300
1304
  if (!isPlainObject(result)) return result;
1301
- if (!Object.prototype.hasOwnProperty.call(result, "savedFilePath") && Object.prototype.hasOwnProperty.call(result, "filePath")) return {
1305
+ if (!Object.hasOwn(result, "savedFilePath") && Object.hasOwn(result, "filePath")) return {
1302
1306
  ...result,
1303
1307
  savedFilePath: result.filePath
1304
1308
  };
@@ -1324,8 +1328,8 @@ function mapToastArgs(args) {
1324
1328
  const lastArg = nextArgs[lastIndex];
1325
1329
  if (!isPlainObject(lastArg)) return nextArgs;
1326
1330
  const nextOptions = { ...lastArg };
1327
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "content") && Object.prototype.hasOwnProperty.call(nextOptions, "title")) nextOptions.content = nextOptions.title;
1328
- if (Object.prototype.hasOwnProperty.call(nextOptions, "icon")) nextOptions.type = mapToastType(nextOptions.icon);
1331
+ if (!Object.hasOwn(nextOptions, "content") && Object.hasOwn(nextOptions, "title")) nextOptions.content = nextOptions.title;
1332
+ if (Object.hasOwn(nextOptions, "icon")) nextOptions.type = mapToastType(nextOptions.icon);
1329
1333
  nextArgs[lastIndex] = nextOptions;
1330
1334
  return nextArgs;
1331
1335
  }
@@ -1347,7 +1351,7 @@ function mapLoadingArgs(args) {
1347
1351
  const lastArg = nextArgs[lastIndex];
1348
1352
  if (!isPlainObject(lastArg)) return nextArgs;
1349
1353
  const nextOptions = { ...lastArg };
1350
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "content") && Object.prototype.hasOwnProperty.call(nextOptions, "title")) nextOptions.content = nextOptions.title;
1354
+ if (!Object.hasOwn(nextOptions, "content") && Object.hasOwn(nextOptions, "title")) nextOptions.content = nextOptions.title;
1351
1355
  nextArgs[lastIndex] = nextOptions;
1352
1356
  return nextArgs;
1353
1357
  }
@@ -1358,13 +1362,13 @@ function mapActionSheetArgs(args) {
1358
1362
  const lastArg = nextArgs[lastIndex];
1359
1363
  if (!isPlainObject(lastArg)) return nextArgs;
1360
1364
  const nextOptions = { ...lastArg };
1361
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "items") && Array.isArray(nextOptions.itemList)) nextOptions.items = nextOptions.itemList;
1365
+ if (!Object.hasOwn(nextOptions, "items") && Array.isArray(nextOptions.itemList)) nextOptions.items = nextOptions.itemList;
1362
1366
  nextArgs[lastIndex] = nextOptions;
1363
1367
  return nextArgs;
1364
1368
  }
1365
1369
  function mapActionSheetResult(result) {
1366
1370
  if (!isPlainObject(result)) return result;
1367
- if (!Object.prototype.hasOwnProperty.call(result, "tapIndex") && Object.prototype.hasOwnProperty.call(result, "index")) return {
1371
+ if (!Object.hasOwn(result, "tapIndex") && Object.hasOwn(result, "index")) return {
1368
1372
  ...result,
1369
1373
  tapIndex: result.index
1370
1374
  };
@@ -1377,11 +1381,11 @@ function mapModalArgs(args) {
1377
1381
  const lastArg = nextArgs[lastIndex];
1378
1382
  if (!isPlainObject(lastArg)) return nextArgs;
1379
1383
  const nextOptions = { ...lastArg };
1380
- if (Object.prototype.hasOwnProperty.call(nextOptions, "showCancel") && nextOptions.showCancel === false) throw createNotSupportedError("showModal", "my");
1381
- if (Object.prototype.hasOwnProperty.call(nextOptions, "editable") && nextOptions.editable === true) throw createNotSupportedError("showModal", "my");
1382
- if (Object.prototype.hasOwnProperty.call(nextOptions, "placeholderText")) throw createNotSupportedError("showModal", "my");
1383
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "confirmButtonText") && Object.prototype.hasOwnProperty.call(nextOptions, "confirmText")) nextOptions.confirmButtonText = nextOptions.confirmText;
1384
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "cancelButtonText") && Object.prototype.hasOwnProperty.call(nextOptions, "cancelText")) nextOptions.cancelButtonText = nextOptions.cancelText;
1384
+ if (Object.hasOwn(nextOptions, "showCancel") && nextOptions.showCancel === false) throw createNotSupportedError("showModal", "my");
1385
+ if (Object.hasOwn(nextOptions, "editable") && nextOptions.editable === true) throw createNotSupportedError("showModal", "my");
1386
+ if (Object.hasOwn(nextOptions, "placeholderText")) throw createNotSupportedError("showModal", "my");
1387
+ if (!Object.hasOwn(nextOptions, "confirmButtonText") && Object.hasOwn(nextOptions, "confirmText")) nextOptions.confirmButtonText = nextOptions.confirmText;
1388
+ if (!Object.hasOwn(nextOptions, "cancelButtonText") && Object.hasOwn(nextOptions, "cancelText")) nextOptions.cancelButtonText = nextOptions.cancelText;
1385
1389
  nextArgs[lastIndex] = nextOptions;
1386
1390
  return nextArgs;
1387
1391
  }
@@ -1389,11 +1393,11 @@ function mapModalResult(result) {
1389
1393
  if (!isPlainObject(result)) return result;
1390
1394
  let changed = false;
1391
1395
  const nextResult = { ...result };
1392
- if (!Object.prototype.hasOwnProperty.call(nextResult, "cancel") && Object.prototype.hasOwnProperty.call(nextResult, "confirm")) {
1396
+ if (!Object.hasOwn(nextResult, "cancel") && Object.hasOwn(nextResult, "confirm")) {
1393
1397
  nextResult.cancel = !nextResult.confirm;
1394
1398
  changed = true;
1395
1399
  }
1396
- if (!Object.prototype.hasOwnProperty.call(nextResult, "content")) {
1400
+ if (!Object.hasOwn(nextResult, "content")) {
1397
1401
  nextResult.content = "";
1398
1402
  changed = true;
1399
1403
  }
@@ -1401,7 +1405,7 @@ function mapModalResult(result) {
1401
1405
  }
1402
1406
  function mapChooseImageResult(result) {
1403
1407
  if (!isPlainObject(result)) return result;
1404
- if (!Object.prototype.hasOwnProperty.call(result, "tempFilePaths") && Array.isArray(result.apFilePaths)) return {
1408
+ if (!Object.hasOwn(result, "tempFilePaths") && Array.isArray(result.apFilePaths)) return {
1405
1409
  ...result,
1406
1410
  tempFilePaths: result.apFilePaths
1407
1411
  };
@@ -1437,13 +1441,13 @@ function mapSetClipboardArgs(args) {
1437
1441
  const lastArg = nextArgs[lastIndex];
1438
1442
  if (!isPlainObject(lastArg)) return nextArgs;
1439
1443
  const nextOptions = { ...lastArg };
1440
- if (!Object.prototype.hasOwnProperty.call(nextOptions, "text") && Object.prototype.hasOwnProperty.call(nextOptions, "data")) nextOptions.text = nextOptions.data;
1444
+ if (!Object.hasOwn(nextOptions, "text") && Object.hasOwn(nextOptions, "data")) nextOptions.text = nextOptions.data;
1441
1445
  nextArgs[lastIndex] = nextOptions;
1442
1446
  return nextArgs;
1443
1447
  }
1444
1448
  function mapClipboardResult(result) {
1445
1449
  if (!isPlainObject(result)) return result;
1446
- if (!Object.prototype.hasOwnProperty.call(result, "data") && Object.prototype.hasOwnProperty.call(result, "text")) return {
1450
+ if (!Object.hasOwn(result, "data") && Object.hasOwn(result, "text")) return {
1447
1451
  ...result,
1448
1452
  data: result.text
1449
1453
  };
@@ -2131,7 +2135,7 @@ function clearTimer(timer) {
2131
2135
  }
2132
2136
  function resolveOptionsArg(args) {
2133
2137
  const nextArgs = args.slice();
2134
- const lastArg = nextArgs.length > 0 ? nextArgs[nextArgs.length - 1] : void 0;
2138
+ const lastArg = nextArgs.length > 0 ? nextArgs.at(-1) : void 0;
2135
2139
  if (isPlainObject(lastArg)) {
2136
2140
  const options = { ...lastArg };
2137
2141
  nextArgs[nextArgs.length - 1] = options;
@@ -2435,7 +2439,7 @@ function createWeapi(options = {}) {
2435
2439
  try {
2436
2440
  runtimeArgs = mappingRule?.mapArgs ? mappingRule.mapArgs(args) : args;
2437
2441
  } catch (error) {
2438
- const lastArg = args.length > 0 ? args[args.length - 1] : void 0;
2442
+ const lastArg = args.length > 0 ? args.at(-1) : void 0;
2439
2443
  if (hasCallbacks(lastArg)) {
2440
2444
  lastArg.fail?.(error);
2441
2445
  lastArg.complete?.(error);
@@ -2448,7 +2452,7 @@ function createWeapi(options = {}) {
2448
2452
  const result = runtimeMethod.apply(runtimeAdapter, runtimeArgs);
2449
2453
  return mappingRule?.mapResult ? mappingRule.mapResult(result, runtimeArgs) : result;
2450
2454
  }
2451
- const lastArg = runtimeArgs.length > 0 ? runtimeArgs[runtimeArgs.length - 1] : void 0;
2455
+ const lastArg = runtimeArgs.length > 0 ? runtimeArgs.at(-1) : void 0;
2452
2456
  if (hasCallbacks(lastArg)) {
2453
2457
  if (mappingRule?.mapResult && isPlainObject(lastArg)) {
2454
2458
  const options = lastArg;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wevu/api",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "description": "tsdown bundler template",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -21,14 +21,10 @@
21
21
  "import": {
22
22
  "types": "./types/index.d.ts",
23
23
  "default": "./dist/index.mjs"
24
- },
25
- "require": {
26
- "types": "./types/index.d.ts",
27
- "default": "./dist/index.cjs"
28
24
  }
29
25
  }
30
26
  },
31
- "main": "./dist/index.cjs",
27
+ "main": "./dist/index.mjs",
32
28
  "module": "./dist/index.mjs",
33
29
  "types": "./types/index.d.ts",
34
30
  "files": [
@@ -38,7 +34,7 @@
38
34
  "dependencies": {
39
35
  "@douyin-microapp/typings": "^1.3.1",
40
36
  "@mini-types/alipay": "^3.0.14",
41
- "miniprogram-api-typings": "^5.1.1"
37
+ "miniprogram-api-typings": "^5.1.2"
42
38
  },
43
39
  "publishConfig": {
44
40
  "access": "public"