@mrxsys/mrx-core 2.12.0-1-and-288-20251203 → 2.12.0-2-and-288-20251203

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 ADDED
File without changes
@@ -102,7 +102,8 @@ class Repository {
102
102
  }
103
103
  async count(options) {
104
104
  const query = this._knex(this._table.name).count({ count: "*" });
105
- this._applyFilter(query, options?.filters);
105
+ if (options?.filters)
106
+ this._applyFilter(query, options?.filters);
106
107
  if (options?.transaction)
107
108
  query.transacting(options.transaction);
108
109
  return this._executeQuery(query, options?.throwIfNoResult).then((result) => result[0].count);
@@ -161,9 +162,9 @@ class Repository {
161
162
  }
162
163
  }
163
164
  };
164
- if (search && Array.isArray(search))
165
+ if (Array.isArray(search))
165
166
  search.reduce((acc, item) => acc.orWhere((q) => this._applyFilter(q, item)), query);
166
- else if (search)
167
+ else
167
168
  processing(query, search);
168
169
  }
169
170
  _applyOrderBy(query, orderBy) {
@@ -180,7 +181,8 @@ class Repository {
180
181
  query.orderBy(`[${this._table.name}].${orderBy.selectedField}`, orderBy.direction);
181
182
  }
182
183
  _applyQueryOptions(query, options) {
183
- this._applyFilter(query, options?.filters);
184
+ if (options?.filters)
185
+ this._applyFilter(query, options.filters);
184
186
  this._applyOrderBy(query, options?.orderBy);
185
187
  this._applySelectedFields(query, options?.selectedFields);
186
188
  if (options?.transaction)
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  Repository
4
- } from "./chunk-s53cbgkb.js";
4
+ } from "./chunk-47yta3gd.js";
5
5
  import {
6
6
  TypedEventEmitter
7
7
  } from "./chunk-mvrxngm7.js";
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  MSSQL,
4
4
  Table
5
- } from "../../chunk-kne89z1w.js";
6
- import"../../chunk-s53cbgkb.js";
5
+ } from "../../chunk-hnds0krm.js";
6
+ import"../../chunk-47yta3gd.js";
7
7
  import"../../chunk-grfyngq0.js";
8
8
  import"../../chunk-mvrxngm7.js";
9
9
  import"../../chunk-zv4ta4fb.js";
@@ -8,8 +8,8 @@ import {
8
8
  } from "../../../chunk-ayyrgqyv.js";
9
9
  import {
10
10
  MSSQL
11
- } from "../../../chunk-kne89z1w.js";
12
- import"../../../chunk-s53cbgkb.js";
11
+ } from "../../../chunk-hnds0krm.js";
12
+ import"../../../chunk-47yta3gd.js";
13
13
  import"../../../chunk-grfyngq0.js";
14
14
  import"../../../chunk-mvrxngm7.js";
15
15
  import"../../../chunk-zv4ta4fb.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  Repository
4
- } from "../../chunk-s53cbgkb.js";
4
+ } from "../../chunk-47yta3gd.js";
5
5
  import"../../chunk-grfyngq0.js";
6
6
  import"../../chunk-zv4ta4fb.js";
7
7
  import"../../chunk-sqts8vyk.js";
@@ -363,7 +363,7 @@ export declare class Repository<TModel = Record<string, unknown>> {
363
363
  * @param query - The Knex.js query builder to apply the search criteria to.
364
364
  * @param search - The advanced search criteria to apply. Can be a single object or an array of objects.
365
365
  */
366
- protected _applyFilter<KModel>(query: Knex.QueryBuilder, search: Filter<KModel> | Filter<KModel>[] | undefined): void;
366
+ protected _applyFilter<KModel>(query: Knex.QueryBuilder, search: Filter<KModel> | Filter<KModel>[]): void;
367
367
  /**
368
368
  * Applies order by criteria to a Knex.js query builder. This method supports both single and multiple order by items.
369
369
  * It is used to specify the sorting order of the query results.
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "@mrxsys/mrx-core",
3
- "version": "2.12.0-1-and-288-20251203",
3
+ "version": "2.12.0-2-and-288-20251203",
4
4
  "author": "Ruby",
5
5
  "devDependencies": {
6
6
  "@eslint/js": "^9.39.1",
7
7
  "@sinclair/typebox": "0.34.41",
8
8
  "@stylistic/eslint-plugin": "^5.6.1",
9
- "@types/bun": "^1.3.3",
9
+ "@types/bun": "^1.3.4",
10
10
  "@types/nodemailer": "^7.0.4",
11
- "elysia": "1.4.17",
11
+ "elysia": "1.4.18",
12
12
  "eslint": "^9.39.1",
13
13
  "globals": "^16.5.0",
14
14
  "ioredis": "^5.8.2",
15
- "jose": "^6.1.2",
15
+ "jose": "^6.1.3",
16
16
  "knex": "^3.1.0",
17
- "mssql": "^12.1.1",
17
+ "mssql": "^12.2.0",
18
18
  "nodemailer": "^7.0.11",
19
- "typescript-eslint": "^8.48.1"
19
+ "typescript-eslint": "^8.49.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@sinclair/typebox": "0.34.41",
23
- "elysia": "^1.4.17",
23
+ "elysia": "^1.4.18",
24
24
  "ioredis": "^5.8.2",
25
- "jose": "^6.1.2",
26
- "mssql": "^12.1.1",
25
+ "jose": "^6.1.3",
26
+ "mssql": "^12.2.0",
27
27
  "knex": "^3.1.0",
28
28
  "nodemailer": "^7.0.11",
29
29
  "typescript": "^5.9.3"