legacy utils cleanup (#76608)
* move prompt to cli_keystore * move binder to cli * remove unused path_contains Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
c7dac8000c
commit
7955a02437
|
@ -21,7 +21,7 @@ import _ from 'lodash';
|
|||
import cluster from 'cluster';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { BinderFor } from '../../legacy/utils/binder_for';
|
||||
import { BinderFor } from './binder_for';
|
||||
import { fromRoot } from '../../core/server/utils';
|
||||
|
||||
const cliPath = fromRoot('src/cli');
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { Logger } from '../cli_plugin/lib/logger';
|
||||
import { confirm, question } from '../legacy/server/utils';
|
||||
import { confirm, question } from './utils';
|
||||
import { createPromiseFromStreams, createConcatStream } from '../core/server/utils';
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ import { PassThrough } from 'stream';
|
|||
import { Keystore } from '../legacy/server/keystore';
|
||||
import { add } from './add';
|
||||
import { Logger } from '../cli_plugin/lib/logger';
|
||||
import * as prompt from '../legacy/server/utils/prompt';
|
||||
import * as prompt from './utils/prompt';
|
||||
|
||||
describe('Kibana keystore', () => {
|
||||
describe('add', () => {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
import { Logger } from '../cli_plugin/lib/logger';
|
||||
import { confirm } from '../legacy/server/utils';
|
||||
import { confirm } from './utils';
|
||||
|
||||
export async function create(keystore, command, options) {
|
||||
const logger = new Logger(options);
|
||||
|
|
|
@ -41,7 +41,7 @@ import sinon from 'sinon';
|
|||
import { Keystore } from '../legacy/server/keystore';
|
||||
import { create } from './create';
|
||||
import { Logger } from '../cli_plugin/lib/logger';
|
||||
import * as prompt from '../legacy/server/utils/prompt';
|
||||
import * as prompt from './utils/prompt';
|
||||
|
||||
describe('Kibana keystore', () => {
|
||||
describe('create', () => {
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
export { BinderBase } from './binder';
|
||||
export { BinderFor } from './binder_for';
|
||||
export { deepCloneWithBuffers } from './deep_clone_with_buffers';
|
||||
export { unset } from './unset';
|
||||
export { IS_KIBANA_DISTRIBUTABLE } from './artifact_type';
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import { relative } from 'path';
|
||||
|
||||
export default function pathContains(root, child) {
|
||||
return relative(child, root).slice(0, 2) !== '..';
|
||||
}
|
Loading…
Reference in a new issue