@logixjs/core 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/{Action-mqVvtEHt.d.ts → Action-DYl88bwj.d.ts} +1 -1
- package/dist/{Action-BkRHy2vg.d.cts → Action-DkxsI_DK.d.cts} +1 -1
- package/dist/Action.cjs.map +1 -1
- package/dist/Action.d.cts +1 -1
- package/dist/Action.d.ts +1 -1
- package/dist/Action.js +2 -2
- package/dist/{Actions-AsQ07yTP.d.cts → Actions-Dicm7jdc.d.cts} +2 -2
- package/dist/{Actions-AsQ07yTP.d.ts → Actions-Dicm7jdc.d.ts} +2 -2
- package/dist/Actions.cjs.map +1 -1
- package/dist/Actions.d.cts +1 -1
- package/dist/Actions.d.ts +1 -1
- package/dist/Actions.js +1 -1
- package/dist/{Bound-BN1DQ_lM.d.ts → Bound-1OJLzVIS.d.ts} +2 -2
- package/dist/{Bound-BPIfH9SS.d.cts → Bound-BMLrtQ1V.d.cts} +2 -2
- package/dist/Bound.cjs +1737 -399
- package/dist/Bound.cjs.map +1 -1
- package/dist/Bound.d.cts +5 -5
- package/dist/Bound.d.ts +5 -5
- package/dist/Bound.js +19 -17
- package/dist/{Debug-B5q5Bkzx.d.ts → Debug-DKrWP5H1.d.ts} +40 -22
- package/dist/{Debug-Bq8Sqjcr.d.cts → Debug-hIT44XsY.d.cts} +40 -22
- package/dist/Debug.cjs +1348 -318
- package/dist/Debug.cjs.map +1 -1
- package/dist/Debug.d.cts +12 -11
- package/dist/Debug.d.ts +12 -11
- package/dist/Debug.js +20 -11
- package/dist/EffectOp.cjs +15 -6
- package/dist/EffectOp.cjs.map +1 -1
- package/dist/EffectOp.js +3 -3
- package/dist/Env.cjs +772 -6
- package/dist/Env.cjs.map +1 -1
- package/dist/Env.js +5 -2
- package/dist/ExternalStore-DqJKKRJ4.d.ts +61 -0
- package/dist/ExternalStore-JC-gAgEI.d.cts +61 -0
- package/dist/ExternalStore.cjs +774 -0
- package/dist/ExternalStore.cjs.map +1 -0
- package/dist/ExternalStore.d.cts +8 -0
- package/dist/ExternalStore.d.ts +8 -0
- package/dist/ExternalStore.js +19 -0
- package/dist/ExternalStore.js.map +1 -0
- package/dist/{Flow-BhpjE22E.d.ts → Flow-CZmXRDqp.d.cts} +13 -4
- package/dist/{Flow-1fZT8MpX.d.cts → Flow-DIVDxz7R.d.ts} +13 -4
- package/dist/Flow.cjs +765 -148
- package/dist/Flow.cjs.map +1 -1
- package/dist/Flow.d.cts +6 -6
- package/dist/Flow.d.ts +6 -6
- package/dist/Flow.js +9 -8
- package/dist/{Handle-D_cLW1Z3.d.ts → Handle-Bo6cAFut.d.ts} +1 -1
- package/dist/{Handle-D8D1zPb_.d.cts → Handle-CfDvSqN7.d.cts} +1 -1
- package/dist/Handle.d.cts +5 -5
- package/dist/Handle.d.ts +5 -5
- package/dist/{Kernel-8kC-jOda.d.cts → Kernel-CuXBF9S_.d.cts} +16 -7
- package/dist/{Kernel-CnGE1Fyk.d.ts → Kernel-D9guNwRL.d.ts} +16 -7
- package/dist/Kernel.cjs +814 -26
- package/dist/Kernel.cjs.map +1 -1
- package/dist/Kernel.d.cts +13 -12
- package/dist/Kernel.d.ts +13 -12
- package/dist/Kernel.js +7 -4
- package/dist/{Link-Db7975nU.d.ts → Link-CUM0yUCH.d.ts} +10 -3
- package/dist/{Link-fX8x1eCK.d.cts → Link-NAfR6uGD.d.cts} +10 -3
- package/dist/Link.cjs +1294 -121
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.d.cts +5 -5
- package/dist/Link.d.ts +5 -5
- package/dist/Link.js +37 -29
- package/dist/{Logic-DRh4sDZj.d.cts → Logic-09VQpIj3.d.cts} +7 -4
- package/dist/{Logic-BRjEMr-W.d.ts → Logic-DKg7ghGy.d.ts} +7 -4
- package/dist/Logic.cjs +2 -1
- package/dist/Logic.cjs.map +1 -1
- package/dist/Logic.d.cts +5 -5
- package/dist/Logic.d.ts +5 -5
- package/dist/Logic.js +1 -1
- package/dist/{MatchBuilder-CJk5oCkR.d.cts → MatchBuilder-CsW5jgrL.d.ts} +1 -1
- package/dist/{MatchBuilder-0QOc-nlU.d.ts → MatchBuilder-Dksk07F4.d.cts} +1 -1
- package/dist/MatchBuilder.cjs +2 -2
- package/dist/MatchBuilder.cjs.map +1 -1
- package/dist/MatchBuilder.d.cts +6 -6
- package/dist/MatchBuilder.d.ts +6 -6
- package/dist/MatchBuilder.js +2 -2
- package/dist/Middleware-D8tUDLv_.d.cts +100 -0
- package/dist/Middleware-DS7CbTTN.d.ts +100 -0
- package/dist/Middleware.cjs +678 -58
- package/dist/Middleware.cjs.map +1 -1
- package/dist/Middleware.d.cts +2 -86
- package/dist/Middleware.d.ts +2 -86
- package/dist/Middleware.js +15 -12
- package/dist/{Module-DnzluX2J.d.ts → Module-B_Cntyms.d.ts} +54 -25
- package/dist/{Module-B_0xRDMR.d.cts → Module-CmNOVXzf.d.cts} +54 -25
- package/dist/Module.cjs +9331 -3317
- package/dist/Module.cjs.map +1 -1
- package/dist/Module.d.cts +7 -6
- package/dist/Module.d.ts +7 -6
- package/dist/Module.js +39 -31
- package/dist/ModuleTag-CGho_InD.d.ts +113 -0
- package/dist/ModuleTag-CITb8L_G.d.cts +113 -0
- package/dist/ModuleTag.cjs +7248 -2847
- package/dist/ModuleTag.cjs.map +1 -1
- package/dist/ModuleTag.d.cts +6 -6
- package/dist/ModuleTag.d.ts +6 -6
- package/dist/ModuleTag.js +35 -29
- package/dist/Observability-Bdhnx2Dv.d.ts +385 -0
- package/dist/Observability-DXGAFBIT.d.cts +385 -0
- package/dist/Observability.cjs +5093 -1556
- package/dist/Observability.cjs.map +1 -1
- package/dist/Observability.d.cts +6 -7
- package/dist/Observability.d.ts +6 -7
- package/dist/Observability.js +28 -23
- package/dist/{Platform-CHX8o-U4.d.ts → Platform-B4s8tg6C.d.cts} +4 -5
- package/dist/{Platform-C49Pv956.d.cts → Platform-BV_0MW7g.d.cts} +5 -2
- package/dist/{Platform-C49Pv956.d.ts → Platform-BV_0MW7g.d.ts} +5 -2
- package/dist/{Platform-CVlv0xLQ.d.cts → Platform-W0Mefy_e.d.ts} +4 -5
- package/dist/Platform.cjs +2 -1
- package/dist/Platform.cjs.map +1 -1
- package/dist/Platform.d.cts +2 -3
- package/dist/Platform.d.ts +2 -3
- package/dist/Platform.js +2 -2
- package/dist/{Process-CM9xbMdP.d.ts → Process-CO8G7HO9.d.cts} +30 -5
- package/dist/{Process-mL8fHDSB.d.cts → Process-Cyf6VNDR.d.ts} +30 -5
- package/dist/Process.cjs +1288 -120
- package/dist/Process.cjs.map +1 -1
- package/dist/Process.d.cts +6 -6
- package/dist/Process.d.ts +6 -6
- package/dist/Process.js +34 -26
- package/dist/ReadQuery-C_or5nLC.d.ts +128 -0
- package/dist/ReadQuery-DXLzCE0E.d.cts +614 -0
- package/dist/ReadQuery-DXLzCE0E.d.ts +614 -0
- package/dist/ReadQuery-Yve1lmUo.d.cts +128 -0
- package/dist/ReadQuery.cjs +290 -5
- package/dist/ReadQuery.cjs.map +1 -1
- package/dist/ReadQuery.d.cts +3 -2
- package/dist/ReadQuery.d.ts +3 -2
- package/dist/ReadQuery.js +23 -5
- package/dist/{Reflection-CQnKwPXj.d.ts → Reflection-B2Xi1e4Q.d.ts} +89 -7
- package/dist/{Reflection-Kabo1mlU.d.cts → Reflection-DNB4V4_e.d.cts} +89 -7
- package/dist/Reflection.cjs +3227 -1617
- package/dist/Reflection.cjs.map +1 -1
- package/dist/Reflection.d.cts +17 -15
- package/dist/Reflection.d.ts +17 -15
- package/dist/Reflection.js +33 -25
- package/dist/{Resource-Dy1xD_DG.d.cts → Resource-pKvQQ4x5.d.cts} +3 -3
- package/dist/{Resource-Dy1xD_DG.d.ts → Resource-pKvQQ4x5.d.ts} +3 -3
- package/dist/Resource.cjs +781 -15
- package/dist/Resource.cjs.map +1 -1
- package/dist/Resource.d.cts +1 -1
- package/dist/Resource.d.ts +1 -1
- package/dist/Resource.js +6 -3
- package/dist/{Root-7ADUMk4t.d.cts → Root-CCVuFHB6.d.cts} +3 -3
- package/dist/{Root-7ADUMk4t.d.ts → Root-CCVuFHB6.d.ts} +3 -3
- package/dist/Root.cjs +786 -20
- package/dist/Root.cjs.map +1 -1
- package/dist/Root.d.cts +2 -2
- package/dist/Root.d.ts +2 -2
- package/dist/Root.js +7 -3
- package/dist/{Runtime-CtyzZG4i.d.ts → Runtime-CRmvwK4I.d.ts} +70 -14
- package/dist/{Runtime-B-aL-f29.d.cts → Runtime-C_wJM9mN.d.cts} +70 -14
- package/dist/Runtime.cjs +4942 -1601
- package/dist/Runtime.cjs.map +1 -1
- package/dist/Runtime.d.cts +17 -15
- package/dist/Runtime.d.ts +17 -15
- package/dist/Runtime.js +44 -32
- package/dist/{ScopeRegistry-D1owDNSm.d.cts → ScopeRegistry-BhYzqWri.d.cts} +6 -6
- package/dist/{ScopeRegistry-D1owDNSm.d.ts → ScopeRegistry-BhYzqWri.d.ts} +6 -6
- package/dist/ScopeRegistry.cjs +776 -10
- package/dist/ScopeRegistry.cjs.map +1 -1
- package/dist/ScopeRegistry.d.cts +1 -1
- package/dist/ScopeRegistry.d.ts +1 -1
- package/dist/ScopeRegistry.js +6 -3
- package/dist/{State-CU50R26M.d.cts → State-rNFsFPTl.d.cts} +2 -2
- package/dist/{State-CU50R26M.d.ts → State-rNFsFPTl.d.ts} +2 -2
- package/dist/State.cjs.map +1 -1
- package/dist/State.d.cts +1 -1
- package/dist/State.d.ts +1 -1
- package/dist/State.js +1 -1
- package/dist/{StateTrait-BGsZghTz.d.ts → StateTrait-CijdwNb6.d.ts} +25 -8
- package/dist/{StateTrait-OWhbj12c.d.cts → StateTrait-Dltto6PU.d.cts} +25 -8
- package/dist/StateTrait.cjs +1890 -528
- package/dist/StateTrait.cjs.map +1 -1
- package/dist/StateTrait.d.cts +9 -7
- package/dist/StateTrait.d.ts +9 -7
- package/dist/StateTrait.js +18 -14
- package/dist/{TraitLifecycle-CwV5WPFX.d.cts → TraitLifecycle-BKzDqzLu.d.cts} +2 -2
- package/dist/{TraitLifecycle-LdIWmKlg.d.ts → TraitLifecycle-Cvo94uDB.d.ts} +2 -2
- package/dist/TraitLifecycle.cjs +630 -67
- package/dist/TraitLifecycle.cjs.map +1 -1
- package/dist/TraitLifecycle.d.cts +6 -6
- package/dist/TraitLifecycle.d.ts +6 -6
- package/dist/TraitLifecycle.js +8 -7
- package/dist/Workflow-C_OWr4dV.d.ts +415 -0
- package/dist/Workflow-DmydkHO8.d.cts +415 -0
- package/dist/Workflow.cjs +3150 -0
- package/dist/Workflow.cjs.map +1 -0
- package/dist/Workflow.d.cts +7 -0
- package/dist/Workflow.d.ts +7 -0
- package/dist/Workflow.js +58 -0
- package/dist/Workflow.js.map +1 -0
- package/dist/{action-DiMDD_0v.d.cts → action-BQxjPFEw.d.cts} +5 -5
- package/dist/{action-DiMDD_0v.d.ts → action-BQxjPFEw.d.ts} +5 -5
- package/dist/chunk-2XRLXDWR.js +276 -0
- package/dist/chunk-2XRLXDWR.js.map +1 -0
- package/dist/chunk-3L6QGFMM.js +701 -0
- package/dist/chunk-3L6QGFMM.js.map +1 -0
- package/dist/{chunk-GMPEOUP2.js → chunk-4MZ7BT3R.js} +2 -2
- package/dist/chunk-4MZ7BT3R.js.map +1 -0
- package/dist/{chunk-3IYZ5IGG.js → chunk-5WKUGEBY.js} +2 -2
- package/dist/{chunk-3RMKLXHX.js → chunk-63ZQ5RIN.js} +2 -2
- package/dist/{chunk-M3WTHJHJ.js → chunk-67DIEA53.js} +385 -148
- package/dist/chunk-67DIEA53.js.map +1 -0
- package/dist/{chunk-YS3AZQ2G.js → chunk-6HFAW2MH.js} +1 -1
- package/dist/chunk-6HFAW2MH.js.map +1 -0
- package/dist/{chunk-EY4NZKDR.js → chunk-6Y2TKCNY.js} +2 -2
- package/dist/{chunk-76WT3HOR.js → chunk-6YZOXFPQ.js} +25 -24
- package/dist/chunk-6YZOXFPQ.js.map +1 -0
- package/dist/{chunk-G5ZBFPNU.js → chunk-A2RQOJC7.js} +2 -2
- package/dist/{chunk-AUIR5O6W.js → chunk-AFSB6NKM.js} +13 -19
- package/dist/chunk-AFSB6NKM.js.map +1 -0
- package/dist/{chunk-JCXGZRMU.js → chunk-AO4JEOKD.js} +22 -23
- package/dist/chunk-AO4JEOKD.js.map +1 -0
- package/dist/{chunk-TAAPQVZN.js → chunk-AYELIQXR.js} +2 -2
- package/dist/{chunk-QMM6O4CD.js → chunk-BLHZW7DG.js} +15 -3
- package/dist/{chunk-QMM6O4CD.js.map → chunk-BLHZW7DG.js.map} +1 -1
- package/dist/{chunk-TQOBJYDP.js → chunk-CD4N74YC.js} +1 -1
- package/dist/chunk-CD4N74YC.js.map +1 -0
- package/dist/{chunk-ANLBCBDC.js → chunk-CGE2HBTH.js} +11 -11
- package/dist/chunk-CGE2HBTH.js.map +1 -0
- package/dist/{chunk-OFADUJWJ.js → chunk-CYYSQMLO.js} +5 -5
- package/dist/chunk-CYYSQMLO.js.map +1 -0
- package/dist/{chunk-66ALHVEX.js → chunk-EB46EYI7.js} +3 -3
- package/dist/{chunk-NZJKFF45.js → chunk-EKCDHWRK.js} +4 -4
- package/dist/chunk-EKCDHWRK.js.map +1 -0
- package/dist/{chunk-BABLDP24.js → chunk-EPQFNJU3.js} +152 -7
- package/dist/chunk-EPQFNJU3.js.map +1 -0
- package/dist/{chunk-OGWBVHB3.js → chunk-ESR6HGOY.js} +73 -14
- package/dist/chunk-ESR6HGOY.js.map +1 -0
- package/dist/{chunk-NBD3KUOZ.js → chunk-F6RP62H3.js} +150 -98
- package/dist/chunk-F6RP62H3.js.map +1 -0
- package/dist/chunk-FBYW3QDI.js +252 -0
- package/dist/chunk-FBYW3QDI.js.map +1 -0
- package/dist/{chunk-IPF7E66P.js → chunk-FYAODKVP.js} +2 -2
- package/dist/chunk-GNEN7NKO.js +908 -0
- package/dist/chunk-GNEN7NKO.js.map +1 -0
- package/dist/chunk-GWSM4KLB.js +763 -0
- package/dist/chunk-GWSM4KLB.js.map +1 -0
- package/dist/{chunk-4SO6JMZL.js → chunk-HDMXCUZL.js} +1 -1
- package/dist/chunk-HDMXCUZL.js.map +1 -0
- package/dist/{chunk-ZFY7U2FR.js → chunk-HJM5Y5NU.js} +43 -3
- package/dist/chunk-HJM5Y5NU.js.map +1 -0
- package/dist/{chunk-ZGDVUPTM.js → chunk-IOZ3VKPK.js} +129 -68
- package/dist/chunk-IOZ3VKPK.js.map +1 -0
- package/dist/{chunk-PYOE4VSI.js → chunk-IVXSVHO4.js} +303 -247
- package/dist/chunk-IVXSVHO4.js.map +1 -0
- package/dist/chunk-J3CWXIPV.js +242 -0
- package/dist/chunk-J3CWXIPV.js.map +1 -0
- package/dist/chunk-K6JQW266.js +42 -0
- package/dist/chunk-K6JQW266.js.map +1 -0
- package/dist/chunk-KMZYQF6Q.js +202 -0
- package/dist/chunk-KMZYQF6Q.js.map +1 -0
- package/dist/{chunk-JWOYLO27.js → chunk-LPPZDFTD.js} +22 -12
- package/dist/chunk-LPPZDFTD.js.map +1 -0
- package/dist/{chunk-PAYXCY6A.js → chunk-MYB2B5WX.js} +997 -576
- package/dist/chunk-MYB2B5WX.js.map +1 -0
- package/dist/chunk-MYKNINNN.js +228 -0
- package/dist/chunk-MYKNINNN.js.map +1 -0
- package/dist/chunk-NSQIRMVF.js +27 -0
- package/dist/{chunk-QCHIQWAJ.js.map → chunk-NSQIRMVF.js.map} +1 -1
- package/dist/chunk-NUDBM4MM.js +30 -0
- package/dist/chunk-NUDBM4MM.js.map +1 -0
- package/dist/chunk-NZMWWDAY.js +23 -0
- package/dist/chunk-NZMWWDAY.js.map +1 -0
- package/dist/{chunk-RNFE3ML2.js → chunk-OCUV2Y25.js} +4 -3
- package/dist/chunk-OCUV2Y25.js.map +1 -0
- package/dist/chunk-P4ZJOQA7.js +271 -0
- package/dist/chunk-P4ZJOQA7.js.map +1 -0
- package/dist/chunk-P6C5EZ3D.js +342 -0
- package/dist/chunk-P6C5EZ3D.js.map +1 -0
- package/dist/{chunk-CW6T36TN.js → chunk-PBD7BJUN.js} +62 -4
- package/dist/chunk-PBD7BJUN.js.map +1 -0
- package/dist/chunk-PBIUCQY3.js +696 -0
- package/dist/chunk-PBIUCQY3.js.map +1 -0
- package/dist/chunk-PD6YECQH.js +845 -0
- package/dist/chunk-PD6YECQH.js.map +1 -0
- package/dist/{chunk-M7IYCTJV.js → chunk-R4LFQGP3.js} +2 -2
- package/dist/chunk-RHJIGDUE.js +21 -0
- package/dist/chunk-RHJIGDUE.js.map +1 -0
- package/dist/{chunk-KP7MUZNX.js → chunk-RLXO27MW.js} +30 -8
- package/dist/chunk-RLXO27MW.js.map +1 -0
- package/dist/{chunk-DFNM3WX2.js → chunk-S44BEV4B.js} +168 -45
- package/dist/chunk-S44BEV4B.js.map +1 -0
- package/dist/chunk-S4S5N4BJ.js +1461 -0
- package/dist/chunk-S4S5N4BJ.js.map +1 -0
- package/dist/{chunk-BZ2SHDN2.js → chunk-SGTRAXXX.js} +3 -3
- package/dist/chunk-SGTRAXXX.js.map +1 -0
- package/dist/{chunk-M2RGJPXX.js → chunk-SJAE5PB5.js} +3 -3
- package/dist/{chunk-JGIWG6SR.js → chunk-SNPNHU3H.js} +3937 -1776
- package/dist/chunk-SNPNHU3H.js.map +1 -0
- package/dist/{chunk-IHVBV5C2.js → chunk-SOOBFXRR.js} +94 -71
- package/dist/chunk-SOOBFXRR.js.map +1 -0
- package/dist/{chunk-ZDTRWK5F.js → chunk-TAHFWKS6.js} +2 -2
- package/dist/chunk-UEFFTVPY.js +9 -0
- package/dist/chunk-UEFFTVPY.js.map +1 -0
- package/dist/{chunk-24VULZ7A.js → chunk-UR5BXLBP.js} +3 -3
- package/dist/chunk-UR5BXLBP.js.map +1 -0
- package/dist/{chunk-DMBALCE2.js → chunk-V2SBGVDO.js} +471 -186
- package/dist/chunk-V2SBGVDO.js.map +1 -0
- package/dist/chunk-VJLWD47W.js +23 -0
- package/dist/chunk-VJLWD47W.js.map +1 -0
- package/dist/{chunk-4CQAV7YB.js → chunk-W647DX5Z.js} +2 -2
- package/dist/{chunk-THATMZXD.js → chunk-WFIIU3YZ.js} +2 -2
- package/dist/{chunk-THATMZXD.js.map → chunk-WFIIU3YZ.js.map} +1 -1
- package/dist/chunk-YZDJMAKL.js +82 -0
- package/dist/chunk-YZDJMAKL.js.map +1 -0
- package/dist/{chunk-3TMODYZV.js → chunk-Z5XH6VHY.js} +5 -5
- package/dist/chunk-Z5XH6VHY.js.map +1 -0
- package/dist/{chunk-BE3HW4FY.js → chunk-ZBBMZMA6.js} +377 -170
- package/dist/chunk-ZBBMZMA6.js.map +1 -0
- package/dist/index.cjs +21224 -11714
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +195 -49
- package/dist/index.d.ts +195 -49
- package/dist/index.js +150 -74
- package/dist/index.js.map +1 -1
- package/dist/{ir-BMP7yxJJ.d.cts → ir-BSosEwc8.d.cts} +1 -1
- package/dist/{ir-DUOz6H-5.d.ts → ir-D-uqwL_4.d.ts} +1 -1
- package/dist/{module-B8CBqIZ_.d.cts → module-Ds4tarcI.d.cts} +230 -140
- package/dist/{module-k7m3txak.d.ts → module-Zd1Gn-Nj.d.ts} +230 -140
- package/package.json +20 -4
- package/dist/ModuleTag-C8FHY_sY.d.ts +0 -93
- package/dist/ModuleTag-EGbgBMpZ.d.cts +0 -93
- package/dist/Observability-COqEvp2C.d.cts +0 -713
- package/dist/Observability-cY4kLn0S.d.ts +0 -713
- package/dist/ReadQuery-BlMwhe-F.d.ts +0 -30
- package/dist/ReadQuery-CL5XlXts.d.cts +0 -30
- package/dist/ReadQuery-SinbStGF.d.cts +0 -38
- package/dist/ReadQuery-SinbStGF.d.ts +0 -38
- package/dist/chunk-24VULZ7A.js.map +0 -1
- package/dist/chunk-3QMIVH35.js +0 -43
- package/dist/chunk-3QMIVH35.js.map +0 -1
- package/dist/chunk-3TMODYZV.js.map +0 -1
- package/dist/chunk-4SO6JMZL.js.map +0 -1
- package/dist/chunk-76WT3HOR.js.map +0 -1
- package/dist/chunk-ANLBCBDC.js.map +0 -1
- package/dist/chunk-AUIR5O6W.js.map +0 -1
- package/dist/chunk-BABLDP24.js.map +0 -1
- package/dist/chunk-BE3HW4FY.js.map +0 -1
- package/dist/chunk-BZ2SHDN2.js.map +0 -1
- package/dist/chunk-CW6T36TN.js.map +0 -1
- package/dist/chunk-DFNM3WX2.js.map +0 -1
- package/dist/chunk-DMBALCE2.js.map +0 -1
- package/dist/chunk-EGK3KN7B.js +0 -406
- package/dist/chunk-EGK3KN7B.js.map +0 -1
- package/dist/chunk-GMPEOUP2.js.map +0 -1
- package/dist/chunk-IHVBV5C2.js.map +0 -1
- package/dist/chunk-JCXGZRMU.js.map +0 -1
- package/dist/chunk-JGIWG6SR.js.map +0 -1
- package/dist/chunk-JWOYLO27.js.map +0 -1
- package/dist/chunk-KIXAU3GM.js +0 -137
- package/dist/chunk-KIXAU3GM.js.map +0 -1
- package/dist/chunk-KL5ACTCT.js +0 -8
- package/dist/chunk-KL5ACTCT.js.map +0 -1
- package/dist/chunk-KP7MUZNX.js.map +0 -1
- package/dist/chunk-M3BFQ7HK.js +0 -13
- package/dist/chunk-M3BFQ7HK.js.map +0 -1
- package/dist/chunk-M3WTHJHJ.js.map +0 -1
- package/dist/chunk-NBD3KUOZ.js.map +0 -1
- package/dist/chunk-NQZ2OSGR.js +0 -151
- package/dist/chunk-NQZ2OSGR.js.map +0 -1
- package/dist/chunk-NZJKFF45.js.map +0 -1
- package/dist/chunk-OFADUJWJ.js.map +0 -1
- package/dist/chunk-OGWBVHB3.js.map +0 -1
- package/dist/chunk-PAYXCY6A.js.map +0 -1
- package/dist/chunk-PYOE4VSI.js.map +0 -1
- package/dist/chunk-QCHIQWAJ.js +0 -21
- package/dist/chunk-RNFE3ML2.js.map +0 -1
- package/dist/chunk-TKZ7MEIA.js +0 -27
- package/dist/chunk-TKZ7MEIA.js.map +0 -1
- package/dist/chunk-TQOBJYDP.js.map +0 -1
- package/dist/chunk-VZB726PE.js +0 -93
- package/dist/chunk-VZB726PE.js.map +0 -1
- package/dist/chunk-W3TEWHLO.js +0 -568
- package/dist/chunk-W3TEWHLO.js.map +0 -1
- package/dist/chunk-YS3AZQ2G.js.map +0 -1
- package/dist/chunk-ZFLHVFUC.js +0 -192
- package/dist/chunk-ZFLHVFUC.js.map +0 -1
- package/dist/chunk-ZFY7U2FR.js.map +0 -1
- package/dist/chunk-ZGDVUPTM.js.map +0 -1
- package/dist/protocol-g_1897M2.d.cts +0 -127
- package/dist/protocol-g_1897M2.d.ts +0 -127
- /package/dist/{chunk-3IYZ5IGG.js.map → chunk-5WKUGEBY.js.map} +0 -0
- /package/dist/{chunk-3RMKLXHX.js.map → chunk-63ZQ5RIN.js.map} +0 -0
- /package/dist/{chunk-EY4NZKDR.js.map → chunk-6Y2TKCNY.js.map} +0 -0
- /package/dist/{chunk-G5ZBFPNU.js.map → chunk-A2RQOJC7.js.map} +0 -0
- /package/dist/{chunk-TAAPQVZN.js.map → chunk-AYELIQXR.js.map} +0 -0
- /package/dist/{chunk-66ALHVEX.js.map → chunk-EB46EYI7.js.map} +0 -0
- /package/dist/{chunk-IPF7E66P.js.map → chunk-FYAODKVP.js.map} +0 -0
- /package/dist/{chunk-M7IYCTJV.js.map → chunk-R4LFQGP3.js.map} +0 -0
- /package/dist/{chunk-M2RGJPXX.js.map → chunk-SJAE5PB5.js.map} +0 -0
- /package/dist/{chunk-ZDTRWK5F.js.map → chunk-TAHFWKS6.js.map} +0 -0
- /package/dist/{chunk-4CQAV7YB.js.map → chunk-W647DX5Z.js.map} +0 -0
|
@@ -1,63 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
forceSourceRefresh,
|
|
3
|
-
inSyncTransactionFiber,
|
|
4
|
-
makeTaskRunner
|
|
5
|
-
} from "./chunk-ZFLHVFUC.js";
|
|
6
1
|
import {
|
|
7
2
|
Tag
|
|
8
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UEFFTVPY.js";
|
|
9
4
|
import {
|
|
10
5
|
resolve
|
|
11
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AFSB6NKM.js";
|
|
12
7
|
import {
|
|
13
8
|
makeMatch,
|
|
14
9
|
makeMatchTag
|
|
15
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SGTRAXXX.js";
|
|
16
11
|
import {
|
|
17
12
|
isActionToken
|
|
18
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6HFAW2MH.js";
|
|
19
14
|
import {
|
|
20
|
-
isFieldPathSegment
|
|
21
|
-
|
|
15
|
+
isFieldPathSegment,
|
|
16
|
+
toKey
|
|
17
|
+
} from "./chunk-SOOBFXRR.js";
|
|
22
18
|
import {
|
|
23
19
|
getRuntimeInternals,
|
|
24
20
|
setBoundInternals
|
|
25
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-63ZQ5RIN.js";
|
|
26
22
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
forceSourceRefresh,
|
|
24
|
+
inSyncTransactionFiber,
|
|
25
|
+
isDevEnv,
|
|
26
|
+
makeTaskRunner
|
|
27
|
+
} from "./chunk-S4S5N4BJ.js";
|
|
29
28
|
import {
|
|
30
29
|
make
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FBYW3QDI.js";
|
|
31
|
+
import {
|
|
32
|
+
RunSessionTag
|
|
33
|
+
} from "./chunk-CYYSQMLO.js";
|
|
32
34
|
import {
|
|
33
35
|
currentDiagnosticsLevel,
|
|
34
36
|
record,
|
|
35
37
|
toSerializableErrorSummary
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import {
|
|
38
|
-
RunSessionTag
|
|
39
|
-
} from "./chunk-OFADUJWJ.js";
|
|
38
|
+
} from "./chunk-V2SBGVDO.js";
|
|
40
39
|
|
|
41
40
|
// src/internal/runtime/core/mutativePatches.ts
|
|
42
41
|
import { create } from "mutative";
|
|
43
42
|
var mutateWithoutPatches = (base, mutator) => {
|
|
44
43
|
return create(base, mutator);
|
|
45
44
|
};
|
|
45
|
+
var isNonNegativeIntString = (text) => {
|
|
46
|
+
if (!text) return false;
|
|
47
|
+
for (let i = 0; i < text.length; i++) {
|
|
48
|
+
const c = text.charCodeAt(i);
|
|
49
|
+
if (c < 48 || c > 57) return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
};
|
|
46
53
|
var toPatchFieldPath = (path) => {
|
|
47
54
|
if (typeof path === "string") {
|
|
48
55
|
const trimmed = path.trim();
|
|
49
56
|
return trimmed.length > 0 ? "*" : void 0;
|
|
50
57
|
}
|
|
51
58
|
if (!Array.isArray(path)) return void 0;
|
|
59
|
+
let allValidString = true;
|
|
60
|
+
for (let i = 0; i < path.length; i++) {
|
|
61
|
+
const seg = path[i];
|
|
62
|
+
if (typeof seg !== "string" || !(isFieldPathSegment(seg) || isNonNegativeIntString(seg))) {
|
|
63
|
+
allValidString = false;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (allValidString) return path;
|
|
52
68
|
const parts = [];
|
|
53
|
-
for (
|
|
69
|
+
for (let i = 0; i < path.length; i++) {
|
|
70
|
+
const seg = path[i];
|
|
54
71
|
if (typeof seg === "string") {
|
|
55
|
-
if (isFieldPathSegment(seg)
|
|
72
|
+
if (isFieldPathSegment(seg) || isNonNegativeIntString(seg)) {
|
|
73
|
+
parts.push(seg);
|
|
74
|
+
}
|
|
56
75
|
continue;
|
|
57
76
|
}
|
|
77
|
+
if (typeof seg === "number" && Number.isFinite(seg)) {
|
|
78
|
+
const n = Math.floor(seg);
|
|
79
|
+
if (n >= 0 && n <= 2147483647) {
|
|
80
|
+
parts.push(String(n));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
58
83
|
}
|
|
59
|
-
|
|
60
|
-
return parts;
|
|
84
|
+
return parts.length === 0 ? "*" : parts;
|
|
61
85
|
};
|
|
62
86
|
var mutateWithPatchPaths = (base, mutator) => {
|
|
63
87
|
const out = create(base, mutator, {
|
|
@@ -71,25 +95,63 @@ var mutateWithPatchPaths = (base, mutator) => {
|
|
|
71
95
|
}
|
|
72
96
|
const nextState = out[0];
|
|
73
97
|
const patches = out[1] ?? [];
|
|
74
|
-
|
|
75
|
-
|
|
98
|
+
if (patches.length > 256) {
|
|
99
|
+
let sawStar2 = false;
|
|
100
|
+
const patchPaths2 = [];
|
|
101
|
+
for (let i = 0; i < patches.length; i++) {
|
|
102
|
+
const patch = patches[i];
|
|
103
|
+
const p = toPatchFieldPath(patch?.path);
|
|
104
|
+
if (!p) continue;
|
|
105
|
+
if (p === "*") {
|
|
106
|
+
if (sawStar2) continue;
|
|
107
|
+
sawStar2 = true;
|
|
108
|
+
}
|
|
109
|
+
patchPaths2.push(p);
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
nextState,
|
|
113
|
+
patchPaths: patchPaths2
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
let sawStar = false;
|
|
117
|
+
const singleSeg = /* @__PURE__ */ new Set();
|
|
118
|
+
const multiSeg = /* @__PURE__ */ new Set();
|
|
119
|
+
const patchPaths = [];
|
|
120
|
+
for (let i = 0; i < patches.length; i++) {
|
|
121
|
+
const patch = patches[i];
|
|
76
122
|
const p = toPatchFieldPath(patch?.path);
|
|
77
123
|
if (!p) continue;
|
|
78
|
-
|
|
79
|
-
|
|
124
|
+
if (p === "*") {
|
|
125
|
+
if (sawStar) continue;
|
|
126
|
+
sawStar = true;
|
|
127
|
+
patchPaths.push(p);
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (p.length === 1) {
|
|
131
|
+
const seg = p[0];
|
|
132
|
+
if (singleSeg.has(seg)) continue;
|
|
133
|
+
singleSeg.add(seg);
|
|
134
|
+
patchPaths.push(p);
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const key = toKey(p);
|
|
138
|
+
if (multiSeg.has(key)) continue;
|
|
139
|
+
multiSeg.add(key);
|
|
140
|
+
patchPaths.push(p);
|
|
80
141
|
}
|
|
81
142
|
return {
|
|
82
143
|
nextState,
|
|
83
|
-
patchPaths
|
|
144
|
+
patchPaths
|
|
84
145
|
};
|
|
85
146
|
};
|
|
86
147
|
|
|
87
148
|
// src/internal/runtime/core/BoundApiRuntime.ts
|
|
88
|
-
import {
|
|
149
|
+
import { Deferred, Effect as Effect3, Option, Schema, ServiceMap as ServiceMap3, Stream } from "effect";
|
|
89
150
|
|
|
90
151
|
// src/internal/runtime/core/Lifecycle.ts
|
|
91
|
-
import { Cause,
|
|
92
|
-
var LifecycleContext =
|
|
152
|
+
import { Cause, Effect, Ref, ServiceMap } from "effect";
|
|
153
|
+
var LifecycleContext = class extends ServiceMap.Service()("@logixjs/LifecycleManager") {
|
|
154
|
+
};
|
|
93
155
|
var safeRun = (label, eff) => eff.pipe(
|
|
94
156
|
Effect.matchCauseEffect({
|
|
95
157
|
onSuccess: () => Effect.void,
|
|
@@ -197,7 +259,7 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
197
259
|
});
|
|
198
260
|
};
|
|
199
261
|
const notifyError = (cause, context) => {
|
|
200
|
-
if (Cause.
|
|
262
|
+
if (Cause.hasInterruptsOnly(cause)) {
|
|
201
263
|
return Effect.void;
|
|
202
264
|
}
|
|
203
265
|
return record({
|
|
@@ -212,11 +274,11 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
212
274
|
opSeq: context.opSeq,
|
|
213
275
|
origin: context.origin
|
|
214
276
|
}).pipe(
|
|
215
|
-
Effect.
|
|
216
|
-
Effect.forEach(
|
|
277
|
+
Effect.flatMap(
|
|
278
|
+
() => Effect.forEach(
|
|
217
279
|
onErrorHandlers,
|
|
218
280
|
(handler) => handler(cause, context).pipe(
|
|
219
|
-
Effect.
|
|
281
|
+
Effect.catchCause((inner) => Effect.logError(`[lifecycle.onError] failed: ${Cause.pretty(inner)}`))
|
|
220
282
|
),
|
|
221
283
|
{ discard: true }
|
|
222
284
|
)
|
|
@@ -275,21 +337,19 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
275
337
|
const runStart = recordPhase("run", "start:schedule", {
|
|
276
338
|
total: start.length
|
|
277
339
|
}).pipe(
|
|
278
|
-
Effect.
|
|
279
|
-
Effect.forEach(
|
|
340
|
+
Effect.flatMap(
|
|
341
|
+
() => Effect.forEach(
|
|
280
342
|
start,
|
|
281
343
|
(task) => Effect.forkScoped(
|
|
282
344
|
task.effect.pipe(
|
|
283
|
-
Effect.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
})
|
|
292
|
-
)
|
|
345
|
+
Effect.catchCause((cause) => notifyError(cause, {
|
|
346
|
+
phase: "run",
|
|
347
|
+
hook: "start",
|
|
348
|
+
moduleId: identity.moduleId,
|
|
349
|
+
instanceId: identity.instanceId,
|
|
350
|
+
taskId: task.taskId,
|
|
351
|
+
origin: "start"
|
|
352
|
+
}))
|
|
293
353
|
)
|
|
294
354
|
).pipe(Effect.asVoid),
|
|
295
355
|
{ discard: true, concurrency: "unbounded" }
|
|
@@ -304,16 +364,14 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
304
364
|
yield* safeRun(
|
|
305
365
|
"lifecycle.onDestroy",
|
|
306
366
|
task.effect.pipe(
|
|
307
|
-
Effect.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
})
|
|
316
|
-
)
|
|
367
|
+
Effect.catchCause((cause) => notifyError(cause, {
|
|
368
|
+
phase: "destroy",
|
|
369
|
+
hook: "destroy",
|
|
370
|
+
moduleId: identity.moduleId,
|
|
371
|
+
instanceId: identity.instanceId,
|
|
372
|
+
taskId: task.taskId,
|
|
373
|
+
origin: "destroy"
|
|
374
|
+
}))
|
|
317
375
|
)
|
|
318
376
|
);
|
|
319
377
|
}
|
|
@@ -327,16 +385,14 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
327
385
|
yield* safeRun(
|
|
328
386
|
"lifecycle.onSuspend",
|
|
329
387
|
task.effect.pipe(
|
|
330
|
-
Effect.
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
})
|
|
339
|
-
)
|
|
388
|
+
Effect.catchCause((cause) => notifyError(cause, {
|
|
389
|
+
phase: "platform",
|
|
390
|
+
hook: "suspend",
|
|
391
|
+
moduleId: identity.moduleId,
|
|
392
|
+
instanceId: identity.instanceId,
|
|
393
|
+
taskId: task.taskId,
|
|
394
|
+
origin: "platform.suspend"
|
|
395
|
+
}))
|
|
340
396
|
)
|
|
341
397
|
);
|
|
342
398
|
}
|
|
@@ -348,16 +404,14 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
348
404
|
yield* safeRun(
|
|
349
405
|
"lifecycle.onResume",
|
|
350
406
|
task.effect.pipe(
|
|
351
|
-
Effect.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
})
|
|
360
|
-
)
|
|
407
|
+
Effect.catchCause((cause) => notifyError(cause, {
|
|
408
|
+
phase: "platform",
|
|
409
|
+
hook: "resume",
|
|
410
|
+
moduleId: identity.moduleId,
|
|
411
|
+
instanceId: identity.instanceId,
|
|
412
|
+
taskId: task.taskId,
|
|
413
|
+
origin: "platform.resume"
|
|
414
|
+
}))
|
|
361
415
|
)
|
|
362
416
|
);
|
|
363
417
|
}
|
|
@@ -369,16 +423,14 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
369
423
|
yield* safeRun(
|
|
370
424
|
"lifecycle.onReset",
|
|
371
425
|
task.effect.pipe(
|
|
372
|
-
Effect.
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
})
|
|
381
|
-
)
|
|
426
|
+
Effect.catchCause((cause) => notifyError(cause, {
|
|
427
|
+
phase: "platform",
|
|
428
|
+
hook: "reset",
|
|
429
|
+
moduleId: identity.moduleId,
|
|
430
|
+
instanceId: identity.instanceId,
|
|
431
|
+
taskId: task.taskId,
|
|
432
|
+
origin: "platform.reset"
|
|
433
|
+
}))
|
|
382
434
|
)
|
|
383
435
|
);
|
|
384
436
|
}
|
|
@@ -417,13 +469,13 @@ var makeLifecycleManager = (identity) => Effect.gen(function* () {
|
|
|
417
469
|
});
|
|
418
470
|
|
|
419
471
|
// src/internal/runtime/core/LogicDiagnostics.ts
|
|
420
|
-
import { Cause as Cause2,
|
|
472
|
+
import { Cause as Cause2, Effect as Effect2, ServiceMap as ServiceMap2 } from "effect";
|
|
421
473
|
var phaseDiagnosticsEnabled = () => isDevEnv();
|
|
422
474
|
var SERVICE_NOT_FOUND_PREFIX = "Service not found:";
|
|
423
475
|
var emitEnvServiceNotFoundDiagnosticIfNeeded = (cause, moduleId) => Effect2.gen(function* () {
|
|
424
476
|
let pretty;
|
|
425
477
|
try {
|
|
426
|
-
pretty = Cause2.pretty(cause
|
|
478
|
+
pretty = Cause2.pretty(cause);
|
|
427
479
|
} catch {
|
|
428
480
|
return;
|
|
429
481
|
}
|
|
@@ -448,8 +500,9 @@ var emitEnvServiceNotFoundDiagnosticIfNeeded = (cause, moduleId) => Effect2.gen(
|
|
|
448
500
|
kind: "env_service_not_ready"
|
|
449
501
|
});
|
|
450
502
|
});
|
|
451
|
-
var LogicPhaseServiceTag =
|
|
452
|
-
|
|
503
|
+
var LogicPhaseServiceTag = class extends ServiceMap2.Service()("@logixjs/LogicPhaseService") {
|
|
504
|
+
};
|
|
505
|
+
var LogicUnitServiceTag = class extends ServiceMap2.Service()("@logixjs/LogicUnitService") {
|
|
453
506
|
};
|
|
454
507
|
var makeLogicPhaseError = (kind, api, phase, moduleId) => Object.assign(new Error(`[LogicPhaseError] ${api} is not allowed in ${phase} phase (kind=${kind}).`), {
|
|
455
508
|
_tag: "LogicPhaseError",
|
|
@@ -462,7 +515,7 @@ var emitInvalidPhaseDiagnosticIfNeeded = (cause, moduleId) => Effect2.gen(functi
|
|
|
462
515
|
if (!phaseDiagnosticsEnabled()) {
|
|
463
516
|
return;
|
|
464
517
|
}
|
|
465
|
-
const allErrors =
|
|
518
|
+
const allErrors = cause.reasons.filter((reason) => Cause2.isFailReason(reason) || Cause2.isDieReason(reason)).map((reason) => Cause2.isFailReason(reason) ? reason.error : reason.defect);
|
|
466
519
|
for (const err of allErrors) {
|
|
467
520
|
const logicErr = err;
|
|
468
521
|
if (logicErr && logicErr._tag === "LogicPhaseError") {
|
|
@@ -483,6 +536,16 @@ var emitInvalidPhaseDiagnosticIfNeeded = (cause, moduleId) => Effect2.gen(functi
|
|
|
483
536
|
});
|
|
484
537
|
|
|
485
538
|
// src/internal/runtime/core/BoundApiRuntime.ts
|
|
539
|
+
var DIRECT_STATE_WRITE_EFFECT = /* @__PURE__ */ Symbol.for("logix.directStateWriteEffect");
|
|
540
|
+
var markDirectStateWriteEffect = (effect, metadata) => {
|
|
541
|
+
;
|
|
542
|
+
effect[DIRECT_STATE_WRITE_EFFECT] = metadata;
|
|
543
|
+
return effect;
|
|
544
|
+
};
|
|
545
|
+
var getDirectStateWriteMetadata = (value) => {
|
|
546
|
+
if (!value || typeof value !== "object" && typeof value !== "function") return void 0;
|
|
547
|
+
return value[DIRECT_STATE_WRITE_EFFECT];
|
|
548
|
+
};
|
|
486
549
|
var LogicBuilderFactory = (runtime, runtimeInternals) => {
|
|
487
550
|
const flowApi = make(runtime, runtimeInternals);
|
|
488
551
|
return (stream, triggerName) => {
|
|
@@ -510,8 +573,30 @@ var LogicBuilderFactory = (runtime, runtimeInternals) => {
|
|
|
510
573
|
runParallel(eff, options) {
|
|
511
574
|
return flowApi.runParallel(eff, options)(stream);
|
|
512
575
|
},
|
|
513
|
-
runFork: (eff) =>
|
|
514
|
-
|
|
576
|
+
runFork: (eff) => {
|
|
577
|
+
if (runtimeInternals && triggerName && typeof eff !== "function" && getDirectStateWriteMetadata(eff) != null) {
|
|
578
|
+
return Effect3.sync(() => {
|
|
579
|
+
const metadata = getDirectStateWriteMetadata(eff);
|
|
580
|
+
runtimeInternals.txn.registerActionStateWriteback(
|
|
581
|
+
triggerName,
|
|
582
|
+
metadata.kind === "update" ? { kind: "update", run: metadata.run } : { kind: "mutate", run: metadata.run }
|
|
583
|
+
);
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
return Effect3.forkScoped(flowApi.run(eff)(stream)).pipe(Effect3.asVoid);
|
|
587
|
+
},
|
|
588
|
+
runParallelFork: (eff) => {
|
|
589
|
+
if (runtimeInternals && triggerName && typeof eff !== "function" && getDirectStateWriteMetadata(eff) != null) {
|
|
590
|
+
return Effect3.sync(() => {
|
|
591
|
+
const metadata = getDirectStateWriteMetadata(eff);
|
|
592
|
+
runtimeInternals.txn.registerActionStateWriteback(
|
|
593
|
+
triggerName,
|
|
594
|
+
metadata.kind === "update" ? { kind: "update", run: metadata.run } : { kind: "mutate", run: metadata.run }
|
|
595
|
+
);
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
return Effect3.forkScoped(flowApi.runParallel(eff)(stream)).pipe(Effect3.asVoid);
|
|
599
|
+
},
|
|
515
600
|
runTask: (config) => makeTaskRunner(stream, "task", taskRunnerRuntime, {
|
|
516
601
|
...config,
|
|
517
602
|
triggerName: config.triggerName ?? triggerName
|
|
@@ -551,7 +636,7 @@ var LogicBuilderFactory = (runtime, runtimeInternals) => {
|
|
|
551
636
|
yield* runtime.setState(next);
|
|
552
637
|
})
|
|
553
638
|
)
|
|
554
|
-
).pipe(Effect3.
|
|
639
|
+
).pipe(Effect3.catchCause((cause) => Effect3.logError("Flow error", cause))),
|
|
555
640
|
mutate: (reducer) => Stream.runForEach(
|
|
556
641
|
stream,
|
|
557
642
|
(payload) => taskRunnerRuntime.runWithStateTransaction(
|
|
@@ -572,7 +657,7 @@ var LogicBuilderFactory = (runtime, runtimeInternals) => {
|
|
|
572
657
|
updateDraft(nextState);
|
|
573
658
|
})
|
|
574
659
|
)
|
|
575
|
-
).pipe(Effect3.
|
|
660
|
+
).pipe(Effect3.catchCause((cause) => Effect3.logError("Flow error", cause)))
|
|
576
661
|
};
|
|
577
662
|
const pipe = function() {
|
|
578
663
|
const fns = arguments;
|
|
@@ -603,12 +688,10 @@ function make2(shape, runtime, options) {
|
|
|
603
688
|
const flowApi = make(runtime, runtimeInternals);
|
|
604
689
|
const makeIntentBuilder = (runtime_) => LogicBuilderFactory(runtime_, runtimeInternals);
|
|
605
690
|
const withLifecycle = (available, missing) => Effect3.serviceOption(LifecycleContext).pipe(
|
|
606
|
-
Effect3.flatMap(
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
})
|
|
611
|
-
)
|
|
691
|
+
Effect3.flatMap((maybe) => Option.match(maybe, {
|
|
692
|
+
onSome: available,
|
|
693
|
+
onNone: missing
|
|
694
|
+
}))
|
|
612
695
|
);
|
|
613
696
|
const withPlatform = (invoke) => Effect3.serviceOption(Tag).pipe(
|
|
614
697
|
Effect3.flatMap(
|
|
@@ -627,14 +710,29 @@ function make2(shape, runtime, options) {
|
|
|
627
710
|
message: `${api2} is setup-only and is not allowed in run phase.`,
|
|
628
711
|
hint: "Move $.lifecycle.* calls to the synchronous part of Module.logic builder (before return) for registration; for dynamic resource cleanup in the run phase, use Effect.acquireRelease / Scope finalizer instead of registering onDestroy late.",
|
|
629
712
|
kind: "lifecycle_in_run"
|
|
630
|
-
});
|
|
713
|
+
}).pipe(Effect3.orDie);
|
|
631
714
|
const createIntentBuilder = (stream, triggerName) => makeIntentBuilder(runtime)(stream, triggerName);
|
|
715
|
+
const actionMatchesTag = (action, tag) => {
|
|
716
|
+
const actionTag = action?._tag;
|
|
717
|
+
if (actionTag === tag) {
|
|
718
|
+
return true;
|
|
719
|
+
}
|
|
720
|
+
const actionType = action?.type;
|
|
721
|
+
return actionType === tag;
|
|
722
|
+
};
|
|
723
|
+
const actionStreamByTag = (tag) => {
|
|
724
|
+
const topicSelector = runtime.actionsByTag$;
|
|
725
|
+
if (typeof topicSelector === "function") {
|
|
726
|
+
return topicSelector(tag);
|
|
727
|
+
}
|
|
728
|
+
return runtime.actions$.pipe(Stream.filter((action) => actionMatchesTag(action, tag)));
|
|
729
|
+
};
|
|
632
730
|
const onceInRunSession = (key) => Effect3.serviceOption(RunSessionTag).pipe(
|
|
633
731
|
Effect3.map((maybe) => Option.isSome(maybe) ? maybe.value.local.once(key) : true)
|
|
634
732
|
);
|
|
635
733
|
let cachedDiagnosticsLevel;
|
|
636
734
|
const isModuleLike = (value) => Boolean(
|
|
637
|
-
value && typeof value === "object" && (value._kind === "ModuleDef" || value._kind === "Module") && "tag" in value &&
|
|
735
|
+
value && typeof value === "object" && (value._kind === "ModuleDef" || value._kind === "Module") && "tag" in value && ServiceMap3.isKey(value.tag)
|
|
638
736
|
);
|
|
639
737
|
const buildModuleHandle = (tag, rt) => {
|
|
640
738
|
const actionsProxy = new Proxy(
|
|
@@ -746,44 +844,161 @@ function make2(shape, runtime, options) {
|
|
|
746
844
|
err.name = "MissingModuleRuntimeError";
|
|
747
845
|
return yield* Effect3.die(err);
|
|
748
846
|
});
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
if (
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
847
|
+
let batchedStateWritebackCoordinator;
|
|
848
|
+
const getOrCreateBatchedStateWritebackCoordinator = () => {
|
|
849
|
+
if (batchedStateWritebackCoordinator) return batchedStateWritebackCoordinator;
|
|
850
|
+
if (!runtimeInternals) {
|
|
851
|
+
throw new Error("[BatchedStateWritebackCoordinator] Missing runtimeInternals (expected in ModuleRuntime-backed $).");
|
|
852
|
+
}
|
|
853
|
+
let inFlight = false;
|
|
854
|
+
const pending = [];
|
|
855
|
+
const drain = () => {
|
|
856
|
+
if (pending.length === 0) return [];
|
|
857
|
+
return pending.splice(0, pending.length);
|
|
858
|
+
};
|
|
859
|
+
const ok = { _tag: "ok" };
|
|
860
|
+
const fail = (cause) => ({ _tag: "failure", cause });
|
|
861
|
+
const applyBatch = (batch) => Effect3.gen(function* () {
|
|
862
|
+
if (batch.length === 0) return;
|
|
863
|
+
let current = yield* runtime.getState;
|
|
864
|
+
for (let i = 0; i < batch.length; i++) {
|
|
865
|
+
const req = batch[i];
|
|
866
|
+
if (req.kind === "update") {
|
|
867
|
+
const next = req.update(current);
|
|
868
|
+
current = next;
|
|
869
|
+
yield* runtime.setState(next);
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
const { nextState, patchPaths } = mutateWithPatchPaths(current, (draft) => {
|
|
873
|
+
req.mutate(draft);
|
|
768
874
|
});
|
|
769
875
|
for (const path of patchPaths) {
|
|
770
|
-
|
|
876
|
+
runtimeInternals.txn.recordStatePatch(path, "unknown");
|
|
771
877
|
}
|
|
772
|
-
updateDraft
|
|
773
|
-
|
|
878
|
+
runtimeInternals.txn.updateDraft(nextState);
|
|
879
|
+
current = nextState;
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
const flushInFlight = () => Effect3.uninterruptible(
|
|
883
|
+
Effect3.gen(function* () {
|
|
884
|
+
if (inFlight) return;
|
|
885
|
+
inFlight = true;
|
|
886
|
+
try {
|
|
887
|
+
while (true) {
|
|
888
|
+
const batch = drain();
|
|
889
|
+
if (batch.length === 0) {
|
|
890
|
+
inFlight = false;
|
|
891
|
+
if (pending.length === 0) return;
|
|
892
|
+
inFlight = true;
|
|
893
|
+
continue;
|
|
894
|
+
}
|
|
895
|
+
const originName = batch.length === 1 ? batch[0].kind === "update" ? "update" : "mutate" : "writeback:batched";
|
|
896
|
+
const exit = yield* Effect3.exit(
|
|
897
|
+
runtimeInternals.txn.runWithStateTransaction(
|
|
898
|
+
{
|
|
899
|
+
kind: "state",
|
|
900
|
+
name: originName,
|
|
901
|
+
details: { batched: true, count: batch.length }
|
|
902
|
+
},
|
|
903
|
+
() => applyBatch(batch).pipe(Effect3.asVoid)
|
|
904
|
+
)
|
|
905
|
+
);
|
|
906
|
+
const outcome = exit._tag === "Success" ? ok : fail(exit.cause);
|
|
907
|
+
for (let i = 0; i < batch.length; i++) {
|
|
908
|
+
yield* Deferred.succeed(batch[i].done, outcome);
|
|
909
|
+
}
|
|
910
|
+
if (outcome._tag === "failure") {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
} finally {
|
|
915
|
+
inFlight = false;
|
|
916
|
+
}
|
|
917
|
+
})
|
|
918
|
+
);
|
|
919
|
+
const waitForMicrotask = () => Effect3.promise(
|
|
920
|
+
() => new Promise((resolve2) => {
|
|
921
|
+
if (typeof queueMicrotask === "function") {
|
|
922
|
+
queueMicrotask(resolve2);
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
925
|
+
Promise.resolve().then(resolve2);
|
|
926
|
+
})
|
|
927
|
+
);
|
|
928
|
+
const enqueueAndAwait = (req) => Effect3.gen(function* () {
|
|
929
|
+
pending.push(req);
|
|
930
|
+
if (!inFlight) {
|
|
931
|
+
yield* waitForMicrotask();
|
|
774
932
|
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
933
|
+
yield* flushInFlight();
|
|
934
|
+
const outcome = yield* Deferred.await(req.done);
|
|
935
|
+
if (outcome._tag === "failure") {
|
|
936
|
+
return yield* Effect3.die(outcome.cause);
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
const coordinator = {
|
|
940
|
+
enqueueUpdate: (update) => Effect3.gen(function* () {
|
|
941
|
+
const done = yield* Deferred.make();
|
|
942
|
+
yield* enqueueAndAwait({ kind: "update", update, done });
|
|
943
|
+
}),
|
|
944
|
+
enqueueMutate: (mutate) => Effect3.gen(function* () {
|
|
945
|
+
const done = yield* Deferred.make();
|
|
946
|
+
yield* enqueueAndAwait({ kind: "mutate", mutate, done });
|
|
947
|
+
})
|
|
948
|
+
};
|
|
949
|
+
batchedStateWritebackCoordinator = coordinator;
|
|
950
|
+
return coordinator;
|
|
951
|
+
};
|
|
952
|
+
const stateApi = {
|
|
953
|
+
read: runtime.getState,
|
|
954
|
+
update: (f) => markDirectStateWriteEffect(
|
|
955
|
+
Effect3.gen(function* () {
|
|
956
|
+
const inTxn = yield* Effect3.service(inSyncTransactionFiber).pipe(Effect3.orDie);
|
|
957
|
+
if (inTxn) {
|
|
958
|
+
const prev = yield* runtime.getState;
|
|
959
|
+
return yield* runtime.setState(f(prev));
|
|
960
|
+
}
|
|
961
|
+
const body = () => Effect3.flatMap(runtime.getState, (prev) => runtime.setState(f(prev)));
|
|
962
|
+
if (runtimeInternals && !isDevEnv()) {
|
|
963
|
+
return yield* getOrCreateBatchedStateWritebackCoordinator().enqueueUpdate(f);
|
|
964
|
+
}
|
|
965
|
+
return yield* runtimeInternals ? runtimeInternals.txn.runWithStateTransaction({ kind: "state", name: "update" }, body) : body();
|
|
966
|
+
}),
|
|
967
|
+
{ kind: "update", run: f }
|
|
968
|
+
),
|
|
969
|
+
mutate: (f) => markDirectStateWriteEffect(
|
|
970
|
+
Effect3.gen(function* () {
|
|
971
|
+
const recordPatch = runtimeInternals?.txn.recordStatePatch;
|
|
972
|
+
const updateDraft = runtimeInternals?.txn.updateDraft;
|
|
973
|
+
const inTxn = yield* Effect3.service(inSyncTransactionFiber).pipe(Effect3.orDie);
|
|
974
|
+
if (inTxn) {
|
|
975
|
+
const prev = yield* runtime.getState;
|
|
976
|
+
const { nextState, patchPaths } = mutateWithPatchPaths(prev, (draft) => {
|
|
977
|
+
f(draft);
|
|
978
|
+
});
|
|
979
|
+
for (const path of patchPaths) {
|
|
980
|
+
recordPatch?.(path, "unknown");
|
|
981
|
+
}
|
|
982
|
+
updateDraft?.(nextState);
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
const body = () => Effect3.gen(function* () {
|
|
986
|
+
const prev = yield* runtime.getState;
|
|
987
|
+
const { nextState, patchPaths } = mutateWithPatchPaths(prev, (draft) => {
|
|
988
|
+
f(draft);
|
|
989
|
+
});
|
|
990
|
+
for (const path of patchPaths) {
|
|
991
|
+
recordPatch?.(path, "unknown");
|
|
992
|
+
}
|
|
993
|
+
updateDraft?.(nextState);
|
|
779
994
|
});
|
|
780
|
-
|
|
781
|
-
|
|
995
|
+
if (runtimeInternals && !isDevEnv()) {
|
|
996
|
+
return yield* getOrCreateBatchedStateWritebackCoordinator().enqueueMutate(f);
|
|
782
997
|
}
|
|
783
|
-
|
|
784
|
-
})
|
|
785
|
-
|
|
786
|
-
|
|
998
|
+
return yield* runtimeInternals ? runtimeInternals.txn.runWithStateTransaction({ kind: "state", name: "mutate" }, body) : body();
|
|
999
|
+
}),
|
|
1000
|
+
{ kind: "mutate", run: f }
|
|
1001
|
+
),
|
|
787
1002
|
ref: runtime.ref
|
|
788
1003
|
};
|
|
789
1004
|
const actions = shape.actionMap;
|
|
@@ -827,7 +1042,7 @@ function make2(shape, runtime, options) {
|
|
|
827
1042
|
};
|
|
828
1043
|
const effect = (token, handler) => Effect3.gen(function* () {
|
|
829
1044
|
if (!isActionToken(token)) {
|
|
830
|
-
return yield* Effect3.
|
|
1045
|
+
return yield* Effect3.die(new Error("[BoundApi.effect] token must be an ActionToken"));
|
|
831
1046
|
}
|
|
832
1047
|
const phase = getCurrentPhase();
|
|
833
1048
|
const logicUnit = options?.logicUnit;
|
|
@@ -956,8 +1171,8 @@ function make2(shape, runtime, options) {
|
|
|
956
1171
|
return yield* Effect3.void;
|
|
957
1172
|
}
|
|
958
1173
|
const force = options2?.force === true;
|
|
959
|
-
const runHandler = (state) => force ? Effect3.
|
|
960
|
-
const inTxn = yield*
|
|
1174
|
+
const runHandler = (state) => force ? Effect3.provideService(handler(state), forceSourceRefresh, true) : handler(state);
|
|
1175
|
+
const inTxn = yield* Effect3.service(inSyncTransactionFiber).pipe(Effect3.orDie);
|
|
961
1176
|
if (inTxn) {
|
|
962
1177
|
const state = yield* runtime.getState;
|
|
963
1178
|
return yield* runHandler(state);
|
|
@@ -989,9 +1204,10 @@ function make2(shape, runtime, options) {
|
|
|
989
1204
|
Effect3.tap((rt) => emitModuleDescriptorOnce(domain, rt)),
|
|
990
1205
|
Effect3.map((rt) => buildModuleHandle(tag, rt))
|
|
991
1206
|
);
|
|
992
|
-
const detectAndSelect =
|
|
993
|
-
Effect3.
|
|
1207
|
+
const detectAndSelect = Effect3.service(currentDiagnosticsLevel).pipe(
|
|
1208
|
+
Effect3.map((level) => {
|
|
994
1209
|
cachedDiagnosticsLevel = level;
|
|
1210
|
+
return level;
|
|
995
1211
|
}),
|
|
996
1212
|
Effect3.flatMap((level) => level === "off" ? resolveAndBuild : resolveWithDescriptor)
|
|
997
1213
|
);
|
|
@@ -1005,14 +1221,14 @@ function make2(shape, runtime, options) {
|
|
|
1005
1221
|
return detectAndSelect;
|
|
1006
1222
|
});
|
|
1007
1223
|
}
|
|
1008
|
-
if (
|
|
1224
|
+
if (ServiceMap3.isKey(arg)) {
|
|
1009
1225
|
const candidate = arg;
|
|
1010
1226
|
if (candidate._kind === "ModuleTag") {
|
|
1011
1227
|
return resolveModuleRuntime(arg).pipe(
|
|
1012
1228
|
Effect3.map((rt) => buildModuleHandle(arg, rt))
|
|
1013
1229
|
);
|
|
1014
1230
|
}
|
|
1015
|
-
return arg;
|
|
1231
|
+
return Effect3.service(arg).pipe(Effect3.orDie);
|
|
1016
1232
|
}
|
|
1017
1233
|
return Effect3.die("BoundApi.use: unsupported argument");
|
|
1018
1234
|
}
|
|
@@ -1024,39 +1240,33 @@ function make2(shape, runtime, options) {
|
|
|
1024
1240
|
const arg = args[0];
|
|
1025
1241
|
if (isActionToken(arg)) {
|
|
1026
1242
|
const tag = arg.tag;
|
|
1243
|
+
return createIntentBuilder(actionStreamByTag(tag).pipe(Stream.map((action) => action.payload)), tag);
|
|
1244
|
+
}
|
|
1245
|
+
if (Schema.isSchema(arg)) {
|
|
1246
|
+
const decode = Schema.decodeUnknownSync(arg);
|
|
1027
1247
|
return createIntentBuilder(
|
|
1028
1248
|
runtime.actions$.pipe(
|
|
1029
|
-
Stream.filter((a) =>
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1249
|
+
Stream.filter((a) => {
|
|
1250
|
+
try {
|
|
1251
|
+
decode(a);
|
|
1252
|
+
return true;
|
|
1253
|
+
} catch {
|
|
1254
|
+
return false;
|
|
1255
|
+
}
|
|
1256
|
+
})
|
|
1257
|
+
)
|
|
1033
1258
|
);
|
|
1034
1259
|
}
|
|
1035
1260
|
if (typeof arg === "function") {
|
|
1036
1261
|
return createIntentBuilder(runtime.actions$.pipe(Stream.filter(arg)));
|
|
1037
1262
|
}
|
|
1038
1263
|
if (typeof arg === "string") {
|
|
1039
|
-
return createIntentBuilder(
|
|
1040
|
-
runtime.actions$.pipe(Stream.filter((a) => a._tag === arg || a.type === arg)),
|
|
1041
|
-
arg
|
|
1042
|
-
);
|
|
1264
|
+
return createIntentBuilder(actionStreamByTag(arg), arg);
|
|
1043
1265
|
}
|
|
1044
1266
|
if (typeof arg === "object" && arg !== null) {
|
|
1045
1267
|
if ("_tag" in arg) {
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
String(arg._tag)
|
|
1049
|
-
);
|
|
1050
|
-
}
|
|
1051
|
-
if (Schema.isSchema(arg)) {
|
|
1052
|
-
return createIntentBuilder(
|
|
1053
|
-
runtime.actions$.pipe(
|
|
1054
|
-
Stream.filter((a) => {
|
|
1055
|
-
const result = Schema.decodeUnknownSync(arg)(a);
|
|
1056
|
-
return !!result;
|
|
1057
|
-
})
|
|
1058
|
-
)
|
|
1059
|
-
);
|
|
1268
|
+
const tag = String(arg._tag);
|
|
1269
|
+
return createIntentBuilder(actionStreamByTag(tag), tag);
|
|
1060
1270
|
}
|
|
1061
1271
|
}
|
|
1062
1272
|
return createIntentBuilder(runtime.actions$);
|
|
@@ -1064,10 +1274,7 @@ function make2(shape, runtime, options) {
|
|
|
1064
1274
|
get: (_target, prop) => {
|
|
1065
1275
|
guardRunOnly("use_in_setup", "$.onAction");
|
|
1066
1276
|
if (typeof prop === "string") {
|
|
1067
|
-
return createIntentBuilder(
|
|
1068
|
-
runtime.actions$.pipe(Stream.filter((a) => a._tag === prop || a.type === prop)),
|
|
1069
|
-
prop
|
|
1070
|
-
);
|
|
1277
|
+
return createIntentBuilder(actionStreamByTag(prop), prop);
|
|
1071
1278
|
}
|
|
1072
1279
|
return void 0;
|
|
1073
1280
|
}
|
|
@@ -1096,4 +1303,4 @@ export {
|
|
|
1096
1303
|
emitInvalidPhaseDiagnosticIfNeeded,
|
|
1097
1304
|
make2 as make
|
|
1098
1305
|
};
|
|
1099
|
-
//# sourceMappingURL=chunk-
|
|
1306
|
+
//# sourceMappingURL=chunk-ZBBMZMA6.js.map
|