@mastra/deployer 1.37.2-alpha.1 → 1.38.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 +31 -0
- package/dist/arktype-aI7TBD0R-7XQZ7GWN.js +8 -0
- package/dist/arktype-aI7TBD0R-7XQZ7GWN.js.map +1 -0
- package/dist/arktype-aI7TBD0R-ZW5RKQCR.cjs +10 -0
- package/dist/arktype-aI7TBD0R-ZW5RKQCR.cjs.map +1 -0
- package/dist/build/analyze.cjs +2 -2
- package/dist/build/analyze.js +1 -1
- package/dist/build/bundler.cjs +3 -3
- package/dist/build/bundler.d.ts.map +1 -1
- package/dist/build/bundler.js +1 -1
- package/dist/build/index.cjs +12 -12
- package/dist/build/index.js +4 -4
- package/dist/build/plugins/local-storage-detector.d.ts +20 -0
- package/dist/build/plugins/local-storage-detector.d.ts.map +1 -0
- package/dist/bundler/index.cjs +3 -3
- package/dist/bundler/index.d.ts.map +1 -1
- package/dist/bundler/index.js +1 -1
- package/dist/{chunk-H3XBG3TG.js → chunk-3MSUMTPF.js} +10 -10
- package/dist/chunk-3MSUMTPF.js.map +1 -0
- package/dist/{chunk-AQL6MQFJ.cjs → chunk-4KPYOOLH.cjs} +61 -2
- package/dist/chunk-4KPYOOLH.cjs.map +1 -0
- package/dist/chunk-AMSGMQTG.cjs +4 -0
- package/dist/{chunk-25FDH34P.cjs.map → chunk-AMSGMQTG.cjs.map} +1 -1
- package/dist/{chunk-YHEVEEDG.js → chunk-FQ5JFVJK.js} +61 -2
- package/dist/chunk-FQ5JFVJK.js.map +1 -0
- package/dist/chunk-HBMWAX3T.js +3 -0
- package/dist/{chunk-5AW6ZK5L.js.map → chunk-HBMWAX3T.js.map} +1 -1
- package/dist/chunk-HYCWHCX3.js +14 -0
- package/dist/chunk-HYCWHCX3.js.map +1 -0
- package/dist/chunk-KNXFCYRS.cjs +8 -0
- package/dist/chunk-KNXFCYRS.cjs.map +1 -0
- package/dist/{chunk-ISGGMBYN.js → chunk-LIJZEBIG.js} +10 -9
- package/dist/chunk-LIJZEBIG.js.map +1 -0
- package/dist/{chunk-O3MMPMLF.cjs → chunk-ML2R5LJR.cjs} +10 -10
- package/dist/chunk-ML2R5LJR.cjs.map +1 -0
- package/dist/{chunk-KTL22PW6.js → chunk-MZ3WIURS.js} +4 -4
- package/dist/{chunk-KTL22PW6.js.map → chunk-MZ3WIURS.js.map} +1 -1
- package/dist/chunk-PTZ6HD53.js +6 -0
- package/dist/chunk-PTZ6HD53.js.map +1 -0
- package/dist/{chunk-RJXYP6DA.cjs → chunk-QMU7GKMZ.cjs} +17 -16
- package/dist/chunk-QMU7GKMZ.cjs.map +1 -0
- package/dist/{chunk-PUO4FNLE.cjs → chunk-QVBNRKOA.cjs} +3 -3
- package/dist/chunk-QVBNRKOA.cjs.map +1 -0
- package/dist/{chunk-5TILMGJA.cjs → chunk-U5HOHRPU.cjs} +3 -3
- package/dist/chunk-U5HOHRPU.cjs.map +1 -0
- package/dist/{chunk-QJGW77MV.cjs → chunk-UEH6D24P.cjs} +33 -15
- package/dist/chunk-UEH6D24P.cjs.map +1 -0
- package/dist/{chunk-XABHWJ5U.cjs → chunk-UVEN22VX.cjs} +9 -9
- package/dist/{chunk-XABHWJ5U.cjs.map → chunk-UVEN22VX.cjs.map} +1 -1
- package/dist/{chunk-7S5IH2W7.js → chunk-VSDC3NSB.js} +3 -3
- package/dist/chunk-VSDC3NSB.js.map +1 -0
- package/dist/{chunk-ZUJ4DO5D.js → chunk-W4VYK5B3.js} +3 -3
- package/dist/chunk-W4VYK5B3.js.map +1 -0
- package/dist/chunk-Z5YZYNKY.cjs +16 -0
- package/dist/chunk-Z5YZYNKY.cjs.map +1 -0
- package/dist/{chunk-I7JM5EHU.js → chunk-ZIES2RI2.js} +32 -14
- package/dist/chunk-ZIES2RI2.js.map +1 -0
- package/dist/{core-6CQRSKZJ.js → core-XIDAXLRB.js} +70 -70
- package/dist/core-XIDAXLRB.js.map +1 -0
- package/dist/{core-AU3VAW4X.cjs → core-XJNQ4AY6.cjs} +70 -70
- package/dist/core-XJNQ4AY6.cjs.map +1 -0
- package/dist/default-u_dwuiYb-5ZN74SQ3.js +3 -0
- package/dist/{default-u_dwuiYb-LP5TT3QO.js.map → default-u_dwuiYb-5ZN74SQ3.js.map} +1 -1
- package/dist/default-u_dwuiYb-7FN6AKL6.cjs +9 -0
- package/dist/{default-u_dwuiYb-EC2X54LJ.cjs.map → default-u_dwuiYb-7FN6AKL6.cjs.map} +1 -1
- package/dist/{dist-VVOA7ZJG.js → dist-NFEDHPSW.js} +3 -3
- package/dist/dist-NFEDHPSW.js.map +1 -0
- package/dist/{dist-MVRS4PJB.cjs → dist-NOTPSOUY.cjs} +3 -3
- package/dist/dist-NOTPSOUY.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +6 -6
- package/dist/effect-QlVUlMFu-DC6R73VB.js +15 -0
- package/dist/effect-QlVUlMFu-DC6R73VB.js.map +1 -0
- package/dist/effect-QlVUlMFu-PNHEHKYR.cjs +17 -0
- package/dist/effect-QlVUlMFu-PNHEHKYR.cjs.map +1 -0
- package/dist/{esm-XCKJ5Z6I.cjs → esm-DFCHSIJZ.cjs} +43 -43
- package/dist/{esm-XCKJ5Z6I.cjs.map → esm-DFCHSIJZ.cjs.map} +1 -1
- package/dist/{esm-O6BGW5O2.js → esm-PXGQ5WB4.js} +43 -43
- package/dist/{esm-O6BGW5O2.js.map → esm-PXGQ5WB4.js.map} +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.js +3 -3
- package/dist/server/index.cjs +10 -164
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +11 -165
- package/dist/server/index.js.map +1 -1
- package/dist/services/deps.d.ts.map +1 -1
- package/dist/services/index.cjs +4 -4
- package/dist/services/index.js +1 -1
- package/dist/sury-CWZTCd75-55GSD4RW.cjs +17 -0
- package/dist/sury-CWZTCd75-55GSD4RW.cjs.map +1 -0
- package/dist/sury-CWZTCd75-JVJHFID4.js +15 -0
- package/dist/sury-CWZTCd75-JVJHFID4.js.map +1 -0
- package/dist/typebox-Dei93FPO-DJVAER2O.js +8 -0
- package/dist/typebox-Dei93FPO-DJVAER2O.js.map +1 -0
- package/dist/typebox-Dei93FPO-LEVQVWFS.cjs +10 -0
- package/dist/typebox-Dei93FPO-LEVQVWFS.cjs.map +1 -0
- package/dist/valibot--1zFm7rT-OLXWYHVG.js +15 -0
- package/dist/valibot--1zFm7rT-OLXWYHVG.js.map +1 -0
- package/dist/valibot--1zFm7rT-QMXXDTGR.cjs +17 -0
- package/dist/valibot--1zFm7rT-QMXXDTGR.cjs.map +1 -0
- package/dist/{valibot-D_HTw1Gn-Q6P44V54.js → valibot-D_HTw1Gn-FXXGU2IM.js} +5 -5
- package/dist/valibot-D_HTw1Gn-FXXGU2IM.js.map +1 -0
- package/dist/{valibot-D_HTw1Gn-U6IRYYPK.cjs → valibot-D_HTw1Gn-HS4L7VPK.cjs} +7 -7
- package/dist/valibot-D_HTw1Gn-HS4L7VPK.cjs.map +1 -0
- package/dist/{zod-Bwrt9trS-KSTCMD4H.js → zod-Bwrt9trS-FLKNH663.js} +6 -6
- package/dist/zod-Bwrt9trS-FLKNH663.js.map +1 -0
- package/dist/zod-Bwrt9trS-XK3QIAGU.cjs +31 -0
- package/dist/zod-Bwrt9trS-XK3QIAGU.cjs.map +1 -0
- package/dist/{zod-DSgpEGAE-HGCVPPB4.js → zod-DSgpEGAE-A3OBIXDX.js} +5 -5
- package/dist/zod-DSgpEGAE-A3OBIXDX.js.map +1 -0
- package/dist/{zod-DSgpEGAE-AWAPWX2N.cjs → zod-DSgpEGAE-YFFM3XDP.cjs} +7 -7
- package/dist/zod-DSgpEGAE-YFFM3XDP.cjs.map +1 -0
- package/package.json +8 -8
- package/dist/arktype-aI7TBD0R-3P5RF7MP.js +0 -8
- package/dist/arktype-aI7TBD0R-3P5RF7MP.js.map +0 -1
- package/dist/arktype-aI7TBD0R-MM5ZQA7T.cjs +0 -10
- package/dist/arktype-aI7TBD0R-MM5ZQA7T.cjs.map +0 -1
- package/dist/chunk-25FDH34P.cjs +0 -4
- package/dist/chunk-3BPH376H.cjs +0 -8
- package/dist/chunk-3BPH376H.cjs.map +0 -1
- package/dist/chunk-5AW6ZK5L.js +0 -3
- package/dist/chunk-5TILMGJA.cjs.map +0 -1
- package/dist/chunk-7S5IH2W7.js.map +0 -1
- package/dist/chunk-AQL6MQFJ.cjs.map +0 -1
- package/dist/chunk-H3XBG3TG.js.map +0 -1
- package/dist/chunk-I5QGSZ76.cjs +0 -16
- package/dist/chunk-I5QGSZ76.cjs.map +0 -1
- package/dist/chunk-I7JM5EHU.js.map +0 -1
- package/dist/chunk-ISGGMBYN.js.map +0 -1
- package/dist/chunk-O3MMPMLF.cjs.map +0 -1
- package/dist/chunk-PUO4FNLE.cjs.map +0 -1
- package/dist/chunk-QEZZJA2G.js +0 -6
- package/dist/chunk-QEZZJA2G.js.map +0 -1
- package/dist/chunk-QJGW77MV.cjs.map +0 -1
- package/dist/chunk-RJXYP6DA.cjs.map +0 -1
- package/dist/chunk-SQEAL6BL.js +0 -14
- package/dist/chunk-SQEAL6BL.js.map +0 -1
- package/dist/chunk-YHEVEEDG.js.map +0 -1
- package/dist/chunk-ZUJ4DO5D.js.map +0 -1
- package/dist/core-6CQRSKZJ.js.map +0 -1
- package/dist/core-AU3VAW4X.cjs.map +0 -1
- package/dist/default-u_dwuiYb-EC2X54LJ.cjs +0 -9
- package/dist/default-u_dwuiYb-LP5TT3QO.js +0 -3
- package/dist/dist-MVRS4PJB.cjs.map +0 -1
- package/dist/dist-PXHGZMQ4.js +0 -49767
- package/dist/dist-PXHGZMQ4.js.map +0 -1
- package/dist/dist-VVOA7ZJG.js.map +0 -1
- package/dist/dist-WKLFRGVR.cjs +0 -49909
- package/dist/dist-WKLFRGVR.cjs.map +0 -1
- package/dist/effect-QlVUlMFu-AG2UGFDX.cjs +0 -17
- package/dist/effect-QlVUlMFu-AG2UGFDX.cjs.map +0 -1
- package/dist/effect-QlVUlMFu-CMIANNDJ.js +0 -15
- package/dist/effect-QlVUlMFu-CMIANNDJ.js.map +0 -1
- package/dist/sury-CWZTCd75-3I5DBBFO.js +0 -15
- package/dist/sury-CWZTCd75-3I5DBBFO.js.map +0 -1
- package/dist/sury-CWZTCd75-KWZ5SP6R.cjs +0 -17
- package/dist/sury-CWZTCd75-KWZ5SP6R.cjs.map +0 -1
- package/dist/typebox-Dei93FPO-PLRBZ6HI.cjs +0 -10
- package/dist/typebox-Dei93FPO-PLRBZ6HI.cjs.map +0 -1
- package/dist/typebox-Dei93FPO-QYPV4NRU.js +0 -8
- package/dist/typebox-Dei93FPO-QYPV4NRU.js.map +0 -1
- package/dist/valibot--1zFm7rT-C7A7FGJ2.js +0 -15
- package/dist/valibot--1zFm7rT-C7A7FGJ2.js.map +0 -1
- package/dist/valibot--1zFm7rT-KMUXFXU5.cjs +0 -17
- package/dist/valibot--1zFm7rT-KMUXFXU5.cjs.map +0 -1
- package/dist/valibot-D_HTw1Gn-Q6P44V54.js.map +0 -1
- package/dist/valibot-D_HTw1Gn-U6IRYYPK.cjs.map +0 -1
- package/dist/zod-Bwrt9trS-7ZKFPQIW.cjs +0 -31
- package/dist/zod-Bwrt9trS-7ZKFPQIW.cjs.map +0 -1
- package/dist/zod-Bwrt9trS-KSTCMD4H.js.map +0 -1
- package/dist/zod-DSgpEGAE-AWAPWX2N.cjs.map +0 -1
- package/dist/zod-DSgpEGAE-HGCVPPB4.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQMU7GKMZ_cjs = require('./chunk-QMU7GKMZ.cjs');
|
|
4
4
|
var chunkKBVOYAAL_cjs = require('./chunk-KBVOYAAL.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkUEH6D24P_cjs = require('./chunk-UEH6D24P.cjs');
|
|
6
6
|
|
|
7
7
|
// src/deploy/base.ts
|
|
8
|
-
var Deployer = class extends
|
|
9
|
-
deps = new
|
|
8
|
+
var Deployer = class extends chunkQMU7GKMZ_cjs.Bundler {
|
|
9
|
+
deps = new chunkUEH6D24P_cjs.DepsService();
|
|
10
10
|
constructor(args) {
|
|
11
11
|
super(args.name, "DEPLOYER");
|
|
12
12
|
this.deps.__setLogger(this.logger);
|
|
@@ -14,7 +14,7 @@ var Deployer = class extends chunkRJXYP6DA_cjs.Bundler {
|
|
|
14
14
|
getEnvFiles() {
|
|
15
15
|
const possibleFiles = [".env.production", ".env.local", ".env"];
|
|
16
16
|
try {
|
|
17
|
-
const fileService = new
|
|
17
|
+
const fileService = new chunkUEH6D24P_cjs.FileService();
|
|
18
18
|
const envFile = fileService.getFirstExistingFile(possibleFiles);
|
|
19
19
|
return Promise.resolve([envFile]);
|
|
20
20
|
} catch {
|
|
@@ -34,19 +34,19 @@ async function getDeployer(entryFile, outputDir, logger) {
|
|
|
34
34
|
|
|
35
35
|
Object.defineProperty(exports, "Deps", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkUEH6D24P_cjs.Deps; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "FileService", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkUEH6D24P_cjs.FileService; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "createChildProcessLogger", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkUEH6D24P_cjs.createChildProcessLogger; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "createPinoStream", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkUEH6D24P_cjs.createPinoStream; }
|
|
50
50
|
});
|
|
51
51
|
exports.Deployer = Deployer;
|
|
52
52
|
exports.getDeployer = getDeployer;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Bundler } from './chunk-
|
|
1
|
+
import { Bundler } from './chunk-LIJZEBIG.js';
|
|
2
2
|
import { extractMastraOption } from './chunk-FXJXKXAV.js';
|
|
3
|
-
import { DepsService, FileService } from './chunk-
|
|
4
|
-
export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-
|
|
3
|
+
import { DepsService, FileService } from './chunk-ZIES2RI2.js';
|
|
4
|
+
export { Deps, FileService, createChildProcessLogger, createPinoStream } from './chunk-ZIES2RI2.js';
|
|
5
5
|
|
|
6
6
|
// src/deploy/base.ts
|
|
7
7
|
var Deployer = class extends Bundler {
|
package/dist/server/index.cjs
CHANGED
|
@@ -1122,7 +1122,7 @@ var ERR_STREAM_WRITE_AFTER_END = class extends Error {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
};
|
|
1124
1124
|
|
|
1125
|
-
//
|
|
1125
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fetch-to-node/2.1.0/75a085586b95f3a18a440f8655a7cb5c851846ab2c5e6ad2c4ae036e3bbaa05c/node_modules/fetch-to-node/dist/fetch-to-node/http-incoming.js
|
|
1126
1126
|
var kHeaders = /* @__PURE__ */ Symbol("kHeaders");
|
|
1127
1127
|
var kHeadersDistinct = /* @__PURE__ */ Symbol("kHeadersDistinct");
|
|
1128
1128
|
var kHeadersCount = /* @__PURE__ */ Symbol("kHeadersCount");
|
|
@@ -1456,7 +1456,7 @@ function onError(self, error, cb) {
|
|
|
1456
1456
|
}
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
|
-
//
|
|
1459
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fetch-to-node/2.1.0/75a085586b95f3a18a440f8655a7cb5c851846ab2c5e6ad2c4ae036e3bbaa05c/node_modules/fetch-to-node/dist/utils/types.js
|
|
1460
1460
|
function validateString(value, name) {
|
|
1461
1461
|
if (typeof value !== "string")
|
|
1462
1462
|
throw new ERR_INVALID_ARG_TYPE(name, "string", value);
|
|
@@ -1493,19 +1493,19 @@ function isUint8Array(value) {
|
|
|
1493
1493
|
return value != null && value[Symbol.toStringTag] === "Uint8Array";
|
|
1494
1494
|
}
|
|
1495
1495
|
|
|
1496
|
-
//
|
|
1496
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fetch-to-node/2.1.0/75a085586b95f3a18a440f8655a7cb5c851846ab2c5e6ad2c4ae036e3bbaa05c/node_modules/fetch-to-node/dist/fetch-to-node/internal-http.js
|
|
1497
1497
|
var kNeedDrain = /* @__PURE__ */ Symbol("kNeedDrain");
|
|
1498
1498
|
var kOutHeaders = /* @__PURE__ */ Symbol("kOutHeaders");
|
|
1499
1499
|
function utcDate() {
|
|
1500
1500
|
return (/* @__PURE__ */ new Date()).toUTCString();
|
|
1501
1501
|
}
|
|
1502
1502
|
|
|
1503
|
-
//
|
|
1503
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fetch-to-node/2.1.0/75a085586b95f3a18a440f8655a7cb5c851846ab2c5e6ad2c4ae036e3bbaa05c/node_modules/fetch-to-node/dist/fetch-to-node/internal-streams-state.js
|
|
1504
1504
|
function getDefaultHighWaterMark(objectMode) {
|
|
1505
1505
|
return objectMode ? 16 : 64 * 1024;
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
|
-
//
|
|
1508
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fetch-to-node/2.1.0/75a085586b95f3a18a440f8655a7cb5c851846ab2c5e6ad2c4ae036e3bbaa05c/node_modules/fetch-to-node/dist/fetch-to-node/http-common.js
|
|
1509
1509
|
var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;
|
|
1510
1510
|
function checkIsHttpToken(val) {
|
|
1511
1511
|
return tokenRegExp.test(val);
|
|
@@ -2786,160 +2786,6 @@ function toFetchResponse(res) {
|
|
|
2786
2786
|
}
|
|
2787
2787
|
return res.fetchResponse;
|
|
2788
2788
|
}
|
|
2789
|
-
var _a;
|
|
2790
|
-
// @__NO_SIDE_EFFECTS__
|
|
2791
|
-
function $constructor(name, initializer3, params) {
|
|
2792
|
-
function init(inst, def) {
|
|
2793
|
-
if (!inst._zod) {
|
|
2794
|
-
Object.defineProperty(inst, "_zod", {
|
|
2795
|
-
value: {
|
|
2796
|
-
def,
|
|
2797
|
-
constr: _,
|
|
2798
|
-
traits: /* @__PURE__ */ new Set()
|
|
2799
|
-
},
|
|
2800
|
-
enumerable: false
|
|
2801
|
-
});
|
|
2802
|
-
}
|
|
2803
|
-
if (inst._zod.traits.has(name)) {
|
|
2804
|
-
return;
|
|
2805
|
-
}
|
|
2806
|
-
inst._zod.traits.add(name);
|
|
2807
|
-
initializer3(inst, def);
|
|
2808
|
-
const proto = _.prototype;
|
|
2809
|
-
const keys = Object.keys(proto);
|
|
2810
|
-
for (let i = 0; i < keys.length; i++) {
|
|
2811
|
-
const k = keys[i];
|
|
2812
|
-
if (!(k in inst)) {
|
|
2813
|
-
inst[k] = proto[k].bind(inst);
|
|
2814
|
-
}
|
|
2815
|
-
}
|
|
2816
|
-
}
|
|
2817
|
-
function _(def) {
|
|
2818
|
-
var _a2;
|
|
2819
|
-
const inst = this;
|
|
2820
|
-
init(inst, def);
|
|
2821
|
-
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
2822
|
-
for (const fn of inst._zod.deferred) {
|
|
2823
|
-
fn();
|
|
2824
|
-
}
|
|
2825
|
-
return inst;
|
|
2826
|
-
}
|
|
2827
|
-
Object.defineProperty(_, "init", { value: init });
|
|
2828
|
-
Object.defineProperty(_, Symbol.hasInstance, {
|
|
2829
|
-
value: (inst) => {
|
|
2830
|
-
return inst?._zod?.traits?.has(name);
|
|
2831
|
-
}
|
|
2832
|
-
});
|
|
2833
|
-
Object.defineProperty(_, "name", { value: name });
|
|
2834
|
-
return _;
|
|
2835
|
-
}
|
|
2836
|
-
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
2837
|
-
function jsonStringifyReplacer(_, value) {
|
|
2838
|
-
if (typeof value === "bigint")
|
|
2839
|
-
return value.toString();
|
|
2840
|
-
return value;
|
|
2841
|
-
}
|
|
2842
|
-
var initializer = (inst, def) => {
|
|
2843
|
-
inst.name = "$ZodError";
|
|
2844
|
-
Object.defineProperty(inst, "_zod", {
|
|
2845
|
-
value: inst._zod,
|
|
2846
|
-
enumerable: false
|
|
2847
|
-
});
|
|
2848
|
-
Object.defineProperty(inst, "issues", {
|
|
2849
|
-
value: def,
|
|
2850
|
-
enumerable: false
|
|
2851
|
-
});
|
|
2852
|
-
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
2853
|
-
Object.defineProperty(inst, "toString", {
|
|
2854
|
-
value: () => inst.message,
|
|
2855
|
-
enumerable: false
|
|
2856
|
-
});
|
|
2857
|
-
};
|
|
2858
|
-
var $ZodError = /* @__PURE__ */ $constructor("$ZodError", initializer);
|
|
2859
|
-
function flattenError(error, mapper = (issue) => issue.message) {
|
|
2860
|
-
const fieldErrors = {};
|
|
2861
|
-
const formErrors = [];
|
|
2862
|
-
for (const sub of error.issues) {
|
|
2863
|
-
if (sub.path.length > 0) {
|
|
2864
|
-
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
2865
|
-
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
2866
|
-
} else {
|
|
2867
|
-
formErrors.push(mapper(sub));
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
return { formErrors, fieldErrors };
|
|
2871
|
-
}
|
|
2872
|
-
function formatError(error, mapper = (issue) => issue.message) {
|
|
2873
|
-
const fieldErrors = { _errors: [] };
|
|
2874
|
-
const processError = (error2, path = []) => {
|
|
2875
|
-
for (const issue of error2.issues) {
|
|
2876
|
-
if (issue.code === "invalid_union" && issue.errors.length) {
|
|
2877
|
-
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
2878
|
-
} else if (issue.code === "invalid_key") {
|
|
2879
|
-
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
2880
|
-
} else if (issue.code === "invalid_element") {
|
|
2881
|
-
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
2882
|
-
} else {
|
|
2883
|
-
const fullpath = [...path, ...issue.path];
|
|
2884
|
-
if (fullpath.length === 0) {
|
|
2885
|
-
fieldErrors._errors.push(mapper(issue));
|
|
2886
|
-
} else {
|
|
2887
|
-
let curr = fieldErrors;
|
|
2888
|
-
let i = 0;
|
|
2889
|
-
while (i < fullpath.length) {
|
|
2890
|
-
const el = fullpath[i];
|
|
2891
|
-
const terminal = i === fullpath.length - 1;
|
|
2892
|
-
if (!terminal) {
|
|
2893
|
-
curr[el] = curr[el] || { _errors: [] };
|
|
2894
|
-
} else {
|
|
2895
|
-
curr[el] = curr[el] || { _errors: [] };
|
|
2896
|
-
curr[el]._errors.push(mapper(issue));
|
|
2897
|
-
}
|
|
2898
|
-
curr = curr[el];
|
|
2899
|
-
i++;
|
|
2900
|
-
}
|
|
2901
|
-
}
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
};
|
|
2905
|
-
processError(error);
|
|
2906
|
-
return fieldErrors;
|
|
2907
|
-
}
|
|
2908
|
-
var initializer2 = (inst, issues) => {
|
|
2909
|
-
$ZodError.init(inst, issues);
|
|
2910
|
-
inst.name = "ZodError";
|
|
2911
|
-
Object.defineProperties(inst, {
|
|
2912
|
-
format: {
|
|
2913
|
-
value: (mapper) => formatError(inst, mapper)
|
|
2914
|
-
// enumerable: false,
|
|
2915
|
-
},
|
|
2916
|
-
flatten: {
|
|
2917
|
-
value: (mapper) => flattenError(inst, mapper)
|
|
2918
|
-
// enumerable: false,
|
|
2919
|
-
},
|
|
2920
|
-
addIssue: {
|
|
2921
|
-
value: (issue) => {
|
|
2922
|
-
inst.issues.push(issue);
|
|
2923
|
-
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
2924
|
-
}
|
|
2925
|
-
// enumerable: false,
|
|
2926
|
-
},
|
|
2927
|
-
addIssues: {
|
|
2928
|
-
value: (issues2) => {
|
|
2929
|
-
inst.issues.push(...issues2);
|
|
2930
|
-
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
2931
|
-
}
|
|
2932
|
-
// enumerable: false,
|
|
2933
|
-
},
|
|
2934
|
-
isEmpty: {
|
|
2935
|
-
get() {
|
|
2936
|
-
return inst.issues.length === 0;
|
|
2937
|
-
}
|
|
2938
|
-
// enumerable: false,
|
|
2939
|
-
}
|
|
2940
|
-
});
|
|
2941
|
-
};
|
|
2942
|
-
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
2943
2789
|
async function setupBrowserStream(app, config) {
|
|
2944
2790
|
let createNodeWebSocket;
|
|
2945
2791
|
try {
|
|
@@ -3341,7 +3187,7 @@ var MastraServer = class extends serverAdapter.MastraServer {
|
|
|
3341
3187
|
this.mastra.getLogger()?.error("Error parsing query params", {
|
|
3342
3188
|
error: error instanceof Error ? { message: error.message, stack: error.stack } : error
|
|
3343
3189
|
});
|
|
3344
|
-
if (error
|
|
3190
|
+
if (serverAdapter.isZodError(error)) {
|
|
3345
3191
|
const { status, body } = this.resolveValidationError(route, error, "query");
|
|
3346
3192
|
return c.json(body, status);
|
|
3347
3193
|
}
|
|
@@ -3361,7 +3207,7 @@ var MastraServer = class extends serverAdapter.MastraServer {
|
|
|
3361
3207
|
this.mastra.getLogger()?.error("Error parsing body", {
|
|
3362
3208
|
error: error instanceof Error ? { message: error.message, stack: error.stack } : error
|
|
3363
3209
|
});
|
|
3364
|
-
if (error
|
|
3210
|
+
if (serverAdapter.isZodError(error)) {
|
|
3365
3211
|
const { status, body } = this.resolveValidationError(route, error, "body");
|
|
3366
3212
|
return c.json(body, status);
|
|
3367
3213
|
}
|
|
@@ -3381,7 +3227,7 @@ var MastraServer = class extends serverAdapter.MastraServer {
|
|
|
3381
3227
|
this.mastra.getLogger()?.error("Error parsing path params", {
|
|
3382
3228
|
error: error instanceof Error ? { message: error.message, stack: error.stack } : error
|
|
3383
3229
|
});
|
|
3384
|
-
if (error
|
|
3230
|
+
if (serverAdapter.isZodError(error)) {
|
|
3385
3231
|
const { status, body } = this.resolveValidationError(route, error, "path");
|
|
3386
3232
|
return c.json(body, status);
|
|
3387
3233
|
}
|
|
@@ -3610,7 +3456,7 @@ var MastraServer = class extends serverAdapter.MastraServer {
|
|
|
3610
3456
|
}
|
|
3611
3457
|
};
|
|
3612
3458
|
|
|
3613
|
-
//
|
|
3459
|
+
// ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/hono-openapi/1.3.0/035d260600a42913f76dd24fcc9861a3c842bbc4d97752e6a60bec128b84de4b/node_modules/hono-openapi/dist/index.js
|
|
3614
3460
|
var uniqueSymbol = /* @__PURE__ */ Symbol("openapi");
|
|
3615
3461
|
function describeRoute(spec) {
|
|
3616
3462
|
const middleware2 = async (_c, next) => {
|
|
@@ -4545,7 +4391,7 @@ async function createHonoServer(mastra, options = {
|
|
|
4545
4391
|
cloudApiEndpoint: `'${cloudApiEndpoint}'`,
|
|
4546
4392
|
experimentalFeatures: `'${experimentalFeatures}'`,
|
|
4547
4393
|
templates: `'${templatesEnabled}'`,
|
|
4548
|
-
telemetryDisabled: `''`,
|
|
4394
|
+
telemetryDisabled: `'${process.env.MASTRA_TELEMETRY_DISABLED ?? ""}'`,
|
|
4549
4395
|
requestContextPresets: `'${escapeForHtml(requestContextPresets)}'`,
|
|
4550
4396
|
experimentalUI: `'${experimentalUI}'`,
|
|
4551
4397
|
agentSignals: `'${agentSignals}'`,
|