v1.0 with SW PWA enabled

This commit is contained in:
Blomios
2026-01-01 17:40:53 +01:00
parent 1c0e22aac1
commit 3c8bebb2ad
29775 changed files with 2197201 additions and 119080 deletions

42
frontend/node_modules/workbox-core/src/_private.ts generated vendored Normal file
View File

@ -0,0 +1,42 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
// We either expose defaults or we expose every named export.
import {assert} from './_private/assert.js';
import {cacheNames} from './_private/cacheNames.js';
import {cacheMatchIgnoreParams} from './_private/cacheMatchIgnoreParams.js';
import {canConstructReadableStream} from './_private/canConstructReadableStream.js';
import {canConstructResponseFromBodyStream} from './_private/canConstructResponseFromBodyStream.js';
import {dontWaitFor} from './_private/dontWaitFor.js';
import {Deferred} from './_private/Deferred.js';
import {executeQuotaErrorCallbacks} from './_private/executeQuotaErrorCallbacks.js';
import {getFriendlyURL} from './_private/getFriendlyURL.js';
import {logger} from './_private/logger.js';
import {resultingClientExists} from './_private/resultingClientExists.js';
import {timeout} from './_private/timeout.js';
import {waitUntil} from './_private/waitUntil.js';
import {WorkboxError} from './_private/WorkboxError.js';
import './_version.js';
export {
assert,
cacheMatchIgnoreParams,
cacheNames,
canConstructReadableStream,
canConstructResponseFromBodyStream,
dontWaitFor,
Deferred,
executeQuotaErrorCallbacks,
getFriendlyURL,
logger,
resultingClientExists,
timeout,
waitUntil,
WorkboxError,
};

View File

@ -0,0 +1,35 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
/**
* The Deferred class composes Promises in a way that allows for them to be
* resolved or rejected from outside the constructor. In most cases promises
* should be used directly, but Deferreds can be necessary when the logic to
* resolve a promise must be separate.
*
* @private
*/
class Deferred<T> {
promise: Promise<T>;
resolve!: (value: T) => void;
reject!: (reason?: any) => void;
/**
* Creates a promise and exposes its resolve and reject functions as methods.
*/
constructor() {
this.promise = new Promise((resolve, reject) => {
this.resolve = resolve;
this.reject = reject;
});
}
}
export {Deferred};

View File

@ -0,0 +1,43 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {messageGenerator} from '../models/messages/messageGenerator.js';
import {MapLikeObject} from '../types.js';
import '../_version.js';
/**
* Workbox errors should be thrown with this class.
* This allows use to ensure the type easily in tests,
* helps developers identify errors from workbox
* easily and allows use to optimise error
* messages correctly.
*
* @private
*/
class WorkboxError extends Error {
details?: MapLikeObject;
/**
*
* @param {string} errorCode The error code that
* identifies this particular error.
* @param {Object=} details Any relevant arguments
* that will help developers identify issues should
* be added as a key on the context object.
*/
constructor(errorCode: string, details?: MapLikeObject) {
const message = messageGenerator(errorCode, details);
super(message);
this.name = errorCode;
this.details = details;
}
}
export {WorkboxError};

View File

@ -0,0 +1,100 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {WorkboxError} from '../_private/WorkboxError.js';
import {MapLikeObject} from '../types.js';
import '../_version.js';
/*
* This method throws if the supplied value is not an array.
* The destructed values are required to produce a meaningful error for users.
* The destructed and restructured object is so it's clear what is
* needed.
*/
const isArray = (value: any[], details: MapLikeObject) => {
if (!Array.isArray(value)) {
throw new WorkboxError('not-an-array', details);
}
};
const hasMethod = (
object: MapLikeObject,
expectedMethod: string,
details: MapLikeObject,
) => {
const type = typeof object[expectedMethod];
if (type !== 'function') {
details['expectedMethod'] = expectedMethod;
throw new WorkboxError('missing-a-method', details);
}
};
const isType = (
object: unknown,
expectedType: string,
details: MapLikeObject,
) => {
if (typeof object !== expectedType) {
details['expectedType'] = expectedType;
throw new WorkboxError('incorrect-type', details);
}
};
const isInstance = (
object: unknown,
// Need the general type to do the check later.
// eslint-disable-next-line @typescript-eslint/ban-types
expectedClass: Function,
details: MapLikeObject,
) => {
if (!(object instanceof expectedClass)) {
details['expectedClassName'] = expectedClass.name;
throw new WorkboxError('incorrect-class', details);
}
};
const isOneOf = (value: any, validValues: any[], details: MapLikeObject) => {
if (!validValues.includes(value)) {
details['validValueDescription'] = `Valid values are ${JSON.stringify(
validValues,
)}.`;
throw new WorkboxError('invalid-value', details);
}
};
const isArrayOfClass = (
value: any,
// Need general type to do check later.
expectedClass: Function, // eslint-disable-line
details: MapLikeObject,
) => {
const error = new WorkboxError('not-array-of-class', details);
if (!Array.isArray(value)) {
throw error;
}
for (const item of value) {
if (!(item instanceof expectedClass)) {
throw error;
}
}
};
const finalAssertExports =
process.env.NODE_ENV === 'production'
? null
: {
hasMethod,
isArray,
isInstance,
isOneOf,
isType,
isArrayOfClass,
};
export {finalAssertExports as assert};

View File

