@cloudbase/lowcode-builder 1.8.32 → 1.8.33

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.
@@ -6,12 +6,12 @@ export declare const materialsDirName = "materials";
6
6
  * src/template的代码,在IDE编辑器插件中构建builder
7
7
  * 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
8
8
  */
9
- export declare const builderTemplateURL = "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template.1.8.27.zip";
9
+ export declare const builderTemplateURL = "https://comp-public-1303824488.file.myqcloud.com/lcap-builder/template.1.8.33.zip";
10
10
  /**
11
11
  * miniprogram的代码,IDE插件后续会提供端功能
12
12
  * 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
13
13
  */
14
- export declare const miniprogramURL = "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/miniprogram_npm.1.8.19.zip";
14
+ export declare const miniprogramURL = "https://comp-public-1303824488.file.myqcloud.com/lcap-builder/miniprogram_npm.1.8.33.zip";
15
15
  /**
16
16
  * miniprogram_npm存放目录。IDE插件builder用到
17
17
  */
@@ -45,12 +45,12 @@ exports.materialsDirName = 'materials'; // materials diretory of current project
45
45
  * src/template的代码,在IDE编辑器插件中构建builder
46
46
  * 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
47
47
  */
48
- exports.builderTemplateURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template.1.8.27.zip';
48
+ exports.builderTemplateURL = 'https://comp-public-1303824488.file.myqcloud.com/lcap-builder/template.1.8.33.zip';
49
49
  /**
50
50
  * miniprogram的代码,IDE插件后续会提供端功能
51
51
  * 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
52
52
  */
53
- exports.miniprogramURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/miniprogram_npm.1.8.19.zip';
53
+ exports.miniprogramURL = 'https://comp-public-1303824488.file.myqcloud.com/lcap-builder/miniprogram_npm.1.8.33.zip';
54
54
  /**
55
55
  * miniprogram_npm存放目录。IDE插件builder用到
56
56
  */
@@ -40,6 +40,7 @@ export interface IBuildWedaApp extends IBaseAppProps {
40
40
  cdnEndpoints?: ICDN_ENDPOINTS_COFIG;
41
41
  isPrivateMode?: boolean;
42
42
  endpointType?: 'tcb-api' | 'wechat-service';
43
+ enableExpiredTag?: boolean;
43
44
  }
