@cloudbase/lowcode-builder 1.9.2 → 1.9.4
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 +4 -4
- package/lib/builder/config/index.js +2 -2
- package/lib/builder/core/index.d.ts +2 -1
- package/lib/builder/core/index.js +5 -19
- package/lib/builder/mp/BuildContext.d.ts +5 -0
- package/lib/builder/mp/index.js +4 -3
- package/lib/builder/mp/util.js +4 -3
- package/lib/builder/service/webpack.js +1 -7
- package/lib/builder.web.js +4 -4
- package/package.json +2 -2
- package/template/html/index.html.ejs +1 -1
- package/template/mp/app/weapps-api.js +2 -0
- package/template/mp/common/util.js +0 -5
- package/template/mp/datasources/config.js.tpl +2 -1
- package/template/mp/package.json +1 -3
- package/template/mp/packages/$wd_system/pages/login/methods/loginBySms.js +0 -3
- package/template/webpack/web.prod.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.4",
|
|
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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@babel/core": "7.21.4",
|
|
49
49
|
"@babel/preset-env": "7.21.4",
|
|
50
50
|
"@cloudbase/cals": "^1.1.13",
|
|
51
|
-
"@cloudbase/lowcode-generator": "^1.8.
|
|
51
|
+
"@cloudbase/lowcode-generator": "^1.8.36",
|
|
52
52
|
"axios": "^0.21.0",
|
|
53
53
|
"chalk": "^2.4.2",
|
|
54
54
|
"compare-versions": "^3.6.0",
|
|
@@ -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.c741964cba433b7def51.bundle.js"
|
|
561
561
|
></script>
|
|
562
562
|
</body>
|
|
563
563
|
</html>
|
|
@@ -81,6 +81,8 @@ globalThis.__wedaGlobal__ = new Proxy({
|
|
|
81
81
|
function createGlboalApi() {
|
|
82
82
|
const mpApp = createMpApp({
|
|
83
83
|
appConfig: {
|
|
84
|
+
id: cloudConfig.appID,
|
|
85
|
+
envId: cloudConfig.envID,
|
|
84
86
|
staticResourceDomain: config.domain,
|
|
85
87
|
privatelink: cloudConfig.privatelink,
|
|
86
88
|
envVersion: cloudConfig.isProd ? 'production' : 'preview',
|
|
@@ -29,11 +29,6 @@ export function formatErrorMsg(e) {
|
|
|
29
29
|
export async function checkAuth(app, appId, $page) {
|
|
30
30
|
<% if(skipCheckAuth){ %> return true <% } %>
|
|
31
31
|
|
|
32
|
-
// 免密登录
|
|
33
|
-
if (await app?.cloud?.judgePasswordFreeLogin()) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
32
|
const loginConfig = await getLoginConfig();
|
|
38
33
|
// openid 登录特殊处理,不在登录页登录,在原地静默登录
|
|
39
34
|
const hasOpenIdLoginType = loginConfig?.miniprogram?.find(v => v.type === 'openid_login')?.enable;
|
|
@@ -41,7 +41,8 @@ const CLOUD_CONFIG = {
|
|
|
41
41
|
return require.async('../packages/$wd_system/index.js').then(({ tcbPrivatelinkAdapter }) => {
|
|
42
42
|
return tcbPrivatelinkAdapter
|
|
43
43
|
})
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
__defaultLoginType__: '<%= defaultLoginType %>'
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export default CLOUD_CONFIG
|
package/template/mp/package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lcap-<%= appId%>",
|
|
3
3
|
"version": "1.0.8",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"fix:cloud": "node -e 'try{const fix = require(\"@cloudbase/weda-cloud-sdk/scripts/fix-wx-none-private.js\");fix()}catch(e){}'"
|
|
6
|
-
},
|
|
4
|
+
"scripts": {},
|
|
7
5
|
"dependencies": <%= JSON.stringify(extraDeps, undefined, 2) %>
|
|
8
6
|
}
|
|
@@ -12,9 +12,6 @@ export default async function loginBySms(
|
|
|
12
12
|
try {
|
|
13
13
|
const cloud = await app.cloud.getCloudInstance();
|
|
14
14
|
const auth = cloud.auth;
|
|
15
|
-
const endpointType =
|
|
16
|
-
app.__internal__ && app.__internal__.getCloudSdkConfig && app.__internal__.getCloudSdkConfig('endpointType');
|
|
17
|
-
const isTcbApi = endpointType === 'tcb-api';
|
|
18
15
|
const isV2 = false;
|
|
19
16
|
|
|
20
17
|
// 验证码使用次数超过限制,直接提示错误
|
|
@@ -32,12 +32,12 @@ module.exports = function (options) {
|
|
|
32
32
|
// esmodules: true,
|
|
33
33
|
browsers: ['defaults', 'iOS >= 10', 'safari >= 10', 'chrome >= 53'],
|
|
34
34
|
},
|
|
35
|
-
include: ['@babel/plugin-transform-class-properties'],
|
|
36
35
|
},
|
|
37
36
|
],
|
|
38
37
|
'@babel/preset-react',
|
|
39
38
|
],
|
|
40
39
|
plugins: [
|
|
40
|
+
'@babel/plugin-transform-class-properties',
|
|
41
41
|
['@babel/plugin-proposal-decorators', { legacy: true }],
|
|
42
42
|
'@babel/plugin-proposal-export-default-from',
|
|
43
43
|
].filter(Boolean),
|