@ -0,0 +1,56 @@
/*
Copyright 2020 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
function stripParams(fullURL: string, ignoreParams: string[]) {
const strippedURL = new URL(fullURL);
for (const param of ignoreParams) {
strippedURL.searchParams.delete(param);
}
return strippedURL.href;
}
/**
* Matches an item in the cache, ignoring specific URL params. This is similar
* to the `ignoreSearch` option, but it allows you to ignore just specific
* params (while continuing to match on the others).
*
* @private
* @param {Cache} cache
* @param {Request} request
* @param {Object} matchOptions
* @param {Array<string>} ignoreParams
* @return {Promise<Response|undefined>}
*/
async function cacheMatchIgnoreParams(
cache: Cache,
request: Request,
ignoreParams: string[],
matchOptions?: CacheQueryOptions,
): Promise<Response | undefined> {
const strippedRequestURL = stripParams(request.url, ignoreParams);
// If the request doesn't include any ignored params, match as normal.
if (request.url === strippedRequestURL) {
return cache.match(request, matchOptions);
}
// Otherwise, match by comparing keys
const keysOptions = {...matchOptions, ignoreSearch: true};
const cacheKeys = await cache.keys(request, keysOptions);
for (const cacheKey of cacheKeys) {
const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);
if (strippedRequestURL === strippedCacheKeyURL) {
return cache.match(cacheKey, matchOptions);
}
}
return;
}
export {cacheMatchIgnoreParams};

View File

@ -0,0 +1,75 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
declare let registration: ServiceWorkerRegistration | undefined;
export interface CacheNameDetails {
googleAnalytics: string;
precache: string;
prefix: string;
runtime: string;
suffix: string;
}
export interface PartialCacheNameDetails {
[propName: string]: string;
}
export type CacheNameDetailsProp =
| 'googleAnalytics'
| 'precache'
| 'prefix'
| 'runtime'
| 'suffix';
const _cacheNameDetails: CacheNameDetails = {
googleAnalytics: 'googleAnalytics',
precache: 'precache-v2',
prefix: 'workbox',
runtime: 'runtime',
suffix: typeof registration !== 'undefined' ? registration.scope : '',
};
const _createCacheName = (cacheName: string): string => {
return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]
.filter((value) => value && value.length > 0)
.join('-');
};
const eachCacheNameDetail = (fn: (key: CacheNameDetailsProp) => void): void => {
for (const key of Object.keys(_cacheNameDetails)) {
fn(key as CacheNameDetailsProp);
}
};
export const cacheNames = {
updateDetails: (details: PartialCacheNameDetails): void => {
eachCacheNameDetail((key: CacheNameDetailsProp): void => {
if (typeof details[key] === 'string') {
_cacheNameDetails[key] = details[key];
}
});
},
getGoogleAnalyticsName: (userCacheName?: string): string => {
return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);
},
getPrecacheName: (userCacheName?: string): string => {
return userCacheName || _createCacheName(_cacheNameDetails.precache);
},
getPrefix: (): string => {
return _cacheNameDetails.prefix;
},
getRuntimeName: (userCacheName?: string): string => {
return userCacheName || _createCacheName(_cacheNameDetails.runtime);
},
getSuffix: (): string => {
return _cacheNameDetails.suffix;
},
};

View File

@ -0,0 +1,37 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
let supportStatus: boolean | undefined;
/**
* A utility function that determines whether the current browser supports
* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)
* object.
*
* @return {boolean} `true`, if the current browser can successfully
* construct a `ReadableStream`, `false` otherwise.
*
* @private
*/
function canConstructReadableStream(): boolean {
if (supportStatus === undefined) {
// See https://github.com/GoogleChrome/workbox/issues/1473
try {
new ReadableStream({start() {}});
supportStatus = true;
} catch (error) {
supportStatus = false;
}
}
return supportStatus;
}
export {canConstructReadableStream};

View File

@ -0,0 +1,40 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
let supportStatus: boolean | undefined;
/**
* A utility function that determines whether the current browser supports
* constructing a new `Response` from a `response.body` stream.
*
* @return {boolean} `true`, if the current browser can successfully
* construct a `Response` from a `response.body` stream, `false` otherwise.
*
* @private
*/
function canConstructResponseFromBodyStream(): boolean {
if (supportStatus === undefined) {
const testResponse = new Response('');
if ('body' in testResponse) {
try {
new Response(testResponse.body);
supportStatus = true;
} catch (error) {
supportStatus = false;
}
}
supportStatus = false;
}
return supportStatus;
}
export {canConstructResponseFromBodyStream};

View File

@ -0,0 +1,18 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
/**
* A helper function that prevents a promise from being flagged as unused.
*
* @private
**/
export function dontWaitFor(promise: Promise<any>): void {
// Effective no-op.
void promise.then(() => {});
}

View File

@ -0,0 +1,40 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {logger} from '../_private/logger.js';
import {quotaErrorCallbacks} from '../models/quotaErrorCallbacks.js';
import '../_version.js';
/**
* Runs all of the callback functions, one at a time sequentially, in the order
* in which they were registered.
*
* @memberof workbox-core
* @private
*/
async function executeQuotaErrorCallbacks(): Promise<void> {
if (process.env.NODE_ENV !== 'production') {
logger.log(
`About to run ${quotaErrorCallbacks.size} ` +
`callbacks to clean up caches.`,
);
}
for (const callback of quotaErrorCallbacks) {
await callback();
if (process.env.NODE_ENV !== 'production') {
logger.log(callback, 'is complete.');
}
}
if (process.env.NODE_ENV !== 'production') {
logger.log('Finished running callbacks.');
}
}
export {executeQuotaErrorCallbacks};

View File

@ -0,0 +1,18 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
const getFriendlyURL = (url: URL | string): string => {
const urlObj = new URL(String(url), location.href);
// See https://github.com/GoogleChrome/workbox/issues/2323
// We want to include everything, except for the origin if it's same-origin.
return urlObj.href.replace(new RegExp(`^${location.origin}`), '');
};
export {getFriendlyURL};

