@mastra/loggers 0.0.1-alpha.14 → 0.0.1-alpha.16
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 +18 -0
- package/README.md +1 -1
- package/dist/file/index.d.ts +1 -1
- package/dist/file/index.js +1 -1
- package/dist/upstash/index.d.ts +1 -1
- package/dist/upstash/index.js +1 -1
- package/package.json +2 -2
- package/src/file/index.test.ts +2 -2
- package/src/file/index.ts +1 -1
- package/src/upstash/index.test.ts +2 -2
- package/src/upstash/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/loggers
|
|
2
2
|
|
|
3
|
+
## 0.0.1-alpha.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9625602: Use mastra core splitted bundles in other packages
|
|
8
|
+
- Updated dependencies [30322ce]
|
|
9
|
+
- Updated dependencies [78eec7c]
|
|
10
|
+
- Updated dependencies [9625602]
|
|
11
|
+
- Updated dependencies [8769a62]
|
|
12
|
+
- @mastra/core@0.2.0-alpha.83
|
|
13
|
+
|
|
14
|
+
## 0.0.1-alpha.15
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [73d112c]
|
|
19
|
+
- @mastra/core@0.1.27-alpha.82
|
|
20
|
+
|
|
3
21
|
## 0.0.1-alpha.14
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -81,7 +81,7 @@ Optional:
|
|
|
81
81
|
Both transports implement the `LoggerTransport` interface from `@mastra/core`:
|
|
82
82
|
|
|
83
83
|
```typescript
|
|
84
|
-
import { Logger } from '@mastra/core';
|
|
84
|
+
import { Logger } from '@mastra/core/logger';
|
|
85
85
|
import { FileTransport, UpstashTransport } from '@mastra/loggers';
|
|
86
86
|
|
|
87
87
|
// Create transports
|
package/dist/file/index.d.ts
CHANGED
package/dist/file/index.js
CHANGED
package/dist/upstash/index.d.ts
CHANGED
package/dist/upstash/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/loggers",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "ISC",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@mastra/core": "0.
|
|
33
|
+
"@mastra/core": "0.2.0-alpha.83"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/preset-env": "^7.26.0",
|
package/src/file/index.test.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLogger, LogLevel } from '@mastra/core';
|
|
1
|
+
import { createLogger, LogLevel } from '@mastra/core/logger';
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { describe, it, expect, beforeEach, afterEach, vi, afterAll } from 'vitest';
|
|
@@ -72,7 +72,7 @@ describe('FileTransport', () => {
|
|
|
72
72
|
it('should properly clean up resources on destroy', () => {
|
|
73
73
|
const destroySpy = vi.spyOn(fileLogger.fileStream, 'destroy');
|
|
74
74
|
|
|
75
|
-
fileLogger._destroy(
|
|
75
|
+
fileLogger._destroy(new Error('test'), () => {
|
|
76
76
|
expect(destroySpy).toHaveBeenCalled();
|
|
77
77
|
});
|
|
78
78
|
});
|
package/src/file/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoggerTransport, BaseLogMessage } from '@mastra/core';
|
|
1
|
+
import { LoggerTransport, BaseLogMessage } from '@mastra/core/logger';
|
|
2
2
|
import { createWriteStream, existsSync, readFileSync, WriteStream } from 'fs';
|
|
3
3
|
|
|
4
4
|
export class FileTransport extends LoggerTransport {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createLogger, LogLevel } from '@mastra/core';
|
|
1
|
+
import { createLogger, LogLevel } from '@mastra/core/logger';
|
|
2
2
|
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
3
3
|
|
|
4
4
|
import { UpstashTransport } from './index.js';
|
|
@@ -95,7 +95,7 @@ describe('UpstashTransport', () => {
|
|
|
95
95
|
const clearIntervalSpy = vi.spyOn(global, 'clearInterval');
|
|
96
96
|
const flushSpy = vi.spyOn(transport, '_flush').mockImplementation(() => Promise.resolve());
|
|
97
97
|
|
|
98
|
-
transport._destroy(
|
|
98
|
+
transport._destroy(new Error('test'), () => {
|
|
99
99
|
expect(clearIntervalSpy).toHaveBeenCalled();
|
|
100
100
|
if (transport.logBuffer.length > 0) {
|
|
101
101
|
expect(flushSpy).toHaveBeenCalled();
|
package/src/upstash/index.ts
CHANGED