@cloudbase/lowcode-builder 1.8.53 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/lowcode-builder",
3
- "version": "1.8.53",
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.38",
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.24b6f4f560a5d284c4ff.bundle.js"
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>
@@ -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;
@@ -245,7 +245,7 @@ export function getDeep(target, key, keySeparator = '.') {
245
245
  return target;
246
246
  }
247
247
  const keys = `${key}`.split(keySeparator);
248
- while (keys.length > 0 && target != null) {
248
+ while (keys.length > 0 && target != null && target !== undefined) {
249
249
  target = target[keys.shift()];
250
250
  }
251
251
  return keys.length === 0 ? target : undefined;
@@ -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) {
@@ -263,6 +263,7 @@ export function createPage({
263
263
 
264
264
  this._disposers.push(...runWatchers(index, this));
265
265
 
266
+ await this.beforePageCustomLaunch?.(this._query);
266
267
  const hook = lifecycle.onReady || lifecycle.onPageReady;
267
268
  await hook?.call?.($page);
268
269
 
@@ -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
- import Aegis from 'aegis-mp-sdk';
34
- new Aegis(AEGIS_CONFIG);
34
+ require.async('../packages/$wd_system/index.js').then(({ Aegis }) => {
35
+ new Aegis(AEGIS_CONFIG)
36
+ })
35
37
  <% }%>
@@ -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",<% if(cdnEndpoints.aegis){ %>
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",
@@ -0,0 +1,11 @@
1
+ <% if(cdnEndpoints.aegis){ %>import Aegis from 'aegis-mp-sdk';<%} else {%> class Aegis {
2
+ constructor() {
3
+ return new Proxy({}, {
4
+ get: (_,prop) => {
5
+ return () => {}
6
+ }
7
+ })
8
+ }
9
+ }<% } %>
10
+
11
+ export { Aegis }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "wd-system-sub-package",
3
+ "version": "0.0.1",
4
+ "scripts": {},
5
+ "dependencies": {<% if(cdnEndpoints.aegis){ %>
6
+ "aegis-mp-sdk": "~1.38.1"<% } %>
7
+ }
8
+ }
@@ -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
  }