mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[cli] migrate remaining cli scripts to /dist /dev style (#79409)
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
06d8040fa4
commit
3d6f150956
15 changed files with 93 additions and 13 deletions
|
@ -17,5 +17,4 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('../src/cli_keystore');
|
||||
require('../src/cli_keystore/dev');
|
||||
|
|
|
@ -17,5 +17,4 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('../src/cli_plugin/cli');
|
||||
require('../src/cli_plugin/dev');
|
||||
|
|
|
@ -18,6 +18,5 @@
|
|||
*/
|
||||
|
||||
require('../apm')();
|
||||
require('../setup_node_env/no_transpilation');
|
||||
require('core-js/stable');
|
||||
require('../setup_node_env/dist');
|
||||
require('./cli');
|
||||
|
|
21
src/cli_keystore/dist.js
Normal file
21
src/cli_keystore/dist.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
require('../setup_node_env/dist');
|
||||
require('./cli_keystore');
|
21
src/cli_plugin/dist.js
Normal file
21
src/cli_plugin/dist.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
require('../setup_node_env/dist');
|
||||
require('./cli');
|
|
@ -26,4 +26,4 @@ if [ -f "${CONFIG_DIR}/node.options" ]; then
|
|||
KBN_NODE_OPTS="$(grep -v ^# < ${CONFIG_DIR}/node.options | xargs)"
|
||||
fi
|
||||
|
||||
NODE_OPTIONS="$KBN_NODE_OPTS $NODE_OPTIONS" "${NODE}" "${DIR}/src/cli_keystore" "$@"
|
||||
NODE_OPTIONS="$KBN_NODE_OPTS $NODE_OPTIONS" "${NODE}" "${DIR}/src/cli_keystore/dist" "$@"
|
||||
|
|
|
@ -28,7 +28,7 @@ IF EXIST "%CONFIG_DIR%\node.options" (
|
|||
)
|
||||
|
||||
TITLE Kibana Keystore
|
||||
"%NODE%" "%DIR%\src\cli_keystore" %*
|
||||
"%NODE%" "%DIR%\src\cli_keystore\dist" %*
|
||||
|
||||
:finally
|
||||
|
||||
|
|
|
@ -26,4 +26,4 @@ if [ -f "${CONFIG_DIR}/node.options" ]; then
|
|||
KBN_NODE_OPTS="$(grep -v ^# < ${CONFIG_DIR}/node.options | xargs)"
|
||||
fi
|
||||
|
||||
NODE_OPTIONS="--no-warnings $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli_plugin" "$@"
|
||||
NODE_OPTIONS="--no-warnings $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli_plugin/dist" "$@"
|
||||
|
|
|
@ -32,7 +32,7 @@ IF EXIST "%CONFIG_DIR%\node.options" (
|
|||
set "NODE_OPTIONS=--no-warnings %NODE_OPTIONS%"
|
||||
|
||||
TITLE Kibana Server
|
||||
"%NODE%" "%DIR%\src\cli_plugin" %*
|
||||
"%NODE%" "%DIR%\src\cli_plugin\dist" %*
|
||||
|
||||
:finally
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ set "NODE_OPTIONS=--no-warnings --max-http-header-size=65536 %NODE_OPTIONS%"
|
|||
|
||||
:: This should run independently as the last instruction
|
||||
:: as we need NODE_OPTIONS previously set to expand
|
||||
"%NODE%" "%DIR%\src\cli" %*
|
||||
"%NODE%" "%DIR%\src\cli\dist" %*
|
||||
|
||||
:finally
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ export const CopySource: Task = {
|
|||
'!src/cli/dev.js',
|
||||
'!src/functional_test_runner/**',
|
||||
'!src/dev/**',
|
||||
'!src/setup_node_env/babel_register/index.js',
|
||||
'!src/setup_node_env/babel_register/register.js',
|
||||
// this is the dev-only entry
|
||||
'!src/setup_node_env/index.js',
|
||||
'!**/public/**/*.{js,ts,tsx,json}',
|
||||
'typings/**',
|
||||
'config/kibana.yml',
|
||||
|
|
21
src/setup_node_env/dist.js
Normal file
21
src/setup_node_env/dist.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
require('./no_transpilation');
|
||||
require('./polyfill');
|
20
src/setup_node_env/polyfill.js
Normal file
20
src/setup_node_env/polyfill.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
require('core-js/stable');
|
Loading…
Add table
Add a link
Reference in a new issue