File tree Expand file tree Collapse file tree
packages/flowtest-cli/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22const axios = require ( 'axios' ) ;
33const axiosRetry = require ( 'axios-retry' ) . default ;
44
5+ const baseUrl = 'http://localhost:3000' ;
6+
57const 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+ } ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const { Graph } = require('../graph/Graph');
99const { cloneDeep } = require ( 'lodash' ) ;
1010const dotenv = require ( 'dotenv' ) ;
1111const { GraphLogger, LogLevel } = require ( '../graph/GraphLogger' ) ;
12- const axiosClient = require ( './axiosClient' ) ;
12+ const { baseUrl , axiosClient } = require ( './axiosClient' ) ;
1313
1414const 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' ) ) ;
You can’t perform that action at this time.
0 commit comments