@statezero/core 0.2.49 → 0.2.50
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.
|
@@ -83,6 +83,7 @@ export function ModelAdaptor(modelInstance, reactivityFn = reactive) {
|
|
|
83
83
|
const modelPk = model[pkField];
|
|
84
84
|
// Check if this model's pk is in the event's pks array
|
|
85
85
|
if (eventData.pks && eventData.pks.includes(modelPk)) {
|
|
86
|
+
console.log(`[sz] model update: ${modelName} pk=${modelPk}`);
|
|
86
87
|
if (isRef) {
|
|
87
88
|
wrapper.value.touch();
|
|
88
89
|
}
|
|
@@ -124,6 +125,7 @@ export function QuerySetAdaptor(liveQuerySet, reactivityFn = reactive) {
|
|
|
124
125
|
// Handler bumps version to trigger Vue reactivity when this queryset updates
|
|
125
126
|
const renderHandler = (eventData) => {
|
|
126
127
|
if (eventData && eventData.ast && isEqual(querysetAst, eventData.ast)) {
|
|
128
|
+
console.log(`[sz] queryset update: ${modelName}`, { count: liveQuerySet.length, version: wrapper.__version + 1 });
|
|
127
129
|
if (reactivityFn === ref) {
|
|
128
130
|
wrapper.value = [...liveQuerySet];
|
|
129
131
|
}
|
|
@@ -170,6 +172,7 @@ export function MetricAdaptor(metric) {
|
|
|
170
172
|
eventData.field === metric.field &&
|
|
171
173
|
eventData.ast === hash(querysetAst) &&
|
|
172
174
|
eventData.valueChanged === true) {
|
|
175
|
+
console.log(`[sz] metric update: ${modelName}.${metric.field} (${metric.metricType}) =`, metric.value);
|
|
173
176
|
// Update the wrapper value with the latest metric value
|
|
174
177
|
wrapper.value = metric.value;
|
|
175
178
|
}
|
package/package.json
CHANGED