|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
703 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | /** @typedef {import("../index.js").IncomingMessage} IncomingMessage */
|
|---|
| 4 |
|
|---|
| 5 | /** @typedef {import("../index.js").ServerResponse} ServerResponse */
|
|---|
| 6 |
|
|---|
| 7 | /**
|
|---|
| 8 | * @template {IncomingMessage} Request
|
|---|
| 9 | * @template {ServerResponse} Response
|
|---|
| 10 | * @param {import("../index.js").Context<Request, Response>} context
|
|---|
| 11 | * @param {(...args: any[]) => any} callback
|
|---|
| 12 | * @param {Request} [req]
|
|---|
| 13 | * @returns {void}
|
|---|
| 14 | */
|
|---|
| 15 | function ready(context, callback, req) {
|
|---|
| 16 | if (context.state) {
|
|---|
| 17 | callback(context.stats);
|
|---|
| 18 | return;
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | const name = req && req.url || callback.name;
|
|---|
| 22 | context.logger.info(`wait until bundle finished${name ? `: ${name}` : ""}`);
|
|---|
| 23 | context.callbacks.push(callback);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | module.exports = ready; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.