mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
fix(NA): @kbn/cli-dev-mode nonPackageMatcher patterns (#148971)
This PR fixes the pattern matchers for `nonPackageMatcher` into our new watcher logic as well as correctly classifies all the files found inside the `screenshotting plugin`
This commit is contained in:
parent
77c3f95d33
commit
ebd6a4ec8e
2 changed files with 20 additions and 2 deletions
|
@ -24,8 +24,8 @@ const nonPackageMatcher = makeMatcher([
|
|||
'src/**',
|
||||
'!src/{dev,fixtures}/**',
|
||||
'x-pack/plugins/**',
|
||||
'!x-pack/plugins/screenshotting/chromium',
|
||||
'!x-pack/plugins/canvas/canvas_plugin_src',
|
||||
'!x-pack/plugins/screenshotting/chromium/**',
|
||||
'!x-pack/plugins/canvas/shareable_runtime/**',
|
||||
]);
|
||||
|
||||
export interface Options {
|
||||
|
|
|
@ -124,6 +124,17 @@ export class RepoSourceClassifier {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply screenshotting specific rules
|
||||
* @param root the root dir within the screenshotting plugin
|
||||
* @returns a type, or undefined if the file should be classified as a standard file
|
||||
*/
|
||||
private classifyScreenshotting(root: string): ModuleType | undefined {
|
||||
if (root === 'chromium') {
|
||||
return 'non-package';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the "type" of a file
|
||||
*/
|
||||
|
@ -195,6 +206,13 @@ export class RepoSourceClassifier {
|
|||
}
|
||||
}
|
||||
|
||||
if (pkgId === '@kbn/screenshotting-plugin') {
|
||||
const type = this.classifyScreenshotting(root);
|
||||
if (type) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
if (root === 'public' || root === 'static') {
|
||||
return 'browser package';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue