messages.js 728 B

1234567891011121314151617181920
  1. /*
  2. Copyright 2018 Google LLC
  3. Use of this source code is governed by an MIT-style
  4. license that can be found in the LICENSE file or at
  5. https://opensource.org/licenses/MIT.
  6. */
  7. import { logger } from 'workbox-core/_private/logger.js';
  8. import { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';
  9. import '../_version.js';
  10. export const messages = {
  11. strategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,
  12. printFinalResponse: (response) => {
  13. if (response) {
  14. logger.groupCollapsed(`View the final response here.`);
  15. logger.log(response || '[No response returned]');
  16. logger.groupEnd();
  17. }
  18. },
  19. };