@akinon/next 1.113.0-rc.18 → 1.113.0-rc.19
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/CHANGELOG.md +6 -0
- package/lib/cache-handler.mjs +11 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/cache-handler.mjs
CHANGED
|
@@ -463,6 +463,14 @@ CacheHandler.onCreation(async () => {
|
|
|
463
463
|
set: async (key, value, context) => {
|
|
464
464
|
const vKey = versionKey(key);
|
|
465
465
|
|
|
466
|
+
const stripTags = (val) => {
|
|
467
|
+
if (val && typeof val === 'object') {
|
|
468
|
+
const { tags, ...rest } = val;
|
|
469
|
+
return { ...rest, tags: [] };
|
|
470
|
+
}
|
|
471
|
+
return val;
|
|
472
|
+
};
|
|
473
|
+
|
|
466
474
|
let compressedValue;
|
|
467
475
|
let shouldUseCompressed = false;
|
|
468
476
|
|
|
@@ -482,12 +490,12 @@ CacheHandler.onCreation(async () => {
|
|
|
482
490
|
|
|
483
491
|
if (shouldUseCompressed) {
|
|
484
492
|
try {
|
|
485
|
-
await redisHandler.set(vKey, compressedValue, context);
|
|
493
|
+
await redisHandler.set(vKey, stripTags(compressedValue), context);
|
|
486
494
|
|
|
487
495
|
redisSetResult = { status: 'fulfilled' };
|
|
488
496
|
} catch (compressionError) {
|
|
489
497
|
try {
|
|
490
|
-
await redisHandler.set(vKey, value, context);
|
|
498
|
+
await redisHandler.set(vKey, stripTags(value), context);
|
|
491
499
|
|
|
492
500
|
redisSetResult = { status: 'fulfilled' };
|
|
493
501
|
} catch (fallbackError) {
|
|
@@ -496,7 +504,7 @@ CacheHandler.onCreation(async () => {
|
|
|
496
504
|
}
|
|
497
505
|
} else {
|
|
498
506
|
try {
|
|
499
|
-
await redisHandler.set(vKey, value, context);
|
|
507
|
+
await redisHandler.set(vKey, stripTags(value), context);
|
|
500
508
|
redisSetResult = { status: 'fulfilled' };
|
|
501
509
|
} catch (error) {
|
|
502
510
|
redisSetResult = { status: 'rejected', reason: error };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/next",
|
|
3
3
|
"description": "Core package for Project Zero Next",
|
|
4
|
-
"version": "1.113.0-rc.
|
|
4
|
+
"version": "1.113.0-rc.19",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"set-cookie-parser": "2.6.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@akinon/eslint-plugin-projectzero": "1.113.0-rc.
|
|
38
|
+
"@akinon/eslint-plugin-projectzero": "1.113.0-rc.19",
|
|
39
39
|
"@babel/core": "7.26.10",
|
|
40
40
|
"@babel/preset-env": "7.26.9",
|
|
41
41
|
"@babel/preset-typescript": "7.27.0",
|