@ocap/indexdb-elasticsearch 1.17.17 → 1.17.18

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/lib/main.js CHANGED
@@ -1 +1,8 @@
1
+ if (typeof process.env.ES_SHARD_COUNT === 'undefined') {
2
+ process.env.ES_SHARD_COUNT = '1';
3
+ }
4
+ if (typeof process.env.ES_REPLICA_COUNT === 'undefined') {
5
+ process.env.ES_REPLICA_COUNT = '0';
6
+ }
7
+
1
8
  module.exports = require('./db');
@@ -27,8 +27,8 @@ module.exports = () => ({
27
27
  },
28
28
  settings: {
29
29
  index: {
30
- number_of_shards: 1,
31
- number_of_replicas: 0,
30
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
31
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
32
32
  },
33
33
  },
34
34
  });
@@ -31,8 +31,8 @@ module.exports = () => ({
31
31
  },
32
32
  settings: {
33
33
  index: {
34
- number_of_shards: 1,
35
- number_of_replicas: 0,
34
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
35
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
36
36
  },
37
37
  },
38
38
  });
@@ -14,8 +14,8 @@ module.exports = () => ({
14
14
  },
15
15
  settings: {
16
16
  index: {
17
- number_of_shards: 1,
18
- number_of_replicas: 0,
17
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
18
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
19
19
  },
20
20
  },
21
21
  });
@@ -70,8 +70,8 @@ module.exports = () => ({
70
70
  },
71
71
  settings: {
72
72
  index: {
73
- number_of_shards: 1,
74
- number_of_replicas: 0,
73
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
74
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
75
75
  },
76
76
  },
77
77
  });
@@ -47,8 +47,8 @@ module.exports = () => ({
47
47
  },
48
48
  settings: {
49
49
  index: {
50
- number_of_shards: 1,
51
- number_of_replicas: 0,
50
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
51
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
52
52
  },
53
53
  },
54
54
  });
@@ -28,8 +28,8 @@ module.exports = () => ({
28
28
  },
29
29
  settings: {
30
30
  index: {
31
- number_of_shards: 1,
32
- number_of_replicas: 0,
31
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
32
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
33
33
  },
34
34
  },
35
35
  });
@@ -79,8 +79,8 @@ module.exports = () => ({
79
79
  },
80
80
  settings: {
81
81
  index: {
82
- number_of_shards: 1,
83
- number_of_replicas: 0,
82
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
83
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
84
84
  },
85
85
  },
86
86
  });
@@ -36,8 +36,8 @@ module.exports = () => ({
36
36
  },
37
37
  settings: {
38
38
  index: {
39
- number_of_shards: 1,
40
- number_of_replicas: 0,
39
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
40
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
41
41
  },
42
42
  },
43
43
  });
@@ -28,8 +28,8 @@ module.exports = () => ({
28
28
  },
29
29
  settings: {
30
30
  index: {
31
- number_of_shards: 1,
32
- number_of_replicas: 0,
31
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
32
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
33
33
  },
34
34
  },
35
35
  });
package/lib/model/tx.js CHANGED
@@ -89,8 +89,8 @@ module.exports = () => ({
89
89
  },
90
90
  settings: {
91
91
  index: {
92
- number_of_shards: 1,
93
- number_of_replicas: 0,
92
+ number_of_shards: +(process.env.ES_SHARD_COUNT || 1),
93
+ number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0),
94
94
  },
95
95
  },
96
96
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocap/indexdb-elasticsearch",
3
3
  "description": "OCAP indexdb adapter that uses elasticsearch as backend",
4
- "version": "1.17.17",
4
+ "version": "1.17.18",
5
5
  "author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/ArcBlock/asset-chain/issues",
@@ -38,12 +38,12 @@
38
38
  "test": "jest --forceExit --detectOpenHandles",
39
39
  "coverage": "npm run test -- --coverage"
40
40
  },
41
- "gitHead": "6f26710f90588ab9511f88640053ed925c5531f5",
41
+ "gitHead": "103fab8c32e816f494b9a486e27804b91ca290b4",
42
42
  "dependencies": {
43
- "@arcblock/did": "1.17.17",
43
+ "@arcblock/did": "1.17.18",
44
44
  "@elastic/elasticsearch": "7.13.0",
45
- "@ocap/indexdb": "1.17.17",
46
- "@ocap/util": "1.17.17",
45
+ "@ocap/indexdb": "1.17.18",
46
+ "@ocap/util": "1.17.18",
47
47
  "axios": "^0.25.0",
48
48
  "bn.js": "^5.2.1",
49
49
  "debug": "^4.3.4",