mastra 1.0.0-beta.17 → 1.0.0-beta.19
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 +34 -0
- package/dist/{chunk-Q2XMQYH7.js → chunk-5I4BC7I4.js} +6 -6
- package/dist/{chunk-Q2XMQYH7.js.map → chunk-5I4BC7I4.js.map} +1 -1
- package/dist/commands/actions/migrate.d.ts +8 -0
- package/dist/commands/actions/migrate.d.ts.map +1 -0
- package/dist/commands/create/create.js +1 -1
- package/dist/commands/migrate/MigrateBundler.d.ts +12 -0
- package/dist/commands/migrate/MigrateBundler.d.ts.map +1 -0
- package/dist/commands/migrate/migrate.d.ts +8 -0
- package/dist/commands/migrate/migrate.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +294 -58
- package/dist/index.js.map +1 -1
- package/dist/studio/assets/{abap-YGyFycDf.js → abap-DVU-ofbM.js} +1 -1
- package/dist/studio/assets/{abnf-Dw9FoI_7.js → abnf-Da_wzX5p.js} +1 -1
- package/dist/studio/assets/{actionscript-D0w_OIh-.js → actionscript--riGP-zJ.js} +1 -1
- package/dist/studio/assets/{ada-Iep3pP-f.js → ada-B9GTh25F.js} +1 -1
- package/dist/studio/assets/{agda-DS8Bhn3e.js → agda-DKRYW57V.js} +1 -1
- package/dist/studio/assets/{al-C7Lr_nsO.js → al-DCJrjpkj.js} +1 -1
- package/dist/studio/assets/{antlr4-B3xfesNI.js → antlr4-DRXg42oz.js} +1 -1
- package/dist/studio/assets/{apacheconf-akOLD2i8.js → apacheconf-DjmQa1Zk.js} +1 -1
- package/dist/studio/assets/{apex-DudA8yAM.js → apex-Bf78Wtcr.js} +1 -1
- package/dist/studio/assets/{apl-h0dl2Upv.js → apl-3p2LbP5y.js} +1 -1
- package/dist/studio/assets/{applescript-CICfzxaS.js → applescript-GS7YwJ8l.js} +1 -1
- package/dist/studio/assets/{aql-CgI6pXGi.js → aql-CsjwPKZq.js} +1 -1
- package/dist/studio/assets/{arduino-CUyVsTYJ.js → arduino-CRCMXEMi.js} +1 -1
- package/dist/studio/assets/{arff-DmWOl2f-.js → arff-DWJwlhTd.js} +1 -1
- package/dist/studio/assets/{asciidoc-Ch4bGos1.js → asciidoc-CDPcK3Wm.js} +1 -1
- package/dist/studio/assets/{asm6502-BO_-pDd_.js → asm6502-B9F-fxOb.js} +1 -1
- package/dist/studio/assets/{asmatmel-BeU5XrzY.js → asmatmel-DWABos8u.js} +1 -1
- package/dist/studio/assets/{aspnet-Dds1BEQD.js → aspnet-D_QFSJhV.js} +1 -1
- package/dist/studio/assets/{autohotkey-i8KL5JCA.js → autohotkey-_yEqGigm.js} +1 -1
- package/dist/studio/assets/{autoit-CjyF62Sy.js → autoit-RsXUmjUX.js} +1 -1
- package/dist/studio/assets/{avisynth-DUlWqnM_.js → avisynth-BFBG-FML.js} +1 -1
- package/dist/studio/assets/{avro-idl-D4cQGPES.js → avro-idl-BRv2_ktP.js} +1 -1
- package/dist/studio/assets/{bash-BPMaBaEg.js → bash-C_hNVE7G.js} +1 -1
- package/dist/studio/assets/{basic-B5QPtHh7.js → basic-CRyKmNKD.js} +1 -1
- package/dist/studio/assets/{batch-chk4h8yv.js → batch-CkRKj7ZM.js} +1 -1
- package/dist/studio/assets/{bbcode-ywjBQsY3.js → bbcode-CV4D0YDt.js} +1 -1
- package/dist/studio/assets/{bicep-BIp_7XY2.js → bicep-40DlwBUv.js} +1 -1
- package/dist/studio/assets/{birb-D0tKTxnd.js → birb-CpXJCW6U.js} +1 -1
- package/dist/studio/assets/{bison-DtZOFI4L.js → bison-CMDPnogF.js} +1 -1
- package/dist/studio/assets/{bnf-CtSvg3-n.js → bnf-Da_6ItkH.js} +1 -1
- package/dist/studio/assets/{brainfuck-D13kum2K.js → brainfuck-T7HwKFjM.js} +1 -1
- package/dist/studio/assets/{brightscript-BYt0xOlR.js → brightscript-C7J4Nr9Q.js} +1 -1
- package/dist/studio/assets/{bro-Dn69VIR5.js → bro-D6vBXdtC.js} +1 -1
- package/dist/studio/assets/{bsl-BIOBBhbI.js → bsl-k_gTB0Le.js} +1 -1
- package/dist/studio/assets/{c-DxL_cidm.js → c-DBQxp504.js} +1 -1
- package/dist/studio/assets/{cfscript-CpGoKWhQ.js → cfscript-rlyZf9pm.js} +1 -1
- package/dist/studio/assets/{chaiscript-BkSvB8ts.js → chaiscript-BlW62OoP.js} +1 -1
- package/dist/studio/assets/{chunk-55VPMN3N-bNcqLELj.js → chunk-55VPMN3N-7h-uvGxn.js} +1 -1
- package/dist/studio/assets/{chunk-55VPMN3N-Ax1F4Y75-D2srlJqJ.js → chunk-55VPMN3N-Ax1F4Y75-w2NrKP2P.js} +1 -1
- package/dist/studio/assets/{cil-BSVnbJf4.js → cil-B5hufUJA.js} +1 -1
- package/dist/studio/assets/{clike-B816yqB5.js → clike-B5SB4vO2.js} +1 -1
- package/dist/studio/assets/{clojure-CHUsfTNV.js → clojure-DiO-udpv.js} +1 -1
- package/dist/studio/assets/{cmake-DaRdGDqY.js → cmake-BvYjy735.js} +1 -1
- package/dist/studio/assets/{cobol-BJ59Yk6K.js → cobol-CINUQt_M.js} +1 -1
- package/dist/studio/assets/{coffeescript-BSgdvr05.js → coffeescript-BA5ml6_3.js} +1 -1
- package/dist/studio/assets/{concurnas-efFUd_aK.js → concurnas-BPYO7IaU.js} +1 -1
- package/dist/studio/assets/{coq-Brsd57ya.js → coq-DzH5AepQ.js} +1 -1
- package/dist/studio/assets/{core-CM3oIdsE.js → core-D14Evsir.js} +1 -1
- package/dist/studio/assets/{cpp-DNKX1YHM.js → cpp-D5uvEtNZ.js} +1 -1
- package/dist/studio/assets/{crystal-CBgzfDpw.js → crystal-C2RXXfYu.js} +1 -1
- package/dist/studio/assets/{csharp-ChfCVGI6.js → csharp-Cz6i68UO.js} +1 -1
- package/dist/studio/assets/{cshtml-BhGH8Itw.js → cshtml-S_c0BAX_.js} +1 -1
- package/dist/studio/assets/{csp-ByAq2ArO.js → csp-DUhugXqP.js} +1 -1
- package/dist/studio/assets/{css--fP46eha.js → css-BeiCa0aq.js} +1 -1
- package/dist/studio/assets/{css-extras-DPW34iI2.js → css-extras-FkenCC1V.js} +1 -1
- package/dist/studio/assets/{csv-DcJ622XR.js → csv-B44Rcmvq.js} +1 -1
- package/dist/studio/assets/{cypher-Bi_dlFib.js → cypher-BXkM4IT4.js} +1 -1
- package/dist/studio/assets/{d-DPA7nBhT.js → d-BoFrnxdw.js} +1 -1
- package/dist/studio/assets/{dart-B-LK8f-9.js → dart-BT4h9m-a.js} +1 -1
- package/dist/studio/assets/{dataweave-DpT13HTv.js → dataweave-DhPyKDVS.js} +1 -1
- package/dist/studio/assets/{dax-BuI_sO2D.js → dax-Bywh8rcF.js} +1 -1
- package/dist/studio/assets/{dhall-DWguuXIE.js → dhall-B0PbZHVJ.js} +1 -1
- package/dist/studio/assets/{diff-4bT_1-lI.js → diff-CzJZo9jr.js} +1 -1
- package/dist/studio/assets/{django-DQz2bNxk.js → django-DC0hqXDy.js} +1 -1
- package/dist/studio/assets/{dns-zone-file-Bb2tiDY2.js → dns-zone-file-BDko0hWU.js} +1 -1
- package/dist/studio/assets/{docker-CPWeo3RS.js → docker-BtL8_hUo.js} +1 -1
- package/dist/studio/assets/{dot-BWPKgFjP.js → dot-CiHoXELh.js} +1 -1
- package/dist/studio/assets/{ebnf-DValhRKa.js → ebnf-Bx_UFIWA.js} +1 -1
- package/dist/studio/assets/{editorconfig-LYNomH8D.js → editorconfig-BfRJwb48.js} +1 -1
- package/dist/studio/assets/{eiffel-BW4h1Zxw.js → eiffel-DLByY_pS.js} +1 -1
- package/dist/studio/assets/{ejs-em2-ZDQD.js → ejs-DIbOzUlF.js} +1 -1
- package/dist/studio/assets/{elixir-CofHsNha.js → elixir-Bi2R_h_x.js} +1 -1
- package/dist/studio/assets/{elm-BaCNXv4L.js → elm-D_VD4ZOp.js} +1 -1
- package/dist/studio/assets/{erb-DHUJGLXt.js → erb-D_EXn0DN.js} +1 -1
- package/dist/studio/assets/{erlang-CQtguqOZ.js → erlang-Bu77bU_K.js} +1 -1
- package/dist/studio/assets/{etlua-Bz42E62n.js → etlua-BFFGhY-Z.js} +1 -1
- package/dist/studio/assets/{excel-formula-BDU1bYGP.js → excel-formula-f4K7jnHq.js} +1 -1
- package/dist/studio/assets/{factor-BU7_ykUx.js → factor-B8vabn_x.js} +1 -1
- package/dist/studio/assets/{false-TS4Sk21e.js → false-BdyrKSsM.js} +1 -1
- package/dist/studio/assets/{firestore-security-rules-CTcYocp9.js → firestore-security-rules-Ck8l8MrW.js} +1 -1
- package/dist/studio/assets/{flow-Ci_r1Cq1.js → flow-CVxRkGDU.js} +1 -1
- package/dist/studio/assets/{fortran-CbcM0iOY.js → fortran-DHK41TlN.js} +1 -1
- package/dist/studio/assets/{fsharp-CKavpzZe.js → fsharp-AP1QXbiZ.js} +1 -1
- package/dist/studio/assets/{ftl-Bv221C93.js → ftl-DxopztnG.js} +1 -1
- package/dist/studio/assets/{gap-CDfh0kp0.js → gap-DNAq7wcM.js} +1 -1
- package/dist/studio/assets/{gcode-p5BgOgKi.js → gcode-BEkcwFqs.js} +1 -1
- package/dist/studio/assets/{gdscript-CMUUOC_9.js → gdscript-D3MrQB3A.js} +1 -1
- package/dist/studio/assets/{gedcom-CLZ_mwsK.js → gedcom-D2xe_i6p.js} +1 -1
- package/dist/studio/assets/{gherkin-6H4NcIIs.js → gherkin-CfD7h3px.js} +1 -1
- package/dist/studio/assets/{git-BZYJRscP.js → git-Cwq_cahj.js} +1 -1
- package/dist/studio/assets/{glsl-BjA8r_uk.js → glsl-D0CcO2Td.js} +1 -1
- package/dist/studio/assets/{gml-CVgecefM.js → gml-D8d_W44x.js} +1 -1
- package/dist/studio/assets/{gn-DYEf1vft.js → gn-CbO48UZX.js} +1 -1
- package/dist/studio/assets/{go-module-DEZB2O_N.js → go-module-BPhqAln4.js} +1 -1
- package/dist/studio/assets/{go-qEPz4dfv.js → go-wqlRrtGA.js} +1 -1
- package/dist/studio/assets/{graphql-BWtvbXEf.js → graphql-DS8lBS8q.js} +1 -1
- package/dist/studio/assets/{groovy-B3O1yKqj.js → groovy-yCLF92cg.js} +1 -1
- package/dist/studio/assets/{haml-BxVlJEM4.js → haml-C2D_wcSJ.js} +1 -1
- package/dist/studio/assets/{handlebars-DNi2bZqs.js → handlebars-BJmaPf4W.js} +1 -1
- package/dist/studio/assets/{haskell-DS3gi663.js → haskell-Db91ltIz.js} +1 -1
- package/dist/studio/assets/{haxe-Cb9Bcj-K.js → haxe-DtQpabsz.js} +1 -1
- package/dist/studio/assets/{hcl-D6Xvih3A.js → hcl-CbacBelw.js} +1 -1
- package/dist/studio/assets/{hlsl-C4IFkBvR.js → hlsl-e6zZVoMh.js} +1 -1
- package/dist/studio/assets/{hoon-C1kacNZr.js → hoon-CAqp0j78.js} +1 -1
- package/dist/studio/assets/{hpkp-BLAk4ta6.js → hpkp-BOaZa6mB.js} +1 -1
- package/dist/studio/assets/{hsts-D2Qcwapy.js → hsts-TD6vgckh.js} +1 -1
- package/dist/studio/assets/{http-BES6-KtU.js → http-BlYRAYrd.js} +1 -1
- package/dist/studio/assets/{ichigojam-Cw7DaSHi.js → ichigojam-DVXXE57k.js} +1 -1
- package/dist/studio/assets/{icon-2pW_7Fzn.js → icon-CBwNKgiU.js} +1 -1
- package/dist/studio/assets/{icu-message-format-BMb0O8t7.js → icu-message-format-CTXlEXJ_.js} +1 -1
- package/dist/studio/assets/{idris-Bifglq7D.js → idris-CKV_ZHev.js} +1 -1
- package/dist/studio/assets/{iecst-DBBGny3S.js → iecst-CWKVHx8I.js} +1 -1
- package/dist/studio/assets/{ignore-BjxTRQnM.js → ignore-BX-NgcSW.js} +1 -1
- package/dist/studio/assets/{index-BmJffTaK.js → index-0x85l-03.js} +1 -1
- package/dist/studio/assets/{index-CozZZebP.js → index-B0aY8xCv.js} +1 -1
- package/dist/studio/assets/{index-Bfv_AokR.js → index-B0tcDSiK.js} +1 -1
- package/dist/studio/assets/{index-BgAY0iNW.js → index-BMyOXiDz.js} +1 -1
- package/dist/studio/assets/{index-CovWJ4nN.js → index-C4BgqleR.js} +1 -1
- package/dist/studio/assets/{index-LjIhWysP.js → index-CLF5MOZc.js} +1 -1
- package/dist/studio/assets/{index-NfZw4AwN.js → index-CWJKgNzp.js} +1 -1
- package/dist/studio/assets/{index-CySs70cV.js → index-D3hLiQ9M.js} +1 -1
- package/dist/studio/assets/{index-CJx-mhyb.js → index-D50NAMXb.js} +1 -1
- package/dist/studio/assets/{index-C2Qaj_DP.js → index-D6oDWlFG.js} +1 -1
- package/dist/studio/assets/{index-CQwb1prL.js → index-DEkLVfwM.js} +1 -1
- package/dist/studio/assets/{index-Dkkfi7LY.js → index-D_hlidfO.js} +1 -1
- package/dist/studio/assets/{index-BCyJTktM.js → index-DeIo3CRw.js} +1 -1
- package/dist/studio/assets/{index-B5-TlxHD.js → index-Dg7Uh3mq.js} +1 -1
- package/dist/studio/assets/{index-BRgIwg8P.js → index-Dhd4AX7M.js} +1 -1
- package/dist/studio/assets/{index-CZ6pOYqT.js → index-Y-u089Pk.js} +1 -1
- package/dist/studio/assets/{index-Bd4xS0Ce.js → index-bcR-2sVb.js} +1 -1
- package/dist/studio/assets/{index-BJt7Mwf4.js → index-kn0O4fHS.js} +1 -1
- package/dist/studio/assets/{inform7-COvBeLT2.js → inform7-BdOciMok.js} +1 -1
- package/dist/studio/assets/{ini-Bz45pQ9C.js → ini-CeRgq-XD.js} +1 -1
- package/dist/studio/assets/{io-DTrlo0qR.js → io-DzCODMZd.js} +1 -1
- package/dist/studio/assets/{j-CfOpHzTx.js → j-DglnaoKA.js} +1 -1
- package/dist/studio/assets/{java-BH9Y3i9x.js → java-BXNdL3_O.js} +1 -1
- package/dist/studio/assets/{javadoc-CryFWlK3.js → javadoc-C2hj9616.js} +1 -1
- package/dist/studio/assets/{javadoclike-_hAB2plD.js → javadoclike-CU_5SYEF.js} +1 -1
- package/dist/studio/assets/{javascript-CjUaLp7h.js → javascript-CFpiL51s.js} +1 -1
- package/dist/studio/assets/{javastacktrace-BiX871zM.js → javastacktrace-1hzn-skp.js} +1 -1
- package/dist/studio/assets/{jexl-BrXgMjst.js → jexl-rksmWFIv.js} +1 -1
- package/dist/studio/assets/{jolie-CQvELAZ4.js → jolie-BTgzxBGF.js} +1 -1
- package/dist/studio/assets/{jq-DW6E5AJg.js → jq-LwC475l-.js} +1 -1
- package/dist/studio/assets/{js-extras-Cvb7WN7g.js → js-extras-Dq1IQqJz.js} +1 -1
- package/dist/studio/assets/{js-templates-Bl7W0oVU.js → js-templates-CIizD0dy.js} +1 -1
- package/dist/studio/assets/{jsdoc-C_5LW5el.js → jsdoc-BvfZSEIj.js} +1 -1
- package/dist/studio/assets/{json-DguV6si8.js → json-CpoNWqhD.js} +1 -1
- package/dist/studio/assets/{json5-Bt2-hbIu.js → json5-4YDdKCjg.js} +1 -1
- package/dist/studio/assets/{jsonp-BPFg5KHl.js → jsonp-B9RN6rNt.js} +1 -1
- package/dist/studio/assets/{jsstacktrace-CEBU0TzY.js → jsstacktrace-Bdkpzn9x.js} +1 -1
- package/dist/studio/assets/{jsx-BCC2sMRG.js → jsx-Ce6r0QDB.js} +1 -1
- package/dist/studio/assets/{julia-CjnZnuY2.js → julia-BthWUGeW.js} +1 -1
- package/dist/studio/assets/{keepalived-CTf-sSRW.js → keepalived-CVPMyTyQ.js} +1 -1
- package/dist/studio/assets/{keyman-BBigH-U3.js → keyman-DtsZcO8D.js} +1 -1
- package/dist/studio/assets/{kotlin-CmPRz4lf.js → kotlin-D3Y9uj4Z.js} +1 -1
- package/dist/studio/assets/{kumir-CUg5IUpu.js → kumir-CPOJ0tSZ.js} +1 -1
- package/dist/studio/assets/{kusto-JLMHlP8-.js → kusto-C1HNQLhw.js} +1 -1
- package/dist/studio/assets/{latex-B4FrtL4R.js → latex-CUckh63h.js} +1 -1
- package/dist/studio/assets/{latte-D7qNcmis.js → latte-a2qg_yKy.js} +1 -1
- package/dist/studio/assets/{less-BS2CulYS.js → less-Cd_iHyqE.js} +1 -1
- package/dist/studio/assets/{lilypond-BpR1-_zl.js → lilypond-B8hVJI5I.js} +1 -1
- package/dist/studio/assets/{liquid-CpP1UwmO.js → liquid-5G90bCFj.js} +1 -1
- package/dist/studio/assets/{lisp-Cnzc89c_.js → lisp-DSOgflCq.js} +1 -1
- package/dist/studio/assets/{livescript-CDOroHcz.js → livescript-DZJcluwV.js} +1 -1
- package/dist/studio/assets/{llvm-D9nZ8tO3.js → llvm-DojEBdwB.js} +1 -1
- package/dist/studio/assets/{log-D2ROXZM8.js → log-Cd7KinAa.js} +1 -1
- package/dist/studio/assets/{lolcode-6hB6PGhz.js → lolcode-DX9zAWw1.js} +1 -1
- package/dist/studio/assets/{lua-9sSclLlx.js → lua-C8cShngG.js} +1 -1
- package/dist/studio/assets/{magma-CEqAxqDf.js → magma-COS_CW3Z.js} +1 -1
- package/dist/studio/assets/{main-Bqt8uEFZ.js → main-CumjYRdB.js} +148 -148
- package/dist/studio/assets/{makefile-k2zA8tw4.js → makefile-ORwm4Dxo.js} +1 -1
- package/dist/studio/assets/{markdown-VUxWpTAp.js → markdown-CxyFHfrN.js} +1 -1
- package/dist/studio/assets/{markup-DaZNAxX3.js → markup-Bxhiqoiv.js} +1 -1
- package/dist/studio/assets/{markup-templating-BGd-JWeT.js → markup-templating-DIsW9U8u.js} +1 -1
- package/dist/studio/assets/{matlab-Czk_4Nfv.js → matlab-rRh44SMn.js} +1 -1
- package/dist/studio/assets/{maxscript-tneuevEL.js → maxscript-v-vMqCOK.js} +1 -1
- package/dist/studio/assets/{mel-C95idxwc.js → mel-DVtn-zLf.js} +1 -1
- package/dist/studio/assets/{mermaid-m2lc3MMc.js → mermaid-Ux-WLZnN.js} +1 -1
- package/dist/studio/assets/{mizar-CPbYoEyx.js → mizar-dqohFMx8.js} +1 -1
- package/dist/studio/assets/{mongodb-B0kMnF_M.js → mongodb-fK_-f4CD.js} +1 -1
- package/dist/studio/assets/{monkey-CCUwmcc_.js → monkey-DTNMXJ5-.js} +1 -1
- package/dist/studio/assets/{moonscript-DzGgno9p.js → moonscript-DKopagrx.js} +1 -1
- package/dist/studio/assets/{n1ql-sPORk580.js → n1ql-lpQ_cspy.js} +1 -1
- package/dist/studio/assets/{n4js-C35pxfvD.js → n4js-Bx5Z4KrV.js} +1 -1
- package/dist/studio/assets/{nand2tetris-hdl-B9qvCFcK.js → nand2tetris-hdl-BdTMRXcX.js} +1 -1
- package/dist/studio/assets/{naniscript-BEKtFSqM.js → naniscript-BclpQnt-.js} +1 -1
- package/dist/studio/assets/{nasm-BCMBUv91.js → nasm-C6cNE2oB.js} +1 -1
- package/dist/studio/assets/{neon-BUp9GnTY.js → neon-CXy4pjE-.js} +1 -1
- package/dist/studio/assets/{nevod-CgXJ-hV8.js → nevod-ChY3OBYE.js} +1 -1
- package/dist/studio/assets/{nginx-Dhvn5AU2.js → nginx-BDtTo2o_.js} +1 -1
- package/dist/studio/assets/{nim-CxxAAJ1f.js → nim-SJx4qRTA.js} +1 -1
- package/dist/studio/assets/{nix-9_MsiRja.js → nix-CXEVkUTZ.js} +1 -1
- package/dist/studio/assets/{nsis-0ton36OS.js → nsis-ChqUTN3_.js} +1 -1
- package/dist/studio/assets/{objectivec-CW0WnjjN.js → objectivec-Bif_Vq9x.js} +1 -1
- package/dist/studio/assets/{ocaml-D_b-XTs2.js → ocaml-BsfIKJGt.js} +1 -1
- package/dist/studio/assets/{opencl-CknHs1vq.js → opencl-DjXC2MGY.js} +1 -1
- package/dist/studio/assets/{openqasm-BgjcWATD.js → openqasm-7hKOwGQD.js} +1 -1
- package/dist/studio/assets/{oz-BLdWrLFV.js → oz-CTS5SQXW.js} +1 -1
- package/dist/studio/assets/{parigp-DEsdoeJX.js → parigp-SK80Nczo.js} +1 -1
- package/dist/studio/assets/{parser-Dx4z10ur.js → parser-DxI4vRR1.js} +1 -1
- package/dist/studio/assets/{pascal-CHvWPVRW.js → pascal-OnGuEytz.js} +1 -1
- package/dist/studio/assets/{pascaligo-DFePfC4y.js → pascaligo-B8M5TYvp.js} +1 -1
- package/dist/studio/assets/{pcaxis-HmFBlr9b.js → pcaxis-BpNm2SVK.js} +1 -1
- package/dist/studio/assets/{peoplecode-YrjX7vSU.js → peoplecode-DXY_RaD2.js} +1 -1
- package/dist/studio/assets/{perl-TmX8MiuK.js → perl-Dtuqn4Xp.js} +1 -1
- package/dist/studio/assets/{php-BLmsv0Ql.js → php-CFo6_Ryj.js} +1 -1
- package/dist/studio/assets/{php-extras-BRzvJSHc.js → php-extras-0Nh2gQq-.js} +1 -1
- package/dist/studio/assets/{phpdoc-BZE6MqcG.js → phpdoc-CARYGbOK.js} +1 -1
- package/dist/studio/assets/{plsql-_24gpNT2.js → plsql-CQbqaNGP.js} +1 -1
- package/dist/studio/assets/{powerquery-DHQz6Xy_.js → powerquery-Dx9Pb2Np.js} +1 -1
- package/dist/studio/assets/{powershell-CQnoJd5i.js → powershell-Cx1zuFmv.js} +1 -1
- package/dist/studio/assets/{processing-y6UY5cjI.js → processing-Beh-k7Ml.js} +1 -1
- package/dist/studio/assets/{prolog-CveFGlab.js → prolog-BI5KFAjm.js} +1 -1
- package/dist/studio/assets/{promql-TLqT_let.js → promql-dcfsqAsj.js} +1 -1
- package/dist/studio/assets/{properties-CUNFAEDq.js → properties-MtCfVUMd.js} +1 -1
- package/dist/studio/assets/{protobuf-C9RHhOIn.js → protobuf-BjdKLAKV.js} +1 -1
- package/dist/studio/assets/{psl-DVuUL-Jb.js → psl-Cx9r6CNV.js} +1 -1
- package/dist/studio/assets/{pug-CxFUBT5O.js → pug-D8RUoMYP.js} +1 -1
- package/dist/studio/assets/{puppet-DxCwllfO.js → puppet-Dvn9LSEU.js} +1 -1
- package/dist/studio/assets/{pure-CVrznQnc.js → pure-Dh0IChNO.js} +1 -1
- package/dist/studio/assets/{purebasic-B2HEjJy7.js → purebasic-CWrbMTTI.js} +1 -1
- package/dist/studio/assets/{purescript-DYnu6-0-.js → purescript-BiNDKE2B.js} +1 -1
- package/dist/studio/assets/{python-B0l2n6yt.js → python-BVcF3XYn.js} +1 -1
- package/dist/studio/assets/{q-B_8xuot3.js → q-DURbmdfQ.js} +1 -1
- package/dist/studio/assets/{qml-BjE53Z8F.js → qml-Cy8hlIHY.js} +1 -1
- package/dist/studio/assets/{qore-sHiN03LV.js → qore-CHMHlojV.js} +1 -1
- package/dist/studio/assets/{qsharp-DiXFy8Fm.js → qsharp-GjRoYO-1.js} +1 -1
- package/dist/studio/assets/{r-BBJVK-h_.js → r-EhOfI32_.js} +1 -1
- package/dist/studio/assets/{racket-BF-AUTg-.js → racket-CzMK9lE_.js} +1 -1
- package/dist/studio/assets/{reason-C6KHJUft.js → reason-BxZCBWhb.js} +1 -1
- package/dist/studio/assets/{regex-Cm75zCE9.js → regex-CwKKPxpn.js} +1 -1
- package/dist/studio/assets/{rego-Dz64V9-t.js → rego-BWYj8GyT.js} +1 -1
- package/dist/studio/assets/{renpy-nqgOoYls.js → renpy-CUMBlHSw.js} +1 -1
- package/dist/studio/assets/{rest-xrHFrzDL.js → rest-CoMyBcfK.js} +1 -1
- package/dist/studio/assets/{rip-3AQkfE1W.js → rip-BAZ3OuaT.js} +1 -1
- package/dist/studio/assets/{roboconf-D4Q_oDWO.js → roboconf-Dw65xRZt.js} +1 -1
- package/dist/studio/assets/{robotframework-CuuUIZcu.js → robotframework-Cv6qjp7o.js} +1 -1
- package/dist/studio/assets/{ruby-DyH7mw7M.js → ruby-NcOTuLXn.js} +1 -1
- package/dist/studio/assets/{rust-BUVahpfe.js → rust-C3HDlluF.js} +1 -1
- package/dist/studio/assets/{sas-BkIkGOX3.js → sas-D12iQUos.js} +1 -1
- package/dist/studio/assets/{sass-CZJqYcIV.js → sass-DCTMN0Y7.js} +1 -1
- package/dist/studio/assets/{scala-XN-o00WL.js → scala-Wa0ZF1ri.js} +1 -1
- package/dist/studio/assets/{scheme-DpvopRpe.js → scheme-9DdswwZg.js} +1 -1
- package/dist/studio/assets/{scss-DSjtIudj.js → scss-CQJKLxeQ.js} +1 -1
- package/dist/studio/assets/{shell-session-xfKv9gNC.js → shell-session-DxI_HxuI.js} +1 -1
- package/dist/studio/assets/{smali-CDLE2Gs8.js → smali-DVtPm_Sa.js} +1 -1
- package/dist/studio/assets/{smalltalk-xZaAvy-5.js → smalltalk-BZevhEKI.js} +1 -1
- package/dist/studio/assets/{smarty-BkwI8ouH.js → smarty-BpeAPf9k.js} +1 -1
- package/dist/studio/assets/{sml-BwliANl5.js → sml-CmNxklqM.js} +1 -1
- package/dist/studio/assets/{solidity-2hz1TRLT.js → solidity-DdvPhBnT.js} +1 -1
- package/dist/studio/assets/{solution-file-IyHgiiBy.js → solution-file-BnNvcZ_P.js} +1 -1
- package/dist/studio/assets/{soy-CnTUJAlF.js → soy-Bf9GqMGA.js} +1 -1
- package/dist/studio/assets/{sparql-BucRUP4F.js → sparql-DliRUlpE.js} +1 -1
- package/dist/studio/assets/{splunk-spl-B3sKfAjY.js → splunk-spl-BWusPVvn.js} +1 -1
- package/dist/studio/assets/{sqf-Db7HreNq.js → sqf-hF6h2sKG.js} +1 -1
- package/dist/studio/assets/{sql-C3yPmKyk.js → sql-B5yz3AH1.js} +1 -1
- package/dist/studio/assets/{squirrel-BtvMjph-.js → squirrel-C2gy7Nv9.js} +1 -1
- package/dist/studio/assets/{stan-CiGEpmiz.js → stan-Qm-xpAJa.js} +1 -1
- package/dist/studio/assets/{stylus-BjPbW5yp.js → stylus-CM8v5z-b.js} +1 -1
- package/dist/studio/assets/{swift-BlhZ07T7.js → swift-Bi4v7ufT.js} +1 -1
- package/dist/studio/assets/{systemd-ByDF0Bzt.js → systemd-DQdULvua.js} +1 -1
- package/dist/studio/assets/{t4-cs-hberM4fL.js → t4-cs-CzTp815y.js} +1 -1
- package/dist/studio/assets/{t4-templating-o7yo5HpT.js → t4-templating-D1ysDxO3.js} +1 -1
- package/dist/studio/assets/{t4-vb-DnrZ4dAm.js → t4-vb--eQX5vRL.js} +1 -1
- package/dist/studio/assets/{tap-BM517ZG7.js → tap-BOPibrmg.js} +1 -1
- package/dist/studio/assets/{tcl-BhPWMGkh.js → tcl-B4PPgerr.js} +1 -1
- package/dist/studio/assets/{textile-B6jhFsf-.js → textile-gSC3r8Yp.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-SPYPLMBM-By7Q9rR0.js → token-6GSAFR2W-SPYPLMBM-C784OxO0.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-SPYPLMBM-ChURikIE-CHm9UsTP.js → token-6GSAFR2W-SPYPLMBM-ChURikIE-BlqIoOXF.js} +1 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-CVJARfpb.js +1 -0
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-AlRwFCRt.js +1 -0
- package/dist/studio/assets/{toml-1udOsMls.js → toml-BYnAhcZD.js} +1 -1
- package/dist/studio/assets/{tremor-C5Ubeef5.js → tremor-Dd-aiIOm.js} +1 -1
- package/dist/studio/assets/{tsx-CMYTks98.js → tsx-BOnlGcr5.js} +1 -1
- package/dist/studio/assets/{tt2-BcIZ7pGl.js → tt2-EB8SrkH7.js} +1 -1
- package/dist/studio/assets/{turtle-BxiXFizT.js → turtle-DzHqcrlc.js} +1 -1
- package/dist/studio/assets/{twig-C_8VVMc9.js → twig-BK8xKWFN.js} +1 -1
- package/dist/studio/assets/{typescript-BoTyBdfV.js → typescript-BkAudIJR.js} +1 -1
- package/dist/studio/assets/{typoscript-1H-3rVPh.js → typoscript-BnNQGdrR.js} +1 -1
- package/dist/studio/assets/{unrealscript-BFJbIanX.js → unrealscript-BwpVl9EE.js} +1 -1
- package/dist/studio/assets/{uorazor-C7cEGPeZ.js → uorazor-Pq9IA5Ki.js} +1 -1
- package/dist/studio/assets/{uri-udTG8G2e.js → uri-DYwX1YAI.js} +1 -1
- package/dist/studio/assets/{v-BMAxdry3.js → v-BsrzWyGG.js} +1 -1
- package/dist/studio/assets/{vala-CPL3g-5b.js → vala-BQXRv1lI.js} +1 -1
- package/dist/studio/assets/{vbnet-pZJL0wvd.js → vbnet-pcWsRFHp.js} +1 -1
- package/dist/studio/assets/{velocity-Cv694FDb.js → velocity-DYQxzAUs.js} +1 -1
- package/dist/studio/assets/{verilog-NZagcb3G.js → verilog-D3sf-ez_.js} +1 -1
- package/dist/studio/assets/{vhdl-D9PLrUAE.js → vhdl-dLP7vBSQ.js} +1 -1
- package/dist/studio/assets/{vim-DMsuV8js.js → vim-DjAIRcct.js} +1 -1
- package/dist/studio/assets/{visual-basic-MgWiO9Mk.js → visual-basic-Ac03-cCA.js} +1 -1
- package/dist/studio/assets/{warpscript-DBd9Bzrw.js → warpscript-k0YStayz.js} +1 -1
- package/dist/studio/assets/{wasm-BjoWAxKc.js → wasm-CnP0DGRU.js} +1 -1
- package/dist/studio/assets/{web-idl-Bed1xbwA.js → web-idl-BR71SOwz.js} +1 -1
- package/dist/studio/assets/{wiki-DZP34apj.js → wiki-zBomQTkt.js} +1 -1
- package/dist/studio/assets/{wolfram-5r35Vzlm.js → wolfram-Db54pnru.js} +1 -1
- package/dist/studio/assets/{wren-i1f4emrJ.js → wren-Bn8TVzYG.js} +1 -1
- package/dist/studio/assets/{xeora-DKtZdefa.js → xeora-DEoFxQcY.js} +1 -1
- package/dist/studio/assets/{xml-doc-VcVHcDxV.js → xml-doc-BKZOEifv.js} +1 -1
- package/dist/studio/assets/{xojo-BgwJwNgY.js → xojo-C3-iy602.js} +1 -1
- package/dist/studio/assets/{xquery-ChCS70So.js → xquery-Bt3VaJqs.js} +1 -1
- package/dist/studio/assets/{yaml-CFeUFJfX.js → yaml-Btor8OBf.js} +1 -1
- package/dist/studio/assets/{yang-DHElCI9q.js → yang-ZhWc3hEx.js} +1 -1
- package/dist/studio/assets/{zig-CW2xalnh.js → zig-_nTJz54-.js} +1 -1
- package/dist/studio/index.html +1 -1
- package/package.json +6 -6
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-Bd84NYiU.js +0 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-BNF1G712.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/actions/migrate.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,GAAU,MAAM;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,kBAehH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BuildBundler } from '../build/BuildBundler.js';
|
|
2
|
+
export declare class MigrateBundler extends BuildBundler {
|
|
3
|
+
private customEnvFile?;
|
|
4
|
+
constructor(customEnvFile?: string);
|
|
5
|
+
getEnvFiles(): Promise<string[]>;
|
|
6
|
+
bundle(entryFile: string, outputDirectory: string, { toolsPaths, projectRoot }: {
|
|
7
|
+
toolsPaths: (string | string[])[];
|
|
8
|
+
projectRoot: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
protected getEntry(): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=MigrateBundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MigrateBundler.d.ts","sourceRoot":"","sources":["../../../src/commands/migrate/MigrateBundler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGxD,qBAAa,cAAe,SAAQ,YAAY;IAC9C,OAAO,CAAC,aAAa,CAAC,CAAS;gBAEnB,aAAa,CAAC,EAAE,MAAM;IAKzB,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAuBnC,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE;QAAE,UAAU,EAAE,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GACtF,OAAO,CAAC,IAAI,CAAC;cAIG,QAAQ,IAAI,MAAM;CAmEtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/migrate/migrate.ts"],"names":[],"mappings":"AAkBA,wBAAsB,OAAO,CAAC,EAC5B,GAAG,EACH,IAAI,EACJ,GAAG,EACH,KAAK,EACL,GAAG,GACJ,EAAE;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd,iBA+IA"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,mBAAmB,CAAC;AAenE,eAAO,MAAM,OAAO,oBAAoB,CAAC;AAEzC,eAAO,MAAM,SAAS,kBAIpB,CAAC;AAMH,eAAO,MAAM,MAAM,EAA0C,UAAU,CAAC;AAkJxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
|
-
import { package_default, COMPONENTS, parseComponents, LLMProvider, parseLlmProvider, parseMcp, create, checkForPkgJson, getVersionTag, isGitInitialized, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService, createLogger, shouldSkipDotenvLoading, DepsService } from './chunk-
|
|
3
|
-
export { create } from './chunk-
|
|
2
|
+
import { package_default, COMPONENTS, parseComponents, LLMProvider, parseLlmProvider, parseMcp, create, checkForPkgJson, getVersionTag, isGitInitialized, checkAndInstallCoreDeps, interactivePrompt, init, logger, FileService, createLogger, shouldSkipDotenvLoading, DepsService } from './chunk-5I4BC7I4.js';
|
|
3
|
+
export { create } from './chunk-5I4BC7I4.js';
|
|
4
4
|
import { PosthogAnalytics, setAnalytics } from './chunk-3MHPDBSK.js';
|
|
5
5
|
export { PosthogAnalytics } from './chunk-3MHPDBSK.js';
|
|
6
6
|
import { Command } from 'commander';
|
|
7
|
-
import
|
|
7
|
+
import pc3 from 'picocolors';
|
|
8
8
|
import * as p2 from '@clack/prompts';
|
|
9
9
|
import fs, { existsSync, readFileSync } from 'fs';
|
|
10
10
|
import path, { dirname, join } from 'path';
|
|
@@ -15,10 +15,10 @@ import * as fsExtra from 'fs-extra';
|
|
|
15
15
|
import { copy } from 'fs-extra';
|
|
16
16
|
import { getDeployer, FileService as FileService$1 } from '@mastra/deployer';
|
|
17
17
|
import stripJsonComments from 'strip-json-comments';
|
|
18
|
+
import process3 from 'process';
|
|
19
|
+
import { execa } from 'execa';
|
|
18
20
|
import { writeFile, mkdir } from 'fs/promises';
|
|
19
|
-
import process2 from 'process';
|
|
20
21
|
import devcert from '@expo/devcert';
|
|
21
|
-
import { execa } from 'execa';
|
|
22
22
|
import getPort from 'get-port';
|
|
23
23
|
import { getPackageInfo } from 'local-pkg';
|
|
24
24
|
import { spawn } from 'child_process';
|
|
@@ -408,7 +408,7 @@ async function initializeScorer(scorer, customPath) {
|
|
|
408
408
|
}
|
|
409
409
|
function showSuccessNote() {
|
|
410
410
|
p2.note(`
|
|
411
|
-
${
|
|
411
|
+
${pc3.green("To use: Add the Scorer to your workflow or agent!")}
|
|
412
412
|
`);
|
|
413
413
|
}
|
|
414
414
|
async function showInteractivePrompt(providedCustomDir) {
|
|
@@ -419,7 +419,7 @@ async function showInteractivePrompt(providedCustomDir) {
|
|
|
419
419
|
let customPath = providedCustomDir;
|
|
420
420
|
if (!providedCustomDir) {
|
|
421
421
|
const useCustomDir = await p2.confirm({
|
|
422
|
-
message: `Would you like to use a custom directory?${
|
|
422
|
+
message: `Would you like to use a custom directory?${pc3.gray("(Default: src/mastra/scorers)")}`,
|
|
423
423
|
initialValue: false
|
|
424
424
|
});
|
|
425
425
|
if (p2.isCancel(useCustomDir)) {
|
|
@@ -895,15 +895,15 @@ function formatTable(scorers) {
|
|
|
895
895
|
const idWidth = Math.max(2, Math.max(...scorers.map((s) => s.id.length)));
|
|
896
896
|
const typeWidth = Math.max(4, Math.max(...scorers.map((s) => s.type.length)));
|
|
897
897
|
const descWidth = Math.max(11, Math.max(...scorers.map((s) => s.description.length)));
|
|
898
|
-
const header = `${
|
|
898
|
+
const header = `${pc3.bold("Name".padEnd(nameWidth))} \u2502 ${pc3.bold("ID".padEnd(idWidth))} \u2502 ${pc3.bold("Type".padEnd(typeWidth))} \u2502 ${pc3.bold("Description".padEnd(descWidth))}`;
|
|
899
899
|
const separator = "\u2500".repeat(nameWidth) + "\u2500\u253C\u2500" + "\u2500".repeat(idWidth) + "\u2500\u253C\u2500" + "\u2500".repeat(typeWidth) + "\u2500\u253C\u2500" + "\u2500".repeat(descWidth) + "\u2500";
|
|
900
900
|
const rows = scorers.map(
|
|
901
|
-
(scorer) => `${(scorer?.name ?? scorer?.id).padEnd(nameWidth)} \u2502 ${
|
|
901
|
+
(scorer) => `${(scorer?.name ?? scorer?.id).padEnd(nameWidth)} \u2502 ${pc3.dim(scorer.id.padEnd(idWidth))} \u2502 ${scorer.type.padEnd(typeWidth)} \u2502 ${pc3.dim(scorer.description.padEnd(descWidth))}`
|
|
902
902
|
);
|
|
903
903
|
return [header, separator, ...rows].join("\n");
|
|
904
904
|
}
|
|
905
905
|
function listAllScorers() {
|
|
906
|
-
p2.intro(
|
|
906
|
+
p2.intro(pc3.inverse(" Available Scorers "));
|
|
907
907
|
const groupedScorers = AVAILABLE_SCORERS.reduce(
|
|
908
908
|
(acc, scorer) => {
|
|
909
909
|
if (!acc[scorer.category]) {
|
|
@@ -915,7 +915,7 @@ function listAllScorers() {
|
|
|
915
915
|
{}
|
|
916
916
|
);
|
|
917
917
|
for (const [category, scorers] of Object.entries(groupedScorers)) {
|
|
918
|
-
p2.log.info(`${
|
|
918
|
+
p2.log.info(`${pc3.bold(pc3.cyan(formatCategoryName(category)))} Scorers:`);
|
|
919
919
|
p2.log.message(formatTable(scorers));
|
|
920
920
|
}
|
|
921
921
|
}
|
|
@@ -932,6 +932,241 @@ var listScorers = async (args) => {
|
|
|
932
932
|
origin: origin5
|
|
933
933
|
});
|
|
934
934
|
};
|
|
935
|
+
var MigrateBundler = class extends BuildBundler {
|
|
936
|
+
customEnvFile;
|
|
937
|
+
constructor(customEnvFile) {
|
|
938
|
+
super({ studio: false });
|
|
939
|
+
this.customEnvFile = customEnvFile;
|
|
940
|
+
}
|
|
941
|
+
getEnvFiles() {
|
|
942
|
+
if (shouldSkipDotenvLoading()) {
|
|
943
|
+
return Promise.resolve([]);
|
|
944
|
+
}
|
|
945
|
+
const possibleFiles = [".env.development", ".env.local", ".env"];
|
|
946
|
+
if (this.customEnvFile) {
|
|
947
|
+
possibleFiles.unshift(this.customEnvFile);
|
|
948
|
+
}
|
|
949
|
+
try {
|
|
950
|
+
const fileService = new FileService$2();
|
|
951
|
+
const envFile = fileService.getFirstExistingFile(possibleFiles);
|
|
952
|
+
return Promise.resolve([envFile]);
|
|
953
|
+
} catch {
|
|
954
|
+
}
|
|
955
|
+
return Promise.resolve([]);
|
|
956
|
+
}
|
|
957
|
+
async bundle(entryFile, outputDirectory, { toolsPaths, projectRoot }) {
|
|
958
|
+
return this._bundle(this.getEntry(), entryFile, { outputDirectory, projectRoot }, toolsPaths);
|
|
959
|
+
}
|
|
960
|
+
getEntry() {
|
|
961
|
+
return `
|
|
962
|
+
import { mastra } from '#mastra';
|
|
963
|
+
|
|
964
|
+
async function runMigration() {
|
|
965
|
+
const storage = mastra.getStorage();
|
|
966
|
+
|
|
967
|
+
if (!storage) {
|
|
968
|
+
console.log(JSON.stringify({
|
|
969
|
+
success: false,
|
|
970
|
+
alreadyMigrated: false,
|
|
971
|
+
duplicatesRemoved: 0,
|
|
972
|
+
message: 'Storage not configured. Please configure storage in your Mastra instance.',
|
|
973
|
+
}));
|
|
974
|
+
process.exit(1);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
// Access the observability store directly from storage.stores
|
|
978
|
+
const observabilityStore = storage.stores?.observability;
|
|
979
|
+
|
|
980
|
+
if (!observabilityStore) {
|
|
981
|
+
console.log(JSON.stringify({
|
|
982
|
+
success: false,
|
|
983
|
+
alreadyMigrated: false,
|
|
984
|
+
duplicatesRemoved: 0,
|
|
985
|
+
message: 'Observability storage not configured. Migration not required.',
|
|
986
|
+
}));
|
|
987
|
+
process.exit(0);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
// Check if the store has a migrateSpans method
|
|
991
|
+
if (typeof observabilityStore.migrateSpans !== 'function') {
|
|
992
|
+
console.log(JSON.stringify({
|
|
993
|
+
success: false,
|
|
994
|
+
alreadyMigrated: false,
|
|
995
|
+
duplicatesRemoved: 0,
|
|
996
|
+
message: 'Migration not supported for this storage backend.',
|
|
997
|
+
}));
|
|
998
|
+
process.exit(1);
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
try {
|
|
1002
|
+
// Run the migration - migrateSpans handles everything internally
|
|
1003
|
+
const result = await observabilityStore.migrateSpans();
|
|
1004
|
+
|
|
1005
|
+
console.log(JSON.stringify({
|
|
1006
|
+
success: result.success,
|
|
1007
|
+
alreadyMigrated: result.alreadyMigrated,
|
|
1008
|
+
duplicatesRemoved: result.duplicatesRemoved,
|
|
1009
|
+
message: result.message,
|
|
1010
|
+
}));
|
|
1011
|
+
|
|
1012
|
+
process.exit(result.success ? 0 : 1);
|
|
1013
|
+
} catch (error) {
|
|
1014
|
+
console.log(JSON.stringify({
|
|
1015
|
+
success: false,
|
|
1016
|
+
alreadyMigrated: false,
|
|
1017
|
+
duplicatesRemoved: 0,
|
|
1018
|
+
message: error instanceof Error ? error.message : 'Unknown error during migration',
|
|
1019
|
+
}));
|
|
1020
|
+
process.exit(1);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
runMigration();
|
|
1025
|
+
`;
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
// src/commands/migrate/migrate.ts
|
|
1030
|
+
async function migrate({
|
|
1031
|
+
dir: dir2,
|
|
1032
|
+
root,
|
|
1033
|
+
env,
|
|
1034
|
+
debug,
|
|
1035
|
+
yes
|
|
1036
|
+
}) {
|
|
1037
|
+
const logger2 = createLogger(debug);
|
|
1038
|
+
const rootDir = root || process3.cwd();
|
|
1039
|
+
const mastraDir = dir2 ? dir2.startsWith("/") ? dir2 : join(process3.cwd(), dir2) : join(process3.cwd(), "src", "mastra");
|
|
1040
|
+
const dotMastraPath = join(rootDir, ".mastra");
|
|
1041
|
+
p2.intro(pc3.cyan("Mastra Storage Migration"));
|
|
1042
|
+
if (!yes) {
|
|
1043
|
+
p2.log.warn(pc3.yellow("Warning: This migration will modify your database."));
|
|
1044
|
+
p2.log.message("Before proceeding, please ensure you have:");
|
|
1045
|
+
p2.log.message(" \u2022 Created a backup of your database");
|
|
1046
|
+
p2.log.message(" \u2022 Tested this migration in a non-production environment");
|
|
1047
|
+
const confirmed = await p2.confirm({
|
|
1048
|
+
message: "Have you backed up your database and are ready to proceed?",
|
|
1049
|
+
initialValue: false
|
|
1050
|
+
});
|
|
1051
|
+
if (p2.isCancel(confirmed) || !confirmed) {
|
|
1052
|
+
p2.log.info("Migration cancelled. Please back up your database before running this command.");
|
|
1053
|
+
p2.log.message(pc3.dim("Tip: Use --yes or -y to skip this prompt in CI/automation."));
|
|
1054
|
+
process3.exit(0);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
try {
|
|
1058
|
+
const fileService = new FileService$1();
|
|
1059
|
+
const entryFile = fileService.getFirstExistingFile([join(mastraDir, "index.ts"), join(mastraDir, "index.js")]);
|
|
1060
|
+
const bundler = new MigrateBundler(env);
|
|
1061
|
+
bundler.__setLogger(logger2);
|
|
1062
|
+
logger2.info("Building project for migration...");
|
|
1063
|
+
await bundler.prepare(dotMastraPath);
|
|
1064
|
+
const discoveredTools = bundler.getAllToolPaths(mastraDir, []);
|
|
1065
|
+
await bundler.bundle(entryFile, dotMastraPath, {
|
|
1066
|
+
toolsPaths: discoveredTools,
|
|
1067
|
+
projectRoot: rootDir
|
|
1068
|
+
});
|
|
1069
|
+
logger2.info("Running migration...");
|
|
1070
|
+
logger2.info(pc3.dim("This may take a while for large tables."));
|
|
1071
|
+
logger2.info("");
|
|
1072
|
+
const loadedEnv = await bundler.loadEnvVars();
|
|
1073
|
+
const migrationProcess = execa(process3.execPath, [join(dotMastraPath, "output", "index.mjs")], {
|
|
1074
|
+
cwd: rootDir,
|
|
1075
|
+
env: {
|
|
1076
|
+
NODE_ENV: "production",
|
|
1077
|
+
MASTRA_DISABLE_STORAGE_INIT: "true",
|
|
1078
|
+
// Prevent MIGRATION_REQUIRED error during import
|
|
1079
|
+
...Object.fromEntries(loadedEnv)
|
|
1080
|
+
},
|
|
1081
|
+
stdio: ["inherit", "pipe", "pipe"],
|
|
1082
|
+
reject: false
|
|
1083
|
+
});
|
|
1084
|
+
let stdoutData = "";
|
|
1085
|
+
let stderrData = "";
|
|
1086
|
+
migrationProcess.stdout?.on("data", (data) => {
|
|
1087
|
+
stdoutData += data.toString();
|
|
1088
|
+
});
|
|
1089
|
+
migrationProcess.stderr?.on("data", (data) => {
|
|
1090
|
+
stderrData += data.toString();
|
|
1091
|
+
if (debug) {
|
|
1092
|
+
process3.stderr.write(data);
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
const processResult = await migrationProcess;
|
|
1096
|
+
let result;
|
|
1097
|
+
try {
|
|
1098
|
+
const jsonMatch = stdoutData.match(/\{[^{}]*"success"[^{}]*\}/g);
|
|
1099
|
+
if (jsonMatch && jsonMatch.length > 0) {
|
|
1100
|
+
result = JSON.parse(jsonMatch[jsonMatch.length - 1]);
|
|
1101
|
+
}
|
|
1102
|
+
} catch {
|
|
1103
|
+
}
|
|
1104
|
+
if (result) {
|
|
1105
|
+
if (result.success) {
|
|
1106
|
+
if (result.alreadyMigrated) {
|
|
1107
|
+
logger2.info(pc3.green("\u2713 Migration already complete."));
|
|
1108
|
+
} else {
|
|
1109
|
+
logger2.info(pc3.green("\u2713 Migration completed successfully!"));
|
|
1110
|
+
if (result.duplicatesRemoved > 0) {
|
|
1111
|
+
logger2.info(` Removed ${result.duplicatesRemoved} duplicate entries.`);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
logger2.info(` ${result.message}`);
|
|
1115
|
+
} else {
|
|
1116
|
+
logger2.error(pc3.red("\u2717 Migration failed."));
|
|
1117
|
+
logger2.error(` ${result.message}`);
|
|
1118
|
+
process3.exit(1);
|
|
1119
|
+
}
|
|
1120
|
+
} else {
|
|
1121
|
+
if (processResult.exitCode !== 0) {
|
|
1122
|
+
logger2.error(pc3.red("\u2717 Migration failed."));
|
|
1123
|
+
if (stderrData) {
|
|
1124
|
+
logger2.error(stderrData);
|
|
1125
|
+
}
|
|
1126
|
+
if (stdoutData && !stdoutData.includes('"success"')) {
|
|
1127
|
+
logger2.error(stdoutData);
|
|
1128
|
+
}
|
|
1129
|
+
process3.exit(1);
|
|
1130
|
+
} else {
|
|
1131
|
+
logger2.info(pc3.green("\u2713 Migration completed."));
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
} catch (error) {
|
|
1135
|
+
if (error.code === "ERR_MODULE_NOT_FOUND" || error.message?.includes("Cannot find module")) {
|
|
1136
|
+
logger2.error(pc3.red("Error: Could not find Mastra entry file."));
|
|
1137
|
+
logger2.info("");
|
|
1138
|
+
logger2.info("Make sure you have a mastra directory with an index.ts or index.js file.");
|
|
1139
|
+
logger2.info(`Expected location: ${mastraDir}`);
|
|
1140
|
+
logger2.info("");
|
|
1141
|
+
logger2.info("You can specify a custom directory:");
|
|
1142
|
+
logger2.info(pc3.cyan(" npx mastra migrate --dir path/to/mastra"));
|
|
1143
|
+
} else {
|
|
1144
|
+
logger2.error(pc3.red(`Error: ${error.message}`));
|
|
1145
|
+
if (debug) {
|
|
1146
|
+
logger2.error(error);
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
process3.exit(1);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
// src/commands/actions/migrate.ts
|
|
1154
|
+
var migrate2 = async (args) => {
|
|
1155
|
+
await analytics.trackCommandExecution({
|
|
1156
|
+
command: "mastra migrate",
|
|
1157
|
+
args: { ...args },
|
|
1158
|
+
execution: async () => {
|
|
1159
|
+
await migrate({
|
|
1160
|
+
dir: args?.dir,
|
|
1161
|
+
root: args?.root,
|
|
1162
|
+
env: args?.env,
|
|
1163
|
+
debug: args?.debug ?? false,
|
|
1164
|
+
yes: args?.yes ?? false
|
|
1165
|
+
});
|
|
1166
|
+
},
|
|
1167
|
+
origin: origin2
|
|
1168
|
+
});
|
|
1169
|
+
};
|
|
935
1170
|
var DevLogger = class {
|
|
936
1171
|
options;
|
|
937
1172
|
constructor(options = {}) {
|
|
@@ -943,32 +1178,32 @@ var DevLogger = class {
|
|
|
943
1178
|
}
|
|
944
1179
|
formatTime() {
|
|
945
1180
|
if (!this.options.timestamp) return "";
|
|
946
|
-
return
|
|
1181
|
+
return pc3.dim((/* @__PURE__ */ new Date()).toLocaleTimeString());
|
|
947
1182
|
}
|
|
948
1183
|
formatPrefix(text2, color2) {
|
|
949
1184
|
const time = this.formatTime();
|
|
950
|
-
const prefix =
|
|
1185
|
+
const prefix = pc3.bold(color2(text2));
|
|
951
1186
|
return time ? `${time} ${prefix}` : prefix;
|
|
952
1187
|
}
|
|
953
1188
|
info(message) {
|
|
954
|
-
const prefix = this.formatPrefix("\u25D0",
|
|
1189
|
+
const prefix = this.formatPrefix("\u25D0", pc3.cyan);
|
|
955
1190
|
console.info(`${prefix} ${message}`);
|
|
956
1191
|
}
|
|
957
1192
|
success(message) {
|
|
958
|
-
const prefix = this.formatPrefix("\u2713",
|
|
959
|
-
console.info(`${prefix} ${
|
|
1193
|
+
const prefix = this.formatPrefix("\u2713", pc3.green);
|
|
1194
|
+
console.info(`${prefix} ${pc3.green(message)}`);
|
|
960
1195
|
}
|
|
961
1196
|
warn(message) {
|
|
962
|
-
const prefix = this.formatPrefix("\u26A0",
|
|
963
|
-
console.info(`${prefix} ${
|
|
1197
|
+
const prefix = this.formatPrefix("\u26A0", pc3.yellow);
|
|
1198
|
+
console.info(`${prefix} ${pc3.yellow(message)}`);
|
|
964
1199
|
}
|
|
965
1200
|
error(message) {
|
|
966
|
-
const prefix = this.formatPrefix("\u2717",
|
|
967
|
-
console.info(`${prefix} ${
|
|
1201
|
+
const prefix = this.formatPrefix("\u2717", pc3.red);
|
|
1202
|
+
console.info(`${prefix} ${pc3.red(message)}`);
|
|
968
1203
|
}
|
|
969
1204
|
starting() {
|
|
970
|
-
const prefix = this.formatPrefix("\u25C7",
|
|
971
|
-
console.info(`${prefix} ${
|
|
1205
|
+
const prefix = this.formatPrefix("\u25C7", pc3.blue);
|
|
1206
|
+
console.info(`${prefix} ${pc3.blue("Starting Mastra dev server...")}`);
|
|
972
1207
|
}
|
|
973
1208
|
ready(host, port, studioBasePath, startTime, https) {
|
|
974
1209
|
let protocol = "http";
|
|
@@ -977,62 +1212,62 @@ var DevLogger = class {
|
|
|
977
1212
|
}
|
|
978
1213
|
console.info("");
|
|
979
1214
|
const timing = startTime ? `${Date.now() - startTime} ms` : "XXX ms";
|
|
980
|
-
console.info(
|
|
1215
|
+
console.info(pc3.inverse(pc3.green(" mastra ")) + ` ${pc3.green(version)} ${pc3.gray("ready in")} ${timing}`);
|
|
981
1216
|
console.info("");
|
|
982
|
-
console.info(`${
|
|
983
|
-
console.info(`${
|
|
1217
|
+
console.info(`${pc3.dim("\u2502")} ${pc3.bold("Studio:")} ${pc3.cyan(`${protocol}://${host}:${port}${studioBasePath}`)}`);
|
|
1218
|
+
console.info(`${pc3.dim("\u2502")} ${pc3.bold("API:")} ${`${protocol}://${host}:${port}/api`}`);
|
|
984
1219
|
console.info("");
|
|
985
1220
|
}
|
|
986
1221
|
bundling() {
|
|
987
|
-
const prefix = this.formatPrefix("\u25D0",
|
|
988
|
-
console.info(`${prefix} ${
|
|
1222
|
+
const prefix = this.formatPrefix("\u25D0", pc3.magenta);
|
|
1223
|
+
console.info(`${prefix} ${pc3.magenta("Bundling...")}`);
|
|
989
1224
|
}
|
|
990
1225
|
bundleComplete() {
|
|
991
|
-
const prefix = this.formatPrefix("\u2713",
|
|
992
|
-
console.info(`${prefix} ${
|
|
1226
|
+
const prefix = this.formatPrefix("\u2713", pc3.green);
|
|
1227
|
+
console.info(`${prefix} ${pc3.green("Bundle complete")}`);
|
|
993
1228
|
}
|
|
994
1229
|
watching() {
|
|
995
1230
|
const time = this.formatTime();
|
|
996
|
-
const icon =
|
|
997
|
-
const message =
|
|
1231
|
+
const icon = pc3.dim("\u25EF");
|
|
1232
|
+
const message = pc3.dim("watching for file changes...");
|
|
998
1233
|
const fullMessage = `${icon} ${message}`;
|
|
999
1234
|
console.info(time ? `${time} ${fullMessage}` : fullMessage);
|
|
1000
1235
|
}
|
|
1001
1236
|
restarting() {
|
|
1002
|
-
const prefix = this.formatPrefix("\u21BB",
|
|
1003
|
-
console.info(`${prefix} ${
|
|
1237
|
+
const prefix = this.formatPrefix("\u21BB", pc3.blue);
|
|
1238
|
+
console.info(`${prefix} ${pc3.blue("Restarting server...")}`);
|
|
1004
1239
|
}
|
|
1005
1240
|
fileChange(file) {
|
|
1006
|
-
const prefix = this.formatPrefix("\u26A1",
|
|
1241
|
+
const prefix = this.formatPrefix("\u26A1", pc3.cyan);
|
|
1007
1242
|
const fileName = path.basename(file);
|
|
1008
|
-
console.info(`${prefix} ${
|
|
1243
|
+
console.info(`${prefix} ${pc3.cyan("File changed:")} ${pc3.dim(fileName)}`);
|
|
1009
1244
|
}
|
|
1010
1245
|
// Enhanced error reporting
|
|
1011
1246
|
serverError(error) {
|
|
1012
1247
|
console.info("");
|
|
1013
|
-
console.info(
|
|
1248
|
+
console.info(pc3.red(" \u2717 ") + pc3.bold(pc3.red("Server Error")));
|
|
1014
1249
|
console.info("");
|
|
1015
|
-
console.info(` ${
|
|
1250
|
+
console.info(` ${pc3.red("\u2502")} ${error}`);
|
|
1016
1251
|
console.info("");
|
|
1017
1252
|
}
|
|
1018
1253
|
shutdown() {
|
|
1019
1254
|
console.info("");
|
|
1020
|
-
const prefix = this.formatPrefix("\u2713",
|
|
1021
|
-
console.info(`${prefix} ${
|
|
1255
|
+
const prefix = this.formatPrefix("\u2713", pc3.green);
|
|
1256
|
+
console.info(`${prefix} ${pc3.green("Dev server stopped")}`);
|
|
1022
1257
|
}
|
|
1023
1258
|
envInfo(info) {
|
|
1024
1259
|
console.info("");
|
|
1025
|
-
console.info(` ${
|
|
1026
|
-
console.info(` ${
|
|
1027
|
-
console.info(` ${
|
|
1260
|
+
console.info(` ${pc3.dim("\u2502")} ${pc3.bold("Environment:")} ${pc3.cyan(info.env || "development")}`);
|
|
1261
|
+
console.info(` ${pc3.dim("\u2502")} ${pc3.bold("Root:")} ${pc3.dim(info.root)}`);
|
|
1262
|
+
console.info(` ${pc3.dim("\u2502")} ${pc3.bold("Port:")} ${pc3.cyan(info.port.toString())}`);
|
|
1028
1263
|
}
|
|
1029
1264
|
raw(message) {
|
|
1030
1265
|
console.info(message);
|
|
1031
1266
|
}
|
|
1032
1267
|
debug(message) {
|
|
1033
1268
|
if (process.env.DEBUG || process.env.MASTRA_DEBUG) {
|
|
1034
|
-
const prefix = this.formatPrefix("\u25E6",
|
|
1035
|
-
console.info(`${prefix} ${
|
|
1269
|
+
const prefix = this.formatPrefix("\u25E6", pc3.gray);
|
|
1270
|
+
console.info(`${prefix} ${pc3.gray(message)}`);
|
|
1036
1271
|
}
|
|
1037
1272
|
}
|
|
1038
1273
|
spinnerChars = ["\u25D0", "\u25D3", "\u25D1", "\u25D2"];
|
|
@@ -1047,7 +1282,7 @@ var DevLogger = class {
|
|
|
1047
1282
|
}
|
|
1048
1283
|
update(message) {
|
|
1049
1284
|
this.clearLine();
|
|
1050
|
-
const prefix = this.formatPrefix(this.getSpinnerChar(),
|
|
1285
|
+
const prefix = this.formatPrefix(this.getSpinnerChar(), pc3.cyan);
|
|
1051
1286
|
process.stdout.write(`${prefix} ${message}`);
|
|
1052
1287
|
}
|
|
1053
1288
|
};
|
|
@@ -1253,7 +1488,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1253
1488
|
await writeFile(packagesFilePath, JSON.stringify(startOptions.mastraPackages), "utf-8");
|
|
1254
1489
|
}
|
|
1255
1490
|
await mkdir(publicDir, { recursive: true });
|
|
1256
|
-
currentServerProcess = execa(
|
|
1491
|
+
currentServerProcess = execa(process3.execPath, commands, {
|
|
1257
1492
|
cwd: publicDir,
|
|
1258
1493
|
env: {
|
|
1259
1494
|
NODE_ENV: "production",
|
|
@@ -1281,7 +1516,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1281
1516
|
currentServerProcess.stdout.on("data", (data) => {
|
|
1282
1517
|
const output = data.toString();
|
|
1283
1518
|
if (!output.includes("Studio available") && !output.includes("\u{1F468}\u200D\u{1F4BB}") && !output.includes("Mastra API running on ")) {
|
|
1284
|
-
|
|
1519
|
+
process3.stdout.write(output);
|
|
1285
1520
|
}
|
|
1286
1521
|
});
|
|
1287
1522
|
}
|
|
@@ -1289,7 +1524,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1289
1524
|
currentServerProcess.stderr.on("data", (data) => {
|
|
1290
1525
|
const output = data.toString();
|
|
1291
1526
|
if (!output.includes("Studio available") && !output.includes("\u{1F468}\u200D\u{1F4BB}") && !output.includes("Mastra API running on ")) {
|
|
1292
|
-
|
|
1527
|
+
process3.stderr.write(output);
|
|
1293
1528
|
}
|
|
1294
1529
|
});
|
|
1295
1530
|
}
|
|
@@ -1340,7 +1575,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1340
1575
|
errorRestartCount++;
|
|
1341
1576
|
if (errorRestartCount > ON_ERROR_MAX_RESTARTS) {
|
|
1342
1577
|
devLogger.error(`Server failed to start after ${ON_ERROR_MAX_RESTARTS} error attempts. Giving up.`);
|
|
1343
|
-
|
|
1578
|
+
process3.exit(1);
|
|
1344
1579
|
}
|
|
1345
1580
|
devLogger.warn(
|
|
1346
1581
|
`Attempting to restart server after error... (Attempt ${errorRestartCount}/${ON_ERROR_MAX_RESTARTS})`
|
|
@@ -1393,7 +1628,7 @@ async function rebundleAndRestart(dotMastraPath, { port, host, studioBasePath, p
|
|
|
1393
1628
|
}
|
|
1394
1629
|
const env = await bundler.loadEnvVars();
|
|
1395
1630
|
for (const [key, value] of env.entries()) {
|
|
1396
|
-
|
|
1631
|
+
process3.env[key] = value;
|
|
1397
1632
|
}
|
|
1398
1633
|
await startServer(
|
|
1399
1634
|
join(dotMastraPath, "output"),
|
|
@@ -1421,8 +1656,8 @@ async function dev({
|
|
|
1421
1656
|
https,
|
|
1422
1657
|
debug
|
|
1423
1658
|
}) {
|
|
1424
|
-
const rootDir = root ||
|
|
1425
|
-
const mastraDir = dir2 ? dir2.startsWith("/") ? dir2 : join(
|
|
1659
|
+
const rootDir = root || process3.cwd();
|
|
1660
|
+
const mastraDir = dir2 ? dir2.startsWith("/") ? dir2 : join(process3.cwd(), dir2) : join(process3.cwd(), "src", "mastra");
|
|
1426
1661
|
const dotMastraPath = join(rootDir, ".mastra");
|
|
1427
1662
|
const fileService = new FileService$1();
|
|
1428
1663
|
const entryFile = fileService.getFirstExistingFile([join(mastraDir, "index.ts"), join(mastraDir, "index.js")]);
|
|
@@ -1431,11 +1666,11 @@ async function dev({
|
|
|
1431
1666
|
const discoveredTools = bundler.getAllToolPaths(mastraDir, tools ?? []);
|
|
1432
1667
|
const loadedEnv = await bundler.loadEnvVars();
|
|
1433
1668
|
for (const [key, value] of loadedEnv.entries()) {
|
|
1434
|
-
|
|
1669
|
+
process3.env[key] = value;
|
|
1435
1670
|
}
|
|
1436
1671
|
const serverOptions = await getServerOptions(entryFile, join(dotMastraPath, "output"));
|
|
1437
|
-
let portToUse = serverOptions?.port ??
|
|
1438
|
-
let hostToUse = serverOptions?.host ??
|
|
1672
|
+
let portToUse = serverOptions?.port ?? process3.env.PORT;
|
|
1673
|
+
let hostToUse = serverOptions?.host ?? process3.env.HOST ?? "localhost";
|
|
1439
1674
|
const studioBasePathToUse = normalizeStudioBase(serverOptions?.studioBase ?? "/");
|
|
1440
1675
|
if (!portToUse || isNaN(Number(portToUse))) {
|
|
1441
1676
|
const portList = Array.from({ length: 21 }, (_, i) => 4111 + i);
|
|
@@ -1490,13 +1725,13 @@ async function dev({
|
|
|
1490
1725
|
);
|
|
1491
1726
|
}
|
|
1492
1727
|
});
|
|
1493
|
-
|
|
1728
|
+
process3.on("SIGINT", () => {
|
|
1494
1729
|
devLogger.shutdown();
|
|
1495
1730
|
if (currentServerProcess) {
|
|
1496
1731
|
currentServerProcess.kill();
|
|
1497
1732
|
}
|
|
1498
1733
|
watcher.close().catch(() => {
|
|
1499
|
-
}).finally(() =>
|
|
1734
|
+
}).finally(() => process3.exit(0));
|
|
1500
1735
|
});
|
|
1501
1736
|
}
|
|
1502
1737
|
|
|
@@ -1672,7 +1907,7 @@ var origin2 = process.env.MASTRA_ANALYTICS_ORIGIN;
|
|
|
1672
1907
|
program.name("mastra").version(`${version}`, "-v, --version").addHelpText(
|
|
1673
1908
|
"before",
|
|
1674
1909
|
`
|
|
1675
|
-
${
|
|
1910
|
+
${pc3.bold(pc3.cyan("Mastra"))} is a typescript framework for building AI applications, agents, and workflows.
|
|
1676
1911
|
`
|
|
1677
1912
|
).action(() => {
|
|
1678
1913
|
program.help();
|
|
@@ -1715,6 +1950,7 @@ program.command("dev").description("Start mastra server").option("-d, --dir <dir
|
|
|
1715
1950
|
program.command("build").description("Build your Mastra project").option("-d, --dir <path>", "Path to your Mastra Folder").option("-r, --root <path>", "Path to your root folder").option("-t, --tools <toolsDirs>", "Comma-separated list of paths to tool files to include").option("-s, --studio", "Bundle the studio UI with the build").option("--debug", "Enable debug logs", false).action(buildProject);
|
|
1716
1951
|
program.command("start").description("Start your built Mastra application").option("-d, --dir <path>", "Path to your built Mastra output directory (default: .mastra/output)").option("-e, --env <env>", "Custom env file to include in the start").action(startProject);
|
|
1717
1952
|
program.command("studio").description("Start the Mastra studio").option("-p, --port <port>", "Port to run the studio on (default: 3000)").option("-e, --env <env>", "Custom env file to include in the studio").option("-h, --server-host <serverHost>", "Host of the Mastra API server (default: localhost)").option("-s, --server-port <serverPort>", "Port of the Mastra API server (default: 4111)").option("-x, --server-protocol <serverProtocol>", "Protocol of the Mastra API server (default: http)").action(studio);
|
|
1953
|
+
program.command("migrate").description("Run database migrations to update storage schema").option("-d, --dir <path>", "Path to your Mastra folder").option("-r, --root <path>", "Path to your root folder").option("-e, --env <env>", "Custom env file to include").option("--debug", "Enable debug logs", false).option("-y, --yes", "Skip confirmation prompt (for CI/automation)").action(migrate2);
|
|
1718
1954
|
var scorersCommand = program.command("scorers").description("Manage scorers for evaluating AI outputs");
|
|
1719
1955
|
scorersCommand.command("add [scorer-name]").description("Add a new scorer to your project").option("-d, --dir <path>", "Path to your Mastra directory (default: auto-detect)").action(addScorer);
|
|
1720
1956
|
scorersCommand.command("list").description("List available scorer templates").action(listScorers);
|