add examples/ to no-restricted-path config (#54252)

This commit is contained in:
Anton Dosov 2020-01-08 19:20:07 +03:00 committed by GitHub
parent 1ffd30eb85
commit 513428af44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -247,6 +247,7 @@ module.exports = {
'!x-pack/test/**/*',
'(src|x-pack)/plugins/**/(public|server)/**/*',
'src/core/(public|server)/**/*',
'examples/**/*',
],
from: [
'src/core/public/**/*',
@ -283,11 +284,15 @@ module.exports = {
'x-pack/legacy/plugins/**/*',
'!x-pack/legacy/plugins/*/server/**/*',
'!x-pack/legacy/plugins/*/index.{js,ts,tsx}',
'examples/**/*',
'!examples/**/server/**/*',
],
from: [
'src/core/server',
'src/core/server/**/*',
'(src|x-pack)/plugins/*/server/**/*',
'examples/**/server/**/*',
],
errorMessage:
'Server modules cannot be imported into client modules or shared modules.',

View file

@ -18,7 +18,7 @@
*/
import { Plugin, CoreSetup, PluginInitializerContext } from 'kibana/server';
import { DataPluginSetup } from 'src/plugins/data/server/plugin';
import { PluginSetup as DataPluginSetup } from 'src/plugins/data/server';
import { demoSearchStrategyProvider } from './demo_search_strategy';
import { DEMO_SEARCH_STRATEGY, IDemoRequest, IDemoResponse } from '../common';

View file

@ -18,7 +18,7 @@
*/
import { PluginInitializerContext } from '../../../core/server';
import { DataServerPlugin } from './plugin';
import { DataServerPlugin, DataPluginSetup } from './plugin';
export function plugin(initializerContext: PluginInitializerContext) {
return new DataServerPlugin(initializerContext);
@ -93,4 +93,4 @@ export {
getKbnTypeNames,
} from '../common';
export { DataServerPlugin as Plugin };
export { DataServerPlugin as Plugin, DataPluginSetup as PluginSetup };