@mastra/deployer 1.45.0 → 1.46.0-alpha.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/CHANGELOG.md +16 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/index.cjs +12 -3
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +13 -4
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -6
package/dist/server/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { existsSync, createReadStream, statSync } from 'fs';
|
|
|
12
12
|
import { versions } from 'process';
|
|
13
13
|
import { html } from 'hono/html';
|
|
14
14
|
import { Tool } from '@mastra/core/tools';
|
|
15
|
-
import { MastraServer as MastraServer$1, redactStreamChunk, normalizeQueryParams, isZodError, checkRouteFGA } from '@mastra/server/server-adapter';
|
|
15
|
+
import { MastraServer as MastraServer$1, redactStreamChunk, serializeStreamChunk, normalizeQueryParams, isZodError, checkRouteFGA } from '@mastra/server/server-adapter';
|
|
16
16
|
import util from 'util';
|
|
17
17
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
18
18
|
import { bodyLimit } from 'hono/body-limit';
|
|
@@ -2957,12 +2957,21 @@ var MastraServer = class extends MastraServer$1 {
|
|
|
2957
2957
|
}
|
|
2958
2958
|
const shouldRedact = this.streamOptions?.redact ?? true;
|
|
2959
2959
|
const outputValue = shouldRedact ? redactStreamChunk(value) : value;
|
|
2960
|
+
const serialized = serializeStreamChunk(outputValue);
|
|
2961
|
+
if (!serialized.ok) {
|
|
2962
|
+
this.mastra.getLogger()?.error("Failed to serialize stream chunk, skipping", {
|
|
2963
|
+
path: route.path,
|
|
2964
|
+
chunkType: outputValue?.type,
|
|
2965
|
+
error: serialized.error.message
|
|
2966
|
+
});
|
|
2967
|
+
continue;
|
|
2968
|
+
}
|
|
2960
2969
|
if (streamFormat === "sse") {
|
|
2961
|
-
await stream2.write(`data: ${
|
|
2970
|
+
await stream2.write(`data: ${serialized.json}
|
|
2962
2971
|
|
|
2963
2972
|
`);
|
|
2964
2973
|
} else {
|
|
2965
|
-
await stream2.write(
|
|
2974
|
+
await stream2.write(serialized.json + "");
|
|
2966
2975
|
}
|
|
2967
2976
|
}
|
|
2968
2977
|
}
|
|
@@ -3436,7 +3445,7 @@ var MastraServer = class extends MastraServer$1 {
|
|
|
3436
3445
|
}
|
|
3437
3446
|
};
|
|
3438
3447
|
|
|
3439
|
-
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono-openapi/1.3.0/
|
|
3448
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono-openapi/1.3.0/45ace4f12872d622c60648be245a42d9401745b4cfb7d3b258ed58143d85fa07/node_modules/hono-openapi/dist/index.js
|
|
3440
3449
|
var uniqueSymbol = /* @__PURE__ */ Symbol("openapi");
|
|
3441
3450
|
function describeRoute(spec) {
|
|
3442
3451
|
const middleware2 = async (_c, next) => {
|