reeval 0.24.0 → 0.26.0
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 +64 -0
- package/README.md +16 -16
- package/THIRD_PARTY_NOTICES.md +0 -2068
- package/assets/package.json +1 -1
- package/assets/pnpm-lock.yaml +65 -50
- package/dist/{adapter-dHdepWKb.js → adapter-BHMbIeH9.js} +7 -7
- package/dist/{adapter-dHdepWKb.js.map → adapter-BHMbIeH9.js.map} +1 -1
- package/dist/{agent-CZpiwA_r.js → agent-D67VCd6Q.js} +8 -8
- package/dist/{agent-CZpiwA_r.js.map → agent-D67VCd6Q.js.map} +1 -1
- package/dist/{agents-CEapsHV-.js → agents-Dnv1MmgY.js} +40 -59
- package/dist/agents-Dnv1MmgY.js.map +1 -0
- package/dist/{analysis-BnG_1x_O.js → analysis-8vvMnUJB.js} +4 -5
- package/dist/analysis-8vvMnUJB.js.map +1 -0
- package/dist/api-ZeGnedB3.js +141 -0
- package/dist/api-ZeGnedB3.js.map +1 -0
- package/dist/assemble-BlA7FWRn.js +1 -0
- package/dist/{assemble-Dw1bF13I.js → assemble-CuvlsOaE.js} +117 -66
- package/dist/assemble-CuvlsOaE.js.map +1 -0
- package/dist/{attach-DvYiMu6w.js → attach-6av4DmO3.js} +24 -6
- package/dist/attach-6av4DmO3.js.map +1 -0
- package/dist/{attempt-DxR1agFo.js → attempt-D5WH0yFa.js} +3 -3
- package/dist/{attempt-DxR1agFo.js.map → attempt-D5WH0yFa.js.map} +1 -1
- package/dist/{attempt-host-DgeJFSZw.js → attempt-host-Be_-uDKJ.js} +37 -14
- package/dist/attempt-host-Be_-uDKJ.js.map +1 -0
- package/dist/boat-BCNNEJni.js +298 -0
- package/dist/boat-BCNNEJni.js.map +1 -0
- package/dist/boat-CwBW2sbp.js +1 -0
- package/dist/{boat-CUNgSc75.js → boat-CygRcaM0.js} +115 -196
- package/dist/boat-CygRcaM0.js.map +1 -0
- package/dist/{boat-images-BuFigiEb.js → boat-images-asGLQXD5.js} +19 -23
- package/dist/boat-images-asGLQXD5.js.map +1 -0
- package/dist/{bundle-yEgI3RsI.js → bundle-B7P-Awnm.js} +105 -17
- package/dist/bundle-B7P-Awnm.js.map +1 -0
- package/dist/{capture-DdEKVrwk.js → capture-BwLa-4s-.js} +20 -19
- package/dist/{capture-DdEKVrwk.js.map → capture-BwLa-4s-.js.map} +1 -1
- package/dist/capture-CG-J-1-j.js +1 -0
- package/dist/cases-Bsp-G-ZL.js +1 -0
- package/dist/{cases-B7QkvMGE.js → cases-C6vnV-gn.js} +60 -42
- package/dist/cases-C6vnV-gn.js.map +1 -0
- package/dist/classify-BIJQ2Xqo.js +163 -0
- package/dist/classify-BIJQ2Xqo.js.map +1 -0
- package/dist/{cli-Z7aw8k25.js → cli-BoCPYLUQ.js} +305 -124
- package/dist/cli-BoCPYLUQ.js.map +1 -0
- package/dist/{cli-spec-3zvLC9YW.js → cli-spec-DgEWHOt3.js} +164 -50
- package/dist/cli-spec-DgEWHOt3.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/client-Dj65gXG3.js +105 -0
- package/dist/client-Dj65gXG3.js.map +1 -0
- package/dist/{cloud-owVBaSRt.js → cloud-TuNUlZ0L.js} +3 -3
- package/dist/{cloud-owVBaSRt.js.map → cloud-TuNUlZ0L.js.map} +1 -1
- package/dist/{cloud-files-BjinrTTe.js → cloud-files-CBovrfZA.js} +8 -8
- package/dist/{cloud-files-BjinrTTe.js.map → cloud-files-CBovrfZA.js.map} +1 -1
- package/dist/{cloud-DuHcNQVV.js → cloud-igGIS4Bm.js} +43 -20
- package/dist/cloud-igGIS4Bm.js.map +1 -0
- package/dist/cloud-project-Ch7jjlwh.js +110 -0
- package/dist/cloud-project-Ch7jjlwh.js.map +1 -0
- package/dist/cloud-project-DdUVB4EE.js +1 -0
- package/dist/cloud-push-DvnqOgRd.js +817 -0
- package/dist/cloud-push-DvnqOgRd.js.map +1 -0
- package/dist/cloud-push-MXKreNyq.js +1 -0
- package/dist/{cloud-run-DqMkSGYB.js → cloud-run-CbGF8Lwt.js} +285 -48
- package/dist/cloud-run-CbGF8Lwt.js.map +1 -0
- package/dist/cloud-run-CghE2dG6.js +1 -0
- package/dist/{cloud-secrets-Bak83tik.js → cloud-secrets-BWoV4ddM.js} +43 -35
- package/dist/cloud-secrets-BWoV4ddM.js.map +1 -0
- package/dist/cloud-secrets-DlPRfS2l.js +1 -0
- package/dist/command-Bps8kBML.js +141 -0
- package/dist/command-Bps8kBML.js.map +1 -0
- package/dist/{command-CtmSJzPC.js → command-ByUmSm2D.js} +29 -23
- package/dist/command-ByUmSm2D.js.map +1 -0
- package/dist/{command-CeygdoVe.js → command-CQk7FCI1.js} +92 -26
- package/dist/command-CQk7FCI1.js.map +1 -0
- package/dist/{command-CoHN1ibe.js → command-CxuGky7A.js} +44 -20
- package/dist/command-CxuGky7A.js.map +1 -0
- package/dist/{command-efTGfUYb.js → command-pxfK2bkV.js} +26 -16
- package/dist/command-pxfK2bkV.js.map +1 -0
- package/dist/commands-Cl3Y_UXg.js +1 -0
- package/dist/{commands-DR-NolV2.js → commands-DGWNNyRD.js} +54 -38
- package/dist/commands-DGWNNyRD.js.map +1 -0
- package/dist/{config-Bn2OhCN_.js → config-mU7wFvQq.js} +46 -32
- package/dist/config-mU7wFvQq.js.map +1 -0
- package/dist/core-BXYzOEyQ.js +2058 -0
- package/dist/core-BXYzOEyQ.js.map +1 -0
- package/dist/{slug-IHh3f770.js → cost-DQ0ayy6h.js} +37 -2
- package/dist/cost-DQ0ayy6h.js.map +1 -0
- package/dist/{cursor-catalog-BYIDSsLn.js → cursor-catalog-EOFft6LJ.js} +4 -4
- package/dist/{cursor-catalog-BYIDSsLn.js.map → cursor-catalog-EOFft6LJ.js.map} +1 -1
- package/dist/{daytona-CWs9j9mt.js → daytona-DtCjv8rH.js} +22 -17
- package/dist/daytona-DtCjv8rH.js.map +1 -0
- package/dist/daytona-image-Xy5o53Ji.js +1 -0
- package/dist/{daytona-image-DmGlFAyq.js → daytona-image-w4uTRZ0z.js} +6 -6
- package/dist/{daytona-image-DmGlFAyq.js.map → daytona-image-w4uTRZ0z.js.map} +1 -1
- package/dist/db-BcplCdzu.js +1 -0
- package/dist/{db-D6yQib7M.js → db-yigMuHM2.js} +31 -119
- package/dist/db-yigMuHM2.js.map +1 -0
- package/dist/debug-CGg7KHKq.js +1 -0
- package/dist/{debug-CIXzB4wK.js → debug-T29p6HOX.js} +2 -10
- package/dist/debug-T29p6HOX.js.map +1 -0
- package/dist/{default-effort-Ck6ViSaI.js → default-effort-B1b8t81b.js} +1 -1
- package/dist/{default-effort-Bpz5ULfC.js → default-effort-BDYXBzu5.js} +3 -3
- package/dist/{default-effort-Bpz5ULfC.js.map → default-effort-BDYXBzu5.js.map} +1 -1
- package/dist/{dist-CZtW7eI5.js → dist-DCG7vZGQ.js} +3 -3
- package/dist/{dist-CZtW7eI5.js.map → dist-DCG7vZGQ.js.map} +1 -1
- package/dist/{docker-Dgw4aaRk.js → docker-DcnX2WpM.js} +4 -4
- package/dist/{docker-Dgw4aaRk.js.map → docker-DcnX2WpM.js.map} +1 -1
- package/dist/{docker-Bbi4kmFj.js → docker-XCyDUd7_.js} +1 -1
- package/dist/{doctor-BfS6jswW.js → doctor-DTKa8rrq.js} +27 -27
- package/dist/{doctor-BfS6jswW.js.map → doctor-DTKa8rrq.js.map} +1 -1
- package/dist/duration-Bz2H7pXb.js +34 -0
- package/dist/duration-Bz2H7pXb.js.map +1 -0
- package/dist/{environment-BY8lVFFK.js → environment-BCBg6c0p.js} +38 -12
- package/dist/environment-BCBg6c0p.js.map +1 -0
- package/dist/errors-BjzEWESY.js +93 -0
- package/dist/errors-BjzEWESY.js.map +1 -0
- package/dist/{errors-P8oHhNzy.js → errors-Cda7UzRA.js} +2 -2
- package/dist/{errors-P8oHhNzy.js.map → errors-Cda7UzRA.js.map} +1 -1
- package/dist/{eval-source-BB8In3xo.js → eval-source-CSPyKuV6.js} +6 -6
- package/dist/{eval-source-BB8In3xo.js.map → eval-source-CSPyKuV6.js.map} +1 -1
- package/dist/{evaluate-B9_nukrc.d.ts → evaluate-Nnh0iPuo.d.ts} +1 -1
- package/dist/{evaluate-B8I9AKgw.js → evaluate-wgW1lGQj.js} +280 -60
- package/dist/evaluate-wgW1lGQj.js.map +1 -0
- package/dist/{events-D97ZzAeq.js → events-DG_Cq5Pn.js} +154 -33
- package/dist/events-DG_Cq5Pn.js.map +1 -0
- package/dist/events-RaK1pDmT.js +1 -0
- package/dist/{fake-bootstrap-4DFtzib0.js → fake-bootstrap-uCyHhnMO.js} +2 -2
- package/dist/{fake-bootstrap-4DFtzib0.js.map → fake-bootstrap-uCyHhnMO.js.map} +1 -1
- package/dist/files-BnsRehge.js +1 -0
- package/dist/{files-B0DbptiO.js → files-Bv6ipFjc.js} +4 -4
- package/dist/{files-B0DbptiO.js.map → files-Bv6ipFjc.js.map} +1 -1
- package/dist/{files-GBTUBAek.js → files-CcnSILye.js} +3 -3
- package/dist/{files-GBTUBAek.js.map → files-CcnSILye.js.map} +1 -1
- package/dist/{files-BesexM88.js → files-CjPm3yyj.js} +173 -41
- package/dist/files-CjPm3yyj.js.map +1 -0
- package/dist/files-CkmCV5rH.js +1 -0
- package/dist/{files-DE13BqBC.js → files-ClUbQPj9.js} +2 -2
- package/dist/{files-DE13BqBC.js.map → files-ClUbQPj9.js.map} +1 -1
- package/dist/{files-B4K1k__s.js → files-CqfVnRXw.js} +5 -5
- package/dist/{files-B4K1k__s.js.map → files-CqfVnRXw.js.map} +1 -1
- package/dist/files-D4Hb9HZS.js +1 -0
- package/dist/files-DCcRkJN4.js +1 -0
- package/dist/{files-TwSVeWwM.js → files-GAocj_Z1.js} +27 -41
- package/dist/files-GAocj_Z1.js.map +1 -0
- package/dist/gateway.d.ts +1 -1
- package/dist/{git-DatgUcnf.js → git-CRPr6I2T.js} +3 -3
- package/dist/{git-DatgUcnf.js.map → git-CRPr6I2T.js.map} +1 -1
- package/dist/{harness-FcTyyPco.js → harness-Dcd3ffkY.js} +3 -2
- package/dist/harness-Dcd3ffkY.js.map +1 -0
- package/dist/{harness-EZNoeUBf.js → harness-DvqNGwl6.js} +2 -2
- package/dist/{harness-EZNoeUBf.js.map → harness-DvqNGwl6.js.map} +1 -1
- package/dist/{harness-install-HgR73tpF.js → harness-install-B0Y2GjnO.js} +4 -4
- package/dist/{harness-install-HgR73tpF.js.map → harness-install-B0Y2GjnO.js.map} +1 -1
- package/dist/harness.d.ts +1 -1
- package/dist/harness.js +1 -1
- package/dist/http-DtlSzw4A.js +96 -0
- package/dist/http-DtlSzw4A.js.map +1 -0
- package/dist/{ids-DqEvrBFZ.js → ids-CtxRn13a.js} +4 -3
- package/dist/ids-CtxRn13a.js.map +1 -0
- package/dist/{images-SRE4f3SM.js → images-JspTw1vt.js} +13 -13
- package/dist/{images-SRE4f3SM.js.map → images-JspTw1vt.js.map} +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -5
- package/dist/init-BHIWfE2L.js +1 -0
- package/dist/{init-D5F9MYPC.js → init-wmMbauok.js} +6 -6
- package/dist/{init-D5F9MYPC.js.map → init-wmMbauok.js.map} +1 -1
- package/dist/{ink-list-CLq6YVB8.js → ink-list-B5Gul5iZ.js} +7 -6
- package/dist/ink-list-B5Gul5iZ.js.map +1 -0
- package/dist/{inputs-B_FsOD2N.js → inputs-BWTtz1-v.js} +6 -6
- package/dist/{inputs-B_FsOD2N.js.map → inputs-BWTtz1-v.js.map} +1 -1
- package/dist/inputs-load-C8HEtAej.js +1 -0
- package/dist/{inputs-load-B4MFkp0Q.js → inputs-load-DQRC3dUA.js} +3 -3
- package/dist/{inputs-load-B4MFkp0Q.js.map → inputs-load-DQRC3dUA.js.map} +1 -1
- package/dist/internal/vm-api/boat.d.ts +46 -0
- package/dist/internal/vm-api/boat.js +1 -0
- package/dist/internal/vm-api/daytona.d.ts +26 -0
- package/dist/internal/vm-api/daytona.js +220 -0
- package/dist/internal/vm-api/daytona.js.map +1 -0
- package/dist/internal/vm-api.d.ts +86 -0
- package/dist/internal/vm-api.js +3 -0
- package/dist/internal/vm.d.ts +1 -1
- package/dist/internal/vm.js +1 -1
- package/dist/{invocations-BxQqe5GU.js → invocations-CSA9OKFn.js} +5 -5
- package/dist/{invocations-BxQqe5GU.js.map → invocations-CSA9OKFn.js.map} +1 -1
- package/dist/issue-ipG9Yy1h.js +1 -0
- package/dist/{issue-iErT9KkK.js → issue-lKqtL3iX.js} +4 -4
- package/dist/{issue-iErT9KkK.js.map → issue-lKqtL3iX.js.map} +1 -1
- package/dist/{jiti-CtahaHaY.js → jiti-aNfS_lSj.js} +2 -2
- package/dist/{jiti-CtahaHaY.js.map → jiti-aNfS_lSj.js.map} +1 -1
- package/dist/{judge-MOKPsr6R.js → judge-etHC4K02.js} +5 -5
- package/dist/{judge-MOKPsr6R.js.map → judge-etHC4K02.js.map} +1 -1
- package/dist/judge.d.ts +1 -1
- package/dist/judge.js +1 -1
- package/dist/{judgments-Dur4D2pj.js → judgments-CVCUWT-g.js} +7 -4
- package/dist/{judgments-Dur4D2pj.js.map → judgments-CVCUWT-g.js.map} +1 -1
- package/dist/{kinds-Dohijzi-.js → kinds-BQX5ZxpK.js} +37 -11
- package/dist/{kinds-Dohijzi-.js.map → kinds-BQX5ZxpK.js.map} +1 -1
- package/dist/labels-Dtyf5-pd.js +251 -0
- package/dist/labels-Dtyf5-pd.js.map +1 -0
- package/dist/{layout-BhhJAEgf.js → layout-Co4tPHWI.js} +3 -3
- package/dist/{layout-BhhJAEgf.js.map → layout-Co4tPHWI.js.map} +1 -1
- package/dist/link-Cqs2DhxR.js +127 -0
- package/dist/link-Cqs2DhxR.js.map +1 -0
- package/dist/{list-ClDb8qiX.js → list-CjcNH-5e.js} +10 -7
- package/dist/list-CjcNH-5e.js.map +1 -0
- package/dist/{live-QFILMmql.js → live-BRF0ogR6.js} +3 -5
- package/dist/live-BRF0ogR6.js.map +1 -0
- package/dist/live-DTpM9b4D.js +56 -0
- package/dist/live-DTpM9b4D.js.map +1 -0
- package/dist/{machine-service-xFhakTs5.js → machine-service-BetvBWHz.js} +146 -13
- package/dist/machine-service-BetvBWHz.js.map +1 -0
- package/dist/{machine-service-DpJScNtA.js → machine-service-XFymGCHj.js} +1 -1
- package/dist/{machines-Cm-rU7jp.js → machines-CkDTbMZ6.js} +25 -25
- package/dist/{machines-Cm-rU7jp.js.map → machines-CkDTbMZ6.js.map} +1 -1
- package/dist/markdown-COts-jxf.js +653 -0
- package/dist/markdown-COts-jxf.js.map +1 -0
- package/dist/{model-Rmv-L9Jb.js → model-BYHXnYLe.js} +1 -1
- package/dist/model-CrsA2Evf.js +1 -0
- package/dist/{model-CcvSrrq9.js → model-DNC53cPL.js} +4 -4
- package/dist/{model-CcvSrrq9.js.map → model-DNC53cPL.js.map} +1 -1
- package/dist/{model-D9WMMEWD.js → model-F4UH_YG6.js} +4 -4
- package/dist/{model-D9WMMEWD.js.map → model-F4UH_YG6.js.map} +1 -1
- package/dist/{model-mTaaEkeQ.js → model-xemZQ7DK.js} +251 -65
- package/dist/model-xemZQ7DK.js.map +1 -0
- package/dist/{node-Bl2CtSjB.js → node-gPT36n_n.js} +19 -8
- package/dist/{node-Bl2CtSjB.js.map → node-gPT36n_n.js.map} +1 -1
- package/dist/options-CAZfxE0h.js +1 -0
- package/dist/otlp-BxPnO99e.js +1 -0
- package/dist/otlp-DbNz-occ.js +25 -0
- package/dist/otlp-DbNz-occ.js.map +1 -0
- package/dist/outcome-1LBk2e3w.js +38 -0
- package/dist/outcome-1LBk2e3w.js.map +1 -0
- package/dist/{patch-DhJDHRFs.js → patch-Dxzv8msl.js} +3 -3
- package/dist/{patch-DhJDHRFs.js.map → patch-Dxzv8msl.js.map} +1 -1
- package/dist/{patch-C7yBztZj.js → patch-uwo6t4Zy.js} +26 -2
- package/dist/patch-uwo6t4Zy.js.map +1 -0
- package/dist/{pi-providers-HygmL1y-.js → pi-providers-BjcQv2A1.js} +23 -9
- package/dist/{pi-providers-HygmL1y-.js.map → pi-providers-BjcQv2A1.js.map} +1 -1
- package/dist/{plain-Ctn8oUdp.js → plain-DXUNwqpO.js} +2 -2
- package/dist/{plain-Ctn8oUdp.js.map → plain-DXUNwqpO.js.map} +1 -1
- package/dist/{plan-CC0bKbm9.js → plan-DSJX7Oyq.js} +9 -9
- package/dist/{plan-CC0bKbm9.js.map → plan-DSJX7Oyq.js.map} +1 -1
- package/dist/{plugins-PwEtW8GH.js → plugins-DVEOMsYw.js} +7 -7
- package/dist/{plugins-PwEtW8GH.js.map → plugins-DVEOMsYw.js.map} +1 -1
- package/dist/{preflight-BHUEfA4m.js → preflight-B3oLZttl.js} +4 -4
- package/dist/{preflight-BHUEfA4m.js.map → preflight-B3oLZttl.js.map} +1 -1
- package/dist/preflight-CLYRuQ3r.js +1 -0
- package/dist/{preflight-DEV_vrdB.js → preflight-DXMD6jou.js} +1 -1
- package/dist/{preflight-BzvLYQ70.js → preflight-dUe0QiPK.js} +9 -9
- package/dist/{preflight-BzvLYQ70.js.map → preflight-dUe0QiPK.js.map} +1 -1
- package/dist/{prepare-D7hPrh7Q.js → prepare-BTaX7vcC.js} +8 -8
- package/dist/{prepare-D7hPrh7Q.js.map → prepare-BTaX7vcC.js.map} +1 -1
- package/dist/{prepare-DS42k409.js → prepare-QdiYPOwR.js} +2 -2
- package/dist/prices-CfnkJOth.js +1 -0
- package/dist/{prices-DXJsP2Ha.js → prices-CoLymMRd.js} +3 -3
- package/dist/{prices-DXJsP2Ha.js.map → prices-CoLymMRd.js.map} +1 -1
- package/dist/{process-RPlEhpHz.js → process-C_nh1H7X.js} +9 -3
- package/dist/process-C_nh1H7X.js.map +1 -0
- package/dist/provenance-Cylt_YxT.d.ts +222 -0
- package/dist/{provenance-DgQJ-dq7.js → provenance-Di42xQIS.js} +5 -5
- package/dist/{provenance-DgQJ-dq7.js.map → provenance-Di42xQIS.js.map} +1 -1
- package/dist/provider-B24hZX95.js +1 -0
- package/dist/{provider-ieWOn4YS.js → provider-Cn7lmECy.js} +2 -2
- package/dist/{provider-ieWOn4YS.js.map → provider-Cn7lmECy.js.map} +1 -1
- package/dist/{provider-stop-CxzWW7Ft.js → provider-stop-DjBMfZW5.js} +2 -2
- package/dist/{provider-stop-CxzWW7Ft.js.map → provider-stop-DjBMfZW5.js.map} +1 -1
- package/dist/{providers-N4HDMeeo.js → providers-Bm5NLaRh.js} +1 -1
- package/dist/{providers-B5Vr0hKH.js → providers-CTTfYbm0.js} +28 -28
- package/dist/{providers-B5Vr0hKH.js.map → providers-CTTfYbm0.js.map} +1 -1
- package/dist/query-CTMdWXbx.js +1 -0
- package/dist/{query-CmTjYbqh.js → query-TzNtTvwf.js} +2 -2
- package/dist/{query-CmTjYbqh.js.map → query-TzNtTvwf.js.map} +1 -1
- package/dist/{questions-DnqkJga0.js → questions-BqisU7A0.js} +19 -13
- package/dist/questions-BqisU7A0.js.map +1 -0
- package/dist/{recipe-B0NeT_Sn.js → recipe-DzjXne35.js} +4 -4
- package/dist/{recipe-B0NeT_Sn.js.map → recipe-DzjXne35.js.map} +1 -1
- package/dist/{record-2liAelrB.js → record-Cj3yWR0E.js} +43 -12
- package/dist/record-Cj3yWR0E.js.map +1 -0
- package/dist/{redact-DMueYS-v.js → redact-CfTHYWLv.js} +30 -1
- package/dist/redact-CfTHYWLv.js.map +1 -0
- package/dist/{remarks-D5qOZzcX.js → remarks-BPKGorBW.js} +4 -2
- package/dist/remarks-BPKGorBW.js.map +1 -0
- package/dist/{remarks-D-9f1y1B.js → remarks-CYXYiB_O.js} +21 -11
- package/dist/{remarks-D-9f1y1B.js.map → remarks-CYXYiB_O.js.map} +1 -1
- package/dist/{remote-B7BIRUTK.js → remote-D4UEa7Rs.js} +10 -8
- package/dist/{remote-B7BIRUTK.js.map → remote-D4UEa7Rs.js.map} +1 -1
- package/dist/renderer/ascii.d.ts +6 -0
- package/dist/renderer/ascii.js +7 -0
- package/dist/renderer/ascii.js.map +1 -0
- package/dist/renderer/markdown.d.ts +31 -0
- package/dist/renderer/markdown.js +1 -0
- package/dist/report-BSi-R8hC.js +941 -0
- package/dist/report-BSi-R8hC.js.map +1 -0
- package/dist/report-inputs-5XwZBIRK.js +113 -0
- package/dist/report-inputs-5XwZBIRK.js.map +1 -0
- package/dist/{resolve-B60w6DcB.js → resolve-BEltmYhD.js} +6 -5
- package/dist/resolve-BEltmYhD.js.map +1 -0
- package/dist/resolve-C7A5Q2Jj.js +1 -0
- package/dist/{resolve-t9sOkGGS.js → resolve-nRzGt4Ff.js} +30 -13
- package/dist/resolve-nRzGt4Ff.js.map +1 -0
- package/dist/{results-Df910ONm.js → results-DXBaxfIM.js} +11 -7
- package/dist/{results-Df910ONm.js.map → results-DXBaxfIM.js.map} +1 -1
- package/dist/{resume-4Q9q8AcE.js → resume-DZPjjToJ.js} +46 -21
- package/dist/resume-DZPjjToJ.js.map +1 -0
- package/dist/{retry-C15f5yyy.js → retry-rLdXCinf.js} +5 -5
- package/dist/{retry-C15f5yyy.js.map → retry-rLdXCinf.js.map} +1 -1
- package/dist/{root-Cm93-6ix.js → root-Co0jhOT5.js} +2 -2
- package/dist/{root-Cm93-6ix.js.map → root-Co0jhOT5.js.map} +1 -1
- package/dist/run-D_o_8Fkv.js +128 -0
- package/dist/run-D_o_8Fkv.js.map +1 -0
- package/dist/{client-kUwtq-vt.js → runtime-DsRjnydE.js} +525 -105
- package/dist/runtime-DsRjnydE.js.map +1 -0
- package/dist/sandbox/boat.d.ts +1 -1
- package/dist/sandbox/boat.js +2 -2
- package/dist/sandbox/daytona.d.ts +1 -1
- package/dist/sandbox/daytona.js +1 -1
- package/dist/{sandbox-BffNervX.js → sandbox-B8gDRs5E.js} +3 -3
- package/dist/{sandbox-BffNervX.js.map → sandbox-B8gDRs5E.js.map} +1 -1
- package/dist/sandbox.d.ts +1 -1
- package/dist/sandbox.js +1 -1
- package/dist/{secrets-file-Dtd3h3kY.js → secrets-file-B8rUJV2L.js} +4 -4
- package/dist/{secrets-file-Dtd3h3kY.js.map → secrets-file-B8rUJV2L.js.map} +1 -1
- package/dist/server-eUWbjZoi.js +1 -0
- package/dist/server-mJzPXBMM.js +204 -0
- package/dist/server-mJzPXBMM.js.map +1 -0
- package/dist/{services-BG8xuU82.js → services-CHh83UDC.js} +4 -2
- package/dist/services-CHh83UDC.js.map +1 -0
- package/dist/{shared-DtZwIAfy.js → shared-bXaqVxk-.js} +5 -34
- package/dist/shared-bXaqVxk-.js.map +1 -0
- package/dist/skill-dirs-B7o83G5I.js +63 -0
- package/dist/skill-dirs-B7o83G5I.js.map +1 -0
- package/dist/source-C6JgdJdJ.js +1 -0
- package/dist/{source-zoRWRMql.js → source-DxgCge_u.js} +33 -18
- package/dist/source-DxgCge_u.js.map +1 -0
- package/dist/spans-B4MwgEyy.js +1 -0
- package/dist/spans-Dq3fo6HM.js +6 -0
- package/dist/spans-Dq3fo6HM.js.map +1 -0
- package/dist/spans-tf3biLpT.js +72 -0
- package/dist/spans-tf3biLpT.js.map +1 -0
- package/dist/src-B2psni1B.js +1 -0
- package/dist/{src-DiS13D_q.js → src-BI35cTig.js} +2 -2
- package/dist/src-BLePHsjw.js +2 -0
- package/dist/{src-Bj3WJs3t.js → src-CftydE9Q.js} +2 -2
- package/dist/{src-CDoAEO4u.js → src-ClMhIgi3.js} +2 -2
- package/dist/{src-CDoAEO4u.js.map → src-ClMhIgi3.js.map} +1 -1
- package/dist/{src-CUrcaZ91.js → src-CnOj4_n4.js} +1 -1
- package/dist/src-Cs3nmbrr.js +2 -0
- package/dist/{src-TMKittwH.js → src-D0GezGkJ.js} +2 -2
- package/dist/{src-OC89dAjO.js → src-D1Q6ElaF.js} +182 -36
- package/dist/src-D1Q6ElaF.js.map +1 -0
- package/dist/{src-CFBg2ecq.js → src-D_9qqp-Y.js} +2 -2
- package/dist/{src-DwcTn4JY.js → src-DhZuOcgq.js} +5 -5
- package/dist/{src-DwcTn4JY.js.map → src-DhZuOcgq.js.map} +1 -1
- package/dist/{src-CGBwMZgM.js → src-Dm2YIeXn.js} +8 -8
- package/dist/{src-CGBwMZgM.js.map → src-Dm2YIeXn.js.map} +1 -1
- package/dist/{src-CcbV6VpV.js → src-Dpzfe-vl.js} +3 -3
- package/dist/{src-c3ZQu7Uu.js → src-NYxoDS3b.js} +5 -5
- package/dist/{src-c3ZQu7Uu.js.map → src-NYxoDS3b.js.map} +1 -1
- package/dist/{src-C3OhA5pw.js → src-Y4AiZxLt.js} +5 -5
- package/dist/{src-C3OhA5pw.js.map → src-Y4AiZxLt.js.map} +1 -1
- package/dist/{src-BQWAxhKD.js → src-YpmRtJmP.js} +3 -3
- package/dist/{src-BQWAxhKD.js.map → src-YpmRtJmP.js.map} +1 -1
- package/dist/{src-Bb3k9Kn_.js → src-nIPDQ297.js} +66 -11
- package/dist/{src-Bb3k9Kn_.js.map → src-nIPDQ297.js.map} +1 -1
- package/dist/ssh-pool-B9bnSQIj.js +1 -0
- package/dist/{ssh-pool-DwboLN9O.js → ssh-pool-Gv8gAsgZ.js} +19 -16
- package/dist/ssh-pool-Gv8gAsgZ.js.map +1 -0
- package/dist/{start-BwMyDneA.js → start-YOYgbaNU.js} +45 -13
- package/dist/start-YOYgbaNU.js.map +1 -0
- package/dist/state-Bvsi2WgZ.js +1 -0
- package/dist/{state-CXTaT0t8.js → state-CJlYQtdl.js} +21 -38
- package/dist/state-CJlYQtdl.js.map +1 -0
- package/dist/store/local.d.ts +1 -1
- package/dist/store/s3.d.ts +1 -1
- package/dist/studio-share-4T6GYO7l.js +209 -0
- package/dist/studio-share-4T6GYO7l.js.map +1 -0
- package/dist/suite-fO-u8jlS.js +2 -0
- package/dist/{suite-C4XSg6Ls.js → suite-oH7uiCRq.js} +107 -106
- package/dist/suite-oH7uiCRq.js.map +1 -0
- package/dist/summary-CTMWfnOF.js +75 -0
- package/dist/summary-CTMWfnOF.js.map +1 -0
- package/dist/{sync-bnI6WWaL.js → sync-BNduS38K.js} +6 -6
- package/dist/{sync-bnI6WWaL.js.map → sync-BNduS38K.js.map} +1 -1
- package/dist/{tart-CSP5Q0qV.js → tart-B6Uz4S3I.js} +43 -13
- package/dist/tart-B6Uz4S3I.js.map +1 -0
- package/dist/{tart-DmVuVsmX.js → tart-DNrumWZu.js} +1 -1
- package/dist/{tart-CzViW3WZ.js → tart-Duqp33Zh.js} +2 -2
- package/dist/{tart-CzViW3WZ.js.map → tart-Duqp33Zh.js.map} +1 -1
- package/dist/{tart-bake-d9UvIfe3.js → tart-bake-B4QyNb7f.js} +1 -1
- package/dist/{tart-bake-BCKRfyKm.js → tart-bake-s99wBzxO.js} +9 -9
- package/dist/{tart-bake-BCKRfyKm.js.map → tart-bake-s99wBzxO.js.map} +1 -1
- package/dist/{tart-cli-CqSpUYGV.js → tart-cli-B0xVYBti.js} +6 -4
- package/dist/tart-cli-B0xVYBti.js.map +1 -0
- package/dist/{tart-cli-C4d5FXG1.js → tart-cli-DfteJCN9.js} +1 -1
- package/dist/{tart-hosts-Du7SZM4w.js → tart-hosts-B3Ze8aMp.js} +1 -1
- package/dist/{tart-hosts-G0EUDt07.js → tart-hosts-DfVUcZqA.js} +6 -6
- package/dist/{tart-hosts-G0EUDt07.js.map → tart-hosts-DfVUcZqA.js.map} +1 -1
- package/dist/{tart-images-De0-ib7R.js → tart-images-yzIyb0bQ.js} +8 -3
- package/dist/tart-images-yzIyb0bQ.js.map +1 -0
- package/dist/telemetry-bBhK3DSs.js +399 -0
- package/dist/telemetry-bBhK3DSs.js.map +1 -0
- package/dist/testing.d.ts +11 -2
- package/dist/testing.js +4 -4
- package/dist/{tool-class-B3ZFTSOw.js → tool-class-CB-m4PiF.js} +2 -2
- package/dist/{tool-class-B3ZFTSOw.js.map → tool-class-CB-m4PiF.js.map} +1 -1
- package/dist/{trace-CfppUzD9.js → trace-CJQLlAbB.js} +2 -2
- package/dist/{trace-CfppUzD9.js.map → trace-CJQLlAbB.js.map} +1 -1
- package/dist/{traits-Bj1PM5F7.js → traits-DPIffsN8.js} +2 -2
- package/dist/{traits-Bj1PM5F7.js.map → traits-DPIffsN8.js.map} +1 -1
- package/dist/{transcript-CW02A4s9.js → transcript-TWiaAuoL.js} +2 -2
- package/dist/{transcript-CW02A4s9.js.map → transcript-TWiaAuoL.js.map} +1 -1
- package/dist/{resources-DqdwihhT.js → turn-error-Dmv_Muj7.js} +15 -2
- package/dist/turn-error-Dmv_Muj7.js.map +1 -0
- package/dist/{types-D4WEnzhY.d.ts → types-BZaItiui.d.ts} +159 -13
- package/dist/types-Buut5yGe.js +29 -0
- package/dist/{types-CbcnJxCy.js.map → types-Buut5yGe.js.map} +1 -1
- package/dist/types-C48zuZbT.d.ts +156 -0
- package/dist/types-CYz4dqAd.d.ts +1366 -0
- package/dist/{ui-DfvPNmPP.js → ui-BIYUGm8D.js} +21 -17
- package/dist/ui-BIYUGm8D.js.map +1 -0
- package/dist/{vertex-BLxYasfw.js → vertex-DQQGhUn7.js} +2 -2
- package/dist/{vertex-BLxYasfw.js.map → vertex-DQQGhUn7.js.map} +1 -1
- package/dist/vertex-DtWe0Xf6.js +1 -0
- package/dist/view/index.d.ts +142 -809
- package/dist/view/index.js +17 -12
- package/dist/view/report/index.d.ts +217 -0
- package/dist/view/report/index.js +4 -0
- package/dist/views-DOYgIWRs.js +2 -0
- package/dist/{views-ChoSQxfF.js → views-DPsEJBBP.js} +6 -6
- package/dist/{views-ChoSQxfF.js.map → views-DPsEJBBP.js.map} +1 -1
- package/dist/{vm-container-DOtIi_rd.js → vm-container-rHUmgBRf.js} +13 -11
- package/dist/vm-container-rHUmgBRf.js.map +1 -0
- package/dist/{vm-images-CHutQVml.js → vm-images-BC2ZjZl5.js} +19 -21
- package/dist/vm-images-BC2ZjZl5.js.map +1 -0
- package/dist/wait-CixM6W0G.js +65 -0
- package/dist/wait-CixM6W0G.js.map +1 -0
- package/dist/{worker-entry-CKBfEt0h.js → worker-entry-CN1eVLzz.js} +7 -7
- package/dist/{worker-entry-CKBfEt0h.js.map → worker-entry-CN1eVLzz.js.map} +1 -1
- package/dist/{workspace-Cip2dVwU.js → workspace-BS-FUp5I.js} +9 -9
- package/dist/{workspace-Cip2dVwU.js.map → workspace-BS-FUp5I.js.map} +1 -1
- package/dist/workspace-D8HqjfsQ.js +1 -0
- package/package.json +38 -1
- package/skills/reeval/references/cli.md +1 -1
- package/skills/reeval/references/config.md +1 -1
- package/skills/reeval/references/environments.md +1 -1
- package/dist/agents-CEapsHV-.js.map +0 -1
- package/dist/analysis-BnG_1x_O.js.map +0 -1
- package/dist/app-files-Dsr3U1Q7.js +0 -10
- package/dist/app-files-Dsr3U1Q7.js.map +0 -1
- package/dist/assemble-DUtbByvj.js +0 -1
- package/dist/assemble-Dw1bF13I.js.map +0 -1
- package/dist/attach-DvYiMu6w.js.map +0 -1
- package/dist/attempt-host-DgeJFSZw.js.map +0 -1
- package/dist/boat-BBPOc_bs.js +0 -1
- package/dist/boat-CUNgSc75.js.map +0 -1
- package/dist/boat-images-BuFigiEb.js.map +0 -1
- package/dist/bundle-yEgI3RsI.js.map +0 -1
- package/dist/capture-DxxB3d7p.js +0 -1
- package/dist/cases-B7QkvMGE.js.map +0 -1
- package/dist/cases-CA7gxxdr.js +0 -1
- package/dist/cli-Z7aw8k25.js.map +0 -1
- package/dist/cli-spec-3zvLC9YW.js.map +0 -1
- package/dist/client-kUwtq-vt.js.map +0 -1
- package/dist/cloud-DuHcNQVV.js.map +0 -1
- package/dist/cloud-run-C08P_Uap.js +0 -1
- package/dist/cloud-run-DqMkSGYB.js.map +0 -1
- package/dist/cloud-secrets-Bak83tik.js.map +0 -1
- package/dist/command-Bs6Knfm4.js +0 -298
- package/dist/command-Bs6Knfm4.js.map +0 -1
- package/dist/command-CeygdoVe.js.map +0 -1
- package/dist/command-CoHN1ibe.js.map +0 -1
- package/dist/command-CtmSJzPC.js.map +0 -1
- package/dist/command-efTGfUYb.js.map +0 -1
- package/dist/commands-B_cAs8nG.js +0 -1
- package/dist/commands-DR-NolV2.js.map +0 -1
- package/dist/config-Bn2OhCN_.js.map +0 -1
- package/dist/context-Ba7PNMMe.js +0 -120
- package/dist/context-Ba7PNMMe.js.map +0 -1
- package/dist/daytona-CWs9j9mt.js.map +0 -1
- package/dist/daytona-image-BjVpi3KS.js +0 -1
- package/dist/db-Bjq6qr6c.js +0 -2
- package/dist/db-D6yQib7M.js.map +0 -1
- package/dist/debug-CF4p4Lp_.js +0 -1
- package/dist/debug-CIXzB4wK.js.map +0 -1
- package/dist/environment-BY8lVFFK.js.map +0 -1
- package/dist/evaluate-B8I9AKgw.js.map +0 -1
- package/dist/events-D97ZzAeq.js.map +0 -1
- package/dist/files-5HsFIpxw.js +0 -1
- package/dist/files-BNg3wgw_.js +0 -1
- package/dist/files-BesexM88.js.map +0 -1
- package/dist/files-DNgQwgA0.js +0 -1
- package/dist/files-DvDUSrWL.js +0 -1
- package/dist/files-TwSVeWwM.js.map +0 -1
- package/dist/gate-CgYdaprG.js +0 -49
- package/dist/gate-CgYdaprG.js.map +0 -1
- package/dist/harness-FcTyyPco.js.map +0 -1
- package/dist/ids-DqEvrBFZ.js.map +0 -1
- package/dist/init-CS5kEaVg.js +0 -1
- package/dist/ink-list-CLq6YVB8.js.map +0 -1
- package/dist/inputs-load-D4IsEjq3.js +0 -1
- package/dist/issue-DmSorsTF.js +0 -1
- package/dist/list-ClDb8qiX.js.map +0 -1
- package/dist/live-C7iGaDCA.js +0 -120
- package/dist/live-C7iGaDCA.js.map +0 -1
- package/dist/live-C7kN5v2P.js +0 -1
- package/dist/live-QFILMmql.js.map +0 -1
- package/dist/machine-service-xFhakTs5.js.map +0 -1
- package/dist/model-Colu5mEp.js +0 -1
- package/dist/model-mTaaEkeQ.js.map +0 -1
- package/dist/options-CmRy82gl.js +0 -1
- package/dist/pairs-BGb134Vu.js +0 -230
- package/dist/pairs-BGb134Vu.js.map +0 -1
- package/dist/patch-C7yBztZj.js.map +0 -1
- package/dist/paths-Dwmi7L4X.js +0 -75
- package/dist/paths-Dwmi7L4X.js.map +0 -1
- package/dist/preflight-xa8_eGOW.js +0 -1
- package/dist/prices-C_mbZa5a.js +0 -1
- package/dist/process-RPlEhpHz.js.map +0 -1
- package/dist/provider-DHT20Gl8.js +0 -1
- package/dist/query-BXV6pRyI.js +0 -1
- package/dist/questions-DnqkJga0.js.map +0 -1
- package/dist/record-2liAelrB.js.map +0 -1
- package/dist/redact-DMueYS-v.js.map +0 -1
- package/dist/remarks-D5qOZzcX.js.map +0 -1
- package/dist/resolve-B60w6DcB.js.map +0 -1
- package/dist/resolve-CCLiJX4i.js +0 -1
- package/dist/resolve-t9sOkGGS.js.map +0 -1
- package/dist/resources-DqdwihhT.js.map +0 -1
- package/dist/resume-4Q9q8AcE.js.map +0 -1
- package/dist/runtime-CIsljVBy.js +0 -457
- package/dist/runtime-CIsljVBy.js.map +0 -1
- package/dist/server-CeYUmuuu.js +0 -1
- package/dist/server-fSNuT3Z4.js +0 -284
- package/dist/server-fSNuT3Z4.js.map +0 -1
- package/dist/services-BG8xuU82.js.map +0 -1
- package/dist/shared-DtZwIAfy.js.map +0 -1
- package/dist/slug-IHh3f770.js.map +0 -1
- package/dist/source-n7nUVm9p.js +0 -1
- package/dist/source-zoRWRMql.js.map +0 -1
- package/dist/src-9V3C6A7C.js +0 -2
- package/dist/src-CB5cZhaN.js +0 -2
- package/dist/src-DB0vml0O.js +0 -1
- package/dist/src-OC89dAjO.js.map +0 -1
- package/dist/ssh-pool-ChpT-fDU.js +0 -1
- package/dist/ssh-pool-DwboLN9O.js.map +0 -1
- package/dist/start-BwMyDneA.js.map +0 -1
- package/dist/state-CXTaT0t8.js.map +0 -1
- package/dist/state-CltRWlCu.js +0 -1
- package/dist/suite-C4XSg6Ls.js.map +0 -1
- package/dist/suite-CIsyPqPA.js +0 -2
- package/dist/summary-DeeQJAR5.js +0 -169
- package/dist/summary-DeeQJAR5.js.map +0 -1
- package/dist/tart-CSP5Q0qV.js.map +0 -1
- package/dist/tart-cli-CqSpUYGV.js.map +0 -1
- package/dist/tart-images-De0-ib7R.js.map +0 -1
- package/dist/types-CbcnJxCy.js +0 -15
- package/dist/ui-DfvPNmPP.js.map +0 -1
- package/dist/vertex-DZDUpp0W.js +0 -1
- package/dist/views-DU0PM0UW.js +0 -2
- package/dist/vm-container-DOtIi_rd.js.map +0 -1
- package/dist/vm-images-CHutQVml.js.map +0 -1
- package/dist/workspace-BKcNJAPb.js +0 -1
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as UsageError } from "./errors-ttMTnIYX.js";
|
|
2
|
+
import { t as closest } from "./shared-bXaqVxk-.js";
|
|
3
|
+
import { r as parseDuration } from "./duration-Bz2H7pXb.js";
|
|
4
|
+
import { a as skillsUsed, c as targetText, l as toolTarget, s as loadedSkill } from "./tool-class-CB-m4PiF.js";
|
|
4
5
|
import { r as isThenable, t as isObjectLike } from "./object-CeQ8dgUC.js";
|
|
5
|
-
import { a as
|
|
6
|
+
import { a as plural, i as formatDuration } from "./text-B8-W3Cvn.js";
|
|
6
7
|
import { o as totalTokens } from "./usage-CwIRPPZ9.js";
|
|
7
|
-
import {
|
|
8
|
+
import { a as fromCwd } from "./ids-CtxRn13a.js";
|
|
9
|
+
import { _ as redactSecrets, y as redactStrings } from "./redact-CfTHYWLv.js";
|
|
10
|
+
import { i as splitPatch } from "./patch-uwo6t4Zy.js";
|
|
11
|
+
import { n as comparable } from "./errors-Cda7UzRA.js";
|
|
12
|
+
import { i as originalStack } from "./adapter-BHMbIeH9.js";
|
|
8
13
|
import picomatch from "picomatch";
|
|
9
14
|
import { parse } from "shell-quote";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
10
16
|
import { isDeepStrictEqual } from "node:util";
|
|
17
|
+
import { inspect as inspect$1 } from "@vitest/utils/display";
|
|
18
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
19
|
+
import { ASYMMETRIC_MATCHERS_OBJECT, GLOBAL_EXPECT, JestAsymmetricMatchers, JestChaiExpect, JestExtend, addCustomEqualityTesters, chai, customMatchers, getState, setState } from "@vitest/expect";
|
|
11
20
|
// src/shell-commands.ts
|
|
12
21
|
const SHELL_TOOLS = /* @__PURE__ */ new Set(["bash", "shell"]);
|
|
13
22
|
const isShellCall = (e) => e.type === "tool" && SHELL_TOOLS.has(e.tool);
|
|
@@ -421,6 +430,11 @@ function ran(actual, command) {
|
|
|
421
430
|
* Not the turn's `diff`, which also has earlier turns' changes and the eval's own writes.
|
|
422
431
|
*/
|
|
423
432
|
const TURN_EDITED = Symbol("reeval.turnEdited");
|
|
433
|
+
/**
|
|
434
|
+
* Raw mid-turn status on a frozen `Turn`, so wire serializers can copy it without going through
|
|
435
|
+
* the `status` getter that marks the body as having inspected the error.
|
|
436
|
+
*/
|
|
437
|
+
const TURN_STATUS = Symbol("reeval.turnStatus");
|
|
424
438
|
const editedIn = (turn) => {
|
|
425
439
|
if (!isObjectLike(turn)) return [];
|
|
426
440
|
const own = turn[TURN_EDITED];
|
|
@@ -556,6 +570,40 @@ function withinLimits(actual, limits, not) {
|
|
|
556
570
|
};
|
|
557
571
|
}
|
|
558
572
|
// src/matchers.ts
|
|
573
|
+
/** Last file-matcher extras for the Chai/vitest path to copy onto the raw assertion. */
|
|
574
|
+
let pendingFileMeta;
|
|
575
|
+
/** Takes and clears extras the last `toHaveFile` put on its `Result`. */
|
|
576
|
+
function takeFileMeta() {
|
|
577
|
+
const meta = pendingFileMeta;
|
|
578
|
+
pendingFileMeta = void 0;
|
|
579
|
+
return meta;
|
|
580
|
+
}
|
|
581
|
+
function fileTarget(path, pattern) {
|
|
582
|
+
if (pattern === void 0) return path;
|
|
583
|
+
return `${path} ${typeof pattern === "string" ? pattern : pattern.source}`;
|
|
584
|
+
}
|
|
585
|
+
function subjectDiff(actual) {
|
|
586
|
+
if (isObjectLike(actual) && isObjectLike(actual.diff) && typeof actual.diff.patch === "string") return actual.diff;
|
|
587
|
+
if (isObjectLike(actual) && Array.isArray(actual.turns) && actual.turns.length) {
|
|
588
|
+
const last = actual.turns[actual.turns.length - 1];
|
|
589
|
+
if (isObjectLike(last) && isObjectLike(last.diff) && typeof last.diff.patch === "string") return last.diff;
|
|
590
|
+
}
|
|
591
|
+
return null;
|
|
592
|
+
}
|
|
593
|
+
function pathInDiff(files, path) {
|
|
594
|
+
return (files ?? []).some((f) => f.path === path);
|
|
595
|
+
}
|
|
596
|
+
function preSatisfiedFile(actual, path, pattern, not) {
|
|
597
|
+
const diff = subjectDiff(actual);
|
|
598
|
+
const inDiff = pathInDiff(diff?.files, path);
|
|
599
|
+
if (not) return inDiff ? void 0 : true;
|
|
600
|
+
if (!inDiff) return true;
|
|
601
|
+
if (pattern === void 0 || !diff?.patch) return void 0;
|
|
602
|
+
const section = splitPatch(diff.patch).find((p) => p.path === path);
|
|
603
|
+
if (!section) return true;
|
|
604
|
+
const added = section.text.split("\n").filter((line) => line.startsWith("+") && !line.startsWith("+++")).map((line) => line.slice(1)).join("\n");
|
|
605
|
+
return (typeof pattern === "string" ? added.includes(pattern) : new RegExp(pattern.source, pattern.flags).test(added)) ? void 0 : true;
|
|
606
|
+
}
|
|
559
607
|
const matcher = (run) => run;
|
|
560
608
|
/**
|
|
561
609
|
* The last `lines` lines, and at most `chars` characters of them: one line can be megabytes.
|
|
@@ -624,22 +672,34 @@ const MATCHERS = {
|
|
|
624
672
|
message: () => pass ? `expected ${show(actual)} not to contain ${show(needle)}` : `expected ${show(actual)} to contain ${show(needle)}`
|
|
625
673
|
};
|
|
626
674
|
}),
|
|
627
|
-
toHaveFile: matcher(async (actual, [path, pattern]) => {
|
|
675
|
+
toHaveFile: matcher(async (actual, [path, pattern], flags) => {
|
|
628
676
|
if (!hasFiles(actual)) throw subjectError("toHaveFile() expects a turn from c.send(), or c");
|
|
677
|
+
const target = fileTarget(path, pattern);
|
|
629
678
|
const content = await actual.readFile(path);
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
679
|
+
let pass;
|
|
680
|
+
let message;
|
|
681
|
+
if (content === null) {
|
|
682
|
+
pass = false;
|
|
683
|
+
message = () => `expected file ${path} to exist`;
|
|
684
|
+
} else if (pattern === void 0) {
|
|
685
|
+
pass = true;
|
|
686
|
+
message = () => `expected no file at ${path}`;
|
|
687
|
+
} else {
|
|
688
|
+
pass = typeof pattern === "string" ? content.includes(pattern) : pattern.test(content);
|
|
689
|
+
message = () => `expected ${path} ${pass ? "not " : ""}to match ${pattern}\n--- ${path} ---\n${tail(content)}`;
|
|
690
|
+
}
|
|
691
|
+
const preSatisfied = (flags.not ? !pass : pass) ? preSatisfiedFile(actual, path, pattern, flags.not) : void 0;
|
|
692
|
+
const result = {
|
|
640
693
|
pass,
|
|
641
|
-
message
|
|
694
|
+
message,
|
|
695
|
+
target,
|
|
696
|
+
...preSatisfied ? { preSatisfied: true } : {}
|
|
642
697
|
};
|
|
698
|
+
pendingFileMeta = {
|
|
699
|
+
target,
|
|
700
|
+
...preSatisfied ? { preSatisfied: true } : {}
|
|
701
|
+
};
|
|
702
|
+
return result;
|
|
643
703
|
}),
|
|
644
704
|
toSucceed: matcher((actual, _) => isThenable(actual) ? Promise.resolve(actual).then(succeeded) : succeeded(actual)),
|
|
645
705
|
toHaveSearched: matcher((actual, [query]) => searched(actual, query)),
|
|
@@ -701,107 +761,467 @@ const matchers = Object.fromEntries(Object.keys(MATCHERS).map((name) => [name, f
|
|
|
701
761
|
}]));
|
|
702
762
|
/** Chai `expect.extend` in eval workers: reeval-specific matchers only (not Jest's toEqual, …). */
|
|
703
763
|
const evalMatchers = Object.fromEntries(Object.keys(matchers).filter((name) => !GENERIC_MATCHERS.has(name)).map((name) => [name, matchers[name]]));
|
|
704
|
-
// src/
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
764
|
+
// src/engine/expect.ts
|
|
765
|
+
chai.use(JestExtend);
|
|
766
|
+
chai.use(JestChaiExpect);
|
|
767
|
+
chai.use(JestAsymmetricMatchers);
|
|
768
|
+
/** How `toHaveProperty` quotes its value in its own message, cut as it cuts it. */
|
|
769
|
+
const quotedValue = (value) => inspect$1(value, { truncate: 40 });
|
|
770
|
+
const chaiAssert = chai.Assertion.prototype.assert;
|
|
771
|
+
/**
|
|
772
|
+
* A failed assertion makes its message, and the values its diff is made from, from the subject
|
|
773
|
+
* and values masked: the message cuts a long value to 40 characters and the diff splits it around
|
|
774
|
+
* what changed, so a secret in either would no longer be one the output's masking recognizes.
|
|
775
|
+
* The check itself has run on the real values.
|
|
776
|
+
*/
|
|
777
|
+
chai.Assertion.prototype.assert = function(...args) {
|
|
778
|
+
if (chai.util.test(this, args)) return;
|
|
779
|
+
const object = chai.util.flag(this, "object");
|
|
780
|
+
const masked = args.map((arg, i) => i === 3 || i === 4 ? redactStrings(arg) : arg);
|
|
781
|
+
if (masked[3] !== args[3]) {
|
|
782
|
+
const [from, to] = [quotedValue(args[3]), quotedValue(masked[3])];
|
|
783
|
+
for (const i of [1, 2]) if (typeof masked[i] === "string") masked[i] = masked[i].replaceAll(from, to);
|
|
719
784
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
785
|
+
chai.util.flag(this, "object", redactStrings(object));
|
|
786
|
+
try {
|
|
787
|
+
Reflect.apply(chaiAssert, this, masked);
|
|
788
|
+
} finally {
|
|
789
|
+
chai.util.flag(this, "object", object);
|
|
723
790
|
}
|
|
724
791
|
};
|
|
725
|
-
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
792
|
+
/**
|
|
793
|
+
* A value that names itself in a default label when its matcher takes no argument: `c.exec`'s
|
|
794
|
+
* promise names its command, a judge verdict its question.
|
|
795
|
+
*/
|
|
796
|
+
const SUBJECT = Symbol.for("reeval.subject");
|
|
797
|
+
/**
|
|
798
|
+
* The matcher calls one try of an `expect.poll` function made: a try the poll retries doesn't
|
|
799
|
+
* count, so they leave the attempt's list, as the poll's own matcher records only its last try.
|
|
800
|
+
*/
|
|
801
|
+
const pollTry = new AsyncLocalStorage();
|
|
802
|
+
const recordings = /* @__PURE__ */ new WeakMap();
|
|
803
|
+
const ownRecordings = /* @__PURE__ */ new WeakMap();
|
|
804
|
+
/** Methods on an assertion that configure it or are Chai's plumbing, not checks. */
|
|
805
|
+
const UNRECORDED = /* @__PURE__ */ new Set([
|
|
806
|
+
"withContext",
|
|
807
|
+
"withTest",
|
|
808
|
+
"assert",
|
|
809
|
+
"toString",
|
|
810
|
+
"toJSON",
|
|
811
|
+
"valueOf",
|
|
812
|
+
"then",
|
|
813
|
+
"catch",
|
|
814
|
+
"finally"
|
|
815
|
+
]);
|
|
816
|
+
const flag = (assertion, name) => chai.util.flag(assertion, name);
|
|
817
|
+
const subjectOf = (value) => (typeof value === "object" || typeof value === "function") && value !== null ? value[SUBJECT] : void 0;
|
|
818
|
+
/** Can't answer either way: the harness doesn't report it, or the subject isn't one it reads. */
|
|
819
|
+
const isUnanswerable = (error) => error instanceof TypeError && Symbol.for("reeval.subjectError") in error || error?.name === "HarnessCapabilityError";
|
|
820
|
+
/** A matcher called wrong (reeval's `misuseError`): no check ran, so none is recorded. */
|
|
821
|
+
const isMisuse = (error) => error instanceof TypeError && Symbol.for("reeval.misuse") in error;
|
|
822
|
+
const unrecord = (list, entry) => {
|
|
823
|
+
for (const calls of [list, pollTry.getStore()]) {
|
|
824
|
+
const at = calls?.indexOf(entry) ?? -1;
|
|
825
|
+
if (at >= 0) calls?.splice(at, 1);
|
|
736
826
|
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
827
|
+
};
|
|
828
|
+
/** `path:line` of the first frame in `stack` that is in `file`, the eval file, when one is. */
|
|
829
|
+
function lineIn(stack, file) {
|
|
830
|
+
const want = comparable(file.startsWith("file:") ? fileURLToPath(file) : file);
|
|
831
|
+
const frames = originalStack(stack ?? "").split("\n").slice(1);
|
|
832
|
+
for (const frame of frames) {
|
|
833
|
+
const at = /\((.+):(\d+):\d+\)$|^at (?:async )?(.+):(\d+):\d+$/.exec(frame.trim());
|
|
834
|
+
if (!at) continue;
|
|
835
|
+
const [, inCall, callLine, bare, bareLine] = at;
|
|
836
|
+
const found = inCall ?? bare;
|
|
837
|
+
const path = found.startsWith("file:") ? fileURLToPath(found) : found;
|
|
838
|
+
if (comparable(path) === want) return `${fromCwd(path)}:${callLine ?? bareLine}`;
|
|
745
839
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
840
|
+
}
|
|
841
|
+
/** Where the eval called the matcher, when it was called from `file`. */
|
|
842
|
+
function siteIn(file) {
|
|
843
|
+
if (!file) return void 0;
|
|
844
|
+
const limit = Error.stackTraceLimit;
|
|
845
|
+
Error.stackTraceLimit = 50;
|
|
846
|
+
const stack = (/* @__PURE__ */ new Error()).stack;
|
|
847
|
+
Error.stackTraceLimit = limit;
|
|
848
|
+
return lineIn(stack, file);
|
|
849
|
+
}
|
|
850
|
+
/** Starts a record of `matcher` called on `assertion`, in call order. */
|
|
851
|
+
function begin(list, assertion, name, args, file) {
|
|
852
|
+
const message = flag(assertion, "message");
|
|
853
|
+
const matcher = [
|
|
854
|
+
flag(assertion, "poll") && "poll",
|
|
855
|
+
flag(assertion, "promise"),
|
|
856
|
+
flag(assertion, "negate") && "not",
|
|
857
|
+
name
|
|
858
|
+
].filter(Boolean).join(".");
|
|
859
|
+
const at = siteIn(file);
|
|
860
|
+
const entry = {
|
|
861
|
+
matcher,
|
|
862
|
+
args,
|
|
863
|
+
subject: subjectOf(flag(assertion, "object")),
|
|
864
|
+
...typeof message === "string" && message ? { label: message } : {},
|
|
865
|
+
soft: !flag(assertion, "require"),
|
|
866
|
+
...at ? { at } : {}
|
|
867
|
+
};
|
|
868
|
+
list.push(entry);
|
|
869
|
+
pollTry.getStore()?.push(entry);
|
|
870
|
+
return entry;
|
|
871
|
+
}
|
|
872
|
+
function settle(entry, error, startedAt) {
|
|
873
|
+
entry.status = error === void 0 ? "pass" : isUnanswerable(error) ? "error" : "fail";
|
|
874
|
+
if (error !== void 0) entry.error = error;
|
|
875
|
+
if (startedAt !== void 0) entry.durationMs = Math.round(performance.now() - startedAt);
|
|
876
|
+
const meta = takeFileMeta();
|
|
877
|
+
if (meta?.target !== void 0) entry.target = meta.target;
|
|
878
|
+
if (meta?.preSatisfied) entry.preSatisfied = true;
|
|
879
|
+
}
|
|
880
|
+
/** What a matcher failed with when its subject didn't match, not an error raised under it. */
|
|
881
|
+
function isMatcherFailure(error) {
|
|
882
|
+
if (error instanceof chai.AssertionError) {
|
|
883
|
+
const { cause } = error;
|
|
884
|
+
return !(cause instanceof Error) || isMatcherFailure(cause);
|
|
752
885
|
}
|
|
753
|
-
|
|
754
|
-
let transport;
|
|
755
|
-
let ids = 0;
|
|
756
|
-
/** Points this process at the run's scheduler over `send`; returns what delivers its grants. */
|
|
757
|
-
function useSchedulerChannel(send) {
|
|
758
|
-
const channel = new ChannelTransport(send);
|
|
759
|
-
transport = channel;
|
|
760
|
-
return (id) => channel.grant(id);
|
|
886
|
+
return error instanceof Error && "__vitest_error_context__" in error;
|
|
761
887
|
}
|
|
762
888
|
/**
|
|
763
|
-
*
|
|
764
|
-
*
|
|
889
|
+
* A matcher's own answer: its subject didn't match, or it can't answer for it. Any other error
|
|
890
|
+
* (the sandbox gone, a command that couldn't start, the eval's own code throwing) ends the body.
|
|
765
891
|
*/
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
892
|
+
const isCheckOutcome = (error) => isMatcherFailure(error) || isUnanswerable(error);
|
|
893
|
+
/**
|
|
894
|
+
* Whether a failed check lets the body carry on: an `expect`'s own outcome, outside a poll's
|
|
895
|
+
* function, where it throws so the poll tries again.
|
|
896
|
+
*/
|
|
897
|
+
const carriesOn = (entry, error) => entry.soft && pollTry.getStore() === void 0 && isCheckOutcome(error);
|
|
898
|
+
/**
|
|
899
|
+
* Masks what `.resolves` and `.rejects` quote when the promise settles the other way (the
|
|
900
|
+
* rejection, or the value), which their message cuts to 40 characters. The matcher after them
|
|
901
|
+
* gets the real value.
|
|
902
|
+
*/
|
|
903
|
+
function maskUnexpected(assertion, property) {
|
|
904
|
+
const subject = flag(assertion, "object");
|
|
905
|
+
const mask = (settling) => isThenable(settling) ? Promise.resolve(settling).then((value) => property === "rejects" ? redactStrings(value) : value, (error) => {
|
|
906
|
+
throw property === "resolves" ? redactStrings(error) : error;
|
|
907
|
+
}) : settling;
|
|
908
|
+
const masked = property === "rejects" && typeof subject === "function" ? () => mask(subject()) : mask(subject);
|
|
909
|
+
if (masked !== subject && subjectOf(subject) !== void 0) Object.assign(masked, { [SUBJECT]: subjectOf(subject) });
|
|
910
|
+
chai.util.flag(assertion, "object", masked);
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Wraps an assertion so each matcher called on it is recorded on the attempt. A failed matcher's
|
|
914
|
+
* outcome is kept on its entry, which fails the attempt at its end, and the body carries on;
|
|
915
|
+
* under `expect.require` it throws, ending the body.
|
|
916
|
+
*/
|
|
917
|
+
function recording(target, list, file) {
|
|
918
|
+
const chained = (value) => value instanceof chai.Assertion ? recording(value, list, file) : value;
|
|
919
|
+
const call = (fn, name, args) => {
|
|
920
|
+
if (flag(target, "poll")) return Reflect.apply(fn, target, args);
|
|
921
|
+
const entry = begin(list, target, name, args, file);
|
|
922
|
+
const startedAt = performance.now();
|
|
923
|
+
let result;
|
|
924
|
+
try {
|
|
925
|
+
result = Reflect.apply(fn, target, args);
|
|
926
|
+
} catch (error) {
|
|
927
|
+
if (isMisuse(error)) {
|
|
928
|
+
unrecord(list, entry);
|
|
929
|
+
throw error;
|
|
792
930
|
}
|
|
931
|
+
settle(entry, error);
|
|
932
|
+
if (!carriesOn(entry, error)) throw error;
|
|
933
|
+
return /^to[A-Z]/.test(name) ? void 0 : chained(target);
|
|
934
|
+
}
|
|
935
|
+
if (!isThenable(result)) {
|
|
936
|
+
settle(entry, void 0);
|
|
937
|
+
return chained(result);
|
|
938
|
+
}
|
|
939
|
+
const recorded = {};
|
|
940
|
+
const settled = Promise.resolve(result).then((value) => {
|
|
941
|
+
settle(entry, void 0, startedAt);
|
|
942
|
+
return value;
|
|
943
|
+
}, (error) => {
|
|
944
|
+
settle(entry, error, startedAt);
|
|
945
|
+
if (!carriesOn(entry, error)) throw error;
|
|
946
|
+
recorded.error = error;
|
|
947
|
+
});
|
|
948
|
+
softFailures.set(settled, recorded);
|
|
949
|
+
return settled;
|
|
950
|
+
};
|
|
951
|
+
return new Proxy(target, { get(t, property) {
|
|
952
|
+
if (property === "resolves" || property === "rejects") maskUnexpected(t, property);
|
|
953
|
+
const value = Reflect.get(t, property);
|
|
954
|
+
if (typeof property === "symbol" || UNRECORDED.has(property)) return value;
|
|
955
|
+
if (typeof value !== "function") return chained(value);
|
|
956
|
+
return new Proxy(value, {
|
|
957
|
+
apply: (fn, _this, args) => call(fn, property, args),
|
|
958
|
+
get: (fn, key) => chained(Reflect.get(fn, key))
|
|
793
959
|
});
|
|
960
|
+
} });
|
|
961
|
+
}
|
|
962
|
+
/** The attempt's matcher calls that have settled, in call order. */
|
|
963
|
+
const rawAssertions = (task) => (recordings.get(task) ?? []).filter((r) => r.status !== void 0);
|
|
964
|
+
/** An `expect` of its own for one attempt (or, without a task, the worker's). */
|
|
965
|
+
function createExpect(task) {
|
|
966
|
+
const list = [];
|
|
967
|
+
if (task) recordings.set(task, list);
|
|
968
|
+
const expect = ((value, message) => {
|
|
969
|
+
const { assertionCalls } = getState(expect);
|
|
970
|
+
setState({ assertionCalls: assertionCalls + 1 }, expect);
|
|
971
|
+
const assertion = chai.expect(value, message);
|
|
972
|
+
return task ? recording(assertion.withTest(task), list, task.file) : assertion;
|
|
794
973
|
});
|
|
974
|
+
if (task) ownRecordings.set(expect, list);
|
|
975
|
+
Object.assign(expect, chai.expect);
|
|
976
|
+
Object.assign(expect, globalThis[ASYMMETRIC_MATCHERS_OBJECT]);
|
|
977
|
+
expect.getState = () => getState(expect);
|
|
978
|
+
expect.setState = (state) => setState(state, expect);
|
|
979
|
+
setState({
|
|
980
|
+
assertionCalls: 0,
|
|
981
|
+
isExpectingAssertions: false,
|
|
982
|
+
isExpectingAssertionsError: null,
|
|
983
|
+
expectedAssertionsNumber: null,
|
|
984
|
+
expectedAssertionsNumberErrorGen: null,
|
|
985
|
+
currentTestName: task?.fullTestName ?? ""
|
|
986
|
+
}, expect);
|
|
987
|
+
expect.assert = chai.assert;
|
|
988
|
+
expect.extend = (matchers) => chai.expect.extend(expect, matchers);
|
|
989
|
+
expect.addEqualityTesters = (testers) => addCustomEqualityTesters(testers);
|
|
990
|
+
const required = (value, message) => {
|
|
991
|
+
const assertion = expect(value, message);
|
|
992
|
+
chai.util.flag(assertion, "require", true);
|
|
993
|
+
return assertion;
|
|
994
|
+
};
|
|
995
|
+
expect.require = Object.assign(required, { poll: createPoll(expect, task && list, task?.file, true) });
|
|
996
|
+
expect.poll = createPoll(expect, task && list, task?.file, false);
|
|
997
|
+
expect.unreachable = (message) => {
|
|
998
|
+
chai.assert.fail(`expected${message ? ` "${message}" ` : " "}not to be reached`);
|
|
999
|
+
};
|
|
1000
|
+
expect.skip = (label, reason) => {
|
|
1001
|
+
if (typeof label !== "string" || !label.trim()) throw misuseError("expect.skip(label, reason?): label must be a non-empty string");
|
|
1002
|
+
const { assertionCalls } = getState(expect);
|
|
1003
|
+
setState({ assertionCalls: assertionCalls + 1 }, expect);
|
|
1004
|
+
if (!task) return;
|
|
1005
|
+
list.push({
|
|
1006
|
+
matcher: "skip",
|
|
1007
|
+
args: reason === void 0 ? [] : [reason],
|
|
1008
|
+
label,
|
|
1009
|
+
soft: true,
|
|
1010
|
+
status: "not_applicable",
|
|
1011
|
+
...reason !== void 0 ? { error: new Error(reason) } : {}
|
|
1012
|
+
});
|
|
1013
|
+
};
|
|
1014
|
+
function assertions(expected) {
|
|
1015
|
+
const errorGen = () => /* @__PURE__ */ new Error(`expected number of assertions to be ${expected}, but got ${expect.getState().assertionCalls}`);
|
|
1016
|
+
setState({
|
|
1017
|
+
expectedAssertionsNumber: expected,
|
|
1018
|
+
expectedAssertionsNumberErrorGen: errorGen
|
|
1019
|
+
}, expect);
|
|
1020
|
+
}
|
|
1021
|
+
function hasAssertions() {
|
|
1022
|
+
setState({
|
|
1023
|
+
isExpectingAssertions: true,
|
|
1024
|
+
isExpectingAssertionsError: /* @__PURE__ */ new Error("expected any number of assertion, but got none")
|
|
1025
|
+
}, expect);
|
|
1026
|
+
}
|
|
1027
|
+
chai.util.addMethod(expect, "assertions", assertions);
|
|
1028
|
+
chai.util.addMethod(expect, "hasAssertions", hasAssertions);
|
|
1029
|
+
expect.extend(customMatchers);
|
|
1030
|
+
return expect;
|
|
795
1031
|
}
|
|
796
|
-
/**
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
1032
|
+
/** A longer `setTimeout` or `AbortSignal.timeout` fires after 1 ms instead. */
|
|
1033
|
+
const MAX_TIMER_MS = 2 ** 31 - 1;
|
|
1034
|
+
/**
|
|
1035
|
+
* `expect.poll(fn).matcher()`: calls `fn` and the matcher until the matcher passes, every
|
|
1036
|
+
* `interval` ms, for at most `timeout` ms, then fails with the last error: recorded, or thrown
|
|
1037
|
+
* when `required` or the error isn't the matcher's.
|
|
1038
|
+
*/
|
|
1039
|
+
function createPoll(expect, list, file, required) {
|
|
1040
|
+
return (fn, options = {}) => {
|
|
1041
|
+
const { interval = 50, timeout = 1e3, message } = options;
|
|
1042
|
+
for (const [key, ms] of [["timeout", timeout], ["interval", interval]]) if (ms > MAX_TIMER_MS) throw new TypeError(`expect.poll's ${key} is at most 596h (${MAX_TIMER_MS}ms), the longest timer Node can set (got ${ms})`);
|
|
1043
|
+
const assertion = expect(null, message);
|
|
1044
|
+
chai.util.flag(assertion, "poll", true);
|
|
1045
|
+
if (required) chai.util.flag(assertion, "require", true);
|
|
1046
|
+
const proxy = new Proxy(assertion, { get(target, key, receiver) {
|
|
1047
|
+
const matcher = Reflect.get(target, key, receiver);
|
|
1048
|
+
if (typeof matcher !== "function") return matcher instanceof chai.Assertion ? proxy : matcher;
|
|
1049
|
+
return (...args) => {
|
|
1050
|
+
const location = /* @__PURE__ */ new Error("expect.poll");
|
|
1051
|
+
const entry = list && begin(list, assertion, String(key), args, file);
|
|
1052
|
+
const startedAt = performance.now();
|
|
1053
|
+
const outer = pollTry.getStore();
|
|
1054
|
+
const recorded = {};
|
|
1055
|
+
const polled = (async () => {
|
|
1056
|
+
const deadline = Date.now() + timeout;
|
|
1057
|
+
const signal = AbortSignal.timeout(timeout);
|
|
1058
|
+
for (;;) {
|
|
1059
|
+
const tried = [];
|
|
1060
|
+
let polledValue = false;
|
|
1061
|
+
try {
|
|
1062
|
+
chai.util.flag(assertion, "object", await pollTry.run(tried, () => fn({ signal })));
|
|
1063
|
+
polledValue = true;
|
|
1064
|
+
const result = await Reflect.apply(matcher, assertion, args);
|
|
1065
|
+
if (entry) settle(entry, void 0, startedAt);
|
|
1066
|
+
outer?.push(...tried);
|
|
1067
|
+
return result;
|
|
1068
|
+
} catch (error) {
|
|
1069
|
+
if (polledValue && isMisuse(error)) {
|
|
1070
|
+
if (list && entry) unrecord(list, entry);
|
|
1071
|
+
outer?.push(...tried);
|
|
1072
|
+
throw error;
|
|
1073
|
+
}
|
|
1074
|
+
if (Date.now() + interval >= deadline) {
|
|
1075
|
+
if (error instanceof Error && location.stack) error.stack = location.stack.replace(location.message, () => error.message);
|
|
1076
|
+
if (entry) settle(entry, error, startedAt);
|
|
1077
|
+
outer?.push(...tried);
|
|
1078
|
+
if (!entry?.soft || outer || !isCheckOutcome(error)) throw error;
|
|
1079
|
+
recorded.error = error;
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
for (const t of tried) list?.splice(list.indexOf(t), 1);
|
|
1083
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
})();
|
|
1087
|
+
softFailures.set(polled, recorded);
|
|
1088
|
+
return polled;
|
|
1089
|
+
};
|
|
1090
|
+
} });
|
|
1091
|
+
return proxy;
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
/** The failure `expect.assertions` or `expect.hasAssertions` left on an attempt. */
|
|
1095
|
+
function attemptExpectError(expect) {
|
|
1096
|
+
const state = expect.getState();
|
|
1097
|
+
if (state.expectedAssertionsNumber !== null && state.expectedAssertionsNumber !== state.assertionCalls) return state.expectedAssertionsNumberErrorGen();
|
|
1098
|
+
if (state.isExpectingAssertions && state.assertionCalls === 0) return state.isExpectingAssertionsError;
|
|
1099
|
+
}
|
|
1100
|
+
const globalExpect = createExpect();
|
|
1101
|
+
Object.defineProperty(globalThis, GLOBAL_EXPECT, {
|
|
1102
|
+
value: globalExpect,
|
|
1103
|
+
writable: true,
|
|
1104
|
+
configurable: true
|
|
1105
|
+
});
|
|
1106
|
+
const currentExpect = new AsyncLocalStorage();
|
|
1107
|
+
const currentPending = new AsyncLocalStorage();
|
|
1108
|
+
/**
|
|
1109
|
+
* The failure each async `expect` recorded and resolved past, by the promise its matcher returned:
|
|
1110
|
+
* an eval that doesn't await it still learns why it failed.
|
|
1111
|
+
*/
|
|
1112
|
+
const softFailures = /* @__PURE__ */ new WeakMap();
|
|
1113
|
+
/**
|
|
1114
|
+
* Wraps an assertion chain so each promise one of its matchers returns is tracked: an eval that
|
|
1115
|
+
* doesn't await it would otherwise pass and tear its sandbox down while the check still runs.
|
|
1116
|
+
*/
|
|
1117
|
+
function tracked(assertion, pending, path) {
|
|
1118
|
+
return new Proxy(assertion, { get(target, property) {
|
|
1119
|
+
const value = Reflect.get(target, property);
|
|
1120
|
+
const name = `${path}.${String(property)}`;
|
|
1121
|
+
if (typeof value === "function") return (...args) => {
|
|
1122
|
+
const result = Reflect.apply(value, target, args);
|
|
1123
|
+
if (!isThenable(result)) return result;
|
|
1124
|
+
const entry = {
|
|
1125
|
+
assertion: `${name}()`,
|
|
1126
|
+
settled: Promise.resolve(result).then(() => softFailures.get(result)?.error, (error) => error ?? /* @__PURE__ */ new Error(`${name}() failed`)),
|
|
1127
|
+
observed: false,
|
|
1128
|
+
site: /* @__PURE__ */ new Error()
|
|
1129
|
+
};
|
|
1130
|
+
pending.push(entry);
|
|
1131
|
+
const observe = (fn) => {
|
|
1132
|
+
entry.observed = true;
|
|
1133
|
+
return fn(Promise.resolve(result));
|
|
1134
|
+
};
|
|
1135
|
+
return {
|
|
1136
|
+
then: (onFulfilled, onRejected) => observe((p) => p.then(onFulfilled, onRejected)),
|
|
1137
|
+
catch: (onRejected) => observe((p) => p.catch(onRejected)),
|
|
1138
|
+
finally: (onFinally) => observe((p) => p.finally(onFinally)),
|
|
1139
|
+
[Symbol.toStringTag]: "Promise"
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
return typeof value === "object" && value !== null && !isThenable(value) ? tracked(value, pending, name) : value;
|
|
1143
|
+
} });
|
|
1144
|
+
}
|
|
1145
|
+
const track = (assertion, path) => {
|
|
1146
|
+
const pending = currentPending.getStore();
|
|
1147
|
+
return pending && typeof assertion === "object" && assertion !== null ? tracked(assertion, pending, path) : assertion;
|
|
1148
|
+
};
|
|
1149
|
+
/** Assertions that return a chain, so the chain's async matchers are tracked too. */
|
|
1150
|
+
const CHAINS = {
|
|
1151
|
+
require: "expect.require(…)",
|
|
1152
|
+
poll: "expect.poll(…)"
|
|
1153
|
+
};
|
|
1154
|
+
const expect = new Proxy(globalExpect, {
|
|
1155
|
+
apply: (target, thisArg, args) => track(Reflect.apply(currentExpect.getStore() ?? target, thisArg, args), "expect(…)"),
|
|
1156
|
+
get: (target, property) => {
|
|
1157
|
+
const bound = currentExpect.getStore() ?? target;
|
|
1158
|
+
const value = Reflect.get(bound, property);
|
|
1159
|
+
if (typeof value !== "function" || property === "assert") return value;
|
|
1160
|
+
const chain = CHAINS[property];
|
|
1161
|
+
const method = (...args) => {
|
|
1162
|
+
const result = Reflect.apply(value, bound, args);
|
|
1163
|
+
return chain ? track(result, chain) : result;
|
|
1164
|
+
};
|
|
1165
|
+
if (property !== "require") return method;
|
|
1166
|
+
const poll = bound.require.poll;
|
|
1167
|
+
return Object.assign(method, { poll: (...args) => track(Reflect.apply(poll, bound, args), "expect.require.poll(…)") });
|
|
803
1168
|
}
|
|
1169
|
+
});
|
|
1170
|
+
/** Runs an attempt's body with its own `expect` and unawaited-assertion list. */
|
|
1171
|
+
function withAttemptExpect(own, pending, body) {
|
|
1172
|
+
return currentExpect.run(own, () => currentPending.run(pending, body));
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* The running attempt's matcher calls, which its record is made from: another language's runner
|
|
1176
|
+
* adds the calls its body made over the attempt protocol here.
|
|
1177
|
+
*/
|
|
1178
|
+
function attemptRecordings() {
|
|
1179
|
+
const own = currentExpect.getStore();
|
|
1180
|
+
const list = own && ownRecordings.get(own);
|
|
1181
|
+
if (!list) throw new Error("attemptRecordings() is only called inside an attempt");
|
|
1182
|
+
return list;
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Waits for the async assertions the eval started but didn't await, and returns the error that
|
|
1186
|
+
* fails the attempt: the first one's failure, or that it wasn't awaited, with the eval's line.
|
|
1187
|
+
*/
|
|
1188
|
+
async function unawaitedError(pending, file) {
|
|
1189
|
+
const missed = pending.filter((p) => !p.observed);
|
|
1190
|
+
if (missed.length === 0) return void 0;
|
|
1191
|
+
for (const p of missed) p.observed = true;
|
|
1192
|
+
const outcomes = await Promise.all(missed.map((p) => p.settled));
|
|
1193
|
+
const i = Math.max(0, outcomes.findIndex((o) => o !== void 0));
|
|
1194
|
+
const site = missed[i]?.site?.stack;
|
|
1195
|
+
const where = file && lineIn(site, file);
|
|
1196
|
+
const hint = `${missed[i]?.assertion}${where ? ` at ${where}` : ""} wasn't awaited. Its check is async: write \`await ${missed[i]?.assertion}\`.`;
|
|
1197
|
+
const failure = outcomes[i];
|
|
1198
|
+
if (failure instanceof Error) {
|
|
1199
|
+
failure.message = `${failure.message}\n\n${hint}`;
|
|
1200
|
+
return failure;
|
|
1201
|
+
}
|
|
1202
|
+
const error = new Error(hint);
|
|
1203
|
+
error.name = "AssertionError";
|
|
1204
|
+
if (site) error.stack = `AssertionError: ${hint}\n${site.split("\n").slice(1).join("\n")}`;
|
|
1205
|
+
return error;
|
|
1206
|
+
}
|
|
1207
|
+
function extendExpect(matchers) {
|
|
1208
|
+
globalExpect.extend(matchers);
|
|
1209
|
+
}
|
|
1210
|
+
// src/engine/runtime.ts
|
|
1211
|
+
let engine;
|
|
1212
|
+
/** Installs the engine this worker runs eval files with. */
|
|
1213
|
+
function useEngine(next) {
|
|
1214
|
+
engine = next;
|
|
1215
|
+
}
|
|
1216
|
+
function active() {
|
|
1217
|
+
if (!engine) throw new UsageError("evaluate() and group() only work in an eval file that reeval run loads. Run it with reeval run.");
|
|
1218
|
+
return engine;
|
|
804
1219
|
}
|
|
805
|
-
|
|
1220
|
+
const registerTest = (name, options, body) => active().registerTest(name, options, body);
|
|
1221
|
+
const registerGroup = (name, mode, body) => active().registerGroup(name, mode, body);
|
|
1222
|
+
const getRunContext = () => active().getRunContext();
|
|
1223
|
+
const collectingFile = () => active().collectingFile();
|
|
1224
|
+
const declarePlanned = (harnesses, traits) => active().declarePlanned(harnesses, traits);
|
|
1225
|
+
export { HarnessCapabilityError as C, runMatchLabel as D, limitsLabel as E, shellCommands as O, takeFileMeta as S, TURN_STATUS as T, MATCHERS as _, registerTest as a, judgeFailedMessage as b, attemptExpectError as c, expect as d, extendExpect as f, withAttemptExpect as g, unawaitedError as h, registerGroup as i, attemptRecordings as l, rawAssertions as m, declarePlanned as n, useEngine as o, isUnanswerable as p, getRunContext as r, SUBJECT as s, collectingFile as t, createExpect as u, evalMatchers as v, TURN_EDITED as w, runMatcher as x, isMatcherName as y };
|
|
806
1226
|
|
|
807
|
-
//# sourceMappingURL=
|
|
1227
|
+
//# sourceMappingURL=runtime-DsRjnydE.js.map
|