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

Function modifyFileAndWaitUntilUpdated

tests/e2e/tests/vite/ssr-entry-h3.ts:102–114  ·  view source on GitHub ↗
(
  filePath: string,
  searchValue: string,
  replaceValue: string,
  hmr = false,
)

Source from the content-addressed store, hash-verified

100}
101
102async function modifyFileAndWaitUntilUpdated(
103 filePath: string,
104 searchValue: string,
105 replaceValue: string,
106 hmr = false,
107): Promise<void> {
108 await Promise.all([
109 waitForAnyProcessOutputToMatch(
110 hmr ? /Component update sent to client/ : /Page reload sent to client/,
111 ),
112 setTimeout(100).then(() => replaceInFile(filePath, searchValue, replaceValue)),
113 ]);
114}

Callers 1

ssr-entry-h3.tsFile · 0.70

Calls 2

replaceInFileFunction · 0.90

Tested by

no test coverage detected