@elastic/plugin-helpers
Advanced tools
Comparing version 8.1.0 to 9.0.0
@@ -81,2 +81,8 @@ const program = require('commander'); | ||
program | ||
.command('postinstall') | ||
.action(taskRunner(function (command) { | ||
run('postinstall'); | ||
})); | ||
program | ||
.parse(process.argv); |
@@ -6,3 +6,2 @@ const resolve = require('path').resolve; | ||
const configCache = {}; | ||
const KIBANA_ROOT_OVERRIDE = process.env.KIBANA_ROOT ? resolve(process.env.KIBANA_ROOT) : null; | ||
@@ -28,11 +27,22 @@ module.exports = function (root) { | ||
const deprecationMsg = 'has been removed from `@elastic/plugin-helpers`. ' + | ||
'During development your plugin must be located in `../kibana-extra/{pluginName}` ' + | ||
'relative to the Kibana directory to work with this package.\n' | ||
if (config.kibanaRoot) { | ||
throw new Error( | ||
'The `kibanaRoot` config option ' + deprecationMsg | ||
); | ||
} | ||
if (process.env.KIBANA_ROOT) { | ||
throw new Error( | ||
'The `KIBANA_ROOT` environment variable ' + deprecationMsg | ||
); | ||
} | ||
// use resolve to ensure correct resolution of paths | ||
const { kibanaRoot, includePlugins } = config; | ||
if (kibanaRoot) config.kibanaRoot = resolve(root, kibanaRoot); | ||
const { includePlugins } = config; | ||
if (includePlugins) config.includePlugins = includePlugins.map(path => resolve(root, path)); | ||
// allow env setting to override kibana root from config | ||
if (KIBANA_ROOT_OVERRIDE) config.kibanaRoot = KIBANA_ROOT_OVERRIDE; | ||
return config; | ||
}; |
@@ -28,3 +28,3 @@ const resolve = require('path').resolve; | ||
root: root, | ||
kibanaRoot: resolve(root, '../kibana'), | ||
kibanaRoot: resolve(root, '../../kibana'), | ||
serverTestPatterns: ['server/**/__tests__/**/*.js'], | ||
@@ -31,0 +31,0 @@ buildSourcePatterns: buildSourcePatterns, |
@@ -6,2 +6,3 @@ const buildTask = require('../tasks/build'); | ||
const testServerTask = require('../tasks/test/server'); | ||
const postinstallTask = require('../tasks/postinstall'); | ||
@@ -14,2 +15,3 @@ module.exports = { | ||
testServer: testServerTask, | ||
postinstall: postinstallTask | ||
}; |
{ | ||
"name": "@elastic/plugin-helpers", | ||
"version": "8.1.0", | ||
"version": "9.0.0", | ||
"description": "Just some helpers for kibana plugin devs.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -34,2 +34,3 @@ # kibana-plugin-helpers | ||
-------------- | ------ | ||
9.x | 7.0+ (`kibanaRoot` setting removed from `plugin-helpers`) | ||
8.x | 7.0+ | ||
@@ -50,6 +51,2 @@ 7.x | 4.6.x to 6.x (node 6+ only) | ||
Setting | Description | ||
------- | ----------- | ||
`kibanaRoot` | Path to your checkout of Kibana, relative paths are ok | ||
### Settings for `start` | ||
@@ -56,0 +53,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
153241
47
685
290
65