@cloudbase/framework-plugin-low-code 0.6.26 → 0.6.29
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/mp/index.js +1 -1
- package/lib/builder/service/builder/generate.d.ts.map +1 -1
- package/lib/builder/service/builder/generate.js +9 -6
- package/lib/builder/types/common.d.ts +1 -1
- package/lib/builder/types/common.d.ts.map +1 -1
- package/lib/builder/types/common.js +1 -0
- package/lib/generator/types/common.d.ts +3 -1
- package/lib/generator/types/common.d.ts.map +1 -1
- package/lib/generator/types/common.js +6 -2
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +71 -74
- package/lib/weapps-core/types/style.d.ts +1 -2
- package/lib/weapps-core/types/style.d.ts.map +1 -1
- package/lib/weapps-core/utils/style.d.ts +1 -1
- package/lib/weapps-core/utils/style.d.ts.map +1 -1
- package/package.json +1 -1
- package/template/src/datasources/{index.js → index.js.tpl} +2 -0
- package/template/src/handlers/utils/common.js +1 -1
- package/template/src/utils/history.js +4 -10
package/lib/builder/mp/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/builder/service/builder/generate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAGxD,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EACpB,eAAe,EAEf,aAAa,EAEb,kBAAkB,EAWlB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAgB9B,OAAO,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/builder/service/builder/generate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAGxD,OAAO,EACL,aAAa,EACb,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EACpB,eAAe,EAE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cAAc,EAAE,kBAAkB,EAAE,EACpC,WAAW,EAAE,MAAM,EACnB,QAAQ,SAAK,EACb,aAAa,GAAE,SAAS,EAAO,iBA0ChC;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,MAAM,iBAuCpB;AAED,wBAAsB,iCAAiC,CACrD,eAAe,EAAE,aAAa,EAAE,EAChC,WAAW,EAAE,MAAM,iBA6EpB;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,aAAa,EAAE,EAC7B,MAAM,EAAE,MAAM,EACd,QAAQ,KAAA,EACR,UAAU,EAAE,WAAW,EACvB,aAAa,EAAE,SAAS,EAAE,EAC1B,SAAS,KAAA,iBAqFV"}
|
|
@@ -78,7 +78,7 @@ function generateSinglePageJsxFile(pageInstance, appBuildDir, rootPath, dependen
|
|
|
78
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
79
|
const fixedDependencies = dependencies;
|
|
80
80
|
const { componentSchemaJson, pluginInstances, listenerInstances: pageListenerInstances, style: PageStyle, data, } = pageInstance;
|
|
81
|
-
const { originComponentList, originActionList } = getOriginComponentAndActionList(componentSchemaJson, fixedDependencies);
|
|
81
|
+
const { originComponentList, originActionList, } = getOriginComponentAndActionList(componentSchemaJson, fixedDependencies);
|
|
82
82
|
const componentsMeta = yield util_1.getComponentsInfo(appBuildDir, dependencies);
|
|
83
83
|
const originPluginList = getOriginPluginList(pluginInstances, dependencies);
|
|
84
84
|
pullActionToListByInstances(pageListenerInstances, originActionList, fixedDependencies);
|
|
@@ -146,7 +146,7 @@ function getOriginComponentAndActionList(componentSchema, fixedDependencies, ori
|
|
|
146
146
|
if (fieldSchema.isObject()) {
|
|
147
147
|
const { 'x-props': xProps } = fieldSchema;
|
|
148
148
|
if (xProps) {
|
|
149
|
-
const { listenerInstances, sourceKey } = xProps;
|
|
149
|
+
const { listenerInstances, sourceKey, } = xProps;
|
|
150
150
|
pullComponentToListByInstance(sourceKey, originComponentList, fixedDependencies);
|
|
151
151
|
pullActionToListByInstances(listenerInstances, originActionList, fixedDependencies);
|
|
152
152
|
}
|
|
@@ -303,8 +303,7 @@ function getComponentSchemaString(componentSchema, isComposite = false, componen
|
|
|
303
303
|
var _a, _b;
|
|
304
304
|
const blockInstance = (block === null || block === void 0 ? void 0 : block.selectableBlock) && ((_b = (_a = block === null || block === void 0 ? void 0 : block.selectableBlock) === null || _a === void 0 ? void 0 : _a['x-props']) === null || _b === void 0 ? void 0 : _b.listenerInstances);
|
|
305
305
|
if (blockInstance) {
|
|
306
|
-
block.selectableBlock['x-props'].listenerInstances =
|
|
307
|
-
generateListnerInstances(blockInstance, isComposite);
|
|
306
|
+
block.selectableBlock['x-props'].listenerInstances = generateListnerInstances(blockInstance, isComposite);
|
|
308
307
|
}
|
|
309
308
|
return block;
|
|
310
309
|
});
|
|
@@ -543,7 +542,7 @@ function getPluginImportStringArr(plugins, pluginImportStringArr = []) {
|
|
|
543
542
|
exports.getPluginImportStringArr = getPluginImportStringArr;
|
|
544
543
|
function getComponentImportStringArr(components, componentImportStringArr = []) {
|
|
545
544
|
components.map((component) => __awaiter(this, void 0, void 0, function* () {
|
|
546
|
-
const { name, materialName, materialVersion, variableName, entries } = component;
|
|
545
|
+
const { name, materialName, materialVersion, variableName, entries, } = component;
|
|
547
546
|
let importString = '';
|
|
548
547
|
if (entries === null || entries === void 0 ? void 0 : entries.components) {
|
|
549
548
|
importString = `import { ${name} as ${lodash_1.default.upperFirst(variableName)} } from '${path_1.default.posix.join(`libraries/${materialName}@${materialVersion}`, entries === null || entries === void 0 ? void 0 : entries.components)}'`;
|
|
@@ -585,7 +584,7 @@ function getActionImportStringArr(originActionList, actionImportStringArr = [])
|
|
|
585
584
|
}
|
|
586
585
|
exports.getActionImportStringArr = getActionImportStringArr;
|
|
587
586
|
function pushActionToImportStringArr(listenerInstance, actionImportStringArr) {
|
|
588
|
-
const { name, materialName, materialVersion, variableName, entries } = listenerInstance;
|
|
587
|
+
const { name, materialName, materialVersion, variableName, entries, } = listenerInstance;
|
|
589
588
|
const componentsLibVariableName = util_3.camelcase(`${materialName}`);
|
|
590
589
|
const importString = (entries === null || entries === void 0 ? void 0 : entries.actions) ? `import { ${name} as ${variableName} } from '${path_1.default.posix.join(`libraries/${materialName}@${materialVersion}`, entries === null || entries === void 0 ? void 0 : entries.actions)}'`
|
|
591
590
|
: (entries === null || entries === void 0 ? void 0 : entries.entry) ? `const { ${name}: ${variableName} } = ${componentsLibVariableName}.actions`
|
|
@@ -742,6 +741,9 @@ function generateCodeFromTpl(appData, appBuildDir, dependencies, appKey, rootPat
|
|
|
742
741
|
.filter((m) => m.type === 'normal-module' && m.name !== '____index____')
|
|
743
742
|
.map((m) => m.name),
|
|
744
743
|
},
|
|
744
|
+
'datasources/index.js.tpl': {
|
|
745
|
+
isXPage: common_1.buildAsXPageByBuildType(buildTypeList),
|
|
746
|
+
},
|
|
745
747
|
'datasources/config.js.tpl': {
|
|
746
748
|
appID: appKey,
|
|
747
749
|
envID: appData.envId,
|
|
@@ -755,6 +757,7 @@ function generateCodeFromTpl(appData, appBuildDir, dependencies, appKey, rootPat
|
|
|
755
757
|
},
|
|
756
758
|
'handlers/utils/common.js': {
|
|
757
759
|
isAdminPortal: common_1.buildAsAdminPortalByBuildType(buildTypeList),
|
|
760
|
+
isXPage: common_1.buildAsXPageByBuildType(buildTypeList),
|
|
758
761
|
},
|
|
759
762
|
};
|
|
760
763
|
if (!rootPath) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BuildType, GenerateMpType, WebpackModeType, WebpackBuildCallBack, IPackageJson, buildAsWebByBuildType, buildAsAdminPortalByBuildType, IAppUsedComp, IUsedComps, ISyncProp, IComponentInputProps, IFileCodeMap, } from '../../generator/types/common';
|
|
1
|
+
export { BuildType, GenerateMpType, WebpackModeType, WebpackBuildCallBack, IPackageJson, buildAsWebByBuildType, buildAsAdminPortalByBuildType, buildAsXPageByBuildType, IAppUsedComp, IUsedComps, ISyncProp, IComponentInputProps, IFileCodeMap, } from '../../generator/types/common';
|
|
2
2
|
import { IComponentMeta, ICompositedComponent } from 'src/weapps-core';
|
|
3
3
|
export declare type IComponentsInfoMap = {
|
|
4
4
|
[componentSourceKey: string]: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/builder/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,YAAY,GACb,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,oBAAY,kBAAkB,GAAG;IAC/B,CAAC,kBAAkB,EAAE,MAAM,GACvB,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG;QAAE,WAAW,EAAE,KAAK,CAAA;KAAE,CAAC,GACnD,CAAC,oBAAoB,GAAG;QAAE,WAAW,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/builder/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,6BAA6B,EAC7B,uBAAuB,EACvB,YAAY,EACZ,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,YAAY,GACb,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,oBAAY,kBAAkB,GAAG;IAC/B,CAAC,kBAAkB,EAAE,MAAM,GACvB,CAAC;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,GAAG;QAAE,WAAW,EAAE,KAAK,CAAA;KAAE,CAAC,GACnD,CAAC,oBAAoB,GAAG;QAAE,WAAW,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD,CAAC"}
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var common_1 = require("../../generator/types/common");
|
|
4
4
|
Object.defineProperty(exports, "buildAsWebByBuildType", { enumerable: true, get: function () { return common_1.buildAsWebByBuildType; } });
|
|
5
5
|
Object.defineProperty(exports, "buildAsAdminPortalByBuildType", { enumerable: true, get: function () { return common_1.buildAsAdminPortalByBuildType; } });
|
|
6
|
+
Object.defineProperty(exports, "buildAsXPageByBuildType", { enumerable: true, get: function () { return common_1.buildAsXPageByBuildType; } });
|
|
@@ -6,7 +6,8 @@ export declare const enum BuildType {
|
|
|
6
6
|
MP = "mp",
|
|
7
7
|
APP = "app",
|
|
8
8
|
WECHAT_H5 = "wxH5",
|
|
9
|
-
WECHAT_WORK_H5 = "qywxH5"
|
|
9
|
+
WECHAT_WORK_H5 = "qywxH5",
|
|
10
|
+
XPAGE_PC = "xPagePC"
|
|
10
11
|
}
|
|
11
12
|
export declare const enum GenerateMpType {
|
|
12
13
|
APP = "app",
|
|
@@ -36,6 +37,7 @@ export interface IPackageJson {
|
|
|
36
37
|
}
|
|
37
38
|
export declare const buildAsWebByBuildType: (buildTypeList?: BuildType[]) => boolean;
|
|
38
39
|
export declare const buildAsAdminPortalByBuildType: (buildTypeList?: BuildType[]) => boolean;
|
|
40
|
+
export declare const buildAsXPageByBuildType: (buildTypeList?: BuildType[]) => boolean;
|
|
39
41
|
export interface IAppUsedComp {
|
|
40
42
|
rootPath: string;
|
|
41
43
|
usedComps: IUsedComps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/generator/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc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,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,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildAsAdminPortalByBuildType = exports.buildAsWebByBuildType = void 0;
|
|
3
|
+
exports.buildAsXPageByBuildType = exports.buildAsAdminPortalByBuildType = exports.buildAsWebByBuildType = void 0;
|
|
4
4
|
exports.buildAsWebByBuildType = (buildTypeList = []) => {
|
|
5
5
|
return (buildTypeList.includes("web") ||
|
|
6
6
|
buildTypeList.includes("pc") ||
|
|
7
7
|
buildTypeList.includes("adminPortal") ||
|
|
8
8
|
buildTypeList.includes("app") ||
|
|
9
9
|
buildTypeList.includes("qywxH5") ||
|
|
10
|
-
buildTypeList.includes("wxH5")
|
|
10
|
+
buildTypeList.includes("wxH5") ||
|
|
11
|
+
buildTypeList.includes("xPagePC"));
|
|
11
12
|
};
|
|
12
13
|
exports.buildAsAdminPortalByBuildType = (buildTypeList = []) => {
|
|
13
14
|
return buildTypeList.includes("adminPortal");
|
|
14
15
|
};
|
|
16
|
+
exports.buildAsXPageByBuildType = (buildTypeList = []) => {
|
|
17
|
+
return buildTypeList.includes("xPagePC");
|
|
18
|
+
};
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAUrE,OAAO,EACL,SAAS,EAET,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAUrE,OAAO,EACL,SAAS,EAET,cAAc,EAIf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAWvD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAgB,MAAM,SAAS,CAAC;AAK7D,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,2BAA2B,IAAK,CAAC;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AE,OAAe;IAgBjD,eAAe,CAAC,KAAK,KAAA,EAAE,KAAK,GAAE,OAAe;IAqBnD,eAAe,CAAC,OAAO,KAAA;IAIjB,gBAAgB;IA4HhB,2BAA2B;IAuE3B,UAAU;IAwBV,OAAO,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAejB,uBAAuB;IA2CvB,yBAAyB;CAyFhC;AAgCD,eAAO,MAAM,MAAM,sBAAgB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -81,7 +81,6 @@ const DEFAULT_INPUTS = {
|
|
|
81
81
|
dependencies: [],
|
|
82
82
|
plugins: [],
|
|
83
83
|
operationService: {},
|
|
84
|
-
publicPath: './',
|
|
85
84
|
extraData: { isComposite: false, compProps: {} },
|
|
86
85
|
mpAppId: '',
|
|
87
86
|
mpDeployPrivateKey: process.env.mpDeployPrivateKey || '',
|
|
@@ -124,31 +123,35 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
124
123
|
if (!this._resolvedInputs.mainAppSerializeData.mpPkgUrl) {
|
|
125
124
|
this._resolvedInputs.mainAppSerializeData = cals_1.deserializePlatformApp(cals, { dependencies: this._resolvedInputs.dependencies });
|
|
126
125
|
if ((_a = cals.extra) === null || _a === void 0 ? void 0 : _a.miniprogramPlugins) {
|
|
127
|
-
this._resolvedInputs.mainAppSerializeData.miniprogramPlugins =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
126
|
+
this._resolvedInputs.mainAppSerializeData.miniprogramPlugins = cals.extra.miniprogramPlugins.map((plugin) => {
|
|
127
|
+
var _a;
|
|
128
|
+
return Object.assign(Object.assign({}, plugin), { componentConfigs: ((_a = plugin.componentConfigs) === null || _a === void 0 ? void 0 : _a.map((component) => {
|
|
129
|
+
const { data, events, meta = {} } = component, restComponent = __rest(component, ["data", "events", "meta"]);
|
|
130
|
+
const processedCompoennt = Object.assign(Object.assign({}, restComponent), { meta: {
|
|
131
|
+
desc: (meta === null || meta === void 0 ? void 0 : meta.desc) || (meta === null || meta === void 0 ? void 0 : meta.description),
|
|
132
|
+
} });
|
|
133
|
+
if (data) {
|
|
134
|
+
processedCompoennt['dataForm'] = data.properties;
|
|
135
|
+
}
|
|
136
|
+
if (events) {
|
|
137
|
+
processedCompoennt['emitEvents'] = events === null || events === void 0 ? void 0 : events.map((event) => ({
|
|
138
|
+
eventName: event.name,
|
|
139
|
+
name: event.title,
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
return processedCompoennt;
|
|
143
|
+
})) || [] });
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
if (this._resolvedInputs.buildTypeList.includes("app") ||
|
|
147
|
+
this._resolvedInputs.buildTypeList.includes("xPagePC") ||
|
|
148
|
+
this._resolvedInputs.buildTypeList.includes("adminPortal")) {
|
|
149
|
+
this._resolvedInputs.mainAppSerializeData.historyType =
|
|
150
|
+
types_1.HISTORY_TYPE.HASH;
|
|
147
151
|
}
|
|
148
152
|
}
|
|
149
153
|
else {
|
|
150
|
-
this._resolvedInputs.mainAppSerializeData =
|
|
151
|
-
common_1.processPkgUrlCals2WeappData(cals);
|
|
154
|
+
this._resolvedInputs.mainAppSerializeData = common_1.processPkgUrlCals2WeappData(cals);
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
if (!((_b = this._resolvedInputs.mainAppSerializeData) === null || _b === void 0 ? void 0 : _b.envId)) {
|
|
@@ -164,7 +167,9 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
164
167
|
? `app/${appId}${((_c = this._resolvedInputs.deployOptions) === null || _c === void 0 ? void 0 : _c.mode) !== types_1.DEPLOY_MODE.UPLOAD
|
|
165
168
|
? '-preview'
|
|
166
169
|
: ''}`
|
|
167
|
-
:
|
|
170
|
+
: common_2.buildAsXPageByBuildType(this._resolvedInputs.buildTypeList)
|
|
171
|
+
? '/'
|
|
172
|
+
: path;
|
|
168
173
|
appConfig.window = window;
|
|
169
174
|
this._resolvedInputs.mainAppSerializeData.appConfig = appConfig;
|
|
170
175
|
this._resolvedInputs.subAppSerializeDataList = [];
|
|
@@ -173,7 +178,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
173
178
|
}
|
|
174
179
|
}
|
|
175
180
|
else {
|
|
176
|
-
const { mpAppId, mpDeployPrivateKey, deployOptions } = this._resolvedInputs;
|
|
181
|
+
const { mpAppId, mpDeployPrivateKey, deployOptions, } = this._resolvedInputs;
|
|
177
182
|
if (deployOptions.mpAppId === undefined) {
|
|
178
183
|
deployOptions.mpAppId = mpAppId;
|
|
179
184
|
}
|
|
@@ -296,7 +301,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
296
301
|
return __awaiter(this, void 0, void 0, function* () {
|
|
297
302
|
let { logger } = this.api;
|
|
298
303
|
const staticDir = path_1.default.resolve(__dirname, '../../../static');
|
|
299
|
-
let { debug, mainAppSerializeData, subAppSerializeDataList, dependencies, appId, buildTypeList, generateMpType, generateMpPath, plugins,
|
|
304
|
+
let { debug, mainAppSerializeData, subAppSerializeDataList, dependencies, appId, buildTypeList, generateMpType, generateMpPath, plugins, extraData = { isComposite: false, compProps: {} }, calsVersion, } = this._resolvedInputs;
|
|
300
305
|
const webpackMode = ((_a = this._resolvedInputs.deployOptions) === null || _a === void 0 ? void 0 : _a.mode) === types_1.DEPLOY_MODE.UPLOAD
|
|
301
306
|
? "production"
|
|
302
307
|
: "";
|
|
@@ -327,40 +332,44 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
327
332
|
throw e;
|
|
328
333
|
}
|
|
329
334
|
const domain = ((_b = this._website) === null || _b === void 0 ? void 0 : _b.cdnDomain) || ((_c = mainAppSerializeData.extra) === null || _c === void 0 ? void 0 : _c.domain);
|
|
330
|
-
if (common_2.buildAsWebByBuildType(buildTypeList)
|
|
331
|
-
this._resolvedInputs.deployOptions.mode === types_1.DEPLOY_MODE.UPLOAD) {
|
|
335
|
+
if (common_2.buildAsWebByBuildType(buildTypeList)) {
|
|
332
336
|
let { appConfig = {} } = mainAppSerializeData;
|
|
333
337
|
let { window = {} } = appConfig;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
if (common_2.buildAsXPageByBuildType(buildTypeList)) {
|
|
339
|
+
window.publicPath = `https://${domain}${this._getWebRootPath()}`;
|
|
340
|
+
}
|
|
341
|
+
else if (this._resolvedInputs.deployOptions.mode === types_1.DEPLOY_MODE.UPLOAD) {
|
|
342
|
+
try {
|
|
343
|
+
const { Data = {} } = yield this.api.cloudbaseManager
|
|
344
|
+
.commonService('lowcode', '2021-01-08')
|
|
345
|
+
.call({
|
|
346
|
+
Action: 'DescribeAppCustomUrls',
|
|
347
|
+
Param: {
|
|
348
|
+
EnvId: this.api.envId,
|
|
349
|
+
IgnorePublished: true,
|
|
350
|
+
WeAppId: appId,
|
|
351
|
+
},
|
|
352
|
+
});
|
|
353
|
+
this.api.logger.debug('DescribeAppCustomUrls:', (_d = Data === null || Data === void 0 ? void 0 : Data.Items) === null || _d === void 0 ? void 0 : _d[0]);
|
|
354
|
+
this._gatewayConfig = (_e = Data === null || Data === void 0 ? void 0 : Data.Items) === null || _e === void 0 ? void 0 : _e[0];
|
|
355
|
+
if (this._gatewayConfig) {
|
|
356
|
+
const path = this._gatewayConfig.Path;
|
|
357
|
+
window.publicPath = `https://${domain}${this._getWebRootPath()}`;
|
|
358
|
+
if (!common_2.buildAsAdminPortalByBuildType(buildTypeList)) {
|
|
359
|
+
window.basename = path;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
catch (e) {
|
|
364
|
+
this.api.logger.error('路由失败', e, {
|
|
340
365
|
EnvId: this.api.envId,
|
|
341
366
|
IgnorePublished: true,
|
|
342
367
|
WeAppId: appId,
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
this.api.logger.debug('DescribeAppCustomUrls:', (_d = Data === null || Data === void 0 ? void 0 : Data.Items) === null || _d === void 0 ? void 0 : _d[0]);
|
|
346
|
-
this._gatewayConfig = (_e = Data === null || Data === void 0 ? void 0 : Data.Items) === null || _e === void 0 ? void 0 : _e[0];
|
|
347
|
-
if (this._gatewayConfig) {
|
|
348
|
-
const path = this._gatewayConfig.Path;
|
|
349
|
-
window.publicPath = `https://${domain}${this._getWebRootPath()}`;
|
|
350
|
-
if (!common_2.buildAsAdminPortalByBuildType(buildTypeList)) {
|
|
351
|
-
window.basename = path;
|
|
352
|
-
}
|
|
353
|
-
appConfig.window = window;
|
|
354
|
-
this._resolvedInputs.mainAppSerializeData.appConfig = appConfig;
|
|
368
|
+
});
|
|
355
369
|
}
|
|
356
370
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
EnvId: this.api.envId,
|
|
360
|
-
IgnorePublished: true,
|
|
361
|
-
WeAppId: appId,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
371
|
+
appConfig.window = window;
|
|
372
|
+
this._resolvedInputs.mainAppSerializeData.appConfig = appConfig;
|
|
364
373
|
}
|
|
365
374
|
try {
|
|
366
375
|
if (!debug) {
|
|
@@ -376,7 +385,6 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
376
385
|
dependencies,
|
|
377
386
|
appKey: appId,
|
|
378
387
|
nodeModulesPath,
|
|
379
|
-
publicPath,
|
|
380
388
|
buildTypeList,
|
|
381
389
|
runtime: this._resolvedInputs.runtime,
|
|
382
390
|
ignoreInstall: this._resolvedInputs.ignoreInstall,
|
|
@@ -396,7 +404,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
396
404
|
try {
|
|
397
405
|
const { appConfig = {} } = mainAppSerializeData;
|
|
398
406
|
const { publicPath = '' } = (appConfig === null || appConfig === void 0 ? void 0 : appConfig.window) || {};
|
|
399
|
-
const { outDir = '', timeElapsed = 0, plugins
|
|
407
|
+
const { outDir = '', timeElapsed = 0, plugins } = result || {};
|
|
400
408
|
if (buildTypeList.includes("mp")) {
|
|
401
409
|
miniAppDir = outDir;
|
|
402
410
|
}
|
|
@@ -816,12 +824,6 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
816
824
|
const [_, bucket, region, cosKey] = matched;
|
|
817
825
|
this.api.logger.debug(`解析持久化地址`, matched);
|
|
818
826
|
if (bucket && region && cosKey) {
|
|
819
|
-
console.log({
|
|
820
|
-
Bucket: bucket,
|
|
821
|
-
Region: region,
|
|
822
|
-
Key: cosKey,
|
|
823
|
-
Body: fs_extra_1.default.createReadStream(zipPath),
|
|
824
|
-
});
|
|
825
827
|
yield new Promise((resolve, reject) => {
|
|
826
828
|
cos.putObject({
|
|
827
829
|
Bucket: bucket,
|
|
@@ -875,7 +877,7 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
875
877
|
}
|
|
876
878
|
_postProcessAdminPortal() {
|
|
877
879
|
return __awaiter(this, void 0, void 0, function* () {
|
|
878
|
-
const { appId, buildTypeList, mainAppSerializeData, deployOptions } = this._resolvedInputs;
|
|
880
|
+
const { appId, buildTypeList, mainAppSerializeData, deployOptions, } = this._resolvedInputs;
|
|
879
881
|
if (common_2.buildAsAdminPortalByBuildType(buildTypeList)) {
|
|
880
882
|
try {
|
|
881
883
|
const isPreview = (deployOptions === null || deployOptions === void 0 ? void 0 : deployOptions.mode) === types_1.DEPLOY_MODE.PREVIEW;
|
|
@@ -921,14 +923,11 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
921
923
|
let { Domains: domainList } = yield hostingService.tcbCheckResource({
|
|
922
924
|
domains,
|
|
923
925
|
});
|
|
924
|
-
let historyType = ((_a = this._resolvedInputs.mainAppSerializeData) === null || _a === void 0 ? void 0 : _a.historyType)
|
|
925
|
-
this._resolvedInputs.buildTypeList.includes("app") ||
|
|
926
|
-
this._resolvedInputs.buildTypeList.includes("adminPortal")
|
|
927
|
-
? types_1.HISTORY_TYPE.HASH
|
|
926
|
+
let historyType = ((_a = this._resolvedInputs.mainAppSerializeData) === null || _a === void 0 ? void 0 : _a.historyType) ? types_1.HISTORY_TYPE.HASH
|
|
928
927
|
: '';
|
|
929
928
|
if (this._website) {
|
|
930
929
|
if (!historyType || historyType === types_1.HISTORY_TYPE.BROWSER) {
|
|
931
|
-
let { WebsiteConfiguration } = yield hostingService.getWebsiteConfig();
|
|
930
|
+
let { WebsiteConfiguration, } = yield hostingService.getWebsiteConfig();
|
|
932
931
|
let path = this._getWebRootPath();
|
|
933
932
|
let rules = (WebsiteConfiguration.RoutingRules || []).reduce((arr, rule) => {
|
|
934
933
|
let meta = {};
|
|
@@ -954,14 +953,12 @@ class LowCodePlugin extends framework_core_1.Plugin {
|
|
|
954
953
|
}
|
|
955
954
|
return arr;
|
|
956
955
|
}, []);
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
replaceKeyWith: path,
|
|
962
|
-
});
|
|
956
|
+
(_b = this._resolvedInputs.mainAppSerializeData.pageInstanceList) === null || _b === void 0 ? void 0 : _b.forEach((page) => {
|
|
957
|
+
rules.push({
|
|
958
|
+
keyPrefixEquals: `${path.slice(1)}${page.id}`,
|
|
959
|
+
replaceKeyWith: path,
|
|
963
960
|
});
|
|
964
|
-
}
|
|
961
|
+
});
|
|
965
962
|
this._rules = rules;
|
|
966
963
|
}
|
|
967
964
|
}
|
|
@@ -2,8 +2,7 @@ export declare type PX = string;
|
|
|
2
2
|
export declare type Percent = number;
|
|
3
3
|
export declare type Color = string;
|
|
4
4
|
export declare type URL = string;
|
|
5
|
-
|
|
6
|
-
export declare type CSSProperties = Properties<string | number>;
|
|
5
|
+
export declare type CSSProperties = any;
|
|
7
6
|
export interface ICommonStyle {
|
|
8
7
|
size?: ISizeStyle;
|
|
9
8
|
transform?: ITransformStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/types/style.ts"],"names":[],"mappings":"AAAA,oBAAY,EAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/types/style.ts"],"names":[],"mappings":"AAAA,oBAAY,EAAE,GAAG,MAAM,CAAC;AACxB,oBAAY,OAAO,GAAG,MAAM,CAAC;AAC7B,oBAAY,KAAK,GAAG,MAAM,CAAC;AAC3B,oBAAY,GAAG,GAAG,MAAM,CAAC;AAMzB,oBAAY,aAAa,GAAG,GAAG,CAAC;AAEhC,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE;QACX,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IACxD,GAAG,CAAC,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,EAAE,E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AAC;IAClB,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,EAAE,EAAE,CAAC;IACX,MAAM,CAAC,EAAE,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,EAAE,CAAC;CACX;AAED,MAAM,WAAW,sBAAsB;IACrC,GAAG,CAAC,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,EAAE,CAAC;IACZ,IAAI,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -8,7 +8,7 @@ export declare function toCssStyle(commonStyle?: ICommonStyle, options?: {
|
|
|
8
8
|
export declare function removeInvalidStyleFormValue(styleForm?: ICommonStyle): ICommonStyle;
|
|
9
9
|
export declare function translateStyleToRpx(style?: CSSProperties): CSSProperties;
|
|
10
10
|
export declare function translateStyleToRem(style?: CSSProperties): CSSProperties;
|
|
11
|
-
export declare function translateStyleByHandler(style:
|
|
11
|
+
export declare function translateStyleByHandler(style: any, handler: (p: string) => string): {};
|
|
12
12
|
export declare function toREM(cssLen: number | string): string;
|
|
13
13
|
export declare function toRPX(cssLen: number | string): string;
|
|
14
14
|
export declare function removeWrapperBadEffectStyle(commonStyle?: CSSProperties): CSSProperties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/weapps-core/utils/style.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAqBvD,wBAAgB,UAAU,CACxB,WAAW,GAAE,YAAiB,EAC9B,OA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D;AAED,wBAAgB,2BAA2B,CACzC,WAAW,GAAE,aAAkB,GAC9B,aAAa,CAgBf;AAED,wBAAgB,sBAAsB,CACpC,WAAW,GAAE,aAAkB,GAC9B,aAAa,CAuBf;AAED,wBAAgB,SAAS,CACvB,KAAK,EAAE,aAAa,EACpB,SAAS,SAAqB,UAS/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/framework-plugin-low-code",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.29",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -146,7 +146,7 @@ export function getStaticResourceAttribute(staticUrl) {
|
|
|
146
146
|
**/
|
|
147
147
|
const _AUTH_CACHE_MAP = {}
|
|
148
148
|
export async function checkAuth(app, appId, pageId) {
|
|
149
|
-
<% if(isAdminPortal){ %>return true;<% } %>
|
|
149
|
+
<% if(isAdminPortal||isXPage){ %>return true;<% } %>
|
|
150
150
|
const cacheKey = `${appId}-${pageId}`
|
|
151
151
|
if(_AUTH_CACHE_MAP[cacheKey] !== undefined) {
|
|
152
152
|
return _AUTH_CACHE_MAP[cacheKey]
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { createHashHistory, createBrowserHistory } from 'history';
|
|
2
|
-
let history;
|
|
3
|
-
window._WEAPPS_HISTORY = history;
|
|
4
|
-
|
|
5
|
-
function removeS(path) {
|
|
6
|
-
if (path && path[0] === '/') {
|
|
7
|
-
return path.slice(1);
|
|
8
|
-
}
|
|
9
|
-
return path;
|
|
10
|
-
}
|
|
11
2
|
|
|
12
3
|
// if (!process.env.isMiniprogram) {
|
|
13
4
|
const createHistory =
|
|
@@ -16,11 +7,14 @@ const createHistory =
|
|
|
16
7
|
process.env.historyType === 'HASH'
|
|
17
8
|
? createHashHistory
|
|
18
9
|
: createBrowserHistory;
|
|
19
|
-
|
|
10
|
+
|
|
11
|
+
let history = createHistory({
|
|
20
12
|
basename: '', // The base URL of the app (see below)
|
|
21
13
|
forceRefresh: false, // Set true to force full page refreshes
|
|
22
14
|
keyLength: 6, // The length of location.key
|
|
23
15
|
});
|
|
16
|
+
window._WEAPPS_HISTORY = history;
|
|
17
|
+
|
|
24
18
|
// } else {
|
|
25
19
|
// history = {
|
|
26
20
|
// push(path) {
|