@cloudbase/lowcode-builder 1.10.34 → 1.10.36
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.d.ts +1 -0
- package/lib/builder/config/dependencies.js +4 -3
- package/lib/builder.web.js +3 -3
- package/package.json +4 -4
- package/template/html/index.html.ejs +1 -1
- package/template/mp/packages/$wd_system/index.js.tpl +5 -0
- package/template/mp/packages/$wd_system/pages/login/methods/errorHandler.js +1 -1
- package/template/mp/packages/$wd_system/pages/login/methods/loginSuccessCallBack.js +10 -0
- package/template/webpack/web.prod.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.36",
|
|
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",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@babel/core": "7.21.4",
|
|
51
51
|
"@babel/preset-env": "7.21.4",
|
|
52
|
-
"@cloudbase/cals": "^1.2.
|
|
53
|
-
"@cloudbase/lowcode-generator": "^1.8.
|
|
52
|
+
"@cloudbase/cals": "^1.2.25",
|
|
53
|
+
"@cloudbase/lowcode-generator": "^1.8.43",
|
|
54
54
|
"axios": "^0.21.0",
|
|
55
55
|
"chalk": "^2.4.2",
|
|
56
56
|
"compare-versions": "^3.6.0",
|
|
@@ -94,4 +94,4 @@
|
|
|
94
94
|
"webpack-dev-server": "^4.7.3",
|
|
95
95
|
"worker-loader": "^3.0.8"
|
|
96
96
|
}
|
|
97
|
-
}
|
|
97
|
+
}
|
|
@@ -557,7 +557,7 @@
|
|
|
557
557
|
crossorigin
|
|
558
558
|
src="<%=
|
|
559
559
|
cdnEndpoints.cdngo
|
|
560
|
-
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.
|
|
560
|
+
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.0ab216cf8f7a4031dead.bundle.js"
|
|
561
561
|
></script>
|
|
562
562
|
</body>
|
|
563
563
|
</html>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { registerAi, createAi } from "@cloudbase/ai";
|
|
2
|
+
import { registerApis, generateApis } from "@cloudbase/apis";
|
|
2
3
|
import { generateAuthInstance, registerAuth } from "@cloudbase/auth";
|
|
3
4
|
<% if(cdnEndpoints.aegis){ %>import Aegis from 'aegis-mp-sdk';<%} else {%> class Aegis {
|
|
4
5
|
constructor() {
|
|
@@ -32,6 +33,10 @@ const loadMap = {
|
|
|
32
33
|
generateAuthInstance,
|
|
33
34
|
registerAuth,
|
|
34
35
|
},
|
|
36
|
+
"@cloudbase/apis": {
|
|
37
|
+
registerApis,
|
|
38
|
+
generateApis,
|
|
39
|
+
},
|
|
35
40
|
"@cloudbase/adapter-wx_mp": require('@cloudbase/adapter-wx_mp')
|
|
36
41
|
};
|
|
37
42
|
|
|
@@ -164,7 +164,7 @@ export const parseCommonError = (e) => {
|
|
|
164
164
|
msg = `网络错误,请检查您的网络连接,稍后重试${prefixMsg(e.error_description)}`;
|
|
165
165
|
break;
|
|
166
166
|
case 'resource_exhausted':
|
|
167
|
-
return '
|
|
167
|
+
return '验证码已过期,或尝试过于频繁,请稍后重试,或选择其他登录方式';
|
|
168
168
|
case 'license_required':
|
|
169
169
|
return '该用户没有产品许可证,请授权后重试';
|
|
170
170
|
default:
|
|
@@ -13,6 +13,16 @@ export default function (instance) {
|
|
|
13
13
|
pageId: query.sourcePageId,
|
|
14
14
|
packageName: query.sourcePagePackageName || undefined,
|
|
15
15
|
params,
|
|
16
|
+
fail: (res) => {
|
|
17
|
+
if (res.errMsg?.includes?.('tabbar page')) {
|
|
18
|
+
const path = `${
|
|
19
|
+
query.sourcePagePackageName ? '/packages/' + query.sourcePagePackageName : ''
|
|
20
|
+
}/pages/${query.sourcePageId}/index`
|
|
21
|
+
app.switchTab({ url: path })
|
|
22
|
+
} else {
|
|
23
|
+
app.relaunchHome()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
16
26
|
}) : app.relaunchHome();
|
|
17
27
|
} catch (e) {
|
|
18
28
|
app.relaunchHome();
|
|
@@ -100,7 +100,7 @@ module.exports = function (options) {
|
|
|
100
100
|
}),
|
|
101
101
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
|
102
102
|
new webpack.NormalModuleReplacementPlugin(
|
|
103
|
-
/@\/components\/(?!ui)(.*)|^@\/(lib|hooks|configs|utils)|^@\/components$/, // 使用否定前瞻匹配除ui外的所有路径
|
|
103
|
+
/@\/components\/(?!ui)(.*)|^@\/(lib|hooks|configs|utils|pages|layouts)|^@\/components$/, // 使用否定前瞻匹配除ui外的所有路径
|
|
104
104
|
function (resource) {
|
|
105
105
|
if (/lowcode\//.test(resource.context)) {
|
|
106
106
|
if (resource.request === '@/components') {
|
|
@@ -234,6 +234,7 @@ module.exports = function (options) {
|
|
|
234
234
|
// 函数
|
|
235
235
|
function (context, request, callback) {
|
|
236
236
|
const ScopeExternalsMap = {
|
|
237
|
+
'react-router-dom': 'window.ReactRouterDOM',
|
|
237
238
|
recharts: 'window.SHADN.RECHARTS',
|
|
238
239
|
'react-hook-form': 'window.SHADN.ReactHookForm',
|
|
239
240
|
'lucide-react': 'window.SHADN.LUCIDE',
|
|
@@ -246,7 +247,7 @@ module.exports = function (options) {
|
|
|
246
247
|
if (ScopeExternalsMap[request]) {
|
|
247
248
|
callback(null, ScopeExternalsMap[request]);
|
|
248
249
|
return;
|
|
249
|
-
} else if (request
|
|
250
|
+
} else if (request.startsWith('@/components/ui')) {
|
|
250
251
|
callback(null, 'window.SHADN.components');
|
|
251
252
|
return;
|
|
252
253
|
}
|