Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/kbn-config/src/__mocks__/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function getEnvOptions(options: DeepPartial<EnvOptions> = {}): EnvOptions
configs: options.configs || [],
cliArgs: {
dev: true,
open: false,
quiet: false,
silent: false,
watch: false,
Expand Down
6 changes: 0 additions & 6 deletions packages/kbn-config/src/__snapshots__/env.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/kbn-config/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export interface CliArgs {
watch: boolean;
repl: boolean;
basePath: boolean;
open: boolean;
oss: boolean;
/** @deprecated use disableOptimizer to know if the @kbn/optimizer is disabled in development */
optimize?: boolean;
Expand Down
1 change: 0 additions & 1 deletion src/cli/cluster/cluster_manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { Worker } from './worker';

const CLI_ARGS: SomeCliArgs = {
disableOptimizer: true,
open: false,
oss: false,
quiet: false,
repl: false,
Expand Down
24 changes: 1 addition & 23 deletions src/cli/cluster/cluster_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
*/

import { resolve } from 'path';
import { format as formatUrl } from 'url';
import Fs from 'fs';

import opn from 'opn';
import { REPO_ROOT } from '@kbn/utils';
import { FSWatcher } from 'chokidar';
import * as Rx from 'rxjs';
Expand All @@ -43,7 +41,6 @@ export type SomeCliArgs = Pick<
| 'silent'
| 'repl'
| 'disableOptimizer'
| 'open'
| 'watch'
| 'oss'
| 'runExamples'
Expand All @@ -52,7 +49,7 @@ export type SomeCliArgs = Pick<
>;

const firstAllTrue = (...sources: Array<Rx.Observable<boolean>>) =>
Rx.combineLatest(...sources).pipe(
Rx.combineLatest(sources).pipe(
filter((values) => values.every((v) => v === true)),
take(1),
mapTo(undefined)
Expand Down Expand Up @@ -146,17 +143,6 @@ export class ClusterManager {
});
});

if (opts.open) {
this.setupOpen(
formatUrl({
protocol: config.get('server.ssl.enabled') ? 'https' : 'http',
hostname: config.get('server.host'),
port: config.get('server.port'),
pathname: this.basePathProxy ? this.basePathProxy.basePath : '',
})
);
}

if (opts.watch) {
const pluginPaths = config.get<string[]>('plugins.paths');
const scanDirs = [
Expand Down Expand Up @@ -208,14 +194,6 @@ export class ClusterManager {
}
}

setupOpen(openUrl: string) {
firstAllTrue(this.serverReady$, this.kbnOptimizerReady$)
.toPromise()
.then(() => {
opn(openUrl);
});
}

setupWatching(extraPaths: string[], pluginInternalDirsIgnore: string[]) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const chokidar = require('chokidar');
Expand Down
2 changes: 0 additions & 2 deletions src/cli/serve/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export default function (program) {
if (CAN_CLUSTER) {
command
.option('--dev', 'Run the server with development mode defaults')
.option('--open', 'Open a browser window to the base url after the server is started')
.option('--ssl', 'Run the dev server using HTTPS')
.option('--dist', 'Use production assets from kbn/optimizer')
.option(
Expand Down Expand Up @@ -222,7 +221,6 @@ export default function (program) {
configs: [].concat(opts.config || []),
cliArgs: {
dev: !!opts.dev,
open: !!opts.open,
envName: unknownOptions.env ? unknownOptions.env.name : undefined,
quiet: !!opts.quiet,
silent: !!opts.silent,
Expand Down
1 change: 0 additions & 1 deletion src/core/test_helpers/kbn_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export function createRootWithSettings(
configs: [],
cliArgs: {
dev: false,
open: false,
quiet: false,
silent: false,
watch: false,
Expand Down