Skip to content

Commit

Permalink
feat: added --federation-config option
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-pribilinskiy committed Aug 28, 2022
1 parent 4f2f3fb commit 17a91e1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/make-federated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ import { assertRunningFromRoot, getFederationConfig } from './helpers/cli';

assertRunningFromRoot();

const argv = parseArgs(process.argv.slice(2), {
type Argv = {
'global-types': string,
'federation-config': string,
'output-types-folder': string,
}

const argv = parseArgs<Argv>(process.argv.slice(2), {
alias: {
'global-types': 'g',
'output-types-folder': 'o',
},
'federation-config': 'c',
} as Partial<Argv>,
});

const federationConfig = getFederationConfig();
const federationConfig = getFederationConfig(argv['federation-config']);
const compileFiles = Object.values(federationConfig.exposes);

const outDir = argv['output-types-folder'] || path.join(DEFAULT_DIR_DIST, DEFAULT_DIR_EMITTED_TYPES);
Expand Down

0 comments on commit 17a91e1

Please sign in to comment.