MCPcopy
hub / github.com/tailwindlabs/tailwindcss / notifyNext

Function notifyNext

integrations/utils.ts:261–274  ·  view source on GitHub ↗
(actors: SpawnActor[], messages: string[])

Source from the content-addressed store, hash-verified

259 let stderrActors: SpawnActor[] = []
260
261 function notifyNext(actors: SpawnActor[], messages: string[]) {
262 if (actors.length <= 0) return
263 let [next] = actors
264
265 for (let [idx, message] of messages.entries()) {
266 if (next.predicate(message)) {
267 messages.splice(0, idx + 1)
268 let actorIdx = actors.indexOf(next)
269 actors.splice(actorIdx, 1)
270 next.resolve()
271 break
272 }
273 }
274 }
275
276 let combined: ['stdout' | 'stderr', string][] = []
277

Callers 3

spawnFunction · 0.85
onStdoutFunction · 0.85
onStderrFunction · 0.85

Calls 2

resolveMethod · 0.80
entriesMethod · 0.45

Tested by

no test coverage detected