Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
de6090c87b
commit
fa80376101
7 changed files with 1 additions and 35 deletions
|
@ -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,
|
||||
|
|
|
@ -10,7 +10,6 @@ Env {
|
|||
"disableOptimizer": true,
|
||||
"dist": false,
|
||||
"envName": "development",
|
||||
"open": false,
|
||||
"oss": false,
|
||||
"quiet": false,
|
||||
"repl": false,
|
||||
|
@ -56,7 +55,6 @@ Env {
|
|||
"disableOptimizer": true,
|
||||
"dist": false,
|
||||
"envName": "production",
|
||||
"open": false,
|
||||
"oss": false,
|
||||
"quiet": false,
|
||||
"repl": false,
|
||||
|
@ -101,7 +99,6 @@ Env {
|
|||
"dev": true,
|
||||
"disableOptimizer": true,
|
||||
"dist": false,
|
||||
"open": false,
|
||||
"oss": false,
|
||||
"quiet": false,
|
||||
"repl": false,
|
||||
|
@ -146,7 +143,6 @@ Env {
|
|||
"dev": false,
|
||||
"disableOptimizer": true,
|
||||
"dist": false,
|
||||
"open": false,
|
||||
"oss": false,
|
||||
"quiet": false,
|
||||
"repl": false,
|
||||
|
@ -191,7 +187,6 @@ Env {
|
|||
"dev": false,
|
||||
"disableOptimizer": true,
|
||||
"dist": false,
|
||||
"open": false,
|
||||
"oss": false,
|
||||
"quiet": false,
|
||||
"repl": false,
|
||||
|
@ -236,7 +231,6 @@ Env {
|
|||
"dev": false,
|
||||
"disableOptimizer": true,
|
||||
"dist": false,
|
||||
"open": false,
|
||||
"oss": false,
|
||||
"quiet": false,
|
||||
"repl": false,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -38,7 +38,6 @@ import { Worker } from './worker';
|
|||
|
||||
const CLI_ARGS: SomeCliArgs = {
|
||||
disableOptimizer: true,
|
||||
open: false,
|
||||
oss: false,
|
||||
quiet: false,
|
||||
repl: false,
|
||||
|
|
|
@ -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';
|
||||
|
@ -43,7 +41,6 @@ export type SomeCliArgs = Pick<
|
|||
| 'silent'
|
||||
| 'repl'
|
||||
| 'disableOptimizer'
|
||||
| 'open'
|
||||
| 'watch'
|
||||
| 'oss'
|
||||
| 'runExamples'
|
||||
|
@ -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)
|
||||
|
@ -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 = [
|
||||
|
@ -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');
|
||||
|
|
|
@ -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(
|
||||
|
@ -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,
|
||||
|
|
|
@ -70,7 +70,6 @@ export function createRootWithSettings(
|
|||
configs: [],
|
||||
cliArgs: {
|
||||
dev: false,
|
||||
open: false,
|
||||
quiet: false,
|
||||
silent: false,
|
||||
watch: false,
|
||||
|
|
Loading…
Reference in a new issue