fiberx-backend-toolkit 0.0.53 → 0.0.55

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.
@@ -14,7 +14,7 @@ const main_1 = require("../utils/main");
14
14
  class CorsMiddleWare {
15
15
  name = "cors_middle_ware";
16
16
  logger = new main_1.LoggerUtil(this.name);
17
- origin_cache = new main_1.InMemoryCache();
17
+ origin_cache = new main_1.InMemoryCacheUtil();
18
18
  origins;
19
19
  methods;
20
20
  headers;
@@ -24,7 +24,7 @@ class RateLimiterMiddleWare {
24
24
  this.max_requests = options?.max_requests ?? constants_1.REQUEST_RATE_LIMITTER_OPTIONS.max_requests;
25
25
  this.message = options.message ?? constants_1.REQUEST_RATE_LIMITTER_OPTIONS.message;
26
26
  this.key_generator = options?.key_generator || this.generateRequestIdentitfier;
27
- this.cache = new main_1.InMemoryCache();
27
+ this.cache = new main_1.InMemoryCacheUtil();
28
28
  this.logger = new main_1.LoggerUtil(this.name);
29
29
  main_1.SafeExecuteUtil.setNamedInstance(this.name, this);
30
30
  }
@@ -1,4 +1,4 @@
1
- import { DataType } from "sequelize";
1
+ import { DataType, WhereOptions } from "sequelize";
2
2
  export interface SchemaColumnInterface {
3
3
  type: DataType;
4
4
  allowNull?: boolean;
@@ -34,6 +34,7 @@ export interface IndexFieldOptionsInterface {
34
34
  operator?: string;
35
35
  unique?: boolean;
36
36
  comment?: string;
37
+ where?: WhereOptions;
37
38
  }
38
39
  export interface SchemaDefinitionInterface {
39
40
  connection_name: string;
@@ -1,4 +1,4 @@
1
- declare class InMemoryCache<T = unknown> {
1
+ declare class InMemoryCacheUtil<T = unknown> {
2
2
  private store;
3
3
  /**
4
4
  * Set a cache value with TTL (ms)
@@ -37,4 +37,4 @@ declare class InMemoryCache<T = unknown> {
37
37
  */
38
38
  size(): number;
39
39
  }
40
- export default InMemoryCache;
40
+ export default InMemoryCacheUtil;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- class InMemoryCache {
3
+ class InMemoryCacheUtil {
4
4
  store = new Map();
5
5
  /**
6
6
  * Set a cache value with TTL (ms)
@@ -80,4 +80,4 @@ class InMemoryCache {
80
80
  return this.store.size;
81
81
  }
82
82
  }
83
- exports.default = InMemoryCache;
83
+ exports.default = InMemoryCacheUtil;
@@ -5,8 +5,8 @@ import EnvManagerUtil from "./env_manager_util";
5
5
  import SqlFormatterUtil from "./sql_formatter_util";
6
6
  import ServerUtil from "./server_util";
7
7
  import SafeExecuteUtil from "./safe_execute_util";
8
- import InMemoryCache from "./cache_util";
8
+ import InMemoryCacheUtil from "./cache_util";
9
9
  import UUIDGeneratorUtil from "./uuid_gen_util";
10
10
  import EncryptorDecryptorUtil from "./encryptor_decryptor_util";
11
11
  import TOTPServiceUtil from "./totp_service_util";
12
- export { LoggerUtil, InputTransformerUtil, InputValidatorUtil, EnvManagerUtil, SqlFormatterUtil, ServerUtil, SafeExecuteUtil, InMemoryCache, UUIDGeneratorUtil, EncryptorDecryptorUtil, TOTPServiceUtil };
12
+ export { LoggerUtil, InputTransformerUtil, InputValidatorUtil, EnvManagerUtil, SqlFormatterUtil, ServerUtil, SafeExecuteUtil, InMemoryCacheUtil, UUIDGeneratorUtil, EncryptorDecryptorUtil, TOTPServiceUtil };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TOTPServiceUtil = exports.EncryptorDecryptorUtil = exports.UUIDGeneratorUtil = exports.InMemoryCache = exports.SafeExecuteUtil = exports.ServerUtil = exports.SqlFormatterUtil = exports.EnvManagerUtil = exports.InputValidatorUtil = exports.InputTransformerUtil = exports.LoggerUtil = void 0;
6
+ exports.TOTPServiceUtil = exports.EncryptorDecryptorUtil = exports.UUIDGeneratorUtil = exports.InMemoryCacheUtil = exports.SafeExecuteUtil = exports.ServerUtil = exports.SqlFormatterUtil = exports.EnvManagerUtil = exports.InputValidatorUtil = exports.InputTransformerUtil = exports.LoggerUtil = void 0;
7
7
  const logger_util_1 = __importDefault(require("./logger_util"));
8
8
  exports.LoggerUtil = logger_util_1.default;
9
9
  const input_transformer_util_1 = __importDefault(require("./input_transformer_util"));
@@ -19,7 +19,7 @@ exports.ServerUtil = server_util_1.default;
19
19
  const safe_execute_util_1 = __importDefault(require("./safe_execute_util"));
20
20
  exports.SafeExecuteUtil = safe_execute_util_1.default;
21
21
  const cache_util_1 = __importDefault(require("./cache_util"));
22
- exports.InMemoryCache = cache_util_1.default;
22
+ exports.InMemoryCacheUtil = cache_util_1.default;
23
23
  const uuid_gen_util_1 = __importDefault(require("./uuid_gen_util"));
24
24
  exports.UUIDGeneratorUtil = uuid_gen_util_1.default;
25
25
  const encryptor_decryptor_util_1 = __importDefault(require("./encryptor_decryptor_util"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fiberx-backend-toolkit",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "description": "A TypeScript backend toolkit providing shared domain logic, infrastructure helpers, and utilities for FiberX server-side applications and services.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",