@naman_deep_singh/cache 1.4.0 → 1.5.0
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/README.md +1 -1
- package/dist/cjs/errors/CacheError.d.ts +1 -1
- package/dist/cjs/errors/CacheError.js +2 -2
- package/dist/cjs/errors/index.js +2 -2
- package/dist/esm/errors/CacheError.d.ts +1 -1
- package/dist/esm/errors/CacheError.js +1 -1
- package/dist/esm/errors/index.js +1 -1
- package/dist/types/errors/CacheError.d.ts +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @naman_deep_singh/cache
|
|
2
2
|
|
|
3
|
-
**Version:** 1.
|
|
3
|
+
**Version:** 1.5.0 (with Redis Clustering support)
|
|
4
4
|
|
|
5
5
|
A flexible, extensible caching layer with support for Redis, Memcache, and in-memory caches. Includes session management, health checks, and Express middleware.
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CacheError = void 0;
|
|
4
|
-
const
|
|
5
|
-
class CacheError extends
|
|
4
|
+
const errors_1 = require("@naman_deep_singh/errors");
|
|
5
|
+
class CacheError extends errors_1.AppError {
|
|
6
6
|
constructor(code, options) {
|
|
7
7
|
super(code, undefined, options?.details, options?.cause);
|
|
8
8
|
this.adapter = options?.adapter;
|
package/dist/cjs/errors/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CacheError = void 0;
|
|
4
|
-
const
|
|
4
|
+
const errors_1 = require("@naman_deep_singh/errors");
|
|
5
5
|
const cacheErrorCodes_1 = require("./cacheErrorCodes");
|
|
6
|
-
|
|
6
|
+
errors_1.errorMessageRegistry.register(cacheErrorCodes_1.CACHE_ERROR_CODES);
|
|
7
7
|
var CacheError_1 = require("./CacheError");
|
|
8
8
|
Object.defineProperty(exports, "CacheError", { enumerable: true, get: function () { return CacheError_1.CacheError; } });
|
package/dist/esm/errors/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { errorMessageRegistry } from '@naman_deep_singh/errors
|
|
1
|
+
import { errorMessageRegistry } from '@naman_deep_singh/errors';
|
|
2
2
|
import { CACHE_ERROR_CODES } from './cacheErrorCodes';
|
|
3
3
|
errorMessageRegistry.register(CACHE_ERROR_CODES);
|
|
4
4
|
export { CacheError } from './CacheError';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naman_deep_singh/cache",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Extensible caching layer supporting Redis, Memcache, and in-memory caches with automatic fallback, namespacing, session management, and Express middleware.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -37,11 +37,13 @@
|
|
|
37
37
|
"typescript": "^5.9.3"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@naman_deep_singh/errors
|
|
41
|
-
"@naman_deep_singh/response-utils": "^2.1.4",
|
|
40
|
+
"@naman_deep_singh/errors": "^2.1.0",
|
|
42
41
|
"memcached": "^2.2.2",
|
|
43
42
|
"redis": "^4.6.10"
|
|
44
43
|
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
45
47
|
"scripts": {
|
|
46
48
|
"build": "pnpm run build:types && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json",
|
|
47
49
|
"build:types": "tsc -p tsconfig.base.json --emitDeclarationOnly --outDir dist/types",
|