@flowerforce/flowerbase 1.8.4-beta.9 → 1.9.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,27 @@
1
+ ## 1.9.0 (2026-05-06)
2
+
3
+
4
+ ### 🚀 Features
5
+
6
+ - implement async role evaluation and add apply_when function rules ([#58](https://github.com/flowerforce/flowerbase/pull/58))
7
+
8
+ - add timeout configuration options to Fastify initialization ([f73a0e2](https://github.com/flowerforce/flowerbase/commit/f73a0e2))
9
+
10
+ - add distinct and bulkWrite methods to MongoDB service ([#64](https://github.com/flowerforce/flowerbase/pull/64))
11
+
12
+
13
+ ### 🩹 Fixes
14
+
15
+ - normalize trigger payloads in authentication and database handlers ([#56](https://github.com/flowerforce/flowerbase/pull/56))
16
+
17
+ - local import inside functions ([#60](https://github.com/flowerforce/flowerbase/pull/60))
18
+
19
+ - mongodb query projections ([#61](https://github.com/flowerforce/flowerbase/pull/61))
20
+
21
+ - update request handling in context and controller functions ([#65](https://github.com/flowerforce/flowerbase/pull/65))
22
+
23
+ - resend mail ([#66](https://github.com/flowerforce/flowerbase/pull/66))
24
+
1
25
  ## 1.8.3 (2026-04-02)
2
26
 
3
27
 
@@ -24,7 +24,6 @@ export declare const generateContextData: ({ user, services, app, rules, current
24
24
  deserialize: (ejson: mongodb.BSON.Document, options?: mongodb.BSON.EJSONOptions) => any;
25
25
  };
26
26
  Buffer: BufferConstructor;
27
- fetch: typeof fetch;
28
27
  utils: {
29
28
  jwt: JwtUtils;
30
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/utils/context/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAsGT,CAAC;6BAAa,CAAC;;;;;;;;;;;;;;;;;;kCAtGP,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAsGT,CAAC;6BAAa,CAAC;;;;;;;;;;;;;;;4BAyFF,MAAM,OAAO,aAAa,WAAW,SAAS;;;CAkBrE,CAAA"}
@@ -150,7 +150,6 @@ const generateContextData = ({ user, services, app, rules, currentFunction, func
150
150
  BSON,
151
151
  EJSON: bson_1.EJSON,
152
152
  Buffer,
153
- fetch,
154
153
  utils,
155
154
  console: {
156
155
  log: (...args) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowerforce/flowerbase",
3
- "version": "1.8.4-beta.9",
3
+ "version": "1.9.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -157,25 +157,4 @@ describe('context.functions.execute compatibility', () => {
157
157
  expect(result).toEqual({ address: 'rome', total: 10 })
158
158
  fs.rmSync(tempDir, { recursive: true, force: true })
159
159
  })
160
-
161
- it('exposes native fetch in the sandbox global scope', () => {
162
- const functionsList = {
163
- caller: {
164
- code: 'module.exports = function() { return fetch === globalThis.fetch && typeof fetch === "function" }'
165
- }
166
- } as Functions
167
-
168
- const result = GenerateContextSync({
169
- args: [],
170
- app: {} as any,
171
- rules: {} as any,
172
- user: {} as any,
173
- currentFunction: functionsList.caller,
174
- functionsList,
175
- services: mockServices,
176
- functionName: 'caller'
177
- })
178
-
179
- expect(result).toBe(true)
180
- })
181
160
  })
@@ -47,7 +47,7 @@ describe('generateContextData', () => {
47
47
 
48
48
  it('should return an object with context configuration', async () => {
49
49
  const mockApp = Fastify()
50
- const { context, console: contextConsole, BSON, fetch } = generateContextData({
50
+ const { context, console: contextConsole, BSON } = generateContextData({
51
51
  services,
52
52
  app: mockApp,
53
53
  functionsList: mockFunctions,
@@ -66,8 +66,6 @@ describe('generateContextData', () => {
66
66
 
67
67
  expect(context.user).toEqual(mockUser)
68
68
 
69
- expect(fetch).toBe(global.fetch)
70
-
71
69
  const mockedLog = jest.spyOn(console, 'log').mockImplementation(() => { })
72
70
  contextConsole.log('Test', 'generateContextData')
73
71
  expect(mockedLog).toHaveBeenCalledWith('Test', 'generateContextData')
@@ -176,7 +176,6 @@ export const generateContextData = ({
176
176
  BSON,
177
177
  EJSON,
178
178
  Buffer,
179
- fetch,
180
179
  utils,
181
180
  console: {
182
181
  log: (...args: Arguments) => {