@xuda.io/xuda-worker-bundle 1.3.2707 → 1.3.2709
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/index.js +18 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -9212,9 +9212,26 @@ func.utils.get_plugin_setup = function (SESSION_ID, plugin_name) {
|
|
|
9212
9212
|
});
|
|
9213
9213
|
};
|
|
9214
9214
|
|
|
9215
|
+
func.utils.connect_studio_pouchdb = function (app_id, rt, custom) {
|
|
9216
|
+
if (custom) {
|
|
9217
|
+
return new PouchDB(custom, { auto_compaction: true });
|
|
9218
|
+
}
|
|
9219
|
+
|
|
9220
|
+
var db_name = 'xuda_studio_db';
|
|
9221
|
+
if (app_id) {
|
|
9222
|
+
db_name += '_' + app_id;
|
|
9223
|
+
}
|
|
9224
|
+
|
|
9225
|
+
if (rt) {
|
|
9226
|
+
db_name = `xuda_rt_${app_id}`;
|
|
9227
|
+
}
|
|
9228
|
+
|
|
9229
|
+
return new PouchDB(db_name, { auto_compaction: true });
|
|
9230
|
+
};
|
|
9231
|
+
|
|
9215
9232
|
func.utils.connect_pouchdb = async function (SESSION_ID) {
|
|
9216
9233
|
const app_id = SESSION_OBJ[SESSION_ID].app_id;
|
|
9217
|
-
return
|
|
9234
|
+
return func.utils.connect_studio_pouchdb(app_id, true);
|
|
9218
9235
|
};
|
|
9219
9236
|
|
|
9220
9237
|
// func.utils.validate_pouchdb = async function (SESSION_ID) {
|