@milaboratories/pl-tree 1.3.18 → 1.4.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/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -48
- package/dist/index.mjs.map +1 -1
- package/dist/state.d.ts +7 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/sync.d.ts +1 -0
- package/dist/sync.d.ts.map +1 -1
- package/dist/synchronized_tree.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/state.ts +11 -0
- package/src/sync.ts +4 -0
- package/src/synchronized_tree.ts +8 -1
package/src/synchronized_tree.ts
CHANGED
|
@@ -213,7 +213,14 @@ export class SynchronizedTreeState {
|
|
|
213
213
|
logger?: MiLogger
|
|
214
214
|
) {
|
|
215
215
|
const tree = new SynchronizedTreeState(pl, root, ops, logger);
|
|
216
|
-
|
|
216
|
+
|
|
217
|
+
let stat = ops.logStat ? initialTreeLoadingStat() : undefined;
|
|
218
|
+
|
|
219
|
+
await tree.refresh(stat);
|
|
220
|
+
|
|
221
|
+
// logging stats if we were asked to (even if error occured)
|
|
222
|
+
if (stat && logger) logger.info(`Tree stat (initial load): ${JSON.stringify(stat)}`);
|
|
223
|
+
|
|
217
224
|
return tree;
|
|
218
225
|
}
|
|
219
226
|
}
|