MCPcopy Index your code
hub / github.com/angular/angular-cli / _done

Method _done

packages/angular_devkit/schematics/src/sink/dryrun.ts:75–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 override _done(): Observable<void> {
76 this._fileAlreadyExistExceptionSet.forEach((path) => {
77 this._subject.next({
78 kind: 'error',
79 description: 'alreadyExist',
80 path,
81 });
82 });
83 this._fileDoesNotExistExceptionSet.forEach((path) => {
84 this._subject.next({
85 kind: 'error',
86 description: 'doesNotExist',
87 path,
88 });
89 });
90
91 this._filesToDelete.forEach((path) => {
92 // Check if this is a renaming.
93 for (const [from] of this._filesToRename) {
94 if (from == path) {
95 // The event is sent later on.
96 return;
97 }
98 }
99
100 this._subject.next({ kind: 'delete', path });
101 });
102 this._filesToRename.forEach(([path, to]) => {
103 this._subject.next({ kind: 'rename', path, to });
104 });
105 this._filesToCreate.forEach((content, path) => {
106 // Check if this is a renaming.
107 for (const [, to] of this._filesToRename) {
108 if (to == path) {
109 // The event is sent later on.
110 return;
111 }
112 }
113 if (
114 this._fileAlreadyExistExceptionSet.has(path) ||
115 this._fileDoesNotExistExceptionSet.has(path)
116 ) {
117 return;
118 }
119
120 this._subject.next({ kind: 'create', path, content });
121 });
122 this._filesToUpdate.forEach((content, path) => {
123 this._subject.next({ kind: 'update', path, content });
124 });
125
126 this._subject.complete();
127
128 return of<void>(undefined);
129 }
130}

Callers

nothing calls this directly

Calls 4

nextMethod · 0.80
completeMethod · 0.80
hasMethod · 0.65
forEachMethod · 0.45

Tested by

no test coverage detected