@mastra/deployer 1.25.0-alpha.1 → 1.25.0-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 +18 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-deployment-mastra-server.md +4 -4
- package/dist/docs/references/docs-deployment-monorepo.md +3 -3
- package/dist/server/index.cjs +74 -5
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +75 -6
- package/dist/server/index.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 1.25.0-alpha.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dependencies updates: ([#15210](https://github.com/mastra-ai/mastra/pull/15210))
|
|
8
|
+
- Updated dependency [`tinyglobby@^0.2.16` ↗︎](https://www.npmjs.com/package/tinyglobby/v/0.2.16) (from `^0.2.15`, in `dependencies`)
|
|
9
|
+
- Updated dependencies [[`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
|
|
10
|
+
- @mastra/core@1.25.0-alpha.3
|
|
11
|
+
- @mastra/server@1.25.0-alpha.3
|
|
12
|
+
|
|
13
|
+
## 1.25.0-alpha.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e)]:
|
|
18
|
+
- @mastra/core@1.25.0-alpha.2
|
|
19
|
+
- @mastra/server@1.25.0-alpha.2
|
|
20
|
+
|
|
3
21
|
## 1.25.0-alpha.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-deployer
|
|
|
3
3
|
description: Documentation for @mastra/deployer. Use when working with @mastra/deployer APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/deployer"
|
|
6
|
-
version: "1.25.0-alpha.
|
|
6
|
+
version: "1.25.0-alpha.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -116,7 +116,7 @@ NODE_OPTIONS="--max-old-space-size=4096" mastra build
|
|
|
116
116
|
|
|
117
117
|
## Related
|
|
118
118
|
|
|
119
|
-
- [Server Overview](https://mastra.ai/docs/server/mastra-server)
|
|
120
|
-
- [Server Adapters](https://mastra.ai/docs/server/server-adapters)
|
|
121
|
-
- [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes)
|
|
122
|
-
- [Configuration Reference](https://mastra.ai/reference/configuration)
|
|
119
|
+
- [Server Overview](https://mastra.ai/docs/server/mastra-server): Configure server behavior, middleware, and authentication
|
|
120
|
+
- [Server Adapters](https://mastra.ai/docs/server/server-adapters): Use Express or Hono instead of `mastra build`
|
|
121
|
+
- [Custom API Routes](https://mastra.ai/docs/server/custom-api-routes): Add custom HTTP endpoints
|
|
122
|
+
- [Configuration Reference](https://mastra.ai/reference/configuration): Full configuration options
|
|
@@ -131,6 +131,6 @@ If you see type errors from uncompiled workspace packages, either:
|
|
|
131
131
|
|
|
132
132
|
## Related
|
|
133
133
|
|
|
134
|
-
- [Deploy a Mastra Server](https://mastra.ai/docs/deployment/mastra-server)
|
|
135
|
-
- [Configuration Reference](https://mastra.ai/reference/configuration)
|
|
136
|
-
- [CLI Reference](https://mastra.ai/reference/cli/mastra)
|
|
134
|
+
- [Deploy a Mastra Server](https://mastra.ai/docs/deployment/mastra-server): Core build and deployment guide
|
|
135
|
+
- [Configuration Reference](https://mastra.ai/reference/configuration): `bundler.transpilePackages` and other options
|
|
136
|
+
- [CLI Reference](https://mastra.ai/reference/cli/mastra): Build command flags
|
package/dist/server/index.cjs
CHANGED
|
@@ -194,6 +194,17 @@ var requestPrototype = {
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
});
|
|
197
|
+
Object.defineProperty(requestPrototype, /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), {
|
|
198
|
+
value: function(depth, options, inspectFn) {
|
|
199
|
+
const props = {
|
|
200
|
+
method: this.method,
|
|
201
|
+
url: this.url,
|
|
202
|
+
headers: this.headers,
|
|
203
|
+
nativeRequest: this[requestCache]
|
|
204
|
+
};
|
|
205
|
+
return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
197
208
|
Object.setPrototypeOf(requestPrototype, Request2.prototype);
|
|
198
209
|
var newRequest = (incoming, defaultHostname) => {
|
|
199
210
|
const req = Object.create(requestPrototype);
|
|
@@ -297,6 +308,17 @@ var Response2 = class _Response {
|
|
|
297
308
|
}
|
|
298
309
|
});
|
|
299
310
|
});
|
|
311
|
+
Object.defineProperty(Response2.prototype, /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), {
|
|
312
|
+
value: function(depth, options, inspectFn) {
|
|
313
|
+
const props = {
|
|
314
|
+
status: this.status,
|
|
315
|
+
headers: this.headers,
|
|
316
|
+
ok: this.ok,
|
|
317
|
+
nativeResponse: this[responseCache]
|
|
318
|
+
};
|
|
319
|
+
return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
320
|
+
}
|
|
321
|
+
});
|
|
300
322
|
Object.setPrototypeOf(Response2, GlobalResponse);
|
|
301
323
|
Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
|
|
302
324
|
async function readWithoutBlocking(readPromise) {
|
|
@@ -368,6 +390,49 @@ if (typeof global.crypto === "undefined") {
|
|
|
368
390
|
global.crypto = crypto__default.default;
|
|
369
391
|
}
|
|
370
392
|
var outgoingEnded = /* @__PURE__ */ Symbol("outgoingEnded");
|
|
393
|
+
var incomingDraining = /* @__PURE__ */ Symbol("incomingDraining");
|
|
394
|
+
var DRAIN_TIMEOUT_MS = 500;
|
|
395
|
+
var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
|
|
396
|
+
var drainIncoming = (incoming) => {
|
|
397
|
+
const incomingWithDrainState = incoming;
|
|
398
|
+
if (incoming.destroyed || incomingWithDrainState[incomingDraining]) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
incomingWithDrainState[incomingDraining] = true;
|
|
402
|
+
if (incoming instanceof http2.Http2ServerRequest) {
|
|
403
|
+
try {
|
|
404
|
+
incoming.stream?.close?.(http2.constants.NGHTTP2_NO_ERROR);
|
|
405
|
+
} catch {
|
|
406
|
+
}
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
let bytesRead = 0;
|
|
410
|
+
const cleanup = () => {
|
|
411
|
+
clearTimeout(timer);
|
|
412
|
+
incoming.off("data", onData);
|
|
413
|
+
incoming.off("end", cleanup);
|
|
414
|
+
incoming.off("error", cleanup);
|
|
415
|
+
};
|
|
416
|
+
const forceClose = () => {
|
|
417
|
+
cleanup();
|
|
418
|
+
const socket = incoming.socket;
|
|
419
|
+
if (socket && !socket.destroyed) {
|
|
420
|
+
socket.destroySoon();
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
const timer = setTimeout(forceClose, DRAIN_TIMEOUT_MS);
|
|
424
|
+
timer.unref?.();
|
|
425
|
+
const onData = (chunk) => {
|
|
426
|
+
bytesRead += chunk.length;
|
|
427
|
+
if (bytesRead > MAX_DRAIN_BYTES) {
|
|
428
|
+
forceClose();
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
incoming.on("data", onData);
|
|
432
|
+
incoming.on("end", cleanup);
|
|
433
|
+
incoming.on("error", cleanup);
|
|
434
|
+
incoming.resume();
|
|
435
|
+
};
|
|
371
436
|
var handleRequestError = () => new Response(null, {
|
|
372
437
|
status: 400
|
|
373
438
|
});
|
|
@@ -533,14 +598,18 @@ var getRequestListener = (fetchCallback, options = {}) => {
|
|
|
533
598
|
setTimeout(() => {
|
|
534
599
|
if (!incomingEnded) {
|
|
535
600
|
setTimeout(() => {
|
|
536
|
-
incoming
|
|
537
|
-
outgoing.destroy();
|
|
601
|
+
drainIncoming(incoming);
|
|
538
602
|
});
|
|
539
603
|
}
|
|
540
604
|
});
|
|
541
605
|
}
|
|
542
606
|
};
|
|
543
607
|
}
|
|
608
|
+
outgoing.on("finish", () => {
|
|
609
|
+
if (!incomingEnded) {
|
|
610
|
+
drainIncoming(incoming);
|
|
611
|
+
}
|
|
612
|
+
});
|
|
544
613
|
}
|
|
545
614
|
outgoing.on("close", () => {
|
|
546
615
|
const abortController = req[abortControllerKey];
|
|
@@ -555,7 +624,7 @@ var getRequestListener = (fetchCallback, options = {}) => {
|
|
|
555
624
|
setTimeout(() => {
|
|
556
625
|
if (!incomingEnded) {
|
|
557
626
|
setTimeout(() => {
|
|
558
|
-
incoming
|
|
627
|
+
drainIncoming(incoming);
|
|
559
628
|
});
|
|
560
629
|
}
|
|
561
630
|
});
|
|
@@ -679,7 +748,7 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
679
748
|
} else {
|
|
680
749
|
try {
|
|
681
750
|
filename = tryDecodeURI(c.req.path);
|
|
682
|
-
if (/(?:^|[\/\\])
|
|
751
|
+
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}/.test(filename)) {
|
|
683
752
|
throw new Error();
|
|
684
753
|
}
|
|
685
754
|
} catch {
|
|
@@ -3695,7 +3764,7 @@ var MastraServer = class extends serverAdapter.MastraServer {
|
|
|
3695
3764
|
}
|
|
3696
3765
|
};
|
|
3697
3766
|
|
|
3698
|
-
// ../../node_modules/.pnpm/hono-openapi@1.3.0_@hono+standard-validator@0.2.2_@standard-schema+spec@1.1.0_hono@4.
|
|
3767
|
+
// ../../node_modules/.pnpm/hono-openapi@1.3.0_@hono+standard-validator@0.2.2_@standard-schema+spec@1.1.0_hono@4.12_7583f8b2d2d3db741ec7b85bcfad020d/node_modules/hono-openapi/dist/index.js
|
|
3699
3768
|
var uniqueSymbol = /* @__PURE__ */ Symbol("openapi");
|
|
3700
3769
|
function describeRoute(spec) {
|
|
3701
3770
|
const middleware2 = async (_c, next) => {
|