(request: Request)
| 4943 | // transitioning to the next request stage and this transition can happen in multiple places in this |
| 4944 | // implementation. |
| 4945 | function completeAll(request: Request) { |
| 4946 | // During a render the shell must be complete if the entire request is finished |
| 4947 | // however during a Prerender it is possible that the shell is incomplete because |
| 4948 | // it postponed. We cannot use rootPendingTasks in the prerender case because |
| 4949 | // those hit zero even when the shell postpones. Instead we look at the completedRootSegment |
| 4950 | const shellComplete = |
| 4951 | request.trackedPostpones === null |
| 4952 | ? // Render, we assume it is completed |
| 4953 | true |
| 4954 | : // Prerender Request, we use the state of the root segment |
| 4955 | request.completedRootSegment === null || |
| 4956 | request.completedRootSegment.status !== POSTPONED; |
| 4957 | safelyEmitEarlyPreloads(request, shellComplete); |
| 4958 | |
| 4959 | // When the shell is complete it will be possible to flush. We attempt to prepre |
| 4960 | // the Preamble here in case it is ready for flushing |
| 4961 | preparePreamble(request); |
| 4962 | |
| 4963 | const onAllReady = request.onAllReady; |
| 4964 | onAllReady(); |
| 4965 | } |
| 4966 | |
| 4967 | function queueCompletedSegment( |
| 4968 | boundary: SuspenseBoundary, |
no test coverage detected