Skip to content

Commit 10e0527

Browse files
committed
print full url to generated scan
1 parent 27ab0da commit 10e0527

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

packages/flowtest-cli/bin/axiosClient.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
const axios = require('axios');
33
const axiosRetry = require('axios-retry').default;
44

5+
const baseUrl = 'http://localhost:3000';
6+
57
const axiosClient = axios.create({
6-
baseURL: 'http://localhost:3000/api',
8+
baseURL: `${baseUrl}/api`,
79
headers: {
810
'Content-Type': 'application/json',
911
},
@@ -20,4 +22,7 @@ axiosRetry(axiosClient, {
2022
},
2123
});
2224

23-
module.exports = axiosClient;
25+
module.exports = {
26+
baseUrl,
27+
axiosClient,
28+
};

packages/flowtest-cli/bin/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { Graph } = require('../graph/Graph');
99
const { cloneDeep } = require('lodash');
1010
const dotenv = require('dotenv');
1111
const { GraphLogger, LogLevel } = require('../graph/GraphLogger');
12-
const axiosClient = require('./axiosClient');
12+
const { baseUrl, axiosClient } = require('./axiosClient');
1313

1414
const getEnvVariables = (pathname) => {
1515
const content = readFile(pathname);
@@ -108,7 +108,7 @@ const argv = yargs(hideBin(process.argv))
108108
'/upload',
109109
bytesToBase64(new TextEncoder().encode(JSON.stringify(data))),
110110
);
111-
console.log(response.data.data[0].id);
111+
console.log(chalk.bold('Build Scan: ') + chalk.dim(`${baseUrl}/scan/${response.data.data[0].id}`));
112112
} catch (error) {
113113
//console.log(error);
114114
console.log(chalk.red(` ✕ `) + chalk.dim('Unable to upload build scan'));

0 commit comments

Comments
 (0)