mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
This reverts commit 33376fc368
.
This commit is contained in:
parent
ba965fb7f7
commit
2b515b1390
7 changed files with 2 additions and 75 deletions
|
@ -293,7 +293,6 @@
|
|||
"@elastic/eslint-plugin-eui": "0.0.2",
|
||||
"@elastic/github-checks-reporter": "0.0.20b3",
|
||||
"@elastic/makelogs": "^5.0.1",
|
||||
"@elastic/static-fs": "1.0.2",
|
||||
"@kbn/dev-utils": "1.0.0",
|
||||
"@kbn/es": "1.0.0",
|
||||
"@kbn/eslint-import-resolver-kibana": "2.0.0",
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
require('../src/setup_node_env');
|
||||
require('../src/apm')(process.env.ELASTIC_APM_PROXY_SERVICE_NAME || 'kibana-proxy');
|
||||
require('../src/setup_node_env');
|
||||
require('../src/cli/cli');
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
|
||||
require('../setup_node_env');
|
||||
require('../apm')();
|
||||
require('../setup_node_env');
|
||||
require('./cli');
|
||||
|
|
|
@ -40,7 +40,6 @@ import {
|
|||
CreatePackageJsonTask,
|
||||
CreateReadmeTask,
|
||||
CreateRpmPackageTask,
|
||||
CreateStaticFsWithNodeModulesTask,
|
||||
DownloadNodeBuildsTask,
|
||||
ExtractNodeBuildsTask,
|
||||
InstallDependenciesTask,
|
||||
|
@ -127,7 +126,6 @@ export async function buildDistributables(options) {
|
|||
await run(CleanTypescriptTask);
|
||||
await run(CleanExtraFilesFromModulesTask);
|
||||
await run(CleanEmptyFoldersTask);
|
||||
await run(CreateStaticFsWithNodeModulesTask);
|
||||
|
||||
/**
|
||||
* copy generic build outputs into platform-specific build
|
||||
|
|
|
@ -1,64 +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 del from 'del';
|
||||
import globby from 'globby';
|
||||
import { resolve } from 'path';
|
||||
import { generateStaticFsVolume } from '@elastic/static-fs';
|
||||
|
||||
async function deletePathsList(list) {
|
||||
for (const path of list) {
|
||||
await del(path);
|
||||
}
|
||||
}
|
||||
|
||||
async function getTopLevelNodeModulesFolders(rootDir) {
|
||||
const nodeModulesFoldersForCwd = await globby(['**/node_modules', '!**/node_modules/**/*'], {
|
||||
cwd: rootDir,
|
||||
onlyDirectories: true,
|
||||
});
|
||||
|
||||
return nodeModulesFoldersForCwd.map(folder => resolve(rootDir, folder));
|
||||
}
|
||||
|
||||
export const CreateStaticFsWithNodeModulesTask = {
|
||||
description:
|
||||
'Creating static filesystem with node_modules, patching entryPoints and deleting node_modules folder',
|
||||
|
||||
async run(config, log, build) {
|
||||
const rootDir = build.resolvePath('.');
|
||||
|
||||
// Get all the top node_modules folders
|
||||
const nodeModulesFolders = await getTopLevelNodeModulesFolders(rootDir);
|
||||
|
||||
// Define root entry points
|
||||
const rootEntryPoints = [build.resolvePath('src/setup_node_env/index.js')];
|
||||
|
||||
// Creates the static filesystem with
|
||||
// every node_module we have
|
||||
const staticFsAddedPaths = await generateStaticFsVolume(
|
||||
rootDir,
|
||||
nodeModulesFolders,
|
||||
rootEntryPoints
|
||||
);
|
||||
|
||||
// Delete node_modules folder
|
||||
await deletePathsList(staticFsAddedPaths);
|
||||
},
|
||||
};
|
|
@ -25,7 +25,6 @@ export * from './create_archives_task';
|
|||
export * from './create_empty_dirs_and_files_task';
|
||||
export * from './create_package_json_task';
|
||||
export * from './create_readme_task';
|
||||
export * from './create_static_fs_with_node_modules_task';
|
||||
export * from './install_dependencies_task';
|
||||
export * from './license_file_task';
|
||||
export * from './nodejs';
|
||||
|
|
|
@ -1393,11 +1393,6 @@
|
|||
"@types/node-jose" "1.1.0"
|
||||
node-jose "1.1.0"
|
||||
|
||||
"@elastic/static-fs@1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/static-fs/-/static-fs-1.0.2.tgz#c1e5fea6a1b35abcd005cecf7880156ed0f273ae"
|
||||
integrity sha512-0cZc5D9Wg6pJsc8Sa2ns1eOuxtXEidE7GBb2B0KZdJq9nZzUCxMyplURqT0Nr3i5XpoHb6ZEmxWsji86j1KjDw==
|
||||
|
||||
"@elastic/ui-ace@0.2.3":
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/ui-ace/-/ui-ace-0.2.3.tgz#5281aed47a79b7216c55542b0675e435692f20cd"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue