@cloudbase/lowcode-builder 1.8.100 → 1.8.101

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.100",
3
+ "version": "1.8.101",
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": "^1.0.80",
51
- "@cloudbase/lowcode-generator": "^1.8.29",
50
+ "@cloudbase/cals": "^1.0.81",
51
+ "@cloudbase/lowcode-generator": "^1.8.30",
52
52
  "axios": "^0.21.0",
53
53
  "browserfs": "^1.4.3",
54
54
  "browserify-zlib": "^0.2.0",
@@ -549,7 +549,7 @@
549
549
  crossorigin
550
550
  src="<%=
551
551
  cdnEndpoints.cdngo
552
- %>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.acef94ce4b0574004da6.bundle.js"
552
+ %>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.3699f460d2b6314f711e.bundle.js"
553
553
  ></script>
554
554
  </body>
555
555
  </html>
@@ -6,6 +6,7 @@ import { createComputed, formatEnum, enumOptions } from '<%= subLevelPath %>../c
6
6
  import { generateDatasetQuery } from '<%= subLevelPath %>../common/query'
7
7
 
8
8
  import appGlobal from '<%= subLevelPath %>../app/app-global'
9
+ import { default as cloudConfig } from '<%= subLevelPath %>../datasources/config'
9
10
  import { createDataset } from '<%= subLevelPath %>../common/cloud-sdk'
10
11
 
11
12
  import lodashGet from 'lodash.get';
@@ -87,6 +88,7 @@ function createGlboalApi() {
87
88
  const mpApp = createMpApp({
88
89
  appConfig: {
89
90
  staticResourceDomain: config.domain,
91
+ privatelink: cloudConfig.privatelink,
90
92
  ...(<%= appConfig %>)
91
93
  },
92
94
  });
@@ -181,11 +181,13 @@ export function createPage({
181
181
  attached() {
182
182
  this._disposers = [];
183
183
  const $page = this._getInstance();
184
- const instance = $page.__internal__.mpInstance?.()
184
+ const instance = $page.__internal__.mpInstance?.(true)
185
185
  if( instance !== this ){
186
186
  const currentMpInstance = this
187
- $page.__internal__.mpInstance = () => {
188
- console.warn('debug 获取当前 mp page 实例,禁止在生产环境使用');
187
+ $page.__internal__.mpInstance = (disableLog) => {
188
+ if (!disableLog) {
189
+ console.warn('debug 获取当前 mp page 实例,禁止在生产环境使用');
190
+ }
189
191
  return currentMpInstance
190
192
  }
191
193
  }
@@ -243,7 +245,7 @@ export function createPage({
243
245
  },
244
246
  detached() {
245
247
  const $page = this._getInstance();
246
- const instance = $page.__internal__.mpInstance?.()
248
+ const instance = $page.__internal__.mpInstance?.(true)
247
249
  if( instance === this ){
248
250
  $page.__internal__.mpInstance = () => null
249
251
  }
@@ -35,7 +35,13 @@ const CLOUD_CONFIG = {
35
35
  /**
36
36
  * 是否是处于私有化版本
37
37
  */
38
- isPrivate: config.isPrivate
38
+ isPrivate: config.isPrivate,
39
+ privatelink: <%= privatelink || 'undefined' %>,
40
+ getPrivatelinkAdapter: async function() {
41
+ return require.async('../packages/$wd_system/index.js').then(({ tcbPrivatelinkAdapter }) => {
42
+ return tcbPrivatelinkAdapter
43
+ })
44
+ }
39
45
  }
40
46
 
41
47
  export default CLOUD_CONFIG
@@ -7,5 +7,6 @@
7
7
  })
8
8
  }
9
9
  }<% } %>
10
+ <% if(privatelink){ %>import { tcbPrivatelinkAdapter } from './privatelink/index';<%} else {%>const tcbPrivatelinkAdapter = undefined<% } %>
10
11
 
11
- export { Aegis }
12
+ export { Aegis, tcbPrivatelinkAdapter }
@@ -2,7 +2,11 @@
2
2
  "name": "wd-system-sub-package",
3
3
  "version": "0.0.1",
4
4
  "scripts": {},
5
- "dependencies": {<% if(cdnEndpoints.aegis){ %>
6
- "aegis-mp-sdk": "~1.38.1"<% } %>
7
- }
5
+ "dependencies": <%= JSON.stringify({
6
+ ...(cdnEndpoints.aegis && { "aegis-mp-sdk": "~1.38.1" }),
7
+ ...(privatelink && {
8
+ "polyfill-crypto.getrandomvalues": "^1.0.0",
9
+ "cloudbase-adapter-privatelink": "0.0.1"
10
+ }),
11
+ }, undefined, 2) %>
8
12
  }