@ocap/indexdb-memory 1.30.24 → 1.30.26
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/esm/db/base.mjs +14 -2
- package/esm/db/index.d.mts +1 -0
- package/esm/db/index.mjs +1 -0
- package/lib/db/base.cjs +14 -2
- package/lib/db/index.cjs +1 -0
- package/lib/db/index.d.cts +1 -0
- package/package.json +6 -5
package/esm/db/base.mjs
CHANGED
|
@@ -59,7 +59,14 @@ var LocalBaseIndexDB = class extends BaseIndexDB {
|
|
|
59
59
|
const { tokenFactories = [] } = tokenFactoryFilter;
|
|
60
60
|
const pagination = formatPagination({
|
|
61
61
|
paging,
|
|
62
|
-
defaultSortField: "time"
|
|
62
|
+
defaultSortField: "time",
|
|
63
|
+
supportedSortFields: [
|
|
64
|
+
"genesisTime",
|
|
65
|
+
"renaissanceTime",
|
|
66
|
+
"time",
|
|
67
|
+
"sender",
|
|
68
|
+
"receiver"
|
|
69
|
+
]
|
|
63
70
|
});
|
|
64
71
|
debug("listTransactions", {
|
|
65
72
|
sender,
|
|
@@ -127,7 +134,12 @@ var LocalBaseIndexDB = class extends BaseIndexDB {
|
|
|
127
134
|
const { ownerAddress, factoryAddress, paging, timeFilter = {} } = params;
|
|
128
135
|
const pagination = formatPagination({
|
|
129
136
|
paging,
|
|
130
|
-
defaultSortField: "renaissanceTime"
|
|
137
|
+
defaultSortField: "renaissanceTime",
|
|
138
|
+
supportedSortFields: [
|
|
139
|
+
"genesisTime",
|
|
140
|
+
"renaissanceTime",
|
|
141
|
+
"address"
|
|
142
|
+
]
|
|
131
143
|
});
|
|
132
144
|
const query = getCollection(this.asset).chain();
|
|
133
145
|
if (ownerAddress) {
|
package/esm/db/index.d.mts
CHANGED
|
@@ -21,6 +21,7 @@ declare class MemoryIndexDB extends LocalBaseIndexDB implements IIndexDB {
|
|
|
21
21
|
rollupValidator: IIndexTable<IndexTableTypeMap['rollupValidator']>;
|
|
22
22
|
tokenDistribution: IIndexTable<IndexTableTypeMap['tokenDistribution']>;
|
|
23
23
|
tokenFactory: IIndexTable<IndexTableTypeMap['tokenFactory']>;
|
|
24
|
+
indexFailure: IIndexTable<IndexTableTypeMap['indexFailure']>;
|
|
24
25
|
constructor();
|
|
25
26
|
close(): Promise<void>;
|
|
26
27
|
}
|
package/esm/db/index.mjs
CHANGED
|
@@ -28,6 +28,7 @@ var MemoryIndexDB = class extends base_default$1 {
|
|
|
28
28
|
this.tokenDistribution = new base_default("tokenDistribution", "tokenAddress", this.db);
|
|
29
29
|
this.balance = new base_default("balance", ["address", "tokenAddress"], this.db);
|
|
30
30
|
this.tokenFactory = new base_default("tokenFactory", "address", this.db);
|
|
31
|
+
this.indexFailure = new base_default("indexFailure", "id", this.db);
|
|
31
32
|
this.attachReadyListeners();
|
|
32
33
|
}
|
|
33
34
|
async close() {}
|
package/lib/db/base.cjs
CHANGED
|
@@ -63,7 +63,14 @@ var LocalBaseIndexDB = class extends _ocap_indexdb.BaseIndexDB {
|
|
|
63
63
|
const { tokenFactories = [] } = tokenFactoryFilter;
|
|
64
64
|
const pagination = (0, _ocap_indexdb.formatPagination)({
|
|
65
65
|
paging,
|
|
66
|
-
defaultSortField: "time"
|
|
66
|
+
defaultSortField: "time",
|
|
67
|
+
supportedSortFields: [
|
|
68
|
+
"genesisTime",
|
|
69
|
+
"renaissanceTime",
|
|
70
|
+
"time",
|
|
71
|
+
"sender",
|
|
72
|
+
"receiver"
|
|
73
|
+
]
|
|
67
74
|
});
|
|
68
75
|
debug$1("listTransactions", {
|
|
69
76
|
sender,
|
|
@@ -131,7 +138,12 @@ var LocalBaseIndexDB = class extends _ocap_indexdb.BaseIndexDB {
|
|
|
131
138
|
const { ownerAddress, factoryAddress, paging, timeFilter = {} } = params;
|
|
132
139
|
const pagination = (0, _ocap_indexdb.formatPagination)({
|
|
133
140
|
paging,
|
|
134
|
-
defaultSortField: "renaissanceTime"
|
|
141
|
+
defaultSortField: "renaissanceTime",
|
|
142
|
+
supportedSortFields: [
|
|
143
|
+
"genesisTime",
|
|
144
|
+
"renaissanceTime",
|
|
145
|
+
"address"
|
|
146
|
+
]
|
|
135
147
|
});
|
|
136
148
|
const query = getCollection(this.asset).chain();
|
|
137
149
|
if (ownerAddress) {
|
package/lib/db/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var MemoryIndexDB = class extends require_db_base.default {
|
|
|
31
31
|
this.tokenDistribution = new require_table_base.default("tokenDistribution", "tokenAddress", this.db);
|
|
32
32
|
this.balance = new require_table_base.default("balance", ["address", "tokenAddress"], this.db);
|
|
33
33
|
this.tokenFactory = new require_table_base.default("tokenFactory", "address", this.db);
|
|
34
|
+
this.indexFailure = new require_table_base.default("indexFailure", "id", this.db);
|
|
34
35
|
this.attachReadyListeners();
|
|
35
36
|
}
|
|
36
37
|
async close() {}
|
package/lib/db/index.d.cts
CHANGED
|
@@ -21,6 +21,7 @@ declare class MemoryIndexDB extends LocalBaseIndexDB implements IIndexDB {
|
|
|
21
21
|
rollupValidator: IIndexTable<IndexTableTypeMap['rollupValidator']>;
|
|
22
22
|
tokenDistribution: IIndexTable<IndexTableTypeMap['tokenDistribution']>;
|
|
23
23
|
tokenFactory: IIndexTable<IndexTableTypeMap['tokenFactory']>;
|
|
24
|
+
indexFailure: IIndexTable<IndexTableTypeMap['indexFailure']>;
|
|
24
25
|
constructor();
|
|
25
26
|
close(): Promise<void>;
|
|
26
27
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/indexdb-memory",
|
|
3
3
|
"description": "OCAP indexdb adapter that uses memory as backend, just for test purpose",
|
|
4
|
-
"version": "1.30.
|
|
4
|
+
"version": "1.30.26",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
|
|
7
7
|
"bugs": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"wangshijun <shijun@arcblock.io> (https://www.arcblock.io)"
|
|
16
16
|
],
|
|
17
17
|
"devDependencies": {
|
|
18
|
+
"@ocap/indexdb-test": "1.30.26",
|
|
18
19
|
"@types/debug": "^4.1.12",
|
|
19
20
|
"@types/lodash": "^4.17.10",
|
|
20
21
|
"@types/lokijs": "^1.5.14",
|
|
@@ -78,10 +79,10 @@
|
|
|
78
79
|
},
|
|
79
80
|
"gitHead": "87990c8b5e215107fc587c1ced0d6b3e2cd2483e",
|
|
80
81
|
"dependencies": {
|
|
81
|
-
"@arcblock/did": "1.30.
|
|
82
|
-
"@ocap/indexdb": "1.30.
|
|
83
|
-
"@ocap/types": "1.30.
|
|
84
|
-
"@ocap/util": "1.30.
|
|
82
|
+
"@arcblock/did": "1.30.26",
|
|
83
|
+
"@ocap/indexdb": "1.30.26",
|
|
84
|
+
"@ocap/types": "1.30.26",
|
|
85
|
+
"@ocap/util": "1.30.26",
|
|
85
86
|
"debug": "^4.4.3",
|
|
86
87
|
"lodash": "^4.17.23",
|
|
87
88
|
"lokijs": "^1.5.12"
|