@keystrokehq/cli 0.1.147 → 0.1.149
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/README.md +35 -42
- package/dist/{alias-RTYYYW3D-CLFgrowj.mjs → alias-RTYYYW3D-BDy5K94v.mjs} +2 -2
- package/dist/{alias-RTYYYW3D-CLFgrowj.mjs.map → alias-RTYYYW3D-BDy5K94v.mjs.map} +1 -1
- package/dist/{awk2-LA3USKJP-BbsfXVlR.mjs → awk2-LA3USKJP-bQiQEw4P.mjs} +8 -8
- package/dist/{awk2-LA3USKJP-BbsfXVlR.mjs.map → awk2-LA3USKJP-bQiQEw4P.mjs.map} +1 -1
- package/dist/{base64-C2AIWVNC-C0WIgu5V.mjs → base64-C2AIWVNC-DMnyEdfa.mjs} +2 -2
- package/dist/{base64-C2AIWVNC-C0WIgu5V.mjs.map → base64-C2AIWVNC-DMnyEdfa.mjs.map} +1 -1
- package/dist/{basename-UB3CIYNI-BgNN3bGm.mjs → basename-UB3CIYNI-DOxZLtwj.mjs} +2 -2
- package/dist/{basename-UB3CIYNI-BgNN3bGm.mjs.map → basename-UB3CIYNI-DOxZLtwj.mjs.map} +1 -1
- package/dist/{bash-YZ33HQZQ-N6YyKtUH.mjs → bash-YZ33HQZQ-D4vRBW1d.mjs} +2 -2
- package/dist/{bash-YZ33HQZQ-N6YyKtUH.mjs.map → bash-YZ33HQZQ-D4vRBW1d.mjs.map} +1 -1
- package/dist/{cat-TSFMZVYS-Dz3-oHsV.mjs → cat-TSFMZVYS-D8QgnfyP.mjs} +3 -3
- package/dist/{cat-TSFMZVYS-Dz3-oHsV.mjs.map → cat-TSFMZVYS-D8QgnfyP.mjs.map} +1 -1
- package/dist/{chmod-TFEPA42X-YF02QJUv.mjs → chmod-TFEPA42X-CRWIslQq.mjs} +2 -2
- package/dist/{chmod-TFEPA42X-YF02QJUv.mjs.map → chmod-TFEPA42X-CRWIslQq.mjs.map} +1 -1
- package/dist/{chunk-5H5SCKJM-BvfXlL01.mjs → chunk-5H5SCKJM-BaNr0aSJ.mjs} +4 -4
- package/dist/{chunk-5H5SCKJM-BvfXlL01.mjs.map → chunk-5H5SCKJM-BaNr0aSJ.mjs.map} +1 -1
- package/dist/{chunk-EBAPSGAO-Ctfslw2R.mjs → chunk-EBAPSGAO-BRba1GMs.mjs} +2 -2
- package/dist/{chunk-EBAPSGAO-Ctfslw2R.mjs.map → chunk-EBAPSGAO-BRba1GMs.mjs.map} +1 -1
- package/dist/{chunk-LEKBROJD-CJMrAyu9.mjs → chunk-LEKBROJD-D1fMh3yQ.mjs} +3 -3
- package/dist/{chunk-LEKBROJD-CJMrAyu9.mjs.map → chunk-LEKBROJD-D1fMh3yQ.mjs.map} +1 -1
- package/dist/{clear-HKGFEOF6-CekN2x-O.mjs → clear-HKGFEOF6-Cy0E2H3t.mjs} +2 -2
- package/dist/{clear-HKGFEOF6-CekN2x-O.mjs.map → clear-HKGFEOF6-Cy0E2H3t.mjs.map} +1 -1
- package/dist/{column-XT6UFXNQ-DHENV9D2.mjs → column-XT6UFXNQ-czPN0bKF.mjs} +2 -2
- package/dist/{column-XT6UFXNQ-DHENV9D2.mjs.map → column-XT6UFXNQ-czPN0bKF.mjs.map} +1 -1
- package/dist/{comm-VV2LDX2J-ppxDJFkY.mjs → comm-VV2LDX2J-nTDBS00q.mjs} +2 -2
- package/dist/{comm-VV2LDX2J-ppxDJFkY.mjs.map → comm-VV2LDX2J-nTDBS00q.mjs.map} +1 -1
- package/dist/{cp-BISAAS7A-CMWayU4n.mjs → cp-BISAAS7A-CXqDGSmH.mjs} +3 -3
- package/dist/{cp-BISAAS7A-CMWayU4n.mjs.map → cp-BISAAS7A-CXqDGSmH.mjs.map} +1 -1
- package/dist/{cut-OKARJCCV-Bt8b58eI.mjs → cut-OKARJCCV-8_v90N99.mjs} +3 -3
- package/dist/{cut-OKARJCCV-Bt8b58eI.mjs.map → cut-OKARJCCV-8_v90N99.mjs.map} +1 -1
- package/dist/{date-UUUPW43J-B7T5OTZZ.mjs → date-UUUPW43J-BiJvTWWs.mjs} +2 -2
- package/dist/{date-UUUPW43J-B7T5OTZZ.mjs.map → date-UUUPW43J-BiJvTWWs.mjs.map} +1 -1
- package/dist/{diff-MWJFIG7X-DhnPc_5r.mjs → diff-MWJFIG7X-D5by0o7Y.mjs} +2 -2
- package/dist/{diff-MWJFIG7X-DhnPc_5r.mjs.map → diff-MWJFIG7X-D5by0o7Y.mjs.map} +1 -1
- package/dist/{dirname-MPHRFUTI-Dkb3S4OX.mjs → dirname-MPHRFUTI-VCKXiC16.mjs} +2 -2
- package/dist/{dirname-MPHRFUTI-Dkb3S4OX.mjs.map → dirname-MPHRFUTI-VCKXiC16.mjs.map} +1 -1
- package/dist/dist-BlsDG7kb.mjs +3 -0
- package/dist/{dist-E6dh6qXe.mjs → dist-C6adeAws.mjs} +1006 -138
- package/dist/dist-C6adeAws.mjs.map +1 -0
- package/dist/dist-DJQnugPi.mjs +1829 -0
- package/dist/dist-DJQnugPi.mjs.map +1 -0
- package/dist/{dist-B72RPrho.mjs → dist-DSkS8uEB.mjs} +43888 -28664
- package/dist/dist-DSkS8uEB.mjs.map +1 -0
- package/dist/dist-Dq1kkbLy.mjs +4 -0
- package/dist/{du-572XNP42-ClP4jXB1.mjs → du-572XNP42-C_zifijt.mjs} +3 -3
- package/dist/{du-572XNP42-ClP4jXB1.mjs.map → du-572XNP42-C_zifijt.mjs.map} +1 -1
- package/dist/{env-36M5BO7M-CsP_aiWr.mjs → env-36M5BO7M-CEbFSWHW.mjs} +6 -6
- package/dist/{env-36M5BO7M-CsP_aiWr.mjs.map → env-36M5BO7M-CEbFSWHW.mjs.map} +1 -1
- package/dist/{expand-JSPG6VOP-B-YUvYpu.mjs → expand-JSPG6VOP-CxlV2zRG.mjs} +2 -2
- package/dist/{expand-JSPG6VOP-B-YUvYpu.mjs.map → expand-JSPG6VOP-CxlV2zRG.mjs.map} +1 -1
- package/dist/{expr-5JAACS4X-1TBq84gG.mjs → expr-5JAACS4X-CM1VDr6S.mjs} +2 -2
- package/dist/{expr-5JAACS4X-1TBq84gG.mjs.map → expr-5JAACS4X-CM1VDr6S.mjs.map} +1 -1
- package/dist/{file-IPZJC3FQ-DcZNOWyY.mjs → file-IPZJC3FQ-DYa9X4WH.mjs} +17 -17
- package/dist/file-IPZJC3FQ-DYa9X4WH.mjs.map +1 -0
- package/dist/{find-INTH3OLC-6p47KeeT.mjs → find-INTH3OLC-CPiHWE9r.mjs} +4 -4
- package/dist/{find-INTH3OLC-6p47KeeT.mjs.map → find-INTH3OLC-CPiHWE9r.mjs.map} +1 -1
- package/dist/{fold-4TQNYMSW-C54bHzLd.mjs → fold-4TQNYMSW-B4tfWHg3.mjs} +2 -2
- package/dist/{fold-4TQNYMSW-C54bHzLd.mjs.map → fold-4TQNYMSW-B4tfWHg3.mjs.map} +1 -1
- package/dist/{grep-V3LQVMRQ-D99Bq7Kj.mjs → grep-V3LQVMRQ-BbRYJxzz.mjs} +3 -3
- package/dist/{grep-V3LQVMRQ-D99Bq7Kj.mjs.map → grep-V3LQVMRQ-BbRYJxzz.mjs.map} +1 -1
- package/dist/{gzip-O5ASJAFY-CZDRROqP.mjs → gzip-O5ASJAFY-rKFFXJyd.mjs} +2 -2
- package/dist/{gzip-O5ASJAFY-CZDRROqP.mjs.map → gzip-O5ASJAFY-rKFFXJyd.mjs.map} +1 -1
- package/dist/{head-442HYESI-D96RMdki.mjs → head-442HYESI-sl2UFkqV.mjs} +2 -2
- package/dist/{head-442HYESI-D96RMdki.mjs.map → head-442HYESI-sl2UFkqV.mjs.map} +1 -1
- package/dist/{history-WYYKSLSZ-ACNQVupn.mjs → history-WYYKSLSZ-BQO1BlWh.mjs} +2 -2
- package/dist/{history-WYYKSLSZ-ACNQVupn.mjs.map → history-WYYKSLSZ-BQO1BlWh.mjs.map} +1 -1
- package/dist/{html-to-markdown-JW4MSQZO-DQOxFIvF.mjs → html-to-markdown-JW4MSQZO-CJGwkgpQ.mjs} +2 -2
- package/dist/{html-to-markdown-JW4MSQZO-DQOxFIvF.mjs.map → html-to-markdown-JW4MSQZO-CJGwkgpQ.mjs.map} +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{join-TBRGI3LQ-B8I9tkJ5.mjs → join-TBRGI3LQ-BAeS4llp.mjs} +2 -2
- package/dist/{join-TBRGI3LQ-B8I9tkJ5.mjs.map → join-TBRGI3LQ-BAeS4llp.mjs.map} +1 -1
- package/dist/{jq-4XLYLOS5-wFZYfsfJ.mjs → jq-4XLYLOS5-BqwoG7Hj.mjs} +7 -7
- package/dist/{jq-4XLYLOS5-wFZYfsfJ.mjs.map → jq-4XLYLOS5-BqwoG7Hj.mjs.map} +1 -1
- package/dist/{js-exec-N5KEZBH7-CoRL1IOd.mjs → js-exec-N5KEZBH7-DbXmMwbQ.mjs} +13 -13
- package/dist/{js-exec-N5KEZBH7-CoRL1IOd.mjs.map → js-exec-N5KEZBH7-DbXmMwbQ.mjs.map} +1 -1
- package/dist/{ln-4LGSXXGD-Dg0R9i5G.mjs → ln-4LGSXXGD-CpN9ORGB.mjs} +2 -2
- package/dist/{ln-4LGSXXGD-Dg0R9i5G.mjs.map → ln-4LGSXXGD-CpN9ORGB.mjs.map} +1 -1
- package/dist/{ls-ZJGQER7M-DLDSfI4x.mjs → ls-ZJGQER7M-B0J6G8Ao.mjs} +3 -3
- package/dist/{ls-ZJGQER7M-DLDSfI4x.mjs.map → ls-ZJGQER7M-B0J6G8Ao.mjs.map} +1 -1
- package/dist/{maybe-auto-update-CKoJBwJ_.mjs → maybe-auto-update-dzy8lzxn.mjs} +13 -8
- package/dist/maybe-auto-update-dzy8lzxn.mjs.map +1 -0
- package/dist/{md5sum-SPU24VSG-DQc8sqXO.mjs → md5sum-SPU24VSG-CETB591F.mjs} +3 -3
- package/dist/{md5sum-SPU24VSG-DQc8sqXO.mjs.map → md5sum-SPU24VSG-CETB591F.mjs.map} +1 -1
- package/dist/{mkdir-MEPGZOB6-BjUKzhdL.mjs → mkdir-MEPGZOB6-B5bpLWTB.mjs} +6 -6
- package/dist/{mkdir-MEPGZOB6-BjUKzhdL.mjs.map → mkdir-MEPGZOB6-B5bpLWTB.mjs.map} +1 -1
- package/dist/{mv-W5BIQ646-CdSIyY-U.mjs → mv-W5BIQ646-7tYLVIVw.mjs} +3 -3
- package/dist/{mv-W5BIQ646-CdSIyY-U.mjs.map → mv-W5BIQ646-7tYLVIVw.mjs.map} +1 -1
- package/dist/{nl-WSDW7I4O-DmtCnyKU.mjs → nl-WSDW7I4O-CHnycLPl.mjs} +2 -2
- package/dist/{nl-WSDW7I4O-DmtCnyKU.mjs.map → nl-WSDW7I4O-CHnycLPl.mjs.map} +1 -1
- package/dist/{paste-7JC6S4DX-CtmM5Qy8.mjs → paste-7JC6S4DX-CKUaf7iE.mjs} +2 -2
- package/dist/{paste-7JC6S4DX-CtmM5Qy8.mjs.map → paste-7JC6S4DX-CKUaf7iE.mjs.map} +1 -1
- package/dist/{printf-TWGXF445-B7cTysaa.mjs → printf-TWGXF445-Byg8yI9x.mjs} +3 -3
- package/dist/{printf-TWGXF445-B7cTysaa.mjs.map → printf-TWGXF445-Byg8yI9x.mjs.map} +1 -1
- package/dist/{program-OcNo9lRF.mjs → program-CyirDIA2.mjs} +4538 -1013
- package/dist/program-CyirDIA2.mjs.map +1 -0
- package/dist/{python3-POMOR4OA-CKy80mpF.mjs → python3-POMOR4OA-D-6P4EKs.mjs} +17 -17
- package/dist/python3-POMOR4OA-D-6P4EKs.mjs.map +1 -0
- package/dist/{readlink-OPJF4DL5-Rc1Mz_Xx.mjs → readlink-OPJF4DL5-CGS-PxkH.mjs} +2 -2
- package/dist/{readlink-OPJF4DL5-Rc1Mz_Xx.mjs.map → readlink-OPJF4DL5-CGS-PxkH.mjs.map} +1 -1
- package/dist/{rev-5EHFX4EJ-3dd9vwHW.mjs → rev-5EHFX4EJ-BLJdSt1D.mjs} +2 -2
- package/dist/{rev-5EHFX4EJ-3dd9vwHW.mjs.map → rev-5EHFX4EJ-BLJdSt1D.mjs.map} +1 -1
- package/dist/{rg-S4FXYXWB-BbXVo6JX.mjs → rg-S4FXYXWB-Ekm2aMrv.mjs} +14 -14
- package/dist/{rg-S4FXYXWB-BbXVo6JX.mjs.map → rg-S4FXYXWB-Ekm2aMrv.mjs.map} +1 -1
- package/dist/{rm-SSGETQVQ-Ch53Rmrr.mjs → rm-SSGETQVQ-DV-525hw.mjs} +6 -6
- package/dist/{rm-SSGETQVQ-Ch53Rmrr.mjs.map → rm-SSGETQVQ-DV-525hw.mjs.map} +1 -1
- package/dist/{rmdir-OC4ZLPYA-D3QCHlIB.mjs → rmdir-OC4ZLPYA-BGOrZMUa.mjs} +3 -3
- package/dist/{rmdir-OC4ZLPYA-D3QCHlIB.mjs.map → rmdir-OC4ZLPYA-BGOrZMUa.mjs.map} +1 -1
- package/dist/{run-package-manager-update-DgeSZuUc.mjs → run-package-manager-update-C4uA6xWB.mjs} +281 -66
- package/dist/run-package-manager-update-C4uA6xWB.mjs.map +1 -0
- package/dist/{sed-S5UIK574-DE1KeTk3.mjs → sed-S5UIK574-C3nurgzc.mjs} +4 -4
- package/dist/{sed-S5UIK574-DE1KeTk3.mjs.map → sed-S5UIK574-C3nurgzc.mjs.map} +1 -1
- package/dist/{sha1sum-2PTOAFR6-DNjSNcYK.mjs → sha1sum-2PTOAFR6-GDQNigjA.mjs} +3 -3
- package/dist/{sha1sum-2PTOAFR6-DNjSNcYK.mjs.map → sha1sum-2PTOAFR6-GDQNigjA.mjs.map} +1 -1
- package/dist/{sha256sum-NS7D3IXX-BMaCKkT5.mjs → sha256sum-NS7D3IXX-bI78J2Ek.mjs} +3 -3
- package/dist/{sha256sum-NS7D3IXX-BMaCKkT5.mjs.map → sha256sum-NS7D3IXX-bI78J2Ek.mjs.map} +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +9 -9
- package/dist/skills-bundle/_AGENTS.md +88 -47
- package/dist/{sleep-X22JJINO-Do5hEQQW.mjs → sleep-X22JJINO-gsrMSr5k.mjs} +2 -2
- package/dist/{sleep-X22JJINO-Do5hEQQW.mjs.map → sleep-X22JJINO-gsrMSr5k.mjs.map} +1 -1
- package/dist/{sort-SW2YEO5B-B7j1zw8k.mjs → sort-SW2YEO5B-D5UsbJuA.mjs} +3 -3
- package/dist/{sort-SW2YEO5B-B7j1zw8k.mjs.map → sort-SW2YEO5B-D5UsbJuA.mjs.map} +1 -1
- package/dist/{split-4KKZZXXE-h8GD4HP4.mjs → split-4KKZZXXE-D_eM0wGE.mjs} +2 -2
- package/dist/{split-4KKZZXXE-h8GD4HP4.mjs.map → split-4KKZZXXE-D_eM0wGE.mjs.map} +1 -1
- package/dist/{sqlite3-CGOEFJAO-DvzzghDg.mjs → sqlite3-CGOEFJAO-Eu-N4sPa.mjs} +3 -3
- package/dist/{sqlite3-CGOEFJAO-DvzzghDg.mjs.map → sqlite3-CGOEFJAO-Eu-N4sPa.mjs.map} +1 -1
- package/dist/{stat-CD34IZ4P-B5ZOJh4J.mjs → stat-CD34IZ4P-BS1XgX8K.mjs} +2 -2
- package/dist/{stat-CD34IZ4P-B5ZOJh4J.mjs.map → stat-CD34IZ4P-BS1XgX8K.mjs.map} +1 -1
- package/dist/{strings-6WDHLGMX-DdiEdoL-.mjs → strings-6WDHLGMX-BGTuHTcR.mjs} +2 -2
- package/dist/{strings-6WDHLGMX-DdiEdoL-.mjs.map → strings-6WDHLGMX-BGTuHTcR.mjs.map} +1 -1
- package/dist/{tail-R4PCA2C4-CUfroNeu.mjs → tail-R4PCA2C4-CfCvDsXY.mjs} +2 -2
- package/dist/{tail-R4PCA2C4-CUfroNeu.mjs.map → tail-R4PCA2C4-CfCvDsXY.mjs.map} +1 -1
- package/dist/{tar-STHHZTZ6-DRf60e-G.mjs → tar-STHHZTZ6-CzlFhy51.mjs} +3 -3
- package/dist/{tar-STHHZTZ6-DRf60e-G.mjs.map → tar-STHHZTZ6-CzlFhy51.mjs.map} +1 -1
- package/dist/{tee-YUZ2FKCJ-po_dfyc_.mjs → tee-YUZ2FKCJ-rZEvi44P.mjs} +2 -2
- package/dist/{tee-YUZ2FKCJ-po_dfyc_.mjs.map → tee-YUZ2FKCJ-rZEvi44P.mjs.map} +1 -1
- package/dist/templates/hello-world/README.md +1 -1
- package/dist/templates/hello-world/package.json +2 -3
- package/dist/{time-D4LNBSWX-DVWhAldK.mjs → time-D4LNBSWX-D_2r6q9s.mjs} +6 -6
- package/dist/{time-D4LNBSWX-DVWhAldK.mjs.map → time-D4LNBSWX-D_2r6q9s.mjs.map} +1 -1
- package/dist/{timeout-YDCRSLPQ-B_yntmXU.mjs → timeout-YDCRSLPQ-BCyope7T.mjs} +7 -7
- package/dist/{timeout-YDCRSLPQ-B_yntmXU.mjs.map → timeout-YDCRSLPQ-BCyope7T.mjs.map} +1 -1
- package/dist/{touch-UA33VN3N-oW1SBT1r.mjs → touch-UA33VN3N-NfG_nyJw.mjs} +2 -2
- package/dist/{touch-UA33VN3N-oW1SBT1r.mjs.map → touch-UA33VN3N-NfG_nyJw.mjs.map} +1 -1
- package/dist/{tr-36LHWFRQ-CTq3z6wq.mjs → tr-36LHWFRQ-BqtCYOhC.mjs} +3 -3
- package/dist/{tr-36LHWFRQ-CTq3z6wq.mjs.map → tr-36LHWFRQ-BqtCYOhC.mjs.map} +1 -1
- package/dist/{tree-YLD52CNT-CIozNsLQ.mjs → tree-YLD52CNT-BjNKvvwq.mjs} +3 -3
- package/dist/{tree-YLD52CNT-CIozNsLQ.mjs.map → tree-YLD52CNT-BjNKvvwq.mjs.map} +1 -1
- package/dist/{unexpand-CADSA4VO-Cq9DTcUg.mjs → unexpand-CADSA4VO-BRBq66Ny.mjs} +2 -2
- package/dist/{unexpand-CADSA4VO-Cq9DTcUg.mjs.map → unexpand-CADSA4VO-BRBq66Ny.mjs.map} +1 -1
- package/dist/{uniq-XSIZR6PB-D5lt-IXF.mjs → uniq-XSIZR6PB-CEAOHvgb.mjs} +3 -3
- package/dist/{uniq-XSIZR6PB-D5lt-IXF.mjs.map → uniq-XSIZR6PB-CEAOHvgb.mjs.map} +1 -1
- package/dist/{wc-LF7NU4LA-BFPabrwD.mjs → wc-LF7NU4LA-DQsmzFSM.mjs} +3 -3
- package/dist/{wc-LF7NU4LA-BFPabrwD.mjs.map → wc-LF7NU4LA-DQsmzFSM.mjs.map} +1 -1
- package/dist/{which-XEM24D5D-2LvlkpUo.mjs → which-XEM24D5D-ClMwNewh.mjs} +2 -2
- package/dist/{which-XEM24D5D-2LvlkpUo.mjs.map → which-XEM24D5D-ClMwNewh.mjs.map} +1 -1
- package/dist/{xan-Y6WF3IRG-DjKO96Pj.mjs → xan-Y6WF3IRG-CvZAKNm2.mjs} +7 -7
- package/dist/{xan-Y6WF3IRG-DjKO96Pj.mjs.map → xan-Y6WF3IRG-CvZAKNm2.mjs.map} +1 -1
- package/dist/{xargs-MGZPH7AX-D2bIgrdg.mjs → xargs-MGZPH7AX-DaERa6_Q.mjs} +6 -6
- package/dist/{xargs-MGZPH7AX-D2bIgrdg.mjs.map → xargs-MGZPH7AX-DaERa6_Q.mjs.map} +1 -1
- package/dist/{yq-4QJW3EQG-XhB3aACo.mjs → yq-4QJW3EQG-DABmi_in.mjs} +88 -88
- package/dist/yq-4QJW3EQG-DABmi_in.mjs.map +1 -0
- package/package.json +3 -6
- package/dist/dist-B72RPrho.mjs.map +0 -1
- package/dist/dist-CBVf3SwI.mjs +0 -11661
- package/dist/dist-CBVf3SwI.mjs.map +0 -1
- package/dist/dist-CyKcvwuI.mjs +0 -816
- package/dist/dist-CyKcvwuI.mjs.map +0 -1
- package/dist/dist-Duu6X1Sh.mjs +0 -4
- package/dist/dist-E6dh6qXe.mjs.map +0 -1
- package/dist/file-IPZJC3FQ-DcZNOWyY.mjs.map +0 -1
- package/dist/maybe-auto-update-CKoJBwJ_.mjs.map +0 -1
- package/dist/program-OcNo9lRF.mjs.map +0 -1
- package/dist/python3-POMOR4OA-CKy80mpF.mjs.map +0 -1
- package/dist/run-package-manager-update-DgeSZuUc.mjs.map +0 -1
- package/dist/watch-app-DTIeKrbl-CSpsNzVG.mjs +0 -100
- package/dist/watch-app-DTIeKrbl-CSpsNzVG.mjs.map +0 -1
- package/dist/yq-4QJW3EQG-XhB3aACo.mjs.map +0 -1
package/dist/dist-CyKcvwuI.mjs
DELETED
|
@@ -1,816 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { H as computeCallSiteIds, J as readKeystrokeIgnoreDirective, Q as packAssetDirs, U as diagnoseWorkflowSource, V as classifyCall, W as locateWorkflow, Y as shouldSkipKeystrokeModuleFile, a as buildStoredRouteManifestForProject, q as entryIdFromFile } from "./dist-B72RPrho.mjs";
|
|
3
|
-
import { isBuiltin } from "node:module";
|
|
4
|
-
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
5
|
-
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
6
|
-
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { createHash } from "node:crypto";
|
|
8
|
-
import { build, mergeConfig } from "tsdown";
|
|
9
|
-
import ts from "typescript";
|
|
10
|
-
//#region ../../packages/build/dist/walk-project-eIHZ7A1f.mjs
|
|
11
|
-
function toPosix$1$1(path) {
|
|
12
|
-
return path.split(sep).join("/");
|
|
13
|
-
}
|
|
14
|
-
function projectRelativePath(root, filePath) {
|
|
15
|
-
return toPosix$1$1(relative(root, normalizeBuildFilePath(filePath)));
|
|
16
|
-
}
|
|
17
|
-
/** Normalize paths so /var and /private/var compare equal on macOS. */
|
|
18
|
-
function normalizeBuildFilePath(filePath) {
|
|
19
|
-
const absolute = resolve(filePath);
|
|
20
|
-
try {
|
|
21
|
-
return realpathSync.native(absolute);
|
|
22
|
-
} catch {
|
|
23
|
-
return absolute;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function normalizeModuleId(id, root) {
|
|
27
|
-
if (id.startsWith("\0")) return null;
|
|
28
|
-
const normalized = normalizeBuildFilePath(id.startsWith("file://") ? fileURLToPath(id) : id);
|
|
29
|
-
if (!normalized.startsWith(normalizeBuildFilePath(root))) return null;
|
|
30
|
-
return normalized;
|
|
31
|
-
}
|
|
32
|
-
function formatImportGuardError(root, ignoredPath, importer) {
|
|
33
|
-
const ignored = projectRelativePath(root, ignoredPath);
|
|
34
|
-
if (importer) return `Cannot import "${ignored}" (@keystroke ignore) from "${projectRelativePath(root, importer)}". Remove the directive or stop importing it from a shipped module.`;
|
|
35
|
-
return `Cannot import "${ignored}" (@keystroke ignore). Remove the directive or stop importing it from a shipped module.`;
|
|
36
|
-
}
|
|
37
|
-
/** Throw when a built module imports a `@keystroke ignore` source file. */
|
|
38
|
-
function keystrokeIgnoreGuardPlugin(options) {
|
|
39
|
-
const root = normalizeBuildFilePath(options.root);
|
|
40
|
-
const ignoredFiles = new Set(options.ignoredFiles.map((filePath) => normalizeBuildFilePath(filePath)));
|
|
41
|
-
function assertNotIgnored(filePath, importer) {
|
|
42
|
-
const normalized = normalizeBuildFilePath(filePath);
|
|
43
|
-
if (!ignoredFiles.has(normalized)) return;
|
|
44
|
-
throw new Error(formatImportGuardError(root, normalized, importer));
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
name: "keystroke-ignore-guard",
|
|
48
|
-
async resolveId(source, importer, resolveOptions) {
|
|
49
|
-
if (resolveOptions?.isEntry || !importer) return null;
|
|
50
|
-
const resolved = await this.resolve(source, importer, {
|
|
51
|
-
...resolveOptions,
|
|
52
|
-
skipSelf: true
|
|
53
|
-
});
|
|
54
|
-
if (!resolved) return null;
|
|
55
|
-
assertNotIgnored(typeof resolved === "string" ? resolved : resolved.id, importer);
|
|
56
|
-
return null;
|
|
57
|
-
},
|
|
58
|
-
load(id) {
|
|
59
|
-
const normalized = normalizeModuleId(id, root);
|
|
60
|
-
if (!normalized) return null;
|
|
61
|
-
assertNotIgnored(normalized);
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const IGNORED_DIRS = new Set([
|
|
67
|
-
"node_modules",
|
|
68
|
-
"dist",
|
|
69
|
-
".git",
|
|
70
|
-
".turbo",
|
|
71
|
-
"build",
|
|
72
|
-
"coverage",
|
|
73
|
-
".keystroke",
|
|
74
|
-
".cache",
|
|
75
|
-
"tmp"
|
|
76
|
-
]);
|
|
77
|
-
const IGNORED_ENV_FILE = /\.env/;
|
|
78
|
-
const IGNORED_LOG_FILE = /\.log$/;
|
|
79
|
-
function isIgnoredFile(name) {
|
|
80
|
-
return IGNORED_ENV_FILE.test(name) || IGNORED_LOG_FILE.test(name);
|
|
81
|
-
}
|
|
82
|
-
function toPosix$3(path) {
|
|
83
|
-
return path.split(sep).join("/");
|
|
84
|
-
}
|
|
85
|
-
function isProbablyBinary(buffer) {
|
|
86
|
-
const sampleLength = Math.min(buffer.length, 8e3);
|
|
87
|
-
for (let index = 0; index < sampleLength; index += 1) if (buffer[index] === 0) return true;
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
function classifyBuildEntry(root, srcRoot, filePath) {
|
|
91
|
-
const relativePath = toPosix$3(relative(root, filePath));
|
|
92
|
-
const agentsPrefix = `${toPosix$3(relative(root, join(srcRoot, "agents")))}/`;
|
|
93
|
-
const workflowsPrefix = `${toPosix$3(relative(root, join(srcRoot, "workflows")))}/`;
|
|
94
|
-
const triggersPrefix = `${toPosix$3(relative(root, join(srcRoot, "triggers")))}/`;
|
|
95
|
-
const actionsPrefix = `${toPosix$3(relative(root, join(srcRoot, "actions")))}/`;
|
|
96
|
-
if (relativePath.startsWith(agentsPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
|
|
97
|
-
const id = entryIdFromFile(join(srcRoot, "agents"), filePath, { nestedEntry: "agent" });
|
|
98
|
-
return id ? {
|
|
99
|
-
entryKey: `agents/${id}`,
|
|
100
|
-
entryPath: filePath
|
|
101
|
-
} : null;
|
|
102
|
-
}
|
|
103
|
-
if (relativePath.startsWith(actionsPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
|
|
104
|
-
const id = entryIdFromFile(join(srcRoot, "actions"), filePath, { nestedEntry: "action" });
|
|
105
|
-
return id ? {
|
|
106
|
-
entryKey: `actions/${id}`,
|
|
107
|
-
entryPath: filePath
|
|
108
|
-
} : null;
|
|
109
|
-
}
|
|
110
|
-
if (relativePath.startsWith(workflowsPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
|
|
111
|
-
const id = entryIdFromFile(join(srcRoot, "workflows"), filePath, { nestedEntry: "workflow" });
|
|
112
|
-
return id ? {
|
|
113
|
-
entryKey: `workflows/${id}`,
|
|
114
|
-
entryPath: filePath
|
|
115
|
-
} : null;
|
|
116
|
-
}
|
|
117
|
-
if (relativePath.startsWith(triggersPrefix) && /\.(ts|mts)$/.test(relativePath) && !/\.(int\.)?test\.(ts|mts)$/.test(relativePath)) {
|
|
118
|
-
const id = entryIdFromFile(join(srcRoot, "triggers"), filePath, { nestedEntry: "trigger" });
|
|
119
|
-
return id ? {
|
|
120
|
-
entryKey: `triggers/${id}`,
|
|
121
|
-
entryPath: filePath
|
|
122
|
-
} : null;
|
|
123
|
-
}
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
function shouldSkipIgnoredModule(filePath, phase) {
|
|
127
|
-
return shouldSkipKeystrokeModuleFile(readKeystrokeIgnoreDirective(filePath), phase);
|
|
128
|
-
}
|
|
129
|
-
function isSrcTypeScriptFile(srcRoot, filePath) {
|
|
130
|
-
const relativePath = toPosix$3(relative(srcRoot, filePath));
|
|
131
|
-
if (relativePath.startsWith("..")) return false;
|
|
132
|
-
return /\.(ts|mts)$/.test(relativePath);
|
|
133
|
-
}
|
|
134
|
-
function walkTree(root, dir, srcRoot, phase, collectSources, sourceFiles, buildEntries, ignoredFiles, totals) {
|
|
135
|
-
for (const name of readdirSync(dir).sort()) {
|
|
136
|
-
if (collectSources && (sourceFiles.length >= 2e3 || totals.bytes >= 8388608)) return;
|
|
137
|
-
const absolute = join(dir, name);
|
|
138
|
-
const stats = statSync(absolute);
|
|
139
|
-
if (stats.isDirectory()) {
|
|
140
|
-
if (IGNORED_DIRS.has(name)) continue;
|
|
141
|
-
walkTree(root, absolute, srcRoot, phase, collectSources, sourceFiles, buildEntries, ignoredFiles, totals);
|
|
142
|
-
continue;
|
|
143
|
-
}
|
|
144
|
-
if (!stats.isFile()) continue;
|
|
145
|
-
const isUnderSrc = isSrcTypeScriptFile(srcRoot, absolute);
|
|
146
|
-
const skipIgnored = isUnderSrc ? shouldSkipIgnoredModule(absolute, phase) : false;
|
|
147
|
-
if (isUnderSrc && skipIgnored) ignoredFiles.push(normalizeBuildFilePath(absolute));
|
|
148
|
-
const buildEntry = classifyBuildEntry(root, srcRoot, absolute);
|
|
149
|
-
if (buildEntry && !skipIgnored) buildEntries[buildEntry.entryKey] = buildEntry.entryPath;
|
|
150
|
-
if (!collectSources) continue;
|
|
151
|
-
if (stats.size > 262144 || isIgnoredFile(name)) continue;
|
|
152
|
-
const buffer = readFileSync(absolute);
|
|
153
|
-
if (isProbablyBinary(buffer)) continue;
|
|
154
|
-
totals.bytes += buffer.byteLength;
|
|
155
|
-
sourceFiles.push({
|
|
156
|
-
path: toPosix$3(relative(root, absolute)),
|
|
157
|
-
contents: buffer.toString("utf8"),
|
|
158
|
-
hash: createHash("sha256").update(buffer).digest("hex")
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* One full-tree walk of the project: classifies tsdown entries and optionally
|
|
164
|
-
* collects deploy source files (path + contents + hash) under snapshot limits.
|
|
165
|
-
*/
|
|
166
|
-
function walkProject(root, srcDirOrOptions = "src", maybeOptions) {
|
|
167
|
-
const srcDir = typeof srcDirOrOptions === "string" ? srcDirOrOptions : srcDirOrOptions.srcDir ?? "src";
|
|
168
|
-
const options = typeof srcDirOrOptions === "string" ? maybeOptions ?? {} : srcDirOrOptions;
|
|
169
|
-
const collectSources = options.collectSources ?? false;
|
|
170
|
-
const phase = options.phase ?? "build";
|
|
171
|
-
const sourceFiles = [];
|
|
172
|
-
const buildEntries = {};
|
|
173
|
-
const ignoredFiles = [];
|
|
174
|
-
walkTree(root, root, join(root, srcDir), phase, collectSources, sourceFiles, buildEntries, ignoredFiles, { bytes: 0 });
|
|
175
|
-
return {
|
|
176
|
-
sourceFiles,
|
|
177
|
-
buildEntries,
|
|
178
|
-
ignoredFiles
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
//#endregion
|
|
182
|
-
//#region ../../packages/tsdown-config/deps.js
|
|
183
|
-
/** Native addons kept external — resolved from the CLI runtime at app start. */
|
|
184
|
-
const NATIVE_RUNTIME_DEPS = [
|
|
185
|
-
"pg",
|
|
186
|
-
"better-sqlite3",
|
|
187
|
-
"@parcel/watcher"
|
|
188
|
-
];
|
|
189
|
-
/**
|
|
190
|
-
* Framework/runtime `@keystrokehq/*` shipped in the project-server image, so user-app builds
|
|
191
|
-
* keep them external and resolve them from the runtime at boot. Everything else under the scope
|
|
192
|
-
* (Composio catalog integrations like `@keystrokehq/posthog`, …) is bundled into the artifact.
|
|
193
|
-
*
|
|
194
|
-
* This set MUST equal the `@keystrokehq/*` dependency closure of `@keystrokehq/project-runtime`
|
|
195
|
-
* (the deploy image) — `deps.test.ts` enforces it. To change what stays external, change what the
|
|
196
|
-
* runtime image depends on; do not edit this list by hand. `exa` is the only integration
|
|
197
|
-
* package the framework imports directly (web search); `gateway` ships Slack and other channel
|
|
198
|
-
* adapters in the runtime image.
|
|
199
|
-
*/
|
|
200
|
-
const RUNTIME_KEYSTROKE_PACKAGES = new Set([
|
|
201
|
-
"access-control",
|
|
202
|
-
"action",
|
|
203
|
-
"agent",
|
|
204
|
-
"app",
|
|
205
|
-
"auth",
|
|
206
|
-
"build",
|
|
207
|
-
"config",
|
|
208
|
-
"credentials",
|
|
209
|
-
"database",
|
|
210
|
-
"exa",
|
|
211
|
-
"gateway",
|
|
212
|
-
"hosting",
|
|
213
|
-
"http",
|
|
214
|
-
"keystroke",
|
|
215
|
-
"manifest",
|
|
216
|
-
"mcp",
|
|
217
|
-
"memory",
|
|
218
|
-
"oauth",
|
|
219
|
-
"platform-database",
|
|
220
|
-
"project-runtime",
|
|
221
|
-
"projects",
|
|
222
|
-
"runtime",
|
|
223
|
-
"sandbox",
|
|
224
|
-
"scheduler",
|
|
225
|
-
"sdk",
|
|
226
|
-
"secrets",
|
|
227
|
-
"shared",
|
|
228
|
-
"storage",
|
|
229
|
-
"telemetry",
|
|
230
|
-
"tracing",
|
|
231
|
-
"trigger",
|
|
232
|
-
"tsdown-config",
|
|
233
|
-
"web-search",
|
|
234
|
-
"worker",
|
|
235
|
-
"workflow",
|
|
236
|
-
"workflow-canvas"
|
|
237
|
-
]);
|
|
238
|
-
/** Matches framework/runtime `@keystrokehq/*` kept external during user-app builds. */
|
|
239
|
-
const FRAMEWORK_KEYSTROKE_EXTERNAL = new RegExp(`^@keystrokehq\\/(?:${[...RUNTIME_KEYSTROKE_PACKAGES].sort().join("|")})(?:\\/|$)`);
|
|
240
|
-
function keystrokePackageName(name) {
|
|
241
|
-
if (!name.startsWith("@keystrokehq/")) return null;
|
|
242
|
-
return name.slice(13).split("/")[0] ?? null;
|
|
243
|
-
}
|
|
244
|
-
function isRuntimeKeystrokePackage(name) {
|
|
245
|
-
const pkg = keystrokePackageName(name);
|
|
246
|
-
return pkg !== null && RUNTIME_KEYSTROKE_PACKAGES.has(pkg);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Kept external so .d.ts emission does not inline internal/inferred types.
|
|
250
|
-
*
|
|
251
|
-
* `typescript` is external because the TS compiler cannot be cleanly bundled into
|
|
252
|
-
* ESM — it mixes `require()`/`__filename` with top-level await, which Node rejects
|
|
253
|
-
* with `ERR_AMBIGUOUS_MODULE_SYNTAX` on load. Packages that use the compiler
|
|
254
|
-
* (`workflow-canvas`, `manifest`, `build`) declare it as a dependency, so it
|
|
255
|
-
* resolves from `node_modules` at runtime instead of being inlined.
|
|
256
|
-
*/
|
|
257
|
-
const LIBRARY_EXTERNAL_DEPS = [
|
|
258
|
-
"better-auth",
|
|
259
|
-
/^@better-auth\//,
|
|
260
|
-
/^better-auth\//,
|
|
261
|
-
"typescript"
|
|
262
|
-
];
|
|
263
|
-
/** Kept external when bundling published entry points (cli, keystroke, platform). */
|
|
264
|
-
const BUNDLED_ENTRY_EXTERNAL_DEPS = [...[
|
|
265
|
-
...NATIVE_RUNTIME_DEPS,
|
|
266
|
-
"dockerode",
|
|
267
|
-
"ssh2",
|
|
268
|
-
"cpu-features",
|
|
269
|
-
"microsandbox",
|
|
270
|
-
/^@aws-sdk\//,
|
|
271
|
-
/^@napi-rs\//,
|
|
272
|
-
"hono",
|
|
273
|
-
/^@hono\//,
|
|
274
|
-
"undici"
|
|
275
|
-
], ...LIBRARY_EXTERNAL_DEPS];
|
|
276
|
-
/** Bundle into CLI — device login uses Better Auth client only. */
|
|
277
|
-
const BETTER_AUTH_CLIENT_BUNDLE_PATTERNS = [/^better-auth\/client$/, /^better-auth\/client\//];
|
|
278
|
-
function isNativeRuntimeDep(id) {
|
|
279
|
-
return NATIVE_RUNTIME_DEPS.some((dep) => id === dep || id.startsWith(`${dep}/`));
|
|
280
|
-
}
|
|
281
|
-
function packageName(id) {
|
|
282
|
-
if (id.startsWith("@")) {
|
|
283
|
-
const [scope, name] = id.split("/");
|
|
284
|
-
return name ? `${scope}/${name}` : id;
|
|
285
|
-
}
|
|
286
|
-
return id.split("/")[0] ?? id;
|
|
287
|
-
}
|
|
288
|
-
/** Zod ships in the project-runtime image; keep one copy out of user-app artifacts. */
|
|
289
|
-
function isRuntimeSharedNpmDep(id) {
|
|
290
|
-
return packageName(id) === "zod";
|
|
291
|
-
}
|
|
292
|
-
function isRuntimeExternal(id) {
|
|
293
|
-
const name = packageName(id);
|
|
294
|
-
if (isNativeRuntimeDep(name)) return true;
|
|
295
|
-
if (isRuntimeSharedNpmDep(name)) return true;
|
|
296
|
-
if (name.startsWith("@keystrokehq/")) return isRuntimeKeystrokePackage(name);
|
|
297
|
-
if (name === "better-auth" || name.startsWith("@better-auth/")) return true;
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
300
|
-
/** Library packages resolve npm deps from node_modules at runtime. */
|
|
301
|
-
function libraryBuildDepsConfig() {
|
|
302
|
-
return {
|
|
303
|
-
alwaysBundle: (_id) => null,
|
|
304
|
-
neverBundle: [
|
|
305
|
-
...NATIVE_RUNTIME_DEPS,
|
|
306
|
-
/^@keystrokehq\//,
|
|
307
|
-
...LIBRARY_EXTERNAL_DEPS
|
|
308
|
-
],
|
|
309
|
-
onlyBundle: false
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
/** Bundle npm deps into dist; resolve @keystrokehq/*, zod, and natives from the runtime. */
|
|
313
|
-
function userAppBuildDepsConfig() {
|
|
314
|
-
return {
|
|
315
|
-
alwaysBundle: (id, _importer) => {
|
|
316
|
-
if (id.startsWith(".") || id.startsWith("/") || isBuiltin(id)) return null;
|
|
317
|
-
return isRuntimeExternal(id) ? null : true;
|
|
318
|
-
},
|
|
319
|
-
neverBundle: [
|
|
320
|
-
...NATIVE_RUNTIME_DEPS,
|
|
321
|
-
FRAMEWORK_KEYSTROKE_EXTERNAL,
|
|
322
|
-
/^zod(?:\/|$)/,
|
|
323
|
-
...LIBRARY_EXTERNAL_DEPS
|
|
324
|
-
],
|
|
325
|
-
onlyBundle: false
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Published entry packages (cli, keystroke, platform): declare bundled @keystrokehq/*
|
|
330
|
-
* in dependencies (changesets release graph ignores devDependencies). Inlining is
|
|
331
|
-
* driven by alwaysBundle below, not by dep kind. Runtime npm deps stay external.
|
|
332
|
-
*/
|
|
333
|
-
function bundledEntryDepsConfig() {
|
|
334
|
-
return {
|
|
335
|
-
alwaysBundle: [/^@keystrokehq\//],
|
|
336
|
-
neverBundle: [...BUNDLED_ENTRY_EXTERNAL_DEPS],
|
|
337
|
-
onlyBundle: false
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
[...BETTER_AUTH_CLIENT_BUNDLE_PATTERNS];
|
|
341
|
-
//#endregion
|
|
342
|
-
//#region ../../packages/tsdown-config/index.js
|
|
343
|
-
const baseTsdownConfig = {
|
|
344
|
-
format: ["esm", "cjs"],
|
|
345
|
-
dts: true,
|
|
346
|
-
clean: true,
|
|
347
|
-
sourcemap: true,
|
|
348
|
-
target: "node20",
|
|
349
|
-
deps: libraryBuildDepsConfig()
|
|
350
|
-
};
|
|
351
|
-
bundledEntryDepsConfig();
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region ../../packages/build/dist/index.mjs
|
|
354
|
-
/**
|
|
355
|
-
* Build-time injection of the deterministic structural `callSiteId` into every
|
|
356
|
-
* durable step call in a workflow source file, so the runtime emits
|
|
357
|
-
* `step:<callSiteId>#<occurrence>` correlation ids (and `step:<callSiteId>`
|
|
358
|
-
* credential consumer ids) that line up 1:1 with the canvas graph nodes the
|
|
359
|
-
* deploy-time producer mints from the same source. There is no user-authored
|
|
360
|
-
* step id — identity is entirely internal and injected here.
|
|
361
|
-
*
|
|
362
|
-
* Injection shape by kind (the `callSiteId` is the same id `computeCallSiteIds`
|
|
363
|
-
* returns, which equals the producer's step-node id):
|
|
364
|
-
* - action/sub-workflow `x.run(i)` → `x.run(i).__site("<id>")` (builder method)
|
|
365
|
-
* - agent `a.prompt(i, opts?)` → `__site` merged into the prompt options
|
|
366
|
-
* - llm `promptLlm(i, opts?)` → `__site` merged into the options
|
|
367
|
-
* - hook `ctx.hook(opts?)` → `__site` merged into the options
|
|
368
|
-
* - sleep `ctx.sleep(d, opts?)` → `__site` merged into a second options arg
|
|
369
|
-
*/
|
|
370
|
-
function injectCallSiteIds(code, fileName) {
|
|
371
|
-
const sourceFile = ts.createSourceFile(fileName, code, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
|
|
372
|
-
const located = locateWorkflow(sourceFile);
|
|
373
|
-
if (!located) return code;
|
|
374
|
-
const ids = computeCallSiteIds(sourceFile);
|
|
375
|
-
if (ids.size === 0) return code;
|
|
376
|
-
const edits = [];
|
|
377
|
-
for (const [node, id] of ids) {
|
|
378
|
-
const info = classifyCall(node, located.ctxParamName);
|
|
379
|
-
if (!info) continue;
|
|
380
|
-
if (info.callKind === "workflow-step") {
|
|
381
|
-
edits.push({
|
|
382
|
-
pos: node.getEnd(),
|
|
383
|
-
text: `.__site(${JSON.stringify(id)})`
|
|
384
|
-
});
|
|
385
|
-
continue;
|
|
386
|
-
}
|
|
387
|
-
if (info.callKind === "agent" || info.callKind === "llm") {
|
|
388
|
-
pushOptionsEdit(edits, node, id);
|
|
389
|
-
continue;
|
|
390
|
-
}
|
|
391
|
-
if (info.callKind === "hook") {
|
|
392
|
-
pushHookOptionsEdit(edits, node, id);
|
|
393
|
-
continue;
|
|
394
|
-
}
|
|
395
|
-
if (info.callKind === "wait") pushSleepOptionsEdit(edits, node, id);
|
|
396
|
-
}
|
|
397
|
-
if (edits.length === 0) return code;
|
|
398
|
-
edits.sort((a, b) => b.pos - a.pos);
|
|
399
|
-
let out = code;
|
|
400
|
-
for (const edit of edits) out = out.slice(0, edit.pos) + edit.text + out.slice(edit.pos);
|
|
401
|
-
return out;
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* Merge `__site: "<id>"` into a call's options argument (agents / promptLlm).
|
|
405
|
-
* - no 2nd arg → append `, { __site: "id" }`
|
|
406
|
-
* - 2nd arg object literal → insert `__site: "id", ` after its `{`
|
|
407
|
-
* - 2nd arg anything else → wrap as `{ ...orig, __site: "id" }`
|
|
408
|
-
*/
|
|
409
|
-
function pushOptionsEdit(edits, call, id) {
|
|
410
|
-
const literal = JSON.stringify(id);
|
|
411
|
-
const optionsArg = call.arguments[1];
|
|
412
|
-
if (!optionsArg) {
|
|
413
|
-
const firstArg = call.arguments[0];
|
|
414
|
-
const insertAt = firstArg ? firstArg.getEnd() : call.getEnd() - 1;
|
|
415
|
-
edits.push({
|
|
416
|
-
pos: insertAt,
|
|
417
|
-
text: `, { __site: ${literal} }`
|
|
418
|
-
});
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
if (ts.isObjectLiteralExpression(optionsArg)) {
|
|
422
|
-
edits.push({
|
|
423
|
-
pos: optionsArg.getStart() + 1,
|
|
424
|
-
text: ` __site: ${literal},`
|
|
425
|
-
});
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
edits.push({
|
|
429
|
-
pos: optionsArg.getStart(),
|
|
430
|
-
text: "{ ..."
|
|
431
|
-
});
|
|
432
|
-
edits.push({
|
|
433
|
-
pos: optionsArg.getEnd(),
|
|
434
|
-
text: `, __site: ${literal} }`
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
/** Merge `__site` into `ctx.hook(opts?)` — options are the first (only) argument. */
|
|
438
|
-
function pushHookOptionsEdit(edits, call, id) {
|
|
439
|
-
const literal = JSON.stringify(id);
|
|
440
|
-
const optionsArg = call.arguments[0];
|
|
441
|
-
if (!optionsArg) {
|
|
442
|
-
edits.push({
|
|
443
|
-
pos: call.getEnd() - 1,
|
|
444
|
-
text: `{ __site: ${literal} }`
|
|
445
|
-
});
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
if (ts.isObjectLiteralExpression(optionsArg)) {
|
|
449
|
-
edits.push({
|
|
450
|
-
pos: optionsArg.getStart() + 1,
|
|
451
|
-
text: ` __site: ${literal},`
|
|
452
|
-
});
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
edits.push({
|
|
456
|
-
pos: optionsArg.getStart(),
|
|
457
|
-
text: "{ ..."
|
|
458
|
-
});
|
|
459
|
-
edits.push({
|
|
460
|
-
pos: optionsArg.getEnd(),
|
|
461
|
-
text: `, __site: ${literal} }`
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
/** Append `{ __site }` as the second arg to `ctx.sleep(duration)`. */
|
|
465
|
-
function pushSleepOptionsEdit(edits, call, id) {
|
|
466
|
-
const literal = JSON.stringify(id);
|
|
467
|
-
const durationArg = call.arguments[0];
|
|
468
|
-
const insertAt = durationArg ? durationArg.getEnd() : call.getEnd() - 1;
|
|
469
|
-
edits.push({
|
|
470
|
-
pos: insertAt,
|
|
471
|
-
text: `, { __site: ${literal} }`
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
function toPosix$2(path) {
|
|
475
|
-
return path.split(sep).join("/");
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Rolldown plugin that runs {@link injectCallSiteIds} over workflow source files
|
|
479
|
-
* (and their same-file helpers) before transpile. Scoped to `src/workflows/` so
|
|
480
|
-
* non-workflow modules are untouched; cross-file helpers stay unkeyed by design.
|
|
481
|
-
*/
|
|
482
|
-
function callSiteIdInjectionPlugin(options) {
|
|
483
|
-
const srcDir = options.srcDir ?? "src";
|
|
484
|
-
const workflowsPrefix = toPosix$2(`${options.root}/${srcDir}/workflows/`);
|
|
485
|
-
return {
|
|
486
|
-
name: "keystroke-call-site-ids",
|
|
487
|
-
transform(code, id) {
|
|
488
|
-
const normalized = toPosix$2(id);
|
|
489
|
-
if (!normalized.startsWith(workflowsPrefix) || !normalized.endsWith(".ts")) return null;
|
|
490
|
-
const transformed = injectCallSiteIds(code, normalized);
|
|
491
|
-
return transformed === code ? null : {
|
|
492
|
-
code: transformed,
|
|
493
|
-
map: null
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
const TEST_FILE = /\.(test|int\.test|spec)\.ts$/;
|
|
499
|
-
function toPosix$1(path) {
|
|
500
|
-
return path.split(sep).join("/");
|
|
501
|
-
}
|
|
502
|
-
function collectTsFiles(dir, out) {
|
|
503
|
-
let entries;
|
|
504
|
-
try {
|
|
505
|
-
entries = readdirSync(dir);
|
|
506
|
-
} catch {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
for (const entry of entries) {
|
|
510
|
-
if (entry === "node_modules" || entry.startsWith(".")) continue;
|
|
511
|
-
const full = join(dir, entry);
|
|
512
|
-
if (statSync(full).isDirectory()) {
|
|
513
|
-
collectTsFiles(full, out);
|
|
514
|
-
continue;
|
|
515
|
-
}
|
|
516
|
-
if (entry.endsWith(".ts") && !TEST_FILE.test(entry)) out.push(full);
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* Run the workflow-canvas reliability checks over every `src/**` module. Errors
|
|
521
|
-
* (steps outside a workflow, steps nested as call arguments) block the build;
|
|
522
|
-
* warnings (opaque code-blocks, dropped spread inputs) explain each degraded
|
|
523
|
-
* construct. Best-effort per-file: an unparseable file is skipped, never fatal.
|
|
524
|
-
*/
|
|
525
|
-
function collectWorkflowDiagnostics(root, srcDir = "src") {
|
|
526
|
-
const srcRoot = join(root, srcDir);
|
|
527
|
-
if (!existsSync(srcRoot)) return [];
|
|
528
|
-
const files = [];
|
|
529
|
-
collectTsFiles(srcRoot, files);
|
|
530
|
-
const diagnostics = [];
|
|
531
|
-
for (const file of files) {
|
|
532
|
-
const rel = toPosix$1(relative(root, file));
|
|
533
|
-
try {
|
|
534
|
-
const source = readFileSync(file, "utf8");
|
|
535
|
-
diagnostics.push(...diagnoseWorkflowSource(source, rel));
|
|
536
|
-
} catch {}
|
|
537
|
-
}
|
|
538
|
-
return diagnostics;
|
|
539
|
-
}
|
|
540
|
-
function formatDiagnostic(diagnostic) {
|
|
541
|
-
return ` ${diagnostic.line !== void 0 ? `${diagnostic.fileName}:${diagnostic.line}:${diagnostic.column ?? 1}` : diagnostic.fileName}\n ${diagnostic.message}`;
|
|
542
|
-
}
|
|
543
|
-
/** Throw when any blocking (error-severity) diagnostic is found. */
|
|
544
|
-
function assertWorkflowDiagnosticErrorsFrom(diagnostics) {
|
|
545
|
-
const errors = diagnostics.filter((d) => d.severity === "error");
|
|
546
|
-
if (errors.length > 0) throw new Error(`Workflow canvas: ${errors.length} unsupported construct(s) must be fixed before deploy:\n${errors.map(formatDiagnostic).join("\n")}\n`);
|
|
547
|
-
}
|
|
548
|
-
/** Print soft (warning-severity) diagnostics after a successful build. */
|
|
549
|
-
function warnWorkflowDiagnosticsFrom(diagnostics) {
|
|
550
|
-
const warnings = diagnostics.filter((d) => d.severity === "warning");
|
|
551
|
-
if (warnings.length > 0) console.warn(`\n⚠ Workflow canvas: ${warnings.length} construct(s) will render as a degraded (opaque) canvas:\n${warnings.map(formatDiagnostic).join("\n")}\n`);
|
|
552
|
-
}
|
|
553
|
-
function packageRoot(nodeModules, scope, name) {
|
|
554
|
-
const direct = scope ? join(nodeModules, scope, name) : join(nodeModules, name);
|
|
555
|
-
if (existsSync(join(direct, "package.json"))) return direct;
|
|
556
|
-
const pnpmDir = join(nodeModules, ".pnpm");
|
|
557
|
-
if (!existsSync(pnpmDir)) return null;
|
|
558
|
-
for (const entry of readdirSync(pnpmDir)) {
|
|
559
|
-
const candidate = scope ? join(pnpmDir, entry, "node_modules", scope, name) : join(pnpmDir, entry, "node_modules", name);
|
|
560
|
-
if (existsSync(join(candidate, "package.json"))) return candidate;
|
|
561
|
-
}
|
|
562
|
-
return null;
|
|
563
|
-
}
|
|
564
|
-
/** Resolve a file shipped with `@keystrokehq/build` inside the CLI runtime. */
|
|
565
|
-
function resolveRuntimeBuildArtifact(runtimeNodeModules, relativePath) {
|
|
566
|
-
const pkgRoot = packageRoot(runtimeNodeModules, "@keystrokehq", "build");
|
|
567
|
-
if (!pkgRoot) throw new Error("Keystroke runtime is missing @keystrokehq/build");
|
|
568
|
-
const artifact = join(pkgRoot, relativePath);
|
|
569
|
-
if (!existsSync(artifact)) throw new Error(`Keystroke runtime artifact not found: ${relativePath}`);
|
|
570
|
-
return artifact;
|
|
571
|
-
}
|
|
572
|
-
/** Resolve exact build-entry keys for a filtered deploy build. */
|
|
573
|
-
function resolveBuildFilter(filter, buildEntries) {
|
|
574
|
-
if (filter.length === 0) throw new Error("At least one --filter entry is required");
|
|
575
|
-
const matched = {};
|
|
576
|
-
for (const key of [...new Set(filter)]) {
|
|
577
|
-
const entryPath = buildEntries[key];
|
|
578
|
-
if (!entryPath) throw new Error(`Unknown build entry "${key}". Use keys like agents/foo or workflows/bar from walkProject.`);
|
|
579
|
-
matched[key] = entryPath;
|
|
580
|
-
}
|
|
581
|
-
return matched;
|
|
582
|
-
}
|
|
583
|
-
function toPosix(path) {
|
|
584
|
-
return path.replace(/\\/g, "/");
|
|
585
|
-
}
|
|
586
|
-
function distRelativePath(entryKey) {
|
|
587
|
-
return `${entryKey}.mjs`;
|
|
588
|
-
}
|
|
589
|
-
function renderAssetModule$1(manifest) {
|
|
590
|
-
return `export default ${JSON.stringify(manifest)};\n`;
|
|
591
|
-
}
|
|
592
|
-
async function buildSingleEntry(root, entryKey, entryPath, ignoredFiles) {
|
|
593
|
-
mkdirSync(join(root, ".keystroke"), { recursive: true });
|
|
594
|
-
const scratchRoot = mkdtempSync(join(root, ".keystroke", "filter-build-"));
|
|
595
|
-
const outDir = join(scratchRoot, "dist");
|
|
596
|
-
const relativePath = distRelativePath(entryKey);
|
|
597
|
-
await build(mergeConfig(baseTsdownConfig, {
|
|
598
|
-
entry: { [entryKey]: entryPath },
|
|
599
|
-
format: ["esm"],
|
|
600
|
-
outDir,
|
|
601
|
-
clean: true,
|
|
602
|
-
dts: false,
|
|
603
|
-
loader: { ".md": "text" },
|
|
604
|
-
deps: userAppBuildDepsConfig(),
|
|
605
|
-
plugins: [keystrokeIgnoreGuardPlugin({
|
|
606
|
-
root,
|
|
607
|
-
ignoredFiles
|
|
608
|
-
})]
|
|
609
|
-
}));
|
|
610
|
-
return {
|
|
611
|
-
scratchRoot,
|
|
612
|
-
relativePath
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
|
-
async function manifestEntriesForBuiltModule(root, entryPath, relativePath, contents, sourceMap) {
|
|
616
|
-
const moduleFile = toPosix(relative(root, entryPath));
|
|
617
|
-
const distPath = join(root, "dist", relativePath);
|
|
618
|
-
const distMapPath = `${distPath}.map`;
|
|
619
|
-
const previousDist = existsSync(distPath) ? readFileSync(distPath) : void 0;
|
|
620
|
-
const hadMap = existsSync(distMapPath);
|
|
621
|
-
const previousMap = hadMap ? readFileSync(distMapPath) : void 0;
|
|
622
|
-
mkdirSync(dirname(distPath), { recursive: true });
|
|
623
|
-
writeFileSync(distPath, contents);
|
|
624
|
-
if (sourceMap) writeFileSync(distMapPath, sourceMap);
|
|
625
|
-
try {
|
|
626
|
-
return (await buildStoredRouteManifestForProject(root, { reloadModules: true })).entries.filter((entry) => "moduleFile" in entry && entry.moduleFile === moduleFile);
|
|
627
|
-
} finally {
|
|
628
|
-
if (previousDist) writeFileSync(distPath, previousDist);
|
|
629
|
-
else rmSync(distPath, { force: true });
|
|
630
|
-
if (previousMap) writeFileSync(distMapPath, previousMap);
|
|
631
|
-
else if (sourceMap || hadMap) rmSync(distMapPath, { force: true });
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
/** Build selected modules in isolation for a filtered deploy merge. */
|
|
635
|
-
async function buildFilteredApp(options) {
|
|
636
|
-
const root = options.root ?? process.cwd();
|
|
637
|
-
const srcDir = options.srcDir ?? "src";
|
|
638
|
-
const phase = options.phase ?? "deploy";
|
|
639
|
-
const collectSources = options.collectSources ?? false;
|
|
640
|
-
const previous = process.cwd();
|
|
641
|
-
const workflowDiagnostics = collectWorkflowDiagnostics(root, srcDir);
|
|
642
|
-
assertWorkflowDiagnosticErrorsFrom(workflowDiagnostics);
|
|
643
|
-
const walked = walkProject(root, {
|
|
644
|
-
srcDir,
|
|
645
|
-
collectSources,
|
|
646
|
-
phase
|
|
647
|
-
});
|
|
648
|
-
const matched = resolveBuildFilter(options.filter, walked.buildEntries);
|
|
649
|
-
const files = [];
|
|
650
|
-
const manifestEntries = [];
|
|
651
|
-
try {
|
|
652
|
-
process.chdir(root);
|
|
653
|
-
for (const [entryKey, entryPath] of Object.entries(matched)) {
|
|
654
|
-
const { scratchRoot, relativePath } = await buildSingleEntry(root, entryKey, entryPath, walked.ignoredFiles);
|
|
655
|
-
try {
|
|
656
|
-
const builtPath = join(scratchRoot, "dist", relativePath);
|
|
657
|
-
const mapPath = `${builtPath}.map`;
|
|
658
|
-
const contents = readFileSync(builtPath);
|
|
659
|
-
const sourceMap = existsSync(mapPath) ? readFileSync(mapPath) : void 0;
|
|
660
|
-
files.push({
|
|
661
|
-
entryKey,
|
|
662
|
-
relativePath,
|
|
663
|
-
contents,
|
|
664
|
-
sourceMap
|
|
665
|
-
});
|
|
666
|
-
manifestEntries.push(...await manifestEntriesForBuiltModule(root, entryPath, relativePath, contents, sourceMap));
|
|
667
|
-
} finally {
|
|
668
|
-
rmSync(scratchRoot, {
|
|
669
|
-
recursive: true,
|
|
670
|
-
force: true
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
const assetsManifest = packAssetDirs(root, srcDir);
|
|
675
|
-
files.push({
|
|
676
|
-
entryKey: ".keystroke/assets",
|
|
677
|
-
relativePath: ".keystroke/assets.mjs",
|
|
678
|
-
contents: Buffer.from(renderAssetModule$1(assetsManifest), "utf8")
|
|
679
|
-
});
|
|
680
|
-
} finally {
|
|
681
|
-
warnWorkflowDiagnosticsFrom(workflowDiagnostics);
|
|
682
|
-
process.chdir(previous);
|
|
683
|
-
}
|
|
684
|
-
return {
|
|
685
|
-
files,
|
|
686
|
-
manifestEntries,
|
|
687
|
-
sourceFiles: walked.sourceFiles
|
|
688
|
-
};
|
|
689
|
-
}
|
|
690
|
-
const ASSETS_MODULE = "@keystrokehq/assets";
|
|
691
|
-
const VIRTUAL_PREFIX = `\0${ASSETS_MODULE}:`;
|
|
692
|
-
function renderAssetModule(manifest) {
|
|
693
|
-
return `export default ${JSON.stringify(manifest)};\n`;
|
|
694
|
-
}
|
|
695
|
-
/** Rolldown plugin: pack src/skills + src/files and expose `@keystrokehq/assets`. */
|
|
696
|
-
function agentAssetsPlugin(options) {
|
|
697
|
-
const srcDir = options.srcDir ?? "src";
|
|
698
|
-
let manifest = null;
|
|
699
|
-
return {
|
|
700
|
-
name: "keystroke-assets",
|
|
701
|
-
buildStart() {
|
|
702
|
-
manifest = packAssetDirs(options.root, srcDir);
|
|
703
|
-
},
|
|
704
|
-
resolveId(source) {
|
|
705
|
-
if (source !== ASSETS_MODULE) return null;
|
|
706
|
-
return `${VIRTUAL_PREFIX}manifest`;
|
|
707
|
-
},
|
|
708
|
-
load(id) {
|
|
709
|
-
if (id !== `${VIRTUAL_PREFIX}manifest` || !manifest) return null;
|
|
710
|
-
return renderAssetModule(manifest);
|
|
711
|
-
},
|
|
712
|
-
buildEnd() {
|
|
713
|
-
if (!manifest) return;
|
|
714
|
-
const outDir = join(options.root, options.outDir ?? "dist", ".keystroke");
|
|
715
|
-
mkdirSync(outDir, { recursive: true });
|
|
716
|
-
writeFileSync(join(outDir, "assets.mjs"), renderAssetModule(manifest));
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
/** Full tsdown config for user keystroke apps (config + discovered modules only). */
|
|
721
|
-
function createAppBuildConfig(options = {}, walked) {
|
|
722
|
-
const root = options.root ?? process.cwd();
|
|
723
|
-
const srcDir = options.srcDir ?? "src";
|
|
724
|
-
const outDir = options.outDir ?? "dist";
|
|
725
|
-
const configEntry = existsSync(join(root, "keystroke.config.ts")) ? join(root, "keystroke.config.ts") : void 0;
|
|
726
|
-
const walkedResult = walked ?? walkProject(root, {
|
|
727
|
-
srcDir,
|
|
728
|
-
phase: options.phase
|
|
729
|
-
});
|
|
730
|
-
const discovered = walkedResult.buildEntries;
|
|
731
|
-
const ignoredFiles = walkedResult.ignoredFiles;
|
|
732
|
-
const entries = {
|
|
733
|
-
...configEntry ? { config: configEntry } : {},
|
|
734
|
-
...discovered
|
|
735
|
-
};
|
|
736
|
-
if (Object.keys(entries).length === 0) throw new Error("Nothing to build — add keystroke.config.ts or modules under src/");
|
|
737
|
-
return mergeConfig(baseTsdownConfig, {
|
|
738
|
-
entry: entries,
|
|
739
|
-
format: ["esm"],
|
|
740
|
-
outDir: join(root, outDir),
|
|
741
|
-
clean: options.clean ?? true,
|
|
742
|
-
dts: false,
|
|
743
|
-
loader: { ".md": "text" },
|
|
744
|
-
deps: userAppBuildDepsConfig(),
|
|
745
|
-
plugins: [
|
|
746
|
-
keystrokeIgnoreGuardPlugin({
|
|
747
|
-
root,
|
|
748
|
-
ignoredFiles
|
|
749
|
-
}),
|
|
750
|
-
callSiteIdInjectionPlugin({
|
|
751
|
-
root,
|
|
752
|
-
srcDir
|
|
753
|
-
}),
|
|
754
|
-
agentAssetsPlugin({
|
|
755
|
-
root,
|
|
756
|
-
srcDir,
|
|
757
|
-
outDir
|
|
758
|
-
})
|
|
759
|
-
]
|
|
760
|
-
});
|
|
761
|
-
}
|
|
762
|
-
/** Build user agents, workflows, triggers, and config to `dist/`. */
|
|
763
|
-
async function buildApp(options = {}) {
|
|
764
|
-
const root = options.root ?? process.cwd();
|
|
765
|
-
const srcDir = options.srcDir ?? "src";
|
|
766
|
-
const emitManifest = options.emitManifest ?? true;
|
|
767
|
-
const collectSources = options.collectSources ?? false;
|
|
768
|
-
const phase = options.phase ?? "build";
|
|
769
|
-
const previous = process.cwd();
|
|
770
|
-
const walked = walkProject(root, {
|
|
771
|
-
srcDir,
|
|
772
|
-
collectSources,
|
|
773
|
-
phase
|
|
774
|
-
});
|
|
775
|
-
try {
|
|
776
|
-
process.chdir(root);
|
|
777
|
-
const workflowDiagnostics = collectWorkflowDiagnostics(root, srcDir);
|
|
778
|
-
assertWorkflowDiagnosticErrorsFrom(workflowDiagnostics);
|
|
779
|
-
try {
|
|
780
|
-
await build(createAppBuildConfig({
|
|
781
|
-
...options,
|
|
782
|
-
root
|
|
783
|
-
}, {
|
|
784
|
-
buildEntries: walked.buildEntries,
|
|
785
|
-
ignoredFiles: walked.ignoredFiles
|
|
786
|
-
}));
|
|
787
|
-
} finally {
|
|
788
|
-
warnWorkflowDiagnosticsFrom(workflowDiagnostics);
|
|
789
|
-
}
|
|
790
|
-
if (emitManifest) {
|
|
791
|
-
const { emitStoredRouteManifestForProject } = await import("./dist-Duu6X1Sh.mjs");
|
|
792
|
-
await emitStoredRouteManifestForProject(root);
|
|
793
|
-
}
|
|
794
|
-
} finally {
|
|
795
|
-
process.chdir(previous);
|
|
796
|
-
}
|
|
797
|
-
return { sourceFiles: walked.sourceFiles };
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Watch `src/` and rebuild `dist/` on change.
|
|
801
|
-
*
|
|
802
|
-
* NOT true hot reload — each change runs a full tsdown rebuild. Callers should
|
|
803
|
-
* restart the API server in `onRebuild` so discovery picks up new/changed modules.
|
|
804
|
-
*/
|
|
805
|
-
async function watchApp(options = {}) {
|
|
806
|
-
const { runWatchApp } = await import("./watch-app-DTIeKrbl-CSpsNzVG.mjs");
|
|
807
|
-
await runWatchApp((watchOptions) => buildApp({
|
|
808
|
-
...watchOptions,
|
|
809
|
-
emitManifest: false,
|
|
810
|
-
collectSources: false
|
|
811
|
-
}), options);
|
|
812
|
-
}
|
|
813
|
-
//#endregion
|
|
814
|
-
export { buildApp, buildFilteredApp, resolveRuntimeBuildArtifact, watchApp };
|
|
815
|
-
|
|
816
|
-
//# sourceMappingURL=dist-CyKcvwuI.mjs.map
|