[cli/dev] automatically strip xpack config when running --oss (#36403)

* [cli/dev] automatically strip xpack config when running --oss

* apply review feedback

* remove unrelated change

* lodash 3 doesn't have an unset method
This commit is contained in:
Spencer 2019-05-10 13:22:17 -07:00 committed by GitHub
parent a102ca1f97
commit 51ec324a19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View file

@ -70,6 +70,10 @@ function applyConfigOverrides(rawConfig, opts, extraCliOptions) {
const has = _.partial(_.has, rawConfig);
const merge = _.partial(_.merge, rawConfig);
if (opts.oss) {
delete rawConfig.xpack;
}
if (opts.dev) {
set('env', 'development');
set('optimize.watch', true);
@ -212,8 +216,6 @@ export default function (program) {
},
features: {
isClusterModeSupported: CAN_CLUSTER,
isOssModeSupported: !IS_KIBANA_DISTRIBUTABLE,
isXPackInstalled: XPACK_INSTALLED,
isReplModeSupported: CAN_REPL,
},
applyConfigOverrides: rawConfig => applyConfigOverrides(rawConfig, opts, unknownOptions),

View file

@ -29,15 +29,8 @@ interface KibanaFeatures {
// that are orchestrated by the "master" process (dev mode only feature).
isClusterModeSupported: boolean;
// Indicates whether we can run Kibana without X-Pack plugin pack even if it's
// installed (dev mode only feature).
isOssModeSupported: boolean;
// Indicates whether we can run Kibana in REPL mode (dev mode only feature).
isReplModeSupported: boolean;
// Indicates whether X-Pack plugin pack is installed and available.
isXPackInstalled: boolean;
}
interface BootstrapArgs {