44
45
  export declare function buildWedaConfig({ output, domain, isPrivateMode, endpointType, buildTypeList, }: {
45
46
  output: Required<IBuildWedaApp['output']>;
@@ -48,7 +49,7 @@ export declare function buildWedaConfig({ output, domain, isPrivateMode, endpoin
48
49
  endpointType?: IBuildWedaApp['endpointType'];
49
50
  buildTypeList?: IBuildWedaApp['buildTypeList'];
50
51
  }): Promise<void>;
51
- export declare function buildWedaApp({ cals, subAppCalsList, dependencies, appKey, runtime, ignoreInstall, buildTypeList, mode, devTool, deployOptions, generateMpType, plugins, extraData, resourceAppId, domain, output, isBrowserMpBuilder, cdnEndpoints, isPrivateMode, endpointType, }: IBuildWedaApp, cb?: WebpackBuildCallBack): Promise<any>;
52
+ export declare function buildWedaApp({ cals, subAppCalsList, dependencies, appKey, runtime, ignoreInstall, buildTypeList, mode, devTool, deployOptions, generateMpType, plugins, extraData, resourceAppId, domain, output, isBrowserMpBuilder, cdnEndpoints, isPrivateMode, endpointType, enableExpiredTag, }: IBuildWedaApp, cb?: WebpackBuildCallBack): Promise<any>;
52
53
  export declare function cleanComponentDir(): Promise<void>;
53
54
  export declare const version: any;
54
55
  export { getFiles, fileToZip, strToBuf } from '../util/generateFiles';
@@ -60,7 +60,7 @@ exports.buildWedaConfig = buildWedaConfig;
60
60
  async function buildWedaApp({ cals, subAppCalsList = [], dependencies = [], appKey = 'test', runtime = types_1.RUNTIME.NONE, ignoreInstall = false, buildTypeList = [common_1.BuildType.WEB], mode = common_1.WebpackModeType.PRODUCTION, devTool = 'webpack', deployOptions = { mode: types_1.DEPLOY_MODE.PREVIEW }, generateMpType = common_1.GenerateMpType.APP, plugins = [], extraData = {
61
61
  isComposite: false,
62
62
  compProps: {},
63
- }, resourceAppId = undefined, domain = '', output, isBrowserMpBuilder = false, cdnEndpoints, isPrivateMode = false, endpointType = undefined, }, cb) {
63
+ }, resourceAppId = undefined, domain = '', output, isBrowserMpBuilder = false, cdnEndpoints, isPrivateMode = false, endpointType = undefined, enableExpiredTag = false, }, cb) {
64
64
  var _a, _b, _c;
65
65
  if (!cals) {
66
66
  console.error('无效的应用配置');
@@ -81,6 +81,7 @@ async function buildWedaApp({ cals, subAppCalsList = [], dependencies = [], appK
81
81
  isBrowserMpBuilder,
82
82
  isPrivateMode,
83
83
  endpointType,
84
+ enableExpiredTag,
84
85
  };
85
86
  console.log('domain', domain);
86
87
  console.log('应用名', appKey);
@@ -48,7 +48,7 @@ const url_1 = require("url");
48
48
  const transform_1 = require("../../utils/transform");
49
49
  async function buildH5App({ buildContext, i18nConfig, extraData, cals: _cals, buildTypeList = [common_1.BuildType.WEB], subAppCalsList, mode, devTool, runtime = types_1.RUNTIME.NONE, deployOptions = { mode: types_1.DEPLOY_MODE.PREVIEW }, ignoreInstall = false, cdnEndpoints, }) {
50
50
  var _a, _b, _c;
51
- const { projDir: buildDir, domain, materialLibs: dependencies, appId: appKey, isPrivateMode } = buildContext;
51
+ const { projDir: buildDir, domain, materialLibs: dependencies, appId: appKey, isPrivateMode, enableExpiredTag, } = buildContext;
52
52
  if (!deployOptions.mode) {
53
53
  deployOptions.mode = types_1.DEPLOY_MODE.PREVIEW;
54
54
  }
@@ -119,6 +119,7 @@ async function buildH5App({ buildContext, i18nConfig, extraData, cals: _cals, bu
119
119
  deployOptions,
120
120
  _indexPage,
121
121
  isPrivateMode,
122
+ expirationStartTimesnap: enableExpiredTag ? Date.now() : undefined,
122
123
  });
123
124
  console.timeEnd(runGenerateTag);
124
125
  // // 构建 NPM 包
@@ -39,4 +39,8 @@ export interface IBuildContext {
39
39
  * 应用版本
40
40
  */
41
41
  version?: string;
42
+ /**
43
+ * 是否启用过期
44
+ */
45
+ enableExpiredTag?: boolean;
42
46
  }
@@ -99,14 +99,18 @@ async function generateWxMp({ buildContext, weapps, plugins, deployOptions, opti
99
99
  isPrivateMode,
100
100
  endpointType,
101
101
  }, miniprogramRoot);
102
+ const expirationStartTimesnap = buildContext.enableExpiredTag ? Date.now() : 0;
102
103
  appFileData = {
103
104
  ...appFileData,
104
105
  'common/style.js': {},
105
106
  'common/util.js': {
106
107
  isAdminPortal: (0, common_1.buildAsAdminPortalByBuildType)(buildTypeList),
108
+ expirationStartTimesnap,
107
109
  },
108
110
  'common/widget.js': {},
109
- 'common/weapp-page.js': {},
111
+ 'common/weapp-page.js': {
112
+ expirationStartTimesnap,
113
+ },
110
114
  'common/weapp-component.js': {},
111
115
  'common/merge-renderer.js': {
112
116
  dataPropNames: wxmlDataPrefix,
@@ -120,7 +124,7 @@ async function generateWxMp({ buildContext, weapps, plugins, deployOptions, opti
120
124
  },
121
125
  'common/query.js': {},
122
126
  'common/flow.js': {},
123
- 'common/loading': {},
127
+ 'common/info': {},
124
128
  /**
125
129
  * 调试用
126
130
  */
@@ -29,7 +29,7 @@ function generateWxml(ctx, widgets, docTag, wxmlDataPrefix, usingComponents, com
29
29
  name: enablePageRoot ? 'view' : 'block',
30
30
  attributes: {
31
31
  id: 'wd-page-root',
32
- ['wx:if']: '{{weDaHasLogin}}',
32
+ ['wx:if']: '{{weDaHasLogin && !_expiredMessage}}',
33
33
  ['data-weui-theme']: 'light',
34
34
  },
35
35
  elements: [
@@ -54,13 +54,29 @@ function generateWxml(ctx, widgets, docTag, wxmlDataPrefix, usingComponents, com
54
54
  _parent: null,
55
55
  },
56
56
  ];
57
+ if (ctx.enableExpiredTag) {
58
+ usingComponents['wd-info'] = '/common/info/index';
59
+ xmlJson.elements.push({
60
+ type: 'element',
61
+ name: 'wd-info',
62
+ attributes: {
63
+ ['wx:if']: '{{_expiredMessage}}',
64
+ message: '{{_expiredMessage}}',
65
+ type: 'info',
66
+ },
67
+ elements: [],
68
+ _order: Infinity,
69
+ _parent: null,
70
+ });
71
+ }
57
72
  if (ctx.enableLoading) {
58
- usingComponents['wd-loading'] = '/common/loading/index';
73
+ usingComponents['wd-info'] = '/common/info/index';
59
74
  xmlJson.elements.push({
60
75
  type: 'element',
61
- name: 'wd-loading',
76
+ name: 'wd-info',
62
77
  attributes: {
63
- ['wx:if']: '{{_isCheckingAtuh}}',
78
+ ['wx:if']: '{{_isCheckingAtuh && !_expiredMessage}}',
79
+ type: 'loading',
64
80
  },
65
81
  elements: [],
66
82
  _order: Infinity,