Skip to content

Commit

Permalink
Optimize imports/exports.
Browse files Browse the repository at this point in the history
  • Loading branch information
azasypkin committed Jul 20, 2018
1 parent 66930dd commit 10df503
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import { InstallationFeatures, XPACK_INSTALLED_PATH } from './installation_featu
import { readKeystore } from './read_keystore';

/**
* Overrides some config values with ones from argv.
* Applies overrides to the config values supplied through command line and keystore.
*
* @param config `RawConfig` instance to update config values for.
* @param argv Argv object with key/value pairs.
* @param installationFeatures Features that are supported by current installation.
*/
export function overrideConfigWithArgv(
export function applyConfigOverrides(
config: RawConfig,
argv: { [key: string]: any },
installationFeatures: InstallationFeatures
Expand Down
11 changes: 4 additions & 7 deletions src/core/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,17 @@ import { OnShutdown, Root } from '../server/root';

import { isWorker } from 'cluster';
import { DevConfig } from '../server/dev';
import { HttpConfig } from '../server/http';
import { BasePathProxyServer } from '../server/http/base_path_proxy_server';
import { BasePathProxyServer, HttpConfig } from '../server/http';
import { LegacyService } from '../server/legacy_compat/legacy_service';
import { LoggingConfig } from '../server/logging';
import { MutableLoggerFactory } from '../server/logging/logger_factory';
import { LoggingService } from '../server/logging/logging_service';
import { LoggingConfig, LoggingService, MutableLoggerFactory } from '../server/logging';
import { applyConfigOverrides } from './apply_config_overrides';
import * as args from './args';
import { createServeCommand } from './commands';
import {
CLUSTER_MANAGER_PATH,
detectInstallationFeatures,
REPL_PATH,
} from './installation_features';
import { overrideConfigWithArgv } from './override_config_with_argv';

const installationFeatures = detectInstallationFeatures();

Expand Down Expand Up @@ -90,7 +87,7 @@ export const run = (argv: string[]) => {
rawConfigService.loadConfig();

const rawConfig$ = k$(rawConfigService.getConfig$())(
map(rawConfig => overrideConfigWithArgv(rawConfig, parsedArgs, installationFeatures))
map(rawConfig => applyConfigOverrides(rawConfig, parsedArgs, installationFeatures))
);

const loggerFactory = new MutableLoggerFactory(env);
Expand Down
1 change: 1 addition & 0 deletions src/core/server/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { Router } from './router';

export { Router, KibanaRequest } from './router';
export { HttpService };
export { BasePathProxyServer } from './base_path_proxy_server';

export { HttpConfig };

Expand Down
3 changes: 2 additions & 1 deletion src/core/server/logging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
*/

export { Logger } from './logger';
export { LoggerFactory } from './logger_factory';
export { LoggerFactory, MutableLoggerFactory } from './logger_factory';
export { LoggingConfig } from './logging_config';
export { LoggingService } from './logging_service';

0 comments on commit 10df503

Please sign in to comment.