@xuda.io/xuda-dbs-plugin-xuda 1.0.136 → 1.0.137

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/studio.mjs +10 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-dbs-plugin-xuda",
3
- "version": "1.0.136",
3
+ "version": "1.0.137",
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"
package/studio.mjs CHANGED
@@ -776,11 +776,16 @@ const query_db = async function (e, db, table_obj) {
776
776
 
777
777
  try {
778
778
  const result = await db.createIndex(mango_index_obj);
779
- db.on("indexing", function (event) {
780
- // called when indexes are updated
781
- console.log("indexes event", event);
782
- });
783
-
779
+ const monitor_indexing = function () {
780
+ return new Promise((resolve, reject) => {
781
+ db.on("indexing", function (event) {
782
+ // called when indexes are updated
783
+ // console.log("indexes event", event);
784
+ resolve();
785
+ });
786
+ });
787
+ };
788
+ await monitor_indexing();
784
789
  const doc = await db.find(opt);
785
790
  return await done(doc);
786
791
  } catch (err) {