@xuda.io/xuda-dbs-plugin-xuda 1.0.28 → 1.0.30
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 +3 -2
- package/server.js +6 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xuda.io/xuda-dbs-plugin-xuda",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.30",
|
4
4
|
"description": "Xuda Database Socket for Xuda's proprietary structure powered by CouchDB",
|
5
5
|
"scripts": {
|
6
6
|
"pub": "npm version patch --force && npm publish --access public"
|
@@ -15,6 +15,7 @@
|
|
15
15
|
"license": "Proprietary software licenses",
|
16
16
|
"svg_icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" width=\"24px\" height=\"24px\" viewBox=\"0 0 256 256\" strokeWidth={1.5} stroke=\"currentColor\" className=\"w-6 h-6\"><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125\" /></svg>",
|
17
17
|
"dependencies": {
|
18
|
-
"nano": "^10.1.0"
|
18
|
+
"nano": "^10.1.0",
|
19
|
+
"lodash": "^4.17.21"
|
19
20
|
}
|
20
21
|
}
|
package/server.js
CHANGED
@@ -164,6 +164,12 @@ const find_item_by_key_root = function (arr, key, val) {
|
|
164
164
|
});
|
165
165
|
};
|
166
166
|
|
167
|
+
const find_item_by_key = function (arr, key, val) {
|
168
|
+
return _.find(arr, function (e) {
|
169
|
+
return e.data[key] === val;
|
170
|
+
});
|
171
|
+
};
|
172
|
+
|
167
173
|
exports.create = async (params, setup_doc, resolve, reject) => {
|
168
174
|
const e = params.e;
|
169
175
|
const db = params.db;
|
@@ -1044,7 +1050,6 @@ exports.restore = async (params, setup_doc, resolve, reject) => {
|
|
1044
1050
|
|
1045
1051
|
exports.test_connection = async (params, setup_doc, resolve, reject) => {
|
1046
1052
|
try {
|
1047
|
-
debugger;
|
1048
1053
|
if (!setup_doc.db_connection_string) throw "db_connection_string missing";
|
1049
1054
|
const nano = require("nano")(setup_doc.db_connection_string);
|
1050
1055
|
|