@we-debug/core 0.37.4 → 0.40.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 +33 -0
- package/dist/api/init.js +5 -1
- package/dist/api/rule.js +9 -1
- package/dist/types.d.ts +6 -1
- package/dist/version.js +1 -1
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.40.0](https://github.com/dlhandsome/we-debug/compare/v0.39.0...v0.40.0) (2025-03-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* added something ([d439b85](https://github.com/dlhandsome/we-debug/commit/d439b855a52687ec3e0d7cbfde021a847b33fbc6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [0.39.0](https://github.com/dlhandsome/we-debug/compare/v0.38.1...v0.39.0) (2025-03-07)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **plugin-appdata:** support appdata ([6df8fe8](https://github.com/dlhandsome/we-debug/commit/6df8fe83cef9f5b4d41859754893697376dd9732))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [0.38.0](https://github.com/dlhandsome/we-debug/compare/v0.37.4...v0.38.0) (2025-03-07)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* support private rule group ([7e3804f](https://github.com/dlhandsome/we-debug/commit/7e3804f49899882203c8456a1ea76b77581cc8b2))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [0.37.4](https://github.com/dlhandsome/we-debug/compare/v0.37.3...v0.37.4) (2025-03-07)
|
|
7
40
|
|
|
8
41
|
|
package/dist/api/init.js
CHANGED
|
@@ -10,6 +10,7 @@ var plugin_router_1 = __importDefault(require("@we-debug/plugin-router"));
|
|
|
10
10
|
var plugin_launcher_1 = __importDefault(require("@we-debug/plugin-launcher"));
|
|
11
11
|
var plugin_network_1 = __importDefault(require("@we-debug/plugin-network"));
|
|
12
12
|
var plugin_1 = __importDefault(require("@we-debug/plugin-ui-check/plugin"));
|
|
13
|
+
var plugin_appdata_1 = __importDefault(require("@we-debug/plugin-appdata"));
|
|
13
14
|
var deepmerge_1 = __importDefault(require("deepmerge"));
|
|
14
15
|
function init(options) {
|
|
15
16
|
var opt = (0, deepmerge_1.default)({
|
|
@@ -18,11 +19,14 @@ function init(options) {
|
|
|
18
19
|
network: true,
|
|
19
20
|
error: true,
|
|
20
21
|
router: true,
|
|
21
|
-
uiCheck: true
|
|
22
|
+
uiCheck: true,
|
|
23
|
+
appData: true,
|
|
22
24
|
}
|
|
23
25
|
}, options || {});
|
|
24
26
|
if (opt.launcher)
|
|
25
27
|
use_1.use.call(this, plugin_launcher_1.default, opt.launcher || {});
|
|
28
|
+
if (opt.plugin.appData)
|
|
29
|
+
use_1.use.call(this, plugin_appdata_1.default, opt.plugin.appData || {});
|
|
26
30
|
if (opt.plugin.network)
|
|
27
31
|
use_1.use.call(this, plugin_network_1.default, opt.plugin.network || {});
|
|
28
32
|
if (opt.plugin.error)
|
package/dist/api/rule.js
CHANGED
|
@@ -23,7 +23,15 @@ function addFormRule(rule, options) {
|
|
|
23
23
|
: Array.from(new Set(customGroup.concat(group_2.DEFAULT_GROUP.ALL)));
|
|
24
24
|
}
|
|
25
25
|
else if ((0, simple_type_function_1.isStr)(customGroup)) {
|
|
26
|
-
customGroup = [group_2.DEFAULT_GROUP.ALL, customGroup];
|
|
26
|
+
customGroup = Array.from(new Set([group_2.DEFAULT_GROUP.ALL, customGroup]));
|
|
27
|
+
}
|
|
28
|
+
else if ((0, simple_type_function_1.isObj)(customGroup)) {
|
|
29
|
+
if (customGroup.private) {
|
|
30
|
+
customGroup = [customGroup.name];
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
customGroup = Array.from(new Set([group_2.DEFAULT_GROUP.ALL, customGroup.name]));
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
else {
|
|
29
37
|
customGroup = defaultGroup;
|
package/dist/types.d.ts
CHANGED
|
@@ -56,8 +56,12 @@ export type WxKey = keyof WechatMiniprogram.Wx;
|
|
|
56
56
|
export type GetBridgeInfoFunc = ((key: string, callback: (...args: any[]) => any) => void) & {
|
|
57
57
|
hasEventBind?: boolean;
|
|
58
58
|
};
|
|
59
|
+
export type IFormRuleGroup = {
|
|
60
|
+
name: string;
|
|
61
|
+
private?: boolean;
|
|
62
|
+
} | string | string[];
|
|
59
63
|
export interface IAddFormRuleOption {
|
|
60
|
-
group?:
|
|
64
|
+
group?: IFormRuleGroup;
|
|
61
65
|
}
|
|
62
66
|
export interface IWedebugInitOption {
|
|
63
67
|
launcher?: IAnyObject;
|
|
@@ -66,6 +70,7 @@ export interface IWedebugInitOption {
|
|
|
66
70
|
error?: IAnyObject;
|
|
67
71
|
router?: IAnyObject;
|
|
68
72
|
uiCheck?: IAnyObject;
|
|
73
|
+
appData?: IAnyObject;
|
|
69
74
|
};
|
|
70
75
|
}
|
|
71
76
|
export interface IPluginInstance<T extends IAnyObject = IAnyObject> {
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@we-debug/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "a useful debug tool for weapp",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "dlhandsome"
|
|
@@ -24,11 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@we-debug/plugin-
|
|
28
|
-
"@we-debug/plugin-
|
|
29
|
-
"@we-debug/plugin-
|
|
30
|
-
"@we-debug/plugin-
|
|
31
|
-
"@we-debug/plugin-
|
|
27
|
+
"@we-debug/plugin-appdata": "0.40.0",
|
|
28
|
+
"@we-debug/plugin-error": "0.40.0",
|
|
29
|
+
"@we-debug/plugin-launcher": "0.40.0",
|
|
30
|
+
"@we-debug/plugin-network": "0.40.0",
|
|
31
|
+
"@we-debug/plugin-router": "0.40.0",
|
|
32
|
+
"@we-debug/plugin-ui-check": "0.40.0",
|
|
32
33
|
"deepmerge": "^4.2.2"
|
|
33
34
|
},
|
|
34
35
|
"readme": "ERROR: No README data found!",
|
|
@@ -38,5 +39,5 @@
|
|
|
38
39
|
"@types/jest": "^29.5.11",
|
|
39
40
|
"ts-jest": "^29.1.1"
|
|
40
41
|
},
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ed3faec0025d32e4e91cc281401f9e580430b967"
|
|
42
43
|
}
|