@cloudbase/cals 0.3.35 → 0.4.0
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/parser/cals/index.d.ts +1 -0
- package/lib/parser/cals/index.d.ts.map +1 -1
- package/lib/parser/cals/index.js +8 -4
- package/lib/parser/cals/utils/block/index.d.ts +0 -0
- package/lib/parser/cals/utils/block/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/block/index.js +0 -0
- package/lib/parser/cals/utils/code/index.d.ts +31 -0
- package/lib/parser/cals/utils/code/index.d.ts.map +1 -0
- package/lib/parser/cals/utils/code/index.js +376 -0
- package/lib/parser/cals/utils/common.d.ts +0 -0
- package/lib/parser/cals/utils/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/common.js +0 -0
- package/lib/parser/cals/utils/runtime.d.ts +0 -0
- package/lib/parser/cals/utils/runtime.d.ts.map +0 -0
- package/lib/parser/cals/utils/runtime.js +2 -2
- package/lib/parser/cals/utils/spinoff/index.d.ts +0 -0
- package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/spinoff/index.js +0 -0
- package/lib/parser/cals/utils/style.d.ts +0 -0
- package/lib/parser/cals/utils/style.d.ts.map +0 -0
- package/lib/parser/cals/utils/style.js +0 -0
- package/lib/parser/cals/utils/version/common.d.ts +0 -0
- package/lib/parser/cals/utils/version/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/common.js +5 -1
- package/lib/parser/cals/utils/version/config.d.ts +0 -0
- package/lib/parser/cals/utils/version/config.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/config.js +0 -0
- package/lib/parser/cals/utils/version/index.d.ts +0 -0
- package/lib/parser/cals/utils/version/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/index.js +5 -1
- package/lib/parser/cals/utils/version/parses.d.ts +0 -0
- package/lib/parser/cals/utils/version/parses.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/parses.js +5 -1
- package/lib/parser/cals/utils/version/utils.d.ts +0 -0
- package/lib/parser/cals/utils/version/utils.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/utils.js +0 -0
- package/lib/parser/expression/index.d.ts +0 -0
- package/lib/parser/expression/index.d.ts.map +0 -0
- package/lib/parser/expression/index.js +0 -0
- package/lib/parser/index.d.ts +1 -0
- package/lib/parser/index.d.ts.map +1 -1
- package/lib/parser/index.js +11 -2
- package/lib/types/basic/app.d.ts +0 -0
- package/lib/types/basic/app.d.ts.map +0 -0
- package/lib/types/basic/app.js +0 -0
- package/lib/types/basic/common.d.ts +0 -0
- package/lib/types/basic/common.d.ts.map +0 -0
- package/lib/types/basic/common.js +0 -0
- package/lib/types/basic/component.d.ts +0 -0
- package/lib/types/basic/component.d.ts.map +0 -0
- package/lib/types/basic/component.js +0 -0
- package/lib/types/basic/datasource.d.ts +0 -0
- package/lib/types/basic/datasource.d.ts.map +0 -0
- package/lib/types/basic/datasource.js +0 -0
- package/lib/types/index.d.ts +0 -0
- package/lib/types/index.d.ts.map +0 -0
- package/lib/types/index.js +5 -1
- package/lib/types/lcds.d.ts +0 -0
- package/lib/types/lcds.d.ts.map +0 -0
- package/lib/types/lcds.js +0 -0
- package/lib/types/platform/app.d.ts +4 -0
- package/lib/types/platform/app.d.ts.map +1 -1
- package/lib/types/platform/app.js +0 -0
- package/lib/types/platform/common.d.ts +0 -0
- package/lib/types/platform/common.d.ts.map +0 -0
- package/lib/types/platform/common.js +0 -0
- package/lib/types/platform/component.d.ts +0 -0
- package/lib/types/platform/component.d.ts.map +0 -0
- package/lib/types/platform/component.js +0 -0
- package/lib/types/platform/datasource.d.ts +0 -0
- package/lib/types/platform/datasource.d.ts.map +0 -0
- package/lib/types/platform/datasource.js +0 -0
- package/lib/types/platform/widget/form.d.ts +0 -0
- package/lib/types/platform/widget/form.d.ts.map +0 -0
- package/lib/types/platform/widget/form.js +0 -0
- package/lib/types/platform/widget/meta.d.ts +0 -0
- package/lib/types/platform/widget/meta.d.ts.map +0 -0
- package/lib/types/platform/widget/meta.js +0 -0
- package/lib/utils/build.d.ts +0 -0
- package/lib/utils/build.d.ts.map +0 -0
- package/lib/utils/build.js +5 -1
- package/lib/utils/constant.d.ts +0 -0
- package/lib/utils/constant.d.ts.map +0 -0
- package/lib/utils/constant.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 +5 -1
- package/package.json +2 -3
- package/lib/parser/cals/utils/transform/index.d.ts +0 -4
- package/lib/parser/cals/utils/transform/index.d.ts.map +0 -1
- package/lib/parser/cals/utils/transform/index.js +0 -247
- package/lib/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parser/cals/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EAGd,mBAAmB,EACnB,cAAc,EAAE,cAAc;AAC9B,mBAAmB,EACnB,aAAa,EACb,IAAI,EACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAkC,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAc5F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,UAAU,mBAAmB;IAC3B,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,UAAU,iBAAiB;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACtB,SAAS,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA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KAAE,CAAC;IACzC,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,UAAU,CAAA;KAAE,CAAC;IAC/C,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,OAAO,CAAA;KAAE,CAAC;CAC1C;;;;;;;mBAIY,MAAM;mBACN,MAAM;sBACH,MAAM;;;6BACwB,OAAO;;;wBACnC,MAAM;;;EA8BvB"}
|
package/lib/parser/cals/index.js
CHANGED
|
@@ -228,6 +228,10 @@ function recoverSynamicMap(parent, current, path = '') {
|
|
|
228
228
|
Object.keys(current).forEach((key) => {
|
|
229
229
|
let value = current[key];
|
|
230
230
|
if ((0, lodash_1.isArray)(value)) {
|
|
231
|
+
// 注意如果是 selectableBlock 独立处理
|
|
232
|
+
if (value === null || value === void 0 ? void 0 : value.some((item) => !!(item === null || item === void 0 ? void 0 : item.selectableBlock))) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
231
235
|
// 数组必须在前面
|
|
232
236
|
value.forEach((valueItem, valueIndex) => {
|
|
233
237
|
if ((0, lodash_1.isObject)(valueItem)) {
|
|
@@ -252,18 +256,18 @@ function recoverSynamicMap(parent, current, path = '') {
|
|
|
252
256
|
return current;
|
|
253
257
|
}
|
|
254
258
|
function deserializeDynamicMap(ctx, map, extraMap) {
|
|
255
|
-
var _a, _b
|
|
259
|
+
var _a, _b;
|
|
256
260
|
let data = {};
|
|
257
261
|
const clonedMap = (0, lodash_1.cloneDeep)(map);
|
|
258
262
|
// 还原flatten path
|
|
259
263
|
map = recoverSynamicMap(clonedMap, clonedMap, '');
|
|
260
264
|
for (let key in map || {}) {
|
|
261
|
-
let value =
|
|
265
|
+
let value = map === null || map === void 0 ? void 0 : map[key];
|
|
262
266
|
let matched = key.match(DYNAMIC_KEY_REG);
|
|
263
267
|
let { key: processedKey, value: processedValue } = deserializeValue(ctx, key, value, extraMap === null || extraMap === void 0 ? void 0 : extraMap[matched ? matched[1] : key]);
|
|
264
268
|
/* 选区结构处理 [CALS] to [formily] */
|
|
265
|
-
if (Array.isArray(processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) && ((
|
|
266
|
-
(
|
|
269
|
+
if (Array.isArray(processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) && ((_a = processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) === null || _a === void 0 ? void 0 : _a.some((item) => !!(item === null || item === void 0 ? void 0 : item.selectableBlock)))) {
|
|
270
|
+
(_b = processedValue === null || processedValue === void 0 ? void 0 : processedValue.value) === null || _b === void 0 ? void 0 : _b.forEach((_value) => {
|
|
267
271
|
var _a, _b, _c, _d;
|
|
268
272
|
const module = (_b = (_a = _value === null || _value === void 0 ? void 0 : _value.selectableBlock) === null || _a === void 0 ? void 0 : _a.module) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
269
273
|
const component = (_d = (_c = _value === null || _value === void 0 ? void 0 : _value.selectableBlock) === null || _c === void 0 ? void 0 : _c.component) === null || _d === void 0 ? void 0 : _d.toLowerCase();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cals 与 code 互转
|
|
3
|
+
* 这里的 code 是中间状态的 code,即非最终生成的可运行的项目代码
|
|
4
|
+
*/
|
|
5
|
+
import { IPlatformApp } from '../../../../types';
|
|
6
|
+
export interface ICodeItem {
|
|
7
|
+
path: string;
|
|
8
|
+
code: string;
|
|
9
|
+
conflict?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* CALS 转成 中间状态的代码
|
|
13
|
+
*
|
|
14
|
+
* @params version: v0 - 没有 pages 目录; v1 - 有 pages 目录
|
|
15
|
+
*/
|
|
16
|
+
export declare function calsToCode(calsJSON: IPlatformApp, version?: 'v0' | 'v1'): ICodeItem[];
|
|
17
|
+
/**
|
|
18
|
+
* 中间状态的代码 转成 CALS
|
|
19
|
+
*
|
|
20
|
+
* @params version: v0 - 没有 pages 目录; v1 - 有 pages 目录
|
|
21
|
+
*/
|
|
22
|
+
export declare function codeToCals(codeList: ICodeItem[], version?: 'v0' | 'v1'): IPlatformApp;
|
|
23
|
+
/**
|
|
24
|
+
* 指定代码内容是否存在冲突未解决
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkForConflicts(code: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 以 from 为准自动解决冲突
|
|
29
|
+
*/
|
|
30
|
+
export declare function autoResolveConflicts(code: string, from: 'theirs' | 'ours'): string;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/code/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAA2D,MAAM,mBAAmB,CAAC;AAG1G,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,GAAE,IAAI,GAAG,IAAW,GAAG,SAAS,EAAE,CAiL3F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,OAAO,GAAE,IAAI,GAAG,IAAW,GAAG,YAAY,CA4J3F;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CA6BlF"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* cals 与 code 互转
|
|
4
|
+
* 这里的 code 是中间状态的 code,即非最终生成的可运行的项目代码
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.autoResolveConflicts = exports.checkForConflicts = exports.codeToCals = exports.calsToCode = void 0;
|
|
8
|
+
const types_1 = require("../../../../types");
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
10
|
+
/**
|
|
11
|
+
* CALS 转成 中间状态的代码
|
|
12
|
+
*
|
|
13
|
+
* @params version: v0 - 没有 pages 目录; v1 - 有 pages 目录
|
|
14
|
+
*/
|
|
15
|
+
function calsToCode(calsJSON, version = 'v1') {
|
|
16
|
+
// 边界处理
|
|
17
|
+
if (!calsJSON)
|
|
18
|
+
return [];
|
|
19
|
+
const versionMap = {
|
|
20
|
+
v0: {
|
|
21
|
+
pageDir: '',
|
|
22
|
+
},
|
|
23
|
+
v1: {
|
|
24
|
+
pageDir: 'pages',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const versionConfig = versionMap[version];
|
|
28
|
+
if (!versionConfig)
|
|
29
|
+
throw "version' value must be v0 or v1";
|
|
30
|
+
const codeList = [];
|
|
31
|
+
/**
|
|
32
|
+
* 生成 pages
|
|
33
|
+
*/
|
|
34
|
+
const pagePaths = [];
|
|
35
|
+
calsJSON.items.forEach((pageItem) => {
|
|
36
|
+
const pagePath = versionConfig.pageDir ? `${versionConfig.pageDir}/${pageItem.id}` : pageItem.id;
|
|
37
|
+
/**
|
|
38
|
+
* 生成 page-config.json
|
|
39
|
+
*/
|
|
40
|
+
// 来自 IPageComponent
|
|
41
|
+
// :class, :style, component, dataVariables, directives, id, listeners, module, type 忽略,所以这里不包含
|
|
42
|
+
const pageConfigFields = ['attributes', 'dataset', 'extra', 'label', 'name'];
|
|
43
|
+
genConfig(pageItem, pageConfigFields, `${pagePath}/page-config.json`);
|
|
44
|
+
/**
|
|
45
|
+
* 生成 page.json
|
|
46
|
+
*/
|
|
47
|
+
addCodeItem(`${pagePath}/page.json`, JSON.stringify(pageItem.items, null, 2));
|
|
48
|
+
/**
|
|
49
|
+
* 生成页面代码
|
|
50
|
+
*/
|
|
51
|
+
genCode(pageItem.resources, pagePath);
|
|
52
|
+
// 记录页面目录路径
|
|
53
|
+
pagePaths.push(pagePath);
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* 生成 app-config.json
|
|
57
|
+
*/
|
|
58
|
+
// 来自 Interface IPlatformApp
|
|
59
|
+
// dataSources, dataVariables 忽略,所以这里不包含
|
|
60
|
+
const appConfigFields = [
|
|
61
|
+
'author',
|
|
62
|
+
'dataset',
|
|
63
|
+
'dependencies',
|
|
64
|
+
'description',
|
|
65
|
+
'envId',
|
|
66
|
+
'extra',
|
|
67
|
+
'id',
|
|
68
|
+
'label',
|
|
69
|
+
'main',
|
|
70
|
+
'name',
|
|
71
|
+
'version',
|
|
72
|
+
];
|
|
73
|
+
const otherConfigFields = {
|
|
74
|
+
// 来自 Interface IPlatformAppExtra
|
|
75
|
+
extra: [
|
|
76
|
+
'appConfig',
|
|
77
|
+
'compHiddenConfig',
|
|
78
|
+
'domain',
|
|
79
|
+
'historyType',
|
|
80
|
+
'maxID',
|
|
81
|
+
'miniprogramPlugins',
|
|
82
|
+
'npmDependencies',
|
|
83
|
+
'plugins',
|
|
84
|
+
'presetColors',
|
|
85
|
+
'rootPath',
|
|
86
|
+
'themeVars',
|
|
87
|
+
'originHistoryId',
|
|
88
|
+
// 额外添加,非标准
|
|
89
|
+
'pages',
|
|
90
|
+
],
|
|
91
|
+
};
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
calsJSON.extra.pages = pagePaths;
|
|
94
|
+
genConfig(calsJSON, appConfigFields, 'app-config.json', otherConfigFields);
|
|
95
|
+
/**
|
|
96
|
+
* 生成全局代码
|
|
97
|
+
*/
|
|
98
|
+
genCode(calsJSON.resources);
|
|
99
|
+
/**
|
|
100
|
+
* 生成 package.json 文件
|
|
101
|
+
*/
|
|
102
|
+
addCodeItem('package.json', JSON.stringify({
|
|
103
|
+
name: calsJSON.name,
|
|
104
|
+
description: calsJSON.description,
|
|
105
|
+
version: calsJSON.version,
|
|
106
|
+
}, null, 2), '');
|
|
107
|
+
return codeList;
|
|
108
|
+
function addCodeItem(path, code, parentDir = 'src') {
|
|
109
|
+
codeList.push({
|
|
110
|
+
path: parentDir ? `${parentDir}/${path}` : path,
|
|
111
|
+
code,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function genConfig(itemJSON, configFields, configPath, otherConfigFields) {
|
|
115
|
+
const config = (0, lodash_1.pick)(itemJSON, configFields);
|
|
116
|
+
if (otherConfigFields) {
|
|
117
|
+
Object.keys(otherConfigFields).forEach((key) => {
|
|
118
|
+
config[key] = (0, lodash_1.pick)(config[key], otherConfigFields[key]);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
// state, computed 类型以及名称为 ____index____ 的都不生成代码
|
|
122
|
+
config._ignoreResources = itemJSON.resources.filter((item) => [types_1.ECodeType.STATE, types_1.ECodeType.COMPUTEDN].includes(item.codeType) || item.name === '____index____');
|
|
123
|
+
// 按 key 排序,这样确保每次生成都一样的顺序,减少冲突
|
|
124
|
+
const newConfig = {};
|
|
125
|
+
Object.keys(config)
|
|
126
|
+
.sort()
|
|
127
|
+
.forEach((key) => (newConfig[key] = config[key]));
|
|
128
|
+
addCodeItem(configPath, JSON.stringify(config, null, 2));
|
|
129
|
+
}
|
|
130
|
+
function genCode(resources, basePath = '') {
|
|
131
|
+
const codeResources = (resources || []).filter((item) => item.type === types_1.EResourceType.CODE && item.name !== '____index____');
|
|
132
|
+
codeResources.forEach((codeItem) => {
|
|
133
|
+
let codePath = '';
|
|
134
|
+
let realBasePath = basePath ? `${basePath}/` : basePath;
|
|
135
|
+
switch (codeItem.codeType) {
|
|
136
|
+
case types_1.ECodeType.THEME:
|
|
137
|
+
codePath = `${realBasePath}theme.less`;
|
|
138
|
+
break;
|
|
139
|
+
case types_1.ECodeType.STYLE:
|
|
140
|
+
codePath = `${realBasePath}style.less`;
|
|
141
|
+
break;
|
|
142
|
+
case types_1.ECodeType.LIFECYCLE:
|
|
143
|
+
codePath = `${realBasePath}lifecycle.js`;
|
|
144
|
+
break;
|
|
145
|
+
// 这两种类型的文件现在不生成文件,需要存放在 config 中
|
|
146
|
+
case types_1.ECodeType.STATE:
|
|
147
|
+
// codePath = `${realBasePath}state.js`;
|
|
148
|
+
break;
|
|
149
|
+
case types_1.ECodeType.COMPUTEDN:
|
|
150
|
+
// codePath = `${realBasePath}computed.js`;
|
|
151
|
+
break;
|
|
152
|
+
case types_1.ECodeType.NORMAL_MODULE:
|
|
153
|
+
codePath = `common/${codeItem.name}.js`;
|
|
154
|
+
break;
|
|
155
|
+
case types_1.ECodeType.HANDLER_FN:
|
|
156
|
+
codePath = `${realBasePath}handler/${codeItem.name}.js`;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
if (codePath) {
|
|
160
|
+
addCodeItem(codePath, codeItem.code);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.calsToCode = calsToCode;
|
|
166
|
+
/**
|
|
167
|
+
* 中间状态的代码 转成 CALS
|
|
168
|
+
*
|
|
169
|
+
* @params version: v0 - 没有 pages 目录; v1 - 有 pages 目录
|
|
170
|
+
*/
|
|
171
|
+
function codeToCals(codeList, version = 'v1') {
|
|
172
|
+
// 边界处理
|
|
173
|
+
if (!codeList || codeList.length === 0)
|
|
174
|
+
return {};
|
|
175
|
+
const versionMap = {
|
|
176
|
+
v0: {
|
|
177
|
+
pageDir: 'src',
|
|
178
|
+
pageIdRegExp: /src\/(.*?)\/.*/,
|
|
179
|
+
pageConfigRegExp: /src\/.*?\/page-config.json$/,
|
|
180
|
+
pageJSONRegExp: /src\/.*?\/page.json/,
|
|
181
|
+
},
|
|
182
|
+
v1: {
|
|
183
|
+
pageDir: 'src/pages',
|
|
184
|
+
pageIdRegExp: /src\/pages\/(.*?)\/.*/,
|
|
185
|
+
pageConfigRegExp: /src\/pages\/.*?\/page-config.json$/,
|
|
186
|
+
pageJSONRegExp: /src\/pages\/.*?\/page.json/,
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
const versionConfig = versionMap[version];
|
|
190
|
+
if (!versionConfig)
|
|
191
|
+
throw "version' value must be v0 or v1";
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
const calsJSON = {
|
|
194
|
+
items: [],
|
|
195
|
+
resources: [],
|
|
196
|
+
};
|
|
197
|
+
const appConfigCodeItem = codeList.find((item) => item.path === 'src/app-config.json');
|
|
198
|
+
const appConfig = JSON.parse(appConfigCodeItem.code);
|
|
199
|
+
let pagePaths = appConfig.extra.pages;
|
|
200
|
+
codeList.forEach((codeItem) => {
|
|
201
|
+
if (codeItem.path === 'src/app-config.json') {
|
|
202
|
+
/**
|
|
203
|
+
* app-config.json
|
|
204
|
+
*/
|
|
205
|
+
const config = appConfig;
|
|
206
|
+
Object.assign(calsJSON, (0, lodash_1.omit)(config, ['_ignoreResources', 'extra.pages']));
|
|
207
|
+
calsJSON.resources = (0, lodash_1.concat)(calsJSON.resources, config._ignoreResources);
|
|
208
|
+
}
|
|
209
|
+
else if (isPageFile(codeItem.path)) {
|
|
210
|
+
/**
|
|
211
|
+
* page
|
|
212
|
+
*/
|
|
213
|
+
const [, pageId] = codeItem.path.match(versionConfig.pageIdRegExp);
|
|
214
|
+
let pageItem = calsJSON.items.find((item) => item.id === pageId);
|
|
215
|
+
if (!pageItem) {
|
|
216
|
+
pageItem = {
|
|
217
|
+
id: pageId,
|
|
218
|
+
type: 'PAGE',
|
|
219
|
+
resources: [],
|
|
220
|
+
};
|
|
221
|
+
calsJSON.items.push(pageItem);
|
|
222
|
+
}
|
|
223
|
+
if (versionConfig.pageConfigRegExp.test(codeItem.path)) {
|
|
224
|
+
/**
|
|
225
|
+
* page-config.json
|
|
226
|
+
*/
|
|
227
|
+
const config = JSON.parse(codeItem.code);
|
|
228
|
+
const propsConfig = (0, lodash_1.omit)(config, ['_ignoreResources']);
|
|
229
|
+
Object.assign(pageItem, propsConfig);
|
|
230
|
+
pageItem.resources = (0, lodash_1.concat)(pageItem.resources, config._ignoreResources);
|
|
231
|
+
}
|
|
232
|
+
else if (versionConfig.pageJSONRegExp.test(codeItem.path)) {
|
|
233
|
+
/**
|
|
234
|
+
* page.json
|
|
235
|
+
*/
|
|
236
|
+
pageItem.items = JSON.parse(codeItem.code);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
/**
|
|
240
|
+
* page normal codes
|
|
241
|
+
*/
|
|
242
|
+
handleNormalCodes(codeItem, pageId, pageItem.resources);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
else if (codeItem.path.indexOf('src/') === 0) {
|
|
246
|
+
/**
|
|
247
|
+
* global normal codes
|
|
248
|
+
*/
|
|
249
|
+
handleNormalCodes(codeItem, '', calsJSON.resources);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
return calsJSON;
|
|
253
|
+
function handleNormalCodes(codeItem, pageId, resources) {
|
|
254
|
+
const relativePath = !pageId
|
|
255
|
+
? codeItem.path.replace('src/', '')
|
|
256
|
+
: codeItem.path.replace(`${versionConfig.pageDir}/${pageId}/`, '');
|
|
257
|
+
const _pageId = !pageId ? 'global' : pageId;
|
|
258
|
+
const commonVal = {
|
|
259
|
+
code: codeItem.code,
|
|
260
|
+
type: types_1.EResourceType.CODE,
|
|
261
|
+
system: true,
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* 只处理 path 为 src/theme.less, src/style.less, src/lifecycle.js, src/common/xxx.js, src/pages/xxx/handler/xxx.js
|
|
265
|
+
* 其它视为无效文件忽略
|
|
266
|
+
*/
|
|
267
|
+
switch (relativePath) {
|
|
268
|
+
case 'theme.less':
|
|
269
|
+
calsJSON.resources.push(Object.assign({ name: types_1.ECodeType.THEME, path: `${_pageId}/${types_1.ECodeType.THEME}`, codeType: types_1.ECodeType.THEME }, commonVal));
|
|
270
|
+
break;
|
|
271
|
+
case 'style.less':
|
|
272
|
+
resources.push(Object.assign({ name: types_1.ECodeType.STYLE, path: `${_pageId}/${types_1.ECodeType.STYLE}`, codeType: types_1.ECodeType.STYLE }, commonVal));
|
|
273
|
+
break;
|
|
274
|
+
case 'lifecycle.js':
|
|
275
|
+
resources.push(Object.assign({ name: types_1.ECodeType.LIFECYCLE, path: `${_pageId}/${types_1.ECodeType.LIFECYCLE}`, codeType: types_1.ECodeType.LIFECYCLE }, commonVal));
|
|
276
|
+
break;
|
|
277
|
+
default:
|
|
278
|
+
// page handler
|
|
279
|
+
const handlerMatches = relativePath.match(/^handler\/([^/]*?).js$/);
|
|
280
|
+
if (handlerMatches) {
|
|
281
|
+
const [, name] = handlerMatches;
|
|
282
|
+
resources.push(Object.assign(Object.assign({ name, path: `${_pageId}/handler/${name}`, codeType: types_1.ECodeType.HANDLER_FN }, commonVal), { system: false }));
|
|
283
|
+
}
|
|
284
|
+
// globa common
|
|
285
|
+
const commonMatches = relativePath.match(/^common\/([^/]*?).js$/);
|
|
286
|
+
if (commonMatches) {
|
|
287
|
+
const [, name] = commonMatches;
|
|
288
|
+
calsJSON.resources.push(Object.assign({ name, path: `${_pageId}/common/${name}`, codeType: types_1.ECodeType.NORMAL_MODULE }, commonVal));
|
|
289
|
+
}
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function isPageFile(filePath) {
|
|
294
|
+
return pagePaths.map((pagePath) => `src/${pagePath}`).some((pagePath) => filePath.indexOf(pagePath) === 0);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
exports.codeToCals = codeToCals;
|
|
298
|
+
/**
|
|
299
|
+
* 指定代码内容是否存在冲突未解决
|
|
300
|
+
*/
|
|
301
|
+
function checkForConflicts(code) {
|
|
302
|
+
return findAllConflicts(code, true).length > 0;
|
|
303
|
+
}
|
|
304
|
+
exports.checkForConflicts = checkForConflicts;
|
|
305
|
+
/**
|
|
306
|
+
* 以 from 为准自动解决冲突
|
|
307
|
+
*/
|
|
308
|
+
function autoResolveConflicts(code, from) {
|
|
309
|
+
const allConflicts = findAllConflicts(code);
|
|
310
|
+
const lines = code.split('\n');
|
|
311
|
+
const result = [];
|
|
312
|
+
const removeLines = [];
|
|
313
|
+
allConflicts.forEach((conflictItem) => {
|
|
314
|
+
if (from === 'theirs') {
|
|
315
|
+
// 删除上面的
|
|
316
|
+
removeLines.push([conflictItem.start, conflictItem.middle], conflictItem.end);
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
// default is ours
|
|
320
|
+
// 删除下面的
|
|
321
|
+
removeLines.push(conflictItem.start, [conflictItem.middle, conflictItem.end]);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
lines.forEach((line, idx) => {
|
|
325
|
+
const matched = removeLines.some((rmIdx) => {
|
|
326
|
+
if (Array.isArray(rmIdx)) {
|
|
327
|
+
return idx >= rmIdx[0] && idx <= rmIdx[1];
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
return idx === rmIdx;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
if (!matched)
|
|
334
|
+
result.push(line);
|
|
335
|
+
});
|
|
336
|
+
return result.join('\n');
|
|
337
|
+
}
|
|
338
|
+
exports.autoResolveConflicts = autoResolveConflicts;
|
|
339
|
+
function findAllConflicts(code, onlyFindFirstOne = false) {
|
|
340
|
+
let allConflicts = [];
|
|
341
|
+
const lines = code.split('\n');
|
|
342
|
+
let oneConflict = { start: -1, middle: -1, end: -1 };
|
|
343
|
+
for (let i = 0, leng = lines.length; i < leng; i++) {
|
|
344
|
+
const line = lines[i];
|
|
345
|
+
if (/^<<<<<<<$/.test(line)) {
|
|
346
|
+
if (oneConflict.start === -1) {
|
|
347
|
+
// 起点
|
|
348
|
+
oneConflict.start = i;
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
// 非起点:一个完整的冲突还未结束,出现起点符号,下边的内容冲突全部无效
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else if (/^=======$/.test(line)) {
|
|
356
|
+
if (oneConflict.start !== -1) {
|
|
357
|
+
// 有 <<<<<<< 起点符号
|
|
358
|
+
if (oneConflict.middle === -1) {
|
|
359
|
+
// 未有 ======= 中间符号
|
|
360
|
+
oneConflict.middle = i;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
else if (/^>>>>>>>$/.test(line)) {
|
|
365
|
+
if (oneConflict.start !== -1 && oneConflict.middle !== -1) {
|
|
366
|
+
oneConflict.end = i;
|
|
367
|
+
allConflicts.push(oneConflict);
|
|
368
|
+
// 重置
|
|
369
|
+
oneConflict = { start: -1, middle: -1, end: -1 };
|
|
370
|
+
if (onlyFindFirstOne)
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return allConflicts;
|
|
376
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,7 @@ const common_1 = require("./common");
|
|
|
7
7
|
const lodash_1 = require("lodash");
|
|
8
8
|
function readComponents(properties = {}, excludeKeys = []) {
|
|
9
9
|
var _a;
|
|
10
|
-
const cmps = {};
|
|
10
|
+
const cmps /* IWeAppPage['componentInstances'] */ = {};
|
|
11
11
|
for (const key in properties) {
|
|
12
12
|
if (excludeKeys.indexOf(key) > -1) {
|
|
13
13
|
continue;
|
|
@@ -62,7 +62,7 @@ function readComponents(properties = {}, excludeKeys = []) {
|
|
|
62
62
|
exports.readComponents = readComponents;
|
|
63
63
|
function readDirectives(cmp) {
|
|
64
64
|
var _a, _b;
|
|
65
|
-
const directives = {};
|
|
65
|
+
const directives /* IWeAppComponentInstance['xProps']['directives'] */ = {};
|
|
66
66
|
// 默认为 true,节省体积不记录
|
|
67
67
|
if (cmp.data && cmp.data._visible !== true) {
|
|
68
68
|
directives.waIf = {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/lib/parser/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './cals/index';
|
|
2
2
|
export { upgrageToVersion2 } from './cals/utils/version';
|
|
3
3
|
export { processComponentModule } from './cals/utils/spinoff';
|
|
4
|
+
export { calsToCode, codeToCals, ICodeItem, checkForConflicts, autoResolveConflicts, } from './cals/utils/code';
|
|
4
5
|
export { parseComponentCals } from './cals/utils/block';
|
|
5
6
|
export { ActionType, IDataBind, PropBindType } from './expression/index';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|