-
Notifications
You must be signed in to change notification settings - Fork 868
Mastra server.build
config for swaggerUI, openAPIDocs, apiReqLogs
#3674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TheIsrael1
merged 24 commits into
main
from
ehindero2016/mastra-3076-feature-allow-disabling-playgroundswagger-ui-at-build-time
Apr 22, 2025
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ee8dde2
Disable swaggerUI, playground for deployment builds, enable swaggerUI…
TheIsrael1 adb46af
changeset
TheIsrael1 68c66eb
Merge branch 'main' into ehindero2016/mastra-3076-feature-allow-disab…
TheIsrael1 88b0dd7
disable openapi route in prod build, optional build flag to enable
TheIsrael1 f0d4039
Expose ServerBundleOptions from deployer
TheIsrael1 22eab18
Merge branch 'main' into ehindero2016/mastra-3076-feature-allow-disab…
TheIsrael1 bc1e3d5
fix lint
TheIsrael1 0659e5c
fix lint
TheIsrael1 f8c1827
fix lint
TheIsrael1 83ed6de
fix lint
TheIsrael1 cd92e95
fix lint
TheIsrael1 98e4579
Merge branch 'main' into ehindero2016/mastra-3076-feature-allow-disab…
TheIsrael1 5a0ab12
hardcode buildbundler entry
TheIsrael1 f386158
enable server options from mastra instance server config
TheIsrael1 7b6b922
remove redundant addition
TheIsrael1 6d53ce6
Merge branches 'main' and 'ehindero2016/mastra-3076-feature-allow-dis…
codesandbot 2be7ba8
Update local dev docs
TheIsrael1 3d8381d
Update deployer entries
TheIsrael1 baab338
Merge branch 'main' into ehindero2016/mastra-3076-feature-allow-disab…
TheIsrael1 2655349
Merge branch 'main' into ehindero2016/mastra-3076-feature-allow-disab…
TheIsrael1 33e5a62
move extra build options to dedicated server build config
TheIsrael1 0a42ea3
update docs
TheIsrael1 1d695c2
Merge branch 'main' into ehindero2016/mastra-3076-feature-allow-disab…
TheIsrael1 c54f9c2
update changeset description
TheIsrael1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@mastra/deployer-cloudflare': patch | ||
'@mastra/deployer-netlify': patch | ||
'@mastra/deployer': patch | ||
'@mastra/deployer-vercel': patch | ||
'@mastra/core': patch | ||
'mastra': patch | ||
'create-mastra': patch | ||
--- | ||
|
||
Disable swaggerUI, playground for production builds, enable swaggerUI build flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
import React from "react"; | ||
|
||
function formatToK(number: number) { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably always enable all of these on dev and only read the config on production builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok, we can do that, we can have a build property on the server config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok we have a server.build config now that applies if !isDev in the hono server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TheIsrael1 . Could you help me understand if I'm using this wrong? It tried these options on a production build, but they are not being respected. Following the built code I noticed it's calling
await createNodeServer(mastra);
without options, and inside it there's a call forconst app = await createHonoServer(mastra, options);
, which makes it look like these options underMastra.server.build
are not being read. Do I need to set something else? Also, would it make sense to also keep theplayground
option?