@ejfdelgado/ejflab-common 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -273,13 +273,23 @@ class FlowChartExec {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
loadFlowChart(paths) {
|
|
276
|
-
this.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
276
|
+
return this.loadFlowChartInternal(paths, true);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
complementFlowChart(paths) {
|
|
280
|
+
return this.loadFlowChartInternal(paths, false);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
loadFlowChartInternal(paths, initialize) {
|
|
284
|
+
if (initialize) {
|
|
285
|
+
this.flowchart = {
|
|
286
|
+
shapes: [],
|
|
287
|
+
arrows: [],
|
|
288
|
+
prefixes: [],
|
|
289
|
+
flux: {},
|
|
290
|
+
};
|
|
291
|
+
this.nodesById = {};
|
|
292
|
+
}
|
|
283
293
|
const options = {
|
|
284
294
|
ignoreAttributes: false,
|
|
285
295
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { StepBasic } = require("./StepBasic");
|
|
2
|
+
const { SimpleObj } = require("../../SimpleObj");
|
|
2
3
|
|
|
3
4
|
class StepMultiple extends StepBasic {
|
|
4
5
|
list = [];
|
|
@@ -6,9 +7,31 @@ class StepMultiple extends StepBasic {
|
|
|
6
7
|
super(context, id, commandName, argsTxt);
|
|
7
8
|
super.alwaysEvaluateCanContinue = true;
|
|
8
9
|
}
|
|
10
|
+
completePaths(objeto, WORKSPACE) {
|
|
11
|
+
if (!objeto) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
for (let llave in objeto) {
|
|
15
|
+
let valor = objeto[llave];
|
|
16
|
+
if (typeof valor == "string") {
|
|
17
|
+
valor = valor.replaceAll("${WORKSPACE}", WORKSPACE);
|
|
18
|
+
objeto[llave] = valor;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
9
22
|
async execFirst() {
|
|
23
|
+
// Reads the list to iterate
|
|
24
|
+
this.list = SimpleObj.getValue(this.context.data, this.args[1], []);
|
|
25
|
+
const WORKSPACE = SimpleObj.getValue(this.context.data, "env.WORKSPACE", "./");
|
|
26
|
+
//console.log(`WORKSPACE=${WORKSPACE}`);
|
|
27
|
+
//console.log(`My list ${JSON.stringify(this.list)}`);
|
|
28
|
+
// Loads the draw.io file
|
|
10
29
|
const flowChartTemplateName = this.args[0];
|
|
11
|
-
|
|
30
|
+
const extraConfiguration = {
|
|
31
|
+
Print: '${WORKSPACE}/flowcharts/multiple/flow01N.drawio',
|
|
32
|
+
};
|
|
33
|
+
this.completePaths(extraConfiguration, WORKSPACE);
|
|
34
|
+
this.context.complementFlowChart(extraConfiguration);
|
|
12
35
|
}
|
|
13
36
|
|
|
14
37
|
async canContinue() {
|