@we-debug/plugin-appdata 0.43.0 → 0.43.4

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.43.4](https://github.com/dlhandsome/we-debug/compare/v0.43.3...v0.43.4) (2025-03-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update appdata plugin ([2bc6432](https://github.com/dlhandsome/we-debug/commit/2bc6432411e60a00c0ae7a2d22616886d5c51734))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.43.1](https://github.com/dlhandsome/we-debug/compare/v0.43.0...v0.43.1) (2025-03-10)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * fixed appdata plugin export ([1236acc](https://github.com/dlhandsome/we-debug/commit/1236acc016302f1b70dc89dfc5a474e52cda9c03))
23
+
24
+
25
+
26
+
27
+
6
28
  # [0.43.0](https://github.com/dlhandsome/we-debug/compare/v0.42.6...v0.43.0) (2025-03-10)
7
29
 
8
30
 
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export {};
1
+ import { IPlugin } from './types';
2
+ declare const AppDataPlugin: IPlugin;
3
+ export default AppDataPlugin;
package/dist/index.js CHANGED
@@ -1,5 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ var APP_DATA_VIEW_CONFIG = {
4
+ group: {
5
+ name: 'AppData'
6
+ }
7
+ };
3
8
  var AppDataPlugin = {
4
9
  install: function () { }
5
10
  };
@@ -16,7 +21,7 @@ AppDataPlugin.install = function (weDebug, options) {
16
21
  return;
17
22
  var data = page.data || {};
18
23
  if (currentRule) {
19
- weDebug.removeJsonView(currentRule);
24
+ weDebug.removeJsonView(currentRule, APP_DATA_VIEW_CONFIG);
20
25
  }
21
26
  currentRule = weDebug.createJsonView({
22
27
  data: data,
@@ -32,10 +37,7 @@ AppDataPlugin.install = function (weDebug, options) {
32
37
  }
33
38
  }
34
39
  });
35
- weDebug.addJsonView(currentRule, {
36
- group: {
37
- name: 'AppData',
38
- },
39
- });
40
+ weDebug.addJsonView(currentRule, APP_DATA_VIEW_CONFIG);
40
41
  });
41
42
  };
43
+ exports.default = AppDataPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@we-debug/plugin-appdata",
3
- "version": "0.43.0",
3
+ "version": "0.43.4",
4
4
  "description": "> TODO: description",
5
5
  "author": "Sail <505441575@qq.com>",
6
6
  "homepage": "https://github.com/dlhandsome/we-debug/tree/master/packages/runtime/plugin-appdata#readme",
@@ -20,5 +20,5 @@
20
20
  "bugs": {
21
21
  "url": "https://github.com/dlhandsome/we-debug/issues"
22
22
  },
23
- "gitHead": "e71170c02073fae6a304effd575bbbabc3402c58"
23
+ "gitHead": "96b56563c8743eaccf33e7089370d8fe009d5ce0"
24
24
  }
package/src/index.ts CHANGED
@@ -4,6 +4,12 @@ import {
4
4
  IPluginInitOptions
5
5
  } from './types';
6
6
 
7
+ const APP_DATA_VIEW_CONFIG = {
8
+ group: {
9
+ name: 'AppData'
10
+ }
11
+ };
12
+
7
13
  const AppDataPlugin: IPlugin = {
8
14
  install () {}
9
15
  };
@@ -25,7 +31,7 @@ AppDataPlugin.install = function (weDebug, options:IPluginInitOptions) {
25
31
  const data = page.data || {};
26
32
 
27
33
  if (currentRule) {
28
- weDebug.removeJsonView(currentRule);
34
+ weDebug.removeJsonView(currentRule, APP_DATA_VIEW_CONFIG);
29
35
  }
30
36
  currentRule = weDebug.createJsonView({
31
37
  data,
@@ -33,7 +39,7 @@ AppDataPlugin.install = function (weDebug, options:IPluginInitOptions) {
33
39
  expandLevel: options.expandLevel ?? 1,
34
40
  handler: {
35
41
  bindChange(data: { changes: { field: string, value: IAnyObject }[] }) {
36
- const changeData: any = {};
42
+ const changeData: IAnyObject = {};
37
43
  data.changes.forEach((change) => {
38
44
  changeData[change.field] = change.value;
39
45
  });
@@ -42,10 +48,8 @@ AppDataPlugin.install = function (weDebug, options:IPluginInitOptions) {
42
48
  }
43
49
  });
44
50
 
45
- weDebug.addJsonView(currentRule, {
46
- group: {
47
- name: 'AppData',
48
- },
49
- });
51
+ weDebug.addJsonView(currentRule, APP_DATA_VIEW_CONFIG);
50
52
  });
51
53
  }
54
+
55
+ export default AppDataPlugin;