@@ -22,29 +22,27 @@ async function generateSchemas() {
22
22
: rootCWD ;
23
23
24
24
try {
25
- await Promise . all ( [
26
- execa ( "./bin/cli.js" , [ `./examples/${ name } ${ ext } ` , "-o" , `./examples/${ name } .ts` ] , { cwd } ) ,
27
- ...( name === "github-api"
28
- ? [
29
- execa (
30
- "./bin/cli.js" ,
31
- [
32
- `./examples/${ name } ${ ext } ` ,
33
- "--immutable" ,
34
- "--export-type" ,
35
- "-o" ,
36
- `./examples/${ name } -export-type-immutable.ts` ,
37
- ] ,
38
- { cwd } ,
39
- ) ,
40
- execa (
41
- "./bin/cli.js" ,
42
- [ `./examples/${ name } ${ ext } ` , "--immutable" , "-o" , `./examples/${ name } -immutable.ts` ] ,
43
- { cwd } ,
44
- ) ,
45
- ]
46
- : [ ] ) ,
47
- ] ) ;
25
+ const args : string [ ] [ ] = [ [ `./examples/${ name } ${ ext } ` , "-o" , `./examples/${ name } .ts` ] ] ;
26
+
27
+ // addiitonal flag tests (only for GitHub API, arbitrarily-chosen so we don’t have too much noise)
28
+ if ( name === "github-api" ) {
29
+ args . push ( [ `./examples/${ name } ${ ext } ` , "--immutable" , "-o" , `./examples/${ name } -immutable.ts` ] ) ;
30
+ args . push ( [
31
+ `./examples/${ name } ${ ext } ` ,
32
+ "--immutable" ,
33
+ "--export-type" ,
34
+ "-o" ,
35
+ `./examples/${ name } -export-type-immutable.ts` ,
36
+ ] ) ;
37
+ args . push ( [
38
+ `./examples/${ name } ${ ext } ` ,
39
+ "--properties-required-by-default" ,
40
+ "o" ,
41
+ `./examples/${ name } -required.ts` ,
42
+ ] ) ;
43
+ }
44
+
45
+ await Promise . all ( args . map ( ( a ) => execa ( "./bin/cli.js" , a , { cwd } ) ) ) ;
48
46
49
47
schemasDoneCount ++ ;
50
48
const timeMs = Math . round ( performance . now ( ) - start ) ;
0 commit comments