@xuda.io/ai_module 1.1.4964 → 1.1.4965
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.mjs +6 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -4756,6 +4756,8 @@ setTimeout(async () => {
|
|
|
4756
4756
|
///////////////////////
|
|
4757
4757
|
|
|
4758
4758
|
const run_plugin = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}, testing = false) {
|
|
4759
|
+
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
4760
|
+
|
|
4759
4761
|
const get_path = function (resource) {
|
|
4760
4762
|
if (dev) {
|
|
4761
4763
|
return `../../plugins/${plugin_name}/${resource}`;
|
|
@@ -4803,7 +4805,7 @@ const run_plugin = async function (app_id, uid, plugin_name, method, prop_data,
|
|
|
4803
4805
|
|
|
4804
4806
|
console.log('Testing plugin with:', { app_id, uid });
|
|
4805
4807
|
|
|
4806
|
-
const couch_ret = await
|
|
4808
|
+
const couch_ret = await db_module.get_app_couch_nano(app_id);
|
|
4807
4809
|
|
|
4808
4810
|
const couch = couch_ret.data.couch;
|
|
4809
4811
|
try {
|
|
@@ -4886,6 +4888,8 @@ const run_plugin = async function (app_id, uid, plugin_name, method, prop_data,
|
|
|
4886
4888
|
};
|
|
4887
4889
|
|
|
4888
4890
|
const get_plugin_tool = async function (app_id, uid, plugin_name, method, prop_data, dev = true, req = {}) {
|
|
4891
|
+
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
4892
|
+
|
|
4889
4893
|
init(undefined, undefined, _, true, undefined, undefined, undefined, undefined, undefined, true, z);
|
|
4890
4894
|
|
|
4891
4895
|
const get_path = function (resource) {
|
|
@@ -4929,7 +4933,7 @@ const get_plugin_tool = async function (app_id, uid, plugin_name, method, prop_d
|
|
|
4929
4933
|
return data_obj;
|
|
4930
4934
|
};
|
|
4931
4935
|
|
|
4932
|
-
const couch_ret = await
|
|
4936
|
+
const couch_ret = await db_module.get_app_couch_nano(app_id);
|
|
4933
4937
|
|
|
4934
4938
|
const couch = couch_ret.data.couch;
|
|
4935
4939
|
try {
|