@cloudbase/framework-plugin-low-code 1.7.3 → 1.7.4
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/index.d.ts +0 -0
- package/lib/index.d.ts.map +0 -0
- package/lib/index.js +0 -0
- package/lib/utils/common.d.ts +0 -0
- package/lib/utils/common.d.ts.map +0 -0
- package/lib/utils/common.js +0 -0
- package/lib/utils/index.d.ts +0 -0
- package/lib/utils/index.d.ts.map +0 -0
- package/lib/utils/index.js +0 -0
- package/package.json +3 -3
- package/scripts/link.js +3 -7
- 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,80 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.runHandleMaterial = void 0;
|
|
32
|
-
const path = __importStar(require("path"));
|
|
33
|
-
const webpack_1 = require("../service/builder/webpack");
|
|
34
|
-
const copy_1 = require("../service/builder/copy");
|
|
35
|
-
const generate_1 = require("../service/builder/generate");
|
|
36
|
-
const util_1 = require("../util");
|
|
37
|
-
const types_1 = require("../../types");
|
|
38
|
-
function runHandleMaterial(appBuildDir, dependencies = [], materialsDir, runtime = types_1.RUNTIME.NONE, ignoreInstall = false) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
yield handleNormalMaterial({
|
|
41
|
-
dependencies,
|
|
42
|
-
materialsDir,
|
|
43
|
-
appBuildDir,
|
|
44
|
-
runtime,
|
|
45
|
-
ignoreInstall,
|
|
46
|
-
});
|
|
47
|
-
yield handleCompositeComponent({ dependencies, appBuildDir });
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
exports.runHandleMaterial = runHandleMaterial;
|
|
51
|
-
function handleNormalMaterial({ dependencies, materialsDir, appBuildDir, runtime, ignoreInstall, }) {
|
|
52
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
const timeTag = '-------------------- handleNormalMaterial';
|
|
54
|
-
console.time(timeTag);
|
|
55
|
-
const normalDependencies = dependencies.filter((item) => !item.isComposite);
|
|
56
|
-
yield (0, webpack_1.downloadAndInstallDependencies)(normalDependencies, materialsDir, {
|
|
57
|
-
runtime,
|
|
58
|
-
ignoreInstall,
|
|
59
|
-
});
|
|
60
|
-
yield (0, copy_1.copyMaterialLibraries)(normalDependencies, materialsDir, appBuildDir);
|
|
61
|
-
console.timeEnd(timeTag);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
function handleCompositeComponent({ dependencies, appBuildDir }) {
|
|
65
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
console.time('handleCompositeComponent');
|
|
67
|
-
const compositeDependencies = dependencies.filter((item) => item.isComposite);
|
|
68
|
-
const materialGroupInfoMap = {};
|
|
69
|
-
dependencies.forEach((item) => (materialGroupInfoMap[item.name] = {
|
|
70
|
-
isComposite: item.isComposite,
|
|
71
|
-
version: item.version,
|
|
72
|
-
entries: item.entries,
|
|
73
|
-
schemaVersion: item.schemaVersion,
|
|
74
|
-
}));
|
|
75
|
-
const componentsMeta = yield (0, util_1.getComponentsInfo)(path.join(appBuildDir, 'src'), dependencies);
|
|
76
|
-
yield (0, generate_1.writeLowCodeFilesForCompositeComp)(compositeDependencies, appBuildDir);
|
|
77
|
-
yield (0, copy_1.genCompositeComponentLibraries)(compositeDependencies, appBuildDir, materialGroupInfoMap, componentsMeta);
|
|
78
|
-
console.timeEnd('handleCompositeComponent');
|
|
79
|
-
});
|
|
80
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IPlugin } from '../../weapps-core';
|
|
2
|
-
export declare function runHandleMpPlugin(appBuildDir: string, plugins: IPlugin[]): Promise<void>;
|
|
3
|
-
export declare function runHandleKbonePlugin(appBuildDir: string, plugins: IPlugin[], mpConfig: any): Promise<void>;
|
|
4
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/builder/core/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAY3C,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,iBAI9E;AAGD,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,iBAKhG"}
|
|
@@ -1,30 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.runHandleKbonePlugin = exports.runHandleMpPlugin = void 0;
|
|
13
|
-
const plugin_1 = require("../service/builder/plugin");
|
|
14
|
-
function runHandleMpPlugin(appBuildDir, plugins) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
console.time('runHandleMpPlugin');
|
|
17
|
-
yield (0, plugin_1.installMpPlugin)(appBuildDir, plugins);
|
|
18
|
-
console.timeEnd('runHandleMpPlugin');
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
exports.runHandleMpPlugin = runHandleMpPlugin;
|
|
22
|
-
function runHandleKbonePlugin(appBuildDir, plugins, mpConfig) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
console.time('runHandleKbonePlugin');
|
|
25
|
-
yield (0, plugin_1.installKbonePlugin)(appBuildDir, plugins);
|
|
26
|
-
yield (0, plugin_1.mergeKbonePluginConfig)(appBuildDir, plugins, mpConfig);
|
|
27
|
-
console.timeEnd('runHandleKbonePlugin');
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
exports.runHandleKbonePlugin = runHandleKbonePlugin;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BuildType, WebpackBuildCallBack } from '../types/common';
|
|
2
|
-
export declare function runPrepare(buildTypeList: BuildType[], appBuildDir: string, isCleanDistDir: boolean): Promise<any>;
|
|
3
|
-
export declare function saveProjectConfigJson(appBuildDir: string): Promise<any>;
|
|
4
|
-
export declare function createDoneCallBack({ projectConfig, appBuildDir }: {
|
|
5
|
-
projectConfig: any;
|
|
6
|
-
appBuildDir: any;
|
|
7
|
-
}, cb: any): WebpackBuildCallBack;
|
|
8
|
-
//# sourceMappingURL=prepare.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/builder/core/prepare.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,oBAAoB,EAErB,MAAM,iBAAiB,CAAA;AAGxB,wBAAsB,UAAU,CAC9B,aAAa,EAAE,SAAS,EAAE,EAC1B,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,OAAO,gBA8CxB;AAED,wBAAsB,qBAAqB,CAAC,WAAW,EAAE,MAAM,gBAS9D;AAED,wBAAgB,kBAAkB,CAChC,EAAE,aAAa,EAAE,WAAW,EAAE;;;CAAA,EAC9B,EAAE,KAAA,GACD,oBAAoB,CAqBtB"}
|
|
@@ -1,108 +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.createDoneCallBack = exports.saveProjectConfigJson = exports.runPrepare = void 0;
|
|
35
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
36
|
-
const path_1 = __importDefault(require("path"));
|
|
37
|
-
const common_1 = require("../types/common");
|
|
38
|
-
const junk = __importStar(require("../util/junk"));
|
|
39
|
-
function runPrepare(buildTypeList, appBuildDir, isCleanDistDir) {
|
|
40
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
console.time('runPrepare');
|
|
42
|
-
const projectConfig = yield saveProjectConfigJson(appBuildDir);
|
|
43
|
-
try {
|
|
44
|
-
if (buildTypeList.includes("mp")) {
|
|
45
|
-
const mpDirPath = path_1.default.resolve(appBuildDir, './dist/mp');
|
|
46
|
-
if (projectConfig && projectConfig.cloudfunctionRoot) {
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
yield fs_extra_1.default.emptyDir(mpDirPath);
|
|
50
|
-
}
|
|
51
|
-
const dirs = fs_extra_1.default.readdirSync(mpDirPath).filter(junk.not);
|
|
52
|
-
yield Promise.all(dirs.map((dir) => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
-
if (projectConfig && projectConfig.cloudfunctionRoot) {
|
|
54
|
-
if (projectConfig.cloudfunctionRoot.startsWith(dir)) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (dir === 'miniprogram_npm') {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
yield fs_extra_1.default.remove(path_1.default.resolve(mpDirPath, dir));
|
|
62
|
-
})));
|
|
63
|
-
}
|
|
64
|
-
if ((0, common_1.buildAsWebByBuildType)(buildTypeList)) {
|
|
65
|
-
yield fs_extra_1.default.emptyDir(path_1.default.resolve(appBuildDir, './preview'));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
console.error('清空 dist/preview 目录失败', e);
|
|
70
|
-
}
|
|
71
|
-
if (isCleanDistDir) {
|
|
72
|
-
yield fs_extra_1.default.remove(path_1.default.resolve(appBuildDir, './src'));
|
|
73
|
-
yield fs_extra_1.default.remove(path_1.default.resolve(appBuildDir, './webpack'));
|
|
74
|
-
yield fs_extra_1.default.remove(path_1.default.resolve(appBuildDir, './package-lock.json'));
|
|
75
|
-
yield fs_extra_1.default.remove(path_1.default.resolve(appBuildDir, './yarn.lock'));
|
|
76
|
-
}
|
|
77
|
-
yield fs_extra_1.default.ensureDir(appBuildDir);
|
|
78
|
-
console.timeEnd('runPrepare');
|
|
79
|
-
return projectConfig;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
exports.runPrepare = runPrepare;
|
|
83
|
-
function saveProjectConfigJson(appBuildDir) {
|
|
84
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
-
const projectConfigJsonPath = path_1.default.resolve(appBuildDir, './dist/mp/project.config.json');
|
|
86
|
-
if (fs_extra_1.default.existsSync(projectConfigJsonPath)) {
|
|
87
|
-
return yield fs_extra_1.default.readJSON(projectConfigJsonPath);
|
|
88
|
-
}
|
|
89
|
-
return null;
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
exports.saveProjectConfigJson = saveProjectConfigJson;
|
|
93
|
-
function createDoneCallBack({ projectConfig, appBuildDir }, cb) {
|
|
94
|
-
return (...params) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
if (projectConfig) {
|
|
96
|
-
const newProjectConfig = yield saveProjectConfigJson(appBuildDir);
|
|
97
|
-
if (newProjectConfig) {
|
|
98
|
-
newProjectConfig.condition = projectConfig.condition;
|
|
99
|
-
const projectConfigJsonPath = path_1.default.resolve(appBuildDir, './dist/mp/project.config.json');
|
|
100
|
-
yield fs_extra_1.default.writeFile(projectConfigJsonPath, JSON.stringify(newProjectConfig, null, 4), {
|
|
101
|
-
encoding: 'utf8',
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
cb && cb(...params);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
exports.createDoneCallBack = createDoneCallBack;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { WebpackBuildCallBack } from '../types/common';
|
|
2
|
-
import { IWebRuntimeAppData } from '../../weapps-core';
|
|
3
|
-
import { BuildAppProps } from './index';
|
|
4
|
-
interface IWebpackCoreProps extends BuildAppProps {
|
|
5
|
-
appBuildDir: string;
|
|
6
|
-
materialsDir: string;
|
|
7
|
-
cb: WebpackBuildCallBack;
|
|
8
|
-
mpConfig: any;
|
|
9
|
-
mainAppData: IWebRuntimeAppData;
|
|
10
|
-
subAppDataList: IWebRuntimeAppData[];
|
|
11
|
-
assets: string[];
|
|
12
|
-
}
|
|
13
|
-
export declare function runWebpackCore({ mainAppData, subAppDataList, appBuildDir, materialsDir, cb, mpConfig, dependencies, nodeModulesPath, publicPath, mode, watch, appKey, buildTypeList, generateMpType, generateMpPath, plugins, assets, }: IWebpackCoreProps): Promise<void>;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=webpack.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../../src/builder/core/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAyB,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAW,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAOhE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,iBAAkB,SAAQ,aAAa;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,oBAAoB,CAAC;IACzB,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,kBAAkB,CAAC;IAChC,cAAc,EAAE,kBAAkB,EAAE,CAAC;IACrC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAsB,cAAc,CAAC,EACnC,WAAW,EACX,cAAc,EACd,WAAW,EACX,YAAY,EACZ,EAAE,EACF,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAM,EACN,aAAa,EACb,cAAc,EACd,cAAc,EACd,OAAO,EACP,MAAW,GACZ,EAAE,iBAAiB,iBAsDnB"}
|
|
@@ -1,58 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.runWebpackCore = void 0;
|
|
13
|
-
const common_1 = require("../types/common");
|
|
14
|
-
const webpack_1 = require("../service/builder/webpack");
|
|
15
|
-
function runWebpackCore({ mainAppData, subAppDataList, appBuildDir, materialsDir, cb, mpConfig, dependencies, nodeModulesPath, publicPath, mode, watch, appKey, buildTypeList, generateMpType, generateMpPath, plugins, assets = [], }) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
console.time('runWebpackCore');
|
|
18
|
-
console.time('webpackGenerate');
|
|
19
|
-
const allAppDataList = subAppDataList.concat(mainAppData);
|
|
20
|
-
const webWebpackConfigPath = yield (0, webpack_1.generateWebpackWebBuildParamsFile)({
|
|
21
|
-
appId: mainAppData.id || appKey,
|
|
22
|
-
allAppDataList,
|
|
23
|
-
appBuildDir,
|
|
24
|
-
materialsDir,
|
|
25
|
-
dependencies,
|
|
26
|
-
nodeModulesPath,
|
|
27
|
-
publicPath,
|
|
28
|
-
mode,
|
|
29
|
-
watch,
|
|
30
|
-
buildTypeList,
|
|
31
|
-
assets,
|
|
32
|
-
});
|
|
33
|
-
console.timeEnd('webpackGenerate');
|
|
34
|
-
const taskList = [];
|
|
35
|
-
console.time('generateMpJsonConfigFile');
|
|
36
|
-
yield (0, webpack_1.generateMpJsonConfigFile)(allAppDataList, mpConfig, appBuildDir, plugins, {
|
|
37
|
-
appKey,
|
|
38
|
-
generateMpType,
|
|
39
|
-
});
|
|
40
|
-
console.timeEnd('generateMpJsonConfigFile');
|
|
41
|
-
if ((0, common_1.buildAsWebByBuildType)(buildTypeList)) {
|
|
42
|
-
yield (0, webpack_1.generateWebpackWebDevServerFile)({
|
|
43
|
-
appBuildDir,
|
|
44
|
-
buildTypeList,
|
|
45
|
-
});
|
|
46
|
-
(0, webpack_1.startCompile)({
|
|
47
|
-
appBuildDir,
|
|
48
|
-
configPath: webWebpackConfigPath,
|
|
49
|
-
appKey,
|
|
50
|
-
}, cb);
|
|
51
|
-
}
|
|
52
|
-
console.time('webpackCompile');
|
|
53
|
-
yield Promise.all(taskList);
|
|
54
|
-
console.timeEnd('webpackCompile');
|
|
55
|
-
console.timeEnd('runWebpackCore');
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
exports.runWebpackCore = runWebpackCore;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IMaterialItem, IWeAppData, IMiniprogramPlugin } from '../../weapps-core';
|
|
2
|
-
export interface IBuildContext {
|
|
3
|
-
appId: string;
|
|
4
|
-
domain: string;
|
|
5
|
-
projDir: string;
|
|
6
|
-
materialLibs: IMaterialItem[];
|
|
7
|
-
isProduction: boolean;
|
|
8
|
-
mainAppData: IWeAppData;
|
|
9
|
-
isMixMode: boolean;
|
|
10
|
-
rootPath?: string;
|
|
11
|
-
miniprogramPlugins?: IMiniprogramPlugin[];
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=BuildContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BuildContext.d.ts","sourceRoot":"","sources":["../../../src/builder/mp/BuildContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAK3B,MAAM,WAAW,aAAa;IAE5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,aAAa,EAAE,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC3C"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { IMaterialItem, IWeAppData, IPlugin } from '../../weapps-core';
|
|
2
|
-
import { IBuildContext } from './BuildContext';
|
|
3
|
-
import { DEPLOY_MODE } from '../../types';
|
|
4
|
-
import { BuildType, IAppUsedComp, IUsedComps } from '../types/common';
|
|
5
|
-
export declare function generateWxMp({ weapps, projDir, appId, domain, materials, plugins, isProduction, deployMode, extraData, isMixMode, options, buildTypeList, }: {
|
|
6
|
-
weapps: IWeAppData[];
|
|
7
|
-
projDir: string;
|
|
8
|
-
appId: string;
|
|
9
|
-
domain: string;
|
|
10
|
-
materials: IMaterialItem[];
|
|
11
|
-
plugins: IPlugin[];
|
|
12
|
-
isProduction: boolean;
|
|
13
|
-
deployMode: DEPLOY_MODE;
|
|
14
|
-
extraData: any;
|
|
15
|
-
isMixMode: boolean;
|
|
16
|
-
options: {
|
|
17
|
-
resourceAppid?: string;
|
|
18
|
-
isCrossAccount: boolean;
|
|
19
|
-
};
|
|
20
|
-
buildTypeList: BuildType[];
|
|
21
|
-
}): Promise<{
|
|
22
|
-
miniprogramRoot: string;
|
|
23
|
-
}>;
|
|
24
|
-
export declare function writeLowCodeFiles(appData: IWeAppData, outDir: string, ctx: IBuildContext): Promise<void>;
|
|
25
|
-
export declare function handleUsedComponents({ buildContext, weapps, materials, }: {
|
|
26
|
-
buildContext: IBuildContext;
|
|
27
|
-
weapps: IWeAppData[];
|
|
28
|
-
materials: IMaterialItem[];
|
|
29
|
-
}): {
|
|
30
|
-
appUsedComps: IAppUsedComp[];
|
|
31
|
-
allAppUsedComps: IUsedComps;
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builder/mp/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,aAAa,EACb,UAAU,EAEV,OAAO,EAIR,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAW/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAiC,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQrG,wBAAsB,YAAY,CAAC,EACjC,MAAM,EACN,OAAO,EACP,KAAK,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,YAAY,EACZ,UAAU,EACV,SAAS,EACT,SAAS,EACT,OAAO,EACP,aAAa,GACd,EAAE;IACD,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE;QACP,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,aAAa,EAAE,SAAS,EAAE,CAAC;CAC5B,GAAG,OAAO,CAAC;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE,CAAC,CAgPvC;AAsJD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,iBAuB9F;AAiBD,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,MAAM,EACN,SAAS,GACV,EAAE;IACD,YAAY,EAAE,aAAa,CAAC;IAC5B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;;;EA6BA"}
|