@serwist/cacheable-response 8.4.0 → 8.4.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/index.cjs +7 -7
- package/dist/index.js +7 -7
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -75,20 +75,20 @@ var internal = require('@serwist/core/internal');
|
|
|
75
75
|
}
|
|
76
76
|
if (process.env.NODE_ENV !== "production") {
|
|
77
77
|
if (!cacheable) {
|
|
78
|
-
internal.logger.groupCollapsed(`The request for
|
|
79
|
-
internal.logger.groupCollapsed(
|
|
80
|
-
internal.logger.log(`Cacheable statuses:
|
|
81
|
-
internal.logger.log(`Cacheable headers:
|
|
78
|
+
internal.logger.groupCollapsed(`The request for '${internal.getFriendlyURL(response.url)}' returned a response that does not meet the criteria for being cached.`);
|
|
79
|
+
internal.logger.groupCollapsed("View cacheability criteria here.");
|
|
80
|
+
internal.logger.log(`Cacheable statuses: ${JSON.stringify(this._statuses)}`);
|
|
81
|
+
internal.logger.log(`Cacheable headers: ${JSON.stringify(this._headers, null, 2)}`);
|
|
82
82
|
internal.logger.groupEnd();
|
|
83
83
|
const logFriendlyHeaders = {};
|
|
84
84
|
response.headers.forEach((value, key)=>{
|
|
85
85
|
logFriendlyHeaders[key] = value;
|
|
86
86
|
});
|
|
87
|
-
internal.logger.groupCollapsed(
|
|
87
|
+
internal.logger.groupCollapsed("View response status and headers here.");
|
|
88
88
|
internal.logger.log(`Response status: ${response.status}`);
|
|
89
|
-
internal.logger.log(`Response headers:
|
|
89
|
+
internal.logger.log(`Response headers: ${JSON.stringify(logFriendlyHeaders, null, 2)}`);
|
|
90
90
|
internal.logger.groupEnd();
|
|
91
|
-
internal.logger.groupCollapsed(
|
|
91
|
+
internal.logger.groupCollapsed("View full response details here.");
|
|
92
92
|
internal.logger.log(response.headers);
|
|
93
93
|
internal.logger.log(response);
|
|
94
94
|
internal.logger.groupEnd();
|
package/dist/index.js
CHANGED
|
@@ -73,20 +73,20 @@ import { SerwistError, assert, logger, getFriendlyURL } from '@serwist/core/inte
|
|
|
73
73
|
}
|
|
74
74
|
if (process.env.NODE_ENV !== "production") {
|
|
75
75
|
if (!cacheable) {
|
|
76
|
-
logger.groupCollapsed(`The request for
|
|
77
|
-
logger.groupCollapsed(
|
|
78
|
-
logger.log(`Cacheable statuses:
|
|
79
|
-
logger.log(`Cacheable headers:
|
|
76
|
+
logger.groupCollapsed(`The request for '${getFriendlyURL(response.url)}' returned a response that does not meet the criteria for being cached.`);
|
|
77
|
+
logger.groupCollapsed("View cacheability criteria here.");
|
|
78
|
+
logger.log(`Cacheable statuses: ${JSON.stringify(this._statuses)}`);
|
|
79
|
+
logger.log(`Cacheable headers: ${JSON.stringify(this._headers, null, 2)}`);
|
|
80
80
|
logger.groupEnd();
|
|
81
81
|
const logFriendlyHeaders = {};
|
|
82
82
|
response.headers.forEach((value, key)=>{
|
|
83
83
|
logFriendlyHeaders[key] = value;
|
|
84
84
|
});
|
|
85
|
-
logger.groupCollapsed(
|
|
85
|
+
logger.groupCollapsed("View response status and headers here.");
|
|
86
86
|
logger.log(`Response status: ${response.status}`);
|
|
87
|
-
logger.log(`Response headers:
|
|
87
|
+
logger.log(`Response headers: ${JSON.stringify(logFriendlyHeaders, null, 2)}`);
|
|
88
88
|
logger.groupEnd();
|
|
89
|
-
logger.groupCollapsed(
|
|
89
|
+
logger.groupCollapsed("View full response details here.");
|
|
90
90
|
logger.log(response.headers);
|
|
91
91
|
logger.log(response);
|
|
92
92
|
logger.groupEnd();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/cacheable-response",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "This library takes a Response object and determines whether it's cacheable based on a specific configuration.",
|
|
6
6
|
"files": [
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@serwist/core": "8.4.
|
|
39
|
+
"@serwist/core": "8.4.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"rollup": "4.9.1",
|
|
43
|
-
"@serwist/constants": "8.4.
|
|
43
|
+
"@serwist/constants": "8.4.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "cross-env NODE_ENV=production rollup --waitForBundleInput --config rollup.config.js",
|
|
47
47
|
"dev": "rollup --config rollup.config.js --watch",
|
|
48
|
-
"lint": "
|
|
48
|
+
"lint": "biome lint ./src",
|
|
49
49
|
"typecheck": "tsc"
|
|
50
50
|
}
|
|
51
51
|
}
|