@cloudbase/lowcode-builder 1.8.54 → 1.8.55
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/dist/builder.web.js +79 -0
- package/lib/builder/config/index.d.ts +3 -1
- package/lib/builder/config/index.js +4 -2
- package/lib/builder/core/index.js +3 -2
- package/lib/builder/h5/generate.d.ts +2 -2
- package/lib/builder/h5/index.d.ts +2 -2
- package/lib/builder/h5/webpack.d.ts +2 -2
- package/lib/builder/mp/BuildContext.d.ts +13 -7
- package/lib/builder/mp/index.js +61 -11
- package/lib/builder/mp/materials.js +5 -1
- package/lib/builder/mp/mp_config.js +29 -2
- package/lib/builder/mp/wxml.d.ts +2 -0
- package/lib/builder/mp/wxml.js +13 -9
- package/lib/builder/util/net.js +9 -3
- package/lib/builder.web.js +21 -13
- package/package.json +2 -2
- package/template/html/index.html.ejs +1 -1
- package/template/mp/app.js +16 -0
- package/template/mp/common/placeholder/index.js +1 -0
- package/template/mp/common/placeholder/index.json +4 -0
- package/template/mp/common/placeholder/index.wxml +1 -0
- package/template/mp/common/placeholder/index.wxss +1 -0
- package/template/mp/common/util.js +3 -0
- package/template/mp/common/weapp-page.js +1 -0
- package/template/mp/datasources/config.js.tpl +7 -2
- package/template/mp/datasources/index.js.tpl +4 -2
- package/template/mp/package.json +1 -2
- package/template/mp/packages/$wd_system/index.js.tpl +11 -0
- package/template/mp/packages/$wd_system/package.json +8 -0
- package/template/mp/page/index.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.55",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@babel/core": "7.21.4",
|
|
47
47
|
"@babel/preset-env": "7.21.4",
|
|
48
|
-
"@cloudbase/cals": "^1.0.
|
|
48
|
+
"@cloudbase/cals": "^1.0.40",
|
|
49
49
|
"@cloudbase/lowcode-generator": "^1.8.15",
|
|
50
50
|
"axios": "^0.21.0",
|
|
51
51
|
"browserfs": "^1.4.3",
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
crossorigin
|
|
544
544
|
src="<%=
|
|
545
545
|
cdnEndpoints.cdngo
|
|
546
|
-
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.
|
|
546
|
+
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.7c8c70be6e292a1218fe.bundle.js"
|
|
547
547
|
></script>
|
|
548
548
|
</body>
|
|
549
549
|
</html>
|
package/template/mp/app.js
CHANGED
|
@@ -151,6 +151,22 @@ App({
|
|
|
151
151
|
return this.globaldata._beforeCustomLaunchPromise;
|
|
152
152
|
},
|
|
153
153
|
async onLaunch(options) {
|
|
154
|
+
if (wx.onLazyLoadError) {
|
|
155
|
+
wx.onLazyLoadError(({ type, subpackage, errMsg}) => {
|
|
156
|
+
console.log('subpackage')
|
|
157
|
+
if(type === 'subpackage' && subpackage?.find(item=>item === '<%= materialSubPackagePath %>')) {
|
|
158
|
+
wx.showModal({
|
|
159
|
+
title: '组件包加载失败',
|
|
160
|
+
content: `加载组件包超时:${errMsg},请退出重新进入。`,
|
|
161
|
+
showCancel: false,
|
|
162
|
+
success (res) {
|
|
163
|
+
return
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
}
|
|
154
170
|
this.app = app;
|
|
155
171
|
const onLaunch = lifeCycle.onLaunch || lifeCycle.onAppLaunch;
|
|
156
172
|
let { query = {} } = options;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Component({})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<block></block>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* common/placeholder/index.wxss */
|
|
@@ -771,6 +771,9 @@ const PROMISE = new Promise((resolve,reject)=>{
|
|
|
771
771
|
<% } %>
|
|
772
772
|
|
|
773
773
|
export async function getExpiredMessage(createdTime = 0) {
|
|
774
|
+
if (wx.getSystemInfoSync().platform === 'devtools') {
|
|
775
|
+
return ;
|
|
776
|
+
}
|
|
774
777
|
<% if(expirationStartTimesnap){ %>
|
|
775
778
|
try {
|
|
776
779
|
if (createdTime) {
|
|
@@ -53,9 +53,14 @@ export const AEGIS_CONFIG = {
|
|
|
53
53
|
wx.getAccountInfoSync()?.miniProgram?.appId || '',
|
|
54
54
|
].join('|'),
|
|
55
55
|
version: "0.0.2",
|
|
56
|
-
env: CLOUD_CONFIG.isProd ? 'production' : 'pre',
|
|
57
|
-
|
|
56
|
+
env: wx.getSystemInfoSync().platform === 'devtools' ? 'development' : CLOUD_CONFIG.isProd ? 'production' : 'pre',
|
|
58
57
|
hostUrl: 'https://rumt-zh.com', // 上报域名,中国大陆 rumt-zh.com
|
|
59
58
|
spa: true, // spa 页面需要开启,页面切换的时候上报pv
|
|
59
|
+
beforeRequest: function(data) {
|
|
60
|
+
if (data.logType === 'pv') {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return data;
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
<% }%>
|
|
@@ -29,7 +29,9 @@ import { default as config, AEGIS_CONFIG } from './config'
|
|
|
29
29
|
|
|
30
30
|
setConfig(config)
|
|
31
31
|
initTcb()
|
|
32
|
+
|
|
32
33
|
<% if(cdnEndpoints.aegis){ %>
|
|
33
|
-
|
|
34
|
-
new Aegis(AEGIS_CONFIG)
|
|
34
|
+
require.async('../packages/$wd_system/index.js').then(({ Aegis }) => {
|
|
35
|
+
new Aegis(AEGIS_CONFIG)
|
|
36
|
+
})
|
|
35
37
|
<% }%>
|
package/template/mp/package.json
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
"@cloudbase/js-sdk": "2.5.6-beta.1",<% } %>
|
|
7
7
|
"@cloudbase/oauth": "0.1.1-alpha.5",
|
|
8
8
|
"@cloudbase/weda-client": "1.0.14",
|
|
9
|
-
"@cloudbase/weda-cloud-sdk": "1.0.46"
|
|
10
|
-
"aegis-mp-sdk": "~1.38.1",<% } %>
|
|
9
|
+
"@cloudbase/weda-cloud-sdk": "1.0.46",
|
|
11
10
|
"mobx": "^5.15.4",
|
|
12
11
|
"lodash.get": "^4.4.2",
|
|
13
12
|
"lodash.set": "^4.3.2",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"usingComponents": <%= JSON.stringify(usingComponents, undefined, 2)%><%= extra %>
|
|
2
|
+
"usingComponents": <%= JSON.stringify(usingComponents, undefined, 2)%><%= componentPlaceholder? `, "componentPlaceholder": ${JSON.stringify(componentPlaceholder, undefined, 2)}` : "" %><%= extra %>
|
|
3
3
|
}
|