@@ -8,8 +8,6 @@ import globals from 'rollup-plugin-node-globals';
8
8
import { terser } from 'rollup-plugin-terser' ;
9
9
import ts from 'rollup-plugin-typescript2' ;
10
10
11
- import generatorConfig from '../../openapitools.json' ;
12
-
13
11
// Retrieve package to build
14
12
const client = process . env . CLIENT ?. replace (
15
13
'@experimental-api-clients-automation/' ,
@@ -47,18 +45,16 @@ function createBundlers({ output, clientPath }) {
47
45
}
48
46
49
47
function getAvailableClients ( ) {
50
- // We default `algoliasearch` as it's not a generated client, but an aggregation of
51
- // multiple clients.
52
- const availableClients = [ 'algoliasearch' ] ;
53
- const generators = Object . entries (
54
- generatorConfig [ 'generator-cli' ] . generators
55
- ) ;
48
+ const exception = new Set ( [
49
+ 'client-common' ,
50
+ 'requester-browser-xhr' ,
51
+ 'requester-node-http' ,
52
+ ] ) ;
56
53
57
- for ( const [ name , options ] of generators ) {
58
- if ( name . startsWith ( 'javascript' ) ) {
59
- availableClients . push ( options . additionalProperties . buildFile ) ;
60
- }
61
- }
54
+ // ['algoliasearch', 'client-abtesting', ... ]
55
+ const availableClients = fs
56
+ . readdirSync ( 'packages/' )
57
+ . filter ( ( _client ) => ! exception . has ( _client ) ) ;
62
58
63
59
return client === 'all'
64
60
? availableClients
0 commit comments