@mastra/deployer 1.0.0-beta.21 → 1.0.0-beta.23

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/build/analyze.cjs +2 -2
  3. package/dist/build/analyze.js +1 -1
  4. package/dist/build/bundler.cjs +3 -3
  5. package/dist/build/bundler.js +1 -1
  6. package/dist/build/index.cjs +10 -10
  7. package/dist/build/index.js +3 -3
  8. package/dist/build/plugins/tsconfig-paths.d.ts +1 -1
  9. package/dist/build/plugins/tsconfig-paths.d.ts.map +1 -1
  10. package/dist/bundler/index.cjs +3 -3
  11. package/dist/bundler/index.js +1 -1
  12. package/dist/{chunk-UKP4KHBS.js → chunk-5FPJTHRK.js} +4 -4
  13. package/dist/{chunk-UKP4KHBS.js.map → chunk-5FPJTHRK.js.map} +1 -1
  14. package/dist/{chunk-HVKR4FT2.cjs → chunk-7EPD2XJR.cjs} +11 -11
  15. package/dist/{chunk-HVKR4FT2.cjs.map → chunk-7EPD2XJR.cjs.map} +1 -1
  16. package/dist/{chunk-Z53UZLS3.cjs → chunk-GU4OME5Q.cjs} +11 -11
  17. package/dist/{chunk-Z53UZLS3.cjs.map → chunk-GU4OME5Q.cjs.map} +1 -1
  18. package/dist/{chunk-4NPMVODD.js → chunk-HWSYWSD7.js} +3 -3
  19. package/dist/chunk-HWSYWSD7.js.map +1 -0
  20. package/dist/{chunk-2ZPRZMBN.js → chunk-NGQZZ54Y.js} +3 -3
  21. package/dist/{chunk-2ZPRZMBN.js.map → chunk-NGQZZ54Y.js.map} +1 -1
  22. package/dist/{chunk-NGWTN4SJ.js → chunk-SD6NHZ2H.js} +4 -4
  23. package/dist/{chunk-NGWTN4SJ.js.map → chunk-SD6NHZ2H.js.map} +1 -1
  24. package/dist/{chunk-NWQP6PZQ.cjs → chunk-T7NCLSYN.cjs} +3 -3
  25. package/dist/chunk-T7NCLSYN.cjs.map +1 -0
  26. package/dist/{chunk-SBGBJ7NB.cjs → chunk-VOI3B5MX.cjs} +11 -11
  27. package/dist/{chunk-SBGBJ7NB.cjs.map → chunk-VOI3B5MX.cjs.map} +1 -1
  28. package/dist/docs/README.md +1 -1
  29. package/dist/docs/SKILL.md +1 -1
  30. package/dist/docs/SOURCE_MAP.json +1 -1
  31. package/dist/docs/deployment/01-overview.md +6 -2
  32. package/dist/docs/deployment/02-mastra-server.md +99 -40
  33. package/dist/docs/deployment/03-monorepo.md +89 -17
  34. package/dist/index.cjs +4 -4
  35. package/dist/index.js +2 -2
  36. package/dist/server/index.cjs +12 -10
  37. package/dist/server/index.cjs.map +1 -1
  38. package/dist/server/index.d.ts.map +1 -1
  39. package/dist/server/index.js +12 -10
  40. package/dist/server/index.js.map +1 -1
  41. package/dist/server/types.d.ts +1 -1
  42. package/dist/server/types.d.ts.map +1 -1
  43. package/package.json +6 -6
  44. package/dist/chunk-4NPMVODD.js.map +0 -1
  45. package/dist/chunk-NWQP6PZQ.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAU5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoBnD,KAAK,QAAQ,GAAG,YAAY,CAAC;AAE7B,KAAK,SAAS,GAAG,aAAa,GAAG;IAC/B,OAAO,EAAE,GAAG,CAAC;QAAE,UAAU,EAAE,+BAA+B,CAAA;KAAE,CAAC,CAAC;CAC/D,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,wCAmB/D;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAER;cAGgC,QAAQ;eAAa,SAAS;2CAwShE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAmC,mDAqDlG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAU5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAoBnD,KAAK,QAAQ,GAAG,YAAY,CAAC;AAE7B,KAAK,SAAS,GAAG,aAAa,GAAG;IAC/B,OAAO,EAAE,GAAG,CAAC;QAAE,UAAU,EAAE,+BAA+B,CAAA;KAAE,CAAC,CAAC;CAC/D,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,wCAmB/D;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,mBAER;cAGgC,QAAQ;eAAa,SAAS;2CA2ShE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAmC,mDAqDlG"}
@@ -3643,7 +3643,7 @@ var getStudioPath = () => {
3643
3643
  const __filename = fileURLToPath(import.meta.url);
3644
3644
  __dirname = dirname(__filename);
3645
3645
  }
