@lensjs/fastify 1.0.3 → 1.1.1

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/dist/adapter.cjs CHANGED
@@ -185,7 +185,7 @@ var FastifyAdapter = class extends import_core.LensAdapter {
185
185
  },
186
186
  user: await this.config.isAuthenticated?.(request) ? await this.config.getUser?.(request) : null
187
187
  };
188
- await requestWatcher.log(logPayload);
188
+ await requestWatcher.log(logPayload, this.config.hiddenParams);
189
189
  } catch (err) {
190
190
  console.error("Error finalizing request log:", err);
191
191
  }
package/dist/adapter.js CHANGED
@@ -157,7 +157,7 @@ var FastifyAdapter = class extends LensAdapter {
157
157
  },
158
158
  user: await this.config.isAuthenticated?.(request) ? await this.config.getUser?.(request) : null
159
159
  };
160
- await requestWatcher.log(logPayload);
160
+ await requestWatcher.log(logPayload, this.config.hiddenParams);
161
161
  } catch (err) {
162
162
  console.error("Error finalizing request log:", err);
163
163
  }
package/dist/index.cjs CHANGED
@@ -189,7 +189,7 @@ var FastifyAdapter = class extends import_core.LensAdapter {
189
189
  },
190
190
  user: await this.config.isAuthenticated?.(request) ? await this.config.getUser?.(request) : null
191
191
  };
192
- await requestWatcher.log(logPayload);
192
+ await requestWatcher.log(logPayload, this.config.hiddenParams);
193
193
  } catch (err) {
194
194
  console.error("Error finalizing request log:", err);
195
195
  }
@@ -296,7 +296,7 @@ var lens = async (config) => {
296
296
  await import_core2.Lens.setAdapter(adapter).setWatchers(watchers).start({
297
297
  appName: mergedConfig.appName,
298
298
  enabled: mergedConfig.enabled,
299
- basePath: normalizedPath
299
+ path: normalizedPath
300
300
  });
301
301
  const exceptionWatcher = watchers.find(
302
302
  (w) => w.name === import_core3.WatcherTypeEnum.EXCEPTION
package/dist/index.js CHANGED
@@ -168,7 +168,7 @@ var FastifyAdapter = class extends LensAdapter {
168
168
  },
169
169
  user: await this.config.isAuthenticated?.(request) ? await this.config.getUser?.(request) : null
170
170
  };
171
- await requestWatcher.log(logPayload);
171
+ await requestWatcher.log(logPayload, this.config.hiddenParams);
172
172
  } catch (err) {
173
173
  console.error("Error finalizing request log:", err);
174
174
  }
@@ -275,7 +275,7 @@ var lens = async (config) => {
275
275
  await Lens.setAdapter(adapter).setWatchers(watchers).start({
276
276
  appName: mergedConfig.appName,
277
277
  enabled: mergedConfig.enabled,
278
- basePath: normalizedPath
278
+ path: normalizedPath
279
279
  });
280
280
  const exceptionWatcher = watchers.find(
281
281
  (w) => w.name === WatcherTypeEnum2.EXCEPTION
package/dist/types.d.cts CHANGED
@@ -1,13 +1,10 @@
1
1
  import { FastifyInstance, FastifyRequest } from 'fastify';
2
2
  import { QueryWatcherHandler } from '@lensjs/watchers';
3
- import { UserEntry } from '@lensjs/core';
3
+ import { UserEntry, LensConfig } from '@lensjs/core';
4
4
  import { SendOptions } from '@fastify/static';
5
5
 
6
6
  type FastifyAdapterConfig = {
7
7
  app: FastifyInstance;
8
- appName?: string;
9
- enabled?: boolean;
10
- path?: string;
11
8
  ignoredPaths?: RegExp[];
12
9
  onlyPaths?: RegExp[];
13
10
  requestWatcherEnabled?: boolean;
@@ -20,7 +17,7 @@ type FastifyAdapterConfig = {
20
17
  };
21
18
  isAuthenticated?: (request: FastifyRequest) => Promise<boolean>;
22
19
  getUser?: (request: FastifyRequest) => Promise<UserEntry>;
23
- };
20
+ } & Partial<LensConfig>;
24
21
  type RequiredFastifyAdapterConfig = Required<FastifyAdapterConfig> & {
25
22
  queryWatcher?: FastifyAdapterConfig["queryWatcher"];
26
23
  isAuthenticated?: FastifyAdapterConfig["isAuthenticated"];
package/dist/types.d.ts CHANGED
@@ -1,13 +1,10 @@
1
1
  import { FastifyInstance, FastifyRequest } from 'fastify';
2
2
  import { QueryWatcherHandler } from '@lensjs/watchers';
3
- import { UserEntry } from '@lensjs/core';
3
+ import { UserEntry, LensConfig } from '@lensjs/core';
4
4
  import { SendOptions } from '@fastify/static';
5
5
 
6
6
  type FastifyAdapterConfig = {
7
7
  app: FastifyInstance;
8
- appName?: string;
9
- enabled?: boolean;
10
- path?: string;
11
8
  ignoredPaths?: RegExp[];
12
9
  onlyPaths?: RegExp[];
13
10
  requestWatcherEnabled?: boolean;
@@ -20,7 +17,7 @@ type FastifyAdapterConfig = {
20
17
  };
21
18
  isAuthenticated?: (request: FastifyRequest) => Promise<boolean>;
22
19
  getUser?: (request: FastifyRequest) => Promise<UserEntry>;
23
- };
20
+ } & Partial<LensConfig>;
24
21
  type RequiredFastifyAdapterConfig = Required<FastifyAdapterConfig> & {
25
22
  queryWatcher?: FastifyAdapterConfig["queryWatcher"];
26
23
  isAuthenticated?: FastifyAdapterConfig["isAuthenticated"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lensjs/fastify",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Fastify adapter for LensJs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,10 +19,10 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@fastify/static": "8.2.0",
22
- "@lensjs/date": "1.0.12",
23
- "@lensjs/core": "2.2.2",
22
+ "@lensjs/core": "2.3.1",
24
23
  "@lensjs/typescript-config": "1.0.12",
25
- "@lensjs/watchers": "1.0.18"
24
+ "@lensjs/date": "1.0.12",
25
+ "@lensjs/watchers": "1.1.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "fastify": "^5.6.0",