Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
appcache-polyfill-sw
Advanced tools
A service worker implementation of the behavior defined in a page's App Cache manifest.
A pair of modules meant to ease the transition off of AppCache and on to service workers.
Note: These libraries attempt to replicate the caching and serving behavior that AppCache offers, but does not include direct equivalents to the window.applicationCache
interface, nor the related events that AppCache would fire in the window
context.
There are two modules to install: one that is used from within the window
context in your web app, and the other that's used in the context of your
service worker.
npm install --save-dev appcache-polyfill-window
npm install --save-dev appcache-polyfill-sw
As an alternative to local installation & serving, you can load both libraries from a NPM CDN, like https://unpkg.com/ or https://www.pika.dev/.
<script type="module">
import {init} from '/path/to/appcache-polyfill-window/build/index.modern.js';
// Optional: define a callback that runs whenever caches are updated.
// This is *rough* replacement for listening for AppCache updates.
function myCachePopulatedCallback(urls) {
// urls is an array of updated URLs
// Your logic goes here.
}
init({
cachePopulatedCallback: myCachePopulatedCallback,
}).then(() => navigator.serviceWorker.register('sw.js'));
</script>
importScripts('/path/to/appcache-polyfill-sw/build/index.umd.js');
self.addEventListener('fetch', (event) => {
// Alternatively, examine event.request and only use the
// appcachePolyfill.handle() logic for a subset of requests.
event.respondWith(appcachePolyfill.handle(event));
});
Please open an issue with feedback or bug reports if you run in to problems.
FAQs
A service worker implementation of the behavior defined in a page's App Cache manifest.
The npm package appcache-polyfill-sw receives a total of 148 weekly downloads. As such, appcache-polyfill-sw popularity was classified as not popular.
We found that appcache-polyfill-sw demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.