View File

@ -0,0 +1,100 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
// logger is used inside of both service workers and the window global scope.
declare global {
interface WorkerGlobalScope {
__WB_DISABLE_DEV_LOGS: boolean;
}
interface Window {
__WB_DISABLE_DEV_LOGS: boolean;
}
}
type LoggerMethods =
| 'debug'
| 'log'
| 'warn'
| 'error'
| 'groupCollapsed'
| 'groupEnd';
const logger = (
process.env.NODE_ENV === 'production'
? null
: (() => {
// Don't overwrite this value if it's already set.
// See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923
if (!('__WB_DISABLE_DEV_LOGS' in globalThis)) {
self.__WB_DISABLE_DEV_LOGS = false;
}
let inGroup = false;
const methodToColorMap: {[methodName: string]: string | null} = {
debug: `#7f8c8d`, // Gray
log: `#2ecc71`, // Green
warn: `#f39c12`, // Yellow
error: `#c0392b`, // Red
groupCollapsed: `#3498db`, // Blue
groupEnd: null, // No colored prefix on groupEnd
};
const print = function (method: LoggerMethods, args: any[]) {
if (self.__WB_DISABLE_DEV_LOGS) {
return;
}
if (method === 'groupCollapsed') {
// Safari doesn't print all console.groupCollapsed() arguments:
// https://bugs.webkit.org/show_bug.cgi?id=182754
if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
console[method](...args);
return;
}
}
const styles = [
`background: ${methodToColorMap[method]!}`,
`border-radius: 0.5em`,
`color: white`,
`font-weight: bold`,
`padding: 2px 0.5em`,
];
// When in a group, the workbox prefix is not displayed.
const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];
console[method](...logPrefix, ...args);
if (method === 'groupCollapsed') {
inGroup = true;
}
if (method === 'groupEnd') {
inGroup = false;
}
};
// eslint-disable-next-line @typescript-eslint/ban-types
const api: {[methodName: string]: Function} = {};
const loggerMethods = Object.keys(methodToColorMap);
for (const key of loggerMethods) {
const method = key as LoggerMethods;
api[method] = (...args: any[]) => {
print(method, args);
};
}
return api as unknown;
})()
) as Console;
export {logger};

View File

@ -0,0 +1,62 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {timeout} from './timeout.js';
import '../_version.js';
// Give TypeScript the correct global.
declare let self: ServiceWorkerGlobalScope;
const MAX_RETRY_TIME = 2000;
/**
* Returns a promise that resolves to a window client matching the passed
* `resultingClientId`. For browsers that don't support `resultingClientId`
* or if waiting for the resulting client to apper takes too long, resolve to
* `undefined`.
*
* @param {string} [resultingClientId]
* @return {Promise<Client|undefined>}
* @private
*/
export async function resultingClientExists(
resultingClientId?: string,
): Promise<Client | undefined> {
if (!resultingClientId) {
return;
}
let existingWindows = await self.clients.matchAll({type: 'window'});
const existingWindowIds = new Set(existingWindows.map((w) => w.id));
let resultingWindow;
const startTime = performance.now();
// Only wait up to `MAX_RETRY_TIME` to find a matching client.
while (performance.now() - startTime < MAX_RETRY_TIME) {
existingWindows = await self.clients.matchAll({type: 'window'});
resultingWindow = existingWindows.find((w) => {
if (resultingClientId) {
// If we have a `resultingClientId`, we can match on that.
return w.id === resultingClientId;
} else {
// Otherwise match on finding a window not in `existingWindowIds`.
return !existingWindowIds.has(w.id);
}
});
if (resultingWindow) {
break;
}
// Sleep for 100ms and retry.
await timeout(100);
}
return resultingWindow;
}

View File

@ -0,0 +1,21 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
/**
* Returns a promise that resolves and the passed number of milliseconds.
* This utility is an async/await-friendly version of `setTimeout`.
*
* @param {number} ms
* @return {Promise}
* @private
*/
export function timeout(ms: number): Promise<unknown> {
return new Promise((resolve) => setTimeout(resolve, ms));
}

View File

@ -0,0 +1,28 @@
/*
Copyright 2020 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
/**
* A utility method that makes it easier to use `event.waitUntil` with
* async functions and return the result.
*
* @param {ExtendableEvent} event
* @param {Function} asyncFn
* @return {Function}
* @private
*/
function waitUntil(
event: ExtendableEvent,
asyncFn: () => Promise<any>,
): Promise<any> {
const returnPromise = asyncFn();
event.waitUntil(returnPromise);
return returnPromise;
}
export {waitUntil};

2
frontend/node_modules/workbox-core/src/_version.ts generated vendored Normal file
View File

@ -0,0 +1,2 @@
// @ts-ignore
try{self['workbox:core:7.4.0']&&_()}catch(e){}

45
frontend/node_modules/workbox-core/src/cacheNames.ts generated vendored Normal file
View File

@ -0,0 +1,45 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {cacheNames as _cacheNames} from './_private/cacheNames.js';
import './_version.js';
/**
* Get the current cache names and prefix/suffix used by Workbox.
*
* `cacheNames.precache` is used for precached assets,
* `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to
* store `analytics.js`, and `cacheNames.runtime` is used for everything else.
*
* `cacheNames.prefix` can be used to retrieve just the current prefix value.
* `cacheNames.suffix` can be used to retrieve just the current suffix value.
*
* @return {Object} An object with `precache`, `runtime`, `prefix`, and
* `googleAnalytics` properties.
*
* @memberof workbox-core
*/
const cacheNames = {
get googleAnalytics(): string {
return _cacheNames.getGoogleAnalyticsName();
},
get precache(): string {
return _cacheNames.getPrecacheName();
},
get prefix(): string {
return _cacheNames.getPrefix();
},
get runtime(): string {
return _cacheNames.getRuntimeName();
},
get suffix(): string {
return _cacheNames.getSuffix();
},
};
export {cacheNames};

