• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IgniteUI / igniteui-cli / 8631556716

10 Apr 2024 12:52PM UTC coverage: 67.144% (+0.4%) from 66.741%
8631556716

push

github

web-flow
chore: update typescript; migrate to eslint (#1235)

997 of 1601 branches covered (62.27%)

Branch coverage included in aggregate %.

17 of 17 new or added lines in 4 files covered. (100.0%)

117 existing lines in 26 files now uncovered.

4541 of 6647 relevant lines covered (68.32%)

156.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

31.25
/packages/ng-schematics/src/utils/NgFileSystem.ts
1
import { Tree } from "@angular-devkit/schematics";
2
import { App, FS_TOKEN, FS_TYPE_TOKEN, FsTypes, IFileSystem } from "@igniteui/cli-core";
2✔
3

4
export class NgTreeFileSystem implements IFileSystem {
2✔
5
        constructor(private tree: Tree) { }
46✔
6
        public fileExists(filePath: string): boolean {
7
                return this.tree.exists(filePath);
98✔
8
        }
9

10
        public readFile(filePath: string, encoding?: string): string {
11
                return (this.tree.read(filePath) || "").toString();
104!
12
        }
13

14
        public writeFile(filePath: string, text: string): void {
15
                return this.tree.overwrite(filePath, text);
12✔
16
        }
17

18
        public directoryExists(dirPath: string): boolean {
19
                const dir = this.tree.getDir(dirPath);
×
20
                return dir.subdirs.length || dir.subfiles.length ? true : false;
×
21
        }
22

23
        /**
24
         * Returns a list of file paths under a directory based on a match pattern
25
         * @param dirPath Root dir to search in
26
         * @param pattern Supports only recursive wildcard '\*\*\/\*'
27
         */
28
        public glob(dirPath: string, pattern: string): string[] {
29
                const dir = this.tree.getDir(dirPath);
×
30
                const entries: string[] = [];
×
31
                pattern = pattern.split("**/*").pop() || pattern;
×
32

33
                dir.visit((_fullPath, entry) => {
×
UNCOV
34
                        if (entry?.path.endsWith(pattern)) {
×
35
                                entries.push(entry.path);
×
36
                        }
37
                });
38

39
                return entries;
×
40
        }
41
}
42

43
export function setVirtual(tree: Tree) {
2✔
44
        App.container.set(FS_TOKEN, new NgTreeFileSystem(tree));
46✔
45
        App.container.set(FS_TYPE_TOKEN, FsTypes.virtual);
46✔
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc