@verdant-web/store 3.9.0-next.1 → 3.9.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/bundle/index.js +3 -3
- package/dist/bundle/index.js.map +2 -2
- package/dist/esm/client/Client.js +5 -5
- package/dist/esm/client/Client.js.map +1 -1
- package/dist/esm/client/ClientDescriptor.d.ts +1 -1
- package/dist/esm/client/ClientDescriptor.js.map +1 -1
- package/dist/esm/context.d.ts +1 -1
- package/dist/esm/entities/Entity.js +0 -4
- package/dist/esm/entities/Entity.js.map +1 -1
- package/dist/esm/metadata/Metadata.js +2 -2
- package/dist/esm/metadata/Metadata.js.map +1 -1
- package/dist/esm/migration/migrations.js +1 -1
- package/dist/esm/migration/migrations.js.map +1 -1
- package/dist/esm/sync/Sync.js +1 -1
- package/dist/esm/sync/Sync.js.map +1 -1
- package/package.json +2 -2
- package/src/client/Client.ts +5 -3
- package/src/client/ClientDescriptor.ts +4 -1
- package/src/context.ts +4 -1
- package/src/entities/Entity.ts +0 -9
- package/src/metadata/Metadata.ts +2 -2
- package/src/migration/migrations.ts +5 -2
- package/src/sync/Sync.ts +1 -1
package/src/entities/Entity.ts
CHANGED
|
@@ -540,7 +540,6 @@ export class Entity<
|
|
|
540
540
|
// emit deepchange, too
|
|
541
541
|
this.deepChange(this, ev);
|
|
542
542
|
// emit the change, it's for us
|
|
543
|
-
this.ctx.log('Emitting change event', this.oid);
|
|
544
543
|
this.emit('change', { isLocal: ev.isLocal });
|
|
545
544
|
}
|
|
546
545
|
};
|
|
@@ -548,7 +547,6 @@ export class Entity<
|
|
|
548
547
|
// chain deepChanges to parents
|
|
549
548
|
this.deepChange(this, ev);
|
|
550
549
|
// emit the change, it's for us
|
|
551
|
-
this.ctx.log('Emitting change event', this.oid);
|
|
552
550
|
this.emit('change', { isLocal: ev.isLocal });
|
|
553
551
|
};
|
|
554
552
|
protected deepChange = (target: Entity, ev: EntityChange) => {
|
|
@@ -558,13 +556,6 @@ export class Entity<
|
|
|
558
556
|
// reset this flag to recompute snapshot data - children
|
|
559
557
|
// or self has changed. new pruning needs to happen.
|
|
560
558
|
this.cachedView = undefined;
|
|
561
|
-
this.ctx.log(
|
|
562
|
-
'debug',
|
|
563
|
-
'Deep change detected at',
|
|
564
|
-
this.oid,
|
|
565
|
-
'reset cached view',
|
|
566
|
-
);
|
|
567
|
-
this.ctx.log('debug', 'Emitting deep change event', this.oid);
|
|
568
559
|
this.emit('changeDeep', target, ev);
|
|
569
560
|
this.parent?.deepChange(target, ev);
|
|
570
561
|
};
|
package/src/metadata/Metadata.ts
CHANGED
|
@@ -380,7 +380,7 @@ export class Metadata extends EventSubscriber<{
|
|
|
380
380
|
opts?: { transaction?: IDBTransaction },
|
|
381
381
|
) => {
|
|
382
382
|
if (baselines.length === 0) return [];
|
|
383
|
-
this.log(`Inserting ${baselines.length} remote baselines`);
|
|
383
|
+
this.log('debug', `Inserting ${baselines.length} remote baselines`);
|
|
384
384
|
|
|
385
385
|
await this.baselines.setAll(baselines, opts);
|
|
386
386
|
|
|
@@ -499,7 +499,7 @@ export class Metadata extends EventSubscriber<{
|
|
|
499
499
|
// including replica Id for testing I guess
|
|
500
500
|
const replicaId = (await this.localReplica.get()).id;
|
|
501
501
|
|
|
502
|
-
this.log('[', replicaId, ']', 'Rebasing', oid, 'up to', upTo);
|
|
502
|
+
this.log('debug', '[', replicaId, ']', 'Rebasing', oid, 'up to', upTo);
|
|
503
503
|
const transaction =
|
|
504
504
|
providedTx ||
|
|
505
505
|
this.createTransaction(['operations', 'baselines'], { write: true });
|
|
@@ -212,7 +212,9 @@ export async function runMigrations({
|
|
|
212
212
|
await closeDatabase(upgradedDatabase);
|
|
213
213
|
|
|
214
214
|
context.log('debug', `Migration of ${namespace} complete.`);
|
|
215
|
-
context.log(
|
|
215
|
+
context.log(
|
|
216
|
+
'info',
|
|
217
|
+
`
|
|
216
218
|
⬆️ v${migration.newSchema.version} Migration complete. Here's the rundown:
|
|
217
219
|
- Added collections: ${migration.addedCollections.join(', ')}
|
|
218
220
|
- Removed collections: ${migration.removedCollections.join(', ')}
|
|
@@ -229,7 +231,8 @@ export async function runMigrations({
|
|
|
229
231
|
)
|
|
230
232
|
.flatMap((i) => i)
|
|
231
233
|
.join(', ')}
|
|
232
|
-
|
|
234
|
+
`,
|
|
235
|
+
);
|
|
233
236
|
}
|
|
234
237
|
});
|
|
235
238
|
}
|
package/src/sync/Sync.ts
CHANGED
|
@@ -367,7 +367,7 @@ export class ServerSync<Presence = any, Profile = any>
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
this.log('sync message', JSON.stringify(message, null, 2));
|
|
370
|
+
this.log('debug', 'sync message', JSON.stringify(message, null, 2));
|
|
371
371
|
switch (message.type) {
|
|
372
372
|
case 'op-re':
|
|
373
373
|
await this.onData({
|