@we-debug/core 0.37.3 → 0.38.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.38.0](https://github.com/dlhandsome/we-debug/compare/v0.37.4...v0.38.0) (2025-03-07)
7
+
8
+
9
+ ### Features
10
+
11
+ * support private rule group ([7e3804f](https://github.com/dlhandsome/we-debug/commit/7e3804f49899882203c8456a1ea76b77581cc8b2))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.37.4](https://github.com/dlhandsome/we-debug/compare/v0.37.3...v0.37.4) (2025-03-07)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * fixed remove rule ([e3d6e69](https://github.com/dlhandsome/we-debug/commit/e3d6e69e0719f62f942590017f1692dcb1f9b192))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [0.37.3](https://github.com/dlhandsome/we-debug/compare/v0.37.2...v0.37.3) (2025-02-19)
7
29
 
8
30
  **Note:** Version bump only for package @we-debug/core
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;
@@ -37,7 +37,8 @@ var Group = (function (_super) {
37
37
  }
38
38
  };
39
39
  Group.prototype.remove = function (k, rule) {
40
- var rules = this.get(k);
40
+ var _a;
41
+ var rules = (_a = this.get(k)) === null || _a === void 0 ? void 0 : _a.get();
41
42
  if (!rules) {
42
43
  return;
43
44
  }
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?: string | string[];
64
+ group?: IFormRuleGroup;
61
65
  }
62
66
  export interface IWedebugInitOption {
63
67
  launcher?: IAnyObject;
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = "0.37.3";
4
+ exports.version = "0.38.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@we-debug/core",
3
- "version": "0.37.3",
3
+ "version": "0.38.0",
4
4
  "description": "a useful debug tool for weapp",
5
5
  "author": {
6
6
  "name": "dlhandsome"
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
- "@we-debug/plugin-error": "0.37.0",
28
- "@we-debug/plugin-launcher": "0.37.0",
29
- "@we-debug/plugin-network": "0.37.0",
30
- "@we-debug/plugin-router": "0.37.0",
31
- "@we-debug/plugin-ui-check": "0.37.3",
27
+ "@we-debug/plugin-error": "0.38.0",
28
+ "@we-debug/plugin-launcher": "0.38.0",
29
+ "@we-debug/plugin-network": "0.38.0",
30
+ "@we-debug/plugin-router": "0.38.0",
31
+ "@we-debug/plugin-ui-check": "0.38.0",
32
32
  "deepmerge": "^4.2.2"
33
33
  },
34
34
  "readme": "ERROR: No README data found!",
@@ -38,5 +38,5 @@
38
38
  "@types/jest": "^29.5.11",
39
39
  "ts-jest": "^29.1.1"
40
40
  },
41
- "gitHead": "1c8e7a826248f1ffc767534995c763f03edd22de"
41
+ "gitHead": "b6927f2b298277d27eb5897a755d5050b6add733"
42
42
  }