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:
Tiago Costa 2023-01-16 16:56:36 +00:00 committed by GitHub
parent 77c3f95d33
commit ebd6a4ec8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View file

@ -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';
}