Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@netlify/cache

Package Overview
Dependencies
Maintainers
17
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/cache - npm Package Compare versions

Comparing version
1.6.0
to
1.6.1
+40
dist/cache-fc378069.d.ts
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 };
+2
-2

@@ -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,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,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 {

{
"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 };