@sebspark/opensearch 0.3.0 → 0.3.1
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/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -2
- package/dist/index.mjs +2 -1
- package/package.json +3 -5
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(src_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(src_exports);
|
|
36
36
|
|
|
37
37
|
// src/openSearchHelper.ts
|
|
38
|
-
var
|
|
38
|
+
var import_node_assert = __toESM(require("assert"));
|
|
39
39
|
|
|
40
40
|
// src/fixIds.ts
|
|
41
41
|
var import_omit = __toESM(require("omit"));
|
|
@@ -44,6 +44,7 @@ var fixIds = (searchQuery) => {
|
|
|
44
44
|
const { query: q, _source, from, size, sort } = searchQuery.body;
|
|
45
45
|
const body = {
|
|
46
46
|
query: {
|
|
47
|
+
ids: q.ids,
|
|
47
48
|
bool: q.bool ? fixBool(q.bool) : void 0,
|
|
48
49
|
match: q.match ? fixId(q.match) : void 0,
|
|
49
50
|
collapse: q.collapse,
|
|
@@ -180,7 +181,7 @@ var isLeafNode = (obj) => {
|
|
|
180
181
|
(value) => typeof value === "object" && value !== null && !Array.isArray(value)
|
|
181
182
|
);
|
|
182
183
|
};
|
|
183
|
-
(0,
|
|
184
|
+
(0, import_node_assert.default)(
|
|
184
185
|
isLeafNode({
|
|
185
186
|
type: "nested",
|
|
186
187
|
properties: { name: { type: "keyword" }, type: { type: "keyword" } }
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/openSearchHelper.ts
|
|
2
|
-
import assert from "assert";
|
|
2
|
+
import assert from "node:assert";
|
|
3
3
|
|
|
4
4
|
// src/fixIds.ts
|
|
5
5
|
import omit from "omit";
|
|
@@ -8,6 +8,7 @@ var fixIds = (searchQuery) => {
|
|
|
8
8
|
const { query: q, _source, from, size, sort } = searchQuery.body;
|
|
9
9
|
const body = {
|
|
10
10
|
query: {
|
|
11
|
+
ids: q.ids,
|
|
11
12
|
bool: q.bool ? fixBool(q.bool) : void 0,
|
|
12
13
|
match: q.match ? fixId(q.match) : void 0,
|
|
13
14
|
collapse: q.collapse,
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebspark/opensearch",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
8
|
+
"files": ["dist"],
|
|
11
9
|
"scripts": {
|
|
12
10
|
"build": "tsup-node src/index.ts --format esm,cjs --dts",
|
|
13
11
|
"dev": "tsc --watch --noEmit",
|
|
@@ -20,7 +18,7 @@
|
|
|
20
18
|
"tsconfig": "*"
|
|
21
19
|
},
|
|
22
20
|
"dependencies": {
|
|
23
|
-
"@opensearch-project/opensearch": "2.
|
|
21
|
+
"@opensearch-project/opensearch": "2.7.0",
|
|
24
22
|
"omit": "1.0.1"
|
|
25
23
|
}
|
|
26
24
|
}
|