Skip to content

Commit 5ff28ac

Browse files
committed
clean up cli
1 parent 62f7fa9 commit 5ff28ac

3 files changed

Lines changed: 2 additions & 38 deletions

File tree

packages/flowtest-cli/bin/index.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,6 @@ const { Graph } = require('../graph/Graph');
99
const { cloneDeep } = require('lodash');
1010
const dotenv = require('dotenv');
1111

12-
const omelette = require('omelette');
13-
14-
// Initialize tab completion
15-
const completion = omelette('flow');
16-
17-
completion.on('complete', (fragment, data) => {
18-
if (data.line.endsWith('--file ') || data.line.endsWith('--env ')) {
19-
completion.reply([]);
20-
} else {
21-
// Dynamically list directories and files as suggestions
22-
const fs = require('fs');
23-
const path = require('path');
24-
25-
const lineParts = data.line.split(' ');
26-
const basePath = lineParts[lineParts.length - 1];
27-
28-
try {
29-
const items = fs.readdirSync(basePath, { withFileTypes: true });
30-
// console.log(`Base path: ${basePath}`);
31-
// console.log(`Items: ${JSON.stringify(items)}`);
32-
const results = items.map((item) => path.join(basePath, item.name) + (item.isDirectory() ? '/' : ''));
33-
completion.reply(results);
34-
} catch (error) {
35-
completion.reply([]);
36-
}
37-
}
38-
});
39-
40-
completion.init();
41-
42-
if (~process.argv.indexOf('--completion')) {
43-
completion.setupShellInitFile();
44-
console.log('Run `source ~/.bashrc` or restart your terminal to activate completion.');
45-
process.exit();
46-
}
47-
4812
const getEnvVariables = (pathname) => {
4913
const content = readFile(pathname);
5014
const buf = Buffer.from(content);

packages/flowtest-cli/graph/Graph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Graph {
189189
throw `Timeout of ${this.timeout} ms exceeded, stopping graph run`;
190190
}
191191
} catch (err) {
192-
console.log(chalk.red(`Flow failed at: ${JSON.stringify(node)} due to ${err}`));
192+
console.log(chalk.red(`Flow failed at: ${JSON.stringify(node.data)} due to ${err}`));
193193
return {
194194
status: 'Failed',
195195
};

src/components/molecules/headers/TabPanelHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const TabPanelHeader = () => {
5252

5353
if (type === 'assertNode') {
5454
const data = log.node.data;
55-
message = `Assert : ${data.var1} ${data.operator} ${data.var2} = ${data.result}`;
55+
message = `Assert : ${data.var1} of type ${typeof data.var1} ${data.operator} ${data.var2} of type ${typeof data.var2} = ${data.result}`;
5656
}
5757

5858
if (type === 'delayNode') {

0 commit comments

Comments
 (0)