@cloudbase/lowcode-builder 1.10.0 → 1.10.2
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/lib/builder/config/dependencies.js +2 -2
- package/lib/builder/mp/util.js +10 -4
- package/lib/builder.web.js +8 -8
- package/package.json +2 -2
- package/template/html/index.html.ejs +3 -3
- package/template/mp/app/weapps-api.js +3 -1
- package/template/mp/app.js +2 -0
- package/template/mp/common/info/index.json +3 -2
- package/template/mp/common/util.js +3 -3
- package/template/mp/datasources/config.js.tpl +12 -11
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateSystemPackageDependencies = exports.generateLibDependencies = exports.generatePackageDependencies = void 0;
|
|
4
4
|
const cals_1 = require("@cloudbase/cals");
|
|
5
|
-
const CLOUDBASE_VERSION = '2.8.
|
|
5
|
+
const CLOUDBASE_VERSION = '2.8.34';
|
|
6
6
|
const BASE_DEPS = {
|
|
7
7
|
'miniprogram-gesture': '^1.0.6',
|
|
8
8
|
mobx: '^5',
|
|
@@ -13,7 +13,7 @@ const BASE_DEPS = {
|
|
|
13
13
|
* 注意锁版本
|
|
14
14
|
*/
|
|
15
15
|
const CLOUDBASE_DEPS = {
|
|
16
|
-
'@cloudbase/weda-client': '1.1.
|
|
16
|
+
'@cloudbase/weda-client': '1.1.21',
|
|
17
17
|
'@cloudbase/weda-cloud-sdk': '1.0.96',
|
|
18
18
|
};
|
|
19
19
|
const COMPONENT_DEPS = {
|
package/lib/builder/mp/util.js
CHANGED
|
@@ -253,7 +253,7 @@ function getListenersHandlers(ctx, listeners = [], id, componentApi) {
|
|
|
253
253
|
const { enableAsyncMaterials = false } = ctx;
|
|
254
254
|
const eventHandlers = {};
|
|
255
255
|
listeners.forEach((l) => {
|
|
256
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
256
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
257
257
|
const handlerName = (0, wxml_1.getMpEventHandlerName)(id, l.trigger, l);
|
|
258
258
|
const sourceKey = `${((_a = l.handler) === null || _a === void 0 ? void 0 : _a.moduleName) || ''}:${((_b = l.handler) === null || _b === void 0 ? void 0 : _b.name) || ''}`;
|
|
259
259
|
eventHandlers[handlerName] = eventHandlers[handlerName] || [];
|
|
@@ -287,8 +287,14 @@ function getListenersHandlers(ctx, listeners = [], id, componentApi) {
|
|
|
287
287
|
handler = `function({data}) { return $app.utils.getCurrentPage().setParams(data.params);}`;
|
|
288
288
|
break;
|
|
289
289
|
}
|
|
290
|
+
case `${weapps_core_1.ActionType.Platform}:ai.LLM.chat`:
|
|
291
|
+
case `${weapps_core_1.ActionType.Platform}:ai.bot.sendMessage`:
|
|
292
|
+
case `${weapps_core_1.ActionType.Platform}:ai.bot.getRecommendQuestions`: {
|
|
293
|
+
handler = `function({data, $w}) { return $app.${(_c = l.handler) === null || _c === void 0 ? void 0 : _c.name}(data, $w);}`;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
290
296
|
default: {
|
|
291
|
-
handler = `function({args}){ return $app.${(
|
|
297
|
+
handler = `function({args}){ return $app.${(_d = l.handler) === null || _d === void 0 ? void 0 : _d.name}(...args)}`;
|
|
292
298
|
break;
|
|
293
299
|
}
|
|
294
300
|
}
|
|
@@ -299,7 +305,7 @@ function getListenersHandlers(ctx, listeners = [], id, componentApi) {
|
|
|
299
305
|
break;
|
|
300
306
|
}
|
|
301
307
|
case weapps_core_1.ActionType.PropEvent: {
|
|
302
|
-
handler = `function({event, data = {}}){ return ${componentApi}.props.events.${(
|
|
308
|
+
handler = `function({event, data = {}}){ return ${componentApi}.props.events.${(_e = l.handler) === null || _e === void 0 ? void 0 : _e.name}({...event.detail, ...data}) }`;
|
|
303
309
|
break;
|
|
304
310
|
}
|
|
305
311
|
case weapps_core_1.ActionType.Rematch: {
|
|
@@ -307,7 +313,7 @@ function getListenersHandlers(ctx, listeners = [], id, componentApi) {
|
|
|
307
313
|
break;
|
|
308
314
|
}
|
|
309
315
|
case weapps_core_1.ActionType.GeneralFunc: {
|
|
310
|
-
handler = `function({event, $w, params}) { return (\n${((
|
|
316
|
+
handler = `function({event, $w, params}) { return (\n${((_h = (_g = (_f = l.handler) === null || _f === void 0 ? void 0 : _f.code) === null || _g === void 0 ? void 0 : _g.replace) === null || _h === void 0 ? void 0 : _h.call(_g, /;\s*$/, '')) || '()=>{}'}\n)({event}) }`;
|
|
311
317
|
break;
|
|
312
318
|
}
|
|
313
319
|
}
|