24
frontend/node_modules/workbox-core/src/clientsClaim.ts generated vendored Normal file
View File

@ -0,0 +1,24 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import './_version.js';
// Give TypeScript the correct global.
declare let self: ServiceWorkerGlobalScope;
/**
* Claim any currently available clients once the service worker
* becomes active. This is normally used in conjunction with `skipWaiting()`.
*
* @memberof workbox-core
*/
function clientsClaim(): void {
self.addEventListener('activate', () => self.clients.claim());
}
export {clientsClaim};

70
frontend/node_modules/workbox-core/src/copyResponse.ts generated vendored Normal file
View File

@ -0,0 +1,70 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {canConstructResponseFromBodyStream} from './_private/canConstructResponseFromBodyStream.js';
import {WorkboxError} from './_private/WorkboxError.js';
import './_version.js';
/**
* Allows developers to copy a response and modify its `headers`, `status`,
* or `statusText` values (the values settable via a
* [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}
* object in the constructor).
* To modify these values, pass a function as the second argument. That
* function will be invoked with a single object with the response properties
* `{headers, status, statusText}`. The return value of this function will
* be used as the `ResponseInit` for the new `Response`. To change the values
* either modify the passed parameter(s) and return it, or return a totally
* new object.
*
* This method is intentionally limited to same-origin responses, regardless of
* whether CORS was used or not.
*
* @param {Response} response
* @param {Function} modifier
* @memberof workbox-core
*/
async function copyResponse(
response: Response,
modifier?: (responseInit: ResponseInit) => ResponseInit,
): Promise<Response> {
let origin = null;
// If response.url isn't set, assume it's cross-origin and keep origin null.
if (response.url) {
const responseURL = new URL(response.url);
origin = responseURL.origin;
}
if (origin !== self.location.origin) {
throw new WorkboxError('cross-origin-copy-response', {origin});
}
const clonedResponse = response.clone();
// Create a fresh `ResponseInit` object by cloning the headers.
const responseInit: ResponseInit = {
headers: new Headers(clonedResponse.headers),
status: clonedResponse.status,
statusText: clonedResponse.statusText,
};
// Apply any user modifications.
const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;
// Create the new response from the body stream and `ResponseInit`
// modifications. Note: not all browsers support the Response.body stream,
// so fall back to reading the entire body into memory as a blob.
const body = canConstructResponseFromBodyStream()
? clonedResponse.body
: await clonedResponse.blob();
return new Response(body, modifiedResponseInit);
}
export {copyResponse};

35
frontend/node_modules/workbox-core/src/index.ts generated vendored Normal file
View File

@ -0,0 +1,35 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {registerQuotaErrorCallback} from './registerQuotaErrorCallback.js';
import * as _private from './_private.js';
import {cacheNames} from './cacheNames.js';
import {copyResponse} from './copyResponse.js';
import {clientsClaim} from './clientsClaim.js';
import {setCacheNameDetails} from './setCacheNameDetails.js';
import {skipWaiting} from './skipWaiting.js';
import './_version.js';
/**
* All of the Workbox service worker libraries use workbox-core for shared
* code as well as setting default values that need to be shared (like cache
* names).
*
* @module workbox-core
*/
export {
_private,
cacheNames,
clientsClaim,
copyResponse,
registerQuotaErrorCallback,
setCacheNameDetails,
skipWaiting,
};
export * from './types.js';

View File

@ -0,0 +1,30 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {messages} from './messages.js';
import '../../_version.js';
const fallback = (code: string, ...args: any[]) => {
let msg = code;
if (args.length > 0) {
msg += ` :: ${JSON.stringify(args)}`;
}
return msg;
};
const generatorFunction = (code: string, details = {}) => {
const message = messages[code];
if (!message) {
throw new Error(`Unable to find message for code '${code}'.`);
}
return message(details);
};
export const messageGenerator =
process.env.NODE_ENV === 'production' ? fallback : generatorFunction;

View File

