@terascope/elasticsearch-api 4.9.2 → 4.10.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/package.json +12 -12
- package/test/api-spec.js +8 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terascope/elasticsearch-api",
|
|
3
3
|
"displayName": "Elasticsearch API",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.10.0",
|
|
5
5
|
"description": "Elasticsearch client api used across multiple services, handles retries and exponential backoff",
|
|
6
6
|
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-api#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"main": "index.js",
|
|
15
15
|
"typings": "types/index.d.ts",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"test": "TEST_RESTRAINED_ELASTICSEARCH='true'
|
|
18
|
-
"test:debug": "TEST_RESTRAINED_ELASTICSEARCH='true'
|
|
19
|
-
"test:elasticsearch6": "TEST_RESTRAINED_ELASTICSEARCH='true' ELASTICSEARCH_VERSION='6.8.6'
|
|
20
|
-
"test:elasticsearch7": "TEST_RESTRAINED_ELASTICSEARCH='true' ELASTICSEARCH_VERSION='7.9.3'
|
|
21
|
-
"test:elasticsearch8": "TEST_RESTRAINED_ELASTICSEARCH='true' ELASTICSEARCH_VERSION='8.1.2'
|
|
22
|
-
"test:opensearch1": "TEST_RESTRAINED_OPENSEARCH='true'
|
|
23
|
-
"test:opensearch2": "TEST_RESTRAINED_OPENSEARCH='true' OPENSEARCH_VERSION='2.15.0'
|
|
24
|
-
"test:watch": "TEST_RESTRAINED_ELASTICSEARCH='true'
|
|
17
|
+
"test": "TEST_RESTRAINED_ELASTICSEARCH='true' node ../scripts/bin/ts-scripts test ../elasticsearch-api --",
|
|
18
|
+
"test:debug": "TEST_RESTRAINED_ELASTICSEARCH='true' node ../scripts/bin/ts-scripts test --debug ../elasticsearch-api --",
|
|
19
|
+
"test:elasticsearch6": "TEST_RESTRAINED_ELASTICSEARCH='true' ELASTICSEARCH_VERSION='6.8.6' node ../scripts/bin/ts-scripts test ../elasticsearch-api --",
|
|
20
|
+
"test:elasticsearch7": "TEST_RESTRAINED_ELASTICSEARCH='true' ELASTICSEARCH_VERSION='7.9.3' node ../scripts/bin/ts-scripts test ../elasticsearch-api --",
|
|
21
|
+
"test:elasticsearch8": "TEST_RESTRAINED_ELASTICSEARCH='true' ELASTICSEARCH_VERSION='8.1.2' node ../scripts/bin/ts-scripts test ../elasticsearch-api --",
|
|
22
|
+
"test:opensearch1": "TEST_RESTRAINED_OPENSEARCH='true' node ../scripts/bin/ts-scripts test --debug ../elasticsearch-api --",
|
|
23
|
+
"test:opensearch2": "TEST_RESTRAINED_OPENSEARCH='true' OPENSEARCH_VERSION='2.15.0' node ../scripts/bin/ts-scripts test --debug ../elasticsearch-api --",
|
|
24
|
+
"test:watch": "TEST_RESTRAINED_ELASTICSEARCH='true' node ../scripts/bin/ts-scripts test --watch ../elasticsearch-api --"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@terascope/types": "~1.4.1",
|
|
28
|
-
"@terascope/utils": "~1.
|
|
28
|
+
"@terascope/utils": "~1.9.0",
|
|
29
29
|
"bluebird": "~3.7.2",
|
|
30
30
|
"setimmediate": "~1.0.5"
|
|
31
31
|
},
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@opensearch-project/opensearch": "~1.2.0",
|
|
34
34
|
"@types/elasticsearch": "~5.0.43",
|
|
35
35
|
"elasticsearch": "~15.4.1",
|
|
36
|
-
"elasticsearch-store": "~1.
|
|
36
|
+
"elasticsearch-store": "~1.11.0",
|
|
37
37
|
"elasticsearch6": "npm:@elastic/elasticsearch@~6.8.0",
|
|
38
38
|
"elasticsearch7": "npm:@elastic/elasticsearch@~7.17.0",
|
|
39
39
|
"elasticsearch8": "npm:@elastic/elasticsearch@~8.15.0"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
|
-
"node": ">=
|
|
42
|
+
"node": ">=22.0.0",
|
|
43
43
|
"yarn": ">=1.22.19"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
package/test/api-spec.js
CHANGED
|
@@ -1057,28 +1057,28 @@ describe('elasticsearch-api', () => {
|
|
|
1057
1057
|
const finalResponse4 = makeResponse(goodConfig4, msg1, response2, sort3);
|
|
1058
1058
|
const finalResponse5 = makeResponse(goodConfig2, msg2, response3, sort1);
|
|
1059
1059
|
|
|
1060
|
-
expect(() => api.buildQuery(badOpConfig1, msg1)).
|
|
1060
|
+
expect(() => api.buildQuery(badOpConfig1, msg1)).toThrow(
|
|
1061
1061
|
'if geo_field is specified then the appropriate geo_box or geo_distance query parameters need to be provided as well'
|
|
1062
1062
|
);
|
|
1063
|
-
expect(() => api.buildQuery(badOpConfig2, msg1)).
|
|
1063
|
+
expect(() => api.buildQuery(badOpConfig2, msg1)).toThrow(
|
|
1064
1064
|
'Both geo_box_top_left and geo_box_bottom_right must be provided for a geo bounding box query.'
|
|
1065
1065
|
);
|
|
1066
|
-
expect(() => api.buildQuery(badOpConfig3, msg1)).
|
|
1066
|
+
expect(() => api.buildQuery(badOpConfig3, msg1)).toThrow(
|
|
1067
1067
|
'Both geo_box_top_left and geo_box_bottom_right must be provided for a geo bounding box query.'
|
|
1068
1068
|
);
|
|
1069
|
-
expect(() => api.buildQuery(badOpConfig4, msg1)).
|
|
1069
|
+
expect(() => api.buildQuery(badOpConfig4, msg1)).toThrow(
|
|
1070
1070
|
'Both geo_point and geo_distance must be provided for a geo_point query.'
|
|
1071
1071
|
);
|
|
1072
|
-
expect(() => api.buildQuery(badOpConfig5, msg1)).
|
|
1072
|
+
expect(() => api.buildQuery(badOpConfig5, msg1)).toThrow(
|
|
1073
1073
|
'Both geo_point and geo_distance must be provided for a geo_point query.'
|
|
1074
1074
|
);
|
|
1075
|
-
expect(() => api.buildQuery(badOpConfig6, msg1)).
|
|
1075
|
+
expect(() => api.buildQuery(badOpConfig6, msg1)).toThrow(
|
|
1076
1076
|
'geo_box and geo_distance queries can not be combined.'
|
|
1077
1077
|
);
|
|
1078
|
-
expect(() => api.buildQuery(badOpConfig7, msg1)).
|
|
1078
|
+
expect(() => api.buildQuery(badOpConfig7, msg1)).toThrow(
|
|
1079
1079
|
'bounding box search requires geo_sort_point to be set if any other geo_sort_* parameter is provided'
|
|
1080
1080
|
);
|
|
1081
|
-
expect(() => api.buildQuery(badOpConfig8, msg1)).
|
|
1081
|
+
expect(() => api.buildQuery(badOpConfig8, msg1)).toThrow(
|
|
1082
1082
|
'bounding box search requires geo_sort_point to be set if any other geo_sort_* parameter is provided'
|
|
1083
1083
|
);
|
|
1084
1084
|
|