@interncom/diplomatic 0.0.63 → 0.0.64
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/entityDB.d.ts +2 -0
- package/dist/index.mjs +9 -2
- package/package.json +1 -1
package/dist/entityDB.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { type EntityID, type GroupID } from "./shared/types";
|
|
|
4
4
|
import { StateManager } from "./state";
|
|
5
5
|
export declare const entityTableName = "entities";
|
|
6
6
|
export declare const typeIndexName = "entity_type_created_at";
|
|
7
|
+
export declare const typeUpdatedAtIndexName = "entity_type_updated_at";
|
|
7
8
|
export declare const typeGroupIndexName = "entity_type_group_id";
|
|
8
9
|
export declare const typeParentIndexName = "entity_type_parent_id";
|
|
9
10
|
export interface IEntity<T> {
|
|
@@ -21,6 +22,7 @@ interface IEntityDB extends DBSchema {
|
|
|
21
22
|
value: IEntity<unknown>;
|
|
22
23
|
indexes: {
|
|
23
24
|
[typeIndexName]: [string, Date];
|
|
25
|
+
[typeUpdatedAtIndexName]: [string, Date];
|
|
24
26
|
[typeGroupIndexName]: [string, GroupID];
|
|
25
27
|
[typeParentIndexName]: [string, EntityID];
|
|
26
28
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -11773,13 +11773,15 @@ __export(entityDB_exports, {
|
|
|
11773
11773
|
stateManager: () => stateManager,
|
|
11774
11774
|
typeGroupIndexName: () => typeGroupIndexName,
|
|
11775
11775
|
typeIndexName: () => typeIndexName,
|
|
11776
|
-
typeParentIndexName: () => typeParentIndexName
|
|
11776
|
+
typeParentIndexName: () => typeParentIndexName,
|
|
11777
|
+
typeUpdatedAtIndexName: () => typeUpdatedAtIndexName
|
|
11777
11778
|
});
|
|
11778
11779
|
var entityTableName = "entities";
|
|
11779
11780
|
var typeIndexName = "entity_type_created_at";
|
|
11781
|
+
var typeUpdatedAtIndexName = "entity_type_updated_at";
|
|
11780
11782
|
var typeGroupIndexName = "entity_type_group_id";
|
|
11781
11783
|
var typeParentIndexName = "entity_type_parent_id";
|
|
11782
|
-
var db2 = await openDB("db",
|
|
11784
|
+
var db2 = await openDB("db", 10, {
|
|
11783
11785
|
upgrade(db3, prevVersion, currVersion, tx) {
|
|
11784
11786
|
if (!db3.objectStoreNames.contains(entityTableName)) {
|
|
11785
11787
|
const store2 = db3.createObjectStore(entityTableName, {
|
|
@@ -11793,6 +11795,11 @@ var db2 = await openDB("db", 9, {
|
|
|
11793
11795
|
unique: false
|
|
11794
11796
|
});
|
|
11795
11797
|
}
|
|
11798
|
+
if (!store.indexNames.contains(typeUpdatedAtIndexName)) {
|
|
11799
|
+
store.createIndex(typeUpdatedAtIndexName, ["type", "updatedAt"], {
|
|
11800
|
+
unique: false
|
|
11801
|
+
});
|
|
11802
|
+
}
|
|
11796
11803
|
if (!store.indexNames.contains(typeGroupIndexName)) {
|
|
11797
11804
|
store.createIndex(typeGroupIndexName, ["type", "gid"], {
|
|
11798
11805
|
unique: false
|