@ -0,0 +1,382 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../../_version.js';
interface LoggableObject {
[key: string]: string | number;
}
interface MessageMap {
[messageID: string]: (param: LoggableObject) => string;
}
export const messages: MessageMap = {
'invalid-value': ({paramName, validValueDescription, value}) => {
if (!paramName || !validValueDescription) {
throw new Error(`Unexpected input to 'invalid-value' error.`);
}
return (
`The '${paramName}' parameter was given a value with an ` +
`unexpected value. ${validValueDescription} Received a value of ` +
`${JSON.stringify(value)}.`
);
},
'not-an-array': ({moduleName, className, funcName, paramName}) => {
if (!moduleName || !className || !funcName || !paramName) {
throw new Error(`Unexpected input to 'not-an-array' error.`);
}
return (
`The parameter '${paramName}' passed into ` +
`'${moduleName}.${className}.${funcName}()' must be an array.`
);
},
'incorrect-type': ({
expectedType,
paramName,
moduleName,
className,
funcName,
}) => {
if (!expectedType || !paramName || !moduleName || !funcName) {
throw new Error(`Unexpected input to 'incorrect-type' error.`);
}
const classNameStr = className ? `${className}.` : '';
return (
`The parameter '${paramName}' passed into ` +
`'${moduleName}.${classNameStr}` +
`${funcName}()' must be of type ${expectedType}.`
);
},
'incorrect-class': ({
expectedClassName,
paramName,
moduleName,
className,
funcName,
isReturnValueProblem,
}) => {
if (!expectedClassName || !moduleName || !funcName) {
throw new Error(`Unexpected input to 'incorrect-class' error.`);
}
const classNameStr = className ? `${className}.` : '';
if (isReturnValueProblem) {
return (
`The return value from ` +
`'${moduleName}.${classNameStr}${funcName}()' ` +
`must be an instance of class ${expectedClassName}.`
);
}
return (
`The parameter '${paramName}' passed into ` +
`'${moduleName}.${classNameStr}${funcName}()' ` +
`must be an instance of class ${expectedClassName}.`
);
},
'missing-a-method': ({
expectedMethod,
paramName,
moduleName,
className,
funcName,
}) => {
if (
!expectedMethod ||
!paramName ||
!moduleName ||
!className ||
!funcName
) {
throw new Error(`Unexpected input to 'missing-a-method' error.`);
}
return (
`${moduleName}.${className}.${funcName}() expected the ` +
`'${paramName}' parameter to expose a '${expectedMethod}' method.`
);
},
'add-to-cache-list-unexpected-type': ({entry}) => {
return (
`An unexpected entry was passed to ` +
`'workbox-precaching.PrecacheController.addToCacheList()' The entry ` +
`'${JSON.stringify(
entry,
)}' isn't supported. You must supply an array of ` +
`strings with one or more characters, objects with a url property or ` +
`Request objects.`
);
},
'add-to-cache-list-conflicting-entries': ({firstEntry, secondEntry}) => {
if (!firstEntry || !secondEntry) {
throw new Error(
`Unexpected input to ` + `'add-to-cache-list-duplicate-entries' error.`,
);
}
return (
`Two of the entries passed to ` +
`'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +
`${firstEntry} but different revision details. Workbox is ` +
`unable to cache and version the asset correctly. Please remove one ` +
`of the entries.`
);
},
'plugin-error-request-will-fetch': ({thrownErrorMessage}) => {
if (!thrownErrorMessage) {
throw new Error(
`Unexpected input to ` + `'plugin-error-request-will-fetch', error.`,
);
}
return (
`An error was thrown by a plugins 'requestWillFetch()' method. ` +
`The thrown error message was: '${thrownErrorMessage}'.`
);
},
'invalid-cache-name': ({cacheNameId, value}) => {
if (!cacheNameId) {
throw new Error(
`Expected a 'cacheNameId' for error 'invalid-cache-name'`,
);
}
return (
`You must provide a name containing at least one character for ` +
`setCacheDetails({${cacheNameId}: '...'}). Received a value of ` +
`'${JSON.stringify(value)}'`
);
},
'unregister-route-but-not-found-with-method': ({method}) => {
if (!method) {
throw new Error(
`Unexpected input to ` +
`'unregister-route-but-not-found-with-method' error.`,
);
}
return (
`The route you're trying to unregister was not previously ` +
`registered for the method type '${method}'.`
);
},
'unregister-route-route-not-registered': () => {
return (
`The route you're trying to unregister was not previously ` +
`registered.`
);
},
'queue-replay-failed': ({name}) => {
return `Replaying the background sync queue '${name}' failed.`;
},
'duplicate-queue-name': ({name}) => {
return (
`The Queue name '${name}' is already being used. ` +
`All instances of backgroundSync.Queue must be given unique names.`
);
},
'expired-test-without-max-age': ({methodName, paramName}) => {
return (
`The '${methodName}()' method can only be used when the ` +
`'${paramName}' is used in the constructor.`
);
},
'unsupported-route-type': ({moduleName, className, funcName, paramName}) => {
return (
`The supplied '${paramName}' parameter was an unsupported type. ` +
`Please check the docs for ${moduleName}.${className}.${funcName} for ` +
`valid input types.`
);
},
'not-array-of-class': ({
value,
expectedClass,
moduleName,
className,
funcName,
paramName,
}) => {
return (
`The supplied '${paramName}' parameter must be an array of ` +
`'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` +
`Please check the call to ${moduleName}.${className}.${funcName}() ` +
`to fix the issue.`
);
},
'max-entries-or-age-required': ({moduleName, className, funcName}) => {
return (
`You must define either config.maxEntries or config.maxAgeSeconds` +
`in ${moduleName}.${className}.${funcName}`
);
},
'statuses-or-headers-required': ({moduleName, className, funcName}) => {
return (
`You must define either config.statuses or config.headers` +
`in ${moduleName}.${className}.${funcName}`
);
},
'invalid-string': ({moduleName, funcName, paramName}) => {
if (!paramName || !moduleName || !funcName) {
throw new Error(`Unexpected input to 'invalid-string' error.`);
}
return (
`When using strings, the '${paramName}' parameter must start with ` +
`'http' (for cross-origin matches) or '/' (for same-origin matches). ` +
`Please see the docs for ${moduleName}.${funcName}() for ` +
`more info.`
);
},
'channel-name-required': () => {
return (
`You must provide a channelName to construct a ` +
`BroadcastCacheUpdate instance.`
);
},
'invalid-responses-are-same-args': () => {
return (
`The arguments passed into responsesAreSame() appear to be ` +
`invalid. Please ensure valid Responses are used.`
);
},
'expire-custom-caches-only': () => {
return (
`You must provide a 'cacheName' property when using the ` +
`expiration plugin with a runtime caching strategy.`
);
},
'unit-must-be-bytes': ({normalizedRangeHeader}) => {
if (!normalizedRangeHeader) {
throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);
}
return (
`The 'unit' portion of the Range header must be set to 'bytes'. ` +
`The Range header provided was "${normalizedRangeHeader}"`
);
},
'single-range-only': ({normalizedRangeHeader}) => {
if (!normalizedRangeHeader) {
throw new Error(`Unexpected input to 'single-range-only' error.`);
}
return (
`Multiple ranges are not supported. Please use a single start ` +
`value, and optional end value. The Range header provided was ` +
`"${normalizedRangeHeader}"`
);
},
'invalid-range-values': ({normalizedRangeHeader}) => {
if (!normalizedRangeHeader) {
throw new Error(`Unexpected input to 'invalid-range-values' error.`);
}
return (
`The Range header is missing both start and end values. At least ` +
`one of those values is needed. The Range header provided was ` +
`"${normalizedRangeHeader}"`
);
},
'no-range-header': () => {
return `No Range header was found in the Request provided.`;
},
'range-not-satisfiable': ({size, start, end}) => {
return (
`The start (${start}) and end (${end}) values in the Range are ` +
`not satisfiable by the cached response, which is ${size} bytes.`
);
},
'attempt-to-cache-non-get-request': ({url, method}) => {
return (
`Unable to cache '${url}' because it is a '${method}' request and ` +
`only 'GET' requests can be cached.`
);
},
'cache-put-with-no-response': ({url}) => {
return (
`There was an attempt to cache '${url}' but the response was not ` +
`defined.`
);
},
'no-response': ({url, error}) => {
let message = `The strategy could not generate a response for '${url}'.`;
if (error) {
message += ` The underlying error is ${error}.`;
}
return message;
},
'bad-precaching-response': ({url, status}) => {
return (
`The precaching request for '${url}' failed` +
(status ? ` with an HTTP status of ${status}.` : `.`)
);
},
'non-precached-url': ({url}) => {
return (
`createHandlerBoundToURL('${url}') was called, but that URL is ` +
`not precached. Please pass in a URL that is precached instead.`
);
},
'add-to-cache-list-conflicting-integrities': ({url}) => {
return (
`Two of the entries passed to ` +
`'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +
`${url} with different integrity values. Please remove one of them.`
);
},
'missing-precache-entry': ({cacheName, url}) => {
return `Unable to find a precached response in ${cacheName} for ${url}.`;
},
'cross-origin-copy-response': ({origin}) => {
return (
`workbox-core.copyResponse() can only be used with same-origin ` +
`responses. It was passed a response with origin ${origin}.`
);
},
'opaque-streams-source': ({type}) => {
const message =
`One of the workbox-streams sources resulted in an ` +
`'${type}' response.`;
if (type === 'opaqueredirect') {
return (
`${message} Please do not use a navigation request that results ` +
`in a redirect as a source.`
);
}
return `${message} Please ensure your sources are CORS-enabled.`;
},
};

View File

@ -0,0 +1,19 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
export const enum pluginEvents {
CACHE_DID_UPDATE = 'cacheDidUpdate',
CACHE_KEY_WILL_BE_USED = 'cacheKeyWillBeUsed',
CACHE_WILL_UPDATE = 'cacheWillUpdate',
CACHED_RESPONSE_WILL_BE_USED = 'cachedResponseWillBeUsed',
FETCH_DID_FAIL = 'fetchDidFail',
FETCH_DID_SUCCEED = 'fetchDidSucceed',
REQUEST_WILL_FETCH = 'requestWillFetch',
}

View File

@ -0,0 +1,16 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import '../_version.js';
// Callbacks to be executed whenever there's a quota error.
// Can't change Function type right now.
// eslint-disable-next-line @typescript-eslint/ban-types
const quotaErrorCallbacks: Set<Function> = new Set();
export {quotaErrorCallbacks};

View File

@ -0,0 +1,39 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {logger} from './_private/logger.js';
import {assert} from './_private/assert.js';
import {quotaErrorCallbacks} from './models/quotaErrorCallbacks.js';
import './_version.js';
/**
* Adds a function to the set of quotaErrorCallbacks that will be executed if
* there's a quota error.
*
* @param {Function} callback
* @memberof workbox-core
*/
// Can't change Function type
// eslint-disable-next-line @typescript-eslint/ban-types
function registerQuotaErrorCallback(callback: Function): void {
if (process.env.NODE_ENV !== 'production') {
assert!.isType(callback, 'function', {
moduleName: 'workbox-core',
funcName: 'register',
paramName: 'callback',
});
}
quotaErrorCallbacks.add(callback);
if (process.env.NODE_ENV !== 'production') {
logger.log('Registered a callback to respond to quota errors.', callback);
}
}
export {registerQuotaErrorCallback};

View File

@ -0,0 +1,69 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {assert} from './_private/assert.js';
import {cacheNames, PartialCacheNameDetails} from './_private/cacheNames.js';
import {WorkboxError} from './_private/WorkboxError.js';
import './_version.js';
/**
* Modifies the default cache names used by the Workbox packages.
* Cache names are generated as `<prefix>-<Cache Name>-<suffix>`.
*
* @param {Object} details
* @param {Object} [details.prefix] The string to add to the beginning of
* the precache and runtime cache names.
* @param {Object} [details.suffix] The string to add to the end of
* the precache and runtime cache names.
* @param {Object} [details.precache] The cache name to use for precache
* caching.
* @param {Object} [details.runtime] The cache name to use for runtime caching.
* @param {Object} [details.googleAnalytics] The cache name to use for
* `workbox-google-analytics` caching.
*
* @memberof workbox-core
*/
function setCacheNameDetails(details: PartialCacheNameDetails): void {
if (process.env.NODE_ENV !== 'production') {
Object.keys(details).forEach((key) => {
assert!.isType(details[key], 'string', {
moduleName: 'workbox-core',
funcName: 'setCacheNameDetails',
paramName: `details.${key}`,
});
});
if ('precache' in details && details['precache']!.length === 0) {
throw new WorkboxError('invalid-cache-name', {
cacheNameId: 'precache',
value: details['precache'],
});
}
if ('runtime' in details && details['runtime']!.length === 0) {
throw new WorkboxError('invalid-cache-name', {
cacheNameId: 'runtime',
value: details['runtime'],
});
}
if (
'googleAnalytics' in details &&
details['googleAnalytics'].length === 0
) {
throw new WorkboxError('invalid-cache-name', {
cacheNameId: 'googleAnalytics',
value: details['googleAnalytics'],
});
}
}
cacheNames.updateDetails(details);
}
export {setCacheNameDetails};

37
frontend/node_modules/workbox-core/src/skipWaiting.ts generated vendored Normal file
View File

@ -0,0 +1,37 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {logger} from './_private/logger.js';
import './_version.js';
// Give TypeScript the correct global.
declare let self: ServiceWorkerGlobalScope;
/**
* This method is deprecated, and will be removed in Workbox v7.
*
* Calling self.skipWaiting() is equivalent, and should be used instead.
*
* @memberof workbox-core
*/
function skipWaiting(): void {
// Just call self.skipWaiting() directly.
// See https://github.com/GoogleChrome/workbox/issues/2525
if (process.env.NODE_ENV !== 'production') {
logger.warn(
`skipWaiting() from workbox-core is no longer recommended ` +
`and will be removed in Workbox v7. Using self.skipWaiting() instead ` +
`is equivalent.`,
);
}
void self.skipWaiting();
}
export {skipWaiting};

282
frontend/node_modules/workbox-core/src/types.ts generated vendored Normal file
View File

@ -0,0 +1,282 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import './_version.js';
export interface MapLikeObject {
[key: string]: any;
}
/**
* Using a plain `MapLikeObject` for now, but could extend/restrict this
* in the future.
*/
export type PluginState = MapLikeObject;
/**
* Options passed to a `RouteMatchCallback` function.
*/
export interface RouteMatchCallbackOptions {
event: ExtendableEvent;
request: Request;
sameOrigin: boolean;
url: URL;
}
/**
* The "match" callback is used to determine if a `Route` should apply for a
* particular URL and request. When matching occurs in response to a fetch
* event from the client, the `event` object is also supplied. However, since
* the match callback can be invoked outside of a fetch event, matching logic
* should not assume the `event` object will always be available.
* If the match callback returns a truthy value, the matching route's
* `RouteHandlerCallback` will be invoked immediately. If the value returned
* is a non-empty array or object, that value will be set on the handler's
* `options.params` argument.
*/
export interface RouteMatchCallback {
(options: RouteMatchCallbackOptions): any;
}
/**
* Options passed to a `RouteHandlerCallback` function.
*/
export declare interface RouteHandlerCallbackOptions {
event: ExtendableEvent;
request: Request;
url: URL;
params?: string[] | MapLikeObject;
}
/**
* Options passed to a `ManualHandlerCallback` function.
*/
export interface ManualHandlerCallbackOptions {
event: ExtendableEvent;
request: Request | string;
}
export type HandlerCallbackOptions =
| RouteHandlerCallbackOptions
| ManualHandlerCallbackOptions;
/**
* The "handler" callback is invoked whenever a `Router` matches a URL/Request
* to a `Route` via its `RouteMatchCallback`. This handler callback should
* return a `Promise` that resolves with a `Response`.
*
* If a non-empty array or object is returned by the `RouteMatchCallback` it
* will be passed in as this handler's `options.params` argument.
*/
export interface RouteHandlerCallback {
(options: RouteHandlerCallbackOptions): Promise<Response>;
}
/**
* The "handler" callback is invoked whenever a `Router` matches a URL/Request
* to a `Route` via its `RouteMatchCallback`. This handler callback should
* return a `Promise` that resolves with a `Response`.
*
* If a non-empty array or object is returned by the `RouteMatchCallback` it
* will be passed in as this handler's `options.params` argument.
*/
export interface ManualHandlerCallback {
(options: ManualHandlerCallbackOptions): Promise<Response>;
}
/**
* An object with a `handle` method of type `RouteHandlerCallback`.
*
* A `Route` object can be created with either an `RouteHandlerCallback`
* function or this `RouteHandler` object. The benefit of the `RouteHandler`
* is it can be extended (as is done by the `workbox-strategies` package).
*/
export interface RouteHandlerObject {
handle: RouteHandlerCallback;
}
/**
* Either a `RouteHandlerCallback` or a `RouteHandlerObject`.
* Most APIs in `workbox-routing` that accept route handlers take either.
*/
export type RouteHandler = RouteHandlerCallback | RouteHandlerObject;
export interface HandlerWillStartCallbackParam {
request: Request;
event: ExtendableEvent;
state?: PluginState;
}
export interface HandlerWillStartCallback {
(param: HandlerWillStartCallbackParam): Promise<void | null | undefined>;
}
export interface CacheDidUpdateCallbackParam {
cacheName: string;
newResponse: Response;
request: Request;
event: ExtendableEvent;
oldResponse?: Response | null;
state?: PluginState;
}
export interface CacheDidUpdateCallback {
(param: CacheDidUpdateCallbackParam): Promise<void | null | undefined>;
}
export interface CacheKeyWillBeUsedCallbackParam {
mode: string;
request: Request;
event: ExtendableEvent;
params?: any;
state?: PluginState;
}
export interface CacheKeyWillBeUsedCallback {
(param: CacheKeyWillBeUsedCallbackParam): Promise<Request | string>;
}
export interface CacheWillUpdateCallbackParam {
request: Request;
response: Response;
event: ExtendableEvent;
state?: PluginState;
}
export interface CacheWillUpdateCallback {
(param: CacheWillUpdateCallbackParam): Promise<
Response | void | null | undefined
>;
}
export interface CachedResponseWillBeUsedCallbackParam {
cacheName: string;
request: Request;
cachedResponse?: Response;
event: ExtendableEvent;
matchOptions?: CacheQueryOptions;
state?: PluginState;
}
export interface CachedResponseWillBeUsedCallback {
(param: CachedResponseWillBeUsedCallbackParam): Promise<
Response | void | null | undefined
>;
}
export interface FetchDidFailCallbackParam {
error: Error;
originalRequest: Request;
request: Request;
event: ExtendableEvent;
state?: PluginState;
}
export interface FetchDidFailCallback {
(param: FetchDidFailCallbackParam): Promise<void | null | undefined>;
}
export interface FetchDidSucceedCallbackParam {
request: Request;
response: Response;
event: ExtendableEvent;
state?: PluginState;
}
export interface FetchDidSucceedCallback {
(param: FetchDidSucceedCallbackParam): Promise<Response>;
}
export interface RequestWillFetchCallbackParam {
request: Request;
event: ExtendableEvent;
state?: PluginState;
}
export interface RequestWillFetchCallback {
(param: RequestWillFetchCallbackParam): Promise<Request>;
}
export interface HandlerWillRespondCallbackParam {
request: Request;
response: Response;
event: ExtendableEvent;
state?: PluginState;
}
export interface HandlerWillRespondCallback {
(param: HandlerWillRespondCallbackParam): Promise<Response>;
}
export interface HandlerDidErrorCallbackParam {
request: Request;
event: ExtendableEvent;
error: Error;
state?: PluginState;
}
export interface HandlerDidErrorCallback {
(param: HandlerDidErrorCallbackParam): Promise<Response | undefined>;
}
export interface HandlerDidRespondCallbackParam {
request: Request;
event: ExtendableEvent;
response?: Response;
state?: PluginState;
}
export interface HandlerDidRespondCallback {
(param: HandlerDidRespondCallbackParam): Promise<void | null | undefined>;
}
export interface HandlerDidCompleteCallbackParam {
request: Request;
error?: Error;
event: ExtendableEvent;
response?: Response;
state?: PluginState;
}
export interface HandlerDidCompleteCallback {
(param: HandlerDidCompleteCallbackParam): Promise<void | null | undefined>;
}
/**
* An object with optional lifecycle callback properties for the fetch and
* cache operations.
*/
export declare interface WorkboxPlugin {
cacheDidUpdate?: CacheDidUpdateCallback;
cachedResponseWillBeUsed?: CachedResponseWillBeUsedCallback;
cacheKeyWillBeUsed?: CacheKeyWillBeUsedCallback;
cacheWillUpdate?: CacheWillUpdateCallback;
fetchDidFail?: FetchDidFailCallback;
fetchDidSucceed?: FetchDidSucceedCallback;
handlerDidComplete?: HandlerDidCompleteCallback;
handlerDidError?: HandlerDidErrorCallback;
handlerDidRespond?: HandlerDidRespondCallback;
handlerWillRespond?: HandlerWillRespondCallback;
handlerWillStart?: HandlerWillStartCallback;
requestWillFetch?: RequestWillFetchCallback;
}
export interface WorkboxPluginCallbackParam {
cacheDidUpdate: CacheDidUpdateCallbackParam;
cachedResponseWillBeUsed: CachedResponseWillBeUsedCallbackParam;
cacheKeyWillBeUsed: CacheKeyWillBeUsedCallbackParam;
cacheWillUpdate: CacheWillUpdateCallbackParam;
fetchDidFail: FetchDidFailCallbackParam;
fetchDidSucceed: FetchDidSucceedCallbackParam;
handlerDidComplete: HandlerDidCompleteCallbackParam;
handlerDidError: HandlerDidErrorCallbackParam;
handlerDidRespond: HandlerDidRespondCallbackParam;
handlerWillRespond: HandlerWillRespondCallbackParam;
handlerWillStart: HandlerWillStartCallbackParam;
requestWillFetch: RequestWillFetchCallbackParam;
}

View File

@ -0,0 +1,16 @@
/*
Copyright 2018 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {WorkboxPlugin} from '../types.js';
import '../_version.js';
export const pluginUtils = {
filter: (plugins: WorkboxPlugin[], callbackName: string): WorkboxPlugin[] => {
return plugins.filter((plugin) => callbackName in plugin);
},
};

View File

@ -0,0 +1,35 @@
/*
Copyright 2019 Google LLC
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
*/
import {logger} from '../_private/logger.js';
import '../_version.js';
// A WorkboxCore instance must be exported before we can use the logger.
// This is so it can get the current log level.
if (process.env.NODE_ENV !== 'production') {
const padding = ' ';
logger.groupCollapsed('Welcome to Workbox!');
logger.log(
`You are currently using a development build. ` +
`By default this will switch to prod builds when not on localhost. ` +
`You can force this with workbox.setConfig({debug: true|false}).`,
);
logger.log(
`📖 Read the guides and documentation\n` +
`${padding}https://developers.google.com/web/tools/workbox/`,
);
logger.log(
`❓ Use the [workbox] tag on Stack Overflow to ask questions\n` +
`${padding}https://stackoverflow.com/questions/ask?tags=workbox`,
);
logger.log(
`🐛 Found a bug? Report it on GitHub\n` +
`${padding}https://github.com/GoogleChrome/workbox/issues/new`,
);
logger.groupEnd();
}