31
31
closest = fl . closest
32
32
minimist = require ( 'minimist' )
33
33
} catch ( err ) {
34
- console . log ( 'It looks like you didn\'t install the project dependencies, please run \'make setup\'' )
34
+ console . log (
35
+ "It looks like you didn't install the project dependencies, please run 'make setup'"
36
+ )
35
37
process . exit ( 1 )
36
38
}
37
39
@@ -60,7 +62,8 @@ const apis = require('../output/schema/schema.json')
60
62
async function run ( ) {
61
63
const options = minimist ( process . argv . slice ( 2 ) , {
62
64
string : [ 'api' , 'type' , 'branch' ] ,
63
- boolean : [ 'cache' ]
65
+ boolean : [ 'cache' ] ,
66
+ default : { cache : true }
64
67
} )
65
68
66
69
spinner . text = 'Checking requirements'
@@ -93,7 +96,7 @@ async function run () {
93
96
94
97
const isFlightRecorderCloned = await $ `[[ -d ${ path . join ( __dirname , '..' , '..' , 'clients-flight-recorder' ) } ]]` . exitCode === 0
95
98
if ( ! isFlightRecorderCloned ) {
96
- spinner . text = 'It looks like you didn\'t cloned the flight recorder, doing that for you'
99
+ spinner . text = 'It looks like you didn\'t clone the flight recorder, doing that for you'
97
100
await $ `git clone https://github.com/elastic/clients-flight-recorder.git ${ path . join ( __dirname , '..' , '..' , 'clients-flight-recorder' ) } `
98
101
} else if ( isStale ) {
99
102
spinner . text = 'Pulling the latest flight recorder changes'
@@ -105,7 +108,7 @@ async function run () {
105
108
const isCompilerInstalled = await $ `[[ -d ${ path . join ( compilerPath , 'node_modules' ) } ]]` . exitCode === 0
106
109
const isTsGeneratorInstalled = await $ `[[ -d ${ path . join ( tsGeneratorPath , 'node_modules' ) } ]]` . exitCode === 0
107
110
if ( noCache || ! isCompilerInstalled || ! isTsGeneratorInstalled ) {
108
- spinner . text = 'It looks like you didn\ 't installed the project dependencies, doing that for you'
111
+ spinner . text = 'It looks like you didn' t install the project dependencies , doing that for you '
109
112
await $ `npm install --prefix ${ compilerPath } `
110
113
await $ `npm install --prefix ${ tsGeneratorPath } `
111
114
}
0 commit comments