@logixjs/core 0.0.1
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/Action-BkRHy2vg.d.cts +10 -0
- package/dist/Action-mqVvtEHt.d.ts +10 -0
- package/dist/Action.cjs +57 -0
- package/dist/Action.cjs.map +1 -0
- package/dist/Action.d.cts +2 -0
- package/dist/Action.d.ts +2 -0
- package/dist/Action.js +9 -0
- package/dist/Action.js.map +1 -0
- package/dist/Actions-AsQ07yTP.d.cts +22 -0
- package/dist/Actions-AsQ07yTP.d.ts +22 -0
- package/dist/Actions.cjs +19 -0
- package/dist/Actions.cjs.map +1 -0
- package/dist/Actions.d.cts +2 -0
- package/dist/Actions.d.ts +2 -0
- package/dist/Actions.js +2 -0
- package/dist/Actions.js.map +1 -0
- package/dist/Bound-BN1DQ_lM.d.ts +23 -0
- package/dist/Bound-BPIfH9SS.d.cts +23 -0
- package/dist/Bound.cjs +1532 -0
- package/dist/Bound.cjs.map +1 -0
- package/dist/Bound.d.cts +7 -0
- package/dist/Bound.d.ts +7 -0
- package/dist/Bound.js +25 -0
- package/dist/Bound.js.map +1 -0
- package/dist/Debug-B5q5Bkzx.d.ts +320 -0
- package/dist/Debug-Bq8Sqjcr.d.cts +320 -0
- package/dist/Debug.cjs +1821 -0
- package/dist/Debug.cjs.map +1 -0
- package/dist/Debug.d.cts +13 -0
- package/dist/Debug.d.ts +13 -0
- package/dist/Debug.js +76 -0
- package/dist/Debug.js.map +1 -0
- package/dist/EffectOp.cjs +169 -0
- package/dist/EffectOp.cjs.map +1 -0
- package/dist/EffectOp.d.cts +118 -0
- package/dist/EffectOp.d.ts +118 -0
- package/dist/EffectOp.js +28 -0
- package/dist/EffectOp.js.map +1 -0
- package/dist/Env-DuJ6JrU2.d.cts +10 -0
- package/dist/Env-DuJ6JrU2.d.ts +10 -0
- package/dist/Env.cjs +60 -0
- package/dist/Env.cjs.map +1 -0
- package/dist/Env.d.cts +1 -0
- package/dist/Env.d.ts +1 -0
- package/dist/Env.js +11 -0
- package/dist/Env.js.map +1 -0
- package/dist/Flow-1fZT8MpX.d.cts +152 -0
- package/dist/Flow-BhpjE22E.d.ts +152 -0
- package/dist/Flow.cjs +504 -0
- package/dist/Flow.cjs.map +1 -0
- package/dist/Flow.d.cts +8 -0
- package/dist/Flow.d.ts +8 -0
- package/dist/Flow.js +15 -0
- package/dist/Flow.js.map +1 -0
- package/dist/Handle-D8D1zPb_.d.cts +30 -0
- package/dist/Handle-D_cLW1Z3.d.ts +30 -0
- package/dist/Handle.cjs +42 -0
- package/dist/Handle.cjs.map +1 -0
- package/dist/Handle.d.cts +7 -0
- package/dist/Handle.d.ts +7 -0
- package/dist/Handle.js +10 -0
- package/dist/Handle.js.map +1 -0
- package/dist/Kernel-8kC-jOda.d.cts +171 -0
- package/dist/Kernel-CnGE1Fyk.d.ts +171 -0
- package/dist/Kernel.cjs +284 -0
- package/dist/Kernel.cjs.map +1 -0
- package/dist/Kernel.d.cts +14 -0
- package/dist/Kernel.d.ts +14 -0
- package/dist/Kernel.js +36 -0
- package/dist/Kernel.js.map +1 -0
- package/dist/Link-Db7975nU.d.ts +45 -0
- package/dist/Link-fX8x1eCK.d.cts +45 -0
- package/dist/Link.cjs +542 -0
- package/dist/Link.cjs.map +1 -0
- package/dist/Link.d.cts +7 -0
- package/dist/Link.d.ts +7 -0
- package/dist/Link.js +35 -0
- package/dist/Link.js.map +1 -0
- package/dist/Logic-BRjEMr-W.d.ts +38 -0
- package/dist/Logic-DRh4sDZj.d.cts +38 -0
- package/dist/Logic.cjs +37 -0
- package/dist/Logic.cjs.map +1 -0
- package/dist/Logic.d.cts +7 -0
- package/dist/Logic.d.ts +7 -0
- package/dist/Logic.js +10 -0
- package/dist/Logic.js.map +1 -0
- package/dist/MatchBuilder-0QOc-nlU.d.ts +14 -0
- package/dist/MatchBuilder-CJk5oCkR.d.cts +14 -0
- package/dist/MatchBuilder.cjs +85 -0
- package/dist/MatchBuilder.cjs.map +1 -0
- package/dist/MatchBuilder.d.cts +8 -0
- package/dist/MatchBuilder.d.ts +8 -0
- package/dist/MatchBuilder.js +11 -0
- package/dist/MatchBuilder.js.map +1 -0
- package/dist/Middleware.cjs +411 -0
- package/dist/Middleware.cjs.map +1 -0
- package/dist/Middleware.d.cts +88 -0
- package/dist/Middleware.d.ts +88 -0
- package/dist/Middleware.js +27 -0
- package/dist/Middleware.js.map +1 -0
- package/dist/Module-B_0xRDMR.d.cts +203 -0
- package/dist/Module-DnzluX2J.d.ts +203 -0
- package/dist/Module.cjs +13512 -0
- package/dist/Module.cjs.map +1 -0
- package/dist/Module.d.cts +8 -0
- package/dist/Module.d.ts +8 -0
- package/dist/Module.js +53 -0
- package/dist/Module.js.map +1 -0
- package/dist/ModuleTag-C8FHY_sY.d.ts +93 -0
- package/dist/ModuleTag-EGbgBMpZ.d.cts +93 -0
- package/dist/ModuleTag.cjs +12231 -0
- package/dist/ModuleTag.cjs.map +1 -0
- package/dist/ModuleTag.d.cts +8 -0
- package/dist/ModuleTag.d.ts +8 -0
- package/dist/ModuleTag.js +39 -0
- package/dist/ModuleTag.js.map +1 -0
- package/dist/Observability-COqEvp2C.d.cts +713 -0
- package/dist/Observability-cY4kLn0S.d.ts +713 -0
- package/dist/Observability.cjs +5865 -0
- package/dist/Observability.cjs.map +1 -0
- package/dist/Observability.d.cts +9 -0
- package/dist/Observability.d.ts +9 -0
- package/dist/Observability.js +41 -0
- package/dist/Observability.js.map +1 -0
- package/dist/Platform-C49Pv956.d.cts +21 -0
- package/dist/Platform-C49Pv956.d.ts +21 -0
- package/dist/Platform-CHX8o-U4.d.ts +51 -0
- package/dist/Platform-CVlv0xLQ.d.cts +51 -0
- package/dist/Platform.cjs +58 -0
- package/dist/Platform.cjs.map +1 -0
- package/dist/Platform.d.cts +4 -0
- package/dist/Platform.d.ts +4 -0
- package/dist/Platform.js +15 -0
- package/dist/Platform.js.map +1 -0
- package/dist/Process-CM9xbMdP.d.ts +92 -0
- package/dist/Process-mL8fHDSB.d.cts +92 -0
- package/dist/Process.cjs +575 -0
- package/dist/Process.cjs.map +1 -0
- package/dist/Process.d.cts +8 -0
- package/dist/Process.d.ts +8 -0
- package/dist/Process.js +42 -0
- package/dist/Process.js.map +1 -0
- package/dist/ReadQuery-BlMwhe-F.d.ts +30 -0
- package/dist/ReadQuery-CL5XlXts.d.cts +30 -0
- package/dist/ReadQuery-SinbStGF.d.cts +38 -0
- package/dist/ReadQuery-SinbStGF.d.ts +38 -0
- package/dist/ReadQuery.cjs +377 -0
- package/dist/ReadQuery.cjs.map +1 -0
- package/dist/ReadQuery.d.cts +2 -0
- package/dist/ReadQuery.d.ts +2 -0
- package/dist/ReadQuery.js +14 -0
- package/dist/ReadQuery.js.map +1 -0
- package/dist/Reflection-CQnKwPXj.d.ts +182 -0
- package/dist/Reflection-Kabo1mlU.d.cts +182 -0
- package/dist/Reflection.cjs +2954 -0
- package/dist/Reflection.cjs.map +1 -0
- package/dist/Reflection.d.cts +17 -0
- package/dist/Reflection.d.ts +17 -0
- package/dist/Reflection.js +40 -0
- package/dist/Reflection.js.map +1 -0
- package/dist/Resource-Dy1xD_DG.d.cts +75 -0
- package/dist/Resource-Dy1xD_DG.d.ts +75 -0
- package/dist/Resource.cjs +166 -0
- package/dist/Resource.cjs.map +1 -0
- package/dist/Resource.d.cts +3 -0
- package/dist/Resource.d.ts +3 -0
- package/dist/Resource.js +21 -0
- package/dist/Resource.js.map +1 -0
- package/dist/Root-7ADUMk4t.d.cts +29 -0
- package/dist/Root-7ADUMk4t.d.ts +29 -0
- package/dist/Root.cjs +125 -0
- package/dist/Root.cjs.map +1 -0
- package/dist/Root.d.cts +4 -0
- package/dist/Root.d.ts +4 -0
- package/dist/Root.js +12 -0
- package/dist/Root.js.map +1 -0
- package/dist/Runtime-B-aL-f29.d.cts +274 -0
- package/dist/Runtime-CtyzZG4i.d.ts +274 -0
- package/dist/Runtime.cjs +5740 -0
- package/dist/Runtime.cjs.map +1 -0
- package/dist/Runtime.d.cts +19 -0
- package/dist/Runtime.d.ts +19 -0
- package/dist/Runtime.js +62 -0
- package/dist/Runtime.js.map +1 -0
- package/dist/ScopeRegistry-D1owDNSm.d.cts +61 -0
- package/dist/ScopeRegistry-D1owDNSm.d.ts +61 -0
- package/dist/ScopeRegistry.cjs +152 -0
- package/dist/ScopeRegistry.cjs.map +1 -0
- package/dist/ScopeRegistry.d.cts +2 -0
- package/dist/ScopeRegistry.d.ts +2 -0
- package/dist/ScopeRegistry.js +16 -0
- package/dist/ScopeRegistry.js.map +1 -0
- package/dist/State-CU50R26M.d.cts +19 -0
- package/dist/State-CU50R26M.d.ts +19 -0
- package/dist/State.cjs +19 -0
- package/dist/State.cjs.map +1 -0
- package/dist/State.d.cts +2 -0
- package/dist/State.d.ts +2 -0
- package/dist/State.js +2 -0
- package/dist/State.js.map +1 -0
- package/dist/StateTrait-BGsZghTz.d.ts +122 -0
- package/dist/StateTrait-OWhbj12c.d.cts +122 -0
- package/dist/StateTrait.cjs +2737 -0
- package/dist/StateTrait.cjs.map +1 -0
- package/dist/StateTrait.d.cts +9 -0
- package/dist/StateTrait.d.ts +9 -0
- package/dist/StateTrait.js +39 -0
- package/dist/StateTrait.js.map +1 -0
- package/dist/TraitLifecycle-CwV5WPFX.d.cts +88 -0
- package/dist/TraitLifecycle-LdIWmKlg.d.ts +88 -0
- package/dist/TraitLifecycle.cjs +581 -0
- package/dist/TraitLifecycle.cjs.map +1 -0
- package/dist/TraitLifecycle.d.cts +8 -0
- package/dist/TraitLifecycle.d.ts +8 -0
- package/dist/TraitLifecycle.js +24 -0
- package/dist/TraitLifecycle.js.map +1 -0
- package/dist/action-DiMDD_0v.d.cts +35 -0
- package/dist/action-DiMDD_0v.d.ts +35 -0
- package/dist/chunk-24VULZ7A.js +76 -0
- package/dist/chunk-24VULZ7A.js.map +1 -0
- package/dist/chunk-3IYZ5IGG.js +17 -0
- package/dist/chunk-3IYZ5IGG.js.map +1 -0
- package/dist/chunk-3QMIVH35.js +43 -0
- package/dist/chunk-3QMIVH35.js.map +1 -0
- package/dist/chunk-3RMKLXHX.js +83 -0
- package/dist/chunk-3RMKLXHX.js.map +1 -0
- package/dist/chunk-3TMODYZV.js +111 -0
- package/dist/chunk-3TMODYZV.js.map +1 -0
- package/dist/chunk-3VG5TWQR.js +27 -0
- package/dist/chunk-3VG5TWQR.js.map +1 -0
- package/dist/chunk-4CQAV7YB.js +37 -0
- package/dist/chunk-4CQAV7YB.js.map +1 -0
- package/dist/chunk-4SO6JMZL.js +7 -0
- package/dist/chunk-4SO6JMZL.js.map +1 -0
- package/dist/chunk-66ALHVEX.js +40 -0
- package/dist/chunk-66ALHVEX.js.map +1 -0
- package/dist/chunk-76WT3HOR.js +397 -0
- package/dist/chunk-76WT3HOR.js.map +1 -0
- package/dist/chunk-ANLBCBDC.js +285 -0
- package/dist/chunk-ANLBCBDC.js.map +1 -0
- package/dist/chunk-AUIR5O6W.js +75 -0
- package/dist/chunk-AUIR5O6W.js.map +1 -0
- package/dist/chunk-BABLDP24.js +445 -0
- package/dist/chunk-BABLDP24.js.map +1 -0
- package/dist/chunk-BE3HW4FY.js +1099 -0
- package/dist/chunk-BE3HW4FY.js.map +1 -0
- package/dist/chunk-BZ2SHDN2.js +54 -0
- package/dist/chunk-BZ2SHDN2.js.map +1 -0
- package/dist/chunk-CW6T36TN.js +393 -0
- package/dist/chunk-CW6T36TN.js.map +1 -0
- package/dist/chunk-DFNM3WX2.js +632 -0
- package/dist/chunk-DFNM3WX2.js.map +1 -0
- package/dist/chunk-DMBALCE2.js +1034 -0
- package/dist/chunk-DMBALCE2.js.map +1 -0
- package/dist/chunk-EGK3KN7B.js +406 -0
- package/dist/chunk-EGK3KN7B.js.map +1 -0
- package/dist/chunk-EY4NZKDR.js +19 -0
- package/dist/chunk-EY4NZKDR.js.map +1 -0
- package/dist/chunk-G5ZBFPNU.js +23 -0
- package/dist/chunk-G5ZBFPNU.js.map +1 -0
- package/dist/chunk-GMPEOUP2.js +31 -0
- package/dist/chunk-GMPEOUP2.js.map +1 -0
- package/dist/chunk-IHVBV5C2.js +279 -0
- package/dist/chunk-IHVBV5C2.js.map +1 -0
- package/dist/chunk-IPF7E66P.js +23 -0
- package/dist/chunk-IPF7E66P.js.map +1 -0
- package/dist/chunk-JCXGZRMU.js +204 -0
- package/dist/chunk-JCXGZRMU.js.map +1 -0
- package/dist/chunk-JGIWG6SR.js +6359 -0
- package/dist/chunk-JGIWG6SR.js.map +1 -0
- package/dist/chunk-JWOYLO27.js +241 -0
- package/dist/chunk-JWOYLO27.js.map +1 -0
- package/dist/chunk-KIXAU3GM.js +137 -0
- package/dist/chunk-KIXAU3GM.js.map +1 -0
- package/dist/chunk-KL5ACTCT.js +8 -0
- package/dist/chunk-KL5ACTCT.js.map +1 -0
- package/dist/chunk-KP7MUZNX.js +83 -0
- package/dist/chunk-KP7MUZNX.js.map +1 -0
- package/dist/chunk-LEU6UA5J.js +1 -0
- package/dist/chunk-LEU6UA5J.js.map +1 -0
- package/dist/chunk-M2RGJPXX.js +35 -0
- package/dist/chunk-M2RGJPXX.js.map +1 -0
- package/dist/chunk-M3BFQ7HK.js +13 -0
- package/dist/chunk-M3BFQ7HK.js.map +1 -0
- package/dist/chunk-M3WTHJHJ.js +1051 -0
- package/dist/chunk-M3WTHJHJ.js.map +1 -0
- package/dist/chunk-M7IYCTJV.js +79 -0
- package/dist/chunk-M7IYCTJV.js.map +1 -0
- package/dist/chunk-NBD3KUOZ.js +838 -0
- package/dist/chunk-NBD3KUOZ.js.map +1 -0
- package/dist/chunk-NQZ2OSGR.js +151 -0
- package/dist/chunk-NQZ2OSGR.js.map +1 -0
- package/dist/chunk-NZJKFF45.js +106 -0
- package/dist/chunk-NZJKFF45.js.map +1 -0
- package/dist/chunk-OFADUJWJ.js +175 -0
- package/dist/chunk-OFADUJWJ.js.map +1 -0
- package/dist/chunk-OGWBVHB3.js +461 -0
- package/dist/chunk-OGWBVHB3.js.map +1 -0
- package/dist/chunk-PAYXCY6A.js +1696 -0
- package/dist/chunk-PAYXCY6A.js.map +1 -0
- package/dist/chunk-PYOE4VSI.js +1924 -0
- package/dist/chunk-PYOE4VSI.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/chunk-QCHIQWAJ.js +21 -0
- package/dist/chunk-QCHIQWAJ.js.map +1 -0
- package/dist/chunk-QMM6O4CD.js +71 -0
- package/dist/chunk-QMM6O4CD.js.map +1 -0
- package/dist/chunk-RNFE3ML2.js +22 -0
- package/dist/chunk-RNFE3ML2.js.map +1 -0
- package/dist/chunk-TAAPQVZN.js +23 -0
- package/dist/chunk-TAAPQVZN.js.map +1 -0
- package/dist/chunk-THATMZXD.js +21 -0
- package/dist/chunk-THATMZXD.js.map +1 -0
- package/dist/chunk-TKZ7MEIA.js +27 -0
- package/dist/chunk-TKZ7MEIA.js.map +1 -0
- package/dist/chunk-TQOBJYDP.js +7 -0
- package/dist/chunk-TQOBJYDP.js.map +1 -0
- package/dist/chunk-VZB726PE.js +93 -0
- package/dist/chunk-VZB726PE.js.map +1 -0
- package/dist/chunk-W3TEWHLO.js +568 -0
- package/dist/chunk-W3TEWHLO.js.map +1 -0
- package/dist/chunk-YS3AZQ2G.js +52 -0
- package/dist/chunk-YS3AZQ2G.js.map +1 -0
- package/dist/chunk-ZDTRWK5F.js +40 -0
- package/dist/chunk-ZDTRWK5F.js.map +1 -0
- package/dist/chunk-ZFLHVFUC.js +192 -0
- package/dist/chunk-ZFLHVFUC.js.map +1 -0
- package/dist/chunk-ZFY7U2FR.js +133 -0
- package/dist/chunk-ZFY7U2FR.js.map +1 -0
- package/dist/chunk-ZGDVUPTM.js +270 -0
- package/dist/chunk-ZGDVUPTM.js.map +1 -0
- package/dist/index.cjs +19700 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +195 -0
- package/dist/index.d.ts +195 -0
- package/dist/index.js +286 -0
- package/dist/index.js.map +1 -0
- package/dist/ir-BMP7yxJJ.d.cts +39 -0
- package/dist/ir-DUOz6H-5.d.ts +39 -0
- package/dist/module-B8CBqIZ_.d.cts +1191 -0
- package/dist/module-k7m3txak.d.ts +1191 -0
- package/dist/protocol-g_1897M2.d.cts +127 -0
- package/dist/protocol-g_1897M2.d.ts +127 -0
- package/package.json +162 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'effect';
|
|
2
|
+
import './module-B8CBqIZ_.cjs';
|
|
3
|
+
import './Module-B_0xRDMR.cjs';
|
|
4
|
+
import './ir-BMP7yxJJ.cjs';
|
|
5
|
+
export { E as ExtractManifestOptions, M as ModuleManifest } from './Observability-COqEvp2C.cjs';
|
|
6
|
+
export { D as DiffManifestOptions, F as FullCutoverGateTrialRunOptions, c as FullCutoverGateVerificationResult, a as KernelContractAllowedDiff, K as KernelContractVerificationResult, M as ModuleManifestDiff, b as VerifyFullCutoverGateOptions, V as VerifyKernelContractOptions, d as diffManifest, f as exportStaticIr, e as extractManifest, g as verifyFullCutoverGate, v as verifyKernelContract } from './Reflection-Kabo1mlU.cjs';
|
|
7
|
+
import './Kernel-8kC-jOda.cjs';
|
|
8
|
+
import 'mutative';
|
|
9
|
+
import './Platform-C49Pv956.cjs';
|
|
10
|
+
import './action-DiMDD_0v.cjs';
|
|
11
|
+
import './ReadQuery-SinbStGF.cjs';
|
|
12
|
+
import './Logic-DRh4sDZj.cjs';
|
|
13
|
+
import './protocol-g_1897M2.cjs';
|
|
14
|
+
import './Debug-Bq8Sqjcr.cjs';
|
|
15
|
+
import 'effect/FiberRef';
|
|
16
|
+
import './StateTrait-OWhbj12c.cjs';
|
|
17
|
+
import './Bound-BPIfH9SS.cjs';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'effect';
|
|
2
|
+
import './module-k7m3txak.js';
|
|
3
|
+
import './Module-DnzluX2J.js';
|
|
4
|
+
import './ir-DUOz6H-5.js';
|
|
5
|
+
export { E as ExtractManifestOptions, M as ModuleManifest } from './Observability-cY4kLn0S.js';
|
|
6
|
+
export { D as DiffManifestOptions, F as FullCutoverGateTrialRunOptions, c as FullCutoverGateVerificationResult, a as KernelContractAllowedDiff, K as KernelContractVerificationResult, M as ModuleManifestDiff, b as VerifyFullCutoverGateOptions, V as VerifyKernelContractOptions, d as diffManifest, f as exportStaticIr, e as extractManifest, g as verifyFullCutoverGate, v as verifyKernelContract } from './Reflection-CQnKwPXj.js';
|
|
7
|
+
import './Kernel-CnGE1Fyk.js';
|
|
8
|
+
import 'mutative';
|
|
9
|
+
import './Platform-C49Pv956.js';
|
|
10
|
+
import './action-DiMDD_0v.js';
|
|
11
|
+
import './ReadQuery-SinbStGF.js';
|
|
12
|
+
import './Logic-BRjEMr-W.js';
|
|
13
|
+
import './protocol-g_1897M2.js';
|
|
14
|
+
import './Debug-B5q5Bkzx.js';
|
|
15
|
+
import 'effect/FiberRef';
|
|
16
|
+
import './StateTrait-BGsZghTz.js';
|
|
17
|
+
import './Bound-BN1DQ_lM.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
diffManifest,
|
|
3
|
+
exportStaticIr,
|
|
4
|
+
extractManifest,
|
|
5
|
+
verifyFullCutoverGate,
|
|
6
|
+
verifyKernelContract
|
|
7
|
+
} from "./chunk-DFNM3WX2.js";
|
|
8
|
+
import "./chunk-24VULZ7A.js";
|
|
9
|
+
import "./chunk-KP7MUZNX.js";
|
|
10
|
+
import "./chunk-M3WTHJHJ.js";
|
|
11
|
+
import "./chunk-EGK3KN7B.js";
|
|
12
|
+
import "./chunk-PAYXCY6A.js";
|
|
13
|
+
import "./chunk-ZGDVUPTM.js";
|
|
14
|
+
import "./chunk-BE3HW4FY.js";
|
|
15
|
+
import "./chunk-ZFLHVFUC.js";
|
|
16
|
+
import "./chunk-KL5ACTCT.js";
|
|
17
|
+
import "./chunk-AUIR5O6W.js";
|
|
18
|
+
import "./chunk-BZ2SHDN2.js";
|
|
19
|
+
import "./chunk-YS3AZQ2G.js";
|
|
20
|
+
import "./chunk-ZFY7U2FR.js";
|
|
21
|
+
import "./chunk-M3BFQ7HK.js";
|
|
22
|
+
import "./chunk-IHVBV5C2.js";
|
|
23
|
+
import "./chunk-3RMKLXHX.js";
|
|
24
|
+
import "./chunk-3QMIVH35.js";
|
|
25
|
+
import "./chunk-NQZ2OSGR.js";
|
|
26
|
+
import "./chunk-CW6T36TN.js";
|
|
27
|
+
import "./chunk-DMBALCE2.js";
|
|
28
|
+
import "./chunk-GMPEOUP2.js";
|
|
29
|
+
import "./chunk-OFADUJWJ.js";
|
|
30
|
+
import "./chunk-M7IYCTJV.js";
|
|
31
|
+
import "./chunk-JWOYLO27.js";
|
|
32
|
+
import "./chunk-PZ5AY32C.js";
|
|
33
|
+
export {
|
|
34
|
+
diffManifest,
|
|
35
|
+
exportStaticIr,
|
|
36
|
+
extractManifest,
|
|
37
|
+
verifyFullCutoverGate,
|
|
38
|
+
verifyKernelContract
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=Reflection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as effect_Layer from 'effect/Layer';
|
|
2
|
+
import * as effect from 'effect';
|
|
3
|
+
import { Context } from 'effect';
|
|
4
|
+
|
|
5
|
+
interface ResourceSpec$1<Key, Out, Err, Env> {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly keySchema: effect.Schema.Schema<Key, any>;
|
|
8
|
+
readonly load: (key: Key) => effect.Effect.Effect<Out, Err, Env>;
|
|
9
|
+
readonly meta?: {
|
|
10
|
+
readonly cacheGroup?: string;
|
|
11
|
+
readonly description?: string;
|
|
12
|
+
readonly [k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
type AnyResourceSpec$1 = ResourceSpec$1<any, any, any, any>;
|
|
16
|
+
type ResourceStatus$1 = 'idle' | 'loading' | 'success' | 'error';
|
|
17
|
+
interface ResourceSnapshot$1<Data = unknown, Err = unknown> {
|
|
18
|
+
readonly status: ResourceStatus$1;
|
|
19
|
+
readonly keyHash?: string;
|
|
20
|
+
readonly data?: Data;
|
|
21
|
+
readonly error?: Err;
|
|
22
|
+
}
|
|
23
|
+
interface ResourceRegistry$1 {
|
|
24
|
+
readonly specs: ReadonlyMap<string, AnyResourceSpec$1>;
|
|
25
|
+
}
|
|
26
|
+
declare const ResourceRegistryTag_base: Context.TagClass<ResourceRegistryTag, "@logixjs/core/ResourceRegistry", ResourceRegistry$1>;
|
|
27
|
+
declare class ResourceRegistryTag extends ResourceRegistryTag_base {
|
|
28
|
+
}
|
|
29
|
+
type Spec$1<Key, Out, Err, Env> = ResourceSpec$1<Key, Out, Err, Env>;
|
|
30
|
+
|
|
31
|
+
type ResourceSpec<Key, Out, Err, Env> = ResourceSpec$1<Key, Out, Err, Env>;
|
|
32
|
+
type AnyResourceSpec = AnyResourceSpec$1;
|
|
33
|
+
type ResourceStatus = ResourceStatus$1;
|
|
34
|
+
type ResourceSnapshot<Data = unknown, Err = unknown> = ResourceSnapshot$1<Data, Err>;
|
|
35
|
+
type ResourceRegistry = ResourceRegistry$1;
|
|
36
|
+
type Spec<Key, Out, Err, Env> = Spec$1<Key, Out, Err, Env>;
|
|
37
|
+
declare const keyHash: (key: unknown) => string;
|
|
38
|
+
declare const Snapshot: {
|
|
39
|
+
readonly idle: <Data = never, Err = never>() => ResourceSnapshot$1<Data, Err>;
|
|
40
|
+
readonly loading: <Data = never, Err = never>(params: {
|
|
41
|
+
readonly keyHash: string;
|
|
42
|
+
}) => ResourceSnapshot$1<Data, Err>;
|
|
43
|
+
readonly success: <Data>(params: {
|
|
44
|
+
readonly keyHash: string;
|
|
45
|
+
readonly data: Data;
|
|
46
|
+
}) => ResourceSnapshot$1<Data, never>;
|
|
47
|
+
readonly error: <Err>(params: {
|
|
48
|
+
readonly keyHash: string;
|
|
49
|
+
readonly error: Err;
|
|
50
|
+
}) => ResourceSnapshot$1<never, Err>;
|
|
51
|
+
};
|
|
52
|
+
declare const internal: {
|
|
53
|
+
ResourceRegistryTag: typeof ResourceRegistryTag;
|
|
54
|
+
};
|
|
55
|
+
declare const make: <Key, Out, Err, Env>(spec: ResourceSpec$1<Key, Out, Err, Env>) => ResourceSpec$1<Key, Out, Err, Env>;
|
|
56
|
+
declare const layer: (specs: ReadonlyArray<AnyResourceSpec$1>) => effect_Layer.Layer<ResourceRegistryTag, never, never>;
|
|
57
|
+
|
|
58
|
+
type Resource_AnyResourceSpec = AnyResourceSpec;
|
|
59
|
+
type Resource_ResourceRegistry = ResourceRegistry;
|
|
60
|
+
type Resource_ResourceRegistryTag = ResourceRegistryTag;
|
|
61
|
+
declare const Resource_ResourceRegistryTag: typeof ResourceRegistryTag;
|
|
62
|
+
type Resource_ResourceSnapshot<Data = unknown, Err = unknown> = ResourceSnapshot<Data, Err>;
|
|
63
|
+
type Resource_ResourceSpec<Key, Out, Err, Env> = ResourceSpec<Key, Out, Err, Env>;
|
|
64
|
+
type Resource_ResourceStatus = ResourceStatus;
|
|
65
|
+
declare const Resource_Snapshot: typeof Snapshot;
|
|
66
|
+
type Resource_Spec<Key, Out, Err, Env> = Spec<Key, Out, Err, Env>;
|
|
67
|
+
declare const Resource_internal: typeof internal;
|
|
68
|
+
declare const Resource_keyHash: typeof keyHash;
|
|
69
|
+
declare const Resource_layer: typeof layer;
|
|
70
|
+
declare const Resource_make: typeof make;
|
|
71
|
+
declare namespace Resource {
|
|
72
|
+
export { type Resource_AnyResourceSpec as AnyResourceSpec, type Resource_ResourceRegistry as ResourceRegistry, Resource_ResourceRegistryTag as ResourceRegistryTag, type Resource_ResourceSnapshot as ResourceSnapshot, type Resource_ResourceSpec as ResourceSpec, type Resource_ResourceStatus as ResourceStatus, Resource_Snapshot as Snapshot, type Resource_Spec as Spec, Resource_internal as internal, Resource_keyHash as keyHash, Resource_layer as layer, Resource_make as make };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { type AnyResourceSpec as A, Resource as R, type Spec as S, type ResourceSpec as a, type ResourceStatus as b, type ResourceSnapshot as c, type ResourceRegistry as d, Snapshot as e, ResourceRegistryTag as f, internal as i, keyHash as k, layer as l, make as m };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as effect_Layer from 'effect/Layer';
|
|
2
|
+
import * as effect from 'effect';
|
|
3
|
+
import { Context } from 'effect';
|
|
4
|
+
|
|
5
|
+
interface ResourceSpec$1<Key, Out, Err, Env> {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly keySchema: effect.Schema.Schema<Key, any>;
|
|
8
|
+
readonly load: (key: Key) => effect.Effect.Effect<Out, Err, Env>;
|
|
9
|
+
readonly meta?: {
|
|
10
|
+
readonly cacheGroup?: string;
|
|
11
|
+
readonly description?: string;
|
|
12
|
+
readonly [k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
type AnyResourceSpec$1 = ResourceSpec$1<any, any, any, any>;
|
|
16
|
+
type ResourceStatus$1 = 'idle' | 'loading' | 'success' | 'error';
|
|
17
|
+
interface ResourceSnapshot$1<Data = unknown, Err = unknown> {
|
|
18
|
+
readonly status: ResourceStatus$1;
|
|
19
|
+
readonly keyHash?: string;
|
|
20
|
+
readonly data?: Data;
|
|
21
|
+
readonly error?: Err;
|
|
22
|
+
}
|
|
23
|
+
interface ResourceRegistry$1 {
|
|
24
|
+
readonly specs: ReadonlyMap<string, AnyResourceSpec$1>;
|
|
25
|
+
}
|
|
26
|
+
declare const ResourceRegistryTag_base: Context.TagClass<ResourceRegistryTag, "@logixjs/core/ResourceRegistry", ResourceRegistry$1>;
|
|
27
|
+
declare class ResourceRegistryTag extends ResourceRegistryTag_base {
|
|
28
|
+
}
|
|
29
|
+
type Spec$1<Key, Out, Err, Env> = ResourceSpec$1<Key, Out, Err, Env>;
|
|
30
|
+
|
|
31
|
+
type ResourceSpec<Key, Out, Err, Env> = ResourceSpec$1<Key, Out, Err, Env>;
|
|
32
|
+
type AnyResourceSpec = AnyResourceSpec$1;
|
|
33
|
+
type ResourceStatus = ResourceStatus$1;
|
|
34
|
+
type ResourceSnapshot<Data = unknown, Err = unknown> = ResourceSnapshot$1<Data, Err>;
|
|
35
|
+
type ResourceRegistry = ResourceRegistry$1;
|
|
36
|
+
type Spec<Key, Out, Err, Env> = Spec$1<Key, Out, Err, Env>;
|
|
37
|
+
declare const keyHash: (key: unknown) => string;
|
|
38
|
+
declare const Snapshot: {
|
|
39
|
+
readonly idle: <Data = never, Err = never>() => ResourceSnapshot$1<Data, Err>;
|
|
40
|
+
readonly loading: <Data = never, Err = never>(params: {
|
|
41
|
+
readonly keyHash: string;
|
|
42
|
+
}) => ResourceSnapshot$1<Data, Err>;
|
|
43
|
+
readonly success: <Data>(params: {
|
|
44
|
+
readonly keyHash: string;
|
|
45
|
+
readonly data: Data;
|
|
46
|
+
}) => ResourceSnapshot$1<Data, never>;
|
|
47
|
+
readonly error: <Err>(params: {
|
|
48
|
+
readonly keyHash: string;
|
|
49
|
+
readonly error: Err;
|
|
50
|
+
}) => ResourceSnapshot$1<never, Err>;
|
|
51
|
+
};
|
|
52
|
+
declare const internal: {
|
|
53
|
+
ResourceRegistryTag: typeof ResourceRegistryTag;
|
|
54
|
+
};
|
|
55
|
+
declare const make: <Key, Out, Err, Env>(spec: ResourceSpec$1<Key, Out, Err, Env>) => ResourceSpec$1<Key, Out, Err, Env>;
|
|
56
|
+
declare const layer: (specs: ReadonlyArray<AnyResourceSpec$1>) => effect_Layer.Layer<ResourceRegistryTag, never, never>;
|
|
57
|
+
|
|
58
|
+
type Resource_AnyResourceSpec = AnyResourceSpec;
|
|
59
|
+
type Resource_ResourceRegistry = ResourceRegistry;
|
|
60
|
+
type Resource_ResourceRegistryTag = ResourceRegistryTag;
|
|
61
|
+
declare const Resource_ResourceRegistryTag: typeof ResourceRegistryTag;
|
|
62
|
+
type Resource_ResourceSnapshot<Data = unknown, Err = unknown> = ResourceSnapshot<Data, Err>;
|
|
63
|
+
type Resource_ResourceSpec<Key, Out, Err, Env> = ResourceSpec<Key, Out, Err, Env>;
|
|
64
|
+
type Resource_ResourceStatus = ResourceStatus;
|
|
65
|
+
declare const Resource_Snapshot: typeof Snapshot;
|
|
66
|
+
type Resource_Spec<Key, Out, Err, Env> = Spec<Key, Out, Err, Env>;
|
|
67
|
+
declare const Resource_internal: typeof internal;
|
|
68
|
+
declare const Resource_keyHash: typeof keyHash;
|
|
69
|
+
declare const Resource_layer: typeof layer;
|
|
70
|
+
declare const Resource_make: typeof make;
|
|
71
|
+
declare namespace Resource {
|
|
72
|
+
export { type Resource_AnyResourceSpec as AnyResourceSpec, type Resource_ResourceRegistry as ResourceRegistry, Resource_ResourceRegistryTag as ResourceRegistryTag, type Resource_ResourceSnapshot as ResourceSnapshot, type Resource_ResourceSpec as ResourceSpec, type Resource_ResourceStatus as ResourceStatus, Resource_Snapshot as Snapshot, type Resource_Spec as Spec, Resource_internal as internal, Resource_keyHash as keyHash, Resource_layer as layer, Resource_make as make };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { type AnyResourceSpec as A, Resource as R, type Spec as S, type ResourceSpec as a, type ResourceStatus as b, type ResourceSnapshot as c, type ResourceRegistry as d, Snapshot as e, ResourceRegistryTag as f, internal as i, keyHash as k, layer as l, make as m };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Resource.ts
|
|
21
|
+
var Resource_exports = {};
|
|
22
|
+
__export(Resource_exports, {
|
|
23
|
+
ResourceRegistryTag: () => ResourceRegistryTag,
|
|
24
|
+
Snapshot: () => Snapshot2,
|
|
25
|
+
internal: () => internal2,
|
|
26
|
+
keyHash: () => keyHash2,
|
|
27
|
+
layer: () => layer2,
|
|
28
|
+
make: () => make2
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(Resource_exports);
|
|
31
|
+
|
|
32
|
+
// src/internal/resource.ts
|
|
33
|
+
var import_effect2 = require("effect");
|
|
34
|
+
|
|
35
|
+
// src/internal/runtime/core/env.ts
|
|
36
|
+
var import_effect = require("effect");
|
|
37
|
+
var getNodeEnv = () => {
|
|
38
|
+
try {
|
|
39
|
+
const env = globalThis?.process?.env;
|
|
40
|
+
return typeof env?.NODE_ENV === "string" ? env.NODE_ENV : void 0;
|
|
41
|
+
} catch {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var isDevEnv = () => getNodeEnv() !== "production";
|
|
46
|
+
var StateTransactionConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
|
|
47
|
+
};
|
|
48
|
+
var ReadQueryStrictGateConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
|
|
49
|
+
};
|
|
50
|
+
var ReplayModeConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReplayModeConfig")() {
|
|
51
|
+
};
|
|
52
|
+
var StateTransactionOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
|
|
53
|
+
};
|
|
54
|
+
var ConcurrencyPolicyTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
|
|
55
|
+
};
|
|
56
|
+
var ConcurrencyPolicyOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// src/internal/resource.ts
|
|
60
|
+
var stableStringify = (value) => {
|
|
61
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
62
|
+
const encode = (input) => {
|
|
63
|
+
if (input === null) return null;
|
|
64
|
+
if (typeof input === "string" || typeof input === "number" || typeof input === "boolean") {
|
|
65
|
+
return input;
|
|
66
|
+
}
|
|
67
|
+
if (typeof input === "bigint") return input.toString();
|
|
68
|
+
if (typeof input === "undefined") return "__undefined__";
|
|
69
|
+
if (typeof input === "symbol") return `__symbol__:${String(input)}`;
|
|
70
|
+
if (typeof input === "function") return "__function__";
|
|
71
|
+
if (Array.isArray(input)) {
|
|
72
|
+
return input.map((v) => encode(v));
|
|
73
|
+
}
|
|
74
|
+
if (input instanceof Date) {
|
|
75
|
+
return `__date__:${input.toISOString()}`;
|
|
76
|
+
}
|
|
77
|
+
if (input instanceof Error) {
|
|
78
|
+
return {
|
|
79
|
+
_tag: "Error",
|
|
80
|
+
name: input.name,
|
|
81
|
+
message: input.message
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (input && typeof input === "object") {
|
|
85
|
+
const obj = input;
|
|
86
|
+
if (seen.has(obj)) return "__cycle__";
|
|
87
|
+
seen.add(obj);
|
|
88
|
+
const record = input;
|
|
89
|
+
const keys = Object.keys(record).sort();
|
|
90
|
+
const out = {};
|
|
91
|
+
for (const k of keys) {
|
|
92
|
+
out[k] = encode(record[k]);
|
|
93
|
+
}
|
|
94
|
+
return out;
|
|
95
|
+
}
|
|
96
|
+
return String(input);
|
|
97
|
+
};
|
|
98
|
+
try {
|
|
99
|
+
return JSON.stringify(encode(value));
|
|
100
|
+
} catch {
|
|
101
|
+
return String(value);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
var keyHash = (key) => stableStringify(key);
|
|
105
|
+
var Snapshot = {
|
|
106
|
+
idle: () => ({
|
|
107
|
+
status: "idle",
|
|
108
|
+
keyHash: void 0,
|
|
109
|
+
data: void 0,
|
|
110
|
+
error: void 0
|
|
111
|
+
}),
|
|
112
|
+
loading: (params) => ({
|
|
113
|
+
status: "loading",
|
|
114
|
+
keyHash: params.keyHash,
|
|
115
|
+
data: void 0,
|
|
116
|
+
error: void 0
|
|
117
|
+
}),
|
|
118
|
+
success: (params) => ({
|
|
119
|
+
status: "success",
|
|
120
|
+
keyHash: params.keyHash,
|
|
121
|
+
data: params.data,
|
|
122
|
+
error: void 0
|
|
123
|
+
}),
|
|
124
|
+
error: (params) => ({
|
|
125
|
+
status: "error",
|
|
126
|
+
keyHash: params.keyHash,
|
|
127
|
+
data: void 0,
|
|
128
|
+
error: params.error
|
|
129
|
+
})
|
|
130
|
+
};
|
|
131
|
+
var ResourceRegistryTag = class extends import_effect2.Context.Tag("@logixjs/core/ResourceRegistry")() {
|
|
132
|
+
};
|
|
133
|
+
var internal = {
|
|
134
|
+
ResourceRegistryTag
|
|
135
|
+
};
|
|
136
|
+
var make = (spec) => spec;
|
|
137
|
+
var layer = (specs) => import_effect2.Layer.succeed(
|
|
138
|
+
ResourceRegistryTag,
|
|
139
|
+
(() => {
|
|
140
|
+
const map = /* @__PURE__ */ new Map();
|
|
141
|
+
for (const spec of specs) {
|
|
142
|
+
if (isDevEnv() && map.has(spec.id) && map.get(spec.id) !== spec) {
|
|
143
|
+
throw new Error(`[Resource.layer] Duplicate resource id "${spec.id}" detected in the same runtime scope`);
|
|
144
|
+
}
|
|
145
|
+
map.set(spec.id, spec);
|
|
146
|
+
}
|
|
147
|
+
return { specs: map };
|
|
148
|
+
})()
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// src/Resource.ts
|
|
152
|
+
var keyHash2 = keyHash;
|
|
153
|
+
var Snapshot2 = Snapshot;
|
|
154
|
+
var internal2 = internal;
|
|
155
|
+
var make2 = make;
|
|
156
|
+
var layer2 = layer;
|
|
157
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
158
|
+
0 && (module.exports = {
|
|
159
|
+
ResourceRegistryTag,
|
|
160
|
+
Snapshot,
|
|
161
|
+
internal,
|
|
162
|
+
keyHash,
|
|
163
|
+
layer,
|
|
164
|
+
make
|
|
165
|
+
});
|
|
166
|
+
//# sourceMappingURL=Resource.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Resource.ts","../src/internal/resource.ts","../src/internal/runtime/core/env.ts"],"sourcesContent":["// Resource module: public facade (@logixjs/core/Resource).\n// Note: implementation lives in `src/internal/resource.ts` to avoid internal importing root submodules.\n\nimport type * as Internal from './internal/resource.js'\nimport * as Impl from './internal/resource.js'\n\nexport type ResourceSpec<Key, Out, Err, Env> = Internal.ResourceSpec<Key, Out, Err, Env>\nexport type AnyResourceSpec = Internal.AnyResourceSpec\nexport type ResourceStatus = Internal.ResourceStatus\nexport type ResourceSnapshot<Data = unknown, Err = unknown> = Internal.ResourceSnapshot<Data, Err>\nexport type ResourceRegistry = Internal.ResourceRegistry\nexport type Spec<Key, Out, Err, Env> = Internal.Spec<Key, Out, Err, Env>\n\nexport const keyHash = Impl.keyHash\nexport const Snapshot = Impl.Snapshot\nexport const internal = Impl.internal\nexport const make = Impl.make\nexport const layer = Impl.layer\n\nexport { ResourceRegistryTag } from './internal/resource.js'\n","import { Context, Layer } from 'effect'\nimport { isDevEnv } from './runtime/core/env.js'\n\nexport interface ResourceSpec<Key, Out, Err, Env> {\n readonly id: string\n readonly keySchema: import('effect').Schema.Schema<Key, any>\n readonly load: (key: Key) => import('effect').Effect.Effect<Out, Err, Env>\n readonly meta?: {\n readonly cacheGroup?: string\n readonly description?: string\n readonly [k: string]: unknown\n }\n}\n\nexport type AnyResourceSpec = ResourceSpec<any, any, any, any>\n\nexport type ResourceStatus = 'idle' | 'loading' | 'success' | 'error'\n\nexport interface ResourceSnapshot<Data = unknown, Err = unknown> {\n readonly status: ResourceStatus\n readonly keyHash?: string\n readonly data?: Data\n readonly error?: Err\n}\n\nconst stableStringify = (value: unknown): string => {\n const seen = new WeakSet<object>()\n const encode = (input: unknown): unknown => {\n if (input === null) return null\n if (typeof input === 'string' || typeof input === 'number' || typeof input === 'boolean') {\n return input\n }\n if (typeof input === 'bigint') return input.toString()\n if (typeof input === 'undefined') return '__undefined__'\n if (typeof input === 'symbol') return `__symbol__:${String(input)}`\n if (typeof input === 'function') return '__function__'\n\n if (Array.isArray(input)) {\n return input.map((v) => encode(v))\n }\n if (input instanceof Date) {\n return `__date__:${input.toISOString()}`\n }\n if (input instanceof Error) {\n return {\n _tag: 'Error',\n name: input.name,\n message: input.message,\n }\n }\n if (input && typeof input === 'object') {\n const obj = input as object\n if (seen.has(obj)) return '__cycle__'\n seen.add(obj)\n\n const record = input as Record<string, unknown>\n const keys = Object.keys(record).sort()\n const out: Record<string, unknown> = {}\n for (const k of keys) {\n out[k] = encode(record[k])\n }\n return out\n }\n return String(input)\n }\n\n try {\n return JSON.stringify(encode(value))\n } catch {\n return String(value)\n }\n}\n\nexport const keyHash = (key: unknown): string => stableStringify(key)\n\nexport const Snapshot = {\n idle: <Data = never, Err = never>(): ResourceSnapshot<Data, Err> => ({\n status: 'idle',\n keyHash: undefined,\n data: undefined,\n error: undefined,\n }),\n loading: <Data = never, Err = never>(params: { readonly keyHash: string }): ResourceSnapshot<Data, Err> => ({\n status: 'loading',\n keyHash: params.keyHash,\n data: undefined,\n error: undefined,\n }),\n success: <Data>(params: { readonly keyHash: string; readonly data: Data }): ResourceSnapshot<Data, never> => ({\n status: 'success',\n keyHash: params.keyHash,\n data: params.data,\n error: undefined,\n }),\n error: <Err>(params: { readonly keyHash: string; readonly error: Err }): ResourceSnapshot<never, Err> => ({\n status: 'error',\n keyHash: params.keyHash,\n data: undefined,\n error: params.error,\n }),\n} as const\n\nexport interface ResourceRegistry {\n readonly specs: ReadonlyMap<string, AnyResourceSpec>\n}\n\nexport class ResourceRegistryTag extends Context.Tag('@logixjs/core/ResourceRegistry')<\n ResourceRegistryTag,\n ResourceRegistry\n>() {}\n\nexport const internal = {\n ResourceRegistryTag,\n}\n\nexport type Spec<Key, Out, Err, Env> = ResourceSpec<Key, Out, Err, Env>\n\nexport const make = <Key, Out, Err, Env>(spec: ResourceSpec<Key, Out, Err, Env>): ResourceSpec<Key, Out, Err, Env> =>\n spec\n\nexport const layer = (specs: ReadonlyArray<AnyResourceSpec>): Layer.Layer<ResourceRegistryTag, never, never> =>\n Layer.succeed(\n ResourceRegistryTag,\n (() => {\n const map = new Map<string, AnyResourceSpec>()\n for (const spec of specs) {\n if (isDevEnv() && map.has(spec.id) && map.get(spec.id) !== spec) {\n throw new Error(`[Resource.layer] Duplicate resource id \"${spec.id}\" detected in the same runtime scope`)\n }\n map.set(spec.id, spec)\n }\n return { specs: map }\n })(),\n )\n","import { Context, Layer } from 'effect'\nimport type { TraitConvergeRequestedMode } from '../../state-trait/model.js'\nimport type { ReadQueryStrictGateConfig } from './ReadQuery.js'\n\n// Unified runtime env detection, avoiding bundlers inlining NODE_ENV at build time.\nexport const getNodeEnv = (): string | undefined => {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const env = (globalThis as any)?.process?.env\n return typeof env?.NODE_ENV === 'string' ? env.NODE_ENV : undefined\n } catch {\n return undefined\n }\n}\n\nexport const isDevEnv = (): boolean => getNodeEnv() !== 'production'\n\nexport type StateTransactionInstrumentation = 'full' | 'light'\n\n/**\n * getDefaultStateTxnInstrumentation:\n * - Currently chooses default instrumentation by NODE_ENV:\n * - dev / test: full (keep patches and snapshots for debugging).\n * - production: light (keep minimal semantics to reduce overhead).\n * - May evolve with finer-grained overrides in Runtime.make / Module.make.\n */\nexport const getDefaultStateTxnInstrumentation = (): StateTransactionInstrumentation => (isDevEnv() ? 'full' : 'light')\n\n/**\n * Runtime-level StateTransaction config Service:\n * - Provided at the app layer by Logix.Runtime.make / AppRuntime.makeApp.\n * - ModuleRuntime.make can read runtime-level defaults from Env.\n *\n * Notes:\n * - instrumentation is only a runtime-level default.\n * - Explicit instrumentation in ModuleImpl / ModuleRuntimeOptions has higher priority.\n */\nexport interface StateTransactionRuntimeConfig {\n readonly instrumentation?: StateTransactionInstrumentation\n /**\n * StateTrait derived converge budget (ms):\n * - Exceeding the budget triggers a soft degrade (freeze derived fields, preserve base writes and 0/1 commit semantics).\n * - Default is 200ms (aligned with the 007 spec threshold).\n */\n readonly traitConvergeBudgetMs?: number\n /**\n * Auto-mode decision budget (ms):\n * - Only used during the decision phase when requestedMode=\"auto\".\n * - Exceeding the budget must immediately fall back to full (and record evidence).\n */\n readonly traitConvergeDecisionBudgetMs?: number\n /**\n * StateTrait converge scheduling strategy:\n * - full: full topo execution (current default; safest).\n * - dirty: minimal triggering based on dirtyPaths + deps in the txn window (requires accurate deps).\n */\n readonly traitConvergeMode?: TraitConvergeRequestedMode\n /**\n * 043: Trait converge time-slicing (explicit opt-in). Disabled by default.\n */\n readonly traitConvergeTimeSlicing?: TraitConvergeTimeSlicingPatch\n /**\n * 060: Txn Lanes (priority scheduling for transaction follow-up work). Enabled by default since 062.\n */\n readonly txnLanes?: TxnLanesPatch\n /**\n * Runtime-level per-module overrides (hotfix path):\n * - Only affects converge behavior for the specified moduleId.\n * - Lower priority than Provider overrides.\n */\n readonly traitConvergeOverridesByModuleId?: Readonly<Record<string, StateTransactionTraitConvergeOverrides>>\n /**\n * 060: Txn Lanes runtime_module overrides (hotfix / gradual tuning).\n * - Only affects the specified moduleId.\n * - Lower priority than Provider overrides.\n */\n readonly txnLanesOverridesByModuleId?: Readonly<Record<string, TxnLanesPatch>>\n}\n\nclass StateTransactionConfigTagImpl extends Context.Tag('@logixjs/core/StateTransactionRuntimeConfig')<\n StateTransactionConfigTagImpl,\n StateTransactionRuntimeConfig\n>() {}\n\nexport const StateTransactionConfigTag = StateTransactionConfigTagImpl\n\nexport type ReadQueryStrictGateRuntimeConfig = ReadQueryStrictGateConfig\n\nclass ReadQueryStrictGateConfigTagImpl extends Context.Tag('@logixjs/core/ReadQueryStrictGateRuntimeConfig')<\n ReadQueryStrictGateConfigTagImpl,\n ReadQueryStrictGateRuntimeConfig\n>() {}\n\nexport const ReadQueryStrictGateConfigTag = ReadQueryStrictGateConfigTagImpl\n\nexport type ReplayMode = 'live' | 'replay'\n\nexport interface ReplayModeConfig {\n readonly mode: ReplayMode\n}\n\nclass ReplayModeConfigTagImpl extends Context.Tag('@logixjs/core/ReplayModeConfig')<\n ReplayModeConfigTagImpl,\n ReplayModeConfig\n>() {}\n\nexport const ReplayModeConfigTag = ReplayModeConfigTagImpl\n\nexport const replayModeLayer = (mode: ReplayMode): Layer.Layer<ReplayModeConfigTagImpl, never, never> =>\n Layer.succeed(ReplayModeConfigTag, { mode })\n\nexport interface StateTransactionTraitConvergeOverrides {\n readonly traitConvergeMode?: TraitConvergeRequestedMode\n readonly traitConvergeBudgetMs?: number\n readonly traitConvergeDecisionBudgetMs?: number\n readonly traitConvergeTimeSlicing?: TraitConvergeTimeSlicingPatch\n}\n\nexport interface TxnLanesPatch {\n /**\n * enabled: whether Txn Lanes is enabled (default on since 062).\n * - undefined: default enabled (when not explicitly configured)\n * - false: disabled (returns to baseline behavior)\n * - true: enabled (only affects scheduling of follow-up work outside the transaction; transactions remain synchronous)\n */\n readonly enabled?: boolean\n /**\n * overrideMode: runtime temporary override (for debugging/rollback/comparison).\n * - forced_off: forcibly disables Txn Lanes (returns to baseline behavior).\n * - forced_sync: forces fully synchronous execution (ignores non-urgent deferral and time-slicing; used for comparisons).\n *\n * Notes:\n * - Override precedence follows StateTransactionOverrides: provider > runtime_module > runtime_default > builtin.\n * - Overrides must be explainable by evidence (see 060 LaneEvidence reasons).\n */\n readonly overrideMode?: 'forced_off' | 'forced_sync'\n /** non-urgent work loop slice budget (ms). */\n readonly budgetMs?: number\n /** Non-urgent backlog coalescing window (ms). */\n readonly debounceMs?: number\n /** Max lag upper bound (ms): exceeding it triggers an explainable starvation protection (forced catch-up). */\n readonly maxLagMs?: number\n /** Whether to allow coalescing/canceling intermediate non-urgent work (must preserve eventual consistency). */\n readonly allowCoalesce?: boolean\n /**\n * Yield strategy for the non-urgent work loop (progressive enhancement).\n * - baseline: uses only time budget + hard upper bound\n * - inputPending: when supported by browsers, also consults `navigator.scheduling.isInputPending`\n */\n readonly yieldStrategy?: 'baseline' | 'inputPending'\n}\n\nexport interface TraitConvergeTimeSlicingPatch {\n /**\n * enabled:\n * - false/undefined: disabled (default)\n * - true: enables time-slicing (only affects computed/link explicitly marked as deferred)\n */\n readonly enabled?: boolean\n /**\n * debounceMs: coalescing interval (ms) for the deferral window; merges high-frequency inputs into one deferred flush.\n */\n readonly debounceMs?: number\n /**\n * maxLagMs: max lag upper bound (ms); exceeding it triggers an explainable forced flush (starvation protection).\n */\n readonly maxLagMs?: number\n}\n\n/**\n * Provider-scoped StateTransactionOverrides (delta overrides):\n * - Used to inject more local overrides into a Provider subtree on top of inherited global runtime config.\n * - Override precedence: provider > runtime_module > runtime_default > builtin.\n */\nexport interface StateTransactionOverrides {\n readonly traitConvergeMode?: TraitConvergeRequestedMode\n readonly traitConvergeBudgetMs?: number\n readonly traitConvergeDecisionBudgetMs?: number\n readonly traitConvergeTimeSlicing?: TraitConvergeTimeSlicingPatch\n readonly traitConvergeOverridesByModuleId?: Readonly<Record<string, StateTransactionTraitConvergeOverrides>>\n /** 060: Txn Lanes provider-level overrides (delta overrides). */\n readonly txnLanes?: TxnLanesPatch\n /** 060: Txn Lanes provider_module overrides (by moduleId). */\n readonly txnLanesOverridesByModuleId?: Readonly<Record<string, TxnLanesPatch>>\n}\n\nclass StateTransactionOverridesTagImpl extends Context.Tag('@logixjs/core/StateTransactionOverrides')<\n StateTransactionOverridesTagImpl,\n StateTransactionOverrides\n>() {}\n\nexport const StateTransactionOverridesTag = StateTransactionOverridesTagImpl\n\nexport type ConcurrencyLimit = number | 'unbounded'\n\nexport interface ConcurrencyPolicyPatch {\n readonly concurrencyLimit?: ConcurrencyLimit\n readonly losslessBackpressureCapacity?: number\n readonly allowUnbounded?: boolean\n readonly pressureWarningThreshold?: {\n readonly backlogCount?: number\n readonly backlogDurationMs?: number\n }\n readonly warningCooldownMs?: number\n}\n\n/**\n * Runtime-level ConcurrencyPolicy:\n * - Provided at the app layer by Logix.Runtime.make / AppRuntime.makeApp.\n * - ModuleRuntime merges sources via a resolver (builtin/runtime_module/provider, etc.).\n *\n * Notes:\n * - overridesByModuleId is used for runtime_module hot-switching (hotfix / gradual tuning) and is lower priority than provider overrides.\n */\nexport interface ConcurrencyPolicy extends ConcurrencyPolicyPatch {\n readonly overridesByModuleId?: Readonly<Record<string, ConcurrencyPolicyPatch>>\n}\n\nclass ConcurrencyPolicyTagImpl extends Context.Tag('@logixjs/core/ConcurrencyPolicy')<\n ConcurrencyPolicyTagImpl,\n ConcurrencyPolicy\n>() {}\n\nexport const ConcurrencyPolicyTag = ConcurrencyPolicyTagImpl\n\n/**\n * Provider-scoped ConcurrencyPolicyOverrides (delta overrides):\n * - Used to inject more local overrides into a Provider subtree on top of inherited global runtime config.\n * - Override precedence: provider > runtime_module > runtime_default > builtin.\n */\nexport interface ConcurrencyPolicyOverrides extends ConcurrencyPolicyPatch {\n readonly overridesByModuleId?: Readonly<Record<string, ConcurrencyPolicyPatch>>\n}\n\nclass ConcurrencyPolicyOverridesTagImpl extends Context.Tag('@logixjs/core/ConcurrencyPolicyOverrides')<\n ConcurrencyPolicyOverridesTagImpl,\n ConcurrencyPolicyOverrides\n>() {}\n\nexport const ConcurrencyPolicyOverridesTag = ConcurrencyPolicyOverridesTagImpl\n"],"mappings":"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","names":["Snapshot","internal","keyHash","layer","make","import_effect","keyHash","Snapshot","internal","make","layer"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import 'effect/Layer';
|
|
2
|
+
export { A as AnyResourceSpec, d as ResourceRegistry, f as ResourceRegistryTag, c as ResourceSnapshot, a as ResourceSpec, b as ResourceStatus, e as Snapshot, S as Spec, i as internal, k as keyHash, l as layer, m as make } from './Resource-Dy1xD_DG.cjs';
|
|
3
|
+
import 'effect';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import 'effect/Layer';
|
|
2
|
+
export { A as AnyResourceSpec, d as ResourceRegistry, f as ResourceRegistryTag, c as ResourceSnapshot, a as ResourceSpec, b as ResourceStatus, e as Snapshot, S as Spec, i as internal, k as keyHash, l as layer, m as make } from './Resource-Dy1xD_DG.js';
|
|
3
|
+
import 'effect';
|
package/dist/Resource.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Snapshot,
|
|
3
|
+
internal,
|
|
4
|
+
keyHash,
|
|
5
|
+
layer,
|
|
6
|
+
make
|
|
7
|
+
} from "./chunk-4CQAV7YB.js";
|
|
8
|
+
import {
|
|
9
|
+
ResourceRegistryTag
|
|
10
|
+
} from "./chunk-NZJKFF45.js";
|
|
11
|
+
import "./chunk-3QMIVH35.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
13
|
+
export {
|
|
14
|
+
ResourceRegistryTag,
|
|
15
|
+
Snapshot,
|
|
16
|
+
internal,
|
|
17
|
+
keyHash,
|
|
18
|
+
layer,
|
|
19
|
+
make
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as effect_Layer from 'effect/Layer';
|
|
2
|
+
import * as effect_Effect from 'effect/Effect';
|
|
3
|
+
import * as effect_Context from 'effect/Context';
|
|
4
|
+
|
|
5
|
+
type RootResolveEntrypoint$1 = 'logic.root.resolve' | 'logic.$.root.resolve';
|
|
6
|
+
interface RootResolveOptions$1 {
|
|
7
|
+
readonly entrypoint?: RootResolveEntrypoint$1;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to wait when RootContext is not ready yet:
|
|
10
|
+
* - Default false: avoid misuse during layer/setup which can deadlock.
|
|
11
|
+
* - `$.root.resolve` passes true in the run phase (run-only), allowing Env assembly to complete.
|
|
12
|
+
*/
|
|
13
|
+
readonly waitForReady?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type RootResolveEntrypoint = RootResolveEntrypoint$1;
|
|
17
|
+
type RootResolveOptions = RootResolveOptions$1;
|
|
18
|
+
declare const resolve: <Id, Svc>(tag: effect_Context.Tag<Id, Svc>, options?: RootResolveOptions$1) => effect_Effect.Effect<Svc, never, any>;
|
|
19
|
+
declare const layerFromContext: (context: effect_Context.Context<any>) => effect_Layer.Layer<any, never, any>;
|
|
20
|
+
|
|
21
|
+
type Root_RootResolveEntrypoint = RootResolveEntrypoint;
|
|
22
|
+
type Root_RootResolveOptions = RootResolveOptions;
|
|
23
|
+
declare const Root_layerFromContext: typeof layerFromContext;
|
|
24
|
+
declare const Root_resolve: typeof resolve;
|
|
25
|
+
declare namespace Root {
|
|
26
|
+
export { type Root_RootResolveEntrypoint as RootResolveEntrypoint, type Root_RootResolveOptions as RootResolveOptions, Root_layerFromContext as layerFromContext, Root_resolve as resolve };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { Root as R, type RootResolveEntrypoint as a, type RootResolveOptions as b, layerFromContext as l, resolve as r };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as effect_Layer from 'effect/Layer';
|
|
2
|
+
import * as effect_Effect from 'effect/Effect';
|
|
3
|
+
import * as effect_Context from 'effect/Context';
|
|
4
|
+
|
|
5
|
+
type RootResolveEntrypoint$1 = 'logic.root.resolve' | 'logic.$.root.resolve';
|
|
6
|
+
interface RootResolveOptions$1 {
|
|
7
|
+
readonly entrypoint?: RootResolveEntrypoint$1;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to wait when RootContext is not ready yet:
|
|
10
|
+
* - Default false: avoid misuse during layer/setup which can deadlock.
|
|
11
|
+
* - `$.root.resolve` passes true in the run phase (run-only), allowing Env assembly to complete.
|
|
12
|
+
*/
|
|
13
|
+
readonly waitForReady?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type RootResolveEntrypoint = RootResolveEntrypoint$1;
|
|
17
|
+
type RootResolveOptions = RootResolveOptions$1;
|
|
18
|
+
declare const resolve: <Id, Svc>(tag: effect_Context.Tag<Id, Svc>, options?: RootResolveOptions$1) => effect_Effect.Effect<Svc, never, any>;
|
|
19
|
+
declare const layerFromContext: (context: effect_Context.Context<any>) => effect_Layer.Layer<any, never, any>;
|
|
20
|
+
|
|
21
|
+
type Root_RootResolveEntrypoint = RootResolveEntrypoint;
|
|
22
|
+
type Root_RootResolveOptions = RootResolveOptions;
|
|
23
|
+
declare const Root_layerFromContext: typeof layerFromContext;
|
|
24
|
+
declare const Root_resolve: typeof resolve;
|
|
25
|
+
declare namespace Root {
|
|
26
|
+
export { type Root_RootResolveEntrypoint as RootResolveEntrypoint, type Root_RootResolveOptions as RootResolveOptions, Root_layerFromContext as layerFromContext, Root_resolve as resolve };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { Root as R, type RootResolveEntrypoint as a, type RootResolveOptions as b, layerFromContext as l, resolve as r };
|
package/dist/Root.cjs
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/Root.ts
|
|
21
|
+
var Root_exports = {};
|
|
22
|
+
__export(Root_exports, {
|
|
23
|
+
layerFromContext: () => layerFromContext2,
|
|
24
|
+
resolve: () => resolve2
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(Root_exports);
|
|
27
|
+
|
|
28
|
+
// src/internal/root.ts
|
|
29
|
+
var import_effect3 = require("effect");
|
|
30
|
+
|
|
31
|
+
// src/internal/runtime/core/env.ts
|
|
32
|
+
var import_effect = require("effect");
|
|
33
|
+
var getNodeEnv = () => {
|
|
34
|
+
try {
|
|
35
|
+
const env = globalThis?.process?.env;
|
|
36
|
+
return typeof env?.NODE_ENV === "string" ? env.NODE_ENV : void 0;
|
|
37
|
+
} catch {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var isDevEnv = () => getNodeEnv() !== "production";
|
|
42
|
+
var StateTransactionConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
|
|
43
|
+
};
|
|
44
|
+
var ReadQueryStrictGateConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
|
|
45
|
+
};
|
|
46
|
+
var ReplayModeConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReplayModeConfig")() {
|
|
47
|
+
};
|
|
48
|
+
var StateTransactionOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
|
|
49
|
+
};
|
|
50
|
+
var ConcurrencyPolicyTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
|
|
51
|
+
};
|
|
52
|
+
var ConcurrencyPolicyOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// src/internal/runtime/core/RootContext.ts
|
|
56
|
+
var import_effect2 = require("effect");
|
|
57
|
+
var RootContextTagImpl = class extends import_effect2.Context.Tag("@logixjs/core/RootContext")() {
|
|
58
|
+
};
|
|
59
|
+
var RootContextTag = RootContextTagImpl;
|
|
60
|
+
|
|
61
|
+
// src/internal/root.ts
|
|
62
|
+
var tagIdOf = (tag) => typeof tag?.id === "string" ? String(tag.id) : typeof tag?.key === "string" ? String(tag.key) : "<unknown tag>";
|
|
63
|
+
var makeMissingRootProviderError = (tag, entrypoint, extra) => {
|
|
64
|
+
const dev = isDevEnv();
|
|
65
|
+
const tokenId = tagIdOf(tag);
|
|
66
|
+
const fix = dev ? [
|
|
67
|
+
"- Provide it when creating the runtime tree (Logix.Runtime.make(...,{ layer }) / ManagedRuntime.make(Layer.mergeAll(...))).",
|
|
68
|
+
"- If you're in React and want the current runtime environment singleton, use useModule(ModuleTag).",
|
|
69
|
+
"- Do not rely on nested RuntimeProvider.layer to mock Root.resolve."
|
|
70
|
+
] : [];
|
|
71
|
+
const message = dev ? [
|
|
72
|
+
"[MissingRootProviderError] Cannot resolve Tag from root provider.",
|
|
73
|
+
extra ? `
|
|
74
|
+
${extra}` : "",
|
|
75
|
+
`tokenId: ${tokenId}`,
|
|
76
|
+
`entrypoint: ${entrypoint}`,
|
|
77
|
+
"mode: global",
|
|
78
|
+
"startScope: root",
|
|
79
|
+
"",
|
|
80
|
+
"fix:",
|
|
81
|
+
...fix
|
|
82
|
+
].filter((s) => s.length > 0).join("\n") : "[MissingRootProviderError] tag not found in root provider";
|
|
83
|
+
const err = new Error(message);
|
|
84
|
+
err.name = "MissingRootProviderError";
|
|
85
|
+
err.tokenId = tokenId;
|
|
86
|
+
err.entrypoint = entrypoint;
|
|
87
|
+
err.mode = "global";
|
|
88
|
+
err.startScope = { kind: "root" };
|
|
89
|
+
err.fix = fix;
|
|
90
|
+
return err;
|
|
91
|
+
};
|
|
92
|
+
var resolve = (tag, options) => import_effect3.Effect.gen(function* () {
|
|
93
|
+
const entrypoint = options?.entrypoint ?? "logic.root.resolve";
|
|
94
|
+
const root = yield* RootContextTag;
|
|
95
|
+
const rootContext = root.context ?? (options?.waitForReady ? yield* root.ready : void 0);
|
|
96
|
+
if (!rootContext) {
|
|
97
|
+
return yield* import_effect3.Effect.die(
|
|
98
|
+
makeMissingRootProviderError(tag, entrypoint, "reason: rootContextNotReady")
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
return import_effect3.Context.get(rootContext, tag);
|
|
103
|
+
} catch {
|
|
104
|
+
return yield* import_effect3.Effect.die(makeMissingRootProviderError(tag, entrypoint));
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
var layerFromContext = (context) => import_effect3.Layer.scoped(
|
|
108
|
+
RootContextTag,
|
|
109
|
+
import_effect3.Effect.gen(function* () {
|
|
110
|
+
const ready = yield* import_effect3.Deferred.make();
|
|
111
|
+
yield* import_effect3.Deferred.succeed(ready, context);
|
|
112
|
+
const root = { context, ready };
|
|
113
|
+
return root;
|
|
114
|
+
})
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
// src/Root.ts
|
|
118
|
+
var resolve2 = resolve;
|
|
119
|
+
var layerFromContext2 = layerFromContext;
|
|
120
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
121
|
+
0 && (module.exports = {
|
|
122
|
+
layerFromContext,
|
|
123
|
+
resolve
|
|
124
|
+
});
|
|
125
|
+
//# sourceMappingURL=Root.cjs.map
|