mastra 1.0.0-beta.16 → 1.0.0-beta.18
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-F5PXC644.js → chunk-GPMDXHCF.js} +3 -3
- package/dist/{chunk-F5PXC644.js.map → chunk-GPMDXHCF.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 +315 -58
- package/dist/index.js.map +1 -1
- package/dist/studio/assets/{abap-CErE10Cp.js → abap-UAOxytaT.js} +1 -1
- package/dist/studio/assets/{abnf-Be5u3AD4.js → abnf-f201O2TV.js} +1 -1
- package/dist/studio/assets/{actionscript-BJWOuK_3.js → actionscript-CFYQpjRA.js} +1 -1
- package/dist/studio/assets/{ada-CipCCPG8.js → ada-PVk2oet6.js} +1 -1
- package/dist/studio/assets/{agda-BOeywCKU.js → agda-CEA3_0wj.js} +1 -1
- package/dist/studio/assets/{al-CabGPRtr.js → al-CuhjmLCq.js} +1 -1
- package/dist/studio/assets/{antlr4-BH1x7qDi.js → antlr4-0HHc-YMK.js} +1 -1
- package/dist/studio/assets/{apacheconf-BSfqY87l.js → apacheconf-CLL6u7Xy.js} +1 -1
- package/dist/studio/assets/{apex-C87OeXbm.js → apex-DVfDukn1.js} +1 -1
- package/dist/studio/assets/{apl-SITgf_aC.js → apl-BglDHwLd.js} +1 -1
- package/dist/studio/assets/{applescript-B3csYozt.js → applescript-Brt-zOQF.js} +1 -1
- package/dist/studio/assets/{aql-D-OS4oN-.js → aql-CHMoIV4I.js} +1 -1
- package/dist/studio/assets/{arduino-DGtCfhzg.js → arduino-YMaLOn1a.js} +1 -1
- package/dist/studio/assets/{arff-CLiCC5ob.js → arff-BCAgcWnu.js} +1 -1
- package/dist/studio/assets/{asciidoc-BICKHnYp.js → asciidoc-BpvYl8Gn.js} +1 -1
- package/dist/studio/assets/{asm6502-FB32btP-.js → asm6502-D3xiUVOX.js} +1 -1
- package/dist/studio/assets/{asmatmel-CqGxnHpv.js → asmatmel-Cy1yBA9v.js} +1 -1
- package/dist/studio/assets/{aspnet-DroX19H2.js → aspnet-DRtOmGIV.js} +1 -1
- package/dist/studio/assets/{autohotkey-MQHJxU2H.js → autohotkey-CIMXohBu.js} +1 -1
- package/dist/studio/assets/{autoit-CFMYAly2.js → autoit-CWIItf1g.js} +1 -1
- package/dist/studio/assets/{avisynth-CD7jqU7Z.js → avisynth-CopMCzfB.js} +1 -1
- package/dist/studio/assets/{avro-idl-CLRBbBDt.js → avro-idl-CPftrvCO.js} +1 -1
- package/dist/studio/assets/{bash-E2x-jWlf.js → bash-CjlgezRh.js} +1 -1
- package/dist/studio/assets/{basic-B8Vs-eYi.js → basic-Csn8Gpzx.js} +1 -1
- package/dist/studio/assets/{batch-B1w8-fca.js → batch-DlN-P5Fe.js} +1 -1
- package/dist/studio/assets/{bbcode-DNij92IQ.js → bbcode-CEOl73Dm.js} +1 -1
- package/dist/studio/assets/{bicep---jg7rI9.js → bicep-BQM5xXtt.js} +1 -1
- package/dist/studio/assets/{birb-CwaW4bDl.js → birb-36vvPNFq.js} +1 -1
- package/dist/studio/assets/{bison-D18q6QXf.js → bison-DQ5FSPFj.js} +1 -1
- package/dist/studio/assets/{bnf-ou53thyG.js → bnf-BhJct9qg.js} +1 -1
- package/dist/studio/assets/{brainfuck-DLzCCtsS.js → brainfuck-LYTNku7k.js} +1 -1
- package/dist/studio/assets/{brightscript-CAYxd5FB.js → brightscript-BLQ_tU8X.js} +1 -1
- package/dist/studio/assets/{bro-Ca_WB1P3.js → bro-B_ZwnuE5.js} +1 -1
- package/dist/studio/assets/{bsl-CIA6wXv1.js → bsl-C__FgbnV.js} +1 -1
- package/dist/studio/assets/{c-CXhAHrWK.js → c-Da6oMqNs.js} +1 -1
- package/dist/studio/assets/{cfscript-CW-IjO2P.js → cfscript-DxKw985L.js} +1 -1
- package/dist/studio/assets/{chaiscript-M-KUJle_.js → chaiscript-BMgZAaWb.js} +1 -1
- package/dist/studio/assets/{chunk-55VPMN3N-BuLK6rn1-DMb8ebdN.js → chunk-55VPMN3N-Ax1F4Y75-Dsi-mC_1.js} +1 -1
- package/dist/studio/assets/{chunk-55VPMN3N-De6uaMt_.js → chunk-55VPMN3N-B3nEoNj8.js} +1 -1
- package/dist/studio/assets/{cil-ardUox1-.js → cil-DYcj4sAX.js} +1 -1
- package/dist/studio/assets/{clike-BTTRGqqV.js → clike-3Gwnz1DR.js} +1 -1
- package/dist/studio/assets/{clojure-CtS8pndg.js → clojure-BXQE2wLv.js} +1 -1
- package/dist/studio/assets/{cmake-DcO1HjFA.js → cmake-DR9SJwZz.js} +1 -1
- package/dist/studio/assets/{cobol-CR5wvxUb.js → cobol-8IjHMWy5.js} +1 -1
- package/dist/studio/assets/{coffeescript-BQrq47kF.js → coffeescript-CElPWilL.js} +1 -1
- package/dist/studio/assets/{concurnas-CXNcBPwI.js → concurnas-BYju_Nji.js} +1 -1
- package/dist/studio/assets/{coq-BL23HIkp.js → coq-DoOsKl0P.js} +1 -1
- package/dist/studio/assets/{core-BuYD0VMl.js → core-BWEeT8rO.js} +1 -1
- package/dist/studio/assets/{cpp-yfq9k_HL.js → cpp-HxMR3o0K.js} +1 -1
- package/dist/studio/assets/{crystal-B86QSxfa.js → crystal-hU8Yxent.js} +1 -1
- package/dist/studio/assets/{csharp-CXH-h_2E.js → csharp-N12vbSHZ.js} +1 -1
- package/dist/studio/assets/{cshtml-Dh8TtT25.js → cshtml-BouH_m62.js} +1 -1
- package/dist/studio/assets/{csp-BLZNTbJF.js → csp-EVWCLjcL.js} +1 -1
- package/dist/studio/assets/{css-B6K5S24Z.js → css-Dwc61us6.js} +1 -1
- package/dist/studio/assets/{css-extras-BVV3tMVO.js → css-extras-DmGsYn3r.js} +1 -1
- package/dist/studio/assets/{csv-BKPRn2cZ.js → csv-CJ5Zahea.js} +1 -1
- package/dist/studio/assets/{cypher-CbmTGFU6.js → cypher-BzLSBwKS.js} +1 -1
- package/dist/studio/assets/{d-DF6U6dsE.js → d-DgPURJAS.js} +1 -1
- package/dist/studio/assets/{dart-BhERWRI9.js → dart-dFMVczdC.js} +1 -1
- package/dist/studio/assets/{dataweave-BP0uB4Ow.js → dataweave-BThU-h0a.js} +1 -1
- package/dist/studio/assets/{dax-Blc_ih_X.js → dax-CBPGTCoK.js} +1 -1
- package/dist/studio/assets/{dhall-DMg_hP2u.js → dhall-BwBUQ1Ug.js} +1 -1
- package/dist/studio/assets/{diff-DwwqE6jv.js → diff-Bqt5S_kK.js} +1 -1
- package/dist/studio/assets/{django-Uq88kCrs.js → django-BJUDEYJO.js} +1 -1
- package/dist/studio/assets/{dns-zone-file-DlT69aij.js → dns-zone-file-BrtfE1In.js} +1 -1
- package/dist/studio/assets/{docker-LPAVmogm.js → docker-Ba38DY6O.js} +1 -1
- package/dist/studio/assets/{dot-CV3hWqJb.js → dot-MsGhs1Ya.js} +1 -1
- package/dist/studio/assets/{ebnf--InvR9Iv.js → ebnf-Cqwn06tf.js} +1 -1
- package/dist/studio/assets/{editorconfig-Dbow5ITb.js → editorconfig-CproTkGu.js} +1 -1
- package/dist/studio/assets/{eiffel-D2U1jdWW.js → eiffel-C4r-u-Fx.js} +1 -1
- package/dist/studio/assets/{ejs-DRTL1yup.js → ejs-B3iQkgGA.js} +1 -1
- package/dist/studio/assets/{elixir-BBd91Bx-.js → elixir-CaPEZFF9.js} +1 -1
- package/dist/studio/assets/{elm-Dw-BmBLJ.js → elm-C3rx8oF2.js} +1 -1
- package/dist/studio/assets/{erb-DXXSRqvG.js → erb-CuLBsQqp.js} +1 -1
- package/dist/studio/assets/{erlang--l8eZsev.js → erlang-So8aw46J.js} +1 -1
- package/dist/studio/assets/{etlua-DX_OQOft.js → etlua-DGdG9laD.js} +1 -1
- package/dist/studio/assets/{excel-formula-OQoXBMFm.js → excel-formula-AUFAEONv.js} +1 -1
- package/dist/studio/assets/{factor-B2T_b8Hr.js → factor-DdlDrZE_.js} +1 -1
- package/dist/studio/assets/{false-6esX6wDu.js → false-DtblEWaC.js} +1 -1
- package/dist/studio/assets/{firestore-security-rules-_u19TYQI.js → firestore-security-rules-BbX9d522.js} +1 -1
- package/dist/studio/assets/{flow-BtBb3RAG.js → flow-B8s0l3oy.js} +1 -1
- package/dist/studio/assets/{fortran-CzGWWLW0.js → fortran-BYl7Pf4z.js} +1 -1
- package/dist/studio/assets/{fsharp-a2WT05wT.js → fsharp-CNXwc1wD.js} +1 -1
- package/dist/studio/assets/{ftl-C7d66Pgv.js → ftl-DhY6cxmh.js} +1 -1
- package/dist/studio/assets/{gap-Cp8uEjHc.js → gap-DfBF1Xpf.js} +1 -1
- package/dist/studio/assets/{gcode-CnFz-jW8.js → gcode-BYD243CF.js} +1 -1
- package/dist/studio/assets/{gdscript-DXPMgY2Y.js → gdscript-BatYKQwu.js} +1 -1
- package/dist/studio/assets/{gedcom-CFdU1KhK.js → gedcom-C1S1YOp8.js} +1 -1
- package/dist/studio/assets/{gherkin-Cgk8mXqm.js → gherkin-CggmAq_8.js} +1 -1
- package/dist/studio/assets/{git-BAgDeOM2.js → git-RLK0j3fM.js} +1 -1
- package/dist/studio/assets/{glsl-DKnRTvgz.js → glsl-B_NpiysH.js} +1 -1
- package/dist/studio/assets/{gml-GjH0YP6P.js → gml-CfLWJ4mr.js} +1 -1
- package/dist/studio/assets/{gn-BQEsitOF.js → gn-BL2jwMxv.js} +1 -1
- package/dist/studio/assets/{go-7ceBXEhQ.js → go-DPHhTC7b.js} +1 -1
- package/dist/studio/assets/{go-module-cyi8-hba.js → go-module-CfFxJhJ9.js} +1 -1
- package/dist/studio/assets/{graphql-Ci-0Z3lp.js → graphql-AEIhHPxy.js} +1 -1
- package/dist/studio/assets/{groovy-CkxJC7K1.js → groovy-DfNXG4BV.js} +1 -1
- package/dist/studio/assets/{haml-D9RAoBkd.js → haml-CXZSeYw-.js} +1 -1
- package/dist/studio/assets/{handlebars-ChDzI6fY.js → handlebars-Yx3XW7j0.js} +1 -1
- package/dist/studio/assets/{haskell-C00dtDx-.js → haskell-CQdMWXNQ.js} +1 -1
- package/dist/studio/assets/{haxe-N05EG95k.js → haxe-DCn-WCth.js} +1 -1
- package/dist/studio/assets/{hcl-WB2rsl1Z.js → hcl-BNJMZW2-.js} +1 -1
- package/dist/studio/assets/{hlsl-dE55xuCo.js → hlsl-BBLGIO82.js} +1 -1
- package/dist/studio/assets/{hoon-CvJTpkCF.js → hoon-BDwAubZo.js} +1 -1
- package/dist/studio/assets/{hpkp-CDhVLKPn.js → hpkp-BovGDeby.js} +1 -1
- package/dist/studio/assets/{hsts-q_C0Cm7X.js → hsts-B4JaBFJQ.js} +1 -1
- package/dist/studio/assets/{http-SRQpMS0o.js → http-CbyMf9D0.js} +1 -1
- package/dist/studio/assets/{ichigojam-D_BgvR5T.js → ichigojam-B5MFMtDf.js} +1 -1
- package/dist/studio/assets/{icon-YxmOlyyD.js → icon-BjdQp-Pn.js} +1 -1
- package/dist/studio/assets/{icu-message-format-9vr4ceJ9.js → icu-message-format-DWw_jfY-.js} +1 -1
- package/dist/studio/assets/{idris-BK-E-axX.js → idris-CXbjL0QD.js} +1 -1
- package/dist/studio/assets/{iecst-Dq0_lq_8.js → iecst-DxQV2xDC.js} +1 -1
- package/dist/studio/assets/{ignore-BdMTb3sd.js → ignore-DFDicCus.js} +1 -1
- package/dist/studio/assets/{index-BmsfZ94u.js → index-B1egYoJi.js} +1 -1
- package/dist/studio/assets/{index-BUUapUvY.js → index-BBTTW9jF.js} +1 -1
- package/dist/studio/assets/{index-BiZTxXah.js → index-BU9NMmGV.js} +1 -1
- package/dist/studio/assets/{index-Dozfcn-L.js → index-BmFV2eHo.js} +1 -1
- package/dist/studio/assets/{index-3hqS2z5E.js → index-CHp0WaEJ.js} +1 -1
- package/dist/studio/assets/{index-CU2OZjLN.js → index-CghV83pI.js} +1 -1
- package/dist/studio/assets/{index-DsT4bN2s.js → index-D4B5WqKQ.js} +1 -1
- package/dist/studio/assets/{index-BsAl2Jp2.js → index-DHf5pZzx.js} +1 -1
- package/dist/studio/assets/{index-CvbHWYOf.js → index-DJCrcU8M.js} +1 -1
- package/dist/studio/assets/{index-Dmefggkt.js → index-DO46LT0S.js} +1 -1
- package/dist/studio/assets/{index-CbeZnpHU.js → index-DObhJRgr.js} +1 -1
- package/dist/studio/assets/{index-CyJuVem3.js → index-DOh_HhC0.js} +1 -1
- package/dist/studio/assets/{index-C6ILRD5r.js → index-DrVeTSUu.js} +1 -1
- package/dist/studio/assets/{index-D_BrEbwA.js → index-PMVd-qOe.js} +1 -1
- package/dist/studio/assets/{index-XEPJWQKQ.js → index-SRXj7vHt.js} +1 -1
- package/dist/studio/assets/{index-BsoBdYqd.js → index-TIlNv6VR.js} +1 -1
- package/dist/studio/assets/{index-DuIPYHh9.js → index-VLo9WrPH.js} +1 -1
- package/dist/studio/assets/{index-BQCqfVBN.js → index-gP5QyDke.js} +1 -1
- package/dist/studio/assets/{inform7-6WuXDGa3.js → inform7-CXmpdphJ.js} +1 -1
- package/dist/studio/assets/{ini-BuyeS7Os.js → ini-BhJlnZOW.js} +1 -1
- package/dist/studio/assets/{io-8lvsgWiN.js → io-CKpbVI5V.js} +1 -1
- package/dist/studio/assets/{j-DtvLay4R.js → j-DyjePjrg.js} +1 -1
- package/dist/studio/assets/{java-DcGOR-wZ.js → java-D078uuY8.js} +1 -1
- package/dist/studio/assets/{javadoc-BWCAcOTi.js → javadoc-CZb86AgG.js} +1 -1
- package/dist/studio/assets/{javadoclike-Cx59syFs.js → javadoclike-DoPOKYqD.js} +1 -1
- package/dist/studio/assets/{javascript-BzRFWK2z.js → javascript-GHnqrQfc.js} +1 -1
- package/dist/studio/assets/{javastacktrace-vbq4RPhC.js → javastacktrace-BiDjdmj0.js} +1 -1
- package/dist/studio/assets/{jexl-CkBIWscf.js → jexl-CPj_eAp_.js} +1 -1
- package/dist/studio/assets/{jolie-CHijjtYR.js → jolie-CwT8JhJy.js} +1 -1
- package/dist/studio/assets/{jq-C5FclawZ.js → jq-BG39Yd9C.js} +1 -1
- package/dist/studio/assets/{js-extras-DpNGZv-7.js → js-extras-BDkj_9Mv.js} +1 -1
- package/dist/studio/assets/{js-templates-CcOlkYKy.js → js-templates-C3KMxytZ.js} +1 -1
- package/dist/studio/assets/{jsdoc-DZQ3bAFE.js → jsdoc-bPhV31Pa.js} +1 -1
- package/dist/studio/assets/{json-Bk7Jx1YL.js → json-CKZnHAT9.js} +1 -1
- package/dist/studio/assets/{json5-qTd9fsYK.js → json5-CMGpzdLJ.js} +1 -1
- package/dist/studio/assets/{jsonp-DJgPJumr.js → jsonp-4Nb9Metf.js} +1 -1
- package/dist/studio/assets/{jsstacktrace-DyfhxSeh.js → jsstacktrace-D_2bDALk.js} +1 -1
- package/dist/studio/assets/{jsx-DA2N-Hil.js → jsx-CFQtO2WJ.js} +1 -1
- package/dist/studio/assets/{julia-BTJwYkgF.js → julia-CVJcpt4K.js} +1 -1
- package/dist/studio/assets/{keepalived-BJXZEwFP.js → keepalived-bWj2Rg7F.js} +1 -1
- package/dist/studio/assets/{keyman-DTv96TSM.js → keyman-DuFkvC0r.js} +1 -1
- package/dist/studio/assets/{kotlin-CNmAdBcz.js → kotlin-BTzNdJe3.js} +1 -1
- package/dist/studio/assets/{kumir-C35PgBg-.js → kumir-7C_78aNf.js} +1 -1
- package/dist/studio/assets/{kusto-CmQskgGa.js → kusto-DZXm5Qio.js} +1 -1
- package/dist/studio/assets/{latex-DeuI4seH.js → latex-DriY0SMX.js} +1 -1
- package/dist/studio/assets/{latte-DTXMSyf-.js → latte-BWBPzn4f.js} +1 -1
- package/dist/studio/assets/{less-Bt4wttIu.js → less-DN7qgunI.js} +1 -1
- package/dist/studio/assets/{lilypond-D4sk2hE4.js → lilypond-4YxFRcRw.js} +1 -1
- package/dist/studio/assets/{liquid-WKN13X0E.js → liquid-Cd_uIucl.js} +1 -1
- package/dist/studio/assets/{lisp-BcCt8qUz.js → lisp-BP7jBTTA.js} +1 -1
- package/dist/studio/assets/{livescript-nGUlwGEe.js → livescript-DJbIh_S5.js} +1 -1
- package/dist/studio/assets/{llvm-mvUkRDZ1.js → llvm-CBlfYoCs.js} +1 -1
- package/dist/studio/assets/{log-DPBbfKfn.js → log-CSOFdK9w.js} +1 -1
- package/dist/studio/assets/{lolcode-hTxpW102.js → lolcode-n-3luXdm.js} +1 -1
- package/dist/studio/assets/{lua-BVnL91sh.js → lua-wiUrGgC9.js} +1 -1
- package/dist/studio/assets/{magma-BZgiGf2l.js → magma-CgD2fglf.js} +1 -1
- package/dist/studio/assets/{main-DmHC4I7_.js → main-D2cPBeEE.js} +312 -312
- package/dist/studio/assets/{makefile-D1CVd5uW.js → makefile-BQuhQXBU.js} +1 -1
- package/dist/studio/assets/{markdown-Cd1UQJCY.js → markdown-sY-jFJHf.js} +1 -1
- package/dist/studio/assets/{markup-n3iCmBYO.js → markup-jfJpUKiV.js} +1 -1
- package/dist/studio/assets/{markup-templating-D_QQHL4-.js → markup-templating-DABQEWXi.js} +1 -1
- package/dist/studio/assets/{matlab-pNQ7KPrc.js → matlab-B_G6jTNW.js} +1 -1
- package/dist/studio/assets/{maxscript-DVndWLQ6.js → maxscript-CRcjupwZ.js} +1 -1
- package/dist/studio/assets/{mel-DqOMIi0U.js → mel-CyHAybsi.js} +1 -1
- package/dist/studio/assets/{mermaid-HdMKTPbq.js → mermaid-CCEf4T8b.js} +1 -1
- package/dist/studio/assets/{mizar-K7QN7z-J.js → mizar-T2V4Ckms.js} +1 -1
- package/dist/studio/assets/{mongodb-B9PEhGD6.js → mongodb-DPNUWex7.js} +1 -1
- package/dist/studio/assets/{monkey-BHjVTisi.js → monkey-C4Z0BOAl.js} +1 -1
- package/dist/studio/assets/{moonscript-B5_2SCZp.js → moonscript-CELEbpU7.js} +1 -1
- package/dist/studio/assets/{n1ql-wDoBCF4E.js → n1ql-DnJCzhhr.js} +1 -1
- package/dist/studio/assets/{n4js-DuwxqZKJ.js → n4js-BSptiOL2.js} +1 -1
- package/dist/studio/assets/{nand2tetris-hdl-Em8Kkq9q.js → nand2tetris-hdl-Cmovt5Z5.js} +1 -1
- package/dist/studio/assets/{naniscript-BQW-10Ot.js → naniscript-DRSA-W4A.js} +1 -1
- package/dist/studio/assets/{nasm-Y46Lzkdj.js → nasm-LeEJPYox.js} +1 -1
- package/dist/studio/assets/{neon-Dw3Gw2Ek.js → neon-BTgE4VrP.js} +1 -1
- package/dist/studio/assets/{nevod-DHJ9N9Mh.js → nevod-CyJ75ZZ5.js} +1 -1
- package/dist/studio/assets/{nginx-DXHzftZ3.js → nginx-CMMQHhYQ.js} +1 -1
- package/dist/studio/assets/{nim-V5c80hbB.js → nim-DRii4PU9.js} +1 -1
- package/dist/studio/assets/{nix-Cqx7w5wp.js → nix-BV3FRdHT.js} +1 -1
- package/dist/studio/assets/{nsis-BLAFLTR5.js → nsis-CG7pg5w1.js} +1 -1
- package/dist/studio/assets/{objectivec-B4QSSm0O.js → objectivec-D1qkHI61.js} +1 -1
- package/dist/studio/assets/{ocaml-k2Jhdj-T.js → ocaml-G5UXRffb.js} +1 -1
- package/dist/studio/assets/{opencl-DHCPRruB.js → opencl-DH9om3Nj.js} +1 -1
- package/dist/studio/assets/{openqasm-Ci1ZkBET.js → openqasm-DUINt85m.js} +1 -1
- package/dist/studio/assets/{oz-CrSl-cqu.js → oz-DunlG4Xc.js} +1 -1
- package/dist/studio/assets/{parigp-DWVa8t9e.js → parigp-DVPv9_GX.js} +1 -1
- package/dist/studio/assets/{parser-DG2UJz1U.js → parser-DIKcLF4Z.js} +1 -1
- package/dist/studio/assets/{pascal-DvPlCbTl.js → pascal-DbPFyIjb.js} +1 -1
- package/dist/studio/assets/{pascaligo-Bv9cPRw9.js → pascaligo-oEFelDrB.js} +1 -1
- package/dist/studio/assets/{pcaxis-DbKU47bZ.js → pcaxis-DQdkdIra.js} +1 -1
- package/dist/studio/assets/{peoplecode-BUFq4PTS.js → peoplecode-BF8i0aVJ.js} +1 -1
- package/dist/studio/assets/{perl-Ct6_rdTA.js → perl-BPmDn3xJ.js} +1 -1
- package/dist/studio/assets/{php-B2zdoity.js → php-DFx87xJ2.js} +1 -1
- package/dist/studio/assets/{php-extras-WxCOtDih.js → php-extras-TAjpo9ic.js} +1 -1
- package/dist/studio/assets/{phpdoc-BPcd0dNi.js → phpdoc-BBrzwTbq.js} +1 -1
- package/dist/studio/assets/{plsql-BvdATC_T.js → plsql-DxkEtHA-.js} +1 -1
- package/dist/studio/assets/{powerquery-CU4B67zs.js → powerquery-EIiOTmVH.js} +1 -1
- package/dist/studio/assets/{powershell-BLa_zAwY.js → powershell-1pCzWd7H.js} +1 -1
- package/dist/studio/assets/{processing-CK9D83im.js → processing-O3xM6oaT.js} +1 -1
- package/dist/studio/assets/{prolog-CJHAShGp.js → prolog-BBW1KKhd.js} +1 -1
- package/dist/studio/assets/{promql-DYGWkBwy.js → promql-BmAWnd7K.js} +1 -1
- package/dist/studio/assets/{properties-vsDkGP4v.js → properties-93zmgEVF.js} +1 -1
- package/dist/studio/assets/{protobuf-C-JFcw3A.js → protobuf-BpXa51SY.js} +1 -1
- package/dist/studio/assets/{psl-Dq10XIsl.js → psl-B8xEWuyj.js} +1 -1
- package/dist/studio/assets/{pug-BJTMTsTa.js → pug-DXABnYPh.js} +1 -1
- package/dist/studio/assets/{puppet-CtwLYson.js → puppet-Bpo-cj4c.js} +1 -1
- package/dist/studio/assets/{pure-B2YUgR_I.js → pure-I_oldbAL.js} +1 -1
- package/dist/studio/assets/{purebasic-HJOetcMS.js → purebasic-DKhyd2nf.js} +1 -1
- package/dist/studio/assets/{purescript-DX9qvUlX.js → purescript-CaJ0yzj4.js} +1 -1
- package/dist/studio/assets/{python-CVfjx-_M.js → python-B_DfaSuB.js} +1 -1
- package/dist/studio/assets/{q-HaVGlukt.js → q-BmKhVqrW.js} +1 -1
- package/dist/studio/assets/{qml-BL_vSKDj.js → qml-CiaCtvhx.js} +1 -1
- package/dist/studio/assets/{qore-bVJPePxU.js → qore-zqdgeLCw.js} +1 -1
- package/dist/studio/assets/{qsharp-Nus_1O0f.js → qsharp-Bfpk-Ju6.js} +1 -1
- package/dist/studio/assets/{r-UFgf4yRo.js → r-ZAhBjghW.js} +1 -1
- package/dist/studio/assets/{racket-_xdaE1NM.js → racket-D2jHd5Y5.js} +1 -1
- package/dist/studio/assets/{reason-wnqhe4f-.js → reason-DgfE5uJL.js} +1 -1
- package/dist/studio/assets/{regex-cbU1WH99.js → regex-BfxeHUtm.js} +1 -1
- package/dist/studio/assets/{rego-B9cO5o8s.js → rego-Cv_EslLl.js} +1 -1
- package/dist/studio/assets/{renpy-CXHsVqDB.js → renpy-D3wvGV7S.js} +1 -1
- package/dist/studio/assets/{rest-BNTjfOx4.js → rest-D8vtQK8P.js} +1 -1
- package/dist/studio/assets/{rip-BLDsYeqI.js → rip-DG6svBOt.js} +1 -1
- package/dist/studio/assets/{roboconf-Bs0bV2NK.js → roboconf-UKYtERSh.js} +1 -1
- package/dist/studio/assets/{robotframework-D_rQ890U.js → robotframework-CxmbkvPF.js} +1 -1
- package/dist/studio/assets/{ruby-fk0xcXg4.js → ruby-BTDDgzKQ.js} +1 -1
- package/dist/studio/assets/{rust-CuJxH3Gw.js → rust-Dp_h83kI.js} +1 -1
- package/dist/studio/assets/{sas-Df_3rxFE.js → sas-obx5GLrt.js} +1 -1
- package/dist/studio/assets/{sass-D4HsFXhD.js → sass-B_0rm2vy.js} +1 -1
- package/dist/studio/assets/{scala-El4BA_cc.js → scala-CP4ekM-D.js} +1 -1
- package/dist/studio/assets/{scheme-CpLh_ZK3.js → scheme-DBjjeeFg.js} +1 -1
- package/dist/studio/assets/{scss-DiOfHZt3.js → scss-Bwa0z1tj.js} +1 -1
- package/dist/studio/assets/{shell-session-dLg_x-I_.js → shell-session-DwtZ-Fh4.js} +1 -1
- package/dist/studio/assets/{smali-vvBTyh_i.js → smali-CSJQP7J9.js} +1 -1
- package/dist/studio/assets/{smalltalk-DjnfNOiv.js → smalltalk-C40XJmMG.js} +1 -1
- package/dist/studio/assets/{smarty-D48PsanT.js → smarty-BUjSSkdu.js} +1 -1
- package/dist/studio/assets/{sml-CqbnRIMv.js → sml-IKAOe6zG.js} +1 -1
- package/dist/studio/assets/{solidity-PgHIzPSS.js → solidity-CCGf2MwZ.js} +1 -1
- package/dist/studio/assets/{solution-file-C6GI00QK.js → solution-file-X7RSrghd.js} +1 -1
- package/dist/studio/assets/{soy-B7-m4BEF.js → soy-BqKQ5sQi.js} +1 -1
- package/dist/studio/assets/{sparql-CeFr-Ayp.js → sparql-CIT1UlX4.js} +1 -1
- package/dist/studio/assets/{splunk-spl-CLFRu6RR.js → splunk-spl-BpbkQdY_.js} +1 -1
- package/dist/studio/assets/{sqf-Bf4U5n7z.js → sqf-CC54F0Ux.js} +1 -1
- package/dist/studio/assets/{sql-5N1hxC7I.js → sql-BYiJj09k.js} +1 -1
- package/dist/studio/assets/{squirrel-3PylnTOe.js → squirrel-2GZtIBTP.js} +1 -1
- package/dist/studio/assets/{stan-DvD5dVzB.js → stan-DOiorWGs.js} +1 -1
- package/dist/studio/assets/style-B2ZHD43y.css +1 -0
- package/dist/studio/assets/{stylus-B6x5HWF_.js → stylus-B5cwUYSp.js} +1 -1
- package/dist/studio/assets/{swift-ofMjFbei.js → swift-ixw0N4HA.js} +1 -1
- package/dist/studio/assets/{systemd-CzYiHrfF.js → systemd-DsZjZ8a0.js} +1 -1
- package/dist/studio/assets/{t4-cs-Ch6LhYJD.js → t4-cs-Cm1EfTPA.js} +1 -1
- package/dist/studio/assets/{t4-templating-QDDIyjR8.js → t4-templating-2YhQTmjq.js} +1 -1
- package/dist/studio/assets/{t4-vb-BeSZfRTx.js → t4-vb-8aHjRbIm.js} +1 -1
- package/dist/studio/assets/{tap-C7joQuaL.js → tap-CRHlY1Or.js} +1 -1
- package/dist/studio/assets/{tcl-zVVnM5CA.js → tcl-7npovFvo.js} +1 -1
- package/dist/studio/assets/{textile-VGjUDlZ-.js → textile-BUlvhhf1.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-SPYPLMBM-DaRSteij.js → token-6GSAFR2W-SPYPLMBM-Bf7GlBcT.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-SPYPLMBM-Bmb7aObX-DLwDpdOL.js → token-6GSAFR2W-SPYPLMBM-ChURikIE-CNho2omN.js} +1 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-CC_oJ7-c.js +1 -0
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-hEay2AHp-MVB0L1CT.js +1 -0
- package/dist/studio/assets/{toml-Dokq9P4C.js → toml-BNPtcwqv.js} +1 -1
- package/dist/studio/assets/{tremor-CQHWUjbs.js → tremor-DLtZvonv.js} +1 -1
- package/dist/studio/assets/{tsx-DpRGMkIr.js → tsx-DT09a_iL.js} +1 -1
- package/dist/studio/assets/{tt2-4F6RPBps.js → tt2-x_j3kSs9.js} +1 -1
- package/dist/studio/assets/{turtle-Df84yAkl.js → turtle-B8loHm6K.js} +1 -1
- package/dist/studio/assets/{twig-DRCbykcH.js → twig-D1zdFXdr.js} +1 -1
- package/dist/studio/assets/{typescript-lQjJkWVG.js → typescript-Bel8F5GH.js} +1 -1
- package/dist/studio/assets/{typoscript-CjhBYyVl.js → typoscript-v72Q67tZ.js} +1 -1
- package/dist/studio/assets/{unrealscript-DLPaJi3P.js → unrealscript-B2jMCb53.js} +1 -1
- package/dist/studio/assets/{uorazor-DEVMIbSm.js → uorazor-DohiT_We.js} +1 -1
- package/dist/studio/assets/{uri-DezK-75w.js → uri-DLgQjSQL.js} +1 -1
- package/dist/studio/assets/{v-D7CwOMw1.js → v-MZEOrqGC.js} +1 -1
- package/dist/studio/assets/{vala-yHLXhMgq.js → vala-DwfqEZ42.js} +1 -1
- package/dist/studio/assets/{vbnet-D0KExAq6.js → vbnet-Bfmp59ad.js} +1 -1
- package/dist/studio/assets/{velocity-BwWHZh8k.js → velocity-BW0rn6q8.js} +1 -1
- package/dist/studio/assets/{verilog-zzmIa1YB.js → verilog-CciPbndg.js} +1 -1
- package/dist/studio/assets/{vhdl-DIQbuh5h.js → vhdl-CcsUo07t.js} +1 -1
- package/dist/studio/assets/{vim-OyDYJsX4.js → vim-BYrWQT4U.js} +1 -1
- package/dist/studio/assets/{visual-basic-BeSnfCSI.js → visual-basic-DEkVTY1u.js} +1 -1
- package/dist/studio/assets/{warpscript-DzWWOjRA.js → warpscript-DrS6Lwf1.js} +1 -1
- package/dist/studio/assets/{wasm--Cfk3lmg.js → wasm-SvSErsNr.js} +1 -1
- package/dist/studio/assets/{web-idl-o6B_kOsu.js → web-idl-L4D9BFZn.js} +1 -1
- package/dist/studio/assets/{wiki-fA86WUs1.js → wiki-1KcTXRBD.js} +1 -1
- package/dist/studio/assets/{wolfram-DpnlowYm.js → wolfram-xAhrDLAD.js} +1 -1
- package/dist/studio/assets/{wren-BB8U1uUs.js → wren-DWt6yoPK.js} +1 -1
- package/dist/studio/assets/{xeora-XfDXqhKS.js → xeora-D686sMu3.js} +1 -1
- package/dist/studio/assets/{xml-doc-C-5OsdZg.js → xml-doc-Bquf1yJt.js} +1 -1
- package/dist/studio/assets/{xojo-D0klXP4D.js → xojo-DZfdDq2N.js} +1 -1
- package/dist/studio/assets/{xquery-D3FDhSRH.js → xquery-DdtAZAmm.js} +1 -1
- package/dist/studio/assets/{yaml-DgLL0Zl9.js → yaml-D4fft3QZ.js} +1 -1
- package/dist/studio/assets/{yang-B9-7wp62.js → yang-L0gWA1f7.js} +1 -1
- package/dist/studio/assets/{zig-DoeUoGlo.js → zig-BhGfFrYV.js} +1 -1
- package/dist/studio/index.html +2 -2
- package/package.json +5 -5
- package/dist/studio/assets/style-Bes5-x13.css +0 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-BLZ0BA54-FpXNFdjD.js +0 -1
- package/dist/studio/assets/token-util-NEHG7TUY-JRJTGTAB-DMbd-Isn.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;CAqFtC"}
|
|
@@ -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,iBAoJA"}
|
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-GPMDXHCF.js';
|
|
3
|
+
export { create } from './chunk-GPMDXHCF.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,262 @@ 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
|
+
try {
|
|
978
|
+
// Try to initialize storage - but catch MIGRATION_REQUIRED errors
|
|
979
|
+
// since that's exactly what we're here to fix
|
|
980
|
+
let migrationRequired = false;
|
|
981
|
+
try {
|
|
982
|
+
await storage.init();
|
|
983
|
+
} catch (initError) {
|
|
984
|
+
// Check if this is a MIGRATION_REQUIRED error (which is expected)
|
|
985
|
+
const errorMessage = initError instanceof Error ? initError.message : String(initError);
|
|
986
|
+
const errorId = (initError as any)?.id || '';
|
|
987
|
+
if (errorMessage.includes('MIGRATION_REQUIRED') || errorId.includes('MIGRATION_REQUIRED')) {
|
|
988
|
+
migrationRequired = true;
|
|
989
|
+
// This is expected - continue with migration
|
|
990
|
+
} else {
|
|
991
|
+
// Re-throw other errors
|
|
992
|
+
throw initError;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// Get the observability store
|
|
997
|
+
const observabilityStore = await storage.getStore('observability');
|
|
998
|
+
|
|
999
|
+
if (!observabilityStore) {
|
|
1000
|
+
console.log(JSON.stringify({
|
|
1001
|
+
success: false,
|
|
1002
|
+
alreadyMigrated: false,
|
|
1003
|
+
duplicatesRemoved: 0,
|
|
1004
|
+
message: 'Observability storage not configured. Migration not required.',
|
|
1005
|
+
}));
|
|
1006
|
+
process.exit(0);
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
// Check if the store has a migrateSpans method
|
|
1010
|
+
if (typeof observabilityStore.migrateSpans !== 'function') {
|
|
1011
|
+
console.log(JSON.stringify({
|
|
1012
|
+
success: false,
|
|
1013
|
+
alreadyMigrated: false,
|
|
1014
|
+
duplicatesRemoved: 0,
|
|
1015
|
+
message: 'Migration not supported for this storage backend.',
|
|
1016
|
+
}));
|
|
1017
|
+
process.exit(1);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
// Run the migration
|
|
1021
|
+
const result = await observabilityStore.migrateSpans();
|
|
1022
|
+
|
|
1023
|
+
console.log(JSON.stringify({
|
|
1024
|
+
success: result.success,
|
|
1025
|
+
alreadyMigrated: result.alreadyMigrated,
|
|
1026
|
+
duplicatesRemoved: result.duplicatesRemoved,
|
|
1027
|
+
message: result.message,
|
|
1028
|
+
}));
|
|
1029
|
+
|
|
1030
|
+
process.exit(result.success ? 0 : 1);
|
|
1031
|
+
} catch (error) {
|
|
1032
|
+
console.log(JSON.stringify({
|
|
1033
|
+
success: false,
|
|
1034
|
+
alreadyMigrated: false,
|
|
1035
|
+
duplicatesRemoved: 0,
|
|
1036
|
+
message: error instanceof Error ? error.message : 'Unknown error during migration',
|
|
1037
|
+
}));
|
|
1038
|
+
process.exit(1);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
runMigration();
|
|
1043
|
+
`;
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
|
|
1047
|
+
// src/commands/migrate/migrate.ts
|
|
1048
|
+
async function migrate({
|
|
1049
|
+
dir: dir2,
|
|
1050
|
+
root,
|
|
1051
|
+
env,
|
|
1052
|
+
debug,
|
|
1053
|
+
yes
|
|
1054
|
+
}) {
|
|
1055
|
+
const logger2 = createLogger(debug);
|
|
1056
|
+
const rootDir = root || process3.cwd();
|
|
1057
|
+
const mastraDir = dir2 ? dir2.startsWith("/") ? dir2 : join(process3.cwd(), dir2) : join(process3.cwd(), "src", "mastra");
|
|
1058
|
+
const dotMastraPath = join(rootDir, ".mastra");
|
|
1059
|
+
logger2.info(pc3.cyan("Mastra Storage Migration"));
|
|
1060
|
+
logger2.info("");
|
|
1061
|
+
if (!yes) {
|
|
1062
|
+
logger2.info(pc3.yellow("\u26A0\uFE0F Warning: This migration will modify your database."));
|
|
1063
|
+
logger2.info("");
|
|
1064
|
+
logger2.info(" Before proceeding, please ensure you have:");
|
|
1065
|
+
logger2.info(" \u2022 Created a backup of your database");
|
|
1066
|
+
logger2.info(" \u2022 Tested this migration in a non-production environment");
|
|
1067
|
+
logger2.info("");
|
|
1068
|
+
const confirmed = await p2.confirm({
|
|
1069
|
+
message: "Have you backed up your database and are ready to proceed?",
|
|
1070
|
+
initialValue: false
|
|
1071
|
+
});
|
|
1072
|
+
if (p2.isCancel(confirmed) || !confirmed) {
|
|
1073
|
+
logger2.info("");
|
|
1074
|
+
logger2.info("Migration cancelled. Please back up your database before running this command.");
|
|
1075
|
+
logger2.info(pc3.dim("Tip: Use --yes or -y to skip this prompt in CI/automation."));
|
|
1076
|
+
process3.exit(0);
|
|
1077
|
+
}
|
|
1078
|
+
logger2.info("");
|
|
1079
|
+
}
|
|
1080
|
+
try {
|
|
1081
|
+
const fileService = new FileService$1();
|
|
1082
|
+
const entryFile = fileService.getFirstExistingFile([join(mastraDir, "index.ts"), join(mastraDir, "index.js")]);
|
|
1083
|
+
const bundler = new MigrateBundler(env);
|
|
1084
|
+
bundler.__setLogger(logger2);
|
|
1085
|
+
logger2.info("Building project for migration...");
|
|
1086
|
+
await bundler.prepare(dotMastraPath);
|
|
1087
|
+
const discoveredTools = bundler.getAllToolPaths(mastraDir, []);
|
|
1088
|
+
await bundler.bundle(entryFile, dotMastraPath, {
|
|
1089
|
+
toolsPaths: discoveredTools,
|
|
1090
|
+
projectRoot: rootDir
|
|
1091
|
+
});
|
|
1092
|
+
logger2.info("Running migration...");
|
|
1093
|
+
logger2.info(pc3.dim("This may take a while for large tables."));
|
|
1094
|
+
logger2.info("");
|
|
1095
|
+
const loadedEnv = await bundler.loadEnvVars();
|
|
1096
|
+
const migrationProcess = execa(process3.execPath, [join(dotMastraPath, "output", "index.mjs")], {
|
|
1097
|
+
cwd: rootDir,
|
|
1098
|
+
env: {
|
|
1099
|
+
NODE_ENV: "production",
|
|
1100
|
+
...Object.fromEntries(loadedEnv)
|
|
1101
|
+
},
|
|
1102
|
+
stdio: ["inherit", "pipe", "pipe"],
|
|
1103
|
+
reject: false
|
|
1104
|
+
});
|
|
1105
|
+
let stdoutData = "";
|
|
1106
|
+
let stderrData = "";
|
|
1107
|
+
migrationProcess.stdout?.on("data", (data) => {
|
|
1108
|
+
stdoutData += data.toString();
|
|
1109
|
+
});
|
|
1110
|
+
migrationProcess.stderr?.on("data", (data) => {
|
|
1111
|
+
stderrData += data.toString();
|
|
1112
|
+
if (debug) {
|
|
1113
|
+
process3.stderr.write(data);
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
const processResult = await migrationProcess;
|
|
1117
|
+
let result;
|
|
1118
|
+
try {
|
|
1119
|
+
const jsonMatch = stdoutData.match(/\{[^{}]*"success"[^{}]*\}/g);
|
|
1120
|
+
if (jsonMatch && jsonMatch.length > 0) {
|
|
1121
|
+
result = JSON.parse(jsonMatch[jsonMatch.length - 1]);
|
|
1122
|
+
}
|
|
1123
|
+
} catch {
|
|
1124
|
+
}
|
|
1125
|
+
if (result) {
|
|
1126
|
+
if (result.success) {
|
|
1127
|
+
if (result.alreadyMigrated) {
|
|
1128
|
+
logger2.info(pc3.green("\u2713 Migration already complete."));
|
|
1129
|
+
} else {
|
|
1130
|
+
logger2.info(pc3.green("\u2713 Migration completed successfully!"));
|
|
1131
|
+
if (result.duplicatesRemoved > 0) {
|
|
1132
|
+
logger2.info(` Removed ${result.duplicatesRemoved} duplicate entries.`);
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
logger2.info(` ${result.message}`);
|
|
1136
|
+
} else {
|
|
1137
|
+
logger2.error(pc3.red("\u2717 Migration failed."));
|
|
1138
|
+
logger2.error(` ${result.message}`);
|
|
1139
|
+
process3.exit(1);
|
|
1140
|
+
}
|
|
1141
|
+
} else {
|
|
1142
|
+
if (processResult.exitCode !== 0) {
|
|
1143
|
+
logger2.error(pc3.red("\u2717 Migration failed."));
|
|
1144
|
+
if (stderrData) {
|
|
1145
|
+
logger2.error(stderrData);
|
|
1146
|
+
}
|
|
1147
|
+
if (stdoutData && !stdoutData.includes('"success"')) {
|
|
1148
|
+
logger2.error(stdoutData);
|
|
1149
|
+
}
|
|
1150
|
+
process3.exit(1);
|
|
1151
|
+
} else {
|
|
1152
|
+
logger2.info(pc3.green("\u2713 Migration completed."));
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
} catch (error) {
|
|
1156
|
+
if (error.code === "ERR_MODULE_NOT_FOUND" || error.message?.includes("Cannot find module")) {
|
|
1157
|
+
logger2.error(pc3.red("Error: Could not find Mastra entry file."));
|
|
1158
|
+
logger2.info("");
|
|
1159
|
+
logger2.info("Make sure you have a mastra directory with an index.ts or index.js file.");
|
|
1160
|
+
logger2.info(`Expected location: ${mastraDir}`);
|
|
1161
|
+
logger2.info("");
|
|
1162
|
+
logger2.info("You can specify a custom directory:");
|
|
1163
|
+
logger2.info(pc3.cyan(" npx mastra migrate --dir path/to/mastra"));
|
|
1164
|
+
} else {
|
|
1165
|
+
logger2.error(pc3.red(`Error: ${error.message}`));
|
|
1166
|
+
if (debug) {
|
|
1167
|
+
logger2.error(error);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
process3.exit(1);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
// src/commands/actions/migrate.ts
|
|
1175
|
+
var migrate2 = async (args) => {
|
|
1176
|
+
await analytics.trackCommandExecution({
|
|
1177
|
+
command: "mastra migrate",
|
|
1178
|
+
args: { ...args },
|
|
1179
|
+
execution: async () => {
|
|
1180
|
+
await migrate({
|
|
1181
|
+
dir: args?.dir,
|
|
1182
|
+
root: args?.root,
|
|
1183
|
+
env: args?.env,
|
|
1184
|
+
debug: args?.debug ?? false,
|
|
1185
|
+
yes: args?.yes ?? false
|
|
1186
|
+
});
|
|
1187
|
+
},
|
|
1188
|
+
origin: origin2
|
|
1189
|
+
});
|
|
1190
|
+
};
|
|
935
1191
|
var DevLogger = class {
|
|
936
1192
|
options;
|
|
937
1193
|
constructor(options = {}) {
|
|
@@ -943,32 +1199,32 @@ var DevLogger = class {
|
|
|
943
1199
|
}
|
|
944
1200
|
formatTime() {
|
|
945
1201
|
if (!this.options.timestamp) return "";
|
|
946
|
-
return
|
|
1202
|
+
return pc3.dim((/* @__PURE__ */ new Date()).toLocaleTimeString());
|
|
947
1203
|
}
|
|
948
1204
|
formatPrefix(text2, color2) {
|
|
949
1205
|
const time = this.formatTime();
|
|
950
|
-
const prefix =
|
|
1206
|
+
const prefix = pc3.bold(color2(text2));
|
|
951
1207
|
return time ? `${time} ${prefix}` : prefix;
|
|
952
1208
|
}
|
|
953
1209
|
info(message) {
|
|
954
|
-
const prefix = this.formatPrefix("\u25D0",
|
|
1210
|
+
const prefix = this.formatPrefix("\u25D0", pc3.cyan);
|
|
955
1211
|
console.info(`${prefix} ${message}`);
|
|
956
1212
|
}
|
|
957
1213
|
success(message) {
|
|
958
|
-
const prefix = this.formatPrefix("\u2713",
|
|
959
|
-
console.info(`${prefix} ${
|
|
1214
|
+
const prefix = this.formatPrefix("\u2713", pc3.green);
|
|
1215
|
+
console.info(`${prefix} ${pc3.green(message)}`);
|
|
960
1216
|
}
|
|
961
1217
|
warn(message) {
|
|
962
|
-
const prefix = this.formatPrefix("\u26A0",
|
|
963
|
-
console.info(`${prefix} ${
|
|
1218
|
+
const prefix = this.formatPrefix("\u26A0", pc3.yellow);
|
|
1219
|
+
console.info(`${prefix} ${pc3.yellow(message)}`);
|
|
964
1220
|
}
|
|
965
1221
|
error(message) {
|
|
966
|
-
const prefix = this.formatPrefix("\u2717",
|
|
967
|
-
console.info(`${prefix} ${
|
|
1222
|
+
const prefix = this.formatPrefix("\u2717", pc3.red);
|
|
1223
|
+
console.info(`${prefix} ${pc3.red(message)}`);
|
|
968
1224
|
}
|
|
969
1225
|
starting() {
|
|
970
|
-
const prefix = this.formatPrefix("\u25C7",
|
|
971
|
-
console.info(`${prefix} ${
|
|
1226
|
+
const prefix = this.formatPrefix("\u25C7", pc3.blue);
|
|
1227
|
+
console.info(`${prefix} ${pc3.blue("Starting Mastra dev server...")}`);
|
|
972
1228
|
}
|
|
973
1229
|
ready(host, port, studioBasePath, startTime, https) {
|
|
974
1230
|
let protocol = "http";
|
|
@@ -977,62 +1233,62 @@ var DevLogger = class {
|
|
|
977
1233
|
}
|
|
978
1234
|
console.info("");
|
|
979
1235
|
const timing = startTime ? `${Date.now() - startTime} ms` : "XXX ms";
|
|
980
|
-
console.info(
|
|
1236
|
+
console.info(pc3.inverse(pc3.green(" mastra ")) + ` ${pc3.green(version)} ${pc3.gray("ready in")} ${timing}`);
|
|
981
1237
|
console.info("");
|
|
982
|
-
console.info(`${
|
|
983
|
-
console.info(`${
|
|
1238
|
+
console.info(`${pc3.dim("\u2502")} ${pc3.bold("Studio:")} ${pc3.cyan(`${protocol}://${host}:${port}${studioBasePath}`)}`);
|
|
1239
|
+
console.info(`${pc3.dim("\u2502")} ${pc3.bold("API:")} ${`${protocol}://${host}:${port}/api`}`);
|
|
984
1240
|
console.info("");
|
|
985
1241
|
}
|
|
986
1242
|
bundling() {
|
|
987
|
-
const prefix = this.formatPrefix("\u25D0",
|
|
988
|
-
console.info(`${prefix} ${
|
|
1243
|
+
const prefix = this.formatPrefix("\u25D0", pc3.magenta);
|
|
1244
|
+
console.info(`${prefix} ${pc3.magenta("Bundling...")}`);
|
|
989
1245
|
}
|
|
990
1246
|
bundleComplete() {
|
|
991
|
-
const prefix = this.formatPrefix("\u2713",
|
|
992
|
-
console.info(`${prefix} ${
|
|
1247
|
+
const prefix = this.formatPrefix("\u2713", pc3.green);
|
|
1248
|
+
console.info(`${prefix} ${pc3.green("Bundle complete")}`);
|
|
993
1249
|
}
|
|
994
1250
|
watching() {
|
|
995
1251
|
const time = this.formatTime();
|
|
996
|
-
const icon =
|
|
997
|
-
const message =
|
|
1252
|
+
const icon = pc3.dim("\u25EF");
|
|
1253
|
+
const message = pc3.dim("watching for file changes...");
|
|
998
1254
|
const fullMessage = `${icon} ${message}`;
|
|
999
1255
|
console.info(time ? `${time} ${fullMessage}` : fullMessage);
|
|
1000
1256
|
}
|
|
1001
1257
|
restarting() {
|
|
1002
|
-
const prefix = this.formatPrefix("\u21BB",
|
|
1003
|
-
console.info(`${prefix} ${
|
|
1258
|
+
const prefix = this.formatPrefix("\u21BB", pc3.blue);
|
|
1259
|
+
console.info(`${prefix} ${pc3.blue("Restarting server...")}`);
|
|
1004
1260
|
}
|
|
1005
1261
|
fileChange(file) {
|
|
1006
|
-
const prefix = this.formatPrefix("\u26A1",
|
|
1262
|
+
const prefix = this.formatPrefix("\u26A1", pc3.cyan);
|
|
1007
1263
|
const fileName = path.basename(file);
|
|
1008
|
-
console.info(`${prefix} ${
|
|
1264
|
+
console.info(`${prefix} ${pc3.cyan("File changed:")} ${pc3.dim(fileName)}`);
|
|
1009
1265
|
}
|
|
1010
1266
|
// Enhanced error reporting
|
|
1011
1267
|
serverError(error) {
|
|
1012
1268
|
console.info("");
|
|
1013
|
-
console.info(
|
|
1269
|
+
console.info(pc3.red(" \u2717 ") + pc3.bold(pc3.red("Server Error")));
|
|
1014
1270
|
console.info("");
|
|
1015
|
-
console.info(` ${
|
|
1271
|
+
console.info(` ${pc3.red("\u2502")} ${error}`);
|
|
1016
1272
|
console.info("");
|
|
1017
1273
|
}
|
|
1018
1274
|
shutdown() {
|
|
1019
1275
|
console.info("");
|
|
1020
|
-
const prefix = this.formatPrefix("\u2713",
|
|
1021
|
-
console.info(`${prefix} ${
|
|
1276
|
+
const prefix = this.formatPrefix("\u2713", pc3.green);
|
|
1277
|
+
console.info(`${prefix} ${pc3.green("Dev server stopped")}`);
|
|
1022
1278
|
}
|
|
1023
1279
|
envInfo(info) {
|
|
1024
1280
|
console.info("");
|
|
1025
|
-
console.info(` ${
|
|
1026
|
-
console.info(` ${
|
|
1027
|
-
console.info(` ${
|
|
1281
|
+
console.info(` ${pc3.dim("\u2502")} ${pc3.bold("Environment:")} ${pc3.cyan(info.env || "development")}`);
|
|
1282
|
+
console.info(` ${pc3.dim("\u2502")} ${pc3.bold("Root:")} ${pc3.dim(info.root)}`);
|
|
1283
|
+
console.info(` ${pc3.dim("\u2502")} ${pc3.bold("Port:")} ${pc3.cyan(info.port.toString())}`);
|
|
1028
1284
|
}
|
|
1029
1285
|
raw(message) {
|
|
1030
1286
|
console.info(message);
|
|
1031
1287
|
}
|
|
1032
1288
|
debug(message) {
|
|
1033
1289
|
if (process.env.DEBUG || process.env.MASTRA_DEBUG) {
|
|
1034
|
-
const prefix = this.formatPrefix("\u25E6",
|
|
1035
|
-
console.info(`${prefix} ${
|
|
1290
|
+
const prefix = this.formatPrefix("\u25E6", pc3.gray);
|
|
1291
|
+
console.info(`${prefix} ${pc3.gray(message)}`);
|
|
1036
1292
|
}
|
|
1037
1293
|
}
|
|
1038
1294
|
spinnerChars = ["\u25D0", "\u25D3", "\u25D1", "\u25D2"];
|
|
@@ -1047,7 +1303,7 @@ var DevLogger = class {
|
|
|
1047
1303
|
}
|
|
1048
1304
|
update(message) {
|
|
1049
1305
|
this.clearLine();
|
|
1050
|
-
const prefix = this.formatPrefix(this.getSpinnerChar(),
|
|
1306
|
+
const prefix = this.formatPrefix(this.getSpinnerChar(), pc3.cyan);
|
|
1051
1307
|
process.stdout.write(`${prefix} ${message}`);
|
|
1052
1308
|
}
|
|
1053
1309
|
};
|
|
@@ -1253,7 +1509,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1253
1509
|
await writeFile(packagesFilePath, JSON.stringify(startOptions.mastraPackages), "utf-8");
|
|
1254
1510
|
}
|
|
1255
1511
|
await mkdir(publicDir, { recursive: true });
|
|
1256
|
-
currentServerProcess = execa(
|
|
1512
|
+
currentServerProcess = execa(process3.execPath, commands, {
|
|
1257
1513
|
cwd: publicDir,
|
|
1258
1514
|
env: {
|
|
1259
1515
|
NODE_ENV: "production",
|
|
@@ -1281,7 +1537,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1281
1537
|
currentServerProcess.stdout.on("data", (data) => {
|
|
1282
1538
|
const output = data.toString();
|
|
1283
1539
|
if (!output.includes("Studio available") && !output.includes("\u{1F468}\u200D\u{1F4BB}") && !output.includes("Mastra API running on ")) {
|
|
1284
|
-
|
|
1540
|
+
process3.stdout.write(output);
|
|
1285
1541
|
}
|
|
1286
1542
|
});
|
|
1287
1543
|
}
|
|
@@ -1289,7 +1545,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1289
1545
|
currentServerProcess.stderr.on("data", (data) => {
|
|
1290
1546
|
const output = data.toString();
|
|
1291
1547
|
if (!output.includes("Studio available") && !output.includes("\u{1F468}\u200D\u{1F4BB}") && !output.includes("Mastra API running on ")) {
|
|
1292
|
-
|
|
1548
|
+
process3.stderr.write(output);
|
|
1293
1549
|
}
|
|
1294
1550
|
});
|
|
1295
1551
|
}
|
|
@@ -1340,7 +1596,7 @@ var startServer = async (dotMastraPath, { port, host, studioBasePath, publicDir
|
|
|
1340
1596
|
errorRestartCount++;
|
|
1341
1597
|
if (errorRestartCount > ON_ERROR_MAX_RESTARTS) {
|
|
1342
1598
|
devLogger.error(`Server failed to start after ${ON_ERROR_MAX_RESTARTS} error attempts. Giving up.`);
|
|
1343
|
-
|
|
1599
|
+
process3.exit(1);
|
|
1344
1600
|
}
|
|
1345
1601
|
devLogger.warn(
|
|
1346
1602
|
`Attempting to restart server after error... (Attempt ${errorRestartCount}/${ON_ERROR_MAX_RESTARTS})`
|
|
@@ -1393,7 +1649,7 @@ async function rebundleAndRestart(dotMastraPath, { port, host, studioBasePath, p
|
|
|
1393
1649
|
}
|
|
1394
1650
|
const env = await bundler.loadEnvVars();
|
|
1395
1651
|
for (const [key, value] of env.entries()) {
|
|
1396
|
-
|
|
1652
|
+
process3.env[key] = value;
|
|
1397
1653
|
}
|
|
1398
1654
|
await startServer(
|
|
1399
1655
|
join(dotMastraPath, "output"),
|
|
@@ -1421,8 +1677,8 @@ async function dev({
|
|
|
1421
1677
|
https,
|
|
1422
1678
|
debug
|
|
1423
1679
|
}) {
|
|
1424
|
-
const rootDir = root ||
|
|
1425
|
-
const mastraDir = dir2 ? dir2.startsWith("/") ? dir2 : join(
|
|
1680
|
+
const rootDir = root || process3.cwd();
|
|
1681
|
+
const mastraDir = dir2 ? dir2.startsWith("/") ? dir2 : join(process3.cwd(), dir2) : join(process3.cwd(), "src", "mastra");
|
|
1426
1682
|
const dotMastraPath = join(rootDir, ".mastra");
|
|
1427
1683
|
const fileService = new FileService$1();
|
|
1428
1684
|
const entryFile = fileService.getFirstExistingFile([join(mastraDir, "index.ts"), join(mastraDir, "index.js")]);
|
|
@@ -1431,11 +1687,11 @@ async function dev({
|
|
|
1431
1687
|
const discoveredTools = bundler.getAllToolPaths(mastraDir, tools ?? []);
|
|
1432
1688
|
const loadedEnv = await bundler.loadEnvVars();
|
|
1433
1689
|
for (const [key, value] of loadedEnv.entries()) {
|
|
1434
|
-
|
|
1690
|
+
process3.env[key] = value;
|
|
1435
1691
|
}
|
|
1436
1692
|
const serverOptions = await getServerOptions(entryFile, join(dotMastraPath, "output"));
|
|
1437
|
-
let portToUse = serverOptions?.port ??
|
|
1438
|
-
let hostToUse = serverOptions?.host ??
|
|
1693
|
+
let portToUse = serverOptions?.port ?? process3.env.PORT;
|
|
1694
|
+
let hostToUse = serverOptions?.host ?? process3.env.HOST ?? "localhost";
|
|
1439
1695
|
const studioBasePathToUse = normalizeStudioBase(serverOptions?.studioBase ?? "/");
|
|
1440
1696
|
if (!portToUse || isNaN(Number(portToUse))) {
|
|
1441
1697
|
const portList = Array.from({ length: 21 }, (_, i) => 4111 + i);
|
|
@@ -1490,13 +1746,13 @@ async function dev({
|
|
|
1490
1746
|
);
|
|
1491
1747
|
}
|
|
1492
1748
|
});
|
|
1493
|
-
|
|
1749
|
+
process3.on("SIGINT", () => {
|
|
1494
1750
|
devLogger.shutdown();
|
|
1495
1751
|
if (currentServerProcess) {
|
|
1496
1752
|
currentServerProcess.kill();
|
|
1497
1753
|
}
|
|
1498
1754
|
watcher.close().catch(() => {
|
|
1499
|
-
}).finally(() =>
|
|
1755
|
+
}).finally(() => process3.exit(0));
|
|
1500
1756
|
});
|
|
1501
1757
|
}
|
|
1502
1758
|
|
|
@@ -1672,7 +1928,7 @@ var origin2 = process.env.MASTRA_ANALYTICS_ORIGIN;
|
|
|
1672
1928
|
program.name("mastra").version(`${version}`, "-v, --version").addHelpText(
|
|
1673
1929
|
"before",
|
|
1674
1930
|
`
|
|
1675
|
-
${
|
|
1931
|
+
${pc3.bold(pc3.cyan("Mastra"))} is a typescript framework for building AI applications, agents, and workflows.
|
|
1676
1932
|
`
|
|
1677
1933
|
).action(() => {
|
|
1678
1934
|
program.help();
|
|
@@ -1715,6 +1971,7 @@ program.command("dev").description("Start mastra server").option("-d, --dir <dir
|
|
|
1715
1971
|
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
1972
|
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
1973
|
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);
|
|
1974
|
+
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
1975
|
var scorersCommand = program.command("scorers").description("Manage scorers for evaluating AI outputs");
|
|
1719
1976
|
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
1977
|
scorersCommand.command("list").description("List available scorer templates").action(listScorers);
|