logixlysia 2.2.2 → 2.2.3

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,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.3](https://github.com/PunGrumpy/logixlysia/compare/v2.2.2...v2.2.3) (2024-04-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **error-log:** add global to `onError` ([e217baa](https://github.com/PunGrumpy/logixlysia/commit/e217baad9f72fa3e866f959f371768ed2ed22e33))
9
+ * **ts2488:** that method return an iterator ([35da93f](https://github.com/PunGrumpy/logixlysia/commit/35da93f75e34ff212ddd31ff951425551f31c764))
10
+
3
11
  ## [2.2.2](https://github.com/PunGrumpy/logixlysia/compare/v2.2.1...v2.2.2) (2024-04-06)
4
12
 
5
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logixlysia",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "🦊 Logixlysia is a logger for Elysia",
5
5
  "type": "module",
6
6
  "module": "src/index.ts",
package/src/index.ts CHANGED
@@ -50,7 +50,7 @@ export const logger = (options?: Options): Elysia => {
50
50
  store as { beforeTime: bigint }
51
51
  )
52
52
  })
53
- .onError(({ request, error, store }) => {
53
+ .onError({ as: 'global' }, ({ request, error, store }) => {
54
54
  log.log('ERROR', request, error, store as { beforeTime: bigint })
55
55
  })
56
56
 
@@ -28,7 +28,9 @@ describe('Start String', () => {
28
28
  const expectedMessage = `🦊 Elysia is running at http://localhost:3000`
29
29
 
30
30
  // Extract the arguments passed to console.log during the function call
31
- const [[logMessage]] = mockConsoleLog.mock.calls
31
+ const logMessage = mockConsoleLog.mock.calls
32
+ .map((args: any[]) => args.join(' '))
33
+ .join(' ')
32
34
 
33
35
  expect(logMessage).toMatch(expectedMessage)
34
36
  })