3646
- const studioPath = process.env.MASTRA_STUDIO_PATH || join(__dirname, "playground");
3646
+ const studioPath = process.env.MASTRA_STUDIO_PATH || join(__dirname, "studio");
3647
3647
  return studioPath;
3648
3648
  };
3649
3649
  function getToolExports(tools) {
@@ -3794,7 +3794,7 @@ async function createHonoServer(mastra, options = {
3794
3794
  }
3795
3795
  const serverOptions = mastra.getServer();
3796
3796
  const studioBasePath = normalizeStudioBase(serverOptions?.studioBase ?? "/");
3797
- if (options?.playground) {
3797
+ if (options?.studio) {
3798
3798
  app.get(
3799
3799
  `${studioBasePath}/refresh-events`,
3800
3800
  describeRoute({
@@ -3847,8 +3847,8 @@ async function createHonoServer(mastra, options = {
3847
3847
  if (requestPath.includes(".") && !requestPath.endsWith(".html")) {
3848
3848
  return await next();
3849
3849
  }
3850
- const isPlaygroundRoute = studioBasePath === "" || requestPath === studioBasePath || requestPath.startsWith(`${studioBasePath}/`);
3851
- if (options?.playground && isPlaygroundRoute) {
3850
+ const isStudioRoute = studioBasePath === "" || requestPath === studioBasePath || requestPath.startsWith(`${studioBasePath}/`);
3851
+ if (options?.studio && isStudioRoute) {
3852
3852
  const studioPath = getStudioPath();
3853
3853
  let indexHtml = await readFile(join(studioPath, "index.html"), "utf-8");
3854
3854
  const port = serverOptions?.port ?? (Number(process.env.PORT) || 4111);
@@ -3857,22 +3857,24 @@ async function createHonoServer(mastra, options = {
3857
3857
  const key = serverOptions?.https?.key ?? (process.env.MASTRA_HTTPS_KEY ? Buffer.from(process.env.MASTRA_HTTPS_KEY, "base64") : void 0);
3858
3858
  const cert = serverOptions?.https?.cert ?? (process.env.MASTRA_HTTPS_CERT ? Buffer.from(process.env.MASTRA_HTTPS_CERT, "base64") : void 0);
3859
3859
  const protocol = key && cert ? "https" : "http";
3860
+ const cloudApiEndpoint = process.env.MASTRA_CLOUD_API_ENDPOINT || "";
3860
3861
  indexHtml = indexHtml.replace(`'%%MASTRA_SERVER_HOST%%'`, `'${host}'`);
3861
3862
  indexHtml = indexHtml.replace(`'%%MASTRA_SERVER_PORT%%'`, `'${port}'`);
3862
3863
  indexHtml = indexHtml.replace(`'%%MASTRA_HIDE_CLOUD_CTA%%'`, `'${hideCloudCta}'`);
3863
3864
  indexHtml = indexHtml.replace(`'%%MASTRA_SERVER_PROTOCOL%%'`, `'${protocol}'`);
3865
+ indexHtml = indexHtml.replace(`'%%MASTRA_CLOUD_API_ENDPOINT%%'`, `'${cloudApiEndpoint}'`);
3864
3866
  indexHtml = indexHtml.replaceAll("%%MASTRA_STUDIO_BASE_PATH%%", studioBasePath);
3865
3867
  return c.newResponse(indexHtml, 200, { "Content-Type": "text/html" });
3866
3868
  }
3867
3869
  return c.newResponse(html2, 200, { "Content-Type": "text/html" });
3868
3870
  });
3869
- if (options?.playground) {
3870
- const studioPath = getStudioPath();
3871
- const playgroundPath = studioBasePath ? `${studioBasePath}/*` : "*";
3871
+ if (options?.studio) {
3872
+ const studioRootPath = getStudioPath();
3873
+ const studioPath = studioBasePath ? `${studioBasePath}/*` : "*";
3872
3874
  app.use(
3873
- playgroundPath,
3875
+ studioPath,
3874
3876
  serveStatic({
3875
- root: studioPath,
3877
+ root: studioRootPath,
3876
3878
  rewriteRequestPath: (path) => {
3877
3879
  if (studioBasePath && path.startsWith(studioBasePath)) {
3878
3880
  return path.slice(studioBasePath.length);
@@ -3909,7 +3911,7 @@ async function createNodeServer(mastra, options = { tools: {} }) {
3909
3911
  () => {
3910
3912
  const logger2 = mastra.getLogger();
3911
3913
  logger2.info(` Mastra API running on ${protocol}://${host}:${port}/api`);
3912
- if (options?.playground) {
3914
+ if (options?.studio) {
3913
3915
  const studioBasePath = normalizeStudioBase(serverOptions?.studioBase ?? "/");
3914
3916
  const studioUrl = `${protocol}://${host}:${port}${studioBasePath}`;
3915
3917
  logger2.info(`\u{1F468}\u200D\u{1F4BB} Studio available at ${studioUrl}`);