@cloudbase/lowcode-builder 1.0.24 → 1.0.27
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/lib/builder/config/index.d.ts +1 -1
- package/lib/builder/config/index.js +1 -1
- package/lib/builder/mp/index.js +4 -4
- package/lib/builder/service/webpack.js +1 -0
- package/lib/builder/util/generateFiles.d.ts +2 -1
- package/lib/builder.web.js +11 -11
- package/package.json +3 -3
- package/template/html/index.html.ejs +2 -2
|
@@ -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®ion=ap-shanghai&path=%252Flcap-builder%252F
|
|
8
8
|
*/
|
|
9
|
-
export declare const builderTemplateURL = "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/
|
|
9
|
+
export declare const builderTemplateURL = "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template_20220810.zip";
|
|
10
10
|
/**
|
|
11
11
|
* miniprogram的代码,IDE插件后续会提供端功能
|
|
12
12
|
* 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488®ion=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®ion=ap-shanghai&path=%252Flcap-builder%252F
|
|
46
46
|
*/
|
|
47
|
-
exports.builderTemplateURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/
|
|
47
|
+
exports.builderTemplateURL = 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/lcap-builder/template_20220810.zip';
|
|
48
48
|
/**
|
|
49
49
|
* miniprogram的代码,IDE插件后续会提供端功能
|
|
50
50
|
* 存放在大账号:100015939275。访问地址:https://console.cloud.tencent.com/cos/bucket?bucket=comp-public-1303824488®ion=ap-shanghai&path=%252Flcap-builder%252F
|
package/lib/builder/mp/index.js
CHANGED
|
@@ -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)({
|
|
@@ -287,6 +287,7 @@ function getWebpackWebBuildParams(appId, appBuildDir, publicPath = '/', mode = c
|
|
|
287
287
|
mobx: 'window.mobx',
|
|
288
288
|
'@cloudbase/js-sdk': 'window.cloudbase',
|
|
289
289
|
'@cloudbase/weda-cloud-sdk/dist/h5': 'window.CloudSDK',
|
|
290
|
+
'@cloudbase/weda-cloud-sdk': 'window.CloudSDK',
|
|
290
291
|
'@zxing/library': 'window.ZXing',
|
|
291
292
|
'@cloudbase/lowcode-render': 'window["weda-render"]',
|
|
292
293
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { IBuildContext } from '../mp/BuildContext';
|
|
3
3
|
import { OutputType } from 'jszip';
|
|
4
|
+
import { Buffer } from 'buffer';
|
|
4
5
|
export default function generateFiles(appFileData: any, srcDir: string, dstDir: string, ctx: IBuildContext): Promise<string[]>;
|
|
5
6
|
export declare function writeFile(outFile: string, content: string): Promise<boolean>;
|
|
6
7
|
export declare function removeFile(file: string): void;
|
|
@@ -47,5 +48,5 @@ export declare function getFiles(dir: string, files_: any, replacePath?: string)
|
|
|
47
48
|
*/
|
|
48
49
|
export declare function fileToZip(files: {
|
|
49
50
|
[key: string]: Uint8Array;
|
|
50
|
-
}, type: OutputType): Promise<string | Buffer | Uint8Array | number[] |
|
|
51
|
+
}, type: OutputType): Promise<string | Buffer | Uint8Array | ArrayBuffer | number[] | Blob>;
|
|
51
52
|
export declare function strToBuf(str: any): Buffer;
|