@flowerforce/flowerbase 1.0.3-beta.8 → 1.1.1-beta.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/CHANGELOG.md CHANGED
@@ -1,3 +1,85 @@
1
+ ## 1.1.0 (2025-09-12)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - add demo ([c189d22](https://github.com/flowerforce/flowerbase/commit/c189d22))
7
+
8
+ - add destroy session ([f319319](https://github.com/flowerforce/flowerbase/commit/f319319))
9
+
10
+ - add release pipeline ([a7bb80a](https://github.com/flowerforce/flowerbase/commit/a7bb80a))
11
+
12
+ - add auto trigger on_user_creation_function_name from auth config ([b1c538d](https://github.com/flowerforce/flowerbase/commit/b1c538d))
13
+
14
+ - add swagger ui ([73ae560](https://github.com/flowerforce/flowerbase/commit/73ae560))
15
+
16
+ - add prefilter in aggregate method ([cdcb5a6](https://github.com/flowerforce/flowerbase/commit/cdcb5a6))
17
+
18
+ - add filter match on aggregate ([63d45ad](https://github.com/flowerforce/flowerbase/commit/63d45ad))
19
+
20
+ - update flowerbase package ([bffe6d5](https://github.com/flowerforce/flowerbase/commit/bffe6d5))
21
+
22
+ - add S3 config from envs ([dd88dee](https://github.com/flowerforce/flowerbase/commit/dd88dee))
23
+
24
+ - add pipeline on aggregate controller ([b15490d](https://github.com/flowerforce/flowerbase/commit/b15490d))
25
+
26
+ - add custom run as a system ([b5eb2b9](https://github.com/flowerforce/flowerbase/commit/b5eb2b9))
27
+
28
+ - add handleUserRegistration and create new auth method inside services ([6a963bf](https://github.com/flowerforce/flowerbase/commit/6a963bf))
29
+
30
+ - add FunctionsQueue to handle sequential function calls ([e2ac00e](https://github.com/flowerforce/flowerbase/commit/e2ac00e))
31
+
32
+ - adding body to POST http endpoint ([c016cd1](https://github.com/flowerforce/flowerbase/commit/c016cd1))
33
+
34
+ - add custom function provider ([f4d4ee4](https://github.com/flowerforce/flowerbase/commit/f4d4ee4))
35
+
36
+ - add block for aggregate from client ([d38af75](https://github.com/flowerforce/flowerbase/commit/d38af75))
37
+
38
+ - add handleuserregistration for custom function provider ([308c538](https://github.com/flowerforce/flowerbase/commit/308c538))
39
+
40
+ - add raw body ([94754cc](https://github.com/flowerforce/flowerbase/commit/94754cc))
41
+
42
+
43
+ ### 🩹 Fixes
44
+
45
+ - initial slash endpoints ([ca5ad27](https://github.com/flowerforce/flowerbase/commit/ca5ad27))
46
+
47
+ - fixed user object in on_user_creation_function_name ([031e1a5](https://github.com/flowerforce/flowerbase/commit/031e1a5))
48
+
49
+ - find http and https folder endpoints ([9d0cfbf](https://github.com/flowerforce/flowerbase/commit/9d0cfbf))
50
+
51
+ - remove only first slash ([80172ff](https://github.com/flowerforce/flowerbase/commit/80172ff))
52
+
53
+ - mongodb methods ([288e50d](https://github.com/flowerforce/flowerbase/commit/288e50d))
54
+
55
+ - trigger on user create ([4525fa1](https://github.com/flowerforce/flowerbase/commit/4525fa1))
56
+
57
+ - login user ([9e0bf35](https://github.com/flowerforce/flowerbase/commit/9e0bf35))
58
+
59
+ - on_user_creation_function_name ([45b1e59](https://github.com/flowerforce/flowerbase/commit/45b1e59))
60
+
61
+ - watch user create ([55cbc6b](https://github.com/flowerforce/flowerbase/commit/55cbc6b))
62
+
63
+ - WIP expandQuery ([09a0dca](https://github.com/flowerforce/flowerbase/commit/09a0dca))
64
+
65
+ - Add checks for possible undefined variables to ensure safe operations ([9fab6f2](https://github.com/flowerforce/flowerbase/commit/9fab6f2))
66
+
67
+ - **evaluateComplexExpression:** add rules from StateManager ([4fe7268](https://github.com/flowerforce/flowerbase/commit/4fe7268))
68
+
69
+ - **jwtAuthentication:** ensure correct _id handling in user_data ([5c9d2ff](https://github.com/flowerforce/flowerbase/commit/5c9d2ff))
70
+
71
+ - **triggerHandlers:** add rules from stateManager and removed clusterTime from change obj to avoid BSON error ([994dab0](https://github.com/flowerforce/flowerbase/commit/994dab0))
72
+
73
+ - **getValidRule:** add '%%true': true in checkRule context to satisfy record condition ([e29ebaf](https://github.com/flowerforce/flowerbase/commit/e29ebaf))
74
+
75
+ - **localUserPassController:** fix user login add userWithCustomData ([98732a1](https://github.com/flowerforce/flowerbase/commit/98732a1))
76
+
77
+ - **getOperators:** ensure the corret value for the $match key to resolve error: "the match filter must be an expression in an object" ([097e666](https://github.com/flowerforce/flowerbase/commit/097e666))
78
+
79
+ - **getFormattedQuery:** exclude empty object from getFormattedQuery ([a35eab7](https://github.com/flowerforce/flowerbase/commit/a35eab7))
80
+
81
+ - **localUserPassController:** renamed storedUser to authUser ([3f6f040](https://github.com/flowerforce/flowerbase/commit/3f6f040))
82
+
1
83
  ## 1.0.2 (2025-06-30)
2
84
 
3
85
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/mongodb-atlas/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyC,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAkpBrF,QAAA,MAAM,YAAY,EAAE,oBAmBlB,CAAA;AAEF,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/mongodb-atlas/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAyC,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAmpBrF,QAAA,MAAM,YAAY,EAAE,oBAmBlB,CAAA;AAEF,eAAe,YAAY,CAAA"}
@@ -235,8 +235,9 @@ const getOperators = (collection, { rules = {}, collName, user, run_as_system })
235
235
  const { filters, roles } = rules[collName] || {};
236
236
  // Pre-query filtering based on access control rules
237
237
  const formattedQuery = (0, utils_2.getFormattedQuery)(filters, query, user);
238
+ const currentQuery = formattedQuery.length ? { $and: formattedQuery } : {};
238
239
  // aggiunto filter per evitare questo errore: $and argument's entries must be objects
239
- const originalCursor = collection.find({ $and: formattedQuery });
240
+ const originalCursor = collection.find(currentQuery);
240
241
  // Clone the cursor to override `toArray` with post-query validation
241
242
  const client = originalCursor['client'];
242
243
  const newCursor = new mongodb_1.FindCursor(client);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowerforce/flowerbase",
3
- "version": "1.0.3-beta.8",
3
+ "version": "1.1.1-beta.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -270,8 +270,9 @@ const getOperators: GetOperatorsFunction = (
270
270
 
271
271
  // Pre-query filtering based on access control rules
272
272
  const formattedQuery = getFormattedQuery(filters, query, user)
273
+ const currentQuery = formattedQuery.length ? { $and: formattedQuery } : {}
273
274
  // aggiunto filter per evitare questo errore: $and argument's entries must be objects
274
- const originalCursor = collection.find({ $and: formattedQuery })
275
+ const originalCursor = collection.find(currentQuery)
275
276
  // Clone the cursor to override `toArray` with post-query validation
276
277
  const client = originalCursor[
277
278
  'client' as keyof typeof originalCursor