@cloudbase/lowcode-builder 1.8.106 → 1.8.108
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 +10 -0
- package/lib/builder/config/dependencies.js +46 -0
- package/lib/builder/config/index.d.ts +1 -0
- package/lib/builder/config/index.js +5 -3
- package/lib/builder/core/index.d.ts +1 -1
- package/lib/builder/core/index.js +13 -13
- package/lib/builder/h5/generate.js +1 -0
- package/lib/builder/mp/BuildContext.d.ts +1 -0
- package/lib/builder/mp/index.d.ts +1 -2
- package/lib/builder/mp/index.js +13 -38
- package/lib/builder/mp/lowcode.js +5 -1
- package/lib/builder/mp/materials.d.ts +2 -3
- package/lib/builder/mp/materials.js +28 -26
- package/lib/builder/mp/mp_config.js +2 -1
- package/lib/builder/mp/util.d.ts +5 -2
- package/lib/builder/mp/util.js +14 -6
- package/lib/builder/mp/wxml.d.ts +3 -1
- package/lib/builder/mp/wxml.js +20 -7
- package/lib/builder.web.js +8 -8
- package/package.json +4 -4
- package/template/html/index.html.ejs +4 -2
- package/template/mp/app/common.js +0 -2
- package/template/mp/app/weapps-api.js +1 -20
- package/template/mp/common/info/index.js +4 -2
- package/template/mp/common/util.js +33 -774
- package/template/mp/common/weapp-page.js +12 -514
- package/template/mp/component/index.js +52 -19
- package/template/mp/component/index.json +1 -1
- package/template/mp/datasources/index.js.tpl +3 -99
- package/template/mp/package.json +4 -15
- package/template/mp/packages/$wd_system/pages/login/index.json +1 -1
- package/template/mp/packages/$wd_system/pages/login/methods/loginByWXPhone.js +6 -3
- package/template/mp/page/index.js +1 -2
- package/template/mp/common/constant.js +0 -1
- package/template/mp/common/data-patch-test.js +0 -60
- package/template/mp/common/data-patch.js +0 -66
- package/template/mp/common/event-emitter.js +0 -124
- package/template/mp/common/flow.js +0 -65
- package/template/mp/common/merge-renderer.js +0 -75
- package/template/mp/common/placeholder/index.js +0 -1
- package/template/mp/common/placeholder/index.json +0 -4
- package/template/mp/common/placeholder/index.wxml +0 -1
- package/template/mp/common/placeholder/index.wxss +0 -1
- package/template/mp/common/query.js +0 -300
- package/template/mp/common/style.js +0 -34
- package/template/mp/common/watch.js +0 -70
- package/template/mp/common/weapp-component.js +0 -289
- package/template/mp/common/widget.js +0 -872
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.108",
|
|
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",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/core": "7.21.4",
|
|
49
49
|
"@babel/preset-env": "7.21.4",
|
|
50
|
-
"@cloudbase/cals": "
|
|
51
|
-
"@cloudbase/lowcode-generator": "
|
|
50
|
+
"@cloudbase/cals": "workspace:^",
|
|
51
|
+
"@cloudbase/lowcode-generator": "workspace:^",
|
|
52
52
|
"axios": "^0.21.0",
|
|
53
53
|
"browserfs": "^1.4.3",
|
|
54
54
|
"browserify-zlib": "^0.2.0",
|
|
@@ -90,4 +90,4 @@
|
|
|
90
90
|
"webpack-dev-server": "^4.7.3",
|
|
91
91
|
"worker-loader": "^3.0.8"
|
|
92
92
|
}
|
|
93
|
-
}
|
|
93
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
content="width=device-width,initial-scale=1.0,user-scalable=no<% if(!isBuildApp) {%>,viewport-fit=cover<%}%>"
|
|
10
10
|
/>
|
|
11
11
|
<meta name="format-detection" content="telephone=no" />
|
|
12
|
+
<meta name="generator" content="weda" />
|
|
13
|
+
<meta name="weda" content="envId=<%= envId %>" />
|
|
12
14
|
<% if(desc){ %>
|
|
13
15
|
<meta name="description" content="<%= desc %>" />
|
|
14
16
|
<% } %>
|
|
@@ -520,7 +522,7 @@
|
|
|
520
522
|
crossorigin="anonymous"
|
|
521
523
|
src="<%=
|
|
522
524
|
cdnEndpoints.cdngo
|
|
523
|
-
%>/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/weda-cloud-sdk@1.0.
|
|
525
|
+
%>/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/weda-cloud-sdk@1.0.63/dist/h5.browser.js"
|
|
524
526
|
></script>
|
|
525
527
|
<script
|
|
526
528
|
crossorigin
|
|
@@ -549,7 +551,7 @@
|
|
|
549
551
|
crossorigin
|
|
550
552
|
src="<%=
|
|
551
553
|
cdnEndpoints.cdngo
|
|
552
|
-
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.
|
|
554
|
+
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.8a77ddc977d9cca89eaa.bundle.js"
|
|
553
555
|
></script>
|
|
554
556
|
</body>
|
|
555
557
|
</html>
|
|
@@ -22,7 +22,6 @@ function getDefaultModule(targetModule) {
|
|
|
22
22
|
for (const key in targetModule) {
|
|
23
23
|
try {
|
|
24
24
|
if (module[key] !== undefined) {
|
|
25
|
-
// reportEvent(`${tag}.mergeconflict`);
|
|
26
25
|
} else if (key !== 'default') {
|
|
27
26
|
/**
|
|
28
27
|
* 兼容之前写法进行数据合并
|
|
@@ -30,7 +29,6 @@ function getDefaultModule(targetModule) {
|
|
|
30
29
|
module[key] = targetModule[key];
|
|
31
30
|
}
|
|
32
31
|
} catch (e) {
|
|
33
|
-
// reportEvent(`${tag}.unmergeable`);
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
return module;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
// 必须优先初始化数据源
|
|
2
2
|
import '<%= subLevelPath %>../datasources/index';
|
|
3
3
|
import { observable } from 'mobx'
|
|
4
|
-
import { createMpApp } from '@cloudbase/weda-client';
|
|
5
|
-
import { createComputed, formatEnum, enumOptions } from '<%= subLevelPath %>../common/util'
|
|
6
|
-
import { generateDatasetQuery } from '<%= subLevelPath %>../common/query'
|
|
4
|
+
import { createMpApp, generateDatasetQuery, watchAndSyncDatasetState2Local, createComputed, _lodashGet as lodashGet } from '@cloudbase/weda-client';
|
|
7
5
|
|
|
8
6
|
import appGlobal from '<%= subLevelPath %>../app/app-global'
|
|
9
7
|
import { default as cloudConfig } from '<%= subLevelPath %>../datasources/config'
|
|
10
8
|
import { createDataset } from '<%= subLevelPath %>../common/cloud-sdk'
|
|
11
9
|
|
|
12
|
-
import lodashGet from 'lodash.get';
|
|
13
10
|
import config from '<%= subLevelPath %>../common/config';
|
|
14
|
-
import { watchAndSyncDatasetState2Local } from '<%= subLevelPath %>../common/watch';
|
|
15
|
-
|
|
16
|
-
|
|
17
11
|
|
|
18
12
|
<%= importor.state? `import state from '../lowcode/state'` : "const state = {}" %>
|
|
19
13
|
<%= importor.computed? `import computed from '../lowcode/computed'` : "const computed = {}" %>
|
|
@@ -94,26 +88,13 @@ function createGlboalApi() {
|
|
|
94
88
|
},
|
|
95
89
|
});
|
|
96
90
|
const globalAPI = Object.assign(mpApp, {
|
|
97
|
-
domain: config.domain,
|
|
98
|
-
pages: {},
|
|
99
|
-
session: {
|
|
100
|
-
//configure: sdk.configure,
|
|
101
|
-
//request: sdk.request,
|
|
102
|
-
//getSessionId: sdk.getSessionId,
|
|
103
|
-
},
|
|
104
91
|
state: observable(state),
|
|
105
92
|
computed: createComputed(computed),
|
|
106
93
|
common,
|
|
107
94
|
...mpApp,
|
|
108
|
-
invoke(params) {
|
|
109
|
-
const $page = globalAPI.utils.getCurrentPage();
|
|
110
|
-
return $page.invokeComponentMethod(params)
|
|
111
|
-
},
|
|
112
95
|
// ... other sdk apis & apis from mp
|
|
113
96
|
}) // The global api exposed to lowcode
|
|
114
97
|
|
|
115
|
-
globalAPI.__internal__.enumOptions = enumOptions
|
|
116
|
-
globalAPI.utils.formatEnum = formatEnum
|
|
117
98
|
/**
|
|
118
99
|
* @deprecated utils._getConfig
|
|
119
100
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getWedaAPI } from '@cloudbase/weda-client';
|
|
1
|
+
import { findStatusPage } from '../util';
|
|
2
|
+
import { getWedaAPI, auth } from '@cloudbase/weda-client';
|
|
3
|
+
const { __internal__ = {} } = auth;
|
|
4
|
+
const { redirectToLogin } = __internal__
|
|
3
5
|
|
|
4
6
|
Component({
|
|
5
7
|
/**
|