@kadirgun/lucid-bravo 0.2.2 → 0.2.4

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/build/index.js CHANGED
@@ -212,8 +212,9 @@ var LucidBravo = class {
212
212
  const includes = [];
213
213
  if (Array.isArray(this.$params.include)) includes.push(...this.$params.include);
214
214
  else if (typeof this.$params.include === "string") includes.push(this.$params.include);
215
+ const camelCasedIncludes = includes.map((relation) => stringHelpers.camelCase(relation));
215
216
  const allowed = this.getAllowedIncludes();
216
- for (const relation of includes) {
217
+ for (const relation of camelCasedIncludes) {
217
218
  if (!allowed.includes(relation)) continue;
218
219
  this.$query.preload(relation);
219
220
  }
@@ -12,7 +12,7 @@ export interface BravoParams {
12
12
  field?: string;
13
13
  order?: SortOrder;
14
14
  };
15
- include?: string[];
15
+ include?: string | string[];
16
16
  dimensions?: string | string[];
17
17
  metrics?: string | string[];
18
18
  [key: string]: any;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@kadirgun/lucid-bravo",
3
3
  "description": "A powerful, fluent query builder for AdonisJS Lucid to handle filtering, sorting and pagination in a single flow",
4
4
  "homepage": "https://github.com/kadirgun/lucid-bravo",
5
- "version": "0.2.2",
5
+ "version": "0.2.4",
6
6
  "engines": {
7
7
  "node": ">=24.0.0"
8
8
  },