@netlify/cache
Advanced tools
| type Base64Encoder = (input: string) => string; | ||
| interface EnvironmentOptions { | ||
| base64Encode: Base64Encoder; | ||
| getContext: RequestContextFactory; | ||
| userAgent?: string; | ||
| } | ||
| declare enum Operation { | ||
| Delete = "delete", | ||
| Read = "read", | ||
| Write = "write" | ||
| } | ||
| type RequestContextFactory = (options: { | ||
| operation: Operation; | ||
| }) => RequestContext | null; | ||
| interface RequestContext { | ||
| host: string; | ||
| token: string; | ||
| url: string; | ||
| } | ||
| type NetlifyCacheOptions = EnvironmentOptions & { | ||
| name: string; | ||
| }; | ||
| declare const getInternalHeaders: unique symbol; | ||
| declare const serializeResourceHeaders: unique symbol; | ||
| declare class NetlifyCache implements Cache { | ||
| #private; | ||
| constructor({ base64Encode, getContext, name, userAgent }: NetlifyCacheOptions); | ||
| private [getInternalHeaders]; | ||
| private [serializeResourceHeaders]; | ||
| add(request: RequestInfo): Promise<void>; | ||
| addAll(requests: RequestInfo[]): Promise<void>; | ||
| delete(request: RequestInfo): Promise<boolean>; | ||
| keys(_request?: Request): Promise<never[]>; | ||
| match(request: RequestInfo): Promise<Response | undefined>; | ||
| matchAll(request?: RequestInfo, _options?: CacheQueryOptions): Promise<readonly Response[]>; | ||
| put(request: RequestInfo | URL | string, response: Response): Promise<void>; | ||
| } | ||
| export { Base64Encoder as B, EnvironmentOptions as E, NetlifyCache as N, Operation as O, RequestContextFactory as R }; |
@@ -1,3 +0,3 @@ | ||
| import { E as EnvironmentOptions } from '../cache-dc160ee0.js'; | ||
| export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-dc160ee0.js'; | ||
| import { E as EnvironmentOptions } from '../cache-fc378069.js'; | ||
| export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-fc378069.js'; | ||
@@ -4,0 +4,0 @@ declare class NetlifyCacheStorage { |
@@ -1,3 +0,3 @@ | ||
| import { E as EnvironmentOptions } from '../cache-dc160ee0.js'; | ||
| export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-dc160ee0.js'; | ||
| import { E as EnvironmentOptions } from '../cache-fc378069.js'; | ||
| export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-fc378069.js'; | ||
@@ -4,0 +4,0 @@ declare class NetlifyCacheStorage { |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { N as NetlifyCache } from './cache-dc160ee0.js'; | ||
| import { N as NetlifyCache } from './cache-fc378069.js'; | ||
@@ -3,0 +3,0 @@ interface CacheSettings { |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { N as NetlifyCache } from './cache-dc160ee0.js'; | ||
| import { N as NetlifyCache } from './cache-fc378069.js'; | ||
@@ -3,0 +3,0 @@ interface CacheSettings { |
+1
-1
| { | ||
| "name": "@netlify/cache", | ||
| "version": "1.6.0", | ||
| "version": "1.6.1", | ||
| "description": "TypeScript utilities for interacting with the Netlify cache", | ||
@@ -5,0 +5,0 @@ "type": "module", |
| type Base64Encoder = (input: string) => string; | ||
| interface EnvironmentOptions { | ||
| base64Encode: Base64Encoder; | ||
| getContext: RequestContextFactory; | ||
| userAgent?: string; | ||
| } | ||
| declare const enum Operation { | ||
| Delete = "delete", | ||
| Read = "read", | ||
| Write = "write" | ||
| } | ||
| type RequestContextFactory = (options: { | ||
| operation: Operation; | ||
| }) => RequestContext | null; | ||
| interface RequestContext { | ||
| host: string; | ||
| token: string; | ||
| url: string; | ||
| } | ||
| type NetlifyCacheOptions = EnvironmentOptions & { | ||
| name: string; | ||
| }; | ||
| declare const getInternalHeaders: unique symbol; | ||
| declare const serializeResourceHeaders: unique symbol; | ||
| declare class NetlifyCache implements Cache { | ||
| #private; | ||
| constructor({ base64Encode, getContext, name, userAgent }: NetlifyCacheOptions); | ||
| private [getInternalHeaders]; | ||
| private [serializeResourceHeaders]; | ||
| add(request: RequestInfo): Promise<void>; | ||
| addAll(requests: RequestInfo[]): Promise<void>; | ||
| delete(request: RequestInfo): Promise<boolean>; | ||
| keys(_request?: Request): Promise<never[]>; | ||
| match(request: RequestInfo): Promise<Response | undefined>; | ||
| matchAll(request?: RequestInfo, _options?: CacheQueryOptions): Promise<readonly Response[]>; | ||
| put(request: RequestInfo | URL | string, response: Response): Promise<void>; | ||
| } | ||
| export { Base64Encoder as B, EnvironmentOptions as E, NetlifyCache as N, Operation as O, RequestContextFactory as R }; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
54978
-0.01%