@p4code/cli 0.9.22 → 0.9.23
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/dist/{AcpMcpStdioBridge-DxIZyDJz.mjs → AcpMcpStdioBridge-BNuxv1nx.mjs} +15 -7
- package/dist/AcpMcpStdioBridge-C9Ry_oCI.mjs +3 -0
- package/dist/{Effect-BqRgldaH.mjs → Effect-BrI3bavz.mjs} +1242 -448
- package/dist/{Schema-CkGB1Dgx.mjs → Schema-06GeVid5.mjs} +1626 -1148
- package/dist/{Stream-DZTo5F3N.mjs → Stream-DKSvHopl.mjs} +470 -190
- package/dist/{TraceDiagnostics-DE0N1Yf6.mjs → TraceDiagnostics-DY_cYrzB.mjs} +1961 -531
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DC5fHnhS.mjs → binCli-Bou3rWgW.mjs} +2302 -1946
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-Cst8OnLH.mjs → claudeHistoryWorker-BZBBGtSw.mjs} +1 -1
- package/dist/{claudeHistoryWorker-r4mV4Dxy.mjs → claudeHistoryWorker-DlhW7K2f.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2155 -2127
- package/dist/client/assets/{2NI2N5EU-CgpeJ5KT.js → 2NI2N5EU-B3GKfpTJ.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BZfVOqtM.js → 4UO7MD6I-D1jV-2l8.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-B5V3_tzl.js → 5B3SVYGG-CiUCamIk.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DRzSVTZ0.js → 5GK6JWQ2-t3RHg90Y.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-BX-IFKkJ.js → 5N7A7DKN-QVdNnUVu.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CGiKcStE.js → 5OC2THR4-CxE7bwzV.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-B5Smgpiz.js → 5S6HY5KT-msIIAX0G.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-BSWEueVD.js → 6IMQ5BUJ-BzYnQ5qg.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-0nUReGo5.js → 6OLKWJ4F-AQyY5TLk.js} +2 -2
- package/dist/client/assets/{74OO7NKP-BZ5SCLUX.js → 74OO7NKP-CCpQBxNH.js} +2 -2
- package/dist/client/assets/{75O6YZUN-NifBwMlS.js → 75O6YZUN-D3WwLu8s.js} +2 -2
- package/dist/client/assets/{77XECAW3-_XJOQitm.js → 77XECAW3-C6PMMrkh.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-B5mFmY4q.js → ABYRPUBD-BmXVPnuD.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-CNpt8h9w.js +2 -0
- package/dist/client/assets/{AnimatedHeight-BoS1RBdk.js → AnimatedHeight-B2j_NXft.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-DesOxtee.js → AuthSurfaceShell-DDT8iJWE.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-CxFyfwSJ.js → BB2UYUI2-C_DXRsEF.js} +2 -2
- package/dist/client/assets/{BUM34MOA-Kk83QSsb.js → BUM34MOA-sLk4tJuF.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-DLcBenqs.js → CEQABKGZ-DsLeCUfk.js} +2 -2
- package/dist/client/assets/{CXAC5362-BcvLk6NG.js → CXAC5362-6czpP5mH.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-BElkMe1K.js +2 -0
- package/dist/client/assets/ChatMarkdown-pRUIhpGi.js +49 -0
- package/dist/client/assets/{CheckboxIndicator-Dj91Im5z.js → CheckboxIndicator-DFCs5GRD.js} +2 -2
- package/dist/client/assets/{ClippedText-CmBRrYNb.js → ClippedText-BIwvWMlV.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-3MrEmFzD.js +2 -0
- package/dist/client/assets/{CollapsiblePanel-BwDr-EKA.js → CollapsiblePanel-CsWNZ7jo.js} +2 -2
- package/dist/client/assets/{ComboboxClear-DeqR6c-6.js → ComboboxClear-Cv9NZFNr.js} +2 -2
- package/dist/client/assets/{ComboboxGroupLabel-Dk-MF4sD.js → ComboboxGroupLabel-BPe0M6wJ.js} +2 -2
- package/dist/client/assets/{CommandBlock-C15Q987N.js → CommandBlock-DUs3JB3r.js} +2 -2
- package/dist/client/assets/{CompositeRoot-Cx12XSsh.js → CompositeRoot-RcqGhRAf.js} +2 -2
- package/dist/client/assets/ConnectAgentSurface-BG30oBmC.js +2 -0
- package/dist/client/assets/{ConnectionStatusDot-BnhNFCMA.js → ConnectionStatusDot-DIUevPBM.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-CkNId4Pz.js → DRLTVNUE-CAWKPVio.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-B4516qT_.js → DYY6UVD2-HB9mYAbb.js} +2 -2
- package/dist/client/assets/DevicePanel-BAT6BS-V.js +2 -0
- package/dist/client/assets/DeviceSetup-ClD1wdY1.js +2 -0
- package/dist/client/assets/DialogRoot-Dg58-QOq.js +2 -0
- package/dist/client/assets/DialogTitle-CSaaIBpP.js +2 -0
- package/dist/client/assets/{DiffCommentAnnotation-CSzNea6G.js → DiffCommentAnnotation-BjI2rZNS.js} +3 -3
- package/dist/client/assets/{DiffFileTree-CDnFut1y.js → DiffFileTree-C6VB4VCo.js} +2 -2
- package/dist/client/assets/DiffPanel-pkAdnqL7.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-zgaFe3TY.js → DiffWorkerPoolProvider-CPwS1D4h.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-BI3VZqZl.js → EmbeddedDesign-DOevokgh.js} +7 -7
- package/dist/client/assets/{EnvironmentMachineIcon-Lz2YGk0G.js → EnvironmentMachineIcon-DM48TG2x.js} +2 -2
- package/dist/client/assets/{ExpandableText-B034p2kF.js → ExpandableText-CYFNBBpY.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-Uc8FDPv8.js → FNOVOB4O-BkKBPKb-.js} +2 -2
- package/dist/client/assets/{FieldControl-H6iQvC-Q.js → FieldControl-DHSVFpKc.js} +2 -2
- package/dist/client/assets/{FileDiff-B4Yf4fFg.js → FileDiff-CdxU7jjH.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-u1jxtxzb.js → FilePreviewPanel-Bz8HETIa.js} +4 -4
- package/dist/client/assets/{FoldedSettingsSection-DvzfFn5A.js → FoldedSettingsSection-IyrJlpO8.js} +2 -2
- package/dist/client/assets/{HDGCDEEZ-DVkQN-82.js → HDGCDEEZ-BW-K6GhK.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-txH19TCj.js → HSJLKHB7-B8h6fviS.js} +2 -2
- package/dist/client/assets/{Icons-DmQwwfAN.js → Icons-DpgbzNj8.js} +2 -2
- package/dist/client/assets/Input-BT2VVALp.js +2 -0
- package/dist/client/assets/{IntervalSecondsField-xqmFxAii.js → IntervalSecondsField-BaJ1qNX-.js} +2 -2
- package/dist/client/assets/JZOYTAAL-DbSUKTwO.js +1 -0
- package/dist/client/assets/{K3MD6TGW-4d2yDOzZ.js → K3MD6TGW-BTpBxr8x.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-B8vKr81f.js → K7RP3OMA-DcsmGbRM.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-C6XG7NtX.js → KeybindingsSettings.logic-oAUXQqts.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-DAyTfuTY.js → LHDIQX7Q-NOcjEUQY.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-C67XJj3F.js → LUXOKEGN-BWJqFZst.js} +2 -2
- package/dist/client/assets/LinkMachineSelect-Dp6FC1LE.js +2 -0
- package/dist/client/assets/{MathTypeset-CMO1aCZc.js → MathTypeset-DHPwWtff.js} +2 -2
- package/dist/client/assets/{ModelLiveLayer-DqW0VhFG.js → ModelLiveLayer-D3x6mJFP.js} +3 -3
- package/dist/client/assets/{N3JZAHOW-Bp1sdK_N.js → N3JZAHOW-oDX5VWgR.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-D427dlgt.js → NUIALGQ3-DbqxE7KO.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-BL0Jsc_V.js → NoProjectsHero-Dk-rv5RI.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-BxqHRP3n.js → O65XPQGZ-Cys4qXjc.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-CKRD1aP5.js → O7XIQ6OM-aLdTRbRJ.js} +2 -2
- package/dist/client/assets/{OFQON5FD-CzS9a25C.js → OFQON5FD-DpC8rm9Y.js} +2 -2
- package/dist/client/assets/P4ConnectAccountPages-C-GbG9lk.js +2 -0
- package/dist/client/assets/{P4ConnectSidebarSignIn-29st82gY.js → P4ConnectSidebarSignIn-DepXmk4f.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Ww7-2BqY.js → PJQHF43J-CUbFewuD.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-CKWjLO_e.js +218 -0
- package/dist/client/assets/{PierreEntryIcon-UO6zY_i-.js → PierreEntryIcon-CVKV5qfT.js} +2 -2
- package/dist/client/assets/{PopoverHandle-DEcvmS0k.js → PopoverHandle-s36xVlsK.js} +2 -2
- package/dist/client/assets/PreviewPanel-B-ty1_ZL.js +2 -0
- package/dist/client/assets/{ProjectDefaultsSettings-DN1mhFNf.js → ProjectDefaultsSettings-vF_5kxVM.js} +2 -2
- package/dist/client/assets/{ProjectFavicon-CyXd4lSF.js → ProjectFavicon-BEsCcLjN.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-B_D_9SAb.js → ProjectIconPickerDialog-D1_gSlWW.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-C8btbogu.js → ProjectMonogram-Aw_ZBtDB.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-B0GzUrya.js → ProviderAuthTerminal-cNp7I_XV.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-CCCH-TiQ.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-DefAmKv_.js → ProviderSettingsForm-CV7sAQy3.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-DjChxC-1.js +6 -0
- package/dist/client/assets/{RHNBAITX-BsGO-vJB.js → RHNBAITX-CEZ1jYAC.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-COho36OD.js → ReadOnlySourcePreview-Dw9TzXZ2.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-BMXImj30.js → RedactedSensitiveText-bQSbv34p.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-Dbb6Gs8P.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-Cog3JVw0.js → RightPanelResizeHandle-B6vIzqA0.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-BZEKTqDY.js → SLD4V6NK-BXmFkBHB.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-TjoGUXvC.js +6 -0
- package/dist/client/assets/{ScopedSwitch-Cq7B0T7B.js → ScopedSwitch-C8qSHRkU.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-DFCZuJ0r.js → ScrollAreaCorner-Cn2VDisz.js} +2 -2
- package/dist/client/assets/{SecretInput-CRgvNUgU.js → SecretInput-C6zW-8wI.js} +2 -2
- package/dist/client/assets/{SelectScrollUpArrow-C-MWJdyw.js → SelectScrollUpArrow-C40FP3vq.js} +2 -2
- package/dist/client/assets/{SelfImproveSettingsSection-DZUf-jb0.js → SelfImproveSettingsSection-BhUO-XvV.js} +2 -2
- package/dist/client/assets/{SettingsPanels-Bk_YhHLm.js → SettingsPanels-DFPZUI9O.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-UhRGlGN1.js → SettingsPanels.logic-5bLleFhd.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-Cja-hHOp.js → SettingsScopeNotice-VgBZL2zg.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DL1ZzaTz.js → SidebarStageBackdrop-DvPzZM_j.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-D049x5K8.js → T3PCR2KE-bp9TnTiq.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-Du9gxVgn.js → TKWO2OVW-Cyskzdq0.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-pUPHV4Qd.js → TSHNXIZL-Dp3os6bG.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-CcFVvJlQ.js → ThemeEditorPanel-B1RklhEA.js} +3 -3
- package/dist/client/assets/{ThreadDetailsItemsMenu-C4wfbepv.js → ThreadDetailsItemsMenu-BOMU-3M3.js} +60 -60
- package/dist/client/assets/ThreadTerminalDrawer-BmwBVDGv.js +5 -0
- package/dist/client/assets/TooltipProvider-DQ0TF9NB.js +2 -0
- package/dist/client/assets/{UQJE5E4I-BN56DsgT.js → UQJE5E4I-DDRoojS_.js} +2 -2
- package/dist/client/assets/{USNYFO5S-DVfAs9Gy.js → USNYFO5S-BvyU-aXY.js} +2 -2
- package/dist/client/assets/{Virtualizer-Cn_zq3uH.js → Virtualizer-DFzJCTxQ.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-Cz36fo-k.js → WEVWDWVA-DTuHUaDF.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-Cok6l_SJ.js → WorkspaceBreadcrumb-Dno2N8Xd.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-_--jFIZ8.js → WorkspacePageContainer-OLpcgD_f.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-CJB6rvZc.js → WorkspacePageHeader-Bn0m4gpR.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CUB_vKAl.js → X5RFHQXM-D9IKIoIk.js} +2 -2
- package/dist/client/assets/{X62E3GBT-C0wKfqHq.js → X62E3GBT-BBXkOa6O.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-CkYPODhO.js → XBNEOJTC-D743Jp_H.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-Cf82W2em.js → YHV2MVVZ-DZBsjjLM.js} +2 -2
- package/dist/client/assets/{YURCZMG2-C9tzKn90.js → YURCZMG2-ByezMSr0.js} +2 -2
- package/dist/client/assets/{YVG2LODB-DEZWhxa8.js → YVG2LODB-DrsC56GM.js} +2 -2
- package/dist/client/assets/_chat-BrgTPEvH.js +47 -0
- package/dist/client/assets/_chat.design-CgGDbdSU.js +2 -0
- package/dist/client/assets/{_chat.index-YmI2iiCN.js → _chat.index-BjAR62fj.js} +2 -2
- package/dist/client/assets/{_chat.new-BQY5ktA8.js → _chat.new-SjhrzHWl.js} +3 -3
- package/dist/client/assets/_chat.pull-requests-BixugchU.js +2 -0
- package/dist/client/assets/{alert-D6WJ0q4-.js → alert-CfhQnxcL.js} +2 -2
- package/dist/client/assets/alert-dialog-Dn_PRSFU.js +2 -0
- package/dist/client/assets/{assetUrls-C78a94Xu.js → assetUrls-Bn1N9LX7.js} +2 -2
- package/dist/client/assets/assets-Lf7mgwY7.js +2 -0
- package/dist/client/assets/{browserHistoryStore-DHI-0j5y.js → browserHistoryStore-Ciy-Cygo.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-D8HUAQg-.js → browserLinkTarget-DKVi8qup.js} +2 -2
- package/dist/client/assets/{checkbox-Cw33xyU7.js → checkbox-iFzfBLKr.js} +2 -2
- package/dist/client/assets/{color-picker-Bmtarpj9.js → color-picker-W1NtR7ha.js} +2 -2
- package/dist/client/assets/combobox-B0IMIA-1.js +2 -0
- package/dist/client/assets/command-BdVxwZ8D.js +2 -0
- package/dist/client/assets/{connect-Dl6MuR2C.js → connect-C605Zs89.js} +2 -2
- package/dist/client/assets/connect-agent-Cy1G_UzI.js +2 -0
- package/dist/client/assets/{design-BoZx445P.js → design-BNHLz8I2.js} +2 -2
- package/dist/client/assets/{device-Ku4cbgo-.js → device-CwiofvsD.js} +2 -2
- package/dist/client/assets/dialog-DFlZvvht.js +2 -0
- package/dist/client/assets/dialog-styles-Df-wlHU1.js +2 -0
- package/dist/client/assets/{diffPanelStore-D3ARjaef.js → diffPanelStore-CGdPbp5I.js} +2 -2
- package/dist/client/assets/{diffRendering-yxIsTMie.js → diffRendering-DJnBG6ZN.js} +2 -2
- package/dist/client/assets/{dist-CkH9xVVz.js → dist-D1XCsn7e.js} +3 -3
- package/dist/client/assets/{draft-input-DM7mC5ty.js → draft-input-1HTN8QVo.js} +2 -2
- package/dist/client/assets/{duoViewer-_3Xk2sTq.js → duoViewer-CQpxZewd.js} +2 -2
- package/dist/client/assets/{dynamic-CwQ-caG2.js → dynamic-DHrzmb9Z.js} +2 -2
- package/dist/client/assets/{embeddedScripts-Cn7aGTAj.js → embeddedScripts-D7WC0N_7.js} +2 -2
- package/dist/client/assets/{empty-VkAC9qIO.js → empty-Dn5VI2Xk.js} +2 -2
- package/dist/client/assets/entities-CjoTQlW3.js +2 -0
- package/dist/client/assets/{fileLinks-CJ9SYNL6.js → fileLinks-BZkPwsEY.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CdWOFpa-.js → fileTreeExpansion-DHPBKDpm.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-hLtjvhYr.js → getDiffFileInput-D-dpZLfC.js} +2 -2
- package/dist/client/assets/{htmlRender-DYI6n9Xo.js → htmlRender-BdsR_7vV.js} +2 -2
- package/dist/client/assets/{index-etcfxnIt.js → index-Cq59P2HC.js} +3 -3
- package/dist/client/assets/{input-group-DOUsG7P-.js → input-group-B1TOCtDG.js} +2 -2
- package/dist/client/assets/{input-CiPGmOLv.js → input-yaZxaTds.js} +2 -2
- package/dist/client/assets/{kbd-C8opCm5n.js → kbd-R7rkirqT.js} +2 -2
- package/dist/client/assets/{keybindings-CbaDrm2P.js → keybindings-CrlWqd5q.js} +2 -2
- package/dist/client/assets/{lazy--Qcevr63.js → lazy-BH4rgIwO.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-BZe6tHvz.js → lazyRouteComponent-BxpFJiXB.js} +2 -2
- package/dist/client/assets/{link-BHR6GsRr.js → link-2ZiGGBbw.js} +2 -2
- package/dist/client/assets/{linkedPrompt-D4M9Fbja.js → linkedPrompt-BTa8Gs9-.js} +2 -2
- package/dist/client/assets/main-Rpw_0nEx.css +2 -0
- package/dist/client/assets/main-xhw8F2iL.js +38 -0
- package/dist/client/assets/mediaReference-B7ym_1-U.js +2 -0
- package/dist/client/assets/{mediaSource-B03Ykm6c.js → mediaSource-GtWYcfeZ.js} +2 -2
- package/dist/client/assets/{modelScene-CX8s0IGN.js → modelScene-uWeIf_CC.js} +2 -2
- package/dist/client/assets/number-field-DNna9ps3.js +2 -0
- package/dist/client/assets/{observeResize-BESwMMOy.js → observeResize-Cz6dJUG2.js} +2 -2
- package/dist/client/assets/{onboarding-BZ01kUjR.js → onboarding-CxDppAGc.js} +2 -2
- package/dist/client/assets/openFileInPreview-MLuDI8fu.js +2 -0
- package/dist/client/assets/{p4ProjectFile-y2CDxOaL.js → p4ProjectFile-DlnfrOnm.js} +2 -2
- package/dist/client/assets/{pair-PXvf9qqC.js → pair-BJWvIdrD.js} +2 -2
- package/dist/client/assets/{pendingSendStore-CX8QB7C5.js → pendingSendStore-Cc6n4Xji.js} +2 -2
- package/dist/client/assets/{phoneViewer-F9Wt5VkW.js → phoneViewer-OFK_ThS_.js} +2 -2
- package/dist/client/assets/{pierre-icons-BTVgApcG.js → pierre-icons-BYPQj09G.js} +2 -2
- package/dist/client/assets/popover-DnYfrQly.js +2 -0
- package/dist/client/assets/{preview-DnCP9Q0k.js → preview-Bi-hPWTp.js} +2 -2
- package/dist/client/assets/{preview-5pSBET3P.js → preview-CxFR-vue.js} +2 -2
- package/dist/client/assets/{previewMiniPlayerStore-DByen2Nk.js → previewMiniPlayerStore-W10VSM09.js} +2 -2
- package/dist/client/assets/primary-CCmKskNP.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-DDs0gJOh.js +2 -0
- package/dist/client/assets/{projectFilesQueryState-B6AeAhgL.js → projectFilesQueryState-DzjMtjuq.js} +2 -2
- package/dist/client/assets/projectScriptEditor-C2NTRQLs.js +2 -0
- package/dist/client/assets/{providerSkills-D-ytsJU9.js → providerSkills-gNPMp_MW.js} +2 -2
- package/dist/client/assets/pullRequestDetail.logic-BZNLZTdt.js +10 -0
- package/dist/client/assets/{pullRequestIcons-1lUVOGQJ.js → pullRequestIcons-DwblWS4R.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-CUZ0N4F2.js → pullRequestReviewStore-Cc4bHb4o.js} +2 -2
- package/dist/client/assets/{pullRequests-DrQJ8zM2.js → pullRequests-DAMVEVGR.js} +2 -2
- package/dist/client/assets/queries-ckipBW-f.js +2 -0
- package/dist/client/assets/{query-CeIgbVxh.js → query-DFSffMGJ.js} +2 -2
- package/dist/client/assets/{radio-group-C14CASyG.js → radio-group-EK7EPCn2.js} +2 -2
- package/dist/client/assets/relay-BLgoNhyd.js +2 -0
- package/dist/client/assets/relayFailureReason-COnjzJFI.js +2 -0
- package/dist/client/assets/{renderScheduler-eNIG8tB_.js → renderScheduler-BCOEl9SF.js} +2 -2
- package/dist/client/assets/{rightPanelStore-Bt0unAo8.js → rightPanelStore-AjYoRisO.js} +2 -2
- package/dist/client/assets/runtime-CbYvES7U.js +9 -0
- package/dist/client/assets/{runtimeModeConfig-DymGoV55.js → runtimeModeConfig-Oh86kRYJ.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-CKzZuci7.js → scheduledTasksSettings.logic-DBMDVdjk.js} +3 -3
- package/dist/client/assets/{scroll-area-D2D-AlvC.js → scroll-area-DhDCLqyU.js} +2 -2
- package/dist/client/assets/{select-CE2f-g-3.js → select-CNcZzYBl.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-Bhi6QF1b.js → selfImproveFindings-CvQXlaMJ.js} +2 -2
- package/dist/client/assets/{server-DthHkqkT.js → server-CEMcTnD1.js} +2 -2
- package/dist/client/assets/{session-CxeYe0sJ.js → session-Ces3Ebxl.js} +2 -2
- package/dist/client/assets/session-logic-DoE1Q_f_.js +27 -0
- package/dist/client/assets/{settings-DAe5Z4UG.js → settings-DfyN3nPg.js} +2 -2
- package/dist/client/assets/{settings.appearance-wfb5oCmC.js → settings.appearance-DKdqiS33.js} +2 -2
- package/dist/client/assets/settings.archived-DDSjJTCo.js +2 -0
- package/dist/client/assets/{settings.computer-use-DJQcngZ4.js → settings.computer-use-B9Lvx9ml.js} +2 -2
- package/dist/client/assets/settings.connections-CeVMC9_Q.js +2 -0
- package/dist/client/assets/{settings.data-controls-DUI06j8l.js → settings.data-controls-C50d8Y1p.js} +2 -2
- package/dist/client/assets/{settings.decisions-BY4z-aRM.js → settings.decisions-IKWdsPJP.js} +2 -2
- package/dist/client/assets/{settings.designs-O0d1vzoU.js → settings.designs-DYK1fORq.js} +2 -2
- package/dist/client/assets/settings.diagnostics-DDQ_8Jca.js +2 -0
- package/dist/client/assets/{settings.general-CAOwfHEb.js → settings.general-c8Ls4Mz6.js} +2 -2
- package/dist/client/assets/settings.integrations-Bx78DSgB.js +2 -0
- package/dist/client/assets/{settings.keybindings-CwvrmKin.js → settings.keybindings-CBhgDtMa.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-DCBCu3U3.js → settings.open-source-licenses-CgHCMsAt.js} +2 -2
- package/dist/client/assets/{settings.plugins-8R8eV7IR.js → settings.plugins-1AVunwAZ.js} +4 -4
- package/dist/client/assets/{settings.projects-Cy_93LuA.js → settings.projects-voo-H787.js} +4 -4
- package/dist/client/assets/settings.providers-BWjGRXNt.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-CHnjcJx8.js → settings.scheduled-tasks-czvZRhu8.js} +2 -2
- package/dist/client/assets/{settings.secrets-BgQSmFWY.js → settings.secrets-B4BGlz80.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-C0J6pItQ.js → settings.snap-shot-d8VTC1Lv.js} +2 -2
- package/dist/client/assets/{settings.source-control-B3kcm55_.js → settings.source-control-Df0azAck.js} +2 -2
- package/dist/client/assets/settings.storage-CAwfhCbA.js +2 -0
- package/dist/client/assets/settingsLayout-D5Mded9h.js +3 -0
- package/dist/client/assets/sidebar-BUDllWET.js +2 -0
- package/dist/client/assets/{sidebarProjectGrouping-BaiZoO-A.js → sidebarProjectGrouping-Dt_irkWm.js} +2 -2
- package/dist/client/assets/{skeleton-D6RVfMa8.js → skeleton-C6O21cqb.js} +2 -2
- package/dist/client/assets/{sourceControl-j8xaTHat.js → sourceControl-CgxDQG5w.js} +2 -2
- package/dist/client/assets/{sourceControlClients-BxzlzQxJ.js → sourceControlClients-Bg3Of7DX.js} +2 -2
- package/dist/client/assets/{spinner-C-qDE4WQ.js → spinner-m1uNq_wW.js} +2 -2
- package/dist/client/assets/src-DHn7yNZx.js +15 -0
- package/dist/client/assets/terminal-links-C2FjxVhS.js +2 -0
- package/dist/client/assets/terminalSessions-DBYKcIE6.js +2 -0
- package/dist/client/assets/{textarea-CWbMGhL9.js → textarea-xZYMC9X5.js} +2 -2
- package/dist/client/assets/{themePalette-B_fGWNEh.js → themePalette-BcMO2M90.js} +3 -3
- package/dist/client/assets/{threadCheckpoints-B88N2CXf.js → threadCheckpoints-DUorxvL1.js} +2 -2
- package/dist/client/assets/{toggle-CKr6iZUR.js → toggle-DumCe7R7.js} +2 -2
- package/dist/client/assets/{toggle-group-B1WN0Pgy.js → toggle-group-CzE2mG-B.js} +2 -2
- package/dist/client/assets/{tooltip-CCYU8XGM.js → tooltip-BhCWnsdW.js} +2 -2
- package/dist/client/assets/{uiStateStore-CX-sbFiq.js → uiStateStore-B25zCY_s.js} +2 -2
- package/dist/client/assets/usage-DdBC08dx.js +2 -0
- package/dist/client/assets/{usageAccess-B0nqd8U-.js → usageAccess-COKmar79.js} +2 -2
- package/dist/client/assets/{usageFormat-CUSzTPTq.js → usageFormat-2913AogD.js} +2 -2
- package/dist/client/assets/{usageShortcuts-jGu1QJHr.js → usageShortcuts-U_aRtpf7.js} +2 -2
- package/dist/client/assets/{use-atom-command-Bsfu4mja.js → use-atom-command-DWabKYXN.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-CJvtvui4.js → useAriaLabelledBy-BiZIzNf7.js} +2 -2
- package/dist/client/assets/useHandleNewThread-DTgcUVdd.js +2 -0
- package/dist/client/assets/{useLocation-KvBZAN7v.js → useLocation-BXwb7I1F.js} +2 -2
- package/dist/client/assets/{useNavigate-DXSBYc-k.js → useNavigate-P1p3Es15.js} +2 -2
- package/dist/client/assets/{useNavigateBack-DzR35iiJ.js → useNavigateBack-D02Al7yk.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-CW-hut92.js → useP4ConnectAuthPrompt-DKYJHISj.js} +2 -2
- package/dist/client/assets/{useParams-D9reDvT8.js → useParams-DsmZTF__.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-C5YvHVz-.js → usePermissionStatus-DeJYBk6u.js} +2 -2
- package/dist/client/assets/{usePopupViewport-D7yp2NvZ.js → usePopupViewport-BBKn7x_4.js} +2 -2
- package/dist/client/assets/usePullRequestActions-BGugTe1S.js +3 -0
- package/dist/client/assets/{useRegisterFieldControl-D-hYtXkm.js → useRegisterFieldControl-DkFmgEzw.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-J0i-Sj4p.js → useScopedModelAvailability-LgMepA3M.js} +2 -2
- package/dist/client/assets/useSettings-hYzrsDTp.js +3 -0
- package/dist/client/assets/utils-BVnIIHXP.js +26 -0
- package/dist/client/assets/vcsRefInvalidation-C5gDWck3.js +2 -0
- package/dist/client/assets/welcome-CQrdWD2c.js +2 -0
- package/dist/client/icon-192x192.png +0 -0
- package/dist/client/icon-512x512.png +0 -0
- package/dist/client/index.html +1 -1
- package/dist/client/manifest.webmanifest +12 -0
- package/dist/client/third-party-licenses.json +1 -1
- package/dist/{mcpResponsePayloads-tqyeJD3c.mjs → mcpResponsePayloads-C8W7Qyxk.mjs} +3 -3
- package/dist/{preview-CmCyL-Tc.mjs → preview-C_kKbIjf.mjs} +6741 -3322
- package/dist/{renderer-CswgrCon.mjs → renderer-DKOOIEoX.mjs} +2 -2
- package/dist/resource-monitor/darwin-arm64/p4-resource-monitor +0 -0
- package/dist/{runtime-Bec3_bh8.mjs → runtime-Bm_EVnst.mjs} +3 -3
- package/dist/{runtimeLayer-BnJcJFjY.mjs → runtimeLayer-DQ7pD9BT.mjs} +22626 -21082
- package/dist/{runtimeLayer-DnNbGwAf.mjs → runtimeLayer-Go0xTEaW.mjs} +1 -1
- package/dist/{server-DXfSgbuj.mjs → server-DQ0wuuLG.mjs} +4388 -3021
- package/dist/{sha2-BfCJmkJJ.mjs → sha2-Daa2Fiv1.mjs} +7411 -5229
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-COfNlajP.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-C9D5JFWr.js +0 -2
- package/dist/client/assets/ChatMarkdown-Ck4FJs_Q.js +0 -49
- package/dist/client/assets/CodexSetupSection.logic-DzEO1qoo.js +0 -2
- package/dist/client/assets/ConnectAgentSurface-6FVydN17.js +0 -2
- package/dist/client/assets/DevicePanel-B3CR7kGX.js +0 -2
- package/dist/client/assets/DeviceSetup-Lxy9dmqi.js +0 -2
- package/dist/client/assets/DialogTitle-5cBExuFs.js +0 -2
- package/dist/client/assets/DiffPanel-KfudIZct.js +0 -2
- package/dist/client/assets/Input-DWc7cRWt.js +0 -2
- package/dist/client/assets/JZOYTAAL-BqUoPKcz.js +0 -1
- package/dist/client/assets/LinkMachineSelect-DoqwB0AR.js +0 -2
- package/dist/client/assets/P4ConnectAccountPages-Ca1o0JuS.js +0 -2
- package/dist/client/assets/PanelLayoutControls-CoWjUmx7.js +0 -216
- package/dist/client/assets/PreviewPanel-BHj7Mvmn.js +0 -2
- package/dist/client/assets/ProviderModelPicker-DQ3N8RWz.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-BTwbK3zR.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-CYsCxleQ.js +0 -23
- package/dist/client/assets/ScheduledTasksSettings-CpfGXMow.js +0 -6
- package/dist/client/assets/ThreadTerminalDrawer-PkBB7D3Z.js +0 -5
- package/dist/client/assets/TooltipProvider-DiV5KdTq.js +0 -2
- package/dist/client/assets/_chat-PsMoIPUC.js +0 -47
- package/dist/client/assets/_chat.design-CWE-keji.js +0 -2
- package/dist/client/assets/_chat.pull-requests-C90JBKAN.js +0 -2
- package/dist/client/assets/alert-dialog-DsMTn0ZK.js +0 -2
- package/dist/client/assets/assets-5kUNv3CS.js +0 -2
- package/dist/client/assets/combobox-D6RfzdE7.js +0 -2
- package/dist/client/assets/command-1dJ-vX2N.js +0 -2
- package/dist/client/assets/connect-agent-B22xdP4o.js +0 -2
- package/dist/client/assets/dialog-5OaxRXCC.js +0 -2
- package/dist/client/assets/entities-DOpLfnwX.js +0 -2
- package/dist/client/assets/main-C04YJQbN.js +0 -38
- package/dist/client/assets/main-i3nSjwXu.css +0 -2
- package/dist/client/assets/mediaReference-D4rhlY-i.js +0 -2
- package/dist/client/assets/number-field-BkDsfSCt.js +0 -2
- package/dist/client/assets/openFileInPreview-XKgvCQ1z.js +0 -2
- package/dist/client/assets/popover-hyDlWUPU.js +0 -2
- package/dist/client/assets/primary-BXI66byW.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-DswWb__m.js +0 -2
- package/dist/client/assets/projectScriptEditor-DvKvgTs-.js +0 -2
- package/dist/client/assets/pullRequestDetail.logic-DQj9l9DL.js +0 -10
- package/dist/client/assets/queries-BA_altUI.js +0 -2
- package/dist/client/assets/relay-CTdDIWLg.js +0 -2
- package/dist/client/assets/runtime-BvdQMwVb.js +0 -7
- package/dist/client/assets/session-logic-2ZMapwqV.js +0 -27
- package/dist/client/assets/settings.archived-BF0zdtbV.js +0 -2
- package/dist/client/assets/settings.connections-CoxujVuf.js +0 -2
- package/dist/client/assets/settings.diagnostics-CwCeo1mG.js +0 -2
- package/dist/client/assets/settings.integrations-2RsLmeUi.js +0 -2
- package/dist/client/assets/settings.providers-4HI8om0T.js +0 -3
- package/dist/client/assets/settings.storage-Cy6oX7X3.js +0 -2
- package/dist/client/assets/settingsLayout-YTaL8Lym.js +0 -3
- package/dist/client/assets/sidebar-4oe_dr6q.js +0 -2
- package/dist/client/assets/src-R7EkrVcv.js +0 -15
- package/dist/client/assets/terminal-links-BdsGDJ3O.js +0 -2
- package/dist/client/assets/terminalSessions-yZRa64tn.js +0 -2
- package/dist/client/assets/usage-CdxC8YNe.js +0 -2
- package/dist/client/assets/useHandleNewThread-Cv_08eER.js +0 -2
- package/dist/client/assets/usePullRequestActions-BHv9tRFF.js +0 -3
- package/dist/client/assets/useSettings-BhGGZc98.js +0 -3
- package/dist/client/assets/utils-DkKLB01I.js +0 -24
- package/dist/client/assets/vcsRefInvalidation-71d-99uY.js +0 -2
- package/dist/client/assets/welcome-Ytf7jmR7.js +0 -2
|
@@ -1,36 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { $ as
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Exposes the global number constructor.
|
|
7
|
-
*
|
|
8
|
-
* **When to use**
|
|
9
|
-
*
|
|
10
|
-
* Use to access native JavaScript numeric coercion from the Effect module
|
|
11
|
-
* namespace.
|
|
12
|
-
*
|
|
13
|
-
* **Gotchas**
|
|
14
|
-
*
|
|
15
|
-
* This follows native `Number` coercion rules, including empty strings
|
|
16
|
-
* becoming `0` and invalid numeric strings becoming `NaN`.
|
|
17
|
-
*
|
|
18
|
-
* @see {@link parse} for parsing strings into an `Option`
|
|
19
|
-
*
|
|
20
|
-
* **Example** (Coercing values to numbers)
|
|
21
|
-
*
|
|
22
|
-
* ```ts import.meta.vitest
|
|
23
|
-
* import { Number as N } from "effect"
|
|
24
|
-
*
|
|
25
|
-
* N.Number("42") // => 42
|
|
26
|
-
* N.Number("3.14") // => 3.14
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @stability stable
|
|
30
|
-
* @category constructors
|
|
31
|
-
* @since 4.0.0
|
|
32
|
-
*/
|
|
33
|
-
const Number$1 = globalThis.Number;
|
|
3
|
+
import { $a as fiberInterruptAs, $l as equals, $r as addFinalizerExit, $s as isArray, $t as runForkWith, Ai as die$4, Ao as void_$1, Bi as succeed$3, Bu as constant, Cc as isFailure$1, Cl as exitFailCause, Co as succeedNone, Cr as isDoneCause, D as context, Dl as makePrimitive, Ds as empty$3, Ea as squash, Ei as makeUnsafe$3, El as isExit, Eo as sync$1, Er as Clock, Et as mapError$2, F as exit, Fa as causeInterrupt, Fi as interrupt$2, Fn as whileLoop$1, Ft as onExitPrimitive$1, Ga as exitZipRight, Gc as isNone, Gl as normalize, Gn as yieldNow, H as filterMapEffect$1, Ha as exitInterrupt$1, Hi as Done$1, Hs as empty$2, I as fail$3, It as onInterrupt, J as flatMap$2, Ka as fiberAwait, Kl as normalizeNonEmpty, L as failCause$3, Li as isFailure, Ln as withFiber, Lu as constTrue, M as die$3, Ma as as$1, Mi as failCause$4, Mt as never, Na as asSome, Nn as void_, Nt as onError, O as contextWith, Ol as withFiber$1, Oo as uninterruptibleMask, Os as get, P as ensuring$2, Pa as callback$2, Pl as toJson, Pn as when, Pt as onExit$1, Q as fnUntraced, Qa as fiberInterruptAllAs, Qc as none, Qi as done, Qr as addFinalizer, Qs as getUnsafe, Qt as runFork, Ri as isSuccess$1, Sl as exitFail, So as succeed$4, Sr as filterDone, St as map$2, T as catch_$2, Tc as isSuccess, To as suspend$3, Ut as provideContext$2, Uu as identity, V as filter$3, Vi as void_$2, Vt as promise, Vu as dual, Wa as exitVoid, Wt as provideService$2, X as flatten$2, Xa as fiberInterrupt, Xc as map$4, Y as flatMapEager, Yu as pipeArguments, Za as fiberInterruptAll, Zi as die$2, Zr as Scope, Zs as fromIterable$1, _i as doneUnsafe, _l as args, _r as toStep, _t as logError, ai as makeUnsafe$2, ar as CurrentMetadata, bi as interruptWith, bo as scopeAddFinalizer, br as catchDone, bs as toMillis, ca as hasInterruptsOnly, cs as isFinite, ct as gen, d as asSome$1, da as isCause, dn as succeed$2, do as makeLatch, dt as interrupt$3, ec as isArrayNonEmpty, ei as close, el as some, en as runPromise, eo as fiberJoin, et as forEach$1, f as asVoid, fn as succeedNone$1, fo as makeLatchUnsafe, g as catchCause$2, gc as headUnsafe, gl as PipeInspectableProto, gn as tap$1, go as onExitUnsafe, gr as spaced, h as callback$1, hn as sync, ho as onExitPrimitive, ia as fromReasons, ic as lastNonEmpty, il as Number$2, is as fromInputUnsafe, it as forkIn, j as delay, ja as andThen$1, ji as fail$4, jo as whileLoop, ki as asVoidAll, kn as uninterruptible, kt as matchCauseEffect, ku as isTagged, lc as of, ml as Done, mn as suspend$2, nc as isReadonlyArrayNonEmpty, no as findRecoverableError, nt as forkChild, o as andThen, oa as hasFails, oi as provide, oo as getCurrentFiber, pa as isDone, pn as succeedSome, pu as hasProperty, qa as fiberAwaitAll, qc as isSome, qt as raceFirst, rc as last$1, ri as forkUnsafe, ro as flatMap$3, sc as map$3, sn as scopedWith, so as ignoreCauseLogger, tn as runPromiseWith, to as fiberRunIn, tt as forever$2, u as as, un as sleep, us as isZero, ut as ignoreCause, vl as causeFail, vr as toStepWithMetadata, wl as exitSucceed, wn as tryPromise, wr as matchEffect, xl as evaluate, xr as doneExitFromCause, xu as isNotUndefined, yn as tapError$2, yo as scope, zu as constVoid } from "./Effect-BrI3bavz.mjs";
|
|
4
|
+
globalThis.Number;
|
|
34
5
|
/**
|
|
35
6
|
* Order instance for `number` values.
|
|
36
7
|
*
|
|
@@ -75,43 +46,8 @@ const Order = Number$2;
|
|
|
75
46
|
* @since 2.0.0
|
|
76
47
|
*/
|
|
77
48
|
const nextPow2 = (n) => {
|
|
78
|
-
const nextPow = Math.
|
|
79
|
-
return Math.max(
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* Parses a `number` from a `string` safely using the `Number()` function.
|
|
83
|
-
* The following special string values are supported: "NaN", "Infinity", "-Infinity".
|
|
84
|
-
*
|
|
85
|
-
* **When to use**
|
|
86
|
-
*
|
|
87
|
-
* Use to parse numeric text without throwing on invalid input.
|
|
88
|
-
*
|
|
89
|
-
* **Example** (Parsing numbers from strings)
|
|
90
|
-
*
|
|
91
|
-
* ```ts import.meta.vitest
|
|
92
|
-
* import { Number, Option } from "effect"
|
|
93
|
-
*
|
|
94
|
-
* Number.parse("42") // => Option.some(42)
|
|
95
|
-
* Number.parse("3.14") // => Option.some(3.14)
|
|
96
|
-
* Number.parse("NaN") // => Option.some(NaN)
|
|
97
|
-
* Number.parse("Infinity") // => Option.some(Infinity)
|
|
98
|
-
* Number.parse("-Infinity") // => Option.some(-Infinity)
|
|
99
|
-
* Number.parse("not a number") // => Option.none()
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* @see {@link Number} for native constructor coercion
|
|
103
|
-
*
|
|
104
|
-
* @stability stable
|
|
105
|
-
* @category constructors
|
|
106
|
-
* @since 2.0.0
|
|
107
|
-
*/
|
|
108
|
-
const parse = (s) => {
|
|
109
|
-
if (s === "NaN") return some(NaN);
|
|
110
|
-
if (s === "Infinity") return some(Infinity);
|
|
111
|
-
if (s === "-Infinity") return some(-Infinity);
|
|
112
|
-
if (s.trim() === "") return none();
|
|
113
|
-
const n = Number$1(s);
|
|
114
|
-
return Number$1.isNaN(n) ? none() : some(n);
|
|
49
|
+
const nextPow = Math.pow(2, Math.ceil(Math.log2(n)));
|
|
50
|
+
return Math.max(nextPow < n ? nextPow * 2 : nextPow, 2);
|
|
115
51
|
};
|
|
116
52
|
/**
|
|
117
53
|
* Returns the number rounded with the given precision.
|
|
@@ -137,7 +73,7 @@ const round = /*#__PURE__*/ dual(2, (self, precision) => {
|
|
|
137
73
|
const factor = Math.pow(10, precision);
|
|
138
74
|
return Math.round(self * factor) / factor;
|
|
139
75
|
});
|
|
140
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
76
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
141
77
|
const await_ = fiberAwait;
|
|
142
78
|
/**
|
|
143
79
|
* Waits for all fibers in the provided iterable to complete and returns
|
|
@@ -438,7 +374,7 @@ const getCurrent = getCurrentFiber;
|
|
|
438
374
|
* @since 4.0.0
|
|
439
375
|
*/
|
|
440
376
|
const runIn = fiberRunIn;
|
|
441
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
377
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Latch.js
|
|
442
378
|
/**
|
|
443
379
|
* Creates a `Latch` synchronously, outside of `Effect`.
|
|
444
380
|
*
|
|
@@ -510,7 +446,7 @@ const makeUnsafe$1 = makeLatchUnsafe;
|
|
|
510
446
|
* @since 4.0.0
|
|
511
447
|
*/
|
|
512
448
|
const make$6 = makeLatch;
|
|
513
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
449
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/MutableRef.js
|
|
514
450
|
const TypeId$6 = "~effect/MutableRef";
|
|
515
451
|
const MutableRefProto = {
|
|
516
452
|
[TypeId$6]: TypeId$6,
|
|
@@ -615,7 +551,7 @@ const set = /*#__PURE__*/ dual(2, (self, value) => {
|
|
|
615
551
|
self.current = value;
|
|
616
552
|
return self;
|
|
617
553
|
});
|
|
618
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
554
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/MutableList.js
|
|
619
555
|
/**
|
|
620
556
|
* Mutable lists for collecting ordered values and draining them from the front.
|
|
621
557
|
* A `MutableList<A>` can append values to the end, prepend values to the
|
|
@@ -756,7 +692,9 @@ const prepend = (self, message) => {
|
|
|
756
692
|
};
|
|
757
693
|
/**
|
|
758
694
|
* Appends all elements from an iterable to the end of the MutableList.
|
|
759
|
-
* Returns the number of elements added.
|
|
695
|
+
* Returns the number of elements added. The elements are copied, so the input
|
|
696
|
+
* can be reused afterward. Use `appendAllUnsafe` to transfer ownership of an
|
|
697
|
+
* array instead.
|
|
760
698
|
*
|
|
761
699
|
* **Example** (Appending multiple elements)
|
|
762
700
|
*
|
|
@@ -776,7 +714,7 @@ const prepend = (self, message) => {
|
|
|
776
714
|
* @category mutations
|
|
777
715
|
* @since 4.0.0
|
|
778
716
|
*/
|
|
779
|
-
const appendAll = (self, messages) => appendAllUnsafe(self,
|
|
717
|
+
const appendAll = (self, messages) => appendAllUnsafe(self, Array.from(messages), true);
|
|
780
718
|
/**
|
|
781
719
|
* Appends all elements from a ReadonlyArray to the end of the MutableList.
|
|
782
720
|
* This is an optimized version that can reuse the array when mutable=true.
|
|
@@ -1039,7 +977,7 @@ const filter$2 = (self, f) => {
|
|
|
1039
977
|
* @since 4.0.0
|
|
1040
978
|
*/
|
|
1041
979
|
const remove = (self, value) => filter$2(self, (v) => v !== value);
|
|
1042
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
980
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/PubSub.js
|
|
1043
981
|
/**
|
|
1044
982
|
* Broadcasts values from publishers to many subscribers.
|
|
1045
983
|
*
|
|
@@ -2388,8 +2326,12 @@ var ReplayBuffer = class {
|
|
|
2388
2326
|
next: null
|
|
2389
2327
|
};
|
|
2390
2328
|
this.tail = this.tail.next;
|
|
2391
|
-
if (this.size === this.capacity)
|
|
2392
|
-
|
|
2329
|
+
if (this.size === this.capacity) {
|
|
2330
|
+
const dropped = this.head;
|
|
2331
|
+
this.head = dropped.next;
|
|
2332
|
+
dropped.next = null;
|
|
2333
|
+
dropped.value = AbsentValue;
|
|
2334
|
+
} else this.size += 1;
|
|
2393
2335
|
return index;
|
|
2394
2336
|
}
|
|
2395
2337
|
offerAll(as) {
|
|
@@ -2462,7 +2404,7 @@ const emptyReplayWindow = {
|
|
|
2462
2404
|
takeAll: () => [],
|
|
2463
2405
|
close: () => void 0
|
|
2464
2406
|
};
|
|
2465
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
2407
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Queue.js
|
|
2466
2408
|
/**
|
|
2467
2409
|
* Passes values asynchronously between fibers.
|
|
2468
2410
|
*
|
|
@@ -2735,7 +2677,10 @@ const unbounded = () => make$2();
|
|
|
2735
2677
|
*/
|
|
2736
2678
|
const offer = /*#__PURE__*/ dual(2, (self, message) => suspend$3(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
|
|
2737
2679
|
/**
|
|
2738
|
-
* Adds a message to the queue synchronously. Returns `false`
|
|
2680
|
+
* Adds a message to the queue synchronously. Returns `false` without adding the
|
|
2681
|
+
* message if the queue is closing or done, or if it is full with a non-sliding
|
|
2682
|
+
* strategy (`"suspend"` or `"dropping"`). A queue with non-positive capacity can
|
|
2683
|
+
* still accept a message when a taker is waiting.
|
|
2739
2684
|
*
|
|
2740
2685
|
* **When to use**
|
|
2741
2686
|
*
|
|
@@ -3692,7 +3637,7 @@ const finalize = (self, exit) => {
|
|
|
3692
3637
|
for (const awaiter of openState.awaiters) awaiter(exit);
|
|
3693
3638
|
openState.awaiters.clear();
|
|
3694
3639
|
};
|
|
3695
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
3640
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Semaphore.js
|
|
3696
3641
|
/**
|
|
3697
3642
|
* Creates a `Semaphore` synchronously with the specified total
|
|
3698
3643
|
* number of permits.
|
|
@@ -3734,17 +3679,34 @@ const finalize = (self, exit) => {
|
|
|
3734
3679
|
* @since 4.0.0
|
|
3735
3680
|
*/
|
|
3736
3681
|
const makeUnsafe = (permits) => new SemaphoreImpl(permits);
|
|
3737
|
-
const
|
|
3738
|
-
if (self.free
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3682
|
+
const firstAvailableWaiter = (self) => {
|
|
3683
|
+
for (const waiter of self.waiters) if (waiter.permits <= self.free) return waiter;
|
|
3684
|
+
};
|
|
3685
|
+
const takePermits = (self, n, onAcquire, restore = identity) => withFiber$1((fiber) => {
|
|
3686
|
+
if (self.free >= n && firstAvailableWaiter(self) === void 0) {
|
|
3687
|
+
self.taken += n;
|
|
3688
|
+
return onAcquire();
|
|
3689
|
+
}
|
|
3690
|
+
const waiter = {
|
|
3691
|
+
permits: n,
|
|
3692
|
+
resume: void 0
|
|
3743
3693
|
};
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3694
|
+
const remove = () => {
|
|
3695
|
+
if (self.waiters.delete(waiter)) self.releaseUnsafe(fiber, 0);
|
|
3696
|
+
};
|
|
3697
|
+
self.waiters.add(waiter);
|
|
3698
|
+
onExitUnsafe(fiber, remove);
|
|
3699
|
+
const wait = restore(callback$2((resume) => {
|
|
3700
|
+
if (firstAvailableWaiter(self) === waiter) resume(void_$1);
|
|
3701
|
+
else waiter.resume = resume;
|
|
3702
|
+
}));
|
|
3703
|
+
const loop = flatMap$3(wait, () => {
|
|
3704
|
+
if (firstAvailableWaiter(self) !== waiter) return loop;
|
|
3705
|
+
self.taken += n;
|
|
3706
|
+
remove();
|
|
3707
|
+
return onAcquire();
|
|
3747
3708
|
});
|
|
3709
|
+
return loop;
|
|
3748
3710
|
});
|
|
3749
3711
|
var SemaphoreImpl = class {
|
|
3750
3712
|
waiters = /*#__PURE__*/ new Set();
|
|
@@ -3757,12 +3719,10 @@ var SemaphoreImpl = class {
|
|
|
3757
3719
|
return this.permits - this.taken;
|
|
3758
3720
|
}
|
|
3759
3721
|
take(n) {
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
});
|
|
3765
|
-
return take;
|
|
3722
|
+
return takePermits(this, n, () => succeed$4(n));
|
|
3723
|
+
}
|
|
3724
|
+
takeScoped(n) {
|
|
3725
|
+
return uninterruptibleMask((restore) => flatMap$3(scope, (scope) => takePermits(this, n, () => scopeAddFinalizer(scope, this.release(n)), restore)));
|
|
3766
3726
|
}
|
|
3767
3727
|
takeIfAvailable(n) {
|
|
3768
3728
|
return suspend$3(() => {
|
|
@@ -3774,9 +3734,13 @@ var SemaphoreImpl = class {
|
|
|
3774
3734
|
releaseUnsafe(fiber, n) {
|
|
3775
3735
|
this.taken -= n;
|
|
3776
3736
|
if (this.waiters.size > 0) fiber.currentDispatcher.scheduleTask(() => {
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3737
|
+
let remaining = this.free;
|
|
3738
|
+
for (const waiter of Array.from(this.waiters)) {
|
|
3739
|
+
if (!this.waiters.has(waiter) || waiter.permits > remaining) continue;
|
|
3740
|
+
remaining -= waiter.permits;
|
|
3741
|
+
const resume = waiter.resume;
|
|
3742
|
+
waiter.resume = void 0;
|
|
3743
|
+
resume?.(void_$1);
|
|
3780
3744
|
}
|
|
3781
3745
|
}, 0);
|
|
3782
3746
|
return this.free;
|
|
@@ -3796,19 +3760,9 @@ var SemaphoreImpl = class {
|
|
|
3796
3760
|
return withFiber$1((fiber) => succeed$4(this.releaseUnsafe(fiber, this.taken)));
|
|
3797
3761
|
}
|
|
3798
3762
|
withPermits(n) {
|
|
3799
|
-
return (self) => uninterruptibleMask((restore) => {
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
const wait = waitForPermits(this, n, void_$1);
|
|
3803
|
-
return flatMap$3(restore(wait), () => acquire);
|
|
3804
|
-
}
|
|
3805
|
-
this.taken += n;
|
|
3806
|
-
return onExitPrimitive(restore(self), () => {
|
|
3807
|
-
this.releaseUnsafe(getCurrentFiber(), n);
|
|
3808
|
-
}, true);
|
|
3809
|
-
});
|
|
3810
|
-
return acquire;
|
|
3811
|
-
});
|
|
3763
|
+
return (self) => uninterruptibleMask((restore) => takePermits(this, n, () => onExitPrimitive(restore(self), () => {
|
|
3764
|
+
this.releaseUnsafe(getCurrentFiber(), n);
|
|
3765
|
+
}, true), restore));
|
|
3812
3766
|
}
|
|
3813
3767
|
withPermit = /*#__PURE__*/ this.withPermits(1);
|
|
3814
3768
|
withPermitsIfAvailable(n) {
|
|
@@ -3857,7 +3811,7 @@ var SemaphoreImpl = class {
|
|
|
3857
3811
|
* @since 4.0.0
|
|
3858
3812
|
*/
|
|
3859
3813
|
const make$1 = (permits) => sync$1(() => new SemaphoreImpl(permits));
|
|
3860
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
3814
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Channel.js
|
|
3861
3815
|
/**
|
|
3862
3816
|
* Provides low-level building blocks for streaming data through Effect.
|
|
3863
3817
|
*
|
|
@@ -4042,7 +3996,7 @@ const DefaultChunkSize = 4096;
|
|
|
4042
3996
|
const asyncQueue = (scope, f, options) => make$2({
|
|
4043
3997
|
capacity: options?.bufferSize,
|
|
4044
3998
|
strategy: options?.strategy
|
|
4045
|
-
}).pipe(tap$1((queue) => addFinalizer(scope, shutdown(queue))), tap$1((queue) => provide(f(queue), scope).pipe(catchCause$2((cause) => failCause$2(queue, cause)), forkIn(scope))));
|
|
3999
|
+
}).pipe(tap$1((queue) => addFinalizer(scope, shutdown(queue))), tap$1((queue) => provide(f(queue), scope).pipe(catchCause$2((cause) => failCause$2(queue, cause)), forkIn(scope, { startImmediately: true }))));
|
|
4046
4000
|
/**
|
|
4047
4001
|
* Creates a `Channel` that interacts with a callback function using a queue, emitting arrays.
|
|
4048
4002
|
*
|
|
@@ -4181,15 +4135,15 @@ const fromIteratorArray = (iterator, chunkSize = DefaultChunkSize) => {
|
|
|
4181
4135
|
const size = normalizeNonEmpty(chunkSize);
|
|
4182
4136
|
return fromPull$1(sync(() => {
|
|
4183
4137
|
const iter = iterator();
|
|
4184
|
-
let done$
|
|
4138
|
+
let done$8 = none();
|
|
4185
4139
|
return suspend$2(() => {
|
|
4186
|
-
if (done$
|
|
4140
|
+
if (done$8._tag === "Some") return done(done$8.value);
|
|
4187
4141
|
const buffer = [];
|
|
4188
4142
|
while (buffer.length < size) {
|
|
4189
4143
|
const state = iter.next();
|
|
4190
4144
|
if (state.done) {
|
|
4191
4145
|
if (buffer.length === 0) return done(state.value);
|
|
4192
|
-
done$
|
|
4146
|
+
done$8 = some(state.value);
|
|
4193
4147
|
break;
|
|
4194
4148
|
}
|
|
4195
4149
|
buffer.push(state.value);
|
|
@@ -4342,10 +4296,10 @@ const die$1 = (defect) => failCause$1(die$2(defect));
|
|
|
4342
4296
|
* @since 2.0.0
|
|
4343
4297
|
*/
|
|
4344
4298
|
const fromEffect$1 = (effect) => fromPull$1(sync(() => {
|
|
4345
|
-
let done$
|
|
4299
|
+
let done$9 = false;
|
|
4346
4300
|
return suspend$2(() => {
|
|
4347
|
-
if (done$
|
|
4348
|
-
done$
|
|
4301
|
+
if (done$9) return done();
|
|
4302
|
+
done$9 = true;
|
|
4349
4303
|
return effect;
|
|
4350
4304
|
});
|
|
4351
4305
|
}));
|
|
@@ -4635,6 +4589,12 @@ const fromPubSubArray = (pubsub) => unwrap$2(map$2(subscribe(pubsub), fromSubscr
|
|
|
4635
4589
|
/**
|
|
4636
4590
|
* Creates a channel from a lazily supplied Web `ReadableStream`.
|
|
4637
4591
|
*
|
|
4592
|
+
* **Details**
|
|
4593
|
+
*
|
|
4594
|
+
* Read failures are mapped with `onError`. Finalization cancels the reader and
|
|
4595
|
+
* releases its lock, or only releases the lock when `releaseLockOnEnd` is set.
|
|
4596
|
+
* A rejected cancel hook becomes a defect.
|
|
4597
|
+
*
|
|
4638
4598
|
* **Example** (Reading from a Web stream)
|
|
4639
4599
|
*
|
|
4640
4600
|
* ```ts import.meta.vitest
|
|
@@ -4673,13 +4633,13 @@ const readableStreamToPullUnsafe = (options) => {
|
|
|
4673
4633
|
catch: options.onError
|
|
4674
4634
|
}), {
|
|
4675
4635
|
onFailure: (cause) => exit.current ?? failCause$3(cause),
|
|
4676
|
-
onSuccess: ({ done: done$
|
|
4636
|
+
onSuccess: ({ done: done$11, value }) => {
|
|
4677
4637
|
if (exit.current) return exit.current;
|
|
4678
|
-
return done$
|
|
4638
|
+
return done$11 ? done() : succeed$2(of(value));
|
|
4679
4639
|
}
|
|
4680
4640
|
});
|
|
4681
4641
|
});
|
|
4682
|
-
return as(addFinalizer(options.scope, options.releaseLockOnEnd ? sync(() => reader.releaseLock()) : promise(() => reader.cancel().catch(constVoid))), pull);
|
|
4642
|
+
return as(addFinalizer(options.scope, options.releaseLockOnEnd ? sync(() => reader.releaseLock()) : promise(() => reader.cancel().catch((error) => reader.closed.then(() => Promise.reject(error), constVoid))).pipe(ensuring$2(sync(() => reader.releaseLock())))), pull);
|
|
4683
4643
|
};
|
|
4684
4644
|
/**
|
|
4685
4645
|
* Creates a channel that pulls values from an `AsyncIterable`.
|
|
@@ -4689,7 +4649,9 @@ const readableStreamToPullUnsafe = (options) => {
|
|
|
4689
4649
|
* Each yielded value is emitted as an output element. The iterator's return
|
|
4690
4650
|
* value becomes the channel's done value. Thrown or rejected iterator errors
|
|
4691
4651
|
* are converted with `onError`. If the channel scope closes early and the
|
|
4692
|
-
* iterator has a `return` method, that method is called.
|
|
4652
|
+
* iterator has a `return` method, that method is called. It is awaited unless
|
|
4653
|
+
* a `next()` call is still pending, in which case its result is ignored and an
|
|
4654
|
+
* async generator may not run its cleanup until that pull settles.
|
|
4693
4655
|
*
|
|
4694
4656
|
* @stability stable
|
|
4695
4657
|
* @category constructors
|
|
@@ -4697,9 +4659,16 @@ const readableStreamToPullUnsafe = (options) => {
|
|
|
4697
4659
|
*/
|
|
4698
4660
|
const fromAsyncIterable$1 = (iterable, onError) => fromTransform$1(fnUntraced(function* (_, scope) {
|
|
4699
4661
|
const iter = iterable[Symbol.asyncIterator]();
|
|
4700
|
-
|
|
4662
|
+
let pulling = false;
|
|
4663
|
+
if (iter.return) yield* addFinalizer(scope, suspend$2(() => pulling ? sync(() => void iter.return().catch(constVoid)) : promise(() => iter.return())));
|
|
4701
4664
|
return flatMap$2(tryPromise({
|
|
4702
|
-
try: () =>
|
|
4665
|
+
try: () => {
|
|
4666
|
+
const promise = iter.next();
|
|
4667
|
+
pulling = true;
|
|
4668
|
+
return promise.finally(() => {
|
|
4669
|
+
pulling = false;
|
|
4670
|
+
});
|
|
4671
|
+
},
|
|
4703
4672
|
catch: onError
|
|
4704
4673
|
}), (result) => result.done ? done(result.value) : succeed$2(result.value));
|
|
4705
4674
|
}));
|
|
@@ -4712,6 +4681,9 @@ const fromAsyncIterable$1 = (iterable, onError) => fromTransform$1(fnUntraced(fu
|
|
|
4712
4681
|
* The iterator's return value becomes the channel's done value. Thrown or
|
|
4713
4682
|
* rejected iterator errors are converted with `onError`. If the channel scope
|
|
4714
4683
|
* closes early and the iterator has a `return` method, that method is called.
|
|
4684
|
+
* It is awaited unless a `next()` call is still pending, in which case its
|
|
4685
|
+
* result is ignored and an async generator may not run its cleanup until that
|
|
4686
|
+
* pull settles.
|
|
4715
4687
|
*
|
|
4716
4688
|
* @stability stable
|
|
4717
4689
|
* @category constructors
|
|
@@ -4826,7 +4798,7 @@ const mapEffectSequential = (self, f) => fromTransform$1((upstream, scope) => {
|
|
|
4826
4798
|
const mapEffectConcurrent = (self, f, options) => fromTransformBracket(fnUntraced(function* (upstream, scope, forkedScope) {
|
|
4827
4799
|
let i = 0;
|
|
4828
4800
|
const pull = yield* toTransform(self)(upstream, scope);
|
|
4829
|
-
const concurrencyN = options.concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : options.concurrency;
|
|
4801
|
+
const concurrencyN = options.concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.min(options.concurrency, Number.MAX_SAFE_INTEGER);
|
|
4830
4802
|
const queue = yield* bounded(0);
|
|
4831
4803
|
yield* addFinalizer(forkedScope, shutdown(queue));
|
|
4832
4804
|
const runFork = runForkWith(yield* context());
|
|
@@ -5035,16 +5007,19 @@ const drain$2 = (self) => transformPull$1(self, (pull) => succeed$2(forever$2(pu
|
|
|
5035
5007
|
*/
|
|
5036
5008
|
const repeat$1 = /*#__PURE__*/ dual(2, (self, schedule) => toStepWithMetadata(typeof schedule === "function" ? schedule(identity) : schedule).pipe(map$2((step) => {
|
|
5037
5009
|
let meta = CurrentMetadata.defaultValue();
|
|
5038
|
-
return repeatLoop(provideServiceEffect(self, CurrentMetadata, sync(() => meta)), (
|
|
5010
|
+
return repeatLoop(provideServiceEffect(self, CurrentMetadata, sync(() => meta)), (exit) => isFailure(exit) ? failCause$3(exit.cause) : step(exit.value).pipe(map$2((meta_) => {
|
|
5039
5011
|
meta = meta_;
|
|
5040
|
-
}), catchDone(() => done(
|
|
5012
|
+
}), catchDone(() => done(exit.value))));
|
|
5041
5013
|
}), unwrap$2));
|
|
5042
|
-
const repeatLoop = (self,
|
|
5014
|
+
const repeatLoop = (self, onExit) => fromTransform$1((upstream, scope) => sync(() => {
|
|
5043
5015
|
let currentPull;
|
|
5044
5016
|
const makePull = () => {
|
|
5045
5017
|
const runScope = forkUnsafe(scope);
|
|
5046
5018
|
return flatMap$2(toTransform(self)(upstream, runScope), (pull) => {
|
|
5047
|
-
currentPull =
|
|
5019
|
+
currentPull = catchCause$2(pull, (cause) => {
|
|
5020
|
+
const exit = doneExitFromCause(cause);
|
|
5021
|
+
return close(runScope, exit).pipe(flatMap$2(() => onExit(exit, scope)), flatMap$2(makePull));
|
|
5022
|
+
});
|
|
5048
5023
|
return currentPull;
|
|
5049
5024
|
});
|
|
5050
5025
|
};
|
|
@@ -5057,7 +5032,7 @@ const repeatLoop = (self, onDone) => fromTransform$1((upstream, scope) => sync((
|
|
|
5057
5032
|
* @category repetition
|
|
5058
5033
|
* @since 4.0.0
|
|
5059
5034
|
*/
|
|
5060
|
-
const forever$1 = (self) => repeatLoop(self, () => void_);
|
|
5035
|
+
const forever$1 = (self) => repeatLoop(self, (exit) => isFailure(exit) ? failCause$3(exit.cause) : void_);
|
|
5061
5036
|
/**
|
|
5062
5037
|
* Filters the output elements of a channel using a predicate function.
|
|
5063
5038
|
* Elements that don't match the predicate are discarded.
|
|
@@ -5370,9 +5345,23 @@ const tapCause = /*#__PURE__*/ dual(2, (self, f) => catchCause$1(self, (cause) =
|
|
|
5370
5345
|
*/
|
|
5371
5346
|
const catchCauseFilter = /*#__PURE__*/ dual(3, (self, filter, f) => catchCause$1(self, (cause) => {
|
|
5372
5347
|
const result = filter(cause);
|
|
5373
|
-
return isFailure(result) ? failCause$1(result.failure) : f(result.success, cause);
|
|
5348
|
+
return isFailure$1(result) ? failCause$1(result.failure) : f(result.success, cause);
|
|
5374
5349
|
}));
|
|
5375
|
-
const catch_$1 = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self,
|
|
5350
|
+
const catch_$1 = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self, findRecoverableError, (e) => f(e)));
|
|
5351
|
+
/**
|
|
5352
|
+
* Runs an effect when the channel fails with a typed error, then preserves the
|
|
5353
|
+
* original channel failure.
|
|
5354
|
+
*
|
|
5355
|
+
* **Details**
|
|
5356
|
+
*
|
|
5357
|
+
* The effect is not run for normal channel completion. If the observer effect
|
|
5358
|
+
* fails, that failure can fail the returned channel.
|
|
5359
|
+
*
|
|
5360
|
+
* @stability stable
|
|
5361
|
+
* @category error handling
|
|
5362
|
+
* @since 4.0.0
|
|
5363
|
+
*/
|
|
5364
|
+
const tapError$1 = /*#__PURE__*/ dual(2, (self, f) => transformPull$1(self, (pull) => succeed$2(tapError$2(pull, (err) => isDone(err) ? void_ : asVoid(f(err))))));
|
|
5376
5365
|
/**
|
|
5377
5366
|
* Recovers from typed channel errors that match a predicate or refinement.
|
|
5378
5367
|
*
|
|
@@ -5387,6 +5376,12 @@ const catch_$1 = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self, findE
|
|
|
5387
5376
|
* are handled by `orElse` when provided. Without `orElse`, non-matching errors
|
|
5388
5377
|
* are re-failed.
|
|
5389
5378
|
*
|
|
5379
|
+
* **Gotchas**
|
|
5380
|
+
*
|
|
5381
|
+
* If the cause contains a defect, the handler is skipped and every typed error
|
|
5382
|
+
* is converted to a defect, preserving reason order and interrupts. An
|
|
5383
|
+
* interruption alongside a typed error does not prevent recovery.
|
|
5384
|
+
*
|
|
5390
5385
|
* @see {@link catch_ catch} for recovering from every typed channel error
|
|
5391
5386
|
* @see {@link catchFilter} for selecting typed errors with a `Filter`
|
|
5392
5387
|
* @see {@link catchTag} for selecting tagged typed errors
|
|
@@ -5400,15 +5395,18 @@ const catchIf$1 = /*#__PURE__*/ dual((args) => isChannel(args[0]), (self, predic
|
|
|
5400
5395
|
return predicate(err) ? f(err) : orElse ? orElse(err) : fail$1(err);
|
|
5401
5396
|
}));
|
|
5402
5397
|
/**
|
|
5403
|
-
*
|
|
5404
|
-
*
|
|
5405
|
-
*
|
|
5398
|
+
* Transforms the typed errors of a channel using the specified function.
|
|
5399
|
+
*
|
|
5400
|
+
* **Details**
|
|
5401
|
+
*
|
|
5402
|
+
* Maps every typed error in the cause, preserving defects, interrupts and
|
|
5403
|
+
* reason order. Unlike typed recovery, mapping does not convert errors to defects.
|
|
5406
5404
|
*
|
|
5407
5405
|
* @stability stable
|
|
5408
5406
|
* @category error handling
|
|
5409
5407
|
* @since 2.0.0
|
|
5410
5408
|
*/
|
|
5411
|
-
const mapError$1 = /*#__PURE__*/ dual(2, (self, f) =>
|
|
5409
|
+
const mapError$1 = /*#__PURE__*/ dual(2, (self, f) => transformPull$1(self, (pull) => succeed$2(mapError$2(pull, (err) => isDone(err) ? err : f(err)))));
|
|
5412
5410
|
/**
|
|
5413
5411
|
* Converts all errors in the channel to defects (unrecoverable failures).
|
|
5414
5412
|
* This is useful when you want to treat errors as programming errors.
|
|
@@ -5443,6 +5441,16 @@ const orDie$1 = (self) => catch_$1(self, die$1);
|
|
|
5443
5441
|
* **Details**
|
|
5444
5442
|
*
|
|
5445
5443
|
* Use the `log` option to emit the full {@link Cause} when the channel fails.
|
|
5444
|
+
* Set `log: "Unhandled"` to read `References.UnhandledLogLevel` when the
|
|
5445
|
+
* failure occurs; `undefined` disables logging. Minimum log level filtering
|
|
5446
|
+
* still applies.
|
|
5447
|
+
*
|
|
5448
|
+
* **Gotchas**
|
|
5449
|
+
*
|
|
5450
|
+
* Defects take precedence over typed errors. If the cause also contains a
|
|
5451
|
+
* defect, the failure is not ignored and is propagated with every typed error
|
|
5452
|
+
* converted to a defect. An interruption alongside a typed error does not
|
|
5453
|
+
* prevent the error from being ignored.
|
|
5446
5454
|
*
|
|
5447
5455
|
* @stability stable
|
|
5448
5456
|
* @category error handling
|
|
@@ -5450,13 +5458,19 @@ const orDie$1 = (self) => catch_$1(self, die$1);
|
|
|
5450
5458
|
*/
|
|
5451
5459
|
const ignore$1 = /*#__PURE__*/ dual((args) => isChannel(args[0]), (self, options) => {
|
|
5452
5460
|
if (!options?.log) return catch_$1(self, () => empty$1);
|
|
5453
|
-
const logEffect =
|
|
5461
|
+
const logEffect = ignoreCauseLogger(options.log);
|
|
5454
5462
|
return catch_$1(tapCause(self, (cause) => hasFails(cause) ? logEffect(cause) : void_), () => empty$1);
|
|
5455
5463
|
});
|
|
5456
5464
|
/**
|
|
5457
5465
|
* Returns a new channel that retries this channel according to the specified
|
|
5458
5466
|
* schedule whenever it fails.
|
|
5459
5467
|
*
|
|
5468
|
+
* **Gotchas**
|
|
5469
|
+
*
|
|
5470
|
+
* Defects take precedence over typed errors. A failure whose cause contains a
|
|
5471
|
+
* defect is not retried and is propagated with every typed error converted to a
|
|
5472
|
+
* defect. A typed error alongside an interruption is retried.
|
|
5473
|
+
*
|
|
5460
5474
|
* @stability stable
|
|
5461
5475
|
* @category error handling
|
|
5462
5476
|
* @since 4.0.0
|
|
@@ -5470,12 +5484,15 @@ const retry$1 = /*#__PURE__*/ dual(2, (self, schedule) => suspend$1(() => {
|
|
|
5470
5484
|
return void_;
|
|
5471
5485
|
});
|
|
5472
5486
|
const resolvedSchedule = typeof schedule === "function" ? schedule(identity) : schedule;
|
|
5473
|
-
|
|
5474
|
-
if (
|
|
5475
|
-
|
|
5476
|
-
return
|
|
5477
|
-
|
|
5478
|
-
|
|
5487
|
+
return repeatLoop(withReset, (exit, scope) => {
|
|
5488
|
+
if (isSuccess$1(exit)) return done(exit.value);
|
|
5489
|
+
const error = findRecoverableError(exit.cause);
|
|
5490
|
+
if (isFailure$1(error)) return failCause$3(error.failure);
|
|
5491
|
+
return gen(function* () {
|
|
5492
|
+
if (!step) step = yield* toStepWithMetadata(resolvedSchedule);
|
|
5493
|
+
meta = yield* step(error.success);
|
|
5494
|
+
}).pipe(catchDone(() => fail$3(error.success)), provide(scope));
|
|
5495
|
+
});
|
|
5479
5496
|
}));
|
|
5480
5497
|
/**
|
|
5481
5498
|
* Maps each output element to a channel and emits values from the most recent
|
|
@@ -5558,7 +5575,7 @@ const mergeAll$1 = /*#__PURE__*/ dual(2, (channels, { bufferSize = 16, concurren
|
|
|
5558
5575
|
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : Math.max(1, concurrency);
|
|
5559
5576
|
const semaphore = switch_ ? void 0 : makeUnsafe(concurrencyN);
|
|
5560
5577
|
const doneLatch = yield* make$6(true);
|
|
5561
|
-
const fibers = /* @__PURE__ */ new
|
|
5578
|
+
const fibers = /* @__PURE__ */ new Map();
|
|
5562
5579
|
const queue = yield* bounded(bufferSize);
|
|
5563
5580
|
yield* addFinalizer(forkedScope, shutdown(queue));
|
|
5564
5581
|
const pull = yield* toTransform(channels)(upstream, scope);
|
|
@@ -5576,23 +5593,24 @@ const mergeAll$1 = /*#__PURE__*/ dual(2, (channels, { bufferSize = 16, concurren
|
|
|
5576
5593
|
const childScope = forkUnsafe(forkedScope);
|
|
5577
5594
|
const childPull = yield* toTransform(channel)(upstream, childScope);
|
|
5578
5595
|
while (fibers.size >= concurrencyN) {
|
|
5579
|
-
const fiber = headUnsafe(fibers);
|
|
5596
|
+
const [fiber, fiberScope] = headUnsafe(fibers);
|
|
5580
5597
|
fibers.delete(fiber);
|
|
5581
5598
|
if (fibers.size === 0) yield* doneLatch.open;
|
|
5582
5599
|
yield* interrupt$1(fiber);
|
|
5600
|
+
yield* ignoreCause(close(fiberScope, interrupt$2()));
|
|
5583
5601
|
}
|
|
5584
5602
|
const fiber = yield* childPull.pipe(tap$1(() => yieldNow), flatMap$2((value) => offer(queue, value)), forever$2({ disableYield: true }), onError(fnUntraced(function* (cause) {
|
|
5585
5603
|
const exit$1 = doneExitFromCause(cause);
|
|
5586
5604
|
const closeExit = yield* exit(close(childScope, exit$1));
|
|
5587
5605
|
if (!fibers.has(fiber)) return;
|
|
5588
5606
|
const failure = asVoidAll([exit$1, closeExit]);
|
|
5589
|
-
if (isFailure
|
|
5607
|
+
if (isFailure(failure)) yield* failCause$2(queue, failure.cause);
|
|
5590
5608
|
fibers.delete(fiber);
|
|
5591
5609
|
if (semaphore) yield* semaphore.release(1);
|
|
5592
5610
|
if (fibers.size === 0) yield* doneLatch.open;
|
|
5593
5611
|
})), forkChild);
|
|
5594
5612
|
doneLatch.closeUnsafe();
|
|
5595
|
-
fibers.
|
|
5613
|
+
fibers.set(fiber, childScope);
|
|
5596
5614
|
}
|
|
5597
5615
|
}).pipe(catchCause$2((cause) => {
|
|
5598
5616
|
const halt = filterDone(cause);
|
|
@@ -5649,6 +5667,25 @@ const merge$1 = /*#__PURE__*/ dual((args) => isChannel(args[0]) && isChannel(arg
|
|
|
5649
5667
|
return take$1(queue);
|
|
5650
5668
|
})));
|
|
5651
5669
|
/**
|
|
5670
|
+
* Runs an effect concurrently with a channel while emitting only the channel's
|
|
5671
|
+
* output elements.
|
|
5672
|
+
*
|
|
5673
|
+
* **When to use**
|
|
5674
|
+
*
|
|
5675
|
+
* Use when a side effect should run for the lifetime of a channel and only the
|
|
5676
|
+
* channel's output elements should be emitted.
|
|
5677
|
+
*
|
|
5678
|
+
* **Details**
|
|
5679
|
+
*
|
|
5680
|
+
* The effect's successful value is ignored. If the effect fails while the
|
|
5681
|
+
* channel is running, the returned channel fails with that error.
|
|
5682
|
+
*
|
|
5683
|
+
* @stability stable
|
|
5684
|
+
* @category combining
|
|
5685
|
+
* @since 4.0.0
|
|
5686
|
+
*/
|
|
5687
|
+
const mergeEffect$1 = /*#__PURE__*/ dual(2, (self, effect) => merge$1(self, fromEffectDrain$1(effect), { haltStrategy: "left" }));
|
|
5688
|
+
/**
|
|
5652
5689
|
* Splits upstream string chunks into lines, recognizing `\n`, `\r\n`, and
|
|
5653
5690
|
* standalone `\r` as line terminators. The behavior matches
|
|
5654
5691
|
* `String.linesIterator` regardless of how the input is chunked.
|
|
@@ -5678,7 +5715,7 @@ const merge$1 = /*#__PURE__*/ dual((args) => isChannel(args[0]) && isChannel(arg
|
|
|
5678
5715
|
const splitLines$1 = () => fromTransform$1((upstream, _scope) => sync(() => {
|
|
5679
5716
|
let stringBuilder = "";
|
|
5680
5717
|
let midCRLF = false;
|
|
5681
|
-
let done$
|
|
5718
|
+
let done$10 = none();
|
|
5682
5719
|
function splitLinesArray(chunk) {
|
|
5683
5720
|
const chunkBuilder = [];
|
|
5684
5721
|
function pushLine(segment) {
|
|
@@ -5723,12 +5760,12 @@ const splitLines$1 = () => fromTransform$1((upstream, _scope) => sync(() => {
|
|
|
5723
5760
|
return isReadonlyArrayNonEmpty(chunkBuilder) ? chunkBuilder : null;
|
|
5724
5761
|
}
|
|
5725
5762
|
const pullOrFlush = suspend$2(() => {
|
|
5726
|
-
if (done$
|
|
5763
|
+
if (done$10._tag === "Some") return done(done$10.value);
|
|
5727
5764
|
return matchEffect(upstream, {
|
|
5728
5765
|
onSuccess: loop,
|
|
5729
5766
|
onFailure: failCause$3,
|
|
5730
5767
|
onDone: (leftover) => {
|
|
5731
|
-
done$
|
|
5768
|
+
done$10 = some(leftover);
|
|
5732
5769
|
if (stringBuilder.length > 0) {
|
|
5733
5770
|
const last = stringBuilder;
|
|
5734
5771
|
stringBuilder = "";
|
|
@@ -5751,8 +5788,9 @@ const splitLines$1 = () => fromTransform$1((upstream, _scope) => sync(() => {
|
|
|
5751
5788
|
* **Details**
|
|
5752
5789
|
*
|
|
5753
5790
|
* Input chunks are decoded with streaming enabled so multi-byte characters may
|
|
5754
|
-
* span `Uint8Array` boundaries.
|
|
5755
|
-
*
|
|
5791
|
+
* span `Uint8Array` boundaries. On normal completion, incomplete trailing
|
|
5792
|
+
* characters become U+FFFD or, with `fatal: true`, a defect. The optional
|
|
5793
|
+
* `encoding` and `options` are passed to `TextDecoder`.
|
|
5756
5794
|
*
|
|
5757
5795
|
* @stability stable
|
|
5758
5796
|
* @category decoding
|
|
@@ -5761,7 +5799,12 @@ const splitLines$1 = () => fromTransform$1((upstream, _scope) => sync(() => {
|
|
|
5761
5799
|
const decodeText$1 = (encoding, options) => fromTransform$1((upstream, _scope) => sync(() => {
|
|
5762
5800
|
const decoder = new TextDecoder(encoding, options);
|
|
5763
5801
|
const streamOptions = { stream: true };
|
|
5764
|
-
|
|
5802
|
+
let pull = upstream.pipe(map$2(map$3((bytes) => decoder.decode(bytes, streamOptions))), catchDone((leftover) => {
|
|
5803
|
+
pull = done(leftover);
|
|
5804
|
+
const last = decoder.decode();
|
|
5805
|
+
return last.length > 0 ? succeed$2(of(last)) : pull;
|
|
5806
|
+
}));
|
|
5807
|
+
return suspend$2(() => pull);
|
|
5765
5808
|
}));
|
|
5766
5809
|
/**
|
|
5767
5810
|
* Returns a new channel that pipes the output of this channel into the
|
|
@@ -5822,10 +5865,21 @@ const pipeTo = /*#__PURE__*/ dual(2, (self, that) => fromTransform$1((upstream,
|
|
|
5822
5865
|
* @category sequencing
|
|
5823
5866
|
* @since 2.0.0
|
|
5824
5867
|
*/
|
|
5825
|
-
const pipeToOrFail = /*#__PURE__*/ dual(2, (self, that) => fromTransform$1((upstream, scope) => flatMap$2(toTransform(self)(upstream, scope), (upstream) =>
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5868
|
+
const pipeToOrFail = /*#__PURE__*/ dual(2, (self, that) => fromTransform$1((upstream, scope) => flatMap$2(toTransform(self)(upstream, scope), (upstream) => map$2(toTransform(that)(upstreamFailureToDefect(upstream), scope), restoreUpstreamFailure))));
|
|
5869
|
+
const isUpstreamFailure = (reason) => reason._tag === "Die" && isDone(reason.defect) && isCause(reason.defect.value);
|
|
5870
|
+
/** @internal */
|
|
5871
|
+
const hasUpstreamFailure = (cause) => cause.reasons.some(isUpstreamFailure);
|
|
5872
|
+
/** @internal */
|
|
5873
|
+
const upstreamFailureToDefect = (pull) => catchCause$2(pull, (cause) => isDoneCause(cause) ? failCause$3(cause) : die$3(Done$1(cause)));
|
|
5874
|
+
/** @internal */
|
|
5875
|
+
const unwrapUpstreamFailure = (cause) => hasUpstreamFailure(cause) ? fromReasons(cause.reasons.flatMap((reason) => isUpstreamFailure(reason) ? reason.defect.value.reasons : [reason])) : cause;
|
|
5876
|
+
/**
|
|
5877
|
+
* The type parameters are explicit because the restored error type includes
|
|
5878
|
+
* the upstream error, which is not part of the input effect's type.
|
|
5879
|
+
*
|
|
5880
|
+
* @internal
|
|
5881
|
+
*/
|
|
5882
|
+
const restoreUpstreamFailure = (effect) => catchCause$2(effect, (cause) => failCause$3(unwrapUpstreamFailure(cause)));
|
|
5829
5883
|
/**
|
|
5830
5884
|
* Constructs a `Channel` from a scoped effect that will result in a
|
|
5831
5885
|
* `Channel` if successful.
|
|
@@ -6304,7 +6358,7 @@ const toPull$1 = /*#__PURE__*/ fnUntraced(function* (self) {
|
|
|
6304
6358
|
* @since 4.0.0
|
|
6305
6359
|
*/
|
|
6306
6360
|
const toPullScoped = (self, scope) => toTransform(self)(done(), scope);
|
|
6307
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
6361
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/internal/stream.js
|
|
6308
6362
|
const TypeId$2 = "~effect/Stream";
|
|
6309
6363
|
const streamVariance = {
|
|
6310
6364
|
_R: identity,
|
|
@@ -6322,7 +6376,7 @@ Stream.prototype = {
|
|
|
6322
6376
|
};
|
|
6323
6377
|
/** @internal */
|
|
6324
6378
|
const fromChannel$2 = (channel) => new Stream(channel);
|
|
6325
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
6379
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Sink.js
|
|
6326
6380
|
const TypeId$1 = "~effect/Sink";
|
|
6327
6381
|
const endVoid = /*#__PURE__*/ succeed$2([void 0]);
|
|
6328
6382
|
const sinkVariance = {
|
|
@@ -6479,7 +6533,7 @@ const take = (n) => {
|
|
|
6479
6533
|
let leftover = void 0;
|
|
6480
6534
|
return upstream.pipe(flatMap$2((arr) => {
|
|
6481
6535
|
if (taken.length + arr.length <= count) {
|
|
6482
|
-
taken.push(
|
|
6536
|
+
for (let i = 0; i < arr.length; i++) taken.push(arr[i]);
|
|
6483
6537
|
if (taken.length === count) return done();
|
|
6484
6538
|
return void_;
|
|
6485
6539
|
}
|
|
@@ -6607,7 +6661,7 @@ const forEachArray = (f) => fromTransform((upstream) => upstream.pipe(flatMap$2(
|
|
|
6607
6661
|
* @since 2.0.0
|
|
6608
6662
|
*/
|
|
6609
6663
|
const unwrap$1 = (effect) => fromChannel$1(unwrap$2(map$2(effect, toChannel$1)));
|
|
6610
|
-
// ../../node_modules/.pnpm/effect@4.
|
|
6664
|
+
// ../../node_modules/.pnpm/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
6611
6665
|
/**
|
|
6612
6666
|
* Describes effectful sources that emit values over time.
|
|
6613
6667
|
*
|
|
@@ -6930,7 +6984,12 @@ const make = (...values) => fromArray(values);
|
|
|
6930
6984
|
* @category constructors
|
|
6931
6985
|
* @since 2.0.0
|
|
6932
6986
|
*/
|
|
6933
|
-
const suspend = (stream) =>
|
|
6987
|
+
const suspend = (stream) => {
|
|
6988
|
+
const suspended = fromChannel(suspend$1(() => stream().channel));
|
|
6989
|
+
suspendedStreams.set(suspended, stream);
|
|
6990
|
+
return suspended;
|
|
6991
|
+
};
|
|
6992
|
+
const suspendedStreams = /*#__PURE__*/ new WeakMap();
|
|
6934
6993
|
/**
|
|
6935
6994
|
* Terminates with the specified error.
|
|
6936
6995
|
*
|
|
@@ -7144,9 +7203,10 @@ const fromPubSub = (pubsub) => fromChannel(fromPubSubArray(pubsub));
|
|
|
7144
7203
|
*
|
|
7145
7204
|
* **Details**
|
|
7146
7205
|
*
|
|
7147
|
-
* The stream reads from a `ReadableStreamDefaultReader
|
|
7148
|
-
* with `onError
|
|
7149
|
-
*
|
|
7206
|
+
* The stream reads from a `ReadableStreamDefaultReader` and maps read failures
|
|
7207
|
+
* with `onError`. Finalization cancels the reader and releases its lock, or
|
|
7208
|
+
* only releases the lock when `releaseLockOnEnd` is set. A rejected cancel
|
|
7209
|
+
* hook becomes a defect.
|
|
7150
7210
|
*
|
|
7151
7211
|
* **Example** (Creating a stream from a ReadableStream)
|
|
7152
7212
|
*
|
|
@@ -7314,11 +7374,11 @@ const unfold = (s, f) => fromPull(sync(() => {
|
|
|
7314
7374
|
*/
|
|
7315
7375
|
const paginate = (s, f) => fromPull(sync(() => {
|
|
7316
7376
|
let state = s;
|
|
7317
|
-
let done$
|
|
7377
|
+
let done$1 = false;
|
|
7318
7378
|
return suspend$2(function loop() {
|
|
7319
|
-
if (done$
|
|
7379
|
+
if (done$1) return done();
|
|
7320
7380
|
return flatMap$2(f(state), ([a, s]) => {
|
|
7321
|
-
if (isNone(s)) done$
|
|
7381
|
+
if (isNone(s)) done$1 = true;
|
|
7322
7382
|
else state = s.value;
|
|
7323
7383
|
if (!isReadonlyArrayNonEmpty(a)) return loop();
|
|
7324
7384
|
return succeed$2(a);
|
|
@@ -7401,6 +7461,31 @@ const map = /*#__PURE__*/ dual(2, (self, f) => suspend(() => {
|
|
|
7401
7461
|
return fromChannel(map$1(self.channel, map$3((o) => f(o, i++))));
|
|
7402
7462
|
}));
|
|
7403
7463
|
/**
|
|
7464
|
+
* Transforms each emitted chunk using the provided function, which receives the chunk and its index.
|
|
7465
|
+
*
|
|
7466
|
+
* **Example** (Mapping stream chunks)
|
|
7467
|
+
*
|
|
7468
|
+
* ```ts import.meta.vitest
|
|
7469
|
+
* import { Array, Effect, Stream } from "effect"
|
|
7470
|
+
*
|
|
7471
|
+
* const program = Effect.gen(function*() {
|
|
7472
|
+
* const result = yield* Stream.make(1, 2, 3, 4).pipe(
|
|
7473
|
+
* Stream.rechunk(2),
|
|
7474
|
+
* Stream.mapArray((chunk, index) => Array.map(chunk, (n) => n + index)),
|
|
7475
|
+
* Stream.runCollect
|
|
7476
|
+
* )
|
|
7477
|
+
* result // => [ 1, 2, 4, 5 ]
|
|
7478
|
+
* })
|
|
7479
|
+
*
|
|
7480
|
+
* await Effect.runPromise(program)
|
|
7481
|
+
* ```
|
|
7482
|
+
*
|
|
7483
|
+
* @stability stable
|
|
7484
|
+
* @category mapping
|
|
7485
|
+
* @since 4.0.0
|
|
7486
|
+
*/
|
|
7487
|
+
const mapArray = /*#__PURE__*/ dual(2, (self, f) => fromChannel(map$1(self.channel, f)));
|
|
7488
|
+
/**
|
|
7404
7489
|
* Maps over elements of the stream with the specified effectful function.
|
|
7405
7490
|
*
|
|
7406
7491
|
* **When to use**
|
|
@@ -7612,6 +7697,36 @@ const flatten = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options)
|
|
|
7612
7697
|
*/
|
|
7613
7698
|
const drain = (self) => fromChannel(drain$2(self.channel));
|
|
7614
7699
|
/**
|
|
7700
|
+
* Runs the provided stream in the background while this stream runs, interrupting it
|
|
7701
|
+
* when this stream completes and failing if the background stream fails or defects.
|
|
7702
|
+
*
|
|
7703
|
+
* **Example** (Draining a stream in the background)
|
|
7704
|
+
*
|
|
7705
|
+
* ```ts import.meta.vitest
|
|
7706
|
+
* import { Effect, Stream } from "effect"
|
|
7707
|
+
*
|
|
7708
|
+
* const events: Array<string> = []
|
|
7709
|
+
* const foreground = Stream.make(1, 2)
|
|
7710
|
+
* const background = Stream.fromEffect(Effect.sync(() => events.push("background task")))
|
|
7711
|
+
*
|
|
7712
|
+
* const program = Effect.gen(function*() {
|
|
7713
|
+
* const values = yield* foreground.pipe(
|
|
7714
|
+
* Stream.drainFork(background),
|
|
7715
|
+
* Stream.runCollect
|
|
7716
|
+
* )
|
|
7717
|
+
* values // => [1, 2]
|
|
7718
|
+
* })
|
|
7719
|
+
*
|
|
7720
|
+
* await Effect.runPromise(program)
|
|
7721
|
+
* events // => ["background task"]
|
|
7722
|
+
* ```
|
|
7723
|
+
*
|
|
7724
|
+
* @stability stable
|
|
7725
|
+
* @category sequencing
|
|
7726
|
+
* @since 2.0.0
|
|
7727
|
+
*/
|
|
7728
|
+
const drainFork = /*#__PURE__*/ dual(2, (self, that) => mergeEffect(self, runDrain(that)));
|
|
7729
|
+
/**
|
|
7615
7730
|
* Repeats the entire stream according to the provided schedule.
|
|
7616
7731
|
*
|
|
7617
7732
|
* **Example** (Repeating a stream on a schedule)
|
|
@@ -7774,8 +7889,21 @@ function* concatChannels(self, that) {
|
|
|
7774
7889
|
while (stack.length > 0) {
|
|
7775
7890
|
const stream = stack.pop();
|
|
7776
7891
|
const parts = concatParts.get(stream);
|
|
7777
|
-
if (parts
|
|
7778
|
-
|
|
7892
|
+
if (parts !== void 0) {
|
|
7893
|
+
stack.push(parts[1], parts[0]);
|
|
7894
|
+
continue;
|
|
7895
|
+
}
|
|
7896
|
+
const evaluate = suspendedStreams.get(stream);
|
|
7897
|
+
if (evaluate === void 0) {
|
|
7898
|
+
yield stream.channel;
|
|
7899
|
+
continue;
|
|
7900
|
+
}
|
|
7901
|
+
try {
|
|
7902
|
+
stack.push(evaluate());
|
|
7903
|
+
} catch (defect) {
|
|
7904
|
+
stack.push(die(defect));
|
|
7905
|
+
}
|
|
7906
|
+
yield empty$1;
|
|
7779
7907
|
}
|
|
7780
7908
|
}
|
|
7781
7909
|
/**
|
|
@@ -7808,6 +7936,43 @@ function* concatChannels(self, that) {
|
|
|
7808
7936
|
*/
|
|
7809
7937
|
const merge = /*#__PURE__*/ dual((args) => isStream(args[0]) && isStream(args[1]), (self, that, options) => fromChannel(merge$1(toChannel(self), toChannel(that), options)));
|
|
7810
7938
|
/**
|
|
7939
|
+
* Merges this stream with a background effect, keeping the stream's elements.
|
|
7940
|
+
*
|
|
7941
|
+
* **When to use**
|
|
7942
|
+
*
|
|
7943
|
+
* Use when an effect should run concurrently for the lifetime of a stream while
|
|
7944
|
+
* only the stream's elements remain in the output.
|
|
7945
|
+
*
|
|
7946
|
+
* **Details**
|
|
7947
|
+
*
|
|
7948
|
+
* The effect runs concurrently, fails the stream if it fails, and is interrupted
|
|
7949
|
+
* when the stream completes.
|
|
7950
|
+
*
|
|
7951
|
+
* **Example** (Merging with a background effect)
|
|
7952
|
+
*
|
|
7953
|
+
* ```ts import.meta.vitest
|
|
7954
|
+
* import { Effect, Stream } from "effect"
|
|
7955
|
+
*
|
|
7956
|
+
* const events: Array<string> = []
|
|
7957
|
+
* const program = Effect.gen(function*() {
|
|
7958
|
+
* const values = yield* Stream.make(1, 2, 3).pipe(
|
|
7959
|
+
* Stream.mergeEffect(Effect.sync(() => events.push("side task"))),
|
|
7960
|
+
* Stream.runCollect
|
|
7961
|
+
* )
|
|
7962
|
+
*
|
|
7963
|
+
* values // => [1, 2, 3]
|
|
7964
|
+
* })
|
|
7965
|
+
*
|
|
7966
|
+
* await Effect.runPromise(program)
|
|
7967
|
+
* events // => ["side task"]
|
|
7968
|
+
* ```
|
|
7969
|
+
*
|
|
7970
|
+
* @stability stable
|
|
7971
|
+
* @category merging
|
|
7972
|
+
* @since 4.0.0
|
|
7973
|
+
*/
|
|
7974
|
+
const mergeEffect = /*#__PURE__*/ dual(2, (self, effect) => self.channel.pipe(mergeEffect$1(effect), fromChannel));
|
|
7975
|
+
/**
|
|
7811
7976
|
* Merges a collection of streams, running up to the specified number concurrently.
|
|
7812
7977
|
*
|
|
7813
7978
|
* **When to use**
|
|
@@ -8068,6 +8233,35 @@ const filterMapEffect = /*#__PURE__*/ dual(2, (self, filter) => fromChannel(filt
|
|
|
8068
8233
|
const catchCause = /*#__PURE__*/ dual(2, (self, f) => self.channel.pipe(catchCause$1((cause) => f(cause).channel), fromChannel));
|
|
8069
8234
|
const catch_ = /*#__PURE__*/ dual(2, (self, f) => fromChannel(catch_$1(self.channel, (error) => f(error).channel)));
|
|
8070
8235
|
/**
|
|
8236
|
+
* Peeks at errors effectfully without changing the stream unless the tap fails.
|
|
8237
|
+
*
|
|
8238
|
+
* **Example** (Effectfully peeking at errors)
|
|
8239
|
+
*
|
|
8240
|
+
* ```ts import.meta.vitest
|
|
8241
|
+
* import { Effect, Stream } from "effect"
|
|
8242
|
+
*
|
|
8243
|
+
* const errors: Array<string> = []
|
|
8244
|
+
* const stream = Stream.make(1, 2).pipe(
|
|
8245
|
+
* Stream.concat(Stream.fail("boom")),
|
|
8246
|
+
* Stream.tapError((error) => Effect.sync(() => errors.push(error))),
|
|
8247
|
+
* Stream.catch(() => Stream.make(999))
|
|
8248
|
+
* )
|
|
8249
|
+
*
|
|
8250
|
+
* const program = Effect.gen(function*() {
|
|
8251
|
+
* const values = yield* Stream.runCollect(stream)
|
|
8252
|
+
* values // => [1, 2, 999]
|
|
8253
|
+
* })
|
|
8254
|
+
*
|
|
8255
|
+
* await Effect.runPromise(program)
|
|
8256
|
+
* errors // => ["boom"]
|
|
8257
|
+
* ```
|
|
8258
|
+
*
|
|
8259
|
+
* @stability stable
|
|
8260
|
+
* @category error handling
|
|
8261
|
+
* @since 2.0.0
|
|
8262
|
+
*/
|
|
8263
|
+
const tapError = /*#__PURE__*/ dual(2, (self, f) => self.channel.pipe(tapError$1(f), fromChannel));
|
|
8264
|
+
/**
|
|
8071
8265
|
* Recovers from errors that match a predicate by switching to a recovery stream.
|
|
8072
8266
|
*
|
|
8073
8267
|
* **Details**
|
|
@@ -8076,6 +8270,12 @@ const catch_ = /*#__PURE__*/ dual(2, (self, f) => fromChannel(catch_$1(self.chan
|
|
|
8076
8270
|
* stream. Non-matching failures propagate downstream, so the error type is
|
|
8077
8271
|
* preserved unless the filter narrows it.
|
|
8078
8272
|
*
|
|
8273
|
+
* **Gotchas**
|
|
8274
|
+
*
|
|
8275
|
+
* If the cause contains a defect, the handler is skipped and every typed error
|
|
8276
|
+
* is converted to a defect, preserving reason order and interrupts. An
|
|
8277
|
+
* interruption alongside a typed error does not prevent recovery.
|
|
8278
|
+
*
|
|
8079
8279
|
* **Example** (Catching matching failures)
|
|
8080
8280
|
*
|
|
8081
8281
|
* ```ts import.meta.vitest
|
|
@@ -8111,6 +8311,12 @@ const catchIf = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, predicate
|
|
|
8111
8311
|
* Use when you need to handle a specific error case from a stream whose error
|
|
8112
8312
|
* type is a tagged union with a readonly `_tag` field.
|
|
8113
8313
|
*
|
|
8314
|
+
* **Gotchas**
|
|
8315
|
+
*
|
|
8316
|
+
* If the cause contains a defect, the handler is skipped and every typed error
|
|
8317
|
+
* is converted to a defect, preserving reason order and interrupts. An
|
|
8318
|
+
* interruption alongside a typed error does not prevent recovery.
|
|
8319
|
+
*
|
|
8114
8320
|
* **Example** (Catching tagged failures)
|
|
8115
8321
|
*
|
|
8116
8322
|
* ```ts import.meta.vitest
|
|
@@ -8143,6 +8349,11 @@ const catchTag = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, k, f, or
|
|
|
8143
8349
|
/**
|
|
8144
8350
|
* Transforms the errors emitted by this stream using `f`.
|
|
8145
8351
|
*
|
|
8352
|
+
* **Details**
|
|
8353
|
+
*
|
|
8354
|
+
* Maps every typed error in the cause, preserving defects, interrupts and
|
|
8355
|
+
* reason order. Unlike typed recovery, mapping does not convert errors to defects.
|
|
8356
|
+
*
|
|
8146
8357
|
* **Example** (Mapping stream errors)
|
|
8147
8358
|
*
|
|
8148
8359
|
* ```ts import.meta.vitest
|
|
@@ -8202,6 +8413,16 @@ const orDie = (self) => fromChannel(orDie$1(self.channel));
|
|
|
8202
8413
|
*
|
|
8203
8414
|
* The `log` option controls whether the failure is logged before the stream
|
|
8204
8415
|
* terminates.
|
|
8416
|
+
* Set `log: "Unhandled"` to read `References.UnhandledLogLevel` when the
|
|
8417
|
+
* failure occurs; `undefined` disables logging. Minimum log level filtering
|
|
8418
|
+
* still applies.
|
|
8419
|
+
*
|
|
8420
|
+
* **Gotchas**
|
|
8421
|
+
*
|
|
8422
|
+
* Defects take precedence over typed errors. If the cause also contains a
|
|
8423
|
+
* defect, the failure is not ignored and is propagated with every typed error
|
|
8424
|
+
* converted to a defect. An interruption alongside a typed error does not
|
|
8425
|
+
* prevent the error from being ignored.
|
|
8205
8426
|
*
|
|
8206
8427
|
* **Example** (Ignoring stream failures)
|
|
8207
8428
|
*
|
|
@@ -8253,6 +8474,12 @@ const ignore = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) =
|
|
|
8253
8474
|
* The schedule is reset as soon as the first element passes through the
|
|
8254
8475
|
* stream again.
|
|
8255
8476
|
*
|
|
8477
|
+
* **Gotchas**
|
|
8478
|
+
*
|
|
8479
|
+
* Defects take precedence over typed errors. A failure whose cause contains a
|
|
8480
|
+
* defect is not retried and is propagated with every typed error converted to a
|
|
8481
|
+
* defect. A typed error alongside an interruption is retried.
|
|
8482
|
+
*
|
|
8256
8483
|
* **Example** (Retrying stream failures)
|
|
8257
8484
|
*
|
|
8258
8485
|
* ```ts import.meta.vitest
|
|
@@ -8483,9 +8710,9 @@ const rechunk = /*#__PURE__*/ dual(2, (self, target) => {
|
|
|
8483
8710
|
let chunk = empty$2();
|
|
8484
8711
|
let index = 0;
|
|
8485
8712
|
let current;
|
|
8486
|
-
let
|
|
8713
|
+
let cause;
|
|
8487
8714
|
return suspend$2(function loop() {
|
|
8488
|
-
if (
|
|
8715
|
+
if (cause) return failCause$3(cause);
|
|
8489
8716
|
else if (current === void 0) return flatMap$2(pull, (arr) => {
|
|
8490
8717
|
if (chunk.length === 0 && arr.length === target) return succeed$2(arr);
|
|
8491
8718
|
else if (chunk.length + arr.length < target) {
|
|
@@ -8506,10 +8733,10 @@ const rechunk = /*#__PURE__*/ dual(2, (self, target) => {
|
|
|
8506
8733
|
index = 0;
|
|
8507
8734
|
current = void 0;
|
|
8508
8735
|
return loop();
|
|
8509
|
-
}).pipe(
|
|
8510
|
-
if (chunk.length === 0) return
|
|
8736
|
+
}).pipe(catchCause$2((cause_) => {
|
|
8737
|
+
if (chunk.length === 0) return failCause$3(cause_);
|
|
8511
8738
|
const result = chunk;
|
|
8512
|
-
|
|
8739
|
+
cause = cause_;
|
|
8513
8740
|
chunk = [];
|
|
8514
8741
|
return succeed$2(result);
|
|
8515
8742
|
}));
|
|
@@ -8547,7 +8774,7 @@ const mapAccum = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, initial,
|
|
|
8547
8774
|
for (let index = 0; index < arr.length; index++) {
|
|
8548
8775
|
const [newState, values] = f(state, arr[index]);
|
|
8549
8776
|
state = newState;
|
|
8550
|
-
acc.push(
|
|
8777
|
+
for (let i = 0; i < values.length; i++) acc.push(values[i]);
|
|
8551
8778
|
}
|
|
8552
8779
|
return [state, isArrayNonEmpty(acc) ? of(acc) : emptyArr];
|
|
8553
8780
|
}, options?.onHalt ? { onHalt(state) {
|
|
@@ -8680,7 +8907,7 @@ const groupedWithin = /*#__PURE__*/ dual(3, (self, chunkSize, duration) => aggre
|
|
|
8680
8907
|
* @since 2.0.0
|
|
8681
8908
|
*/
|
|
8682
8909
|
const transduce = /*#__PURE__*/ dual(2, (self, sink) => transformPull(self, (upstream, scope) => sync(() => {
|
|
8683
|
-
let done$
|
|
8910
|
+
let done$3;
|
|
8684
8911
|
let leftover;
|
|
8685
8912
|
const upstreamWithLeftover = suspend$2(() => {
|
|
8686
8913
|
if (leftover !== void 0) {
|
|
@@ -8690,14 +8917,14 @@ const transduce = /*#__PURE__*/ dual(2, (self, sink) => transformPull(self, (ups
|
|
|
8690
8917
|
}
|
|
8691
8918
|
return upstream;
|
|
8692
8919
|
}).pipe(catch_$2((error) => {
|
|
8693
|
-
done$
|
|
8920
|
+
done$3 = fail$4(error);
|
|
8694
8921
|
return done();
|
|
8695
8922
|
}));
|
|
8696
8923
|
const pull = map$2(suspend$2(() => sink.transform(upstreamWithLeftover, scope)), ([value, leftover_]) => {
|
|
8697
8924
|
leftover = leftover_;
|
|
8698
8925
|
return of(value);
|
|
8699
8926
|
});
|
|
8700
|
-
return suspend$2(() => done$
|
|
8927
|
+
return suspend$2(() => done$3 ? done$3 : pull);
|
|
8701
8928
|
})));
|
|
8702
8929
|
/**
|
|
8703
8930
|
* Aggregates elements with a sink, emitting each result when the sink completes or the schedule triggers.
|
|
@@ -8780,7 +9007,7 @@ const aggregateWithin = /*#__PURE__*/ dual(3, (self, sink, schedule) => fromChan
|
|
|
8780
9007
|
return suspend$2(() => {
|
|
8781
9008
|
if (buffer.state._tag === "Done" && leftover === void 0) return buffer.state.exit;
|
|
8782
9009
|
hasInput.closeUnsafe();
|
|
8783
|
-
const pull = emit(suspend$2(() => sink
|
|
9010
|
+
const pull = emit(suspend$2(() => runSink(sink, sinkUpstream, scope)));
|
|
8784
9011
|
return buffer.state._tag === "Open" ? raceFirst(pull, stepToBuffer) : pull;
|
|
8785
9012
|
});
|
|
8786
9013
|
}))));
|
|
@@ -8955,10 +9182,7 @@ const changesWith = /*#__PURE__*/ dual(2, (self, f) => transformPull(self, (pull
|
|
|
8955
9182
|
* @category text
|
|
8956
9183
|
* @since 2.0.0
|
|
8957
9184
|
*/
|
|
8958
|
-
const decodeText = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) =>
|
|
8959
|
-
const decoder = new TextDecoder(options?.encoding);
|
|
8960
|
-
return map(self, (chunk) => decoder.decode(chunk, { stream: true }));
|
|
8961
|
-
}));
|
|
9185
|
+
const decodeText = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) => self.channel.pipe(pipeTo(decodeText$1(options?.encoding)), fromChannel));
|
|
8962
9186
|
/**
|
|
8963
9187
|
* Encodes a stream of strings into UTF-8 `Uint8Array` chunks.
|
|
8964
9188
|
*
|
|
@@ -9190,7 +9414,12 @@ const provideService = /*#__PURE__*/ dual(3, (self, key, service) => fromChannel
|
|
|
9190
9414
|
* @category destructors
|
|
9191
9415
|
* @since 2.0.0
|
|
9192
9416
|
*/
|
|
9193
|
-
const run = /*#__PURE__*/ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap$2((upstream) => sink
|
|
9417
|
+
const run = /*#__PURE__*/ dual(2, (self, sink) => scopedWith((scope) => toPullScoped(self.channel, scope).pipe(flatMap$2((upstream) => runSink(sink, upstream, scope)), map$2(([a]) => a))));
|
|
9418
|
+
/**
|
|
9419
|
+
* Runs `sink` against `upstream`. Upstream failures bypass the sink's error
|
|
9420
|
+
* handlers and are restored once the sink has exited.
|
|
9421
|
+
*/
|
|
9422
|
+
const runSink = (sink, upstream, scope) => restoreUpstreamFailure(sink.transform(upstreamFailureToDefect(upstream), scope));
|
|
9194
9423
|
/**
|
|
9195
9424
|
* Runs the stream and collects all elements into an array.
|
|
9196
9425
|
*
|
|
@@ -9470,6 +9699,35 @@ const toPull = (self) => toPull$1(self.channel);
|
|
|
9470
9699
|
*/
|
|
9471
9700
|
const mkString = (self) => runFold$1(self.channel, () => "", (acc, chunk) => acc + chunk.join(""));
|
|
9472
9701
|
/**
|
|
9702
|
+
* Concatenates the stream's `Uint8Array` chunks into a single `ArrayBuffer`.
|
|
9703
|
+
*
|
|
9704
|
+
* **Gotchas**
|
|
9705
|
+
*
|
|
9706
|
+
* This materializes the full content in memory. The source stream must not
|
|
9707
|
+
* reuse or mutate emitted buffers, which are retained until collection completes.
|
|
9708
|
+
*
|
|
9709
|
+
* **Example** (Joining byte chunks into an ArrayBuffer)
|
|
9710
|
+
*
|
|
9711
|
+
* ```ts import.meta.vitest
|
|
9712
|
+
* import { Effect, Stream } from "effect"
|
|
9713
|
+
*
|
|
9714
|
+
* const program = Stream.make(
|
|
9715
|
+
* new Uint8Array([1, 2]),
|
|
9716
|
+
* new Uint8Array([3, 4])
|
|
9717
|
+
* ).pipe(
|
|
9718
|
+
* Stream.mkArrayBuffer,
|
|
9719
|
+
* Effect.map((buffer) => [...new Uint8Array(buffer)])
|
|
9720
|
+
* )
|
|
9721
|
+
*
|
|
9722
|
+
* await Effect.runPromise(program) // => [1, 2, 3, 4]
|
|
9723
|
+
* ```
|
|
9724
|
+
*
|
|
9725
|
+
* @stability stable
|
|
9726
|
+
* @category destructors
|
|
9727
|
+
* @since 4.0.0
|
|
9728
|
+
*/
|
|
9729
|
+
const mkArrayBuffer = (self) => map$2(mkUint8Array$1(self.channel), (bytes) => bytes.buffer);
|
|
9730
|
+
/**
|
|
9473
9731
|
* Concatenates the stream's `Uint8Array` chunks into a single `Uint8Array`.
|
|
9474
9732
|
*
|
|
9475
9733
|
* **Gotchas**
|
|
@@ -9535,12 +9793,12 @@ const toReadableStreamWith = /*#__PURE__*/ dual((args) => isStream(args[0]), (se
|
|
|
9535
9793
|
const onAbort = () => fiber.interruptUnsafe();
|
|
9536
9794
|
return new ReadableStream({
|
|
9537
9795
|
start(controller) {
|
|
9538
|
-
fiber = runFork(provideContext$2(
|
|
9796
|
+
fiber = runFork(provideContext$2(runForEach$1(transformPull$1(self.channel, (pull) => succeed$2(latch.whenOpen(pull))), (chunk) => sync(() => {
|
|
9539
9797
|
latch.closeUnsafe();
|
|
9540
9798
|
for (let i = 0; i < chunk.length; i++) controller.enqueue(chunk[i]);
|
|
9541
9799
|
currentResolve();
|
|
9542
9800
|
currentResolve = void 0;
|
|
9543
|
-
}))
|
|
9801
|
+
})), context));
|
|
9544
9802
|
fiber.addObserver((exit) => {
|
|
9545
9803
|
signal?.removeEventListener("abort", onAbort);
|
|
9546
9804
|
if (cancelled) return;
|
|
@@ -9566,6 +9824,28 @@ const toReadableStreamWith = /*#__PURE__*/ dual((args) => isStream(args[0]), (se
|
|
|
9566
9824
|
}, options?.strategy);
|
|
9567
9825
|
});
|
|
9568
9826
|
/**
|
|
9827
|
+
* Converts a stream to a `ReadableStream`.
|
|
9828
|
+
*
|
|
9829
|
+
* **Details**
|
|
9830
|
+
*
|
|
9831
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream.
|
|
9832
|
+
*
|
|
9833
|
+
* **Example** (Converting a stream to a ReadableStream)
|
|
9834
|
+
*
|
|
9835
|
+
* ```ts import.meta.vitest
|
|
9836
|
+
* import { Stream } from "effect"
|
|
9837
|
+
*
|
|
9838
|
+
* const readableStream = Stream.toReadableStream(Stream.make(1, 2, 3))
|
|
9839
|
+
* const values = await globalThis.Array.fromAsync(readableStream)
|
|
9840
|
+
* values // => [ 1, 2, 3 ]
|
|
9841
|
+
* ```
|
|
9842
|
+
*
|
|
9843
|
+
* @stability stable
|
|
9844
|
+
* @category destructors
|
|
9845
|
+
* @since 2.0.0
|
|
9846
|
+
*/
|
|
9847
|
+
const toReadableStream = /*#__PURE__*/ dual((args) => isStream(args[0]), (self, options) => toReadableStreamWith(self, empty$3(), options));
|
|
9848
|
+
/**
|
|
9569
9849
|
* Creates an Effect that builds a ReadableStream from the stream.
|
|
9570
9850
|
*
|
|
9571
9851
|
* **When to use**
|
|
@@ -9694,6 +9974,6 @@ const toAsyncIterableWith = /*#__PURE__*/ dual(2, (self, context) => ({ [Symbol.
|
|
|
9694
9974
|
* @since 3.15.0
|
|
9695
9975
|
*/
|
|
9696
9976
|
const toAsyncIterable = (self) => toAsyncIterableWith(self, empty$3());
|
|
9697
|
-
export {
|
|
9977
|
+
export { mkString as $, map$1 as $t, fromEffect as A, publishAll as An, tick as At, ignore as B, makeUnsafe$1 as Bn, unfold as Bt, filterMapEffect as C, sizeUnsafe as Cn, suspend as Ct, fromArray as D, takeUnsafe as Dn, takeWhile as Dt, forever as E, takeAll as En, takeUntilEffect as Et, fromPull as F, take$2 as Fn, toReadableStream as Ft, mapAccum as G, interruptAll as Gn, fromChannel$1 as Gt, isStream as H, await_ as Hn, zipLatestWith as Ht, fromQueue as I, unbounded$1 as In, toReadableStreamEffect as It, mapEffect as J, join as Jn, mapInput as Jt, mapArray as K, interruptAllAs as Kn, isSink as Kt, fromReadableStream as L, make$5 as Ln, toReadableStreamWith as Lt, fromIterable as M, shutdown$1 as Mn, toAsyncIterable as Mt, fromIteratorSucceed as N, sliding$1 as Nn, toAsyncIterableWith as Nt, fromAsyncIterable as O, unbounded as On, tap as Ot, fromPubSub as P, subscribe as Pn, toPull as Pt, mkArrayBuffer as Q, fromTransform$1 as Qt, fromSubscription as R, set as Rn, transduce as Rt, filterMap as S, shutdownUnsafe as Sn, succeed as St, flattenIterable as T, take$1 as Tn, takeUntil as Tt, make as U, getCurrent as Un, drain$1 as Ut, interruptWhen as V, awaitAll as Vn, unwrap as Vt, map as W, interrupt$1 as Wn, forEach as Wt, merge as X, Order as Xn, decodeText$1 as Xt, mapError as Y, runIn as Yn, unwrap$1 as Yt, mergeAll as Z, round as Zn, fromPull$1 as Zt, ensuring as _, offer as _n, runForEachArray as _t, catch_ as a, makeUnsafe as an, pipeThroughChannelOrFail as at, filter as b, poll as bn, scoped as bt, concat as c, collect as cn, rechunk as ct, die as d, endUnsafe as dn, run as dt, mapDone as en, mkUint8Array as et, drain as f, fail$2 as fn, runCollect as ft, encodeText as g, make$2 as gn, runForEach as gt, empty as h, interrupt as hn, runFoldEffect as ht, catchTag as i, make$1 as in, pipeThroughChannel as it, fromEffectRepeat as j, publishUnsafe as jn, timeoutOrElse as jt, fromChannel as k, publish as kn, tapError as kt, debounce as l, dropping as ln, repeat as lt, drop as m, failCauseUnsafe as mn, runFold as mt, catchCause as n, mkUint8Array$1 as nn, orDie as nt, changes as o, bounded as on, provideContext as ot, drainFork as p, failCause$2 as pn, runDrain as pt, mapArrayEffect as q, interruptAs as qn, last as qt, catchIf as r, pipeTo as rn, paginate as rt, changesWith as s, clear as sn, provideService as st, callback as t, mapError$1 as tn, onEnd as tt, decodeText as u, end as un, retry as ut, fail as v, offerAll as vn, runHead as vt, flatMap as w, sliding as wn, switchMap as wt, filterEffect as x, shutdown as xn, splitLines as xt, failCause as y, offerUnsafe as yn, runLast as yt, groupedWithin as z, make$6 as zn, transformPull as zt };
|
|
9698
9978
|
|
|
9699
|
-
//# sourceMappingURL=Stream-
|
|
9979
|
+
//# sourceMappingURL=Stream-DKSvHopl.mjs.map
|