@cloudbase/lowcode-builder 1.6.4-alpha.0 → 1.6.5
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/dist/builder.web.js +71 -0
- package/lib/.turbo/turbo-build.log +0 -0
- package/lib/.turbo/turbo-develop.log +0 -0
- package/lib/builder/config/index.d.ts +1 -1
- package/lib/builder/h5/copy.d.ts +1 -1
- package/lib/builder/h5/material.d.ts +1 -0
- package/lib/builder/mp/index.d.ts +1 -1
- package/lib/builder/mp/materials.d.ts +2 -2
- package/lib/builder/mp/util.d.ts +2 -2
- package/lib/builder/service/webpack.d.ts +3 -3
- package/lib/builder/types/common.js +1 -8
- package/lib/builder.web.js +71 -0
- package/lib/test.d.ts +11 -0
- package/lib/test.js +717 -0
- package/package.json +4 -4
- package/template/html/index.html.ejs +49 -50
- package/template/mp/app.js +6 -2
- package/template/mp/common/util.js +100 -31
- package/template/mp/common/weapp-component.js +4 -1
- package/template/mp/common/weapp-page.js +7 -2
- package/template/mp/page/api.js +3 -1
- package/template/webpack/web.prod.js +2 -1
|
File without changes
|
|
File without changes
|
package/lib/builder/h5/copy.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IWebRuntimeAppData, II18nConfig } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
1
|
+
import { IWebRuntimeAppData, II18nConfig, IMaterialItem } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
2
2
|
export declare function runCopy(appBuildDir: string, webRuntimeAppData: IWebRuntimeAppData, i18nConfig?: II18nConfig): Promise<void>;
|
|
3
3
|
export declare function copyMaterialLibraries(dependencies: IMaterialItem[] | undefined, materialsDir: string, appBuildDir: string): Promise<void[]>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { IMaterialItem } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
1
2
|
import { RUNTIME } from '../../types';
|
|
2
3
|
export declare function runHandleMaterial(appBuildDir: string, dependencies: IMaterialItem[] | undefined, materialsDir: string, runtime?: RUNTIME, ignoreInstall?: boolean): Promise<any[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IWeAppData, IPlugin } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
2
2
|
import { IBuildContext } from './BuildContext';
|
|
3
|
-
import { BuildType } from '../types/common';
|
|
3
|
+
import { BuildType, IAppUsedComp, IUsedComps } from '../types/common';
|
|
4
4
|
import { IBuildWedaApp } from '../core';
|
|
5
5
|
export declare function generateWxMp({ buildContext, weapps, plugins, deployOptions, options, buildTypeList, ignoreInstall, }: {
|
|
6
6
|
buildContext: IBuildContext;
|
|
@@ -19,9 +19,9 @@ export declare function extractUsedCompsRecursively(comps: IUsedComps, checkedCo
|
|
|
19
19
|
* }
|
|
20
20
|
*/
|
|
21
21
|
export declare function getWxmlTag(ctx: IBuildContext, cmp: Required<IWeAppComponentInstance>['xComponent'], nameMangler?: NameMangler): {
|
|
22
|
-
tagName:
|
|
22
|
+
tagName: string;
|
|
23
23
|
path?: undefined;
|
|
24
24
|
} | {
|
|
25
|
-
tagName:
|
|
25
|
+
tagName: string;
|
|
26
26
|
path: any;
|
|
27
27
|
};
|
package/lib/builder/mp/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDynamicValue, IWeAppComponentInstance, ICompositedComponent, IWeAppPage } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
1
|
+
import { IDynamicValue, IWeAppComponentInstance, ActionType, ICompositedComponent, IWeAppPage, IEventListener } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
2
2
|
import { IBuildContext } from './BuildContext';
|
|
3
3
|
export declare function generatedDynamicData(data: {
|
|
4
4
|
[key: string]: IDynamicValue;
|
|
@@ -16,7 +16,7 @@ export declare function generateSyncListeners(syncConfigs: any): IEventListener[
|
|
|
16
16
|
export declare function generateDataContainerListeners(): {
|
|
17
17
|
trigger: string;
|
|
18
18
|
jsCode: string;
|
|
19
|
-
type:
|
|
19
|
+
type: ActionType;
|
|
20
20
|
data: {};
|
|
21
21
|
}[];
|
|
22
22
|
export declare function createDataBinds(ctx: IBuildContext, widgets: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IWebRuntimeAppData } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
1
|
+
import { IMaterialItem, IWebRuntimeAppData } from '@cloudbase/lowcode-generator/lib/weapps-core';
|
|
2
2
|
import { BuildType, WebpackModeType } from '../types/common';
|
|
3
3
|
import { RUNTIME } from '../../types';
|
|
4
4
|
export declare const PERSISTENT_DEPENDIENCES_MAP: {};
|
|
@@ -50,11 +50,11 @@ export declare function downloadAndWriteTabBarIcon(iconPath: any, pagePath: any,
|
|
|
50
50
|
export declare function generateKbonePageConfig(mpConfig: Record<string, any>, mainAppData: IWebRuntimeAppData, subAppDataList?: IWebRuntimeAppData[]): Record<string, any>;
|
|
51
51
|
export declare function generateKboneAppConfig(mpConfig: Record<string, any>, mainAppData: IWebRuntimeAppData): void;
|
|
52
52
|
export declare function generateMpJsonConfigFile(allAppDataList: IWebRuntimeAppData[], userConfig: any, appBuildDir: string, options: IGenerateMpJsonConfigFileOpts): Promise<void>;
|
|
53
|
-
export declare function getMainAppDataByList(allAppDataList: IWebRuntimeAppData[]):
|
|
53
|
+
export declare function getMainAppDataByList(allAppDataList: IWebRuntimeAppData[]): IWebRuntimeAppData | undefined;
|
|
54
54
|
export declare function getHomePageInstance(pageInstanceList: any): any;
|
|
55
55
|
export declare function getPageName(name: string): string;
|
|
56
56
|
export declare function getMpAllRouterConfig(allAppDataList: IWebRuntimeAppData[], getHome?: boolean): any;
|
|
57
|
-
export declare function getWebpackWebBuildParams(appId: string, appBuildDir: string, publicPath?: string, mode?:
|
|
57
|
+
export declare function getWebpackWebBuildParams(appId: string, appBuildDir: string, publicPath?: string, mode?: WebpackModeType, buildTypeList?: BuildType[], extraDefine?: {}, assets?: string[]): any;
|
|
58
58
|
export declare function getWebpackMpBuildParams(appBuildDir: string, materialsDir: string, dependencies: IMaterialItem[] | undefined, nodeModulesPath: string, allAppDataList: IWebRuntimeAppData[], mode: string, watch: boolean, options: IGenerateMpJsonConfigFileOpts): any;
|
|
59
59
|
export declare function getAllPageMpEntryPath(allAppDataList: IWebRuntimeAppData[], appBuildDir: string): Record<string, any>;
|
|
60
60
|
export declare function downloadAndInstallDependencies(dependencies: IMaterialItem[] | undefined, materialsDir: string, installOptions?: IInstallOpts): Promise<void>;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.buildAsXPageByBuildType = exports.buildAsAdminPortalByBuildType = exports.buildAsWebByBuildType = exports.WebpackModeType = exports.GenerateMpType = exports.BuildType = void 0;
|
|
4
4
|
var common_1 = require("@cloudbase/lowcode-generator/lib/generator/types/common");
|
|
5
5
|
Object.defineProperty(exports, "BuildType", { enumerable: true, get: function () { return common_1.BuildType; } });
|
|
6
6
|
Object.defineProperty(exports, "GenerateMpType", { enumerable: true, get: function () { return common_1.GenerateMpType; } });
|
|
7
7
|
Object.defineProperty(exports, "WebpackModeType", { enumerable: true, get: function () { return common_1.WebpackModeType; } });
|
|
8
|
-
Object.defineProperty(exports, "WebpackBuildCallBack", { enumerable: true, get: function () { return common_1.WebpackBuildCallBack; } });
|
|
9
|
-
Object.defineProperty(exports, "IPackageJson", { enumerable: true, get: function () { return common_1.IPackageJson; } });
|
|
10
8
|
Object.defineProperty(exports, "buildAsWebByBuildType", { enumerable: true, get: function () { return common_1.buildAsWebByBuildType; } });
|
|
11
9
|
Object.defineProperty(exports, "buildAsAdminPortalByBuildType", { enumerable: true, get: function () { return common_1.buildAsAdminPortalByBuildType; } });
|
|
12
10
|
Object.defineProperty(exports, "buildAsXPageByBuildType", { enumerable: true, get: function () { return common_1.buildAsXPageByBuildType; } });
|
|
13
|
-
Object.defineProperty(exports, "IAppUsedComp", { enumerable: true, get: function () { return common_1.IAppUsedComp; } });
|
|
14
|
-
Object.defineProperty(exports, "IUsedComps", { enumerable: true, get: function () { return common_1.IUsedComps; } });
|
|
15
|
-
Object.defineProperty(exports, "ISyncProp", { enumerable: true, get: function () { return common_1.ISyncProp; } });
|
|
16
|
-
Object.defineProperty(exports, "IComponentInputProps", { enumerable: true, get: function () { return common_1.IComponentInputProps; } });
|
|
17
|
-
Object.defineProperty(exports, "IFileCodeMap", { enumerable: true, get: function () { return common_1.IFileCodeMap; } });
|