@mastra/deployer 0.1.0-alpha.40 → 0.1.0-alpha.42
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 +14 -0
- package/dist/build/analyze.js +1 -1
- package/dist/build/index.js +2 -2
- package/dist/bundler/index.js +2 -2
- package/dist/{chunk-UCIQKTCV.js → chunk-EDV35Q7R.js} +1 -1
- package/dist/{chunk-DJDTDBTZ.js → chunk-JG3X44WH.js} +1 -1
- package/dist/{chunk-VBYYHCDM.js → chunk-WXH2HMQ2.js} +16 -15
- package/dist/index.js +4 -4
- package/dist/server/index.js +4 -8
- package/package.json +2 -2
- package/src/build/analyze.ts +0 -2
- package/src/build/plugins/pino.ts +16 -14
- package/src/server/handlers/agents.ts +4 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.42
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 42a2e69: Fix playground error parsing
|
|
8
|
+
- Updated dependencies [5285356]
|
|
9
|
+
- @mastra/core@0.2.0-alpha.93
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.41
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 0b96376: fix pino of being null
|
|
16
|
+
|
|
3
17
|
## 0.1.0-alpha.40
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/build/analyze.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { analyzeBundle } from '../chunk-
|
|
1
|
+
export { analyzeBundle } from '../chunk-WXH2HMQ2.js';
|
|
2
2
|
import '../chunk-YNXJO2XU.js';
|
package/dist/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-
|
|
1
|
+
export { FileService, createWatcher, getBundler, getWatcher, getInputOptions as getWatcherInputOptions } from '../chunk-JG3X44WH.js';
|
|
2
2
|
export { Deps } from '../chunk-Q3WKR6OZ.js';
|
|
3
|
-
export { analyzeBundle } from '../chunk-
|
|
3
|
+
export { analyzeBundle } from '../chunk-WXH2HMQ2.js';
|
|
4
4
|
export { createBundler, getInputOptions as getBundlerInputOptions } from '../chunk-RCYKCEGL.js';
|
|
5
5
|
import '../chunk-YNXJO2XU.js';
|
package/dist/bundler/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Deps } from './chunk-Q3WKR6OZ.js';
|
|
2
|
-
import { analyzeBundle } from './chunk-
|
|
2
|
+
import { analyzeBundle } from './chunk-WXH2HMQ2.js';
|
|
3
3
|
import { createBundler, getInputOptions } from './chunk-RCYKCEGL.js';
|
|
4
4
|
import { MastraBundler } from '@mastra/core/bundler';
|
|
5
5
|
import virtual from '@rollup/plugin-virtual';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aliasHono } from './chunk-
|
|
1
|
+
import { aliasHono } from './chunk-WXH2HMQ2.js';
|
|
2
2
|
import { getInputOptions, telemetryFix, libSqlFix } from './chunk-RCYKCEGL.js';
|
|
3
3
|
import { removeDeployer } from './chunk-YNXJO2XU.js';
|
|
4
4
|
import alias from '@rollup/plugin-alias';
|
|
@@ -52,20 +52,22 @@ function pino() {
|
|
|
52
52
|
async resolveId(id, importee) {
|
|
53
53
|
if (id === "pino") {
|
|
54
54
|
const resolvedPino = await this.resolve(id, importee);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
if (resolvedPino) {
|
|
56
|
+
await Promise.all(
|
|
57
|
+
workerFiles.map(async (file) => {
|
|
58
|
+
const resolvedEntry = await this.resolve(file.id, resolvedPino.id);
|
|
59
|
+
if (!resolvedEntry) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const reference = this.emitFile({
|
|
63
|
+
type: "chunk",
|
|
64
|
+
id: resolvedEntry.id,
|
|
65
|
+
name: `${file.file}`
|
|
66
|
+
});
|
|
67
|
+
fileReferences.set(file.id, reference);
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
}
|
|
69
71
|
}
|
|
70
72
|
},
|
|
71
73
|
renderChunk(code, chunk) {
|
|
@@ -150,7 +152,6 @@ async function analyze(entry, mastraEntry, isVirtualFile, platform, logger) {
|
|
|
150
152
|
depsToOptimize.delete(dep);
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
|
-
depsToOptimize.set("@hono/node-server", ["serve"]);
|
|
154
155
|
return depsToOptimize;
|
|
155
156
|
}
|
|
156
157
|
async function bundleExternals(depsToOptimize, outputDir, logger) {
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FileService } from './chunk-
|
|
2
|
-
export { FileService, getBundler, getWatcher } from './chunk-
|
|
3
|
-
import { Bundler } from './chunk-
|
|
1
|
+
import { FileService } from './chunk-JG3X44WH.js';
|
|
2
|
+
export { FileService, getBundler, getWatcher } from './chunk-JG3X44WH.js';
|
|
3
|
+
import { Bundler } from './chunk-EDV35Q7R.js';
|
|
4
4
|
import { Deps } from './chunk-Q3WKR6OZ.js';
|
|
5
5
|
export { Deps, createChildProcessLogger, createPinoStream } from './chunk-Q3WKR6OZ.js';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-WXH2HMQ2.js';
|
|
7
7
|
import './chunk-RCYKCEGL.js';
|
|
8
8
|
import './chunk-YNXJO2XU.js';
|
|
9
9
|
import '@mastra/core/deployer';
|
package/dist/server/index.js
CHANGED
|
@@ -2903,18 +2903,14 @@ async function streamGenerateHandler(c2) {
|
|
|
2903
2903
|
throw new HTTPException(400, { message: "Messages should be an array" });
|
|
2904
2904
|
}
|
|
2905
2905
|
const streamResult = await agent.stream(messages, { threadId, resourceId: resourceid, output });
|
|
2906
|
-
const streamResponse = output ? streamResult.toTextStreamResponse() : streamResult.
|
|
2906
|
+
const streamResponse = output ? streamResult.toTextStreamResponse() : streamResult.toDataStreamResponse({
|
|
2907
|
+
sendUsage: true,
|
|
2908
|
+
sendReasoning: true,
|
|
2907
2909
|
getErrorMessage: (error) => {
|
|
2908
2910
|
return `An error occurred while processing your request. ${error}`;
|
|
2909
2911
|
}
|
|
2910
2912
|
});
|
|
2911
|
-
return
|
|
2912
|
-
headers: {
|
|
2913
|
-
"Content-Type": "text/event-stream",
|
|
2914
|
-
"content-encoding": "identity",
|
|
2915
|
-
"transfer-encoding": "chunked"
|
|
2916
|
-
}
|
|
2917
|
-
});
|
|
2913
|
+
return streamResponse;
|
|
2918
2914
|
} catch (error) {
|
|
2919
2915
|
return handleError(error, "Error streaming from agent");
|
|
2920
2916
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/deployer",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.42",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
52
52
|
"rollup-plugin-node-externals": "^8.0.0",
|
|
53
53
|
"zod": "^3.24.1",
|
|
54
|
-
"@mastra/core": "^0.2.0-alpha.
|
|
54
|
+
"@mastra/core": "^0.2.0-alpha.93"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@hono/node-server": "^1.13.7",
|
package/src/build/analyze.ts
CHANGED
|
@@ -32,23 +32,25 @@ export function pino() {
|
|
|
32
32
|
// resolve pino first
|
|
33
33
|
const resolvedPino = await this.resolve(id, importee);
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
if (resolvedPino) {
|
|
36
|
+
await Promise.all(
|
|
37
|
+
workerFiles.map(async file => {
|
|
38
|
+
const resolvedEntry = await this.resolve(file.id, resolvedPino.id);
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
if (!resolvedEntry) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const reference = this.emitFile({
|
|
45
|
+
type: 'chunk',
|
|
46
|
+
id: resolvedEntry.id,
|
|
47
|
+
name: `${file.file}`,
|
|
48
|
+
});
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
fileReferences.set(file.id, reference);
|
|
51
|
+
}),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
52
54
|
}
|
|
53
55
|
},
|
|
54
56
|
renderChunk(code, chunk) {
|
|
@@ -154,19 +154,15 @@ export async function streamGenerateHandler(c: Context): Promise<Response | unde
|
|
|
154
154
|
|
|
155
155
|
const streamResponse = output
|
|
156
156
|
? streamResult.toTextStreamResponse()
|
|
157
|
-
: streamResult.
|
|
157
|
+
: streamResult.toDataStreamResponse({
|
|
158
|
+
sendUsage: true,
|
|
159
|
+
sendReasoning: true,
|
|
158
160
|
getErrorMessage: (error: any) => {
|
|
159
161
|
return `An error occurred while processing your request. ${error}`;
|
|
160
162
|
},
|
|
161
163
|
});
|
|
162
164
|
|
|
163
|
-
return
|
|
164
|
-
headers: {
|
|
165
|
-
'Content-Type': 'text/event-stream',
|
|
166
|
-
'content-encoding': 'identity',
|
|
167
|
-
'transfer-encoding': 'chunked',
|
|
168
|
-
},
|
|
169
|
-
});
|
|
165
|
+
return streamResponse;
|
|
170
166
|
} catch (error) {
|
|
171
167
|
return handleError(error, 'Error streaming from agent');
|
|
172
168
|
}
|