@statezero/core 0.1.16 → 0.1.17
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/setup.js +11 -0
- package/package.json +1 -1
package/dist/setup.js
CHANGED
|
@@ -2,6 +2,9 @@ import { configInstance } from "./config.js";
|
|
|
2
2
|
import { setAdapters } from "./reactiveAdaptor.js";
|
|
3
3
|
import { syncManager } from "./syncEngine/sync.js";
|
|
4
4
|
import { initEventHandler } from "./syncEngine/stores/operationEventHandlers.js";
|
|
5
|
+
import { querysetStoreRegistry } from "./syncEngine/registries/querysetStoreRegistry.js";
|
|
6
|
+
import { modelStoreRegistry } from "./syncEngine/registries/modelStoreRegistry.js";
|
|
7
|
+
import { metricRegistry } from "./syncEngine/registries/metricRegistry.js";
|
|
5
8
|
/**
|
|
6
9
|
* Initialize StateZero with the provided configuration
|
|
7
10
|
*
|
|
@@ -19,4 +22,12 @@ export function setupStateZero(config, getModelClass, adapters) {
|
|
|
19
22
|
setAdapters(adapters.ModelAdaptor, adapters.QuerySetAdaptor, adapters.MetricAdaptor);
|
|
20
23
|
initEventHandler();
|
|
21
24
|
syncManager.initialize();
|
|
25
|
+
// Expose registries and sync manager for devtools de
|
|
26
|
+
if (typeof window !== "undefined") {
|
|
27
|
+
window.__STATEZERO_DEVTOOLS__ = {
|
|
28
|
+
querysetStoreRegistry,
|
|
29
|
+
modelStoreRegistry,
|
|
30
|
+
metricRegistry,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
22
33
|
}
|
package/package.json
CHANGED