@netlify/cache 1.6.1 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap/main.cjs +1 -1
- package/dist/bootstrap/main.d.cts +2 -2
- package/dist/bootstrap/main.d.ts +2 -2
- package/dist/bootstrap/main.js +1 -1
- package/dist/{cache-fc378069.d.ts → cache-7af07baa.d.ts} +2 -0
- package/dist/main.d.cts +1 -1
- package/dist/main.d.ts +1 -1
- package/package.json +1 -1
package/dist/bootstrap/main.cjs
CHANGED
|
@@ -200,7 +200,7 @@ var NetlifyCache = class {
|
|
|
200
200
|
if (!cacheResponse.ok) {
|
|
201
201
|
const errorDetail = cacheResponse.headers.get(ErrorDetail) ?? "";
|
|
202
202
|
const errorMessage = ERROR_CODES[errorDetail] || GENERIC_ERROR;
|
|
203
|
-
|
|
203
|
+
context.logger?.(`Failed to write to the cache: ${errorMessage}`);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EnvironmentOptions } from '../cache-
|
|
2
|
-
export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-
|
|
1
|
+
import { E as EnvironmentOptions } from '../cache-7af07baa.js';
|
|
2
|
+
export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-7af07baa.js';
|
|
3
3
|
|
|
4
4
|
declare class NetlifyCacheStorage {
|
|
5
5
|
#private;
|
package/dist/bootstrap/main.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EnvironmentOptions } from '../cache-
|
|
2
|
-
export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-
|
|
1
|
+
import { E as EnvironmentOptions } from '../cache-7af07baa.js';
|
|
2
|
+
export { B as Base64Encoder, N as NetlifyCache, O as Operation, R as RequestContextFactory } from '../cache-7af07baa.js';
|
|
3
3
|
|
|
4
4
|
declare class NetlifyCacheStorage {
|
|
5
5
|
#private;
|
package/dist/bootstrap/main.js
CHANGED
|
@@ -173,7 +173,7 @@ var NetlifyCache = class {
|
|
|
173
173
|
if (!cacheResponse.ok) {
|
|
174
174
|
const errorDetail = cacheResponse.headers.get(ErrorDetail) ?? "";
|
|
175
175
|
const errorMessage = ERROR_CODES[errorDetail] || GENERIC_ERROR;
|
|
176
|
-
|
|
176
|
+
context.logger?.(`Failed to write to the cache: ${errorMessage}`);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type Base64Encoder = (input: string) => string;
|
|
2
|
+
type Logger = (...args: any[]) => void;
|
|
2
3
|
interface EnvironmentOptions {
|
|
3
4
|
base64Encode: Base64Encoder;
|
|
4
5
|
getContext: RequestContextFactory;
|
|
@@ -14,6 +15,7 @@ type RequestContextFactory = (options: {
|
|
|
14
15
|
}) => RequestContext | null;
|
|
15
16
|
interface RequestContext {
|
|
16
17
|
host: string;
|
|
18
|
+
logger?: Logger;
|
|
17
19
|
token: string;
|
|
18
20
|
url: string;
|
|
19
21
|
}
|
package/dist/main.d.cts
CHANGED
package/dist/main.d.ts
CHANGED