@cloudbase/lowcode-builder 1.8.108 → 1.8.110
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare function generatePackageDependencies({ importJSSDK, mode, officialLibVersion, }: {
|
|
1
|
+
export declare function generatePackageDependencies({ importJSSDK, mode, officialLibVersion, uin, }: {
|
|
2
2
|
importJSSDK: boolean;
|
|
3
3
|
mode: 'lib' | string;
|
|
4
4
|
officialLibVersion?: string;
|
|
5
|
+
uin?: string;
|
|
5
6
|
}): {
|
|
6
7
|
'miniprogram-gesture': string;
|
|
7
8
|
mobx: string;
|
|
@@ -13,14 +13,15 @@ const BASE_DEPS = {
|
|
|
13
13
|
*/
|
|
14
14
|
const CLOUDBASE_DEPS = {
|
|
15
15
|
'@cloudbase/oauth': '0.1.1-alpha.11',
|
|
16
|
-
'@cloudbase/weda-client': '1.1.
|
|
16
|
+
'@cloudbase/weda-client': '1.1.4',
|
|
17
17
|
'@cloudbase/weda-cloud-sdk': '1.0.64',
|
|
18
18
|
};
|
|
19
|
-
function generatePackageDependencies({ importJSSDK, mode, officialLibVersion, }) {
|
|
19
|
+
function generatePackageDependencies({ importJSSDK, mode, officialLibVersion, uin, }) {
|
|
20
20
|
const deps = {};
|
|
21
21
|
if (importJSSDK) {
|
|
22
22
|
deps['@cloudbase/js-sdk'] = '2.5.45-beta.0';
|
|
23
23
|
}
|
|
24
|
+
const mod = uin ? Number(uin) % 10 : undefined;
|
|
24
25
|
if (mode === 'lib') {
|
|
25
26
|
// eslint-disable-next-line no-restricted-syntax
|
|
26
27
|
for (const key in CLOUDBASE_DEPS) {
|
|
@@ -35,7 +36,10 @@ function generatePackageDependencies({ importJSSDK, mode, officialLibVersion, })
|
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
37
38
|
for (const key in CLOUDBASE_DEPS) {
|
|
38
|
-
deps[key] =
|
|
39
|
+
deps[key] =
|
|
40
|
+
mode !== undefined && !isNaN(mod) && mod <= 1 && key === '@cloudbase/weda-cloud-sdk'
|
|
41
|
+
? '1.0.65'
|
|
42
|
+
: CLOUDBASE_DEPS[key];
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
return {
|
package/lib/builder/mp/index.js
CHANGED
|
@@ -212,7 +212,11 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
212
212
|
'package.json': {
|
|
213
213
|
appId,
|
|
214
214
|
extraDeps: {
|
|
215
|
-
...(0, index_1.generatePackageDependencies)({
|
|
215
|
+
...(0, index_1.generatePackageDependencies)({
|
|
216
|
+
importJSSDK: endpointType === 'tcb-api',
|
|
217
|
+
mode: 'app',
|
|
218
|
+
uin: buildContext.uin,
|
|
219
|
+
}),
|
|
216
220
|
...resolveNpmDeps(weapps, materials),
|
|
217
221
|
},
|
|
218
222
|
},
|
|
@@ -382,7 +386,11 @@ async function generateWxMp({ buildContext: _buildContext, weapps, calses, deplo
|
|
|
382
386
|
'package.json': {
|
|
383
387
|
appId,
|
|
384
388
|
extraDeps: {
|
|
385
|
-
...(0, index_1.generatePackageDependencies)({
|
|
389
|
+
...(0, index_1.generatePackageDependencies)({
|
|
390
|
+
importJSSDK: endpointType === 'tcb-api',
|
|
391
|
+
mode: 'app',
|
|
392
|
+
uin: buildContext.uin,
|
|
393
|
+
}),
|
|
386
394
|
...resolveNpmDeps(weapps, materials),
|
|
387
395
|
},
|
|
388
396
|
cdnEndpoints,
|
package/lib/builder/mp/wxml.js
CHANGED
|
@@ -327,7 +327,7 @@ function generateWxml(ctx, widgets, docTag, wxmlDataPrefix, usingComponents, com
|
|
|
327
327
|
/**
|
|
328
328
|
* 来自外部引用的组件,添加系统系别的事件绑定
|
|
329
329
|
*/
|
|
330
|
-
if (
|
|
330
|
+
if (componentGenerics[tagName] || usingComponents[tagName] /* && !ctx.disablePageComponentInvoke */) {
|
|
331
331
|
node.attributes['bind:attached'] = '__mnt__';
|
|
332
332
|
node.attributes['bind:detached'] = '__unmnt__';
|
|
333
333
|
}
|