@mastra/nestjs 0.2.4-alpha.0 → 0.2.4-alpha.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 +26 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/services/request-context.service.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Logger, BadRequestException, Injectable, Inject, HttpException, HttpStatus, Catch, UnauthorizedException, ForbiddenException, Scope, ServiceUnavailableException, NotFoundException, All, Req, Res, Controller, UseInterceptors, UseFilters, UseGuards, Get, PayloadTooLargeException, Module, SetMetadata } from '@nestjs/common';
|
|
2
|
-
import { SERVER_ROUTES, isZodError, isReservedRequestContextKey, isStudioClientTypeHeader,
|
|
2
|
+
import { SERVER_ROUTES, isZodError, isReservedRequestContextKey, isStudioClientTypeHeader, MASTRA_IS_STUDIO_KEY, redactStreamChunk, serializeStreamChunk, normalizeQueryParams, MASTRA_CLIENT_TYPE_HEADER } from '@mastra/server/server-adapter';
|
|
3
3
|
import { isZodError as isZodError$1, formatZodError } from '@mastra/server/handlers/error';
|
|
4
4
|
import { isDevPlaygroundRequest, isProtectedPath, canAccessPublicly, checkRules, defaultAuthConfig } from '@mastra/server/auth';
|
|
5
5
|
import { RequestContext } from '@mastra/core/request-context';
|
|
@@ -12314,7 +12314,8 @@ var RequestContextService = class _RequestContextService {
|
|
|
12314
12314
|
}
|
|
12315
12315
|
}
|
|
12316
12316
|
applyRequestMetadata(context) {
|
|
12317
|
-
|
|
12317
|
+
const clientType = this.request.headers[MASTRA_CLIENT_TYPE_HEADER];
|
|
12318
|
+
if (isStudioClientTypeHeader(Array.isArray(clientType) ? clientType[0] : clientType)) {
|
|
12318
12319
|
context.set(MASTRA_IS_STUDIO_KEY, true);
|
|
12319
12320
|
}
|
|
12320
12321
|
}
|