@cloudbase/cals 1.2.12 → 1.2.13
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.
|
@@ -64,7 +64,7 @@ function getUsedDatasource(apps, options) {
|
|
|
64
64
|
}
|
|
65
65
|
try {
|
|
66
66
|
(0, common_1.walkThroughComponents)([cals], (component) => {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
68
68
|
const { resources = [], listeners = [], dataset = {} } = component;
|
|
69
69
|
if (!usedMap[key]) {
|
|
70
70
|
usedMap[key] = new Set();
|
|
@@ -93,7 +93,7 @@ function getUsedDatasource(apps, options) {
|
|
|
93
93
|
});
|
|
94
94
|
if (!component.module || component.module === utils_1.OFFICIAL_LIB_KEY) {
|
|
95
95
|
const data = component.attributes;
|
|
96
|
-
if (component.attributes.varPath) {
|
|
96
|
+
if ((_a = component.attributes) === null || _a === void 0 ? void 0 : _a.varPath) {
|
|
97
97
|
let dsName = component.attributes.varPath;
|
|
98
98
|
if (Array.isArray(component.attributes.varPath) && component.attributes.varPath.length === 2) {
|
|
99
99
|
[dsName] = component.attributes.varPath;
|
|
@@ -103,21 +103,21 @@ function getUsedDatasource(apps, options) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
// 其他绑定数据源的组件, 如 地图、图表等
|
|
106
|
-
if ((
|
|
107
|
-
const dsName = (
|
|
106
|
+
if ((_b = data === null || data === void 0 ? void 0 : data.dataSource) === null || _b === void 0 ? void 0 : _b.name) {
|
|
107
|
+
const dsName = (_c = data === null || data === void 0 ? void 0 : data.dataSource) === null || _c === void 0 ? void 0 : _c.name;
|
|
108
108
|
if (typeof dsName === 'string' && /^[a-z\d_]+$/.test(dsName)) {
|
|
109
109
|
usedMap[key].add(dsName);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
// 绑定连接器选择的连接器
|
|
113
|
-
if ((
|
|
114
|
-
const dsName = (
|
|
113
|
+
if ((_e = (_d = data === null || data === void 0 ? void 0 : data.bindConnectMetadata) === null || _d === void 0 ? void 0 : _d.datasource) === null || _e === void 0 ? void 0 : _e.name) {
|
|
114
|
+
const dsName = (_f = data === null || data === void 0 ? void 0 : data.bindConnectMetadata) === null || _f === void 0 ? void 0 : _f.datasource.name;
|
|
115
115
|
if (component.component !== 'ModelTable' || (data === null || data === void 0 ? void 0 : data.dataSourceType) === 'custom-connector') {
|
|
116
116
|
usedMap[key].add(dsName);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
// 业务模型组件数据源绑定
|
|
120
|
-
if ((
|
|
120
|
+
if ((_h = (_g = data === null || data === void 0 ? void 0 : data.bindMetadata) === null || _g === void 0 ? void 0 : _g.datasource) === null || _h === void 0 ? void 0 : _h.name) {
|
|
121
121
|
if (component.component !== 'ModelTable' || (data === null || data === void 0 ? void 0 : data.dataSourceType) !== 'custom-connector') {
|
|
122
122
|
usedMap[key].add(data.bindMetadata.datasource.name);
|
|
123
123
|
}
|
|
@@ -130,8 +130,8 @@ function getUsedDatasource(apps, options) {
|
|
|
130
130
|
}
|
|
131
131
|
// 应当判断数据容器,compConfig 中包含 isDataContainer
|
|
132
132
|
// 此处为了方便,松散判断
|
|
133
|
-
if ((
|
|
134
|
-
usedMap[key].add((
|
|
133
|
+
if ((_j = data === null || data === void 0 ? void 0 : data.datasource) === null || _j === void 0 ? void 0 : _j.name) {
|
|
134
|
+
usedMap[key].add((_k = data === null || data === void 0 ? void 0 : data.datasource) === null || _k === void 0 ? void 0 : _k.name);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -61,7 +61,7 @@ export function getUsedDatasource(apps, options) {
|
|
|
61
61
|
}
|
|
62
62
|
try {
|
|
63
63
|
walkThroughComponents([cals], (component) => {
|
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
65
65
|
const { resources = [], listeners = [], dataset = {} } = component;
|
|
66
66
|
if (!usedMap[key]) {
|
|
67
67
|
usedMap[key] = new Set();
|
|
@@ -90,7 +90,7 @@ export function getUsedDatasource(apps, options) {
|
|
|
90
90
|
});
|
|
91
91
|
if (!component.module || component.module === OFFICIAL_LIB_KEY) {
|
|
92
92
|
const data = component.attributes;
|
|
93
|
-
if (component.attributes.varPath) {
|
|
93
|
+
if ((_a = component.attributes) === null || _a === void 0 ? void 0 : _a.varPath) {
|
|
94
94
|
let dsName = component.attributes.varPath;
|
|
95
95
|
if (Array.isArray(component.attributes.varPath) && component.attributes.varPath.length === 2) {
|
|
96
96
|
[dsName] = component.attributes.varPath;
|
|
@@ -100,21 +100,21 @@ export function getUsedDatasource(apps, options) {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
// 其他绑定数据源的组件, 如 地图、图表等
|
|
103
|
-
if ((
|
|
104
|
-
const dsName = (
|
|
103
|
+
if ((_b = data === null || data === void 0 ? void 0 : data.dataSource) === null || _b === void 0 ? void 0 : _b.name) {
|
|
104
|
+
const dsName = (_c = data === null || data === void 0 ? void 0 : data.dataSource) === null || _c === void 0 ? void 0 : _c.name;
|
|
105
105
|
if (typeof dsName === 'string' && /^[a-z\d_]+$/.test(dsName)) {
|
|
106
106
|
usedMap[key].add(dsName);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
// 绑定连接器选择的连接器
|
|
110
|
-
if ((
|
|
111
|
-
const dsName = (
|
|
110
|
+
if ((_e = (_d = data === null || data === void 0 ? void 0 : data.bindConnectMetadata) === null || _d === void 0 ? void 0 : _d.datasource) === null || _e === void 0 ? void 0 : _e.name) {
|
|
111
|
+
const dsName = (_f = data === null || data === void 0 ? void 0 : data.bindConnectMetadata) === null || _f === void 0 ? void 0 : _f.datasource.name;
|
|
112
112
|
if (component.component !== 'ModelTable' || (data === null || data === void 0 ? void 0 : data.dataSourceType) === 'custom-connector') {
|
|
113
113
|
usedMap[key].add(dsName);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
// 业务模型组件数据源绑定
|
|
117
|
-
if ((
|
|
117
|
+
if ((_h = (_g = data === null || data === void 0 ? void 0 : data.bindMetadata) === null || _g === void 0 ? void 0 : _g.datasource) === null || _h === void 0 ? void 0 : _h.name) {
|
|
118
118
|
if (component.component !== 'ModelTable' || (data === null || data === void 0 ? void 0 : data.dataSourceType) !== 'custom-connector') {
|
|
119
119
|
usedMap[key].add(data.bindMetadata.datasource.name);
|
|
120
120
|
}
|
|
@@ -127,8 +127,8 @@ export function getUsedDatasource(apps, options) {
|
|
|
127
127
|
}
|
|
128
128
|
// 应当判断数据容器,compConfig 中包含 isDataContainer
|
|
129
129
|
// 此处为了方便,松散判断
|
|
130
|
-
if ((
|
|
131
|
-
usedMap[key].add((
|
|
130
|
+
if ((_j = data === null || data === void 0 ? void 0 : data.datasource) === null || _j === void 0 ? void 0 : _j.name) {
|
|
131
|
+
usedMap[key].add((_k = data === null || data === void 0 ? void 0 : data.datasource) === null || _k === void 0 ? void 0 : _k.name);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
});
|