@interncom/diplomatic 0.0.46 → 0.0.48

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.
Files changed (2) hide show
  1. package/dist/index.mjs +13 -4
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -11714,11 +11714,13 @@ __export(entityDB_exports, {
11714
11714
  db: () => db2,
11715
11715
  entityTableName: () => entityTableName,
11716
11716
  stateManager: () => stateManager,
11717
+ typeGroupIndexName: () => typeGroupIndexName,
11717
11718
  typeIndexName: () => typeIndexName
11718
11719
  });
11719
11720
  var entityTableName = "entities";
11720
11721
  var typeIndexName = "entity_type_created_at";
11721
- var db2 = await openDB("db", 6, {
11722
+ var typeGroupIndexName = "entity_type_group_id";
11723
+ var db2 = await openDB("db", 7, {
11722
11724
  upgrade(db3, prevVersion, currVersion, tx) {
11723
11725
  if (!db3.objectStoreNames.contains(entityTableName)) {
11724
11726
  const store2 = db3.createObjectStore(entityTableName, {
@@ -11727,9 +11729,16 @@ var db2 = await openDB("db", 6, {
11727
11729
  });
11728
11730
  }
11729
11731
  const store = tx.objectStore(entityTableName);
11730
- store.createIndex("entity_type_created_at", ["type", "createdAt"], {
11731
- unique: false
11732
- });
11732
+ if (!store.indexNames.contains(typeIndexName)) {
11733
+ store.createIndex(typeIndexName, ["type", "createdAt"], {
11734
+ unique: false
11735
+ });
11736
+ }
11737
+ if (!store.indexNames.contains(typeGroupIndexName)) {
11738
+ store.createIndex(typeGroupIndexName, ["type", "gid"], {
11739
+ unique: false
11740
+ });
11741
+ }
11733
11742
  }
11734
11743
  });
11735
11744
  var applier = async (op) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interncom/diplomatic",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "type": "module",
5
5
  "description": "Secure sync layer",
6
6
  "main": "dist/index.mjs",