@netlify/cache
Advanced tools
+3
-1
@@ -341,2 +341,3 @@ "use strict"; | ||
| } | ||
| const { fetch = globalThis.fetch } = cacheOptions; | ||
| const fresh = await fetch(request); | ||
@@ -350,3 +351,4 @@ if (!fresh.body) { | ||
| applyHeaders(cacheResponse.headers, cacheHeaders(cacheSettings)); | ||
| const cachePut = cache.put(request, cacheResponse); | ||
| const cachePut = cache.put(request, cacheResponse).catch(() => { | ||
| }); | ||
| if (onCachePut) { | ||
@@ -353,0 +355,0 @@ await onCachePut(cachePut); |
+4
-0
@@ -146,2 +146,6 @@ import { N as NetlifyCache } from './cache-B9TsVKLp.cjs'; | ||
| /** | ||
| * A custom `fetch` implementation to be used instead of the native one. | ||
| */ | ||
| fetch?: typeof globalThis.fetch; | ||
| /** | ||
| * When `fetchWithCache` fetches a new response and adds it to the cache, the | ||
@@ -148,0 +152,0 @@ * `Promise` it returns waits for both the network call to finish and for the |
+4
-0
@@ -146,2 +146,6 @@ import { N as NetlifyCache } from './cache-B9TsVKLp.js'; | ||
| /** | ||
| * A custom `fetch` implementation to be used instead of the native one. | ||
| */ | ||
| fetch?: typeof globalThis.fetch; | ||
| /** | ||
| * When `fetchWithCache` fetches a new response and adds it to the cache, the | ||
@@ -148,0 +152,0 @@ * `Promise` it returns waits for both the network call to finish and for the |
+3
-1
@@ -306,2 +306,3 @@ // src/polyfill.ts | ||
| } | ||
| const { fetch = globalThis.fetch } = cacheOptions; | ||
| const fresh = await fetch(request); | ||
@@ -315,3 +316,4 @@ if (!fresh.body) { | ||
| applyHeaders(cacheResponse.headers, cacheHeaders(cacheSettings)); | ||
| const cachePut = cache.put(request, cacheResponse); | ||
| const cachePut = cache.put(request, cacheResponse).catch(() => { | ||
| }); | ||
| if (onCachePut) { | ||
@@ -318,0 +320,0 @@ await onCachePut(cachePut); |
+1
-1
| { | ||
| "name": "@netlify/cache", | ||
| "version": "3.2.0", | ||
| "version": "3.3.0", | ||
| "description": "TypeScript utilities for interacting with the Netlify cache", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
61512
0.66%1488
0.54%24
71.43%