@acala-network/chopsticks-testing 1.0.6-1 → 1.0.6

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/dist/cjs/check.js CHANGED
@@ -252,12 +252,15 @@ function redact(value) {
252
252
  }
253
253
  return '(number)';
254
254
  };
255
- const process = (obj)=>{
255
+ const process = (obj, depth)=>{
256
+ if (depth <= 0) {
257
+ return obj;
258
+ }
256
259
  if (obj == null) {
257
260
  return obj;
258
261
  }
259
262
  if (Array.isArray(obj)) {
260
- return obj.map(process);
263
+ return obj.map((x)=>process(x, depth - 1));
261
264
  }
262
265
  if (redactNumber && typeof obj === 'number') {
263
266
  return processNumber(obj);
@@ -298,13 +301,13 @@ function redact(value) {
298
301
  }
299
302
  return [
300
303
  k,
301
- process(v)
304
+ process(v, depth - 1)
302
305
  ];
303
306
  }));
304
307
  }
305
308
  return obj;
306
309
  };
307
- return process(value);
310
+ return process(value, 50);
308
311
  }
309
312
  const withExpect = (expectFn)=>{
310
313
  /**
package/dist/esm/check.js CHANGED
@@ -111,12 +111,15 @@
111
111
  }
112
112
  return '(number)';
113
113
  };
114
- const process = (obj)=>{
114
+ const process = (obj, depth)=>{
115
+ if (depth <= 0) {
116
+ return obj;
117
+ }
115
118
  if (obj == null) {
116
119
  return obj;
117
120
  }
118
121
  if (Array.isArray(obj)) {
119
- return obj.map(process);
122
+ return obj.map((x)=>process(x, depth - 1));
120
123
  }
121
124
  if (redactNumber && typeof obj === 'number') {
122
125
  return processNumber(obj);
@@ -157,13 +160,13 @@
157
160
  }
158
161
  return [
159
162
  k,
160
- process(v)
163
+ process(v, depth - 1)
161
164
  ];
162
165
  }));
163
166
  }
164
167
  return obj;
165
168
  };
166
- return process(value);
169
+ return process(value, 50);
167
170
  }
168
171
  /**
169
172
  * Add a transformation function to the processing pipeline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-testing",
3
- "version": "1.0.6-1",
3
+ "version": "1.0.6",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "depcheck": "npx depcheck"
14
14
  },
15
15
  "dependencies": {
16
- "@acala-network/chopsticks-utils": "1.0.6-1",
16
+ "@acala-network/chopsticks-utils": "1.0.6",
17
17
  "@polkadot/api": "^15.7.1",
18
18
  "@polkadot/types": "^15.7.1"
19
19
  },