@cloudbase/framework-plugin-low-code 1.7.1 → 1.7.2
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/package.json +3 -3
- package/lib/builder/config/common.d.ts +0 -2
- package/lib/builder/config/common.d.ts.map +0 -1
- package/lib/builder/config/common.js +0 -13
- package/lib/builder/config/index.d.ts +0 -3
- package/lib/builder/config/index.d.ts.map +0 -1
- package/lib/builder/config/index.js +0 -29
- package/lib/builder/config/mp.d.ts +0 -2
- package/lib/builder/config/mp.d.ts.map +0 -1
- package/lib/builder/config/mp.js +0 -13
- package/lib/builder/core/copy.d.ts +0 -5
- package/lib/builder/core/copy.d.ts.map +0 -1
- package/lib/builder/core/copy.js +0 -62
- package/lib/builder/core/generate.d.ts +0 -9
- package/lib/builder/core/generate.d.ts.map +0 -1
- package/lib/builder/core/generate.js +0 -128
- package/lib/builder/core/index.d.ts +0 -32
- package/lib/builder/core/index.d.ts.map +0 -1
- package/lib/builder/core/index.js +0 -149
- package/lib/builder/core/material.d.ts +0 -4
- package/lib/builder/core/material.d.ts.map +0 -1
- package/lib/builder/core/material.js +0 -80
- package/lib/builder/core/plugin.d.ts +0 -4
- package/lib/builder/core/plugin.d.ts.map +0 -1
- package/lib/builder/core/plugin.js +0 -30
- package/lib/builder/core/prepare.d.ts +0 -8
- package/lib/builder/core/prepare.d.ts.map +0 -1
- package/lib/builder/core/prepare.js +0 -108
- package/lib/builder/core/webpack.d.ts +0 -15
- package/lib/builder/core/webpack.d.ts.map +0 -1
- package/lib/builder/core/webpack.js +0 -58
- package/lib/builder/mp/BuildContext.d.ts +0 -13
- package/lib/builder/mp/BuildContext.d.ts.map +0 -1
- package/lib/builder/mp/BuildContext.js +0 -2
- package/lib/builder/mp/index.d.ts +0 -33
- package/lib/builder/mp/index.d.ts.map +0 -1
- package/lib/builder/mp/index.js +0 -450
- package/lib/builder/mp/lowcode.d.ts +0 -8
- package/lib/builder/mp/lowcode.d.ts.map +0 -1
- package/lib/builder/mp/lowcode.js +0 -54
- package/lib/builder/mp/materials.d.ts +0 -15
- package/lib/builder/mp/materials.d.ts.map +0 -1
- package/lib/builder/mp/materials.js +0 -338
- package/lib/builder/mp/mixMode.d.ts +0 -10
- package/lib/builder/mp/mixMode.d.ts.map +0 -1
- package/lib/builder/mp/mixMode.js +0 -215
- package/lib/builder/mp/mp_config.d.ts +0 -18
- package/lib/builder/mp/mp_config.d.ts.map +0 -1
- package/lib/builder/mp/mp_config.js +0 -206
- package/lib/builder/mp/util.d.ts +0 -20
- package/lib/builder/mp/util.d.ts.map +0 -1
- package/lib/builder/mp/util.js +0 -243
- package/lib/builder/mp/wxml.d.ts +0 -16
- package/lib/builder/mp/wxml.d.ts.map +0 -1
- package/lib/builder/mp/wxml.js +0 -300
- package/lib/builder/service/builder/copy.d.ts +0 -14
- package/lib/builder/service/builder/copy.d.ts.map +0 -1
- package/lib/builder/service/builder/copy.js +0 -189
- package/lib/builder/service/builder/generate.d.ts +0 -52
- package/lib/builder/service/builder/generate.d.ts.map +0 -1
- package/lib/builder/service/builder/generate.js +0 -792
- package/lib/builder/service/builder/index.d.ts +0 -16
- package/lib/builder/service/builder/index.d.ts.map +0 -1
- package/lib/builder/service/builder/index.js +0 -69
- package/lib/builder/service/builder/plugin.d.ts +0 -8
- package/lib/builder/service/builder/plugin.d.ts.map +0 -1
- package/lib/builder/service/builder/plugin.js +0 -149
- package/lib/builder/service/builder/webpack.d.ts +0 -91
- package/lib/builder/service/builder/webpack.d.ts.map +0 -1
- package/lib/builder/service/builder/webpack.js +0 -589
- package/lib/builder/types/common.d.ts +0 -12
- package/lib/builder/types/common.d.ts.map +0 -1
- package/lib/builder/types/common.js +0 -7
- package/lib/builder/util/common.d.ts +0 -36
- package/lib/builder/util/common.d.ts.map +0 -1
- package/lib/builder/util/common.js +0 -257
- package/lib/builder/util/console.d.ts +0 -2
- package/lib/builder/util/console.d.ts.map +0 -1
- package/lib/builder/util/console.js +0 -13
- package/lib/builder/util/generateFiles.d.ts +0 -6
- package/lib/builder/util/generateFiles.d.ts.map +0 -1
- package/lib/builder/util/generateFiles.js +0 -94
- package/lib/builder/util/index.d.ts +0 -2
- package/lib/builder/util/index.d.ts.map +0 -1
- package/lib/builder/util/index.js +0 -13
- package/lib/builder/util/junk.d.ts +0 -3
- package/lib/builder/util/junk.d.ts.map +0 -1
- package/lib/builder/util/junk.js +0 -25
- package/lib/builder/util/mp.d.ts +0 -5
- package/lib/builder/util/mp.d.ts.map +0 -1
- package/lib/builder/util/mp.js +0 -99
- package/lib/builder/util/name-mangler.d.ts +0 -3
- package/lib/builder/util/name-mangler.d.ts.map +0 -1
- package/lib/builder/util/name-mangler.js +0 -7
- package/lib/builder/util/net.d.ts +0 -3
- package/lib/builder/util/net.d.ts.map +0 -1
- package/lib/builder/util/net.js +0 -54
- package/lib/builder/util/process.d.ts +0 -9
- package/lib/builder/util/process.d.ts.map +0 -1
- package/lib/builder/util/process.js +0 -28
- package/lib/builder/util/style.d.ts +0 -2
- package/lib/builder/util/style.d.ts.map +0 -1
- package/lib/builder/util/style.js +0 -13
- package/lib/builder/util/weapp.d.ts +0 -2
- package/lib/builder/util/weapp.d.ts.map +0 -1
- package/lib/builder/util/weapp.js +0 -13
- package/lib/config/private.d.ts +0 -3
- package/lib/config/private.d.ts.map +0 -1
- package/lib/config/private.js +0 -14
- package/lib/generate.d.ts +0 -2
- package/lib/generate.d.ts.map +0 -1
- package/lib/generate.js +0 -49
- package/lib/generator/config/common.d.ts +0 -6
- package/lib/generator/config/common.d.ts.map +0 -1
- package/lib/generator/config/common.js +0 -25
- package/lib/generator/config/index.d.ts +0 -18
- package/lib/generator/config/index.d.ts.map +0 -1
- package/lib/generator/config/index.js +0 -43
- package/lib/generator/config/mp.d.ts +0 -56
- package/lib/generator/config/mp.d.ts.map +0 -1
- package/lib/generator/config/mp.js +0 -104
- package/lib/generator/core/generate.d.ts +0 -59
- package/lib/generator/core/generate.d.ts.map +0 -1
- package/lib/generator/core/generate.js +0 -663
- package/lib/generator/core/index.d.ts +0 -25
- package/lib/generator/core/index.d.ts.map +0 -1
- package/lib/generator/core/index.js +0 -102
- package/lib/generator/core/material.d.ts +0 -14
- package/lib/generator/core/material.d.ts.map +0 -1
- package/lib/generator/core/material.js +0 -230
- package/lib/generator/template.d.ts +0 -3
- package/lib/generator/template.d.ts.map +0 -1
- package/lib/generator/template.js +0 -3
- package/lib/generator/types/common.d.ts +0 -69
- package/lib/generator/types/common.d.ts.map +0 -1
- package/lib/generator/types/common.js +0 -21
- package/lib/generator/util/common.d.ts +0 -36
- package/lib/generator/util/common.d.ts.map +0 -1
- package/lib/generator/util/common.js +0 -238
- package/lib/generator/util/console.d.ts +0 -3
- package/lib/generator/util/console.d.ts.map +0 -1
- package/lib/generator/util/console.js +0 -17
- package/lib/generator/util/index.d.ts +0 -2
- package/lib/generator/util/index.d.ts.map +0 -1
- package/lib/generator/util/index.js +0 -13
- package/lib/generator/util/name-mangler.d.ts +0 -17
- package/lib/generator/util/name-mangler.d.ts.map +0 -1
- package/lib/generator/util/name-mangler.js +0 -63
- package/lib/generator/util/postcss-rpx.d.ts +0 -11
- package/lib/generator/util/postcss-rpx.d.ts.map +0 -1
- package/lib/generator/util/postcss-rpx.js +0 -16
- package/lib/generator/util/style.d.ts +0 -6
- package/lib/generator/util/style.d.ts.map +0 -1
- package/lib/generator/util/style.js +0 -92
- package/lib/generator/util/weapp.d.ts +0 -5
- package/lib/generator/util/weapp.d.ts.map +0 -1
- package/lib/generator/util/weapp.js +0 -17
- package/lib/types.d.ts +0 -14
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -19
- package/lib/utils/dataSource.d.ts +0 -28
- package/lib/utils/dataSource.d.ts.map +0 -1
- package/lib/utils/dataSource.js +0 -171
- package/lib/utils/postProcess.d.ts +0 -3
- package/lib/utils/postProcess.d.ts.map +0 -1
- package/lib/utils/postProcess.js +0 -48
- package/lib/weapps-core/config/index.d.ts +0 -2
- package/lib/weapps-core/config/index.d.ts.map +0 -1
- package/lib/weapps-core/config/index.js +0 -13
- package/lib/weapps-core/config/style.d.ts +0 -7
- package/lib/weapps-core/config/style.d.ts.map +0 -1
- package/lib/weapps-core/config/style.js +0 -70
- package/lib/weapps-core/index.d.ts +0 -6
- package/lib/weapps-core/index.d.ts.map +0 -1
- package/lib/weapps-core/index.js +0 -31
- package/lib/weapps-core/types/action.d.ts +0 -25
- package/lib/weapps-core/types/action.d.ts.map +0 -1
- package/lib/weapps-core/types/action.js +0 -28
- package/lib/weapps-core/types/app.d.ts +0 -142
- package/lib/weapps-core/types/app.d.ts.map +0 -1
- package/lib/weapps-core/types/app.js +0 -21
- package/lib/weapps-core/types/appbuild.d.ts +0 -63
- package/lib/weapps-core/types/appbuild.d.ts.map +0 -1
- package/lib/weapps-core/types/appbuild.js +0 -78
- package/lib/weapps-core/types/code_types.d.ts +0 -26
- package/lib/weapps-core/types/code_types.d.ts.map +0 -1
- package/lib/weapps-core/types/code_types.js +0 -2
- package/lib/weapps-core/types/git.d.ts +0 -7
- package/lib/weapps-core/types/git.d.ts.map +0 -1
- package/lib/weapps-core/types/git.js +0 -2
- package/lib/weapps-core/types/index.d.ts +0 -11
- package/lib/weapps-core/types/index.d.ts.map +0 -1
- package/lib/weapps-core/types/index.js +0 -22
- package/lib/weapps-core/types/lowcode.d.ts +0 -26
- package/lib/weapps-core/types/lowcode.d.ts.map +0 -1
- package/lib/weapps-core/types/lowcode.js +0 -25
- package/lib/weapps-core/types/material.d.ts +0 -90
- package/lib/weapps-core/types/material.d.ts.map +0 -1
- package/lib/weapps-core/types/material.js +0 -9
- package/lib/weapps-core/types/plugins.d.ts +0 -17
- package/lib/weapps-core/types/plugins.d.ts.map +0 -1
- package/lib/weapps-core/types/plugins.js +0 -2
- package/lib/weapps-core/types/style.d.ts +0 -93
- package/lib/weapps-core/types/style.d.ts.map +0 -1
- package/lib/weapps-core/types/style.js +0 -2
- package/lib/weapps-core/types/web.d.ts +0 -120
- package/lib/weapps-core/types/web.d.ts.map +0 -1
- package/lib/weapps-core/types/web.js +0 -2
- package/lib/weapps-core/utils/appbuild.d.ts +0 -6
- package/lib/weapps-core/utils/appbuild.d.ts.map +0 -1
- package/lib/weapps-core/utils/appbuild.js +0 -40
- package/lib/weapps-core/utils/common.d.ts +0 -16
- package/lib/weapps-core/utils/common.d.ts.map +0 -1
- package/lib/weapps-core/utils/common.js +0 -90
- package/lib/weapps-core/utils/file.d.ts +0 -12
- package/lib/weapps-core/utils/file.d.ts.map +0 -1
- package/lib/weapps-core/utils/file.js +0 -142
- package/lib/weapps-core/utils/formily.d.ts +0 -5
- package/lib/weapps-core/utils/formily.d.ts.map +0 -1
- package/lib/weapps-core/utils/formily.js +0 -416
- package/lib/weapps-core/utils/index.d.ts +0 -7
- package/lib/weapps-core/utils/index.d.ts.map +0 -1
- package/lib/weapps-core/utils/index.js +0 -18
- package/lib/weapps-core/utils/lowcdoe.d.ts +0 -4
- package/lib/weapps-core/utils/lowcdoe.d.ts.map +0 -1
- package/lib/weapps-core/utils/lowcdoe.js +0 -69
- package/lib/weapps-core/utils/style.d.ts +0 -17
- package/lib/weapps-core/utils/style.d.ts.map +0 -1
- package/lib/weapps-core/utils/style.js +0 -330
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IMaterialItem, IWebRuntimeAppData, IExtraData, IBuildType, II18nConfig } from '../../weapps-core';
|
|
2
|
-
import { IFileCodeMap } from '../types/common';
|
|
3
|
-
import { DEPLOY_MODE, RUNTIME } from '../../types';
|
|
4
|
-
export { serialize, deserialize } from '../../weapps-core';
|
|
5
|
-
export declare type BuildAppProps = {
|
|
6
|
-
dependencies: IMaterialItem[];
|
|
7
|
-
appKey: string;
|
|
8
|
-
mainAppData: IWebRuntimeAppData;
|
|
9
|
-
subAppDataList?: IWebRuntimeAppData[];
|
|
10
|
-
publicPath?: string;
|
|
11
|
-
i18nConfig?: II18nConfig;
|
|
12
|
-
extraData?: IExtraData;
|
|
13
|
-
basename?: string;
|
|
14
|
-
appBuildDir?: string;
|
|
15
|
-
jsAssets?: string[];
|
|
16
|
-
isSandbox?: boolean;
|
|
17
|
-
buildTypeList: IBuildType[];
|
|
18
|
-
ignoreInstall?: boolean;
|
|
19
|
-
deployMode?: DEPLOY_MODE;
|
|
20
|
-
runtime?: RUNTIME;
|
|
21
|
-
};
|
|
22
|
-
export declare function generateCode(props: BuildAppProps): Promise<IFileCodeMap>;
|
|
23
|
-
export declare function generateCompLibs(compLibs: any): Promise<{}>;
|
|
24
|
-
export default generateCode;
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generator/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAa,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE3D,oBAAY,aAAa,GAAG;IAC1B,YAAY,EAAE,aAAa,EAAE,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,kBAAkB,CAAC;IAChC,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAsB,YAAY,CAAC,KAAK,EAAE,aAAa,yBAmEtD;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,KAAA,eAqB9C;AAqBD,eAAe,YAAY,CAAC"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.generateCompLibs = exports.generateCode = exports.deserialize = exports.serialize = void 0;
|
|
16
|
-
const generate_1 = require("./generate");
|
|
17
|
-
const material_1 = require("./material");
|
|
18
|
-
const template_1 = __importDefault(require("../template"));
|
|
19
|
-
const path_1 = __importDefault(require("path"));
|
|
20
|
-
const types_1 = require("../../types");
|
|
21
|
-
var weapps_core_1 = require("../../weapps-core");
|
|
22
|
-
Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return weapps_core_1.serialize; } });
|
|
23
|
-
Object.defineProperty(exports, "deserialize", { enumerable: true, get: function () { return weapps_core_1.deserialize; } });
|
|
24
|
-
function generateCode(props) {
|
|
25
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
const { mainAppData, subAppDataList = [], dependencies, appKey = 'test', i18nConfig = {
|
|
27
|
-
enabled: false,
|
|
28
|
-
i18nData: {},
|
|
29
|
-
}, extraData = {
|
|
30
|
-
isComposite: false,
|
|
31
|
-
compProps: {},
|
|
32
|
-
}, basename = '/', isSandbox = false, buildTypeList = ["web"], ignoreInstall = false, deployMode = types_1.DEPLOY_MODE.PREVIEW, runtime = types_1.RUNTIME.NONE, } = props;
|
|
33
|
-
const fileCodeMap = {};
|
|
34
|
-
const appBuildDir = '/';
|
|
35
|
-
const excludeRegex = isSandbox ? /(monitor-jssdk\.min\.js)$/ : null;
|
|
36
|
-
const includeRegex = /^\/src\/(utils|handlers|app|store)/;
|
|
37
|
-
copyFiles({
|
|
38
|
-
appBuildDir,
|
|
39
|
-
excludeRegex,
|
|
40
|
-
includeRegex,
|
|
41
|
-
fileCodeMap,
|
|
42
|
-
});
|
|
43
|
-
if (!isSandbox) {
|
|
44
|
-
yield (0, material_1.runHandleMaterial)(appBuildDir, dependencies, i18nConfig, fileCodeMap, isSandbox);
|
|
45
|
-
}
|
|
46
|
-
yield (0, generate_1.runGenerateCore)({
|
|
47
|
-
appBuildDir,
|
|
48
|
-
appData: mainAppData,
|
|
49
|
-
subAppDataList,
|
|
50
|
-
dependencies,
|
|
51
|
-
appKey,
|
|
52
|
-
buildTypeList,
|
|
53
|
-
basename,
|
|
54
|
-
extraData,
|
|
55
|
-
i18nConfig,
|
|
56
|
-
fileCodeMap,
|
|
57
|
-
isSandbox,
|
|
58
|
-
ignoreInstall,
|
|
59
|
-
deployMode,
|
|
60
|
-
runtime,
|
|
61
|
-
});
|
|
62
|
-
return fileCodeMap;
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
exports.generateCode = generateCode;
|
|
66
|
-
function generateCompLibs(compLibs) {
|
|
67
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const fileCodeMap = {};
|
|
69
|
-
const dependencies = compLibs;
|
|
70
|
-
const isSandbox = true;
|
|
71
|
-
const i18nConfig = {};
|
|
72
|
-
const appBuildDir = '/';
|
|
73
|
-
yield (0, material_1.runHandleMaterial)(appBuildDir, dependencies, i18nConfig, fileCodeMap, isSandbox);
|
|
74
|
-
const includeRegex = /^\/src\/(utils|handlers)/;
|
|
75
|
-
copyFiles({
|
|
76
|
-
appBuildDir,
|
|
77
|
-
excludeRegex: null,
|
|
78
|
-
includeRegex,
|
|
79
|
-
fileCodeMap,
|
|
80
|
-
});
|
|
81
|
-
return fileCodeMap;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
exports.generateCompLibs = generateCompLibs;
|
|
85
|
-
function copyFiles({ appBuildDir, excludeRegex, includeRegex, fileCodeMap }) {
|
|
86
|
-
Object.keys(template_1.default).map((filePath) => {
|
|
87
|
-
if (includeRegex) {
|
|
88
|
-
const isInclude = includeRegex.test(filePath);
|
|
89
|
-
if (isInclude) {
|
|
90
|
-
const isExclude = excludeRegex === null || excludeRegex === void 0 ? void 0 : excludeRegex.test(filePath);
|
|
91
|
-
if (isExclude) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const dstFile = path_1.default.join(appBuildDir, filePath);
|
|
95
|
-
fileCodeMap[dstFile] = {
|
|
96
|
-
code: template_1.default[filePath].code,
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
exports.default = generateCode;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IComponentLibEntry, IMaterialItem } from '../../weapps-core';
|
|
2
|
-
import { IComponentsInfoMap, IFileCodeMap } from '../types/common';
|
|
3
|
-
export declare function runHandleMaterial(appBuildDir: string, dependencies: IMaterialItem[] | undefined, i18nConfig: any, fileCodeMap: IFileCodeMap, isSandbox: boolean): Promise<void>;
|
|
4
|
-
export declare function writeLowCodeFilesForCompositeComp(compositeGroups: IMaterialItem[], appBuildDir: string, fileMap: any, isSandbox: boolean): Promise<any>;
|
|
5
|
-
export declare function generateDefaultLowcodeIndex(data: any): void;
|
|
6
|
-
export declare function genCompositeComponentLibraries(dependencies: IMaterialItem[] | undefined, appBuildDir: string, materialGroupInfoMap: {
|
|
7
|
-
[name: string]: {
|
|
8
|
-
isComposite?: boolean | undefined;
|
|
9
|
-
version?: string | undefined;
|
|
10
|
-
entries?: IComponentLibEntry | undefined;
|
|
11
|
-
schemaVersion?: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
} | undefined, componentsInfoMap: IComponentsInfoMap, i18nConfig: any, fileMap: any, isSandbox: boolean): Promise<any>;
|
|
14
|
-
//# sourceMappingURL=material.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"material.d.ts","sourceRoot":"","sources":["../../../src/generator/core/material.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAElB,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AASnE,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,YAAY,6BAAsB,EAClC,UAAU,EAAE,GAAG,EACf,WAAW,EAAE,YAAY,EACzB,SAAS,EAAE,OAAO,iBASnB;AAiDD,wBAAsB,iCAAiC,CACrD,eAAe,EAAE,aAAa,EAAE,EAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,OAAO,gBAmGnB;AAED,wBAAgB,2BAA2B,CAAC,IAAI,KAAA,QAgB/C;AAED,wBAAsB,8BAA8B,CAClD,YAAY,6BAAsB,EAClC,WAAW,EAAE,MAAM,EACnB,oBAAoB;;;;;;;aAOd,EACN,iBAAiB,EAAE,kBAAkB,EACrC,UAAU,EAAE,GAAG,EACf,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,OAAO,gBAuHnB"}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
-
};
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.genCompositeComponentLibraries = exports.generateDefaultLowcodeIndex = exports.writeLowCodeFilesForCompositeComp = exports.runHandleMaterial = void 0;
|
|
35
|
-
const path = __importStar(require("path"));
|
|
36
|
-
const weapps_core_1 = require("../../weapps-core");
|
|
37
|
-
const util_1 = require("../util");
|
|
38
|
-
const generate_1 = require("./generate");
|
|
39
|
-
const template_1 = __importDefault(require("../template"));
|
|
40
|
-
const json_schema_defaults_1 = __importDefault(require("json-schema-defaults"));
|
|
41
|
-
const lodash_template_1 = __importDefault(require("lodash.template"));
|
|
42
|
-
const lodash_uniqby_1 = __importDefault(require("lodash.uniqby"));
|
|
43
|
-
const style_1 = require("../util/style");
|
|
44
|
-
const lodash_1 = require("lodash");
|
|
45
|
-
function runHandleMaterial(appBuildDir, dependencies = [], i18nConfig, fileCodeMap, isSandbox) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
yield handleCompositeComponent({
|
|
48
|
-
dependencies,
|
|
49
|
-
appBuildDir,
|
|
50
|
-
i18nConfig,
|
|
51
|
-
fileCodeMap,
|
|
52
|
-
isSandbox,
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
exports.runHandleMaterial = runHandleMaterial;
|
|
57
|
-
function handleCompositeComponent({ dependencies, appBuildDir, i18nConfig, fileCodeMap, isSandbox, }) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
const compositeDependencies = dependencies.filter((item) => item.isComposite);
|
|
60
|
-
const materialGroupInfoMap = {};
|
|
61
|
-
dependencies.forEach((item) => (materialGroupInfoMap[item.name] = {
|
|
62
|
-
isComposite: item.isComposite,
|
|
63
|
-
version: item.version,
|
|
64
|
-
entries: item.entries,
|
|
65
|
-
schemaVersion: item.schemaVersion,
|
|
66
|
-
}));
|
|
67
|
-
console.log('=====================================*****', materialGroupInfoMap);
|
|
68
|
-
const componentsInfoMap = yield (0, util_1.getComponentsInfo)(path.join(appBuildDir, 'src'), dependencies, fileCodeMap);
|
|
69
|
-
yield writeLowCodeFilesForCompositeComp(compositeDependencies, appBuildDir, fileCodeMap, isSandbox);
|
|
70
|
-
yield genCompositeComponentLibraries(compositeDependencies, appBuildDir, materialGroupInfoMap, componentsInfoMap, i18nConfig, fileCodeMap, isSandbox);
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function writeLowCodeFilesForCompositeComp(compositeGroups, appBuildDir, fileMap, isSandbox) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
yield Promise.all(compositeGroups.map((gItem) => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const common = yield (0, util_1.writeLibCommonRes2file)(gItem, path.join(appBuildDir, 'src', 'libraries', `${gItem.name}@${gItem.version}`, 'libCommonRes'));
|
|
77
|
-
Object.assign(fileMap, common);
|
|
78
|
-
const compLibCommonResource = gItem.compLibCommonResource;
|
|
79
|
-
let themeCode = '';
|
|
80
|
-
if (compLibCommonResource) {
|
|
81
|
-
themeCode = `
|
|
82
|
-
${compLibCommonResource.theme.variable || ''}
|
|
83
|
-
${compLibCommonResource.class || ''}
|
|
84
|
-
${compLibCommonResource.theme.class || ''}
|
|
85
|
-
`;
|
|
86
|
-
}
|
|
87
|
-
yield Promise.all(gItem.components.map((cItem) => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
generateDefaultLowcodeIndex(cItem);
|
|
89
|
-
return cItem.lowCodes.map((m) => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
const filePath = path.join(appBuildDir, 'src', 'libraries', `${gItem.name}@${gItem.version}`, 'components', cItem.name, 'lowcode');
|
|
91
|
-
cItem.materialName = gItem.name;
|
|
92
|
-
const fileItem = yield writeCode2file(m, filePath, cItem, themeCode, isSandbox);
|
|
93
|
-
Object.assign(fileMap, fileItem);
|
|
94
|
-
return fileMap;
|
|
95
|
-
}), {});
|
|
96
|
-
})));
|
|
97
|
-
return fileMap;
|
|
98
|
-
})));
|
|
99
|
-
return fileMap;
|
|
100
|
-
function writeCode2file(mod, lowcodeDir, comp, themeCode, isSandbox) {
|
|
101
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
const pageId = comp.name + '_' + comp.id;
|
|
103
|
-
const file = path.join(lowcodeDir, (0, weapps_core_1.getCodeModuleFilePath)(pageId, mod, {
|
|
104
|
-
style: '.css',
|
|
105
|
-
}));
|
|
106
|
-
let codeContent = '';
|
|
107
|
-
if (mod.type === 'style') {
|
|
108
|
-
codeContent = yield (0, style_1.processLess)(`.${(0, weapps_core_1.getCompositedComponentClass)(comp)} { \n${themeCode ? themeCode : ''}\n${mod.code}\n }`);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
const importApp = !isSandbox
|
|
112
|
-
? `import { app } from '/src/app/global-api'`
|
|
113
|
-
: `const app = new Proxy({}, {
|
|
114
|
-
get: function(obj, prop){ return window.app ? window.app[prop] : undefined},
|
|
115
|
-
set: function(obj, prop, value){ if(window.app) {return window.app[prop] = value} else {return undefined } }
|
|
116
|
-
})`;
|
|
117
|
-
codeContent = `${importApp}
|
|
118
|
-
const $app = app;
|
|
119
|
-
${mod.code.replace(/\$comp/g, 'this.$WEAPPS_COMP')};`;
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
[file]: {
|
|
123
|
-
code: codeContent,
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
exports.writeLowCodeFilesForCompositeComp = writeLowCodeFilesForCompositeComp;
|
|
131
|
-
function generateDefaultLowcodeIndex(data) {
|
|
132
|
-
const lowCodes = data.lowCodes || data.codeModules || [];
|
|
133
|
-
const fileTypes = ['index', 'style', 'state', 'lifecycle', 'computed'];
|
|
134
|
-
fileTypes.map((type) => {
|
|
135
|
-
const isHasLowcodeIndex = lowCodes.find((item) => item.type === type);
|
|
136
|
-
if (!isHasLowcodeIndex) {
|
|
137
|
-
const code = {
|
|
138
|
-
type: type,
|
|
139
|
-
name: type,
|
|
140
|
-
code: type === 'style' ? '' : `export default {}`,
|
|
141
|
-
path: `$comp_1/${type}`,
|
|
142
|
-
};
|
|
143
|
-
lowCodes.unshift(code);
|
|
144
|
-
return code;
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
exports.generateDefaultLowcodeIndex = generateDefaultLowcodeIndex;
|
|
149
|
-
function genCompositeComponentLibraries(dependencies = [], appBuildDir, materialGroupInfoMap = {}, componentsInfoMap, i18nConfig, fileMap, isSandbox) {
|
|
150
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
-
yield Promise.all(dependencies.map(({ name, version, components }) => __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
const materialNameVersion = `${name}@${version}`;
|
|
153
|
-
const librariesDir = path.join(appBuildDir, 'src/libraries', materialNameVersion);
|
|
154
|
-
yield Promise.all(components.map((compItem) => __awaiter(this, void 0, void 0, function* () {
|
|
155
|
-
compItem.materialName = name;
|
|
156
|
-
const wrapperClass = (0, weapps_core_1.getCompositedComponentClass)(compItem);
|
|
157
|
-
const componentSchemaJson = {
|
|
158
|
-
type: 'object',
|
|
159
|
-
properties: (0, weapps_core_1.readCmpInstances)(compItem.componentInstances),
|
|
160
|
-
};
|
|
161
|
-
const { widgets, dataBinds, componentSchema, } = (0, generate_1.getComponentSchemaString)(componentSchemaJson, true, componentsInfoMap, wrapperClass);
|
|
162
|
-
const templateData = {
|
|
163
|
-
id: compItem.id,
|
|
164
|
-
name: compItem.name,
|
|
165
|
-
defaultProps: (0, json_schema_defaults_1.default)({
|
|
166
|
-
type: 'object',
|
|
167
|
-
properties: compItem.dataForm || {},
|
|
168
|
-
}),
|
|
169
|
-
compConfig: compItem.compConfig || {},
|
|
170
|
-
emitEvents: JSON.stringify(compItem.emitEvents.map((evt) => evt.eventName)),
|
|
171
|
-
handlersImports: compItem.lowCodes.filter((codeItem) => codeItem.type === 'handler-fn' &&
|
|
172
|
-
codeItem.name !== '____index____'),
|
|
173
|
-
useComponents: (function () {
|
|
174
|
-
const list = [];
|
|
175
|
-
JSON.stringify(compItem.componentInstances, (key, value) => {
|
|
176
|
-
var _a;
|
|
177
|
-
if (key === 'xComponent') {
|
|
178
|
-
const { moduleName, name } = value;
|
|
179
|
-
const compLib = materialGroupInfoMap[moduleName];
|
|
180
|
-
let isPlainProps = false;
|
|
181
|
-
if (compLib) {
|
|
182
|
-
const { schemaVersion = '' } = compLib;
|
|
183
|
-
try {
|
|
184
|
-
if (Number((_a = schemaVersion.split('.')) === null || _a === void 0 ? void 0 : _a[0]) >= 3) {
|
|
185
|
-
isPlainProps = true;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
catch (e) { }
|
|
189
|
-
}
|
|
190
|
-
list.push({
|
|
191
|
-
moduleName,
|
|
192
|
-
name,
|
|
193
|
-
key: `${moduleName}:${name}`,
|
|
194
|
-
var: (0, lodash_1.upperFirst)((0, util_1.camelcase)(`${moduleName}:${name}`)),
|
|
195
|
-
moduleNameVar: (0, util_1.camelcase)(moduleName),
|
|
196
|
-
version: compLib === null || compLib === void 0 ? void 0 : compLib.version,
|
|
197
|
-
isComposite: compLib === null || compLib === void 0 ? void 0 : compLib.isComposite,
|
|
198
|
-
isPlainProps,
|
|
199
|
-
entries: compLib === null || compLib === void 0 ? void 0 : compLib.entries,
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
return value;
|
|
203
|
-
});
|
|
204
|
-
return (0, lodash_uniqby_1.default)(list, 'key');
|
|
205
|
-
})(),
|
|
206
|
-
widgets,
|
|
207
|
-
dataBinds,
|
|
208
|
-
componentSchema,
|
|
209
|
-
pageListenerInstances: (0, generate_1.getListenersString)(compItem.listeners, true),
|
|
210
|
-
materialName: name,
|
|
211
|
-
hasComponentAPI: compItem.lowCodes.some((item) => item.type === 'index'),
|
|
212
|
-
isSandbox,
|
|
213
|
-
};
|
|
214
|
-
const dest = path.resolve(librariesDir, `./components/${compItem.name}/index.jsx`);
|
|
215
|
-
const template = template_1.default['/src/pages/composite.tpl'].code;
|
|
216
|
-
try {
|
|
217
|
-
const jsx = (0, lodash_template_1.default)(template, { interpolate: /<%=([\s\S]+?)%>/g })(templateData);
|
|
218
|
-
fileMap[dest] = {
|
|
219
|
-
code: jsx,
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
catch (e) {
|
|
223
|
-
console.error('>>> template', template, e);
|
|
224
|
-
}
|
|
225
|
-
})));
|
|
226
|
-
})));
|
|
227
|
-
return fileMap;
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
exports.genCompositeComponentLibraries = genCompositeComponentLibraries;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../src/generator/template.ts"],"names":[],"mappings":";AAAA,wBAAiB"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { IComponentMeta, ICompositedComponent } from 'src/weapps-core';
|
|
2
|
-
export declare const enum BuildType {
|
|
3
|
-
PC = "pc",
|
|
4
|
-
ADMIN_PORTAL = "adminPortal",
|
|
5
|
-
WEB = "web",
|
|
6
|
-
MP = "mp",
|
|
7
|
-
APP = "app",
|
|
8
|
-
WECHAT_H5 = "wxH5",
|
|
9
|
-
WECHAT_WORK_H5 = "qywxH5",
|
|
10
|
-
XPAGE_PC = "xPagePC"
|
|
11
|
-
}
|
|
12
|
-
export declare const enum GenerateMpType {
|
|
13
|
-
APP = "app",
|
|
14
|
-
SUBPACKAGE = "subpackage"
|
|
15
|
-
}
|
|
16
|
-
export declare const enum WebpackModeType {
|
|
17
|
-
NONE = "",
|
|
18
|
-
PRODUCTION = "production"
|
|
19
|
-
}
|
|
20
|
-
export declare type WebpackBuildCallBack = (err: any, result?: {
|
|
21
|
-
outDir: string;
|
|
22
|
-
timeElapsed?: number;
|
|
23
|
-
plugins?: any[];
|
|
24
|
-
}) => Promise<void>;
|
|
25
|
-
export interface IPackageJson {
|
|
26
|
-
name: string;
|
|
27
|
-
version: string;
|
|
28
|
-
title?: string;
|
|
29
|
-
desc?: string;
|
|
30
|
-
dependencies: {
|
|
31
|
-
[name: string]: string;
|
|
32
|
-
};
|
|
33
|
-
repository: {
|
|
34
|
-
type: string;
|
|
35
|
-
url: string;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
export declare const buildAsWebByBuildType: (buildTypeList?: BuildType[]) => boolean;
|
|
39
|
-
export declare const buildAsAdminPortalByBuildType: (buildTypeList?: BuildType[]) => boolean;
|
|
40
|
-
export declare const buildAsXPageByBuildType: (buildTypeList?: BuildType[]) => boolean;
|
|
41
|
-
export interface IAppUsedComp {
|
|
42
|
-
rootPath: string;
|
|
43
|
-
usedComps: IUsedComps;
|
|
44
|
-
}
|
|
45
|
-
export declare type IUsedComps = {
|
|
46
|
-
[libName: string]: Set<string>;
|
|
47
|
-
};
|
|
48
|
-
export interface ISyncProp {
|
|
49
|
-
changeEvent: string;
|
|
50
|
-
valueFromEvent: string;
|
|
51
|
-
}
|
|
52
|
-
export declare type IComponentInputProps = {
|
|
53
|
-
[componentName: string]: {
|
|
54
|
-
[syncName: string]: ISyncProp | ISyncProp[];
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export declare type IComponentsInfoMap = {
|
|
58
|
-
[componentSourceKey: string]: (IComponentMeta & {
|
|
59
|
-
isComposite: false;
|
|
60
|
-
}) | (ICompositedComponent & {
|
|
61
|
-
isComposite: true;
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
export interface IFileCodeMap {
|
|
65
|
-
[filePath: string]: {
|
|
66
|
-
code: string;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/generator/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,0BAAkB,SAAS;IACzB,EAAE,OAAO;IACT,YAAY,gBAAgB;IAC5B,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,SAAS,SAAS;IAClB,cAAc,WAAW;IACzB,QAAQ,YAAY;CACrB;AAED,0BAAkB,cAAc;IAC9B,GAAG,QAAQ;IACX,UAAU,eAAe;CAC1B;AAED,0BAAkB,eAAe;IAC/B,IAAI,KAAK;IACT,UAAU,eAAe;CAC1B;AAED,oBAAY,oBAAoB,GAAG,CACjC,GAAG,EAAE,GAAG,EACR,MAAM,CAAC,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAA;CAAE,KAC/D,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,EAAE;QACZ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;IACF,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,mBAAmB,SAAS,EAAE,YAU/D,CAAC;AAEF,eAAO,MAAM,6BAA6B,mBACzB,SAAS,EAAE,YAG3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAAmB,SAAS,EAAE,YAEjE,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,UAAU,CAAC;CACvB;AACD,oBAAY,UAAU,GAAG;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;AAE5D,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AACD,oBAAY,oBAAoB,GAAG;IACjC,CAAC,aAAa,EAAE,MAAM,GAAG;QACvB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,EAAE,CAAC;KAC7C,CAAC;CACH,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,CAAC,kBAAkB,EAAE,MAAM,GACvB,CAAC,cAAc,GAAG;QAAE,WAAW,EAAE,KAAK,CAAA;KAAE,CAAC,GACzC,CAAC,oBAAoB,GAAG;QAAE,WAAW,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildAsXPageByBuildType = exports.buildAsAdminPortalByBuildType = exports.buildAsWebByBuildType = void 0;
|
|
4
|
-
const buildAsWebByBuildType = (buildTypeList = []) => {
|
|
5
|
-
return (buildTypeList.includes("web") ||
|
|
6
|
-
buildTypeList.includes("pc") ||
|
|
7
|
-
buildTypeList.includes("adminPortal") ||
|
|
8
|
-
buildTypeList.includes("app") ||
|
|
9
|
-
buildTypeList.includes("qywxH5") ||
|
|
10
|
-
buildTypeList.includes("wxH5") ||
|
|
11
|
-
buildTypeList.includes("xPagePC"));
|
|
12
|
-
};
|
|
13
|
-
exports.buildAsWebByBuildType = buildAsWebByBuildType;
|
|
14
|
-
const buildAsAdminPortalByBuildType = (buildTypeList = []) => {
|
|
15
|
-
return buildTypeList.includes("adminPortal");
|
|
16
|
-
};
|
|
17
|
-
exports.buildAsAdminPortalByBuildType = buildAsAdminPortalByBuildType;
|
|
18
|
-
const buildAsXPageByBuildType = (buildTypeList = []) => {
|
|
19
|
-
return buildTypeList.includes("xPagePC");
|
|
20
|
-
};
|
|
21
|
-
exports.buildAsXPageByBuildType = buildAsXPageByBuildType;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ISchema, Schema } from '@formily/react-schema-renderer';
|
|
2
|
-
import { IFileCodeMap, IComponentsInfoMap, IComponentInputProps } from '../types/common';
|
|
3
|
-
import { IMaterialItem, IWeAppComponentInstance } from '../../weapps-core';
|
|
4
|
-
export declare type PromiseResult<T> = Promise<[null, T] | [Error, null]>;
|
|
5
|
-
export declare function promiseWrapper<T>(p: Promise<T>): PromiseResult<T>;
|
|
6
|
-
export declare function deepDealComponentSchemaJson(schema: IWeAppComponentInstance, dealFn: (currentSchema: IWeAppComponentInstance) => void): void;
|
|
7
|
-
export declare function getMetaInfoBySourceKey(sourceKey: string): {
|
|
8
|
-
materialName?: undefined;
|
|
9
|
-
name?: undefined;
|
|
10
|
-
variableName?: undefined;
|
|
11
|
-
} | {
|
|
12
|
-
materialName: string;
|
|
13
|
-
name: string;
|
|
14
|
-
variableName: string;
|
|
15
|
-
};
|
|
16
|
-
export declare function isArray(src: any): boolean;
|
|
17
|
-
export declare function isPlainObject(src: any): boolean;
|
|
18
|
-
export declare function deepDeal(src: any, reviver: (key: any, value: any, parent: any) => void): void;
|
|
19
|
-
export declare function simpleDeepClone<T>(data: any): T;
|
|
20
|
-
export declare function JsonToStringWithVariableName(copyJson: any, options: {
|
|
21
|
-
EOL: boolean;
|
|
22
|
-
}): string;
|
|
23
|
-
export declare function deepDealSchema(sourceSchema: ISchema, deal: (schema: Schema, key: string) => void): ISchema;
|
|
24
|
-
export declare function getComponentsInfo(appBuildDir: string, dependencies: IMaterialItem[], fileCodeMap: IFileCodeMap): Promise<IComponentsInfoMap>;
|
|
25
|
-
export declare function getInputProps(componentsMetaMap: IComponentsInfoMap): IComponentInputProps;
|
|
26
|
-
export declare function getYyptConfigInfo(extraData: any): Promise<{
|
|
27
|
-
yyptAppKey: any;
|
|
28
|
-
reportUrl: any;
|
|
29
|
-
stopReport: boolean;
|
|
30
|
-
}>;
|
|
31
|
-
export declare function writeLibCommonRes2file(gItem: any, codeDir: string): Promise<{}>;
|
|
32
|
-
export declare function getFileNameByUrl(fileUrl: string): string;
|
|
33
|
-
export declare function upperFirst(str: string): string;
|
|
34
|
-
export declare function camelcase(str: string, firstUpperCase?: boolean): string;
|
|
35
|
-
export declare function cleanVarName(name: string): string;
|
|
36
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/generator/util/common.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,aAAa,EACb,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,oBAAY,aAAa,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAClE,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAQjE;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,CAAC,aAAa,EAAE,uBAAuB,KAAK,IAAI,QAazD;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM;;;;;;;;EAUvD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,WAE/B;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,WAErC;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,QAoBrD;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,CAE/C;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,GAAG,EACb,OAAO,EAAE;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,GACxB,MAAM,CAYR;AAED,wBAAgB,cAAc,CAC5B,YAAY,EAAE,OAAO,EACrB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,GAC1C,OAAO,CAgBT;AAED,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,aAAa,EAAE,EAC7B,WAAW,EAAE,YAAY,GACxB,OAAO,CAAC,kBAAkB,CAAC,CAuC7B;AAED,wBAAgB,aAAa,CAC3B,iBAAiB,EAAE,kBAAkB,GACpC,oBAAoB,CAyBtB;AAED,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,GAAG;;;;GAyBrD;AAED,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eA2BvE;AAMD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,UAI/C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,UAErC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,UAAQ,UAQ5D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,UAExC"}
|