Urara-Blog/node_modules/.pnpm-store/v3/files/16/c6f9d75bf0de5ef016d9c8e91155b47d267ba5b8a05a81f21eb15a63b6a0b93f1f96aa7685ec8f621971719cb9cb7a183a67e29351009d8b5c459455bedfe3
2022-08-14 01:14:53 +08:00

40 lines
1 KiB
Text

/*
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};