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

IgniteUI / igniteui-cli / 9320901636

31 May 2024 03:54PM UTC coverage: 67.062% (-0.08%) from 67.144%
9320901636

push

github

web-flow
Merge pull request #1252 from IgniteUI/update-18

chore(ng): update to ng 18

997 of 1609 branches covered (61.96%)

Branch coverage included in aggregate %.

1 of 3 new or added lines in 2 files covered. (33.33%)

4541 of 6649 relevant lines covered (68.3%)

156.56 hits per line

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

23.81
/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
         * @param ignorePattern Optional pattern to ignore
28
         */
29
        public glob(dirPath: string, pattern: string, ignorePattern?: string): string[] {
30
                const dir = this.tree.getDir(dirPath);
×
31
                const entries: string[] = [];
×
32
                pattern = pattern.split("**/*").pop() || pattern;
×
33

34
                dir.visit((_fullPath, entry) => {
×
NEW
35
                        if (ignorePattern && entry?.path.includes(ignorePattern)) {
×
NEW
36
                                return;
×
37
                        }
38

39
                        if (entry?.path.endsWith(pattern)) {
×
40
                                entries.push(entry.path);
×
41
                        }
42
                });
43

44
                return entries;
×
45
        }
46
}
47

48
export function setVirtual(tree: Tree) {
2✔
49
        App.container.set(FS_TOKEN, new NgTreeFileSystem(tree));
46✔
50
        App.container.set(FS_TYPE_TOKEN, FsTypes.virtual);
46✔
51
}
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

© 2026 Coveralls, Inc