@we-debug/plugin-error 0.49.2 → 0.51.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.51.0](https://github.com/dlhandsome/we-debug/compare/v0.50.0...v0.51.0) (2026-12-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * **miniprogram:** responsive debug panel and floating launcher ([eb08b8c](https://github.com/dlhandsome/we-debug/commit/eb08b8c6b09faab4ad2cb4aa25ae0141c347c912))
12
+
13
+
14
+
15
+
16
+
17
+ # [0.50.0](https://github.com/dlhandsome/we-debug/compare/v0.49.2...v0.50.0) (2026-11-27)
18
+
19
+
20
+ ### Features
21
+
22
+ * **api:** 新增 wx API 抓包面板 ([da85c30](https://github.com/dlhandsome/we-debug/commit/da85c30bbdd5d40b314b74d64dd22f1137157304))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [0.49.2](https://github.com/dlhandsome/we-debug/compare/v0.49.1...v0.49.2) (2025-11-12)
7
29
 
8
30
  **Note:** Version bump only for package @we-debug/plugin-error
package/dist/index.js CHANGED
@@ -35,13 +35,20 @@ ErrorPlugin.install = function (weDebug, options) {
35
35
  return;
36
36
  ErrorPlugin.installed = true;
37
37
  var badgeOption = options.badge || {};
38
+ var hasLauncher = function () {
39
+ return weDebug
40
+ .getBadge()
41
+ .some(function (badge) {
42
+ return badge.type === 'launcher' && (typeof badge.show === 'function' ? badge.show() : badge.show);
43
+ });
44
+ };
38
45
  var copyOption = options.copyRule || {};
39
46
  var clearOption = options.clearRule || {};
40
47
  var errorBadge = weDebug.createBadge(Object.assign({}, {
41
48
  key: 'error',
42
49
  value: 0,
43
50
  color: 'red',
44
- show: function () { return true; },
51
+ show: function () { return !hasLauncher(); },
45
52
  draggable: true,
46
53
  position: {
47
54
  right: 0,
@@ -58,8 +65,10 @@ ErrorPlugin.install = function (weDebug, options) {
58
65
  handler: {
59
66
  bindTap: function (state) {
60
67
  if (!state.disabled) {
61
- wx.setClipboardData({
62
- data: JSON.stringify(errManage.get(), null, 2)
68
+ weDebug.silent(function () {
69
+ return wx.setClipboardData({
70
+ data: JSON.stringify(errManage.get(), null, 2)
71
+ });
63
72
  });
64
73
  }
65
74
  }
@@ -78,6 +87,7 @@ ErrorPlugin.install = function (weDebug, options) {
78
87
  if (!state.disabled) {
79
88
  errManage.clear();
80
89
  updateState();
90
+ weDebug.hideLauncherDot('error');
81
91
  }
82
92
  }
83
93
  }
@@ -100,6 +110,7 @@ ErrorPlugin.install = function (weDebug, options) {
100
110
  wx.onError(function (err) {
101
111
  errManage.add(err);
102
112
  updateState();
113
+ weDebug.showLauncherDot('error', { group: weDebug.DEFAULT_GROUP.SYSTEM });
103
114
  });
104
115
  wx.onAppRoute &&
105
116
  wx.onAppRoute(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@we-debug/plugin-error",
3
- "version": "0.49.2",
3
+ "version": "0.51.0",
4
4
  "description": "error plugin for we-debug",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types.d.ts",
@@ -17,5 +17,5 @@
17
17
  "readme": "ERROR: No README data found!",
18
18
  "_id": "@we-debug/plugin-error@0.1.6",
19
19
  "_commitid": "ea9904d",
20
- "gitHead": "1d8d4c5f393ffbbb69f68c8220ffe8b37aa3a54c"
20
+ "gitHead": "22641ac4972a154619c6dc8f44b1bfdcbb92c8eb"
21
21
  }