@cloudbase/lowcode-builder 1.0.25 → 1.0.26

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,7 +6,7 @@ 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_20220810.zip";
9
+ export declare const builderTemplateURL = "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template_20220722.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
@@ -44,7 +44,7 @@ exports.materialsDirName = 'materials'; // materials diretory of current project
44
44
  * src/template的代码,在IDE编辑器插件中构建builder
45
45
  * 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
46
46
  */
47
- exports.builderTemplateURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template_20220810.zip';
47
+ exports.builderTemplateURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template_20220722.zip';
48
48
  /**
49
49
  * miniprogram的代码,IDE插件后续会提供端功能
50
50
  * 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488&region=ap-shanghai&path=%252Flcap-builder%252F
@@ -12,6 +12,7 @@ const common_1 = require("../types/common");
12
12
  const index_1 = require("../mp/index");
13
13
  const types_1 = require("../../types");
14
14
  const mixMode_1 = require("../mp/mixMode");
15
+ const index_2 = require("../h5/index");
15
16
  const common_2 = require("../../utils/common");
16
17
  const postProcess_1 = require("../../utils/postProcess");
17
18
  const net_1 = require("../util/net");
@@ -93,26 +94,26 @@ async function buildWedaApp({ cals, subAppCalsList = [], dependencies = [], appK
93
94
  return outDir;
94
95
  }
95
96
  else {
96
- // const h5BuildDir = await buildH5App({
97
- // appKey,
98
- // buildDir: appBuildDir,
99
- // dependencies,
100
- // cals,
101
- // subAppCalsList,
102
- // extraData,
103
- // buildTypeList,
104
- // mode,
105
- // devTool,
106
- // runtime,
107
- // deployMode,
108
- // ignoreInstall,
109
- // domain,
110
- // });
111
- // cb?.(null, {
112
- // outDir: h5BuildDir,
113
- // timeElapsed: Date.now() - startTime,
114
- // });
115
- // return h5BuildDir;
97
+ const h5BuildDir = await (0, index_2.buildH5App)({
98
+ appKey,
99
+ buildDir: appBuildDir,
100
+ dependencies,
101
+ cals,
102
+ subAppCalsList,
103
+ extraData,
104
+ buildTypeList,
105
+ mode,
106
+ devTool,
107
+ runtime,
108
+ deployMode,
109
+ ignoreInstall,
110
+ domain,
111
+ });
112
+ cb === null || cb === void 0 ? void 0 : cb(null, {
113
+ outDir: h5BuildDir,
114
+ timeElapsed: Date.now() - startTime,
115
+ });
116
+ return h5BuildDir;
116
117
  }
117
118
  }
118
119
  catch (e) {
@@ -162,7 +162,7 @@ async function generateWxMp({ weapps, projDir, appId, domain, materials, plugins
162
162
  styles = styles.concat((lib.styles || []).map((stylePath) => stylePath && !stylePath.startsWith('/') ? `/${config_1.materialsDirName}/${lib.name}/${stylePath}` : stylePath) || []);
163
163
  return styles;
164
164
  }, [])
165
- .concat(importor.styles.map((mod) => path_1.default.join('lowcode', (0, weapps_core_1.getCodeModuleFilePath)('global', mod, { style: '.wxss' })))),
165
+ .concat(importor.styles.map((mod) => path_1.default.posix.join('lowcode', (0, weapps_core_1.getCodeModuleFilePath)('global', mod, { style: '.wxss' })))),
166
166
  },
167
167
  'package.json': {
168
168
  appId,
@@ -322,7 +322,7 @@ async function generatePkg(weapp, appRoot, ctx, pageConfigs) {
322
322
  },
323
323
  debug: ctx.debugMode,
324
324
  stringifyObj: util_1.inspect,
325
- subLevelPath: rootPath ? `${path_1.default.relative(rootPath, '')}/` : '',
325
+ subLevelPath: rootPath ? `${path_1.default.posix.relative(rootPath, '')}/` : '',
326
326
  importor,
327
327
  },
328
328
  [`index.json|${pageFileName}.json`]: {
@@ -336,7 +336,7 @@ async function generatePkg(weapp, appRoot, ctx, pageConfigs) {
336
336
  },
337
337
  [`index.wxss|${pageFileName}.wxss`]: {
338
338
  subWxss: rootPath && !((_b = ctx.mainAppData) === null || _b === void 0 ? void 0 : _b.mpPkgUrl)
339
- ? `@import "${path_1.default.relative(`/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
339
+ ? `@import "${path_1.default.posix.relative(`/${rootPath}/pages/${page.id}`, '/lowcode')}/style.wxss";`
340
340
  : '',
341
341
  content: (0, weapps_core_1.toCssText)((0, cals_1.processCommonStyle2CSSProperties)(page.commonStyle, {
342
342
  toRem: false,
@@ -391,7 +391,7 @@ async function generateFramework(appData, outDir, ctx) {
391
391
  'app/weapps-api.js': {
392
392
  appId: ctx.appId,
393
393
  domain: ctx.domain || '',
394
- subLevelPath: appData.rootPath ? `${path_1.default.relative(`${appData.rootPath}`, '')}/` : '',
394
+ subLevelPath: appData.rootPath ? `${path_1.default.posix.relative(`${appData.rootPath}`, '')}/` : '',
395
395
  subPackageName: appData.rootPath || '',
396
396
  importor,
397
397
  appConfig: (0, util_3.JsonToStringWithVariableName)({