@mastra/deployer 1.78.1-alpha.0 → 1.79.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAmB5B,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;AA8CF,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;cAegC,QAAQ;eAAa,SAAS;2CAmbhE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAmC,mDAqLlG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAKhE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAmB5B,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;AA8CF,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;cAegC,QAAQ;eAAa,SAAS;2CAmbhE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAmC,mDAmMlG"}
@@ -4890,6 +4890,7 @@ async function createNodeServer(mastra, options = { tools: {} }) {
4890
4890
  const studioHost = serverOptions?.studioHost ?? host;
4891
4891
  const studioProtocol = serverOptions?.studioProtocol ?? protocol;
4892
4892
  const studioPort = serverOptions?.studioPort ?? port;
4893
+ await import("@mastra/core/telemetry").then(({ startModelUsageTelemetry }) => startModelUsageTelemetry?.(mastra)).catch(() => {});
4893
4894
  const server = serve({
4894
4895
  fetch: app.fetch,
4895
4896
  port,
@@ -4935,13 +4936,14 @@ async function createNodeServer(mastra, options = { tools: {} }) {
4935
4936
  clearTimeout(timeout);
4936
4937
  }
4937
4938
  };
4938
- let shuttingDown = false;
4939
+ const DUPLICATE_SIGNAL_WINDOW_MS = 250;
4940
+ let shutdownStartedAt;
4939
4941
  const shutdown = async (signal) => {
4940
- if (shuttingDown) {
4941
- process.exit(1);
4942
+ if (shutdownStartedAt !== void 0) {
4943
+ if (Date.now() - shutdownStartedAt >= DUPLICATE_SIGNAL_WINDOW_MS) process.exit(1);
4942
4944
  return;
4943
4945
  }
4944
- shuttingDown = true;
4946
+ shutdownStartedAt = Date.now();
4945
4947
  const logger = mastra.getLogger();
4946
4948
  logger.info("Shutting down Mastra server", { signal });
4947
4949
  try {