@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,169 @@
|
|
|
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/EffectOp.ts
|
|
21
|
+
var EffectOp_exports = {};
|
|
22
|
+
__export(EffectOp_exports, {
|
|
23
|
+
composeMiddleware: () => composeMiddleware3,
|
|
24
|
+
make: () => make2,
|
|
25
|
+
makeInRunSession: () => makeInRunSession2,
|
|
26
|
+
makeOperationRejected: () => makeOperationRejected3,
|
|
27
|
+
run: () => run2,
|
|
28
|
+
withMeta: () => withMeta2
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(EffectOp_exports);
|
|
31
|
+
|
|
32
|
+
// src/internal/effect-op.ts
|
|
33
|
+
var import_effect3 = require("effect");
|
|
34
|
+
|
|
35
|
+
// src/internal/runtime/core/EffectOpCore.ts
|
|
36
|
+
var import_effect = require("effect");
|
|
37
|
+
var currentLinkId = import_effect.FiberRef.unsafeMake(void 0);
|
|
38
|
+
var makeOperationRejected = (params) => ({
|
|
39
|
+
_tag: "OperationRejected",
|
|
40
|
+
message: params.message,
|
|
41
|
+
kind: params.kind,
|
|
42
|
+
name: params.name,
|
|
43
|
+
linkId: params.linkId,
|
|
44
|
+
details: params.details
|
|
45
|
+
});
|
|
46
|
+
var EffectOpMiddlewareTag = class extends import_effect.Context.Tag("Logix/EffectOpMiddleware")() {
|
|
47
|
+
};
|
|
48
|
+
var composeMiddleware = (stack) => {
|
|
49
|
+
return (op) => stack.reduceRight(
|
|
50
|
+
(eff, mw) => mw({ ...op, effect: eff }),
|
|
51
|
+
op.effect
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
var runWithMiddleware = (op, stack) => {
|
|
55
|
+
return import_effect.Effect.gen(function* () {
|
|
56
|
+
const existing = yield* import_effect.FiberRef.get(currentLinkId);
|
|
57
|
+
const metaLinkId = op.meta?.linkId;
|
|
58
|
+
const linkId = typeof metaLinkId === "string" && metaLinkId.length > 0 ? metaLinkId : existing ?? op.id;
|
|
59
|
+
const nextOp = {
|
|
60
|
+
...op,
|
|
61
|
+
meta: {
|
|
62
|
+
...op.meta ?? {},
|
|
63
|
+
linkId
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const program = stack.length ? composeMiddleware(stack)(nextOp) : nextOp.effect;
|
|
67
|
+
return yield* import_effect.Effect.locally(currentLinkId, linkId)(program);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/internal/observability/runSession.ts
|
|
72
|
+
var import_effect2 = require("effect");
|
|
73
|
+
|
|
74
|
+
// src/internal/observability/jsonValue.ts
|
|
75
|
+
var defaultOptions = {
|
|
76
|
+
maxDepth: 6,
|
|
77
|
+
maxObjectKeys: 32,
|
|
78
|
+
maxArrayLength: 32,
|
|
79
|
+
maxStringLength: 256,
|
|
80
|
+
maxJsonBytes: 4 * 1024,
|
|
81
|
+
oversizedPreviewBytes: 256
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// src/internal/observability/runSession.ts
|
|
85
|
+
var RunSessionTagImpl = class extends import_effect2.Context.Tag("@logixjs/core/RunSession")() {
|
|
86
|
+
};
|
|
87
|
+
var RunSessionTag = RunSessionTagImpl;
|
|
88
|
+
|
|
89
|
+
// src/internal/effect-op.ts
|
|
90
|
+
var composeMiddleware2 = composeMiddleware;
|
|
91
|
+
var makeOperationRejected2 = makeOperationRejected;
|
|
92
|
+
var nextGlobalOpSeq = 0;
|
|
93
|
+
var nextOpSeq = () => {
|
|
94
|
+
nextGlobalOpSeq += 1;
|
|
95
|
+
return nextGlobalOpSeq;
|
|
96
|
+
};
|
|
97
|
+
var makeId = (instanceId, opSeq) => instanceId ? `${instanceId}::o${opSeq}` : `o${opSeq}`;
|
|
98
|
+
var make = (params) => ({
|
|
99
|
+
...params.id ? { id: params.id, meta: params.meta } : (() => {
|
|
100
|
+
const meta = params.meta ?? {};
|
|
101
|
+
const instanceId = meta.instanceId;
|
|
102
|
+
const opSeq = typeof meta.opSeq === "number" && Number.isFinite(meta.opSeq) ? Math.floor(meta.opSeq) : nextOpSeq();
|
|
103
|
+
return {
|
|
104
|
+
id: makeId(instanceId, opSeq),
|
|
105
|
+
meta: meta.opSeq === opSeq ? meta : { ...meta, opSeq }
|
|
106
|
+
};
|
|
107
|
+
})(),
|
|
108
|
+
kind: params.kind,
|
|
109
|
+
name: params.name,
|
|
110
|
+
payload: params.payload,
|
|
111
|
+
effect: params.effect
|
|
112
|
+
});
|
|
113
|
+
var makeInRunSession = (params) => import_effect3.Effect.gen(function* () {
|
|
114
|
+
if (params.id) {
|
|
115
|
+
return {
|
|
116
|
+
id: params.id,
|
|
117
|
+
kind: params.kind,
|
|
118
|
+
name: params.name,
|
|
119
|
+
payload: params.payload,
|
|
120
|
+
meta: params.meta,
|
|
121
|
+
effect: params.effect
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
const meta = params.meta ?? {};
|
|
125
|
+
const instanceId = meta.instanceId;
|
|
126
|
+
let opSeq;
|
|
127
|
+
if (typeof meta.opSeq === "number" && Number.isFinite(meta.opSeq)) {
|
|
128
|
+
opSeq = Math.floor(meta.opSeq);
|
|
129
|
+
} else {
|
|
130
|
+
const sessionOpt = yield* import_effect3.Effect.serviceOption(RunSessionTag);
|
|
131
|
+
if (import_effect3.Option.isSome(sessionOpt)) {
|
|
132
|
+
const key = instanceId ?? "global";
|
|
133
|
+
opSeq = sessionOpt.value.local.nextSeq("opSeq", key);
|
|
134
|
+
} else {
|
|
135
|
+
opSeq = nextOpSeq();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
id: makeId(instanceId, opSeq),
|
|
140
|
+
kind: params.kind,
|
|
141
|
+
name: params.name,
|
|
142
|
+
payload: params.payload,
|
|
143
|
+
meta: meta.opSeq === opSeq ? meta : { ...meta, opSeq },
|
|
144
|
+
effect: params.effect
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
var withMeta = (op, meta) => ({
|
|
148
|
+
...op,
|
|
149
|
+
meta: { ...op.meta ?? {}, ...meta }
|
|
150
|
+
});
|
|
151
|
+
var run = (op, stack) => runWithMiddleware(op, stack);
|
|
152
|
+
|
|
153
|
+
// src/EffectOp.ts
|
|
154
|
+
var composeMiddleware3 = composeMiddleware2;
|
|
155
|
+
var makeOperationRejected3 = makeOperationRejected2;
|
|
156
|
+
var make2 = make;
|
|
157
|
+
var makeInRunSession2 = makeInRunSession;
|
|
158
|
+
var withMeta2 = withMeta;
|
|
159
|
+
var run2 = run;
|
|
160
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
161
|
+
0 && (module.exports = {
|
|
162
|
+
composeMiddleware,
|
|
163
|
+
make,
|
|
164
|
+
makeInRunSession,
|
|
165
|
+
makeOperationRejected,
|
|
166
|
+
run,
|
|
167
|
+
withMeta
|
|
168
|
+
});
|
|
169
|
+
//# sourceMappingURL=EffectOp.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/EffectOp.ts","../src/internal/effect-op.ts","../src/internal/runtime/core/EffectOpCore.ts","../src/internal/observability/runSession.ts","../src/internal/observability/jsonValue.ts"],"sourcesContent":["// Public EffectOp API (@logixjs/core/EffectOp).\n// Note: implementation lives in `src/internal/effect-op.ts` to avoid internal importing root submodules.\n\nimport * as Internal from './internal/effect-op.js'\n\nexport type EffectOp<Out = unknown, Err = unknown, Env = unknown> = Internal.EffectOp<Out, Err, Env>\n\nexport type OperationPolicy = Internal.OperationPolicy\n\nexport type OperationRejected = Internal.OperationRejected\n\nexport type OperationError<E> = Internal.OperationError<E>\n\nexport type Middleware = Internal.Middleware\n\nexport type MiddlewareStack = Internal.MiddlewareStack\n\nexport const composeMiddleware = Internal.composeMiddleware\n\nexport const makeOperationRejected = Internal.makeOperationRejected\n\nexport const make = Internal.make\n\nexport const makeInRunSession = Internal.makeInRunSession\n\nexport const withMeta = Internal.withMeta\n\nexport const run = Internal.run\n","// Internal EffectOp API (for internal implementation code).\n//\n// Goal:\n// - Internal modules must never import root public submodules (e.g. `../EffectOp`).\n// - This file hosts the shared implementation; public `src/EffectOp.ts` delegates to it.\n\nimport { Effect, Option } from 'effect'\nimport * as Core from './runtime/core/EffectOpCore.js'\nimport { RunSessionTag } from './observability/runSession.js'\n\nexport type EffectOp<Out = unknown, Err = unknown, Env = unknown> = Core.EffectOp<Out, Err, Env>\n\nexport type OperationPolicy = Core.OperationPolicy\n\nexport type OperationRejected = Core.OperationRejected\n\nexport type OperationError<E> = Core.OperationError<E>\n\nexport type Middleware = Core.Middleware\n\nexport type MiddlewareStack = Core.MiddlewareStack\n\nexport const composeMiddleware = Core.composeMiddleware\n\nexport const makeOperationRejected = Core.makeOperationRejected\n\n/**\n * Generate a stable id for identifying an EffectOp.\n * - Uses a monotonic sequence by default to avoid non-replayability from randomness/time.\n * - If meta.instanceId is available, prefer deriving `${instanceId}::o${opSeq}`.\n */\nlet nextGlobalOpSeq = 0\n\nconst nextOpSeq = (): number => {\n nextGlobalOpSeq += 1\n return nextGlobalOpSeq\n}\n\nconst makeId = (instanceId: string | undefined, opSeq: number): string =>\n instanceId ? `${instanceId}::o${opSeq}` : `o${opSeq}`\n\n/**\n * EffectOp.make:\n * - Create an EffectOp with basic meta.\n * - Generates a stable id by default (based on `instanceId` + monotonic `opSeq`); callers may override externally.\n */\nexport const make = <A, E, R>(params: {\n readonly kind: EffectOp['kind']\n readonly name: string\n readonly effect: Effect.Effect<A, E, R>\n readonly payload?: unknown\n readonly meta?: EffectOp['meta']\n readonly id?: string\n}): EffectOp<A, E, R> => ({\n ...(params.id\n ? { id: params.id, meta: params.meta }\n : (() => {\n const meta: any = params.meta ?? {}\n const instanceId: string | undefined = meta.instanceId\n const opSeq: number =\n typeof meta.opSeq === 'number' && Number.isFinite(meta.opSeq) ? Math.floor(meta.opSeq) : nextOpSeq()\n return {\n id: makeId(instanceId, opSeq),\n meta: meta.opSeq === opSeq ? meta : { ...meta, opSeq },\n }\n })()),\n kind: params.kind,\n name: params.name,\n payload: params.payload,\n effect: params.effect,\n})\n\n/**\n * EffectOp.makeInRunSession:\n * - Allocate a stable `opSeq` within a RunSession scope (per-session + per-instance).\n * - If RunSession is missing from Env, fall back to a process-wide monotonic sequence (no process-wide Map).\n */\nexport const makeInRunSession = <A, E, R>(params: {\n readonly kind: EffectOp['kind']\n readonly name: string\n readonly effect: Effect.Effect<A, E, R>\n readonly payload?: unknown\n readonly meta?: EffectOp['meta']\n readonly id?: string\n}): Effect.Effect<EffectOp<A, E, R>, never, any> =>\n Effect.gen(function* () {\n if (params.id) {\n return {\n id: params.id,\n kind: params.kind,\n name: params.name,\n payload: params.payload,\n meta: params.meta,\n effect: params.effect,\n } satisfies EffectOp<A, E, R>\n }\n\n const meta: any = params.meta ?? {}\n const instanceId: string | undefined = meta.instanceId\n\n let opSeq: number\n if (typeof meta.opSeq === 'number' && Number.isFinite(meta.opSeq)) {\n opSeq = Math.floor(meta.opSeq)\n } else {\n const sessionOpt = yield* Effect.serviceOption(RunSessionTag)\n if (Option.isSome(sessionOpt)) {\n const key = instanceId ?? 'global'\n opSeq = sessionOpt.value.local.nextSeq('opSeq', key)\n } else {\n opSeq = nextOpSeq()\n }\n }\n\n return {\n id: makeId(instanceId, opSeq),\n kind: params.kind,\n name: params.name,\n payload: params.payload,\n meta: meta.opSeq === opSeq ? meta : { ...meta, opSeq },\n effect: params.effect,\n } satisfies EffectOp<A, E, R>\n })\n\n/**\n * EffectOp.withMeta:\n * - Append or override meta fields on an existing EffectOp.\n * - Does not change the effect itself.\n */\nexport const withMeta = <A, E, R>(\n op: EffectOp<A, E, R>,\n meta: Partial<NonNullable<EffectOp['meta']>>,\n): EffectOp<A, E, R> => ({\n ...op,\n meta: { ...(op.meta ?? {}), ...meta },\n})\n\n/**\n * EffectOp.run:\n * - Execute an EffectOp using the given MiddlewareStack.\n * - If the stack is empty, return op.effect directly.\n */\nexport const run = <A, E, R>(op: EffectOp<A, E, R>, stack: MiddlewareStack): Effect.Effect<A, E, R> =>\n Core.runWithMiddleware(op, stack)\n","// EffectOp core model and middleware composition logic.\n// For higher-level Runtime / Devtools integration, see:\n// specs/000-module-traits-runtime/references/effectop-and-middleware.md\n\nimport { Context, Effect, FiberRef } from 'effect'\n\n/**\n * currentLinkId:\n * - Stores the current operation chain id (linkId) in a FiberRef.\n * - Used to correlate multiple boundary ops within the same chain (can be shared across modules via the same FiberRef).\n */\nexport const currentLinkId = FiberRef.unsafeMake<string | undefined>(undefined)\n\n/**\n * OperationPolicy:\n * - Local policy markers (intent only; no rule logic attached).\n *\n * Constraints (enforced by Runtime/middleware together):\n * - Only observation-only capabilities (Observer) may be disabled; global guards must not be disabled.\n */\nexport interface OperationPolicy {\n readonly disableObservers?: boolean\n}\n\n/**\n * OperationRejected:\n * - Unified failure result when a guard rejects execution.\n * - Semantics: explicit failure with no business side effects (rejection must happen before user code executes).\n */\nexport interface OperationRejected {\n readonly _tag: 'OperationRejected'\n readonly message: string\n readonly kind?: EffectOp['kind']\n readonly name?: string\n readonly linkId?: string\n readonly details?: unknown\n}\n\n/**\n * OperationError:\n * - Any boundary operation executed via EffectOp may be explicitly rejected by Guard middleware.\n * - Therefore, the middleware error channel must allow OperationRejected to be added.\n */\nexport type OperationError<E> = E | OperationRejected\n\nexport const makeOperationRejected = (params: {\n readonly message: string\n readonly kind?: EffectOp['kind']\n readonly name?: string\n readonly linkId?: string\n readonly details?: unknown\n}): OperationRejected => ({\n _tag: 'OperationRejected',\n message: params.message,\n kind: params.kind,\n name: params.name,\n linkId: params.linkId,\n details: params.details,\n})\n\n/**\n * EffectOp: a unified representation of an Effect execution at an \"observable boundary\".\n *\n * - Out / Err / Env are the generic parameters of the underlying Effect.\n * - meta carries structured context needed by Devtools / Middleware.\n */\nexport interface EffectOp<Out = unknown, Err = unknown, Env = unknown> {\n readonly id: string\n readonly kind:\n | 'action'\n | 'flow'\n | 'state'\n | 'service'\n | 'lifecycle'\n | 'trait-computed'\n | 'trait-link'\n | 'trait-source'\n | 'devtools'\n readonly name: string\n readonly payload?: unknown\n readonly meta?: {\n /**\n * linkId:\n * - Operation chain id: multiple boundary ops in the same chain must share it.\n * - Runtime ensures this field is populated on all boundary ops.\n */\n linkId?: string\n moduleId?: string\n instanceId?: string\n runtimeLabel?: string\n txnId?: string\n txnSeq?: number\n opSeq?: number\n fieldPath?: string\n deps?: ReadonlyArray<string>\n from?: string\n to?: string\n traitNodeId?: string\n stepId?: string\n resourceId?: string\n key?: unknown\n trace?: ReadonlyArray<string>\n tags?: ReadonlyArray<string>\n policy?: OperationPolicy\n // Reserved extension slot for middleware/devtools to attach extra information.\n readonly [k: string]: unknown\n }\n readonly effect: Effect.Effect<Out, Err, Env>\n}\n\n/**\n * Middleware: the general middleware model for observing / wrapping / guarding EffectOps.\n */\nexport type Middleware = <A, E, R>(op: EffectOp<A, E, R>) => Effect.Effect<A, OperationError<E>, R>\n\nexport type MiddlewareStack = ReadonlyArray<Middleware>\n\n/**\n * EffectOpMiddlewareEnv:\n * - A Service in Effect Env that carries the current Runtime's MiddlewareStack.\n * - Injected by Runtime.ts when constructing a ManagedRuntime.\n * - Runtime code (e.g. StateTrait.install) uses this Service to decide which MiddlewareStack to use.\n */\nexport interface EffectOpMiddlewareEnv {\n readonly stack: MiddlewareStack\n}\n\nexport class EffectOpMiddlewareTag extends Context.Tag('Logix/EffectOpMiddleware')<\n EffectOpMiddlewareTag,\n EffectOpMiddlewareEnv\n>() {}\n\n/**\n * composeMiddleware:\n * - Composes Middleware from \"outer to inner\" in declaration order:\n * - stack = [mw1, mw2] => mw1 -> mw2 -> effect -> mw2 -> mw1\n * - Matches the reduceRight example in the reference docs.\n */\nexport const composeMiddleware = (stack: MiddlewareStack): Middleware => {\n return <A, E, R>(op: EffectOp<A, E, R>): Effect.Effect<A, OperationError<E>, R> =>\n stack.reduceRight<Effect.Effect<A, OperationError<E>, R>>(\n (eff, mw) => mw({ ...op, effect: eff } as any) as any,\n op.effect as Effect.Effect<A, OperationError<E>, R>,\n )\n}\n\n/**\n * runWithMiddleware:\n * - Executes a given EffectOp with a MiddlewareStack according to the composition rules.\n * - If the stack is empty, returns op.effect directly.\n */\nexport const runWithMiddleware = <A, E, R>(op: EffectOp<A, E, R>, stack: MiddlewareStack): Effect.Effect<A, E, R> => {\n return Effect.gen(function* () {\n const existing = yield* FiberRef.get(currentLinkId)\n const metaLinkId = (op.meta as any)?.linkId\n const linkId = typeof metaLinkId === 'string' && metaLinkId.length > 0 ? metaLinkId : (existing ?? op.id)\n\n const nextOp: EffectOp<A, E, R> = {\n ...op,\n meta: {\n ...(op.meta ?? {}),\n linkId,\n },\n }\n\n const program = stack.length ? composeMiddleware(stack)(nextOp) : nextOp.effect\n\n // linkId is created at the boundary root and reused for nested ops (the FiberRef is the global single source of truth).\n // NOTE: middleware may explicitly reject with OperationRejected.\n return yield* Effect.locally(currentLinkId, linkId)(program as any)\n }) as Effect.Effect<A, E, R>\n}\n","import { Context, Layer } from 'effect'\nimport type { JsonValue } from './jsonValue.js'\nimport type { EvidencePackage, EvidencePackageSource, ObservationEnvelope } from './evidence.js'\nimport { exportEvidencePackage, OBSERVABILITY_PROTOCOL_VERSION } from './evidence.js'\n\nexport type RunId = string\n\nexport interface RunSessionLocalState {\n /**\n * once: a de-dup key set for \"emit only once\" behavior (must be isolated per session to avoid cross-session pollution).\n * Returns true if it's the first occurrence, false if the key has been seen before.\n */\n readonly once: (key: string) => boolean\n\n /**\n * seq: allocate monotonic sequences by key (e.g. opSeq/eventSeq), must be isolated per session.\n */\n readonly nextSeq: (namespace: string, key: string) => number\n\n /** Tests/reset only: clear this session's local state. */\n readonly clear: () => void\n}\n\nexport interface RunSession {\n readonly runId: RunId\n readonly source: EvidencePackageSource\n readonly startedAt: number\n readonly local: RunSessionLocalState\n}\n\nclass RunSessionTagImpl extends Context.Tag('@logixjs/core/RunSession')<RunSessionTagImpl, RunSession>() {}\n\nexport const RunSessionTag = RunSessionTagImpl\n\nexport interface EvidenceSink {\n readonly record: (type: string, payload: JsonValue, options?: { readonly timestamp?: number }) => void\n readonly export: (options?: {\n readonly protocolVersion?: string\n readonly createdAt?: number\n readonly summary?: JsonValue\n readonly maxEvents?: number\n }) => EvidencePackage\n readonly clear: () => void\n}\n\nconst NEXT_RUN_SEQ_KEY = Symbol.for('@logixjs/core/runSession/nextRunSeq')\nlet fallbackNextRunSeq = 0\n\nconst nextRunSeq = (): number => {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const g: any = globalThis as any\n const prev = typeof g[NEXT_RUN_SEQ_KEY] === 'number' ? (g[NEXT_RUN_SEQ_KEY] as number) : 0\n const next = prev + 1\n g[NEXT_RUN_SEQ_KEY] = next\n return next\n } catch {\n fallbackNextRunSeq += 1\n return fallbackNextRunSeq\n }\n}\n\nconst makeRunId = (startedAt: number): RunId => `run-${startedAt}.${nextRunSeq()}`\n\nexport const makeRunSessionLocalState = (): RunSessionLocalState => {\n const onceKeys = new Set<string>()\n const seqByNamespace = new Map<string, Map<string, number>>()\n\n return {\n once: (key) => {\n if (onceKeys.has(key)) return false\n onceKeys.add(key)\n return true\n },\n nextSeq: (namespace, key) => {\n const byKey = seqByNamespace.get(namespace) ?? new Map<string, number>()\n if (!seqByNamespace.has(namespace)) seqByNamespace.set(namespace, byKey)\n const prev = byKey.get(key) ?? 0\n const next = prev + 1\n byKey.set(key, next)\n return next\n },\n clear: () => {\n onceKeys.clear()\n seqByNamespace.clear()\n },\n }\n}\n\nexport const makeRunSession = (options?: {\n readonly runId?: RunId\n readonly source?: EvidencePackageSource\n readonly startedAt?: number\n readonly local?: RunSessionLocalState\n}): RunSession => {\n const startedAt = options?.startedAt ?? Date.now()\n return {\n runId: options?.runId ?? makeRunId(startedAt),\n source: options?.source ?? { host: 'unknown' },\n startedAt,\n local: options?.local ?? makeRunSessionLocalState(),\n }\n}\n\nexport const makeEvidenceSink = (session: RunSession): EvidenceSink => {\n const events: ObservationEnvelope[] = []\n let nextSeq = 1\n\n return {\n record: (type, payload, options) => {\n events.push({\n protocolVersion: OBSERVABILITY_PROTOCOL_VERSION,\n runId: session.runId,\n seq: nextSeq++,\n timestamp: options?.timestamp ?? Date.now(),\n type,\n payload,\n })\n },\n export: (options) => {\n const protocolVersion = options?.protocolVersion ?? OBSERVABILITY_PROTOCOL_VERSION\n const maxEvents = options?.maxEvents\n\n const selected =\n typeof maxEvents === 'number' && Number.isFinite(maxEvents) && maxEvents > 0\n ? events.slice(Math.max(0, events.length - Math.floor(maxEvents)))\n : events.slice()\n\n return exportEvidencePackage({\n protocolVersion,\n runId: session.runId,\n source: session.source,\n createdAt: options?.createdAt,\n events: selected,\n summary: options?.summary,\n })\n },\n clear: () => {\n events.length = 0\n nextSeq = 1\n },\n }\n}\n\nexport const runSessionLayer = (session?: RunSession): Layer.Layer<RunSessionTagImpl, never, never> =>\n Layer.succeed(RunSessionTag, session ?? makeRunSession()) as Layer.Layer<RunSessionTagImpl, never, never>\n","export type JsonValue =\n | null\n | boolean\n | number\n | string\n | ReadonlyArray<JsonValue>\n | { readonly [key: string]: JsonValue }\n\nexport type DowngradeReason = 'non_serializable' | 'oversized' | 'unknown'\n\nexport const isJsonValue = (input: unknown): input is JsonValue => {\n const seen = new WeakSet<object>()\n\n const loop = (value: unknown, depth: number): value is JsonValue => {\n if (depth > 64) return false\n if (value === null) return true\n\n switch (typeof value) {\n case 'string':\n case 'boolean':\n return true\n case 'number':\n return Number.isFinite(value)\n case 'object': {\n if (Array.isArray(value)) {\n if (seen.has(value)) return false\n seen.add(value)\n for (const item of value) {\n if (!loop(item, depth + 1)) return false\n }\n return true\n }\n\n if (!isPlainRecord(value)) return false\n if (seen.has(value)) return false\n seen.add(value)\n\n for (const v of Object.values(value)) {\n if (!loop(v, depth + 1)) return false\n }\n\n return true\n }\n default:\n return false\n }\n }\n\n return loop(input, 0)\n}\n\nexport interface JsonValueProjectionStats {\n readonly dropped: number\n readonly oversized: number\n readonly nonSerializable: number\n}\n\nexport interface JsonValueProjection {\n readonly value: JsonValue\n readonly stats: JsonValueProjectionStats\n readonly downgrade?: DowngradeReason\n}\n\nexport interface JsonValueProjectOptions {\n readonly maxDepth?: number\n readonly maxObjectKeys?: number\n readonly maxArrayLength?: number\n readonly maxStringLength?: number\n readonly maxJsonBytes?: number\n readonly oversizedPreviewBytes?: number\n}\n\nconst defaultOptions: Required<JsonValueProjectOptions> = {\n maxDepth: 6,\n maxObjectKeys: 32,\n maxArrayLength: 32,\n maxStringLength: 256,\n maxJsonBytes: 4 * 1024,\n oversizedPreviewBytes: 256,\n}\n\nconst truncateString = (value: string, maxLen: number, stats: MutableStats): string => {\n if (value.length <= maxLen) return value\n stats.oversized += 1\n return value.slice(0, maxLen)\n}\n\ntype MutableStats = {\n dropped: number\n oversized: number\n nonSerializable: number\n}\n\nconst mergeDowngrade = (current: DowngradeReason | undefined, next: DowngradeReason): DowngradeReason => {\n if (!current) return next\n if (current === 'non_serializable' || next === 'non_serializable') return 'non_serializable'\n if (current === 'oversized' || next === 'oversized') return 'oversized'\n return 'unknown'\n}\n\nfunction isPlainRecord(value: unknown): value is Record<string, unknown> {\n if (typeof value !== 'object' || value === null) return false\n const proto = Object.getPrototypeOf(value)\n return proto === Object.prototype || proto === null\n}\n\nconst asNumber = (value: number, stats: MutableStats): JsonValue => {\n if (Number.isFinite(value)) return value\n stats.nonSerializable += 1\n return String(value)\n}\n\nconst toJsonValueInternal = (\n input: unknown,\n options: Required<JsonValueProjectOptions>,\n stats: MutableStats,\n seen: WeakSet<object>,\n depth: number,\n): JsonValue => {\n if (input === null) return null\n\n switch (typeof input) {\n case 'string':\n return truncateString(input, options.maxStringLength, stats)\n case 'number':\n return asNumber(input, stats)\n case 'boolean':\n return input\n case 'bigint':\n stats.nonSerializable += 1\n return truncateString(input.toString(), options.maxStringLength, stats)\n case 'symbol':\n stats.nonSerializable += 1\n return truncateString(input.toString(), options.maxStringLength, stats)\n case 'function':\n stats.nonSerializable += 1\n return '[Function]'\n case 'undefined':\n stats.dropped += 1\n return null\n }\n\n // object\n if (depth >= options.maxDepth) {\n stats.oversized += 1\n return '[Truncated]'\n }\n\n if (input instanceof Date) {\n return input.toISOString()\n }\n\n if (input instanceof Error) {\n stats.nonSerializable += 1\n return {\n name: truncateString(input.name, options.maxStringLength, stats),\n message: truncateString(input.message, options.maxStringLength, stats),\n }\n }\n\n if (typeof input === 'object') {\n if (seen.has(input)) {\n stats.nonSerializable += 1\n return '[Circular]'\n }\n seen.add(input)\n }\n\n if (Array.isArray(input)) {\n const out: Array<JsonValue> = []\n const limit = Math.min(input.length, options.maxArrayLength)\n for (let i = 0; i < limit; i++) {\n out.push(toJsonValueInternal(input[i], options, stats, seen, depth + 1))\n }\n if (input.length > limit) {\n stats.oversized += 1\n out.push(`[...${input.length - limit} more]`)\n }\n return out\n }\n\n if (!isPlainRecord(input)) {\n stats.nonSerializable += 1\n return truncateString(String(input), options.maxStringLength, stats)\n }\n\n const entries = Object.entries(input)\n const limit = Math.min(entries.length, options.maxObjectKeys)\n const out: Record<string, JsonValue> = {}\n\n for (let i = 0; i < limit; i++) {\n const [rawKey, rawValue] = entries[i]!\n const key = truncateString(rawKey, options.maxStringLength, stats)\n if (rawValue === undefined) {\n stats.dropped += 1\n continue\n }\n out[key] = toJsonValueInternal(rawValue, options, stats, seen, depth + 1)\n }\n\n if (entries.length > limit) {\n stats.oversized += 1\n out.__truncatedKeys = entries.length - limit\n }\n\n return out\n}\n\nexport const projectJsonValue = (input: unknown, options?: JsonValueProjectOptions): JsonValueProjection => {\n const resolved: Required<JsonValueProjectOptions> = { ...defaultOptions, ...(options ?? {}) }\n const stats: MutableStats = { dropped: 0, oversized: 0, nonSerializable: 0 }\n const seen = new WeakSet<object>()\n\n let downgrade: DowngradeReason | undefined\n const value = toJsonValueInternal(input, resolved, stats, seen, 0)\n\n if (stats.nonSerializable > 0) {\n downgrade = mergeDowngrade(downgrade, 'non_serializable')\n }\n if (stats.oversized > 0) {\n downgrade = mergeDowngrade(downgrade, 'oversized')\n }\n\n // Hard gate: ensure JSON.stringify never throws and respect the max byte budget.\n try {\n const json = JSON.stringify(value)\n if (json.length > resolved.maxJsonBytes) {\n downgrade = mergeDowngrade(downgrade, 'oversized')\n const preview = json.slice(0, Math.min(resolved.oversizedPreviewBytes, resolved.maxJsonBytes))\n return {\n value: {\n _tag: 'oversized',\n bytes: json.length,\n preview,\n },\n stats: {\n dropped: stats.dropped,\n oversized: stats.oversized + 1,\n nonSerializable: stats.nonSerializable,\n },\n downgrade,\n }\n }\n } catch {\n downgrade = mergeDowngrade(downgrade, 'non_serializable')\n return {\n value: '[Unserializable]',\n stats: {\n dropped: stats.dropped,\n oversized: stats.oversized,\n nonSerializable: stats.nonSerializable + 1,\n },\n downgrade,\n }\n }\n\n return {\n value,\n stats: {\n dropped: stats.dropped,\n oversized: stats.oversized,\n nonSerializable: stats.nonSerializable,\n },\n downgrade,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,YAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,WAAAC;AAAA,EAAA,gBAAAC;AAAA;AAAA;;;ACMA,IAAAC,iBAA+B;;;ACF/B,oBAA0C;AAOnC,IAAM,gBAAgB,uBAAS,WAA+B,MAAS;AAkCvE,IAAM,wBAAwB,CAAC,YAMZ;AAAA,EACxB,MAAM;AAAA,EACN,SAAS,OAAO;AAAA,EAChB,MAAM,OAAO;AAAA,EACb,MAAM,OAAO;AAAA,EACb,QAAQ,OAAO;AAAA,EACf,SAAS,OAAO;AAClB;AAqEO,IAAM,wBAAN,cAAoC,sBAAQ,IAAI,0BAA0B,EAG/E,EAAE;AAAC;AAQE,IAAM,oBAAoB,CAAC,UAAuC;AACvE,SAAO,CAAU,OACf,MAAM;AAAA,IACJ,CAAC,KAAK,OAAO,GAAG,EAAE,GAAG,IAAI,QAAQ,IAAI,CAAQ;AAAA,IAC7C,GAAG;AAAA,EACL;AACJ;AAOO,IAAM,oBAAoB,CAAU,IAAuB,UAAmD;AACnH,SAAO,qBAAO,IAAI,aAAa;AAC7B,UAAM,WAAW,OAAO,uBAAS,IAAI,aAAa;AAClD,UAAM,aAAc,GAAG,MAAc;AACrC,UAAM,SAAS,OAAO,eAAe,YAAY,WAAW,SAAS,IAAI,aAAc,YAAY,GAAG;AAEtG,UAAM,SAA4B;AAAA,MAChC,GAAG;AAAA,MACH,MAAM;AAAA,QACJ,GAAI,GAAG,QAAQ,CAAC;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAEA,UAAM,UAAU,MAAM,SAAS,kBAAkB,KAAK,EAAE,MAAM,IAAI,OAAO;AAIzE,WAAO,OAAO,qBAAO,QAAQ,eAAe,MAAM,EAAE,OAAc;AAAA,EACpE,CAAC;AACH;;;AC3KA,IAAAC,iBAA+B;;;ACwE/B,IAAM,iBAAoD;AAAA,EACxD,UAAU;AAAA,EACV,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,cAAc,IAAI;AAAA,EAClB,uBAAuB;AACzB;;;ADjDA,IAAM,oBAAN,cAAgC,uBAAQ,IAAI,0BAA0B,EAAiC,EAAE;AAAC;AAEnG,IAAM,gBAAgB;;;AFVtB,IAAMC,qBAAyB;AAE/B,IAAMC,yBAA6B;AAO1C,IAAI,kBAAkB;AAEtB,IAAM,YAAY,MAAc;AAC9B,qBAAmB;AACnB,SAAO;AACT;AAEA,IAAM,SAAS,CAAC,YAAgC,UAC9C,aAAa,GAAG,UAAU,MAAM,KAAK,KAAK,IAAI,KAAK;AAO9C,IAAM,OAAO,CAAU,YAOJ;AAAA,EACxB,GAAI,OAAO,KACP,EAAE,IAAI,OAAO,IAAI,MAAM,OAAO,KAAK,KAClC,MAAM;AACL,UAAM,OAAY,OAAO,QAAQ,CAAC;AAClC,UAAM,aAAiC,KAAK;AAC5C,UAAM,QACJ,OAAO,KAAK,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,IAAI,KAAK,MAAM,KAAK,KAAK,IAAI,UAAU;AACrG,WAAO;AAAA,MACL,IAAI,OAAO,YAAY,KAAK;AAAA,MAC5B,MAAM,KAAK,UAAU,QAAQ,OAAO,EAAE,GAAG,MAAM,MAAM;AAAA,IACvD;AAAA,EACF,GAAG;AAAA,EACP,MAAM,OAAO;AAAA,EACb,MAAM,OAAO;AAAA,EACb,SAAS,OAAO;AAAA,EAChB,QAAQ,OAAO;AACjB;AAOO,IAAM,mBAAmB,CAAU,WAQxC,sBAAO,IAAI,aAAa;AACtB,MAAI,OAAO,IAAI;AACb,WAAO;AAAA,MACL,IAAI,OAAO;AAAA,MACX,MAAM,OAAO;AAAA,MACb,MAAM,OAAO;AAAA,MACb,SAAS,OAAO;AAAA,MAChB,MAAM,OAAO;AAAA,MACb,QAAQ,OAAO;AAAA,IACjB;AAAA,EACF;AAEA,QAAM,OAAY,OAAO,QAAQ,CAAC;AAClC,QAAM,aAAiC,KAAK;AAE5C,MAAI;AACJ,MAAI,OAAO,KAAK,UAAU,YAAY,OAAO,SAAS,KAAK,KAAK,GAAG;AACjE,YAAQ,KAAK,MAAM,KAAK,KAAK;AAAA,EAC/B,OAAO;AACL,UAAM,aAAa,OAAO,sBAAO,cAAc,aAAa;AAC5D,QAAI,sBAAO,OAAO,UAAU,GAAG;AAC7B,YAAM,MAAM,cAAc;AAC1B,cAAQ,WAAW,MAAM,MAAM,QAAQ,SAAS,GAAG;AAAA,IACrD,OAAO;AACL,cAAQ,UAAU;AAAA,IACpB;AAAA,EACF;AAEA,SAAO;AAAA,IACL,IAAI,OAAO,YAAY,KAAK;AAAA,IAC5B,MAAM,OAAO;AAAA,IACb,MAAM,OAAO;AAAA,IACb,SAAS,OAAO;AAAA,IAChB,MAAM,KAAK,UAAU,QAAQ,OAAO,EAAE,GAAG,MAAM,MAAM;AAAA,IACrD,QAAQ,OAAO;AAAA,EACjB;AACF,CAAC;AAOI,IAAM,WAAW,CACtB,IACA,UACuB;AAAA,EACvB,GAAG;AAAA,EACH,MAAM,EAAE,GAAI,GAAG,QAAQ,CAAC,GAAI,GAAG,KAAK;AACtC;AAOO,IAAM,MAAM,CAAU,IAAuB,UAC7C,kBAAkB,IAAI,KAAK;;;AD7H3B,IAAMC,qBAA6BA;AAEnC,IAAMC,yBAAiCA;AAEvC,IAAMC,QAAgB;AAEtB,IAAMC,oBAA4B;AAElC,IAAMC,YAAoB;AAE1B,IAAMC,OAAe;","names":["composeMiddleware","make","makeInRunSession","makeOperationRejected","run","withMeta","import_effect","import_effect","composeMiddleware","makeOperationRejected","composeMiddleware","makeOperationRejected","make","makeInRunSession","withMeta","run"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as effect_Effect from 'effect/Effect';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* OperationPolicy:
|
|
6
|
+
* - Local policy markers (intent only; no rule logic attached).
|
|
7
|
+
*
|
|
8
|
+
* Constraints (enforced by Runtime/middleware together):
|
|
9
|
+
* - Only observation-only capabilities (Observer) may be disabled; global guards must not be disabled.
|
|
10
|
+
*/
|
|
11
|
+
interface OperationPolicy$2 {
|
|
12
|
+
readonly disableObservers?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* OperationRejected:
|
|
16
|
+
* - Unified failure result when a guard rejects execution.
|
|
17
|
+
* - Semantics: explicit failure with no business side effects (rejection must happen before user code executes).
|
|
18
|
+
*/
|
|
19
|
+
interface OperationRejected$2 {
|
|
20
|
+
readonly _tag: 'OperationRejected';
|
|
21
|
+
readonly message: string;
|
|
22
|
+
readonly kind?: EffectOp$2['kind'];
|
|
23
|
+
readonly name?: string;
|
|
24
|
+
readonly linkId?: string;
|
|
25
|
+
readonly details?: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* OperationError:
|
|
29
|
+
* - Any boundary operation executed via EffectOp may be explicitly rejected by Guard middleware.
|
|
30
|
+
* - Therefore, the middleware error channel must allow OperationRejected to be added.
|
|
31
|
+
*/
|
|
32
|
+
type OperationError$2<E> = E | OperationRejected$2;
|
|
33
|
+
/**
|
|
34
|
+
* EffectOp: a unified representation of an Effect execution at an "observable boundary".
|
|
35
|
+
*
|
|
36
|
+
* - Out / Err / Env are the generic parameters of the underlying Effect.
|
|
37
|
+
* - meta carries structured context needed by Devtools / Middleware.
|
|
38
|
+
*/
|
|
39
|
+
interface EffectOp$2<Out = unknown, Err = unknown, Env = unknown> {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly kind: 'action' | 'flow' | 'state' | 'service' | 'lifecycle' | 'trait-computed' | 'trait-link' | 'trait-source' | 'devtools';
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly payload?: unknown;
|
|
44
|
+
readonly meta?: {
|
|
45
|
+
/**
|
|
46
|
+
* linkId:
|
|
47
|
+
* - Operation chain id: multiple boundary ops in the same chain must share it.
|
|
48
|
+
* - Runtime ensures this field is populated on all boundary ops.
|
|
49
|
+
*/
|
|
50
|
+
linkId?: string;
|
|
51
|
+
moduleId?: string;
|
|
52
|
+
instanceId?: string;
|
|
53
|
+
runtimeLabel?: string;
|
|
54
|
+
txnId?: string;
|
|
55
|
+
txnSeq?: number;
|
|
56
|
+
opSeq?: number;
|
|
57
|
+
fieldPath?: string;
|
|
58
|
+
deps?: ReadonlyArray<string>;
|
|
59
|
+
from?: string;
|
|
60
|
+
to?: string;
|
|
61
|
+
traitNodeId?: string;
|
|
62
|
+
stepId?: string;
|
|
63
|
+
resourceId?: string;
|
|
64
|
+
key?: unknown;
|
|
65
|
+
trace?: ReadonlyArray<string>;
|
|
66
|
+
tags?: ReadonlyArray<string>;
|
|
67
|
+
policy?: OperationPolicy$2;
|
|
68
|
+
readonly [k: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
readonly effect: Effect.Effect<Out, Err, Env>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Middleware: the general middleware model for observing / wrapping / guarding EffectOps.
|
|
74
|
+
*/
|
|
75
|
+
type Middleware$2 = <A, E, R>(op: EffectOp$2<A, E, R>) => Effect.Effect<A, OperationError$2<E>, R>;
|
|
76
|
+
type MiddlewareStack$2 = ReadonlyArray<Middleware$2>;
|
|
77
|
+
|
|
78
|
+
type EffectOp$1<Out = unknown, Err = unknown, Env = unknown> = EffectOp$2<Out, Err, Env>;
|
|
79
|
+
type OperationPolicy$1 = OperationPolicy$2;
|
|
80
|
+
type OperationRejected$1 = OperationRejected$2;
|
|
81
|
+
type OperationError$1<E> = OperationError$2<E>;
|
|
82
|
+
type Middleware$1 = Middleware$2;
|
|
83
|
+
type MiddlewareStack$1 = MiddlewareStack$2;
|
|
84
|
+
|
|
85
|
+
type EffectOp<Out = unknown, Err = unknown, Env = unknown> = EffectOp$1<Out, Err, Env>;
|
|
86
|
+
type OperationPolicy = OperationPolicy$1;
|
|
87
|
+
type OperationRejected = OperationRejected$1;
|
|
88
|
+
type OperationError<E> = OperationError$1<E>;
|
|
89
|
+
type Middleware = Middleware$1;
|
|
90
|
+
type MiddlewareStack = MiddlewareStack$1;
|
|
91
|
+
declare const composeMiddleware: (stack: MiddlewareStack$2) => Middleware$2;
|
|
92
|
+
declare const makeOperationRejected: (params: {
|
|
93
|
+
readonly message: string;
|
|
94
|
+
readonly kind?: EffectOp$2["kind"];
|
|
95
|
+
readonly name?: string;
|
|
96
|
+
readonly linkId?: string;
|
|
97
|
+
readonly details?: unknown;
|
|
98
|
+
}) => OperationRejected$2;
|
|
99
|
+
declare const make: <A, E, R>(params: {
|
|
100
|
+
readonly kind: EffectOp$1["kind"];
|
|
101
|
+
readonly name: string;
|
|
102
|
+
readonly effect: effect_Effect.Effect<A, E, R>;
|
|
103
|
+
readonly payload?: unknown;
|
|
104
|
+
readonly meta?: EffectOp$1["meta"];
|
|
105
|
+
readonly id?: string;
|
|
106
|
+
}) => EffectOp$1<A, E, R>;
|
|
107
|
+
declare const makeInRunSession: <A, E, R>(params: {
|
|
108
|
+
readonly kind: EffectOp$1["kind"];
|
|
109
|
+
readonly name: string;
|
|
110
|
+
readonly effect: effect_Effect.Effect<A, E, R>;
|
|
111
|
+
readonly payload?: unknown;
|
|
112
|
+
readonly meta?: EffectOp$1["meta"];
|
|
113
|
+
readonly id?: string;
|
|
114
|
+
}) => effect_Effect.Effect<EffectOp$1<A, E, R>, never, any>;
|
|
115
|
+
declare const withMeta: <A, E, R>(op: EffectOp$1<A, E, R>, meta: Partial<NonNullable<EffectOp$1["meta"]>>) => EffectOp$1<A, E, R>;
|
|
116
|
+
declare const run: <A, E, R>(op: EffectOp$1<A, E, R>, stack: MiddlewareStack$1) => effect_Effect.Effect<A, E, R>;
|
|
117
|
+
|
|
118
|
+
export { type EffectOp, type Middleware, type MiddlewareStack, type OperationError, type OperationPolicy, type OperationRejected, composeMiddleware, make, makeInRunSession, makeOperationRejected, run, withMeta };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as effect_Effect from 'effect/Effect';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* OperationPolicy:
|
|
6
|
+
* - Local policy markers (intent only; no rule logic attached).
|
|
7
|
+
*
|
|
8
|
+
* Constraints (enforced by Runtime/middleware together):
|
|
9
|
+
* - Only observation-only capabilities (Observer) may be disabled; global guards must not be disabled.
|
|
10
|
+
*/
|
|
11
|
+
interface OperationPolicy$2 {
|
|
12
|
+
readonly disableObservers?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* OperationRejected:
|
|
16
|
+
* - Unified failure result when a guard rejects execution.
|
|
17
|
+
* - Semantics: explicit failure with no business side effects (rejection must happen before user code executes).
|
|
18
|
+
*/
|
|
19
|
+
interface OperationRejected$2 {
|
|
20
|
+
readonly _tag: 'OperationRejected';
|
|
21
|
+
readonly message: string;
|
|
22
|
+
readonly kind?: EffectOp$2['kind'];
|
|
23
|
+
readonly name?: string;
|
|
24
|
+
readonly linkId?: string;
|
|
25
|
+
readonly details?: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* OperationError:
|
|
29
|
+
* - Any boundary operation executed via EffectOp may be explicitly rejected by Guard middleware.
|
|
30
|
+
* - Therefore, the middleware error channel must allow OperationRejected to be added.
|
|
31
|
+
*/
|
|
32
|
+
type OperationError$2<E> = E | OperationRejected$2;
|
|
33
|
+
/**
|
|
34
|
+
* EffectOp: a unified representation of an Effect execution at an "observable boundary".
|
|
35
|
+
*
|
|
36
|
+
* - Out / Err / Env are the generic parameters of the underlying Effect.
|
|
37
|
+
* - meta carries structured context needed by Devtools / Middleware.
|
|
38
|
+
*/
|
|
39
|
+
interface EffectOp$2<Out = unknown, Err = unknown, Env = unknown> {
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly kind: 'action' | 'flow' | 'state' | 'service' | 'lifecycle' | 'trait-computed' | 'trait-link' | 'trait-source' | 'devtools';
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly payload?: unknown;
|
|
44
|
+
readonly meta?: {
|
|
45
|
+
/**
|
|
46
|
+
* linkId:
|
|
47
|
+
* - Operation chain id: multiple boundary ops in the same chain must share it.
|
|
48
|
+
* - Runtime ensures this field is populated on all boundary ops.
|
|
49
|
+
*/
|
|
50
|
+
linkId?: string;
|
|
51
|
+
moduleId?: string;
|
|
52
|
+
instanceId?: string;
|
|
53
|
+
runtimeLabel?: string;
|
|
54
|
+
txnId?: string;
|
|
55
|
+
txnSeq?: number;
|
|
56
|
+
opSeq?: number;
|
|
57
|
+
fieldPath?: string;
|
|
58
|
+
deps?: ReadonlyArray<string>;
|
|
59
|
+
from?: string;
|
|
60
|
+
to?: string;
|
|
61
|
+
traitNodeId?: string;
|
|
62
|
+
stepId?: string;
|
|
63
|
+
resourceId?: string;
|
|
64
|
+
key?: unknown;
|
|
65
|
+
trace?: ReadonlyArray<string>;
|
|
66
|
+
tags?: ReadonlyArray<string>;
|
|
67
|
+
policy?: OperationPolicy$2;
|
|
68
|
+
readonly [k: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
readonly effect: Effect.Effect<Out, Err, Env>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Middleware: the general middleware model for observing / wrapping / guarding EffectOps.
|
|
74
|
+
*/
|
|
75
|
+
type Middleware$2 = <A, E, R>(op: EffectOp$2<A, E, R>) => Effect.Effect<A, OperationError$2<E>, R>;
|
|
76
|
+
type MiddlewareStack$2 = ReadonlyArray<Middleware$2>;
|
|
77
|
+
|
|
78
|
+
type EffectOp$1<Out = unknown, Err = unknown, Env = unknown> = EffectOp$2<Out, Err, Env>;
|
|
79
|
+
type OperationPolicy$1 = OperationPolicy$2;
|
|
80
|
+
type OperationRejected$1 = OperationRejected$2;
|
|
81
|
+
type OperationError$1<E> = OperationError$2<E>;
|
|
82
|
+
type Middleware$1 = Middleware$2;
|
|
83
|
+
type MiddlewareStack$1 = MiddlewareStack$2;
|
|
84
|
+
|
|
85
|
+
type EffectOp<Out = unknown, Err = unknown, Env = unknown> = EffectOp$1<Out, Err, Env>;
|
|
86
|
+
type OperationPolicy = OperationPolicy$1;
|
|
87
|
+
type OperationRejected = OperationRejected$1;
|
|
88
|
+
type OperationError<E> = OperationError$1<E>;
|
|
89
|
+
type Middleware = Middleware$1;
|
|
90
|
+
type MiddlewareStack = MiddlewareStack$1;
|
|
91
|
+
declare const composeMiddleware: (stack: MiddlewareStack$2) => Middleware$2;
|
|
92
|
+
declare const makeOperationRejected: (params: {
|
|
93
|
+
readonly message: string;
|
|
94
|
+
readonly kind?: EffectOp$2["kind"];
|
|
95
|
+
readonly name?: string;
|
|
96
|
+
readonly linkId?: string;
|
|
97
|
+
readonly details?: unknown;
|
|
98
|
+
}) => OperationRejected$2;
|
|
99
|
+
declare const make: <A, E, R>(params: {
|
|
100
|
+
readonly kind: EffectOp$1["kind"];
|
|
101
|
+
readonly name: string;
|
|
102
|
+
readonly effect: effect_Effect.Effect<A, E, R>;
|
|
103
|
+
readonly payload?: unknown;
|
|
104
|
+
readonly meta?: EffectOp$1["meta"];
|
|
105
|
+
readonly id?: string;
|
|
106
|
+
}) => EffectOp$1<A, E, R>;
|
|
107
|
+
declare const makeInRunSession: <A, E, R>(params: {
|
|
108
|
+
readonly kind: EffectOp$1["kind"];
|
|
109
|
+
readonly name: string;
|
|
110
|
+
readonly effect: effect_Effect.Effect<A, E, R>;
|
|
111
|
+
readonly payload?: unknown;
|
|
112
|
+
readonly meta?: EffectOp$1["meta"];
|
|
113
|
+
readonly id?: string;
|
|
114
|
+
}) => effect_Effect.Effect<EffectOp$1<A, E, R>, never, any>;
|
|
115
|
+
declare const withMeta: <A, E, R>(op: EffectOp$1<A, E, R>, meta: Partial<NonNullable<EffectOp$1["meta"]>>) => EffectOp$1<A, E, R>;
|
|
116
|
+
declare const run: <A, E, R>(op: EffectOp$1<A, E, R>, stack: MiddlewareStack$1) => effect_Effect.Effect<A, E, R>;
|
|
117
|
+
|
|
118
|
+
export { type EffectOp, type Middleware, type MiddlewareStack, type OperationError, type OperationPolicy, type OperationRejected, composeMiddleware, make, makeInRunSession, makeOperationRejected, run, withMeta };
|
package/dist/EffectOp.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
composeMiddleware,
|
|
3
|
+
make,
|
|
4
|
+
makeInRunSession,
|
|
5
|
+
makeOperationRejected,
|
|
6
|
+
run,
|
|
7
|
+
withMeta
|
|
8
|
+
} from "./chunk-OFADUJWJ.js";
|
|
9
|
+
import "./chunk-M7IYCTJV.js";
|
|
10
|
+
import "./chunk-JWOYLO27.js";
|
|
11
|
+
import "./chunk-PZ5AY32C.js";
|
|
12
|
+
|
|
13
|
+
// src/EffectOp.ts
|
|
14
|
+
var composeMiddleware2 = composeMiddleware;
|
|
15
|
+
var makeOperationRejected2 = makeOperationRejected;
|
|
16
|
+
var make2 = make;
|
|
17
|
+
var makeInRunSession2 = makeInRunSession;
|
|
18
|
+
var withMeta2 = withMeta;
|
|
19
|
+
var run2 = run;
|
|
20
|
+
export {
|
|
21
|
+
composeMiddleware2 as composeMiddleware,
|
|
22
|
+
make2 as make,
|
|
23
|
+
makeInRunSession2 as makeInRunSession,
|
|
24
|
+
makeOperationRejected2 as makeOperationRejected,
|
|
25
|
+
run2 as run,
|
|
26
|
+
withMeta2 as withMeta
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=EffectOp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/EffectOp.ts"],"sourcesContent":["// Public EffectOp API (@logixjs/core/EffectOp).\n// Note: implementation lives in `src/internal/effect-op.ts` to avoid internal importing root submodules.\n\nimport * as Internal from './internal/effect-op.js'\n\nexport type EffectOp<Out = unknown, Err = unknown, Env = unknown> = Internal.EffectOp<Out, Err, Env>\n\nexport type OperationPolicy = Internal.OperationPolicy\n\nexport type OperationRejected = Internal.OperationRejected\n\nexport type OperationError<E> = Internal.OperationError<E>\n\nexport type Middleware = Internal.Middleware\n\nexport type MiddlewareStack = Internal.MiddlewareStack\n\nexport const composeMiddleware = Internal.composeMiddleware\n\nexport const makeOperationRejected = Internal.makeOperationRejected\n\nexport const make = Internal.make\n\nexport const makeInRunSession = Internal.makeInRunSession\n\nexport const withMeta = Internal.withMeta\n\nexport const run = Internal.run\n"],"mappings":";;;;;;;;;;;;;AAiBO,IAAMA,qBAA6B;AAEnC,IAAMC,yBAAiC;AAEvC,IAAMC,QAAgB;AAEtB,IAAMC,oBAA4B;AAElC,IAAMC,YAAoB;AAE1B,IAAMC,OAAe;","names":["composeMiddleware","makeOperationRejected","make","makeInRunSession","withMeta","run"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const getNodeEnv: () => string | undefined;
|
|
2
|
+
declare const isDevEnv: () => boolean;
|
|
3
|
+
|
|
4
|
+
declare const Env_getNodeEnv: typeof getNodeEnv;
|
|
5
|
+
declare const Env_isDevEnv: typeof isDevEnv;
|
|
6
|
+
declare namespace Env {
|
|
7
|
+
export { Env_getNodeEnv as getNodeEnv, Env_isDevEnv as isDevEnv };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Env as E, getNodeEnv as g, isDevEnv as i };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const getNodeEnv: () => string | undefined;
|
|
2
|
+
declare const isDevEnv: () => boolean;
|
|
3
|
+
|
|
4
|
+
declare const Env_getNodeEnv: typeof getNodeEnv;
|
|
5
|
+
declare const Env_isDevEnv: typeof isDevEnv;
|
|
6
|
+
declare namespace Env {
|
|
7
|
+
export { Env_getNodeEnv as getNodeEnv, Env_isDevEnv as isDevEnv };
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Env as E, getNodeEnv as g, isDevEnv as i };
|
package/dist/Env.cjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
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/Env.ts
|
|
21
|
+
var Env_exports = {};
|
|
22
|
+
__export(Env_exports, {
|
|
23
|
+
getNodeEnv: () => getNodeEnv2,
|
|
24
|
+
isDevEnv: () => isDevEnv2
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(Env_exports);
|
|
27
|
+
|
|
28
|
+
// src/internal/runtime/core/env.ts
|
|
29
|
+
var import_effect = require("effect");
|
|
30
|
+
var getNodeEnv = () => {
|
|
31
|
+
try {
|
|
32
|
+
const env = globalThis?.process?.env;
|
|
33
|
+
return typeof env?.NODE_ENV === "string" ? env.NODE_ENV : void 0;
|
|
34
|
+
} catch {
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var isDevEnv = () => getNodeEnv() !== "production";
|
|
39
|
+
var StateTransactionConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
|
|
40
|
+
};
|
|
41
|
+
var ReadQueryStrictGateConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
|
|
42
|
+
};
|
|
43
|
+
var ReplayModeConfigTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ReplayModeConfig")() {
|
|
44
|
+
};
|
|
45
|
+
var StateTransactionOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
|
|
46
|
+
};
|
|
47
|
+
var ConcurrencyPolicyTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
|
|
48
|
+
};
|
|
49
|
+
var ConcurrencyPolicyOverridesTagImpl = class extends import_effect.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/Env.ts
|
|
53
|
+
var getNodeEnv2 = () => getNodeEnv();
|
|
54
|
+
var isDevEnv2 = () => isDevEnv();
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
getNodeEnv,
|
|
58
|
+
isDevEnv
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=Env.cjs.map
|
package/dist/Env.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Env.ts","../src/internal/runtime/core/env.ts"],"sourcesContent":["// Shared env helpers (@logixjs/core/Env):\n// - getNodeEnv: reads the caller environment from globalThis.process.env.NODE_ENV.\n// - isDevEnv: treats NODE_ENV !== \"production\" as a dev environment.\n// The implementation lives in internal/runtime/core/env.ts to avoid duplication across packages.\n\nimport * as Internal from './internal/runtime/core/env.js'\n\nexport const getNodeEnv = (): string | undefined => Internal.getNodeEnv()\n\nexport const isDevEnv = (): boolean => Internal.isDevEnv()\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,gBAAAC;AAAA;AAAA;;;ACAA,oBAA+B;AAKxB,IAAM,aAAa,MAA0B;AAClD,MAAI;AAEF,UAAM,MAAO,YAAoB,SAAS;AAC1C,WAAO,OAAO,KAAK,aAAa,WAAW,IAAI,WAAW;AAAA,EAC5D,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,IAAM,WAAW,MAAe,WAAW,MAAM;AAgExD,IAAM,gCAAN,cAA4C,sBAAQ,IAAI,6CAA6C,EAGnG,EAAE;AAAC;AAML,IAAM,mCAAN,cAA+C,sBAAQ,IAAI,gDAAgD,EAGzG,EAAE;AAAC;AAUL,IAAM,0BAAN,cAAsC,sBAAQ,IAAI,gCAAgC,EAGhF,EAAE;AAAC;AAkFL,IAAM,mCAAN,cAA+C,sBAAQ,IAAI,yCAAyC,EAGlG,EAAE;AAAC;AA6BL,IAAM,2BAAN,cAAuC,sBAAQ,IAAI,iCAAiC,EAGlF,EAAE;AAAC;AAaL,IAAM,oCAAN,cAAgD,sBAAQ,IAAI,0CAA0C,EAGpG,EAAE;AAAC;;;ADtOE,IAAMC,cAAa,MAAmC,WAAW;AAEjE,IAAMC,YAAW,MAAwB,SAAS;","names":["getNodeEnv","isDevEnv","getNodeEnv","isDevEnv"]}
|
package/dist/Env.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { g as getNodeEnv, i as isDevEnv } from './Env-DuJ6JrU2.cjs';
|
package/dist/Env.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { g as getNodeEnv, i as isDevEnv } from './Env-DuJ6JrU2.js';
|
package/dist/Env.js
ADDED
package/dist/Env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|