fba-cli 1.0.2 → 1.0.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/jest.config.ts +2 -1
- package/package.json +18 -4
- package/dist/adltRemoteClient.js +0 -430
- package/dist/adltRemoteClient.js.map +0 -1
- package/dist/cmdExec.js +0 -453
- package/dist/cmdExec.js.map +0 -1
- package/dist/execReport.js +0 -162
- package/dist/execReport.js.map +0 -1
- package/dist/fbaFormat.js +0 -434
- package/dist/fbaFormat.js.map +0 -1
- package/dist/index.js +0 -30
- package/dist/index.js.map +0 -1
- package/dist/remote_types.js +0 -504
- package/dist/remote_types.js.map +0 -1
- package/dist/util.js +0 -26
- package/dist/util.js.map +0 -1
package/dist/cmdExec.js
DELETED
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* todos:
|
|
3
|
-
* [] add lifecycle summary/table to report
|
|
4
|
-
* [] add glob support for files passed as arguments
|
|
5
|
-
* [] add option to include matching messages in a collapsable section
|
|
6
|
-
* [] support markdown description from fba instructions and backgroundDescription
|
|
7
|
-
* [] add support for reports (either as html embedded or as non interactive pngs)
|
|
8
|
-
* [] support junit xml output format
|
|
9
|
-
*/
|
|
10
|
-
import fs from 'fs';
|
|
11
|
-
import os from 'os';
|
|
12
|
-
import crypto from 'crypto';
|
|
13
|
-
import { default as JSON5 } from 'json5';
|
|
14
|
-
import { default as jp } from 'jsonpath';
|
|
15
|
-
import chalk from 'chalk';
|
|
16
|
-
import { MultiBar } from 'cli-progress';
|
|
17
|
-
import { AdltRemoteClient, getAdltProcessAndPort } from './adltRemoteClient.js';
|
|
18
|
-
import { getFBDataFromText, rqUriDecode } from './fbaFormat.js';
|
|
19
|
-
import { fbReportToMdast, hideBadge2Value, hideBadgeValue, } from './execReport.js';
|
|
20
|
-
import { inspect } from 'unist-util-inspect';
|
|
21
|
-
import { filter } from 'unist-util-filter';
|
|
22
|
-
import { assert as mdassert } from 'mdast-util-assert';
|
|
23
|
-
import { toMarkdown } from 'mdast-util-to-markdown';
|
|
24
|
-
import path from 'path';
|
|
25
|
-
import { sleep } from './util.js';
|
|
26
|
-
const error = chalk.bold.red;
|
|
27
|
-
const warning = chalk.bold.yellow;
|
|
28
|
-
export const cmdExec = async (files, options) => {
|
|
29
|
-
// console.log('cmdExec', files, options)
|
|
30
|
-
const fbaFiles = [];
|
|
31
|
-
const nonFbaFiles = [];
|
|
32
|
-
// load json config?
|
|
33
|
-
let pluginCfgs = JSON.stringify([]);
|
|
34
|
-
if (options.config) {
|
|
35
|
-
try {
|
|
36
|
-
const config = JSON5.parse(fs.readFileSync(options.config, 'utf-8'));
|
|
37
|
-
const plugins = config['dlt-logs.plugins'];
|
|
38
|
-
if (plugins && Array.isArray(plugins)) {
|
|
39
|
-
pluginCfgs = JSON.stringify(config['dlt-logs.plugins']);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
console.log(error(`No 'dlt-logs.plugins' config array in config file '${options.config}'!`));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
catch (e) {
|
|
47
|
-
console.log(error(`failed to load config file '${options.config}'! Got error:${e}`));
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const sortOrderByTime = 'sortOrderByTime' in options ? !!options.sortOrderByTime : true;
|
|
52
|
-
for (const file of files) {
|
|
53
|
-
// check whether file exists otherwise apply glob pattern first todo
|
|
54
|
-
if (file.endsWith('.fba')) {
|
|
55
|
-
fbaFiles.push(file);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
nonFbaFiles.push(file);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// console.log('exec: fba files:', fbaFiles)
|
|
62
|
-
// console.log('exec: non fba files:', nonFbaFiles)
|
|
63
|
-
if (fbaFiles.length === 0) {
|
|
64
|
-
console.log(warning('no fba files found!'));
|
|
65
|
-
if (nonFbaFiles.length > 0) {
|
|
66
|
-
console.log(warning(`Dont' know what to do with the other ${nonFbaFiles.length} files!`));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
//console.log('exec: processing...')
|
|
71
|
-
const multibar = new MultiBar({
|
|
72
|
-
clearOnComplete: false,
|
|
73
|
-
hideCursor: true,
|
|
74
|
-
format: ' {bar} | {percentage}% | {value}/{total} | {file}',
|
|
75
|
-
});
|
|
76
|
-
const barAdlt = multibar.create(5, 0, { file: 'starting adlt' });
|
|
77
|
-
const barMsgsLoadedOptions = {
|
|
78
|
-
format: ' {duration}s | {total} msgs read',
|
|
79
|
-
};
|
|
80
|
-
const barMsgsLoaded = multibar.create(0, 0, {}, barMsgsLoadedOptions);
|
|
81
|
-
const barFbas = multibar.create(fbaFiles.length, 0);
|
|
82
|
-
const barQueries = multibar.create(0, 0, { file: 'queries' });
|
|
83
|
-
const fileBasedMsgsHandler = (msg) => {
|
|
84
|
-
try {
|
|
85
|
-
switch (msg.tag) {
|
|
86
|
-
case 'FileInfo':
|
|
87
|
-
const fi = msg.value;
|
|
88
|
-
barMsgsLoaded.setTotal(fi.nr_msgs);
|
|
89
|
-
break;
|
|
90
|
-
case 'Lifecycles':
|
|
91
|
-
const li = msg.value;
|
|
92
|
-
//multibar.log(`Got ${li.length} lifecycles ${char4U32LeToString(li[0]?.ecu || 0)}\n`)
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
catch (e) {
|
|
97
|
-
console.warn(`fileBasedMsgsHandler got error:${e}\n`);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const adltClient = new AdltRemoteClient(fileBasedMsgsHandler);
|
|
101
|
-
// start adlt
|
|
102
|
-
multibar.log(`Starting/connecting to adlt...\n`);
|
|
103
|
-
let adltWssPort;
|
|
104
|
-
let adltProcess;
|
|
105
|
-
if (options.port) {
|
|
106
|
-
adltWssPort = options.port;
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
// try to start adlt locally and set the port variable:
|
|
110
|
-
// todo for now output to tmpdir file (for later provide better solution)
|
|
111
|
-
const adltOut = path.join(os.tmpdir(), `fba-cli.adlt-out.${crypto.randomBytes(16).toString('hex')}.txt`);
|
|
112
|
-
multibar.log(`adlt console output file:'${adltOut}'\n`);
|
|
113
|
-
//console.error(`tmpDir=${adltOut}`)
|
|
114
|
-
await getAdltProcessAndPort('adlt', fs.createWriteStream(adltOut /*os.devNull*/)).then(({ hostAndPort, process }) => {
|
|
115
|
-
adltWssPort = hostAndPort;
|
|
116
|
-
adltProcess = process;
|
|
117
|
-
}, (e) => {
|
|
118
|
-
console.log(error(`Failed to start adlt! Got error:${e}`));
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
if (!adltWssPort) {
|
|
122
|
-
multibar.stop();
|
|
123
|
-
console.log(error(`No adlt remote host:port to use! Please ensure that adlt is running and provide the port via the -p option or have adlt in path and don't provide the -p option!`));
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
let report;
|
|
127
|
-
// todo add parameter!
|
|
128
|
-
barAdlt.increment(1, { file: 'adlt connecting' });
|
|
129
|
-
adltClient
|
|
130
|
-
.connectToWebSocket(`ws://${adltWssPort}`)
|
|
131
|
-
.then(async (adltVersion) => {
|
|
132
|
-
//multibar.log(`Connected to adlt...\n`)
|
|
133
|
-
barAdlt.increment(1, { file: 'adlt connected' });
|
|
134
|
-
// open files
|
|
135
|
-
await adltClient
|
|
136
|
-
.sendAndRecvAdltMsg(`open {"sort":${sortOrderByTime},"files":${JSON.stringify(nonFbaFiles)},"plugins":${pluginCfgs}}`)
|
|
137
|
-
.then(async (response) => {
|
|
138
|
-
report = {
|
|
139
|
-
type: 'FbaExecReport',
|
|
140
|
-
data: {
|
|
141
|
-
date: new Date().toISOString(),
|
|
142
|
-
adltVersion,
|
|
143
|
-
files: nonFbaFiles,
|
|
144
|
-
pluginCfgs,
|
|
145
|
-
},
|
|
146
|
-
children: [],
|
|
147
|
-
};
|
|
148
|
-
// todo check response
|
|
149
|
-
// multibar.log(`Opened files...\n`)
|
|
150
|
-
barAdlt.increment(1, { file: 'adlt files opened' });
|
|
151
|
-
// load dlt files
|
|
152
|
-
multibar.log(`Processing DLT files...\n`);
|
|
153
|
-
// todo currently adlt doesn't indicate once it finished loading the files.
|
|
154
|
-
// so for now we do wait 2s until the msg.total don't change any more
|
|
155
|
-
let lastTotal = barAdlt.getTotal();
|
|
156
|
-
for (let i = 0; i < 1000; i++) {
|
|
157
|
-
await sleep(2000);
|
|
158
|
-
const curTotal = barAdlt.getTotal();
|
|
159
|
-
if (lastTotal === curTotal && !(lastTotal === 0 && i < 5)) {
|
|
160
|
-
// wait for initial msgs a bit longer
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
lastTotal = curTotal;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
multibar.log(`Processing fba files...\n`);
|
|
168
|
-
// exec the fba files
|
|
169
|
-
for (const fbaFile of fbaFiles) {
|
|
170
|
-
const fbaResult = {
|
|
171
|
-
type: 'FbaResult',
|
|
172
|
-
data: {
|
|
173
|
-
fbaFileName: fbaFile,
|
|
174
|
-
errors: [],
|
|
175
|
-
},
|
|
176
|
-
children: [],
|
|
177
|
-
};
|
|
178
|
-
report.children.push(fbaResult);
|
|
179
|
-
barFbas.increment(1, { file: fbaFile });
|
|
180
|
-
// console.log(`executing fba file:'${fbaFile}'`)
|
|
181
|
-
await processFbaFile(fbaFile, fbaResult, adltClient).then(async function (promises) {
|
|
182
|
-
//barFbas.increment(nrOfFbas)
|
|
183
|
-
barQueries.setTotal(barQueries.getTotal() + promises.length);
|
|
184
|
-
await Promise.allSettled(promises).then((results) => {
|
|
185
|
-
barQueries.increment(results.length);
|
|
186
|
-
});
|
|
187
|
-
}, (e) => {
|
|
188
|
-
multibar.log(error(`Failed to process fba file:'${fbaFile}'! Got error:${e}`));
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
})
|
|
192
|
-
.catch((e) => {
|
|
193
|
-
console.log(error(`Failed to open DLT files! Got error:${e}`));
|
|
194
|
-
});
|
|
195
|
-
})
|
|
196
|
-
.catch((e) => {
|
|
197
|
-
console.log(error(`Failed to connect to adlt! Got error:${e}`));
|
|
198
|
-
})
|
|
199
|
-
.finally(() => {
|
|
200
|
-
multibar.stop();
|
|
201
|
-
adltClient.close();
|
|
202
|
-
if (adltProcess) {
|
|
203
|
-
try {
|
|
204
|
-
adltProcess.kill();
|
|
205
|
-
}
|
|
206
|
-
catch (e) {
|
|
207
|
-
console.log(error(`Failed to kill adlt process! Got error:${e}`));
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
if (report) {
|
|
211
|
-
//console.log(JSON.stringify(report, null, 2)) // use unist-util-inspect
|
|
212
|
-
// console.log(`report is=${is(report, 'FbaExecReport')}`)
|
|
213
|
-
// filter all value.badge = Number(0)
|
|
214
|
-
report = filter(report, (node) => {
|
|
215
|
-
return (node.type !== 'FbRootCauseResult' ||
|
|
216
|
-
!hideBadgeValue(node.value.badge) ||
|
|
217
|
-
!hideBadge2Value(node.value.badge2));
|
|
218
|
-
});
|
|
219
|
-
if (report) {
|
|
220
|
-
// convert by default to md/markdown
|
|
221
|
-
const reportAsMd = fbReportToMdast(report);
|
|
222
|
-
try {
|
|
223
|
-
mdassert(reportAsMd);
|
|
224
|
-
console.log(toMarkdown(reportAsMd));
|
|
225
|
-
}
|
|
226
|
-
catch (e) {
|
|
227
|
-
console.log(inspect(reportAsMd));
|
|
228
|
-
console.warn(`reportAsMd got error:${e}`);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
else {
|
|
233
|
-
console.log(warning('failed to generate a report!'));
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
function objectMember(obj, key) {
|
|
239
|
-
return {
|
|
240
|
-
get value() {
|
|
241
|
-
return obj[key];
|
|
242
|
-
},
|
|
243
|
-
set value(t) {
|
|
244
|
-
obj[key] = t;
|
|
245
|
-
},
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
const processBadge = async (badge, adltClient, rcResult) => {
|
|
249
|
-
try {
|
|
250
|
-
if (badge.conv && badge.source.startsWith('ext:mbehr1.dlt-logs/')) {
|
|
251
|
-
const rq = rqUriDecode(badge.source);
|
|
252
|
-
// console.log(`rqCmd.path=${rqCmd.path}`)
|
|
253
|
-
if (rq.path.endsWith('/filters?')) {
|
|
254
|
-
//console.log(`rq.commands=${JSON.stringify(rq.commands)}`)
|
|
255
|
-
for (const cmd of rq.commands) {
|
|
256
|
-
rcResult.value = undefined;
|
|
257
|
-
if (cmd.cmd === 'query') {
|
|
258
|
-
// todo what if multiple queries?
|
|
259
|
-
const conv = badge.conv;
|
|
260
|
-
await adltClient.getMatchingMessages(JSON5.parse(cmd.param), 1000).then((msgs) => {
|
|
261
|
-
try {
|
|
262
|
-
// jsonPath expects restQuery results as:
|
|
263
|
-
// {data: [{id, type, attributes: {timeStamp, ecu, mcnt, ctid, apid, mtin, payloadString, lifecycle}}]}
|
|
264
|
-
const rqResult = {
|
|
265
|
-
data: msgs.map((msg, idx) => msg.asRestObject(idx)),
|
|
266
|
-
};
|
|
267
|
-
// console.log(`got ${msgs.length} msgs. jsonPath=${badge.jsonPath}\n`)
|
|
268
|
-
const jsonPath = badge.jsonPath;
|
|
269
|
-
let jsonPathResult;
|
|
270
|
-
if (jsonPath) {
|
|
271
|
-
jsonPathResult = jp.query(rqResult, jsonPath);
|
|
272
|
-
//console.log(`jsonPathResult.length=${jsonPathResult.length}`)
|
|
273
|
-
}
|
|
274
|
-
const result = jsonPathResult !== undefined ? jsonPathResult : rqResult;
|
|
275
|
-
const indexFirstC = conv.indexOf(':');
|
|
276
|
-
const convType = conv.slice(0, indexFirstC);
|
|
277
|
-
const convParam = conv.slice(indexFirstC + 1);
|
|
278
|
-
let convResult;
|
|
279
|
-
switch (convType) {
|
|
280
|
-
case 'length':
|
|
281
|
-
convResult = Array.isArray(result) ? result.length : Array.isArray(result.data) ? result.data.length : 0;
|
|
282
|
-
break;
|
|
283
|
-
case 'index':
|
|
284
|
-
convResult =
|
|
285
|
-
Array.isArray(result) && result.length > Number(convParam)
|
|
286
|
-
? typeof result[Number(convParam)] === 'string'
|
|
287
|
-
? result[Number(convParam)]
|
|
288
|
-
: JSON.stringify(result[Number(convParam)])
|
|
289
|
-
: 0;
|
|
290
|
-
break;
|
|
291
|
-
case 'func':
|
|
292
|
-
try {
|
|
293
|
-
if (!globalThis.JSON5) {
|
|
294
|
-
;
|
|
295
|
-
globalThis.JSON5 = JSON5;
|
|
296
|
-
}
|
|
297
|
-
const fn = Function('result', convParam);
|
|
298
|
-
const fnRes = fn(result);
|
|
299
|
-
switch (typeof fnRes) {
|
|
300
|
-
case 'string':
|
|
301
|
-
case 'number':
|
|
302
|
-
convResult = fnRes;
|
|
303
|
-
break;
|
|
304
|
-
case 'object':
|
|
305
|
-
convResult = JSON.stringify(fnRes);
|
|
306
|
-
break;
|
|
307
|
-
case 'undefined':
|
|
308
|
-
break;
|
|
309
|
-
default:
|
|
310
|
-
convResult = `unknown result type '${typeof fnRes}'. Please return string or number`;
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
catch (e) {
|
|
315
|
-
console.warn(`processBadg.msgs func got error:${e}`);
|
|
316
|
-
}
|
|
317
|
-
break;
|
|
318
|
-
default:
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
if (rcResult.value !== undefined) {
|
|
322
|
-
rcResult.value = rcResult.value.toString() + (convResult !== undefined ? convResult.toString() : '<undefined>');
|
|
323
|
-
}
|
|
324
|
-
else {
|
|
325
|
-
rcResult.value = convResult;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
catch (e) {
|
|
329
|
-
console.warn(`processBadge.msgs got error:${e}`);
|
|
330
|
-
rcResult.value += `processBadge.msgs got error:${e}`;
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
else {
|
|
335
|
-
console.log(`rq.cmd=${cmd} ignored!`);
|
|
336
|
-
rcResult.value = '<none>';
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
rcResult.value = '<no /filters>';
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
// silently skip/ignore rcResult.value = '<no ext:mbehr1.dlt-logs/>'
|
|
346
|
-
rcResult.value = undefined;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
catch (e) {
|
|
350
|
-
console.warn(`processBadge got error:${e}`);
|
|
351
|
-
rcResult.value = `processBadge got error:${e}`;
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
function iterateFbEffects(fishbone, fbaResult, adltClient) {
|
|
355
|
-
const promises = [];
|
|
356
|
-
for (const effect of fishbone) {
|
|
357
|
-
const effectResult = {
|
|
358
|
-
type: 'FbEffectResult',
|
|
359
|
-
data: { ...effect },
|
|
360
|
-
children: [],
|
|
361
|
-
};
|
|
362
|
-
delete effectResult.data.categories;
|
|
363
|
-
delete effectResult.data.fbUid;
|
|
364
|
-
if (effect?.categories?.length) {
|
|
365
|
-
for (const category of effect.categories) {
|
|
366
|
-
const categoryResult = {
|
|
367
|
-
type: 'FbCategoryResult',
|
|
368
|
-
data: { ...category },
|
|
369
|
-
children: [],
|
|
370
|
-
};
|
|
371
|
-
delete categoryResult.data.rootCauses;
|
|
372
|
-
delete categoryResult.data.fbUid;
|
|
373
|
-
if (category?.rootCauses?.length) {
|
|
374
|
-
for (const rc of category.rootCauses) {
|
|
375
|
-
//console.log(`fbType=${fbType}, fbElement.type=${fbElement.type},fbElement.element=${fbElement.element} parent=${parent.name}`)
|
|
376
|
-
if (rc.props?.badge || rc.props?.badge2) {
|
|
377
|
-
const rcResult = {
|
|
378
|
-
type: 'FbRootCauseResult',
|
|
379
|
-
data: {
|
|
380
|
-
...rc,
|
|
381
|
-
name: rc.props.label,
|
|
382
|
-
backgroundDescription: rc.props.backgroundDescription,
|
|
383
|
-
instructions: rc.props.instructions,
|
|
384
|
-
},
|
|
385
|
-
value: {
|
|
386
|
-
badge: rc.props.badge ? '<pending>' : undefined,
|
|
387
|
-
badge2: rc.props.badge2 ? '<pending>' : undefined,
|
|
388
|
-
},
|
|
389
|
-
};
|
|
390
|
-
delete rcResult.data.type;
|
|
391
|
-
delete rcResult.data.element;
|
|
392
|
-
delete rcResult.data.fbUid;
|
|
393
|
-
delete rcResult.data.data;
|
|
394
|
-
delete rcResult.data.props;
|
|
395
|
-
categoryResult.children.push(rcResult);
|
|
396
|
-
if (rc.props.badge) {
|
|
397
|
-
promises.push(processBadge(rc.props.badge, adltClient, objectMember(rcResult.value, 'badge')));
|
|
398
|
-
}
|
|
399
|
-
if (rc.props.badge2) {
|
|
400
|
-
promises.push(processBadge(rc.props.badge2, adltClient, objectMember(rcResult.value, 'badge2')));
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
if (rc.type === 'nested' && Array.isArray(rc.data)) {
|
|
404
|
-
const nestedResult = {
|
|
405
|
-
type: 'FbaResult',
|
|
406
|
-
data: {
|
|
407
|
-
fbaTitle: rc.title,
|
|
408
|
-
errors: [],
|
|
409
|
-
},
|
|
410
|
-
children: [],
|
|
411
|
-
};
|
|
412
|
-
promises.push(...iterateFbEffects(rc.data, nestedResult, adltClient));
|
|
413
|
-
if (nestedResult.children.length) {
|
|
414
|
-
categoryResult.children.push(nestedResult);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
if (categoryResult.children.length) {
|
|
420
|
-
effectResult.children.push(categoryResult);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
if (effectResult.children.length) {
|
|
425
|
-
fbaResult.children.push(effectResult);
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
return promises;
|
|
429
|
-
}
|
|
430
|
-
const processFbaFile = async (filePath, fbaResult, adltClient) => {
|
|
431
|
-
// try to open the file:
|
|
432
|
-
return new Promise((resolve, reject) => {
|
|
433
|
-
fs.readFile(filePath, 'utf-8', (err, fbaFileContent) => {
|
|
434
|
-
if (err) {
|
|
435
|
-
// console.log(error(`Failed to read fba file:'${filePath}'! Got error:${err}`))
|
|
436
|
-
fbaResult.data.errors.push(`Failed to read fba file due to: ${err}`);
|
|
437
|
-
reject(err);
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
try {
|
|
441
|
-
const fba = getFBDataFromText(fbaFileContent);
|
|
442
|
-
fbaResult.data.fbaTitle = fba.title;
|
|
443
|
-
const promises = iterateFbEffects(fba.fishbone, fbaResult, adltClient);
|
|
444
|
-
resolve(promises);
|
|
445
|
-
}
|
|
446
|
-
catch (e) {
|
|
447
|
-
fbaResult.data.errors.push(`Processing fba got error: ${e}`);
|
|
448
|
-
reject(e);
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
};
|
|
453
|
-
//# sourceMappingURL=cmdExec.js.map
|
package/dist/cmdExec.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cmdExec.js","sourceRoot":"","sources":["../src/cmdExec.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAqD,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClI,OAAO,EAA2C,iBAAiB,EAAE,WAAW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EAAE,CAAC,CAAA;gBAC5D,MAAM,CAAC,CAAC,CAAC,CAAA;aACV;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
package/dist/execReport.js
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { visit, CONTINUE, SKIP } from 'unist-util-visit';
|
|
2
|
-
import { is } from 'unist-util-is';
|
|
3
|
-
import { default as JSON5 } from 'json5';
|
|
4
|
-
import { version } from './util.js';
|
|
5
|
-
export const hideBadgeValue = (value) => value === undefined || (typeof value === 'string' && value.length === 0) || (typeof value === 'number' && value === 0);
|
|
6
|
-
export const hideBadge2Value = (value) => {
|
|
7
|
-
return value === undefined || (typeof value === 'string' && value.length === 0);
|
|
8
|
-
};
|
|
9
|
-
export function fbReportToMdast(report) {
|
|
10
|
-
const reportAsMd = {
|
|
11
|
-
type: 'root',
|
|
12
|
-
children: [],
|
|
13
|
-
};
|
|
14
|
-
// now traverse the report and add children
|
|
15
|
-
visit(report, (node) => {
|
|
16
|
-
if (is(node, 'FbRootCauseResult')) {
|
|
17
|
-
const rc = node;
|
|
18
|
-
reportAsMd.children.push({
|
|
19
|
-
type: 'heading',
|
|
20
|
-
depth: 5,
|
|
21
|
-
children: [{ type: 'text', value: `root cause: '${rc.data.name}'` }],
|
|
22
|
-
});
|
|
23
|
-
const badgeValue = rc.value.badge;
|
|
24
|
-
if (!hideBadgeValue(badgeValue)) {
|
|
25
|
-
reportAsMd.children.push({
|
|
26
|
-
type: 'paragraph',
|
|
27
|
-
children: [
|
|
28
|
-
{ type: 'text', value: '🔴: ' },
|
|
29
|
-
{ type: 'html', value: '<mark> ' },
|
|
30
|
-
{
|
|
31
|
-
type: 'emphasis',
|
|
32
|
-
children: [
|
|
33
|
-
{ type: 'text', value: "' " },
|
|
34
|
-
{ type: 'text', value: rc.value.badge?.toString() || '' },
|
|
35
|
-
{ type: 'text', value: " '" },
|
|
36
|
-
],
|
|
37
|
-
},
|
|
38
|
-
{ type: 'html', value: ' </mark>' },
|
|
39
|
-
],
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const badge2Value = rc.value.badge2;
|
|
43
|
-
if (!hideBadge2Value(badge2Value)) {
|
|
44
|
-
reportAsMd.children.push({
|
|
45
|
-
type: 'paragraph',
|
|
46
|
-
children: [
|
|
47
|
-
{ type: 'text', value: 'ℹ: ' },
|
|
48
|
-
{ type: 'text', value: rc.value.badge2?.toString() || '' },
|
|
49
|
-
],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
// add backgroundDescription
|
|
53
|
-
if (rc.data.backgroundDescription) {
|
|
54
|
-
reportAsMd.children.push({
|
|
55
|
-
type: 'paragraph',
|
|
56
|
-
children: [
|
|
57
|
-
{ type: 'html', value: `<details>` },
|
|
58
|
-
{ type: 'html', value: `<summary>` },
|
|
59
|
-
{ type: 'text', value: `background:` },
|
|
60
|
-
{ type: 'html', value: `</summary><br>` },
|
|
61
|
-
{
|
|
62
|
-
type: 'text',
|
|
63
|
-
value: typeof rc.data.backgroundDescription === 'string' ? rc.data.backgroundDescription : rc.data.backgroundDescription.textValue, // todo embed markdown, rewrite headings to higher level...
|
|
64
|
-
},
|
|
65
|
-
{ type: 'html', value: `</details>` }, // or as 2nd paragraph?
|
|
66
|
-
],
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return CONTINUE;
|
|
70
|
-
}
|
|
71
|
-
if (is(node, 'FbCategoryResult')) {
|
|
72
|
-
const rc = node;
|
|
73
|
-
reportAsMd.children.push({
|
|
74
|
-
type: 'heading',
|
|
75
|
-
depth: 4,
|
|
76
|
-
children: [{ type: 'text', value: `category: '${rc.data.name}'` }],
|
|
77
|
-
});
|
|
78
|
-
reportAsMd.children.push({
|
|
79
|
-
type: 'paragraph',
|
|
80
|
-
children: [],
|
|
81
|
-
});
|
|
82
|
-
return CONTINUE;
|
|
83
|
-
}
|
|
84
|
-
if (is(node, 'FbEffectResult')) {
|
|
85
|
-
const rc = node;
|
|
86
|
-
reportAsMd.children.push({
|
|
87
|
-
type: 'heading',
|
|
88
|
-
depth: 3,
|
|
89
|
-
children: [{ type: 'text', value: `effect: '${rc.data.name}'` }],
|
|
90
|
-
});
|
|
91
|
-
reportAsMd.children.push({
|
|
92
|
-
type: 'paragraph',
|
|
93
|
-
children: [],
|
|
94
|
-
});
|
|
95
|
-
return CONTINUE;
|
|
96
|
-
}
|
|
97
|
-
if (is(node, 'FbaResult')) {
|
|
98
|
-
const rc = node;
|
|
99
|
-
const isEmbedded = !rc.data.fbaFileName;
|
|
100
|
-
reportAsMd.children.push({
|
|
101
|
-
type: 'heading',
|
|
102
|
-
depth: isEmbedded ? 3 : 2,
|
|
103
|
-
children: [{ type: 'text', value: `${isEmbedded ? 'embedded ' : ''}fishbone: '${rc.data.fbaTitle}'` }],
|
|
104
|
-
});
|
|
105
|
-
if (rc.data.errors.length) {
|
|
106
|
-
reportAsMd.children.push({
|
|
107
|
-
type: 'paragraph',
|
|
108
|
-
children: [
|
|
109
|
-
{ type: 'text', value: `❌ ` },
|
|
110
|
-
{
|
|
111
|
-
type: 'emphasis',
|
|
112
|
-
children: rc.data.errors.map((e) => {
|
|
113
|
-
return { type: 'text', value: e };
|
|
114
|
-
}),
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
if (rc.data.fbaFileName) {
|
|
120
|
-
reportAsMd.children.push({
|
|
121
|
-
type: 'paragraph',
|
|
122
|
-
children: [{ type: 'text', value: `file: ${rc.data.fbaFileName}` }],
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
return CONTINUE;
|
|
126
|
-
}
|
|
127
|
-
if (is(node, 'FbaExecReport')) {
|
|
128
|
-
const rc = node;
|
|
129
|
-
reportAsMd.children.push({
|
|
130
|
-
type: 'heading',
|
|
131
|
-
depth: 1,
|
|
132
|
-
children: [{ type: 'text', value: `fba-cli execution report` }], // rc.children,
|
|
133
|
-
});
|
|
134
|
-
// output some data:
|
|
135
|
-
reportAsMd.children.push({
|
|
136
|
-
type: 'paragraph',
|
|
137
|
-
children: [
|
|
138
|
-
{ type: 'text', value: `date: ${rc.data.date}, ` },
|
|
139
|
-
{ type: 'text', value: `adlt v${rc.data.adltVersion}, fba-cli v${version()} ` },
|
|
140
|
-
{ type: 'break' },
|
|
141
|
-
{ type: 'text', value: `files: ${rc.data.files.join(', ')}` },
|
|
142
|
-
{ type: 'break' },
|
|
143
|
-
{ type: 'html', value: `<details>` },
|
|
144
|
-
{ type: 'html', value: `<summary>` },
|
|
145
|
-
{ type: 'text', value: `pluginCfgs:` },
|
|
146
|
-
{ type: 'html', value: `</summary><br>` },
|
|
147
|
-
],
|
|
148
|
-
});
|
|
149
|
-
reportAsMd.children.push({
|
|
150
|
-
type: 'code',
|
|
151
|
-
lang: 'json',
|
|
152
|
-
value: JSON.stringify(JSON5.parse(rc.data.pluginCfgs), undefined, 2),
|
|
153
|
-
});
|
|
154
|
-
reportAsMd.children.push({ type: 'html', value: `</details>` });
|
|
155
|
-
return CONTINUE; // traverse children as well SKIP // dont traverse children
|
|
156
|
-
}
|
|
157
|
-
console.log(`skipping children of node.type=${node.type}`);
|
|
158
|
-
return SKIP; // if we reach here we dont know the node!
|
|
159
|
-
});
|
|
160
|
-
return reportAsMd;
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=execReport.js.map
|
package/dist/execReport.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execReport.js","sourceRoot":"","sources":["../src/execReport.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAQ,MAAM,kBAAkB,CAAA;AAE9D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA4DnC,MAAM,CAAC,MAAM,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