@sebspark/opensearch 0.3.1 → 0.3.3
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.js +2 -4
- package/dist/index.mjs +2 -4
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -111,8 +111,7 @@ var fixExists = (exists) => ({
|
|
|
111
111
|
});
|
|
112
112
|
var fixId = (old) => {
|
|
113
113
|
const fixed = omitId(old);
|
|
114
|
-
if (old.id)
|
|
115
|
-
fixed._id = old.id;
|
|
114
|
+
if (old.id) fixed._id = old.id;
|
|
116
115
|
return fixed;
|
|
117
116
|
};
|
|
118
117
|
var fixIdValue = (val) => val === "id" ? "_id" : val;
|
|
@@ -175,8 +174,7 @@ var typedBulkUpsert = async (client, index, items) => {
|
|
|
175
174
|
return response;
|
|
176
175
|
};
|
|
177
176
|
var isLeafNode = (obj) => {
|
|
178
|
-
if (Object.values(obj).some((value) => value === "nested"))
|
|
179
|
-
return true;
|
|
177
|
+
if (Object.values(obj).some((value) => value === "nested")) return true;
|
|
180
178
|
return !Object.values(obj).some(
|
|
181
179
|
(value) => typeof value === "object" && value !== null && !Array.isArray(value)
|
|
182
180
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -75,8 +75,7 @@ var fixExists = (exists) => ({
|
|
|
75
75
|
});
|
|
76
76
|
var fixId = (old) => {
|
|
77
77
|
const fixed = omitId(old);
|
|
78
|
-
if (old.id)
|
|
79
|
-
fixed._id = old.id;
|
|
78
|
+
if (old.id) fixed._id = old.id;
|
|
80
79
|
return fixed;
|
|
81
80
|
};
|
|
82
81
|
var fixIdValue = (val) => val === "id" ? "_id" : val;
|
|
@@ -139,8 +138,7 @@ var typedBulkUpsert = async (client, index, items) => {
|
|
|
139
138
|
return response;
|
|
140
139
|
};
|
|
141
140
|
var isLeafNode = (obj) => {
|
|
142
|
-
if (Object.values(obj).some((value) => value === "nested"))
|
|
143
|
-
return true;
|
|
141
|
+
if (Object.values(obj).some((value) => value === "nested")) return true;
|
|
144
142
|
return !Object.values(obj).some(
|
|
145
143
|
(value) => typeof value === "object" && value !== null && !Array.isArray(value)
|
|
146
144
|
);
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebspark/opensearch",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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": [
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
9
11
|
"scripts": {
|
|
10
12
|
"build": "tsup-node src/index.ts --format esm,cjs --dts",
|
|
11
13
|
"dev": "tsc --watch --noEmit",
|
|
12
14
|
"lint": "biome check .",
|
|
13
|
-
"test": "vitest --passWithNoTests --coverage",
|
|
15
|
+
"test": "vitest run --passWithNoTests --coverage",
|
|
14
16
|
"typecheck": "vitest --typecheck.only --passWithNoTests"
|
|
15
17
|
},
|
|
16
18
|
"devDependencies": {
|
|
@@ -18,7 +20,7 @@
|
|
|
18
20
|
"tsconfig": "*"
|
|
19
21
|
},
|
|
20
22
|
"dependencies": {
|
|
21
|
-
"@opensearch-project/opensearch": "2.
|
|
23
|
+
"@opensearch-project/opensearch": "2.13.0",
|
|
22
24
|
"omit": "1.0.1"
|
|
23
25
|
}
|
|
24
26
|
}
|