This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added helpers, KIBANA_ROOT environment override (#41)
* run is now a named export, added helpers for interacting with the kibana repo * [config] override the kibana root config with KIBANA_ROOT envvar
- Loading branch information
Showing
4 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var run = require('./run'); | ||
var utils = require('./utils'); | ||
|
||
module.exports = function () { | ||
console.error( | ||
'running tasks with the default export of @elastic/plugin-helpers is deprecated.' + | ||
'use `require(\'@elastic/plugin-helpers\').run()` instead' | ||
); | ||
|
||
return run.apply(this, arguments); | ||
}; | ||
|
||
Object.assign(module.exports, { run: run }, utils); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var resolve = require('path').resolve; | ||
|
||
var pluginConfig = require('./config_file'); | ||
|
||
function babelRegister() { | ||
var plugin = pluginConfig(); | ||
require(resolve(plugin.kibanaRoot, 'src/optimize/babel/register')); | ||
} | ||
|
||
function resolveKibanaPath(path) { | ||
var plugin = pluginConfig(); | ||
return resolve(plugin.kibanaRoot, path); | ||
} | ||
|
||
function createToolingLog(level) { | ||
return require(resolveKibanaPath('src/utils')).createToolingLog(level); | ||
} | ||
|
||
function readFtrConfigFile(log, path, settingOverrides) { | ||
return require(resolveKibanaPath('src/functional_test_runner')).readConfigFile(log, path, settingOverrides); | ||
} | ||
|
||
module.exports = { | ||
babelRegister: babelRegister, | ||
resolveKibanaPath: resolveKibanaPath, | ||
createToolingLog: createToolingLog, | ||
readFtrConfigFile: readFtrConfigFile, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters