@base-framework/base 3.6.4 → 3.6.5

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.
@@ -6,6 +6,11 @@
6
6
  * @class
7
7
  */
8
8
  export class Publisher {
9
+ /**
10
+ * Depth limit for nested object publishing to prevent infinite recursion
11
+ * @type {number}
12
+ */
13
+ static MAX_DEPTH: number;
9
14
  /**
10
15
  * This will publish deep data.
11
16
  *
@@ -22,9 +27,11 @@ export class Publisher {
22
27
  * @param {string} pathString
23
28
  * @param {*} obj
24
29
  * @param {function} callBack
30
+ * @param {?WeakSet} [seen] - Set of seen objects to detect circular refs
31
+ * @param {number} [depth] - Current recursion depth
25
32
  * @returns {void}
26
33
  */
27
- static publish(pathString: string, obj: any, callBack: Function): void;
34
+ static publish(pathString: string, obj: any, callBack: Function, seen?: WeakSet<any> | null, depth?: number): void;
28
35
  /**
29
36
  * This will publish an array to the data binder.
30
37
  *
@@ -32,9 +39,11 @@ export class Publisher {
32
39
  * @param {string} pathString
33
40
  * @param {Array<any>} obj
34
41
  * @param {function} callBack
42
+ * @param {WeakSet} seen - Set of seen objects
43
+ * @param {number} depth - Current recursion depth
35
44
  * @returns {void}
36
45
  */
37
- protected static publishArray(pathString: string, obj: Array<any>, callBack: Function): void;
46
+ protected static publishArray(pathString: string, obj: Array<any>, callBack: Function, seen: WeakSet<any>, depth: number): void;
38
47
  /**
39
48
  * This will publish an object to the data binder.
40
49
  *
@@ -42,9 +51,11 @@ export class Publisher {
42
51
  * @param {string} pathString
43
52
  * @param {object} obj
44
53
  * @param {function} callBack
54
+ * @param {WeakSet} seen - Set of seen objects
55
+ * @param {number} depth - Current recursion depth
45
56
  * @returns {void}
46
57
  */
47
- protected static publishObject(pathString: string, obj: object, callBack: Function): void;
58
+ protected static publishObject(pathString: string, obj: object, callBack: Function, seen: WeakSet<any>, depth: number): void;
48
59
  /**
49
60
  * This will check if the value is an object and publish
50
61
  * the value or the object.
@@ -53,7 +64,9 @@ export class Publisher {
53
64
  * @param {string} subPath
54
65
  * @param {*} val
55
66
  * @param {function} callBack
67
+ * @param {WeakSet} seen - Set of seen objects
68
+ * @param {number} depth - Current recursion depth
56
69
  * @returns {void}
57
70
  */
58
- protected static _checkPublish(subPath: string, val: any, callBack: Function): void;
71
+ protected static _checkPublish(subPath: string, val: any, callBack: Function, seen: WeakSet<any>, depth: number): void;
59
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.6.4",
3
+ "version": "3.6.5",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",