@mastra/deployer 1.0.0-beta.24 → 1.0.0-beta.25
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 +10 -0
- package/dist/docs/README.md +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/SOURCE_MAP.json +1 -1
- package/dist/server/index.cjs +136 -1
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +136 -1
- package/dist/server/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add back `/api` route during `mastra dev` which was accidentally removed. ([#12055](https://github.com/mastra-ai/mastra/pull/12055))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`ed3e3dd`](https://github.com/mastra-ai/mastra/commit/ed3e3ddec69d564fe2b125e083437f76331f1283), [`3d1f794`](https://github.com/mastra-ai/mastra/commit/3d1f79420a16a0bb162794a21cfc10305912a554), [`6833c69`](https://github.com/mastra-ai/mastra/commit/6833c69607418d257750bbcdd84638993d343539), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`3a76a80`](https://github.com/mastra-ai/mastra/commit/3a76a80284cb71a0faa975abb3d4b2a9631e60cd), [`8538a0d`](https://github.com/mastra-ai/mastra/commit/8538a0d232619bf55dad7ddc2a8b0ca77c679a87), [`9312dcd`](https://github.com/mastra-ai/mastra/commit/9312dcd1c6f5b321929e7d382e763d95fdc030f5)]:
|
|
10
|
+
- @mastra/core@1.0.0-beta.25
|
|
11
|
+
- @mastra/server@1.0.0-beta.25
|
|
12
|
+
|
|
3
13
|
## 1.0.0-beta.24
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/docs/README.md
CHANGED
package/dist/docs/SKILL.md
CHANGED
package/dist/server/index.cjs
CHANGED
|
@@ -3553,6 +3553,126 @@ async function restartAllActiveWorkflowRunsHandler(c) {
|
|
|
3553
3553
|
}
|
|
3554
3554
|
}
|
|
3555
3555
|
|
|
3556
|
+
// src/server/handlers/root.ts
|
|
3557
|
+
async function rootHandler(c) {
|
|
3558
|
+
const baseUrl = new URL(c.req.url).origin;
|
|
3559
|
+
return c.html(
|
|
3560
|
+
/* html */
|
|
3561
|
+
`
|
|
3562
|
+
<!doctype html>
|
|
3563
|
+
<html lang="en">
|
|
3564
|
+
<head>
|
|
3565
|
+
<meta charset="UTF-8" />
|
|
3566
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
3567
|
+
<title>Mastra API</title>
|
|
3568
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/inter-ui/3.19.3/inter.min.css" />
|
|
3569
|
+
<style>
|
|
3570
|
+
body {
|
|
3571
|
+
margin: 0;
|
|
3572
|
+
padding: 0;
|
|
3573
|
+
background-color: #0d0d0d;
|
|
3574
|
+
color: #ffffff;
|
|
3575
|
+
font-family:
|
|
3576
|
+
'Inter',
|
|
3577
|
+
-apple-system,
|
|
3578
|
+
BlinkMacSystemFont,
|
|
3579
|
+
system-ui,
|
|
3580
|
+
sans-serif;
|
|
3581
|
+
min-height: 100vh;
|
|
3582
|
+
display: flex;
|
|
3583
|
+
flex-direction: column;
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
main {
|
|
3587
|
+
flex: 1;
|
|
3588
|
+
display: flex;
|
|
3589
|
+
flex-direction: column;
|
|
3590
|
+
align-items: center;
|
|
3591
|
+
justify-content: center;
|
|
3592
|
+
padding: 2rem;
|
|
3593
|
+
text-align: center;
|
|
3594
|
+
}
|
|
3595
|
+
|
|
3596
|
+
h1 {
|
|
3597
|
+
font-size: 4rem;
|
|
3598
|
+
font-weight: 600;
|
|
3599
|
+
margin: 0 0 1rem 0;
|
|
3600
|
+
background: linear-gradient(to right, #fff, #ccc);
|
|
3601
|
+
-webkit-background-clip: text;
|
|
3602
|
+
-webkit-text-fill-color: transparent;
|
|
3603
|
+
line-height: 1.2;
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
.subtitle {
|
|
3607
|
+
color: #9ca3af;
|
|
3608
|
+
font-size: 1.25rem;
|
|
3609
|
+
max-width: 600px;
|
|
3610
|
+
margin: 0 auto 3rem auto;
|
|
3611
|
+
line-height: 1.6;
|
|
3612
|
+
}
|
|
3613
|
+
|
|
3614
|
+
.link {
|
|
3615
|
+
color: #ffffff;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
.link:hover {
|
|
3619
|
+
text-decoration: none;
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
.docs-link {
|
|
3623
|
+
background-color: #1a1a1a;
|
|
3624
|
+
padding: 1rem 2rem;
|
|
3625
|
+
border-radius: 0.5rem;
|
|
3626
|
+
display: flex;
|
|
3627
|
+
align-items: center;
|
|
3628
|
+
gap: 1rem;
|
|
3629
|
+
font-family: monospace;
|
|
3630
|
+
font-size: 1rem;
|
|
3631
|
+
color: #ffffff;
|
|
3632
|
+
text-decoration: none;
|
|
3633
|
+
transition: background-color 0.2s;
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
.docs-link:hover {
|
|
3637
|
+
background-color: #252525;
|
|
3638
|
+
}
|
|
3639
|
+
|
|
3640
|
+
.arrow-icon {
|
|
3641
|
+
transition: transform 0.2s;
|
|
3642
|
+
}
|
|
3643
|
+
|
|
3644
|
+
.docs-link:hover .arrow-icon {
|
|
3645
|
+
transform: translateX(4px);
|
|
3646
|
+
}
|
|
3647
|
+
</style>
|
|
3648
|
+
</head>
|
|
3649
|
+
<body>
|
|
3650
|
+
<main>
|
|
3651
|
+
<h1>Welcome to the Mastra API</h1>
|
|
3652
|
+
<p class="subtitle">
|
|
3653
|
+
Discover all available endpoints through Swagger UI. You can also define your own <a href="https://mastra.ai/docs/server-db/custom-api-routes" target="_blank" class="link">API routes</a>.
|
|
3654
|
+
</p>
|
|
3655
|
+
<a href="${baseUrl}/swagger-ui" target="_blank" class="docs-link">
|
|
3656
|
+
Browse Swagger UI
|
|
3657
|
+
<svg
|
|
3658
|
+
class="arrow-icon"
|
|
3659
|
+
width="20"
|
|
3660
|
+
height="20"
|
|
3661
|
+
viewBox="0 0 24 24"
|
|
3662
|
+
fill="none"
|
|
3663
|
+
stroke="currentColor"
|
|
3664
|
+
strokeWidth="2"
|
|
3665
|
+
>
|
|
3666
|
+
<path d="M5 12h14M12 5l7 7-7 7" />
|
|
3667
|
+
</svg>
|
|
3668
|
+
</a>
|
|
3669
|
+
</main>
|
|
3670
|
+
</body>
|
|
3671
|
+
</html>
|
|
3672
|
+
`
|
|
3673
|
+
);
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3556
3676
|
// src/server/welcome.ts
|
|
3557
3677
|
var html2 = `
|
|
3558
3678
|
<!doctype html>
|
|
@@ -3763,6 +3883,21 @@ async function createHonoServer(mastra, options = {
|
|
|
3763
3883
|
}),
|
|
3764
3884
|
healthHandler
|
|
3765
3885
|
);
|
|
3886
|
+
if (options?.isDev || server?.build?.swaggerUI) {
|
|
3887
|
+
app.get(
|
|
3888
|
+
"/api",
|
|
3889
|
+
describeRoute({
|
|
3890
|
+
description: "API Welcome Page",
|
|
3891
|
+
tags: ["system"],
|
|
3892
|
+
responses: {
|
|
3893
|
+
200: {
|
|
3894
|
+
description: "Success"
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
}),
|
|
3898
|
+
rootHandler
|
|
3899
|
+
);
|
|
3900
|
+
}
|
|
3766
3901
|
honoServerAdapter.registerAuthMiddleware();
|
|
3767
3902
|
if (server?.middleware) {
|
|
3768
3903
|
const normalizedMiddlewares = Array.isArray(server.middleware) ? server.middleware : [server.middleware];
|
|
@@ -3874,7 +4009,7 @@ async function createHonoServer(mastra, options = {
|
|
|
3874
4009
|
}
|
|
3875
4010
|
app.get("*", async (c, next) => {
|
|
3876
4011
|
const requestPath = c.req.path;
|
|
3877
|
-
if (requestPath.startsWith("/api/") || requestPath.startsWith("/swagger-ui") || requestPath.startsWith("/openapi.json")) {
|
|
4012
|
+
if (requestPath === "/api" || requestPath.startsWith("/api/") || requestPath.startsWith("/swagger-ui") || requestPath.startsWith("/openapi.json")) {
|
|
3878
4013
|
return await next();
|
|
3879
4014
|
}
|
|
3880
4015
|
if (requestPath.includes(".") && !requestPath.endsWith(".html")) {
|