@mx-space/cli 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/ROADMAP.md +6 -0
- package/bin/mxs.cjs +5 -5
- package/dist/{Lexical.dev-CMevU1DO.mjs → Lexical.dev-rcxzwpir.mjs} +0 -2
- package/dist/{Lexical.node-BR9e7Cyk.mjs → Lexical.node-BUsI9gWr.mjs} +1 -3
- package/dist/{Lexical.prod-PUD-z9fY.mjs → Lexical.prod-C8HtkSD6.mjs} +0 -2
- package/dist/{LexicalClipboard.dev-DZC2zppG.mjs → LexicalClipboard.dev-BpqRwTLP.mjs} +5 -7
- package/dist/{LexicalClipboard.node-e5G1wVGb.mjs → LexicalClipboard.node-CO-MCKx5.mjs} +1 -3
- package/dist/{LexicalClipboard.prod-DE2azzIb.mjs → LexicalClipboard.prod-B_xdeiAC.mjs} +5 -7
- package/dist/{LexicalCodeCore.dev-gs--x55I.mjs → LexicalCodeCore.dev-7_cexm39.mjs} +2 -4
- package/dist/{LexicalCodeCore.prod-DPHOnyEj.mjs → LexicalCodeCore.prod-Bd6WFHcO.mjs} +2 -4
- package/dist/{LexicalDragon.dev-CVe8bzVN.mjs → LexicalDragon.dev-gBP8WSRS.mjs} +2 -4
- package/dist/{LexicalDragon.node-c7EHvcnK.mjs → LexicalDragon.node-OG6G55nl.mjs} +1 -3
- package/dist/{LexicalDragon.prod-D6KvqyLD.mjs → LexicalDragon.prod-DP-_Q8cv.mjs} +2 -4
- package/dist/{LexicalExtension.dev-PDo8HyEw.mjs → LexicalExtension.dev-DVbjljrm.mjs} +2 -4
- package/dist/{LexicalExtension.node-BKzjRb-0.mjs → LexicalExtension.node-CF3EAPN7.mjs} +1 -3
- package/dist/{LexicalExtension.prod-D0x_lX7q.mjs → LexicalExtension.prod-DklHHErZ.mjs} +2 -4
- package/dist/{LexicalHeadless.dev-DBKcW82j.mjs → LexicalHeadless.dev-DdWLM7Nl.mjs} +1 -3
- package/dist/{LexicalHeadless.prod-D4nEh7cR.mjs → LexicalHeadless.prod-CoiiTDzR.mjs} +1 -3
- package/dist/{LexicalHtml.dev-vsWW05es.mjs → LexicalHtml.dev-C3ZSWBFZ.mjs} +3 -5
- package/dist/{LexicalHtml.node-CpibAfba.mjs → LexicalHtml.node-D0TD152E.mjs} +1 -3
- package/dist/{LexicalHtml.prod-Bqz-3WAp.mjs → LexicalHtml.prod-CX47X0zl.mjs} +3 -5
- package/dist/{LexicalLink.dev-BO0J0B1E.mjs → LexicalLink.dev-BS1Bf-yD.mjs} +3 -5
- package/dist/{LexicalLink.prod-D66AhUCZ.mjs → LexicalLink.prod-B_crkoHP.mjs} +3 -5
- package/dist/{LexicalList.dev-DVGTWRk0.mjs → LexicalList.dev-OMqmcnQ-.mjs} +3 -5
- package/dist/{LexicalList.prod-Bao7NGl7.mjs → LexicalList.prod-CpL1s8vS.mjs} +3 -5
- package/dist/{LexicalMarkdown.dev-CRWkZwlp.mjs → LexicalMarkdown.dev-BHSdx_Gr.mjs} +3 -5
- package/dist/{LexicalMarkdown.prod-tGG6js4r.mjs → LexicalMarkdown.prod-C-S7Ii6-.mjs} +3 -5
- package/dist/{LexicalRichText.dev-DPXfQePC.mjs → LexicalRichText.dev-Bz9A_WbM.mjs} +5 -7
- package/dist/{LexicalRichText.node-BEkm_YwY.mjs → LexicalRichText.node-DDpwfE-P.mjs} +4 -6
- package/dist/{LexicalRichText.prod-DlfudC5w.mjs → LexicalRichText.prod-C8qXACDL.mjs} +5 -7
- package/dist/{LexicalSelection.dev-BVTArZ-b.mjs → LexicalSelection.dev-CQ380fnD.mjs} +1 -3
- package/dist/{LexicalSelection.node-CQ8iTYsz.mjs → LexicalSelection.node-DesBMjIE.mjs} +1 -3
- package/dist/{LexicalSelection.prod-BZKGGs-G.mjs → LexicalSelection.prod-D2jivCDB.mjs} +1 -3
- package/dist/{LexicalTable.dev-C-AOEpJn.mjs → LexicalTable.dev-Ca7mQ7Jk.mjs} +4 -6
- package/dist/{LexicalTable.prod-Cyn0qWxZ.mjs → LexicalTable.prod-DyPAcC7y.mjs} +4 -6
- package/dist/{LexicalUtils.dev-DRRDyAlS.mjs → LexicalUtils.dev-HxM8F0g6.mjs} +2 -4
- package/dist/{LexicalUtils.node-Dz-HANi6.mjs → LexicalUtils.node-lCWjRjoG.mjs} +1 -3
- package/dist/{LexicalUtils.prod-CmeHwh8W.mjs → LexicalUtils.prod-Bti5w4ki.mjs} +2 -4
- package/dist/bin/mxs.d.mts +2 -929
- package/dist/bin/mxs.mjs +2 -3596
- package/dist/esm-BKxzBG1f.mjs +2 -0
- package/dist/esm-DO9hVR8S.mjs +37652 -0
- package/dist/index.d.mts +1492 -374
- package/dist/index.mjs +2 -11
- package/dist/mxs-BUOk42XP.mjs +30444 -0
- package/dist/mxs-CM8-6uAr.d.mts +4 -0
- package/package.json +7 -2
- package/dist/Lexical.dev-CMevU1DO.mjs.map +0 -1
- package/dist/Lexical.node-BR9e7Cyk.mjs.map +0 -1
- package/dist/Lexical.prod-PUD-z9fY.mjs.map +0 -1
- package/dist/LexicalClipboard.dev-DZC2zppG.mjs.map +0 -1
- package/dist/LexicalClipboard.node-e5G1wVGb.mjs.map +0 -1
- package/dist/LexicalClipboard.prod-DE2azzIb.mjs.map +0 -1
- package/dist/LexicalCodeCore.dev-gs--x55I.mjs.map +0 -1
- package/dist/LexicalCodeCore.prod-DPHOnyEj.mjs.map +0 -1
- package/dist/LexicalDragon.dev-CVe8bzVN.mjs.map +0 -1
- package/dist/LexicalDragon.node-c7EHvcnK.mjs.map +0 -1
- package/dist/LexicalDragon.prod-D6KvqyLD.mjs.map +0 -1
- package/dist/LexicalExtension.dev-PDo8HyEw.mjs.map +0 -1
- package/dist/LexicalExtension.node-BKzjRb-0.mjs.map +0 -1
- package/dist/LexicalExtension.prod-D0x_lX7q.mjs.map +0 -1
- package/dist/LexicalHeadless.dev-DBKcW82j.mjs.map +0 -1
- package/dist/LexicalHeadless.prod-D4nEh7cR.mjs.map +0 -1
- package/dist/LexicalHtml.dev-vsWW05es.mjs.map +0 -1
- package/dist/LexicalHtml.node-CpibAfba.mjs.map +0 -1
- package/dist/LexicalHtml.prod-Bqz-3WAp.mjs.map +0 -1
- package/dist/LexicalLink.dev-BO0J0B1E.mjs.map +0 -1
- package/dist/LexicalLink.prod-D66AhUCZ.mjs.map +0 -1
- package/dist/LexicalList.dev-DVGTWRk0.mjs.map +0 -1
- package/dist/LexicalList.prod-Bao7NGl7.mjs.map +0 -1
- package/dist/LexicalMarkdown.dev-CRWkZwlp.mjs.map +0 -1
- package/dist/LexicalMarkdown.prod-tGG6js4r.mjs.map +0 -1
- package/dist/LexicalRichText.dev-DPXfQePC.mjs.map +0 -1
- package/dist/LexicalRichText.node-BEkm_YwY.mjs.map +0 -1
- package/dist/LexicalRichText.prod-DlfudC5w.mjs.map +0 -1
- package/dist/LexicalSelection.dev-BVTArZ-b.mjs.map +0 -1
- package/dist/LexicalSelection.node-CQ8iTYsz.mjs.map +0 -1
- package/dist/LexicalSelection.prod-BZKGGs-G.mjs.map +0 -1
- package/dist/LexicalTable.dev-C-AOEpJn.mjs.map +0 -1
- package/dist/LexicalTable.prod-Cyn0qWxZ.mjs.map +0 -1
- package/dist/LexicalUtils.dev-DRRDyAlS.mjs.map +0 -1
- package/dist/LexicalUtils.node-Dz-HANi6.mjs.map +0 -1
- package/dist/LexicalUtils.prod-CmeHwh8W.mjs.map +0 -1
- package/dist/auth-CAKmTDpF.mjs +0 -211
- package/dist/auth-CAKmTDpF.mjs.map +0 -1
- package/dist/bin/mxs.mjs.map +0 -1
- package/dist/config-store-B8_9iStL.mjs +0 -166
- package/dist/config-store-B8_9iStL.mjs.map +0 -1
- package/dist/create-5wbU7IQh.mjs +0 -23
- package/dist/create-5wbU7IQh.mjs.map +0 -1
- package/dist/create-Bs6K7AyQ.mjs +0 -23
- package/dist/create-Bs6K7AyQ.mjs.map +0 -1
- package/dist/create-DBReocgJ.mjs +0 -24
- package/dist/create-DBReocgJ.mjs.map +0 -1
- package/dist/create-DGVaE0_S.mjs +0 -19
- package/dist/create-DGVaE0_S.mjs.map +0 -1
- package/dist/create-lLFZuMsz.mjs +0 -23
- package/dist/create-lLFZuMsz.mjs.map +0 -1
- package/dist/delete-6tkhHQDp.mjs +0 -22
- package/dist/delete-6tkhHQDp.mjs.map +0 -1
- package/dist/delete-CRFxitDN.mjs +0 -31
- package/dist/delete-CRFxitDN.mjs.map +0 -1
- package/dist/delete-DU2Hvsy8.mjs +0 -22
- package/dist/delete-DU2Hvsy8.mjs.map +0 -1
- package/dist/delete-nJmHtvfq.mjs +0 -31
- package/dist/delete-nJmHtvfq.mjs.map +0 -1
- package/dist/delete-tJhXI8s4.mjs +0 -22
- package/dist/delete-tJhXI8s4.mjs.map +0 -1
- package/dist/dist-DJF1Ntdn.mjs +0 -810
- package/dist/dist-DJF1Ntdn.mjs.map +0 -1
- package/dist/document-output-BFJdwPV0.mjs +0 -200
- package/dist/document-output-BFJdwPV0.mjs.map +0 -1
- package/dist/edit-BMjTbPQO.mjs +0 -40
- package/dist/edit-BMjTbPQO.mjs.map +0 -1
- package/dist/edit-BnEmMmv6.mjs +0 -80
- package/dist/edit-BnEmMmv6.mjs.map +0 -1
- package/dist/edit-C4vRSmRy.mjs +0 -79
- package/dist/edit-C4vRSmRy.mjs.map +0 -1
- package/dist/edit-CQsW5gnk.mjs +0 -86
- package/dist/edit-CQsW5gnk.mjs.map +0 -1
- package/dist/editor-BIw1ALTF.mjs +0 -42
- package/dist/editor-BIw1ALTF.mjs.map +0 -1
- package/dist/envelope-overlays-DXXygxdF.mjs +0 -26
- package/dist/envelope-overlays-DXXygxdF.mjs.map +0 -1
- package/dist/get-B3Y5hAAO.mjs +0 -10
- package/dist/get-B3Y5hAAO.mjs.map +0 -1
- package/dist/get-C5fmd5Vf.mjs +0 -14
- package/dist/get-C5fmd5Vf.mjs.map +0 -1
- package/dist/get-Cdp2tmwz.mjs +0 -28
- package/dist/get-Cdp2tmwz.mjs.map +0 -1
- package/dist/get-D18ChSKU.mjs +0 -10
- package/dist/get-D18ChSKU.mjs.map +0 -1
- package/dist/get-NSHTGu4Y.mjs +0 -13
- package/dist/get-NSHTGu4Y.mjs.map +0 -1
- package/dist/get-XBPJr95m.mjs +0 -14
- package/dist/get-XBPJr95m.mjs.map +0 -1
- package/dist/list-B6703n9X.mjs +0 -10
- package/dist/list-B6703n9X.mjs.map +0 -1
- package/dist/list-BtNocJhc.mjs +0 -14
- package/dist/list-BtNocJhc.mjs.map +0 -1
- package/dist/list-C9dXrU9H.mjs +0 -10
- package/dist/list-C9dXrU9H.mjs.map +0 -1
- package/dist/list-CcwcYZgN.mjs +0 -10
- package/dist/list-CcwcYZgN.mjs.map +0 -1
- package/dist/list-Ctc8b5gT.mjs +0 -10
- package/dist/list-Ctc8b5gT.mjs.map +0 -1
- package/dist/list-b60JzCTw.mjs +0 -15
- package/dist/list-b60JzCTw.mjs.map +0 -1
- package/dist/litexml-codec-CfIxcPG0.mjs +0 -13451
- package/dist/litexml-codec-CfIxcPG0.mjs.map +0 -1
- package/dist/login-bZx4HaVs.mjs +0 -591
- package/dist/login-bZx4HaVs.mjs.map +0 -1
- package/dist/logout-C0Dzitsu.mjs +0 -18
- package/dist/logout-C0Dzitsu.mjs.map +0 -1
- package/dist/ls-wMiTXZPQ.mjs +0 -33
- package/dist/ls-wMiTXZPQ.mjs.map +0 -1
- package/dist/mark-Dh9BErsf.mjs +0 -29
- package/dist/mark-Dh9BErsf.mjs.map +0 -1
- package/dist/onboarding-Bw_I8qpf.mjs +0 -214
- package/dist/onboarding-Bw_I8qpf.mjs.map +0 -1
- package/dist/output-D2dDlyV2.d.mts +0 -16
- package/dist/output-vzequvhd.mjs +0 -163
- package/dist/output-vzequvhd.mjs.map +0 -1
- package/dist/payload-CO4zbNr8.mjs +0 -547
- package/dist/payload-CO4zbNr8.mjs.map +0 -1
- package/dist/profile-CNe2uWJi.mjs +0 -172
- package/dist/profile-CNe2uWJi.mjs.map +0 -1
- package/dist/publish-CzzucXQq.mjs +0 -23
- package/dist/publish-CzzucXQq.mjs.map +0 -1
- package/dist/publish-DRQkpxsz.mjs +0 -23
- package/dist/publish-DRQkpxsz.mjs.map +0 -1
- package/dist/resolve-BYg5Gees.mjs +0 -23
- package/dist/resolve-BYg5Gees.mjs.map +0 -1
- package/dist/resolve-BlpMdnaM.mjs +0 -16
- package/dist/resolve-BlpMdnaM.mjs.map +0 -1
- package/dist/resolve-CUsHGcb-.mjs +0 -119
- package/dist/resolve-CUsHGcb-.mjs.map +0 -1
- package/dist/resolve-helpers-CoHYa2uk.mjs +0 -30
- package/dist/resolve-helpers-CoHYa2uk.mjs.map +0 -1
- package/dist/resolve-jdb1VqAG.mjs +0 -26
- package/dist/resolve-jdb1VqAG.mjs.map +0 -1
- package/dist/rm-D-2iW1Cr.mjs +0 -33
- package/dist/rm-D-2iW1Cr.mjs.map +0 -1
- package/dist/run-Dnax6uhZ.mjs +0 -130
- package/dist/run-Dnax6uhZ.mjs.map +0 -1
- package/dist/self-update-CZywTwGd.mjs +0 -1610
- package/dist/self-update-CZywTwGd.mjs.map +0 -1
- package/dist/set-Dk28LAy5.mjs +0 -43
- package/dist/set-Dk28LAy5.mjs.map +0 -1
- package/dist/shared-d0_6ZPn_.mjs +0 -50
- package/dist/shared-d0_6ZPn_.mjs.map +0 -1
- package/dist/show-DScu6mXz.mjs +0 -39
- package/dist/show-DScu6mXz.mjs.map +0 -1
- package/dist/status-8F6tgphP.mjs +0 -23
- package/dist/status-8F6tgphP.mjs.map +0 -1
- package/dist/update-B1LGxV0n.mjs +0 -30
- package/dist/update-B1LGxV0n.mjs.map +0 -1
- package/dist/update-CXetpFT3.mjs +0 -28
- package/dist/update-CXetpFT3.mjs.map +0 -1
- package/dist/update-Dr4BW8U-.mjs +0 -30
- package/dist/update-Dr4BW8U-.mjs.map +0 -1
- package/dist/update-bqcHRJPC.mjs +0 -36
- package/dist/update-bqcHRJPC.mjs.map +0 -1
- package/dist/update-dBtzzmkN.mjs +0 -37
- package/dist/update-dBtzzmkN.mjs.map +0 -1
- package/dist/use-D7eKESSW.mjs +0 -29
- package/dist/use-D7eKESSW.mjs.map +0 -1
- package/dist/whoami-CKSNd6zL.mjs +0 -22
- package/dist/whoami-CKSNd6zL.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,396 +1,1514 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as run } from "./mxs-CM8-6uAr.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
4
|
-
|
|
3
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Invariant helper.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
* @category models
|
|
9
|
+
*/
|
|
10
|
+
type Invariant<A> = (_: A) => A;
|
|
11
|
+
/**
|
|
12
|
+
* @since 3.9.0
|
|
13
|
+
* @category models
|
|
14
|
+
*/
|
|
15
|
+
declare namespace Invariant {
|
|
16
|
+
/**
|
|
17
|
+
* @since 3.9.0
|
|
18
|
+
* @category models
|
|
19
|
+
*/
|
|
20
|
+
type Type<A> = A extends Invariant<infer U> ? U : never;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Covariant helper.
|
|
24
|
+
*
|
|
25
|
+
* @since 2.0.0
|
|
26
|
+
* @category models
|
|
27
|
+
*/
|
|
28
|
+
type Covariant<A> = (_: never) => A;
|
|
29
|
+
/**
|
|
30
|
+
* @since 3.9.0
|
|
31
|
+
* @category models
|
|
32
|
+
*/
|
|
33
|
+
declare namespace Covariant {
|
|
34
|
+
/**
|
|
35
|
+
* @since 3.9.0
|
|
36
|
+
* @category models
|
|
37
|
+
*/
|
|
38
|
+
type Type<A> = A extends Covariant<infer U> ? U : never;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Contravariant helper.
|
|
42
|
+
*
|
|
43
|
+
* @since 2.0.0
|
|
44
|
+
* @category models
|
|
45
|
+
*/
|
|
46
|
+
type Contravariant<A> = (_: A) => void;
|
|
47
|
+
/**
|
|
48
|
+
* @since 3.9.0
|
|
49
|
+
* @category models
|
|
50
|
+
*/
|
|
51
|
+
declare namespace Contravariant {
|
|
52
|
+
/**
|
|
53
|
+
* @since 3.9.0
|
|
54
|
+
* @category models
|
|
55
|
+
*/
|
|
56
|
+
type Type<A> = A extends Contravariant<infer U> ? U : never;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Conditional type that returns `void` if `S` is an empty object type,
|
|
60
|
+
* otherwise returns `S`.
|
|
61
|
+
*
|
|
62
|
+
* @since 3.19.20
|
|
63
|
+
*/
|
|
64
|
+
type VoidIfEmpty<S> = keyof S extends never ? void : S;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Hash.d.ts
|
|
67
|
+
/**
|
|
68
|
+
* @since 2.0.0
|
|
69
|
+
* @category models
|
|
70
|
+
*/
|
|
71
|
+
interface Hash {
|
|
72
|
+
[symbol](): number;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Equal.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* @since 2.0.0
|
|
78
|
+
* @category models
|
|
79
|
+
*/
|
|
80
|
+
interface Equal extends Hash {
|
|
81
|
+
[symbol](that: Equal): boolean;
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Pipeable.d.ts
|
|
85
|
+
/**
|
|
86
|
+
* @since 2.0.0
|
|
87
|
+
* @category Models
|
|
88
|
+
*/
|
|
89
|
+
interface Pipeable {
|
|
90
|
+
pipe<A>(this: A): A;
|
|
91
|
+
pipe<A, B = never>(this: A, ab: (_: A) => B): B;
|
|
92
|
+
pipe<A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C;
|
|
93
|
+
pipe<A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D;
|
|
94
|
+
pipe<A, B = never, C = never, D = never, E = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E): E;
|
|
95
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F): F;
|
|
96
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G): G;
|
|
97
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H): H;
|
|
98
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I): I;
|
|
99
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J): J;
|
|
100
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K): K;
|
|
101
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L): L;
|
|
102
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M): M;
|
|
103
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N): N;
|
|
104
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O): O;
|
|
105
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P): P;
|
|
106
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q): Q;
|
|
107
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R): R;
|
|
108
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S): S;
|
|
109
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T): T;
|
|
110
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U;
|
|
111
|
+
pipe<A, B = never, C = never, D = never, E = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E, ef: (_: E) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R, rs: (_: R) => S, st: (_: S) => T, tu: (_: T) => U): U;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Unify.d.ts
|
|
115
|
+
/**
|
|
116
|
+
* @since 2.0.0
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* @since 2.0.0
|
|
120
|
+
*/
|
|
121
|
+
declare const unifySymbol: unique symbol;
|
|
122
|
+
/**
|
|
123
|
+
* @since 2.0.0
|
|
124
|
+
*/
|
|
125
|
+
type unifySymbol = typeof unifySymbol;
|
|
126
|
+
/**
|
|
127
|
+
* @since 2.0.0
|
|
128
|
+
*/
|
|
129
|
+
declare const typeSymbol: unique symbol;
|
|
130
|
+
/**
|
|
131
|
+
* @since 2.0.0
|
|
132
|
+
*/
|
|
133
|
+
type typeSymbol = typeof typeSymbol;
|
|
134
|
+
/**
|
|
135
|
+
* @since 2.0.0
|
|
136
|
+
*/
|
|
137
|
+
declare const ignoreSymbol: unique symbol;
|
|
138
|
+
/**
|
|
139
|
+
* @since 2.0.0
|
|
140
|
+
*/
|
|
141
|
+
type ignoreSymbol = typeof ignoreSymbol;
|
|
5
142
|
//#endregion
|
|
6
|
-
//#region
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
143
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Utils.d.ts
|
|
144
|
+
/**
|
|
145
|
+
* @since 3.0.6
|
|
146
|
+
*/
|
|
147
|
+
declare const YieldWrapTypeId: unique symbol;
|
|
148
|
+
/**
|
|
149
|
+
* @since 3.0.6
|
|
150
|
+
*/
|
|
151
|
+
declare class YieldWrap<T> {
|
|
152
|
+
#private;
|
|
153
|
+
constructor(value: T);
|
|
154
|
+
/**
|
|
155
|
+
* @since 3.0.6
|
|
156
|
+
*/
|
|
157
|
+
[YieldWrapTypeId](): T;
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Option.d.ts
|
|
161
|
+
/**
|
|
162
|
+
* The `Option` data type represents optional values. An `Option<A>` can either
|
|
163
|
+
* be `Some<A>`, containing a value of type `A`, or `None`, representing the
|
|
164
|
+
* absence of a value.
|
|
165
|
+
*
|
|
166
|
+
* **When to Use**
|
|
167
|
+
*
|
|
168
|
+
* You can use `Option` in scenarios like:
|
|
169
|
+
*
|
|
170
|
+
* - Using it for initial values
|
|
171
|
+
* - Returning values from functions that are not defined for all possible
|
|
172
|
+
* inputs (referred to as “partial functions”)
|
|
173
|
+
* - Managing optional fields in data structures
|
|
174
|
+
* - Handling optional function arguments
|
|
175
|
+
*
|
|
176
|
+
* @category Models
|
|
177
|
+
* @since 2.0.0
|
|
178
|
+
*/
|
|
179
|
+
type Option<A> = None$1<A> | Some$1<A>;
|
|
180
|
+
/**
|
|
181
|
+
* @category Symbols
|
|
182
|
+
* @since 2.0.0
|
|
183
|
+
*/
|
|
184
|
+
declare const TypeId$2: unique symbol;
|
|
185
|
+
/**
|
|
186
|
+
* @category Symbols
|
|
187
|
+
* @since 2.0.0
|
|
188
|
+
*/
|
|
189
|
+
type TypeId$2 = typeof TypeId$2;
|
|
190
|
+
/**
|
|
191
|
+
* @category Models
|
|
192
|
+
* @since 2.0.0
|
|
193
|
+
*/
|
|
194
|
+
interface None$1<out A> extends Pipeable, Inspectable {
|
|
195
|
+
readonly _tag: "None";
|
|
196
|
+
readonly _op: "None";
|
|
197
|
+
readonly [TypeId$2]: {
|
|
198
|
+
readonly _A: Covariant<A>;
|
|
199
|
+
};
|
|
200
|
+
[typeSymbol]?: unknown;
|
|
201
|
+
[unifySymbol]?: OptionUnify<this>;
|
|
202
|
+
[ignoreSymbol]?: OptionUnifyIgnore;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @category Models
|
|
206
|
+
* @since 2.0.0
|
|
207
|
+
*/
|
|
208
|
+
interface Some$1<out A> extends Pipeable, Inspectable {
|
|
209
|
+
readonly _tag: "Some";
|
|
210
|
+
readonly _op: "Some";
|
|
211
|
+
readonly value: A;
|
|
212
|
+
readonly [TypeId$2]: {
|
|
213
|
+
readonly _A: Covariant<A>;
|
|
23
214
|
};
|
|
215
|
+
[typeSymbol]?: unknown;
|
|
216
|
+
[unifySymbol]?: OptionUnify<this>;
|
|
217
|
+
[ignoreSymbol]?: OptionUnifyIgnore;
|
|
24
218
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
declare
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
declare function deleteCredentials(): Promise<void>;
|
|
67
|
-
declare function enforceCredentialsMode(p?: string): Promise<boolean>;
|
|
68
|
-
declare function normalizeApiUrl(input: string): string;
|
|
69
|
-
declare function resolveConfig(overrides?: StoreOverrides): Promise<ResolvedConfig>;
|
|
219
|
+
/**
|
|
220
|
+
* @category Models
|
|
221
|
+
* @since 2.0.0
|
|
222
|
+
*/
|
|
223
|
+
interface OptionUnify<A extends {
|
|
224
|
+
[typeSymbol]?: any;
|
|
225
|
+
}> {
|
|
226
|
+
Option?: () => A[typeSymbol] extends Option<infer A0> | infer _ ? Option<A0> : never;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* @since 2.0.0
|
|
230
|
+
*/
|
|
231
|
+
declare namespace Option {
|
|
232
|
+
/**
|
|
233
|
+
* Extracts the type of the value contained in an `Option`.
|
|
234
|
+
*
|
|
235
|
+
* **Example** (Getting the Value Type of an Option)
|
|
236
|
+
*
|
|
237
|
+
* ```ts
|
|
238
|
+
* import { Option } from "effect"
|
|
239
|
+
*
|
|
240
|
+
* // Declare an Option holding a string
|
|
241
|
+
* declare const myOption: Option.Option<string>
|
|
242
|
+
*
|
|
243
|
+
* // Extract the type of the value within the Option
|
|
244
|
+
* //
|
|
245
|
+
* // ┌─── string
|
|
246
|
+
* // ▼
|
|
247
|
+
* type MyType = Option.Option.Value<typeof myOption>
|
|
248
|
+
* ```
|
|
249
|
+
*
|
|
250
|
+
* @since 2.0.0
|
|
251
|
+
* @category Type-level Utils
|
|
252
|
+
*/
|
|
253
|
+
type Value<T extends Option<any>> = [T] extends [Option<infer _A>] ? _A : never;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @category Models
|
|
257
|
+
* @since 2.0.0
|
|
258
|
+
*/
|
|
259
|
+
interface OptionUnifyIgnore {}
|
|
70
260
|
//#endregion
|
|
71
|
-
//#region
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
261
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Context.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* @since 2.0.0
|
|
264
|
+
* @category symbol
|
|
265
|
+
*/
|
|
266
|
+
declare const TagTypeId: unique symbol;
|
|
267
|
+
/**
|
|
268
|
+
* @since 2.0.0
|
|
269
|
+
* @category symbol
|
|
270
|
+
*/
|
|
271
|
+
type TagTypeId = typeof TagTypeId;
|
|
272
|
+
/**
|
|
273
|
+
* @since 3.5.9
|
|
274
|
+
* @category models
|
|
275
|
+
*/
|
|
276
|
+
interface Tag$2<in out Id, in out Value> extends Pipeable, Inspectable, ReadonlyTag<Id, Value> {
|
|
277
|
+
readonly _op: "Tag";
|
|
278
|
+
readonly Service: Value;
|
|
279
|
+
readonly Identifier: Id;
|
|
280
|
+
readonly [TagTypeId]: {
|
|
281
|
+
readonly _Service: Invariant<Value>;
|
|
282
|
+
readonly _Identifier: Invariant<Id>;
|
|
283
|
+
};
|
|
284
|
+
of(self: Value): Value;
|
|
285
|
+
context(self: Value): Context$1<Id>;
|
|
286
|
+
readonly stack?: string | undefined;
|
|
287
|
+
readonly key: string;
|
|
288
|
+
[typeSymbol]?: unknown;
|
|
289
|
+
[unifySymbol]?: TagUnify<this>;
|
|
290
|
+
[ignoreSymbol]?: TagUnifyIgnore;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @since 3.5.9
|
|
294
|
+
* @category models
|
|
295
|
+
*/
|
|
296
|
+
interface ReadonlyTag<in out Id, out Value> extends Pipeable, Inspectable, Effect<Value, never, Id> {
|
|
297
|
+
readonly _op: "Tag";
|
|
298
|
+
readonly Service: Value;
|
|
299
|
+
readonly Identifier: Id;
|
|
300
|
+
readonly [TagTypeId]: {
|
|
301
|
+
readonly _Service: Covariant<Value>;
|
|
302
|
+
readonly _Identifier: Invariant<Id>;
|
|
91
303
|
};
|
|
304
|
+
readonly stack?: string | undefined;
|
|
305
|
+
readonly key: string;
|
|
92
306
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
307
|
+
/**
|
|
308
|
+
* @since 2.0.0
|
|
309
|
+
* @category models
|
|
310
|
+
*/
|
|
311
|
+
interface TagClassShape<Id, Shape> {
|
|
312
|
+
readonly [TagTypeId]: TagTypeId;
|
|
313
|
+
readonly Type: Shape;
|
|
314
|
+
readonly Id: Id;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* @since 2.0.0
|
|
318
|
+
* @category models
|
|
319
|
+
*/
|
|
320
|
+
interface TagClass<Self, Id extends string, Type> extends Tag$2<Self, Type> {
|
|
321
|
+
new (_: never): TagClassShape<Id, Type>;
|
|
322
|
+
readonly key: Id;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* @category models
|
|
326
|
+
* @since 2.0.0
|
|
327
|
+
*/
|
|
328
|
+
interface TagUnify<A extends {
|
|
329
|
+
[typeSymbol]?: any;
|
|
330
|
+
}> {
|
|
331
|
+
Tag?: () => Extract<A[typeSymbol], Tag$2<any, any>>;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* @category models
|
|
335
|
+
* @since 2.0.0
|
|
336
|
+
*/
|
|
337
|
+
interface TagUnifyIgnore {}
|
|
338
|
+
/**
|
|
339
|
+
* @since 2.0.0
|
|
340
|
+
*/
|
|
341
|
+
declare namespace Tag$2 {
|
|
342
|
+
/**
|
|
343
|
+
* @since 2.0.0
|
|
344
|
+
*/
|
|
345
|
+
type Service<T extends Tag$2<any, any> | TagClassShape<any, any>> = T extends Tag$2<any, any> ? T["Service"] : T extends TagClassShape<any, infer A> ? A : never;
|
|
346
|
+
/**
|
|
347
|
+
* @since 2.0.0
|
|
348
|
+
*/
|
|
349
|
+
type Identifier<T extends Tag$2<any, any> | TagClassShape<any, any>> = T extends Tag$2<any, any> ? T["Identifier"] : T extends TagClassShape<any, any> ? T : never;
|
|
350
|
+
}
|
|
351
|
+
declare const TypeId$1: unique symbol;
|
|
352
|
+
/**
|
|
353
|
+
* @since 2.0.0
|
|
354
|
+
* @category symbol
|
|
355
|
+
*/
|
|
356
|
+
type TypeId$1 = typeof TypeId$1;
|
|
357
|
+
/**
|
|
358
|
+
* @since 2.0.0
|
|
359
|
+
* @category models
|
|
360
|
+
*/
|
|
361
|
+
interface Context$1<in Services> extends Equal, Pipeable, Inspectable {
|
|
362
|
+
readonly [TypeId$1]: {
|
|
363
|
+
readonly _Services: Contravariant<Services>;
|
|
364
|
+
};
|
|
365
|
+
readonly unsafeMap: Map<string, any>;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* @example
|
|
369
|
+
* ```ts
|
|
370
|
+
* import * as assert from "node:assert"
|
|
371
|
+
* import { Context, Layer } from "effect"
|
|
372
|
+
*
|
|
373
|
+
* class MyTag extends Context.Tag("MyTag")<
|
|
374
|
+
* MyTag,
|
|
375
|
+
* { readonly myNum: number }
|
|
376
|
+
* >() {
|
|
377
|
+
* static Live = Layer.succeed(this, { myNum: 108 })
|
|
378
|
+
* }
|
|
379
|
+
* ```
|
|
380
|
+
*
|
|
381
|
+
* @since 2.0.0
|
|
382
|
+
* @category constructors
|
|
383
|
+
*/
|
|
384
|
+
declare const Tag$2: <const Id extends string>(id: Id) => <Self, Shape>() => TagClass<Self, Id, Shape>;
|
|
117
385
|
//#endregion
|
|
118
|
-
//#region
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
interface
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
declare
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
386
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Sink.d.ts
|
|
387
|
+
/**
|
|
388
|
+
* @since 2.0.0
|
|
389
|
+
* @category symbols
|
|
390
|
+
*/
|
|
391
|
+
declare const SinkTypeId: unique symbol;
|
|
392
|
+
/**
|
|
393
|
+
* @since 2.0.0
|
|
394
|
+
* @category symbols
|
|
395
|
+
*/
|
|
396
|
+
type SinkTypeId = typeof SinkTypeId;
|
|
397
|
+
/**
|
|
398
|
+
* A `Sink<A, In, L, E, R>` is used to consume elements produced by a `Stream`.
|
|
399
|
+
* You can think of a sink as a function that will consume a variable amount of
|
|
400
|
+
* `In` elements (could be 0, 1, or many), might fail with an error of type `E`,
|
|
401
|
+
* and will eventually yield a value of type `A` together with a remainder of
|
|
402
|
+
* type `L` (i.e. any leftovers).
|
|
403
|
+
*
|
|
404
|
+
* @since 2.0.0
|
|
405
|
+
* @category models
|
|
406
|
+
*/
|
|
407
|
+
interface Sink<out A, in In = unknown, out L = never, out E = never, out R = never> extends Sink.Variance<A, In, L, E, R>, Pipeable {}
|
|
408
|
+
/**
|
|
409
|
+
* @since 2.0.0
|
|
410
|
+
* @category models
|
|
411
|
+
*/
|
|
412
|
+
declare module "./Effect.js" {
|
|
413
|
+
interface Effect<A, E, R> extends Sink<A, unknown, never, E, R> {}
|
|
414
|
+
interface EffectUnifyIgnore {
|
|
415
|
+
Sink?: true;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* @since 2.0.0
|
|
420
|
+
*/
|
|
421
|
+
declare namespace Sink {
|
|
422
|
+
/**
|
|
423
|
+
* @since 2.0.0
|
|
424
|
+
* @category models
|
|
425
|
+
*/
|
|
426
|
+
interface Variance<out A, in In, out L, out E, out R> {
|
|
427
|
+
readonly [SinkTypeId]: VarianceStruct<A, In, L, E, R>;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* @since 2.0.0
|
|
431
|
+
* @category models
|
|
432
|
+
*/
|
|
433
|
+
interface VarianceStruct<out A, in In, out L, out E, out R> {
|
|
434
|
+
_A: Covariant<A>;
|
|
435
|
+
_In: Contravariant<In>;
|
|
436
|
+
_L: Covariant<L>;
|
|
437
|
+
_E: Covariant<E>;
|
|
438
|
+
_R: Covariant<R>;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
155
441
|
//#endregion
|
|
156
|
-
//#region
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
442
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/STM.d.ts
|
|
443
|
+
/**
|
|
444
|
+
* @since 2.0.0
|
|
445
|
+
* @category symbols
|
|
446
|
+
*/
|
|
447
|
+
declare const STMTypeId: unique symbol;
|
|
448
|
+
/**
|
|
449
|
+
* @since 2.0.0
|
|
450
|
+
* @category symbols
|
|
451
|
+
*/
|
|
452
|
+
type STMTypeId = typeof STMTypeId;
|
|
453
|
+
/**
|
|
454
|
+
* `STM<A, E, R>` represents an effect that can be performed transactionally,
|
|
455
|
+
* resulting in a failure `E` or a value `A` that may require an environment
|
|
456
|
+
* `R` to execute.
|
|
457
|
+
*
|
|
458
|
+
* Software Transactional Memory is a technique which allows composition of
|
|
459
|
+
* arbitrary atomic operations. It is the software analog of transactions in
|
|
460
|
+
* database systems.
|
|
461
|
+
*
|
|
462
|
+
* The API is lifted directly from the Haskell package Control.Concurrent.STM
|
|
463
|
+
* although the implementation does not resemble the Haskell one at all.
|
|
464
|
+
*
|
|
465
|
+
* See http://hackage.haskell.org/package/stm-2.5.0.0/docs/Control-Concurrent-STM.html
|
|
466
|
+
*
|
|
467
|
+
* STM in Haskell was introduced in:
|
|
468
|
+
*
|
|
469
|
+
* Composable memory transactions, by Tim Harris, Simon Marlow, Simon Peyton
|
|
470
|
+
* Jones, and Maurice Herlihy, in ACM Conference on Principles and Practice of
|
|
471
|
+
* Parallel Programming 2005.
|
|
472
|
+
*
|
|
473
|
+
* See https://www.microsoft.com/en-us/research/publication/composable-memory-transactions/
|
|
474
|
+
*
|
|
475
|
+
* See also:
|
|
476
|
+
* Lock Free Data Structures using STMs in Haskell, by Anthony Discolo, Tim
|
|
477
|
+
* Harris, Simon Marlow, Simon Peyton Jones, Satnam Singh) FLOPS 2006: Eighth
|
|
478
|
+
* International Symposium on Functional and Logic Programming, Fuji Susono,
|
|
479
|
+
* JAPAN, April 2006
|
|
480
|
+
*
|
|
481
|
+
* https://www.microsoft.com/en-us/research/publication/lock-free-data-structures-using-stms-in-haskell/
|
|
482
|
+
*
|
|
483
|
+
* The implemtation is based on the ZIO STM module, while JS environments have
|
|
484
|
+
* no race conditions from multiple threads STM provides greater benefits for
|
|
485
|
+
* synchronization of Fibers and transactional data-types can be quite useful.
|
|
486
|
+
*
|
|
487
|
+
* @since 2.0.0
|
|
488
|
+
* @category models
|
|
489
|
+
*/
|
|
490
|
+
interface STM<out A, out E = never, out R = never> extends Effect<A, E, R>, STM.Variance<A, E, R>, Pipeable {
|
|
491
|
+
[typeSymbol]?: unknown;
|
|
492
|
+
[unifySymbol]?: STMUnify<this>;
|
|
493
|
+
[ignoreSymbol]?: STMUnifyIgnore;
|
|
494
|
+
[Symbol.iterator](): EffectGenerator<STM<A, E, R>>;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* @since 2.0.0
|
|
498
|
+
* @category models
|
|
499
|
+
*/
|
|
500
|
+
interface STMUnify<A extends {
|
|
501
|
+
[typeSymbol]?: any;
|
|
502
|
+
}> extends EffectUnify<A> {
|
|
503
|
+
STM?: () => A[typeSymbol] extends STM<infer A0, infer E0, infer R0> | infer _ ? STM<A0, E0, R0> : never;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* @category models
|
|
507
|
+
* @since 2.0.0
|
|
508
|
+
*/
|
|
509
|
+
interface STMUnifyIgnore extends EffectUnifyIgnore {
|
|
510
|
+
Effect?: true;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* @since 2.0.0
|
|
514
|
+
* @category models
|
|
515
|
+
*/
|
|
516
|
+
declare module "./Context.js" {
|
|
517
|
+
interface Tag<Id, Value> extends STM<Value, never, Id> {}
|
|
518
|
+
interface Reference<Id, Value> extends STM<Value> {}
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* @since 2.0.0
|
|
522
|
+
* @category models
|
|
523
|
+
*/
|
|
524
|
+
declare module "./Either.js" {
|
|
525
|
+
interface Left<E, A> extends STM<A, E> {
|
|
526
|
+
readonly _tag: "Left";
|
|
527
|
+
}
|
|
528
|
+
interface Right<E, A> extends STM<A, E> {
|
|
529
|
+
readonly _tag: "Right";
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* @since 2.0.0
|
|
534
|
+
* @category models
|
|
535
|
+
*/
|
|
536
|
+
declare module "./Option.js" {
|
|
537
|
+
interface None<A> extends STM<A, NoSuchElementException> {
|
|
538
|
+
readonly _tag: "None";
|
|
539
|
+
}
|
|
540
|
+
interface Some<A> extends STM<A, NoSuchElementException> {
|
|
541
|
+
readonly _tag: "Some";
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* @since 2.0.0
|
|
546
|
+
*/
|
|
547
|
+
declare namespace STM {
|
|
548
|
+
/**
|
|
549
|
+
* @since 2.0.0
|
|
550
|
+
* @category models
|
|
551
|
+
*/
|
|
552
|
+
interface Variance<out A, out E, out R> {
|
|
553
|
+
readonly [STMTypeId]: {
|
|
554
|
+
readonly _A: Covariant<A>;
|
|
555
|
+
readonly _E: Covariant<E>;
|
|
556
|
+
readonly _R: Covariant<R>;
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
}
|
|
168
560
|
//#endregion
|
|
169
|
-
//#region
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
declare
|
|
175
|
-
|
|
561
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Stream.d.ts
|
|
562
|
+
/**
|
|
563
|
+
* @since 2.0.0
|
|
564
|
+
* @category symbols
|
|
565
|
+
*/
|
|
566
|
+
declare const StreamTypeId: unique symbol;
|
|
567
|
+
/**
|
|
568
|
+
* @since 2.0.0
|
|
569
|
+
* @category symbols
|
|
570
|
+
*/
|
|
571
|
+
type StreamTypeId = typeof StreamTypeId;
|
|
572
|
+
/**
|
|
573
|
+
* A `Stream<A, E, R>` is a description of a program that, when evaluated, may
|
|
574
|
+
* emit zero or more values of type `A`, may fail with errors of type `E`, and
|
|
575
|
+
* uses an context of type `R`. One way to think of `Stream` is as a
|
|
576
|
+
* `Effect` program that could emit multiple values.
|
|
577
|
+
*
|
|
578
|
+
* `Stream` is a purely functional *pull* based stream. Pull based streams offer
|
|
579
|
+
* inherent laziness and backpressure, relieving users of the need to manage
|
|
580
|
+
* buffers between operators. As an optimization, `Stream` does not emit
|
|
581
|
+
* single values, but rather an array of values. This allows the cost of effect
|
|
582
|
+
* evaluation to be amortized.
|
|
583
|
+
*
|
|
584
|
+
* `Stream` forms a monad on its `A` type parameter, and has error management
|
|
585
|
+
* facilities for its `E` type parameter, modeled similarly to `Effect` (with
|
|
586
|
+
* some adjustments for the multiple-valued nature of `Stream`). These aspects
|
|
587
|
+
* allow for rich and expressive composition of streams.
|
|
588
|
+
*
|
|
589
|
+
* @since 2.0.0
|
|
590
|
+
* @category models
|
|
591
|
+
*/
|
|
592
|
+
interface Stream<out A, out E = never, out R = never> extends Stream.Variance<A, E, R>, Pipeable {
|
|
593
|
+
[typeSymbol]?: unknown;
|
|
594
|
+
[unifySymbol]?: StreamUnify<this>;
|
|
595
|
+
[ignoreSymbol]?: StreamUnifyIgnore;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* @since 2.0.0
|
|
599
|
+
* @category models
|
|
600
|
+
*/
|
|
601
|
+
interface StreamUnify<A extends {
|
|
602
|
+
[typeSymbol]?: any;
|
|
603
|
+
}> extends EffectUnify<A> {
|
|
604
|
+
Stream?: () => A[typeSymbol] extends Stream<infer A0, infer E0, infer R0> | infer _ ? Stream<A0, E0, R0> : never;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* @category models
|
|
608
|
+
* @since 2.0.0
|
|
609
|
+
*/
|
|
610
|
+
interface StreamUnifyIgnore extends EffectUnifyIgnore {
|
|
611
|
+
Effect?: true;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* @since 2.0.0
|
|
615
|
+
* @category models
|
|
616
|
+
*/
|
|
617
|
+
declare module "./Effect.js" {
|
|
618
|
+
interface Effect<A, E, R> extends Stream<A, E, R> {}
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* @category type lambdas
|
|
622
|
+
* @since 2.0.0
|
|
623
|
+
*/
|
|
624
|
+
/**
|
|
625
|
+
* @since 2.0.0
|
|
626
|
+
*/
|
|
627
|
+
declare namespace Stream {
|
|
628
|
+
/**
|
|
629
|
+
* @since 2.0.0
|
|
630
|
+
* @category models
|
|
631
|
+
*/
|
|
632
|
+
interface Variance<out A, out E, out R> {
|
|
633
|
+
readonly [StreamTypeId]: VarianceStruct<A, E, R>;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* @since 3.4.0
|
|
637
|
+
* @category models
|
|
638
|
+
*/
|
|
639
|
+
interface VarianceStruct<out A, out E, out R> {
|
|
640
|
+
readonly _A: Covariant<A>;
|
|
641
|
+
readonly _E: Covariant<E>;
|
|
642
|
+
readonly _R: Covariant<R>;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* @since 3.4.0
|
|
646
|
+
* @category type-level
|
|
647
|
+
*/
|
|
648
|
+
type Success<T extends Stream<any, any, any>> = [T] extends [Stream<infer _A, infer _E, infer _R>] ? _A : never;
|
|
649
|
+
/**
|
|
650
|
+
* @since 3.4.0
|
|
651
|
+
* @category type-level
|
|
652
|
+
*/
|
|
653
|
+
type Error<T extends Stream<any, any, any>> = [T] extends [Stream<infer _A, infer _E, infer _R>] ? _E : never;
|
|
654
|
+
/**
|
|
655
|
+
* @since 3.4.0
|
|
656
|
+
* @category type-level
|
|
657
|
+
*/
|
|
658
|
+
type Context<T extends Stream<any, any, any>> = [T] extends [Stream<infer _A, infer _E, infer _R>] ? _R : never;
|
|
659
|
+
/**
|
|
660
|
+
* @since 2.0.0
|
|
661
|
+
* @category models
|
|
662
|
+
* @deprecated use Types.TupleOf instead
|
|
663
|
+
*/
|
|
664
|
+
type DynamicTuple<T, N extends number> = N extends N ? number extends N ? Array<T> : DynamicTupleOf<T, N, []> : never;
|
|
665
|
+
/**
|
|
666
|
+
* @since 2.0.0
|
|
667
|
+
* @category models
|
|
668
|
+
* @deprecated use Types.TupleOf instead
|
|
669
|
+
*/
|
|
670
|
+
type DynamicTupleOf<T, N extends number, R extends Array<unknown>> = R["length"] extends N ? R : DynamicTupleOf<T, N, [T, ...R]>;
|
|
671
|
+
}
|
|
176
672
|
//#endregion
|
|
177
|
-
//#region
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
673
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Effect.d.ts
|
|
674
|
+
/**
|
|
675
|
+
* @since 2.0.0
|
|
676
|
+
* @category Symbols
|
|
677
|
+
*/
|
|
678
|
+
declare const EffectTypeId: unique symbol;
|
|
679
|
+
/**
|
|
680
|
+
* @since 2.0.0
|
|
681
|
+
* @category Symbols
|
|
682
|
+
*/
|
|
683
|
+
type EffectTypeId = typeof EffectTypeId;
|
|
684
|
+
/**
|
|
685
|
+
* The `Effect` interface defines a value that describes a workflow or job,
|
|
686
|
+
* which can succeed or fail.
|
|
687
|
+
*
|
|
688
|
+
* **Details**
|
|
689
|
+
*
|
|
690
|
+
* The `Effect` interface represents a computation that can model a workflow
|
|
691
|
+
* involving various types of operations, such as synchronous, asynchronous,
|
|
692
|
+
* concurrent, and parallel interactions. It operates within a context of type
|
|
693
|
+
* `R`, and the result can either be a success with a value of type `A` or a
|
|
694
|
+
* failure with an error of type `E`. The `Effect` is designed to handle complex
|
|
695
|
+
* interactions with external resources, offering advanced features such as
|
|
696
|
+
* fiber-based concurrency, scheduling, interruption handling, and scalability.
|
|
697
|
+
* This makes it suitable for tasks that require fine-grained control over
|
|
698
|
+
* concurrency and error management.
|
|
699
|
+
*
|
|
700
|
+
* To execute an `Effect` value, you need a `Runtime`, which provides the
|
|
701
|
+
* environment necessary to run and manage the computation.
|
|
702
|
+
*
|
|
703
|
+
* @since 2.0.0
|
|
704
|
+
* @category Models
|
|
705
|
+
*/
|
|
706
|
+
interface Effect<out A, out E = never, out R = never> extends Effect.Variance<A, E, R>, Pipeable {
|
|
707
|
+
readonly [typeSymbol]?: unknown;
|
|
708
|
+
readonly [unifySymbol]?: EffectUnify<this>;
|
|
709
|
+
readonly [ignoreSymbol]?: EffectUnifyIgnore;
|
|
710
|
+
[Symbol.iterator](): EffectGenerator<Effect<A, E, R>>;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* @since 3.0.0
|
|
714
|
+
* @category Models
|
|
715
|
+
*/
|
|
716
|
+
interface EffectGenerator<T extends Effect<any, any, any>> {
|
|
717
|
+
next(...args: ReadonlyArray<any>): IteratorResult<YieldWrap<T>, Effect.Success<T>>;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* @since 2.0.0
|
|
721
|
+
* @category Models
|
|
722
|
+
*/
|
|
723
|
+
interface EffectUnify<A extends {
|
|
724
|
+
[typeSymbol]?: any;
|
|
725
|
+
}> extends EitherUnify<A>, OptionUnify<A>, TagUnify<A> {
|
|
726
|
+
Effect?: () => A[typeSymbol] extends Effect<infer A0, infer E0, infer R0> | infer _ ? Effect<A0, E0, R0> : never;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @category Models
|
|
730
|
+
* @since 2.0.0
|
|
731
|
+
*/
|
|
732
|
+
interface EffectUnifyIgnore {
|
|
733
|
+
Tag?: true;
|
|
734
|
+
Option?: true;
|
|
735
|
+
Either?: true;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* @since 2.0.0
|
|
739
|
+
* @category Models
|
|
740
|
+
*/
|
|
741
|
+
declare module "./Context.js" {
|
|
742
|
+
interface Tag<Id, Value> extends Effect<Value, never, Id> {
|
|
743
|
+
[Symbol.iterator](): EffectGenerator<Tag$1<Id, Value>>;
|
|
744
|
+
}
|
|
745
|
+
interface Reference<Id, Value> extends Effect<Value> {
|
|
746
|
+
[Symbol.iterator](): EffectGenerator<Reference<Id, Value>>;
|
|
747
|
+
}
|
|
748
|
+
interface TagUnifyIgnore {
|
|
749
|
+
Effect?: true;
|
|
750
|
+
Either?: true;
|
|
751
|
+
Option?: true;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* @since 2.0.0
|
|
756
|
+
* @category Models
|
|
757
|
+
*/
|
|
758
|
+
declare module "./Either.js" {
|
|
759
|
+
interface Left<E, A> extends Effect<A, E> {
|
|
760
|
+
readonly _tag: "Left";
|
|
761
|
+
[Symbol.iterator](): EffectGenerator<Left<E, A>>;
|
|
762
|
+
}
|
|
763
|
+
interface Right<E, A> extends Effect<A, E> {
|
|
764
|
+
readonly _tag: "Right";
|
|
765
|
+
[Symbol.iterator](): EffectGenerator<Right<E, A>>;
|
|
766
|
+
}
|
|
767
|
+
interface EitherUnifyIgnore {
|
|
768
|
+
Effect?: true;
|
|
769
|
+
Tag?: true;
|
|
770
|
+
Option?: true;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* @since 2.0.0
|
|
775
|
+
* @category Models
|
|
776
|
+
*/
|
|
777
|
+
declare module "./Option.js" {
|
|
778
|
+
interface None<A> extends Effect<A, NoSuchElementException> {
|
|
779
|
+
readonly _tag: "None";
|
|
780
|
+
[Symbol.iterator](): EffectGenerator<None<A>>;
|
|
781
|
+
}
|
|
782
|
+
interface Some<A> extends Effect<A, NoSuchElementException> {
|
|
783
|
+
readonly _tag: "Some";
|
|
784
|
+
[Symbol.iterator](): EffectGenerator<Some<A>>;
|
|
785
|
+
}
|
|
786
|
+
interface OptionUnifyIgnore {
|
|
787
|
+
Effect?: true;
|
|
788
|
+
Tag?: true;
|
|
789
|
+
Either?: true;
|
|
790
|
+
}
|
|
182
791
|
}
|
|
183
|
-
|
|
792
|
+
/**
|
|
793
|
+
* @since 2.0.0
|
|
794
|
+
*/
|
|
795
|
+
declare namespace Effect {
|
|
796
|
+
/**
|
|
797
|
+
* @since 2.0.0
|
|
798
|
+
* @category Models
|
|
799
|
+
*/
|
|
800
|
+
interface Variance<out A, out E, out R> {
|
|
801
|
+
readonly [EffectTypeId]: VarianceStruct<A, E, R>;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* @since 2.0.0
|
|
805
|
+
* @category Models
|
|
806
|
+
*/
|
|
807
|
+
interface VarianceStruct<out A, out E, out R> {
|
|
808
|
+
readonly _V: string;
|
|
809
|
+
readonly _A: Covariant<A>;
|
|
810
|
+
readonly _E: Covariant<E>;
|
|
811
|
+
readonly _R: Covariant<R>;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* @since 2.0.0
|
|
815
|
+
* @category Effect Type Extractors
|
|
816
|
+
*/
|
|
817
|
+
type Context<T extends Effect<any, any, any>> = [T] extends [Effect<infer _A, infer _E, infer _R>] ? _R : never;
|
|
818
|
+
/**
|
|
819
|
+
* @since 2.0.0
|
|
820
|
+
* @category Effect Type Extractors
|
|
821
|
+
*/
|
|
822
|
+
type Error<T extends Effect<any, any, any>> = [T] extends [Effect<infer _A, infer _E, infer _R>] ? _E : never;
|
|
823
|
+
/**
|
|
824
|
+
* @since 2.0.0
|
|
825
|
+
* @category Effect Type Extractors
|
|
826
|
+
*/
|
|
827
|
+
type Success<T extends Effect<any, any, any>> = [T] extends [Effect<infer _A, infer _E, infer _R>] ? _A : never;
|
|
828
|
+
/**
|
|
829
|
+
* @since 3.15.5
|
|
830
|
+
* @category Effect Type Extractors
|
|
831
|
+
*/
|
|
832
|
+
type AsEffect<T extends Effect<any, any, any>> = Effect<T extends Effect<infer _A, infer _E, infer _R> ? _A : never, T extends Effect<infer _A, infer _E, infer _R> ? _E : never, T extends Effect<infer _A, infer _E, infer _R> ? _R : never> extends infer Q ? Q : never;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* @since 2.0.0
|
|
836
|
+
* @category Models
|
|
837
|
+
*/
|
|
838
|
+
declare namespace Tag$1 {
|
|
839
|
+
/**
|
|
840
|
+
* @since 2.0.0
|
|
841
|
+
* @category Models
|
|
842
|
+
*/
|
|
843
|
+
interface ProhibitedType {
|
|
844
|
+
Service?: `property "Service" is forbidden`;
|
|
845
|
+
Identifier?: `property "Identifier" is forbidden`;
|
|
846
|
+
_op?: `property "_op" is forbidden`;
|
|
847
|
+
of?: `property "of" is forbidden`;
|
|
848
|
+
context?: `property "context" is forbidden`;
|
|
849
|
+
key?: `property "key" is forbidden`;
|
|
850
|
+
stack?: `property "stack" is forbidden`;
|
|
851
|
+
name?: `property "name" is forbidden`;
|
|
852
|
+
pipe?: `property "pipe" is forbidden`;
|
|
853
|
+
use?: `property "use" is forbidden`;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* @since 2.0.0
|
|
857
|
+
* @category Models
|
|
858
|
+
*/
|
|
859
|
+
type AllowedType = (Record<PropertyKey, any> & ProhibitedType) | string | number | symbol;
|
|
860
|
+
/**
|
|
861
|
+
* @since 3.9.0
|
|
862
|
+
* @category Models
|
|
863
|
+
*/
|
|
864
|
+
type Proxy<Self, Type> = { [k in keyof Type as Type[k] extends ((...args: infer Args extends ReadonlyArray<any>) => infer Ret) ? ((...args: Readonly<Args>) => Ret) extends Type[k] ? k : never : k]: Type[k] extends ((...args: infer Args extends ReadonlyArray<any>) => Effect<infer A, infer E, infer R>) ? (...args: Readonly<Args>) => Effect<A, E, Self | R> : Type[k] extends ((...args: infer Args extends ReadonlyArray<any>) => Promise<infer A>) ? (...args: Readonly<Args>) => Effect<A, UnknownException, Self> : Type[k] extends ((...args: infer Args extends ReadonlyArray<any>) => infer A) ? (...args: Readonly<Args>) => Effect<A, never, Self> : Type[k] extends Effect<infer A, infer E, infer R> ? Effect<A, E, Self | R> : Effect<Type[k], never, Self> };
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* Creates a unique tag for a dependency, embedding the service's methods as
|
|
868
|
+
* static properties.
|
|
869
|
+
*
|
|
870
|
+
* **Details**
|
|
871
|
+
*
|
|
872
|
+
* This function allows you to define a `Tag` for a service or dependency in
|
|
873
|
+
* your application. The `Tag` not only acts as an identifier but also provides
|
|
874
|
+
* direct access to the service's methods via static properties. This makes it
|
|
875
|
+
* easier to access and use the service in your code without manually managing
|
|
876
|
+
* contexts.
|
|
877
|
+
*
|
|
878
|
+
* In the example below, the fields of the service (in this case, the `notify`
|
|
879
|
+
* method) are turned into static properties of the Notifications class, making
|
|
880
|
+
* it easier to access them.
|
|
881
|
+
*
|
|
882
|
+
* **Example**
|
|
883
|
+
*
|
|
884
|
+
* ```ts
|
|
885
|
+
* import { Effect } from "effect"
|
|
886
|
+
*
|
|
887
|
+
* class Notifications extends Effect.Tag("Notifications")<
|
|
888
|
+
* Notifications,
|
|
889
|
+
* { readonly notify: (message: string) => Effect.Effect<void> }
|
|
890
|
+
* >() {}
|
|
891
|
+
*
|
|
892
|
+
* // Create an effect that depends on the Notifications service
|
|
893
|
+
* const action = Notifications.notify("Hello, world!")
|
|
894
|
+
* ```
|
|
895
|
+
*
|
|
896
|
+
* @since 2.0.0
|
|
897
|
+
* @category Context
|
|
898
|
+
*/
|
|
899
|
+
declare const Tag$1: <const Id extends string>(id: Id) => <Self, Type extends Tag$1.AllowedType>() => TagClass<Self, Id, Type> & (Type extends Record<PropertyKey, any> ? Tag$1.Proxy<Self, Type> : {}) & {
|
|
900
|
+
use: <X>(body: (_: Type) => X) => [X] extends [Effect<infer A, infer E, infer R>] ? Effect<A, E, R | Self> : [X] extends [PromiseLike<infer A>] ? Effect<A, UnknownException, Self> : Effect<X, never, Self>;
|
|
901
|
+
};
|
|
184
902
|
//#endregion
|
|
185
|
-
//#region
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
declare function parseEnvelope(xml: string, kind: EnvelopeKind): ParsedEnvelope;
|
|
196
|
-
interface EnvelopeMeta {
|
|
197
|
-
title?: string;
|
|
198
|
-
slug?: string;
|
|
199
|
-
category?: string;
|
|
200
|
-
topic?: string;
|
|
201
|
-
state?: 'publish' | 'draft';
|
|
202
|
-
summary?: string;
|
|
203
|
-
copyright?: boolean;
|
|
204
|
-
pin?: string;
|
|
205
|
-
pinOrder?: number;
|
|
206
|
-
related?: string[];
|
|
207
|
-
tags?: string[];
|
|
208
|
-
mood?: string;
|
|
209
|
-
weather?: string;
|
|
210
|
-
publicAt?: string;
|
|
211
|
-
password?: string;
|
|
212
|
-
bookmark?: boolean;
|
|
213
|
-
location?: string;
|
|
214
|
-
subtitle?: string;
|
|
215
|
-
order?: number;
|
|
216
|
-
format?: 'lexical' | 'markdown';
|
|
217
|
-
}
|
|
218
|
-
declare function coerceMeta(raw: Record<string, unknown>): EnvelopeMeta;
|
|
903
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Inspectable.d.ts
|
|
904
|
+
/**
|
|
905
|
+
* @since 2.0.0
|
|
906
|
+
* @category models
|
|
907
|
+
*/
|
|
908
|
+
interface Inspectable {
|
|
909
|
+
toString(): string;
|
|
910
|
+
toJSON(): unknown;
|
|
911
|
+
[NodeInspectSymbol](): unknown;
|
|
912
|
+
}
|
|
219
913
|
//#endregion
|
|
220
|
-
//#region
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
244
|
-
readonly
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
readonly UpdateSpawnFailed: "update.spawn_failed";
|
|
248
|
-
readonly UpdatePermissionDenied: "update.permission_denied";
|
|
249
|
-
};
|
|
250
|
-
type MxsErrorCode = (typeof MxsErrorCode)[keyof typeof MxsErrorCode] | (string & {});
|
|
251
|
-
interface MxsErrorOptions {
|
|
252
|
-
code: MxsErrorCode;
|
|
253
|
-
message: string;
|
|
254
|
-
details?: unknown;
|
|
255
|
-
hint?: string;
|
|
256
|
-
cause?: unknown;
|
|
257
|
-
}
|
|
258
|
-
declare class MxsError extends Error {
|
|
259
|
-
readonly code: MxsErrorCode;
|
|
260
|
-
readonly details?: unknown;
|
|
261
|
-
readonly hint?: string;
|
|
262
|
-
constructor(options: MxsErrorOptions);
|
|
263
|
-
toJSON(): {
|
|
264
|
-
hint?: string | undefined;
|
|
265
|
-
details?: {} | null | undefined;
|
|
266
|
-
ok: false;
|
|
267
|
-
code: MxsErrorCode;
|
|
268
|
-
message: string;
|
|
914
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Either.d.ts
|
|
915
|
+
/**
|
|
916
|
+
* @category models
|
|
917
|
+
* @since 2.0.0
|
|
918
|
+
*/
|
|
919
|
+
type Either<A, E = never> = Left$1<E, A> | Right$1<E, A>;
|
|
920
|
+
/**
|
|
921
|
+
* @category symbols
|
|
922
|
+
* @since 2.0.0
|
|
923
|
+
*/
|
|
924
|
+
declare const TypeId: unique symbol;
|
|
925
|
+
/**
|
|
926
|
+
* @category symbols
|
|
927
|
+
* @since 2.0.0
|
|
928
|
+
*/
|
|
929
|
+
type TypeId = typeof TypeId;
|
|
930
|
+
/**
|
|
931
|
+
* @category models
|
|
932
|
+
* @since 2.0.0
|
|
933
|
+
*/
|
|
934
|
+
interface Left$1<out E, out A> extends Pipeable, Inspectable {
|
|
935
|
+
readonly _tag: "Left";
|
|
936
|
+
readonly _op: "Left";
|
|
937
|
+
readonly left: E;
|
|
938
|
+
readonly [TypeId]: {
|
|
939
|
+
readonly _R: Covariant<A>;
|
|
940
|
+
readonly _L: Covariant<E>;
|
|
269
941
|
};
|
|
942
|
+
[typeSymbol]?: unknown;
|
|
943
|
+
[unifySymbol]?: EitherUnify<this>;
|
|
944
|
+
[ignoreSymbol]?: EitherUnifyIgnore;
|
|
270
945
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
946
|
+
/**
|
|
947
|
+
* @category models
|
|
948
|
+
* @since 2.0.0
|
|
949
|
+
*/
|
|
950
|
+
interface Right$1<out E, out A> extends Pipeable, Inspectable {
|
|
951
|
+
readonly _tag: "Right";
|
|
952
|
+
readonly _op: "Right";
|
|
953
|
+
readonly right: A;
|
|
954
|
+
readonly [TypeId]: {
|
|
955
|
+
readonly _R: Covariant<A>;
|
|
956
|
+
readonly _L: Covariant<E>;
|
|
282
957
|
};
|
|
958
|
+
[typeSymbol]?: unknown;
|
|
959
|
+
[unifySymbol]?: EitherUnify<this>;
|
|
960
|
+
[ignoreSymbol]?: EitherUnifyIgnore;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* @category models
|
|
964
|
+
* @since 2.0.0
|
|
965
|
+
*/
|
|
966
|
+
interface EitherUnify<A extends {
|
|
967
|
+
[typeSymbol]?: any;
|
|
968
|
+
}> {
|
|
969
|
+
Either?: () => A[typeSymbol] extends Either<infer R0, infer L0> | infer _ ? Either<R0, L0> : never;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* @category models
|
|
973
|
+
* @since 2.0.0
|
|
974
|
+
*/
|
|
975
|
+
interface EitherUnifyIgnore {}
|
|
976
|
+
/**
|
|
977
|
+
* @since 2.0.0
|
|
978
|
+
*/
|
|
979
|
+
declare namespace Either {
|
|
980
|
+
/**
|
|
981
|
+
* @since 2.0.0
|
|
982
|
+
* @category type-level
|
|
983
|
+
*/
|
|
984
|
+
type Left<T extends Either<any, any>> = [T] extends [Either<infer _A, infer _E>] ? _E : never;
|
|
985
|
+
/**
|
|
986
|
+
* @since 2.0.0
|
|
987
|
+
* @category type-level
|
|
988
|
+
*/
|
|
989
|
+
type Right<T extends Either<any, any>> = [T] extends [Either<infer _A, infer _E>] ? _A : never;
|
|
283
990
|
}
|
|
284
|
-
declare function parseToLexical(xml: string): LexicalState;
|
|
285
|
-
declare function serializeFromLexical(state: LexicalState): string;
|
|
286
|
-
declare function deriveTextFromLexical(state: LexicalState): string;
|
|
287
|
-
declare function emptyLexicalState(): LexicalState;
|
|
288
991
|
//#endregion
|
|
289
|
-
//#region
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
992
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Channel.d.ts
|
|
993
|
+
/**
|
|
994
|
+
* @since 2.0.0
|
|
995
|
+
* @category symbols
|
|
996
|
+
*/
|
|
997
|
+
declare const ChannelTypeId: unique symbol;
|
|
998
|
+
/**
|
|
999
|
+
* @since 2.0.0
|
|
1000
|
+
* @category symbols
|
|
1001
|
+
*/
|
|
1002
|
+
type ChannelTypeId = typeof ChannelTypeId;
|
|
1003
|
+
/**
|
|
1004
|
+
* A `Channel` is a nexus of I/O operations, which supports both reading and
|
|
1005
|
+
* writing. A channel may read values of type `InElem` and write values of type
|
|
1006
|
+
* `OutElem`. When the channel finishes, it yields a value of type `OutDone`. A
|
|
1007
|
+
* channel may fail with a value of type `OutErr`.
|
|
1008
|
+
*
|
|
1009
|
+
* Channels are the foundation of Streams: both streams and sinks are built on
|
|
1010
|
+
* channels. Most users shouldn't have to use channels directly, as streams and
|
|
1011
|
+
* sinks are much more convenient and cover all common use cases. However, when
|
|
1012
|
+
* adding new stream and sink operators, or doing something highly specialized,
|
|
1013
|
+
* it may be useful to use channels directly.
|
|
1014
|
+
*
|
|
1015
|
+
* Channels compose in a variety of ways:
|
|
1016
|
+
*
|
|
1017
|
+
* - **Piping**: One channel can be piped to another channel, assuming the
|
|
1018
|
+
* input type of the second is the same as the output type of the first.
|
|
1019
|
+
* - **Sequencing**: The terminal value of one channel can be used to create
|
|
1020
|
+
* another channel, and both the first channel and the function that makes
|
|
1021
|
+
* the second channel can be composed into a channel.
|
|
1022
|
+
* - **Concatenating**: The output of one channel can be used to create other
|
|
1023
|
+
* channels, which are all concatenated together. The first channel and the
|
|
1024
|
+
* function that makes the other channels can be composed into a channel.
|
|
1025
|
+
*
|
|
1026
|
+
* @since 2.0.0
|
|
1027
|
+
* @category models
|
|
1028
|
+
*/
|
|
1029
|
+
interface Channel<out OutElem, in InElem = unknown, out OutErr = never, in InErr = unknown, out OutDone = void, in InDone = unknown, out Env = never> extends Channel.Variance<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>, Pipeable {
|
|
1030
|
+
[typeSymbol]?: unknown;
|
|
1031
|
+
[unifySymbol]?: ChannelUnify<this>;
|
|
1032
|
+
[ignoreSymbol]?: ChannelUnifyIgnore;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* @since 2.0.0
|
|
1036
|
+
* @category models
|
|
1037
|
+
*/
|
|
1038
|
+
interface ChannelUnify<A extends {
|
|
1039
|
+
[typeSymbol]?: any;
|
|
1040
|
+
}> extends EffectUnify<A> {
|
|
1041
|
+
Channel?: () => A[typeSymbol] extends Channel<infer OutElem, infer InElem, infer OutErr, infer InErr, infer OutDone, infer InDone, infer Env> | infer _ ? Channel<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env> : never;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* @category models
|
|
1045
|
+
* @since 2.0.0
|
|
1046
|
+
*/
|
|
1047
|
+
interface ChannelUnifyIgnore extends EffectUnifyIgnore {
|
|
1048
|
+
Channel?: true;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* @since 2.0.0
|
|
1052
|
+
* @category models
|
|
1053
|
+
*/
|
|
1054
|
+
declare module "./Effect.js" {
|
|
1055
|
+
interface Effect<A, E, R> extends Channel<never, unknown, E, unknown, A, unknown, R> {}
|
|
1056
|
+
interface EffectUnifyIgnore {
|
|
1057
|
+
Channel?: true;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1061
|
+
* @since 2.0.0
|
|
1062
|
+
*/
|
|
1063
|
+
declare namespace Channel {
|
|
1064
|
+
/**
|
|
1065
|
+
* @since 2.0.0
|
|
1066
|
+
* @category models
|
|
1067
|
+
*/
|
|
1068
|
+
interface Variance<out OutElem, in InElem, out OutErr, in InErr, out OutDone, in InDone, out Env> {
|
|
1069
|
+
readonly [ChannelTypeId]: VarianceStruct<OutElem, InElem, OutErr, InErr, OutDone, InDone, Env>;
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* @since 2.0.0
|
|
1073
|
+
* @category models
|
|
1074
|
+
*/
|
|
1075
|
+
interface VarianceStruct<out OutElem, in InElem, out OutErr, in InErr, out OutDone, in InDone, out Env> {
|
|
1076
|
+
_Env: Covariant<Env>;
|
|
1077
|
+
_InErr: Contravariant<InErr>;
|
|
1078
|
+
_InElem: Contravariant<InElem>;
|
|
1079
|
+
_InDone: Contravariant<InDone>;
|
|
1080
|
+
_OutErr: Covariant<OutErr>;
|
|
1081
|
+
_OutElem: Covariant<OutElem>;
|
|
1082
|
+
_OutDone: Covariant<OutDone>;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
305
1085
|
//#endregion
|
|
306
|
-
//#region
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
1086
|
+
//#region ../../node_modules/.pnpm/effect@3.21.2/node_modules/effect/dist/dts/Cause.d.ts
|
|
1087
|
+
/**
|
|
1088
|
+
* A unique symbol identifying the `NoSuchElementException` type.
|
|
1089
|
+
*
|
|
1090
|
+
* **Details**
|
|
1091
|
+
*
|
|
1092
|
+
* This provides a symbol that identifies a `NoSuchElementException`. It helps
|
|
1093
|
+
* differentiate cases where a required element is missing within a data
|
|
1094
|
+
* structure.
|
|
1095
|
+
*
|
|
1096
|
+
* @see {@link NoSuchElementException} Create or work with a `NoSuchElementException`
|
|
1097
|
+
*
|
|
1098
|
+
* @since 2.0.0
|
|
1099
|
+
* @category Symbols
|
|
1100
|
+
*/
|
|
1101
|
+
declare const NoSuchElementExceptionTypeId: unique symbol;
|
|
1102
|
+
/**
|
|
1103
|
+
* @since 2.0.0
|
|
1104
|
+
* @category Symbols
|
|
1105
|
+
*/
|
|
1106
|
+
type NoSuchElementExceptionTypeId = typeof NoSuchElementExceptionTypeId;
|
|
1107
|
+
/**
|
|
1108
|
+
* A unique symbol identifying the `UnknownException` type.
|
|
1109
|
+
*
|
|
1110
|
+
* **Details**
|
|
1111
|
+
*
|
|
1112
|
+
* This provides a symbol that identifies an `UnknownException`. It is typically
|
|
1113
|
+
* used for generic or unexpected errors that do not fit other specific
|
|
1114
|
+
* exception categories.
|
|
1115
|
+
*
|
|
1116
|
+
* @see {@link UnknownException} Create or work with an `UnknownException`
|
|
1117
|
+
*
|
|
1118
|
+
* @since 2.0.0
|
|
1119
|
+
* @category Symbols
|
|
1120
|
+
*/
|
|
1121
|
+
declare const UnknownExceptionTypeId: unique symbol;
|
|
1122
|
+
/**
|
|
1123
|
+
* @since 2.0.0
|
|
1124
|
+
* @category Symbols
|
|
1125
|
+
*/
|
|
1126
|
+
type UnknownExceptionTypeId = typeof UnknownExceptionTypeId;
|
|
1127
|
+
/**
|
|
1128
|
+
* Represents an error object that can be yielded in `Effect.gen`.
|
|
1129
|
+
*
|
|
1130
|
+
* @since 2.0.0
|
|
1131
|
+
* @category Models
|
|
1132
|
+
*/
|
|
1133
|
+
interface YieldableError extends Pipeable, Inspectable, Error {
|
|
1134
|
+
readonly [EffectTypeId]: Effect.VarianceStruct<never, this, never>;
|
|
1135
|
+
readonly [StreamTypeId]: Stream.VarianceStruct<never, this, never>;
|
|
1136
|
+
readonly [SinkTypeId]: Sink.VarianceStruct<never, unknown, never, this, never>;
|
|
1137
|
+
readonly [ChannelTypeId]: Channel.VarianceStruct<never, unknown, this, unknown, never, unknown, never>;
|
|
1138
|
+
[Symbol.iterator](): EffectGenerator<Effect<never, this, never>>;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Creates an error that occurs at runtime, extendable for other exception
|
|
1142
|
+
* types.
|
|
1143
|
+
*
|
|
1144
|
+
* @since 2.0.0
|
|
1145
|
+
* @category Errors
|
|
1146
|
+
*/
|
|
1147
|
+
declare const YieldableError: new (message?: string | undefined) => YieldableError;
|
|
1148
|
+
/**
|
|
1149
|
+
* An error that occurs when an expected element is missing.
|
|
1150
|
+
*
|
|
1151
|
+
* **Details**
|
|
1152
|
+
*
|
|
1153
|
+
* This interface indicates scenarios like looking up an item in a collection
|
|
1154
|
+
* or searching for data that should be present but isn't. It helps your code
|
|
1155
|
+
* signal a more specific issue rather than a general error.
|
|
1156
|
+
*
|
|
1157
|
+
* @since 2.0.0
|
|
1158
|
+
* @category Models
|
|
1159
|
+
*/
|
|
1160
|
+
interface NoSuchElementException extends YieldableError {
|
|
1161
|
+
readonly _tag: "NoSuchElementException";
|
|
1162
|
+
readonly [NoSuchElementExceptionTypeId]: NoSuchElementExceptionTypeId;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* A checked exception for handling unknown or unexpected errors.
|
|
1166
|
+
*
|
|
1167
|
+
* **Details**
|
|
1168
|
+
*
|
|
1169
|
+
* This interface captures errors that don't fall under known categories. It is
|
|
1170
|
+
* especially helpful for wrapping low-level or third-party library errors that
|
|
1171
|
+
* might provide little or no context, such as from a rejected promise.
|
|
1172
|
+
*
|
|
1173
|
+
* @since 2.0.0
|
|
1174
|
+
* @category Models
|
|
1175
|
+
*/
|
|
1176
|
+
interface UnknownException extends YieldableError {
|
|
1177
|
+
readonly _tag: "UnknownException";
|
|
1178
|
+
readonly [UnknownExceptionTypeId]: UnknownExceptionTypeId;
|
|
1179
|
+
readonly error: unknown;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Creates an error indicating a missing element.
|
|
1183
|
+
*
|
|
1184
|
+
* **Details**
|
|
1185
|
+
*
|
|
1186
|
+
* This function constructs a `NoSuchElementException`. It helps you clearly
|
|
1187
|
+
* communicate that a required element is unavailable.
|
|
1188
|
+
*
|
|
1189
|
+
* @since 2.0.0
|
|
1190
|
+
* @category Errors
|
|
1191
|
+
*/
|
|
1192
|
+
declare const NoSuchElementException: new (message?: string | undefined) => NoSuchElementException;
|
|
1193
|
+
/**
|
|
1194
|
+
* Creates an instance of `UnknownException`, an error object used to handle
|
|
1195
|
+
* unknown errors such as those from rejected promises.
|
|
1196
|
+
*
|
|
1197
|
+
* **Details**
|
|
1198
|
+
*
|
|
1199
|
+
* This function constructs an `UnknownException` with flexible behavior for
|
|
1200
|
+
* managing the error message and cause.
|
|
1201
|
+
*
|
|
1202
|
+
* The required `error` argument is passed as the `cause` to the global `Error`
|
|
1203
|
+
* constructor, ensuring that the original cause is preserved in the error chain
|
|
1204
|
+
* for debugging purposes. This ensures that the origin stack trace is
|
|
1205
|
+
* preserved.
|
|
1206
|
+
*
|
|
1207
|
+
* The `error` argument is always stored in the `error` property of the
|
|
1208
|
+
* `UnknownException` instance for reference, regardless of its type.
|
|
1209
|
+
*
|
|
1210
|
+
* Additionally, if you provide a `message` argument, it is used as the error
|
|
1211
|
+
* message. If no `message` is provided, the error message defaults to `"An
|
|
1212
|
+
* unknown error occurred"`.
|
|
1213
|
+
*
|
|
1214
|
+
* **When to Use**
|
|
1215
|
+
*
|
|
1216
|
+
* Use this function when you need to handle unexpected or unknown errors in
|
|
1217
|
+
* your application, particularly when the source of the error might not provide
|
|
1218
|
+
* a clear message. This is useful for wrapping generic errors thrown from
|
|
1219
|
+
* promises or external APIs.
|
|
1220
|
+
*
|
|
1221
|
+
* @since 2.0.0
|
|
1222
|
+
* @category Errors
|
|
1223
|
+
*/
|
|
1224
|
+
declare const UnknownException: new (error: unknown, message?: string | undefined) => UnknownException;
|
|
364
1225
|
//#endregion
|
|
365
|
-
//#region src/
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
declare
|
|
1226
|
+
//#region src/domain/errors.d.ts
|
|
1227
|
+
declare const AuthMissing_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1228
|
+
readonly _tag: "AuthMissing";
|
|
1229
|
+
} & Readonly<A>;
|
|
1230
|
+
declare class AuthMissing extends AuthMissing_base<{
|
|
1231
|
+
readonly message?: string;
|
|
1232
|
+
readonly details?: unknown;
|
|
1233
|
+
readonly hint?: string;
|
|
1234
|
+
}> {}
|
|
1235
|
+
declare const AuthExpired_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1236
|
+
readonly _tag: "AuthExpired";
|
|
1237
|
+
} & Readonly<A>;
|
|
1238
|
+
declare class AuthExpired extends AuthExpired_base<{
|
|
1239
|
+
readonly message?: string;
|
|
1240
|
+
readonly details?: unknown;
|
|
1241
|
+
readonly hint?: string;
|
|
1242
|
+
}> {}
|
|
1243
|
+
declare const AuthDenied_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1244
|
+
readonly _tag: "AuthDenied";
|
|
1245
|
+
} & Readonly<A>;
|
|
1246
|
+
declare class AuthDenied extends AuthDenied_base<{
|
|
1247
|
+
readonly message?: string;
|
|
1248
|
+
readonly details?: unknown;
|
|
1249
|
+
readonly hint?: string;
|
|
1250
|
+
}> {}
|
|
1251
|
+
declare const AuthProbe_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1252
|
+
readonly _tag: "AuthProbe";
|
|
1253
|
+
} & Readonly<A>;
|
|
1254
|
+
declare class AuthProbe extends AuthProbe_base<{
|
|
1255
|
+
readonly message?: string;
|
|
1256
|
+
readonly details?: unknown;
|
|
1257
|
+
readonly hint?: string;
|
|
1258
|
+
readonly cause?: unknown;
|
|
1259
|
+
}> {}
|
|
1260
|
+
declare const NetworkTimeout_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1261
|
+
readonly _tag: "NetworkTimeout";
|
|
1262
|
+
} & Readonly<A>;
|
|
1263
|
+
declare class NetworkTimeout extends NetworkTimeout_base<{
|
|
1264
|
+
readonly message?: string;
|
|
1265
|
+
readonly url?: string;
|
|
1266
|
+
readonly details?: unknown;
|
|
1267
|
+
readonly hint?: string;
|
|
1268
|
+
}> {}
|
|
1269
|
+
declare const NetworkDns_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1270
|
+
readonly _tag: "NetworkDns";
|
|
1271
|
+
} & Readonly<A>;
|
|
1272
|
+
declare class NetworkDns extends NetworkDns_base<{
|
|
1273
|
+
readonly message?: string;
|
|
1274
|
+
readonly host?: string;
|
|
1275
|
+
readonly details?: unknown;
|
|
1276
|
+
readonly hint?: string;
|
|
1277
|
+
}> {}
|
|
1278
|
+
declare const NetworkRefused_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1279
|
+
readonly _tag: "NetworkRefused";
|
|
1280
|
+
} & Readonly<A>;
|
|
1281
|
+
declare class NetworkRefused extends NetworkRefused_base<{
|
|
1282
|
+
readonly message?: string;
|
|
1283
|
+
readonly url?: string;
|
|
1284
|
+
readonly details?: unknown;
|
|
1285
|
+
readonly hint?: string;
|
|
1286
|
+
}> {}
|
|
1287
|
+
declare const ValidationFailed_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1288
|
+
readonly _tag: "ValidationFailed";
|
|
1289
|
+
} & Readonly<A>;
|
|
1290
|
+
declare class ValidationFailed extends ValidationFailed_base<{
|
|
1291
|
+
readonly message?: string;
|
|
1292
|
+
readonly details?: unknown;
|
|
1293
|
+
readonly hint?: string;
|
|
1294
|
+
}> {}
|
|
1295
|
+
declare const ValidationXml_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1296
|
+
readonly _tag: "ValidationXml";
|
|
1297
|
+
} & Readonly<A>;
|
|
1298
|
+
declare class ValidationXml extends ValidationXml_base<{
|
|
1299
|
+
readonly message?: string;
|
|
1300
|
+
readonly line?: number;
|
|
1301
|
+
readonly details?: unknown;
|
|
1302
|
+
readonly hint?: string;
|
|
1303
|
+
readonly cause?: unknown;
|
|
1304
|
+
}> {}
|
|
1305
|
+
declare const ServerError_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1306
|
+
readonly _tag: "ServerError";
|
|
1307
|
+
} & Readonly<A>;
|
|
1308
|
+
declare class ServerError extends ServerError_base<{
|
|
1309
|
+
readonly message?: string;
|
|
1310
|
+
readonly status?: number;
|
|
1311
|
+
readonly details?: unknown;
|
|
1312
|
+
readonly hint?: string;
|
|
1313
|
+
}> {}
|
|
1314
|
+
declare const ResourceNotFound_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1315
|
+
readonly _tag: "ResourceNotFound";
|
|
1316
|
+
} & Readonly<A>;
|
|
1317
|
+
declare class ResourceNotFound extends ResourceNotFound_base<{
|
|
1318
|
+
readonly message?: string;
|
|
1319
|
+
readonly kind?: string;
|
|
1320
|
+
readonly ref?: string;
|
|
1321
|
+
readonly details?: unknown;
|
|
1322
|
+
readonly hint?: string;
|
|
1323
|
+
}> {}
|
|
1324
|
+
declare const ConfigMissingApiUrl_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1325
|
+
readonly _tag: "ConfigMissingApiUrl";
|
|
1326
|
+
} & Readonly<A>;
|
|
1327
|
+
declare class ConfigMissingApiUrl extends ConfigMissingApiUrl_base<{
|
|
1328
|
+
readonly message?: string;
|
|
1329
|
+
readonly details?: unknown;
|
|
1330
|
+
readonly hint?: string;
|
|
1331
|
+
}> {}
|
|
1332
|
+
declare const ConfigMissingToken_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1333
|
+
readonly _tag: "ConfigMissingToken";
|
|
1334
|
+
} & Readonly<A>;
|
|
1335
|
+
declare class ConfigMissingToken extends ConfigMissingToken_base<{
|
|
1336
|
+
readonly message?: string;
|
|
1337
|
+
readonly details?: unknown;
|
|
1338
|
+
readonly hint?: string;
|
|
1339
|
+
}> {}
|
|
1340
|
+
declare const ConfigMigrationFailed_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1341
|
+
readonly _tag: "ConfigMigrationFailed";
|
|
1342
|
+
} & Readonly<A>;
|
|
1343
|
+
declare class ConfigMigrationFailed extends ConfigMigrationFailed_base<{
|
|
1344
|
+
readonly message?: string;
|
|
1345
|
+
readonly details?: unknown;
|
|
1346
|
+
readonly hint?: string;
|
|
1347
|
+
readonly cause?: unknown;
|
|
1348
|
+
}> {}
|
|
1349
|
+
declare const ProfileNotFound_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1350
|
+
readonly _tag: "ProfileNotFound";
|
|
1351
|
+
} & Readonly<A>;
|
|
1352
|
+
declare class ProfileNotFound extends ProfileNotFound_base<{
|
|
1353
|
+
readonly message?: string;
|
|
1354
|
+
readonly name?: string;
|
|
1355
|
+
readonly details?: unknown;
|
|
1356
|
+
readonly hint?: string;
|
|
1357
|
+
}> {}
|
|
1358
|
+
declare const ProfileNoneActive_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1359
|
+
readonly _tag: "ProfileNoneActive";
|
|
1360
|
+
} & Readonly<A>;
|
|
1361
|
+
declare class ProfileNoneActive extends ProfileNoneActive_base<{
|
|
1362
|
+
readonly message?: string;
|
|
1363
|
+
readonly details?: unknown;
|
|
1364
|
+
readonly hint?: string;
|
|
1365
|
+
}> {}
|
|
1366
|
+
declare const ProfileInvalidName_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1367
|
+
readonly _tag: "ProfileInvalidName";
|
|
1368
|
+
} & Readonly<A>;
|
|
1369
|
+
declare class ProfileInvalidName extends ProfileInvalidName_base<{
|
|
1370
|
+
readonly message?: string;
|
|
1371
|
+
readonly name?: string;
|
|
1372
|
+
readonly details?: unknown;
|
|
1373
|
+
readonly hint?: string;
|
|
1374
|
+
}> {}
|
|
1375
|
+
declare const WriteRequiresExplicit_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1376
|
+
readonly _tag: "WriteRequiresExplicit";
|
|
1377
|
+
} & Readonly<A>;
|
|
1378
|
+
declare class WriteRequiresExplicit extends WriteRequiresExplicit_base<{
|
|
1379
|
+
readonly message?: string;
|
|
1380
|
+
readonly profile?: string;
|
|
1381
|
+
readonly apiUrl?: string;
|
|
1382
|
+
readonly details?: unknown;
|
|
1383
|
+
readonly hint?: string;
|
|
1384
|
+
}> {}
|
|
1385
|
+
declare const UpdateDevEnvironment_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1386
|
+
readonly _tag: "UpdateDevEnvironment";
|
|
1387
|
+
} & Readonly<A>;
|
|
1388
|
+
declare class UpdateDevEnvironment extends UpdateDevEnvironment_base<{
|
|
1389
|
+
readonly message?: string;
|
|
1390
|
+
readonly details?: unknown;
|
|
1391
|
+
readonly hint?: string;
|
|
1392
|
+
}> {}
|
|
1393
|
+
declare const UpdateTransientInstall_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1394
|
+
readonly _tag: "UpdateTransientInstall";
|
|
1395
|
+
} & Readonly<A>;
|
|
1396
|
+
declare class UpdateTransientInstall extends UpdateTransientInstall_base<{
|
|
1397
|
+
readonly message?: string;
|
|
1398
|
+
readonly details?: unknown;
|
|
1399
|
+
readonly hint?: string;
|
|
1400
|
+
}> {}
|
|
1401
|
+
declare const UpdatePmUnknown_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1402
|
+
readonly _tag: "UpdatePmUnknown";
|
|
1403
|
+
} & Readonly<A>;
|
|
1404
|
+
declare class UpdatePmUnknown extends UpdatePmUnknown_base<{
|
|
1405
|
+
readonly message?: string;
|
|
1406
|
+
readonly details?: unknown;
|
|
1407
|
+
readonly hint?: string;
|
|
1408
|
+
}> {}
|
|
1409
|
+
declare const UpdateRegistryUnreachable_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1410
|
+
readonly _tag: "UpdateRegistryUnreachable";
|
|
1411
|
+
} & Readonly<A>;
|
|
1412
|
+
declare class UpdateRegistryUnreachable extends UpdateRegistryUnreachable_base<{
|
|
1413
|
+
readonly message?: string;
|
|
1414
|
+
readonly details?: unknown;
|
|
1415
|
+
readonly hint?: string;
|
|
1416
|
+
}> {}
|
|
1417
|
+
declare const UpdateNodeIncompatible_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1418
|
+
readonly _tag: "UpdateNodeIncompatible";
|
|
1419
|
+
} & Readonly<A>;
|
|
1420
|
+
declare class UpdateNodeIncompatible extends UpdateNodeIncompatible_base<{
|
|
1421
|
+
readonly message?: string;
|
|
1422
|
+
readonly details?: unknown;
|
|
1423
|
+
readonly hint?: string;
|
|
1424
|
+
}> {}
|
|
1425
|
+
declare const UpdateSpawnFailed_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1426
|
+
readonly _tag: "UpdateSpawnFailed";
|
|
1427
|
+
} & Readonly<A>;
|
|
1428
|
+
declare class UpdateSpawnFailed extends UpdateSpawnFailed_base<{
|
|
1429
|
+
readonly message?: string;
|
|
1430
|
+
readonly details?: unknown;
|
|
1431
|
+
readonly hint?: string;
|
|
1432
|
+
}> {}
|
|
1433
|
+
declare const UpdatePermissionDenied_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1434
|
+
readonly _tag: "UpdatePermissionDenied";
|
|
1435
|
+
} & Readonly<A>;
|
|
1436
|
+
declare class UpdatePermissionDenied extends UpdatePermissionDenied_base<{
|
|
1437
|
+
readonly message?: string;
|
|
1438
|
+
readonly details?: unknown;
|
|
1439
|
+
readonly hint?: string;
|
|
1440
|
+
}> {}
|
|
1441
|
+
declare const ArgvParse_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1442
|
+
readonly _tag: "ArgvParse";
|
|
1443
|
+
} & Readonly<A>;
|
|
1444
|
+
declare class ArgvParse extends ArgvParse_base<{
|
|
1445
|
+
readonly message?: string;
|
|
1446
|
+
readonly details?: unknown;
|
|
1447
|
+
readonly hint?: string;
|
|
1448
|
+
}> {}
|
|
1449
|
+
declare const Generic_base: new <A extends Record<string, any> = {}>(args: VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => YieldableError & {
|
|
1450
|
+
readonly _tag: "Generic";
|
|
1451
|
+
} & Readonly<A>;
|
|
1452
|
+
declare class Generic extends Generic_base<{
|
|
1453
|
+
readonly message?: string;
|
|
1454
|
+
readonly details?: unknown;
|
|
1455
|
+
readonly hint?: string;
|
|
1456
|
+
readonly cause?: unknown;
|
|
1457
|
+
}> {}
|
|
1458
|
+
type CliError = AuthMissing | AuthExpired | AuthDenied | AuthProbe | NetworkTimeout | NetworkDns | NetworkRefused | ValidationFailed | ValidationXml | ServerError | ResourceNotFound | ConfigMissingApiUrl | ConfigMissingToken | ConfigMigrationFailed | ProfileNotFound | ProfileNoneActive | ProfileInvalidName | WriteRequiresExplicit | UpdateDevEnvironment | UpdateTransientInstall | UpdatePmUnknown | UpdateRegistryUnreachable | UpdateNodeIncompatible | UpdateSpawnFailed | UpdatePermissionDenied | ArgvParse | Generic;
|
|
1459
|
+
type CliErrorTag = CliError['_tag'];
|
|
1460
|
+
declare const tagToCode: Record<CliErrorTag, string>;
|
|
1461
|
+
declare const codeForTag: (tag: CliErrorTag) => string;
|
|
1462
|
+
declare const exitCodeForTag: (tag: CliErrorTag) => number;
|
|
1463
|
+
declare const exitCodeForError: (err: unknown) => number;
|
|
1464
|
+
declare const defaultMessageFor: (tag: CliErrorTag) => string;
|
|
1465
|
+
interface ErrorEnvelope {
|
|
1466
|
+
readonly ok: false;
|
|
1467
|
+
readonly code: string;
|
|
1468
|
+
readonly message: string;
|
|
1469
|
+
readonly details?: unknown;
|
|
1470
|
+
readonly hint?: string;
|
|
1471
|
+
}
|
|
1472
|
+
declare const toErrorEnvelope: (err: CliError) => ErrorEnvelope;
|
|
1473
|
+
//#endregion
|
|
1474
|
+
//#region src/services/Renderer.d.ts
|
|
1475
|
+
type OutputMode = 'pretty-json' | 'json' | 'readable' | 'llm' | 'envelope';
|
|
1476
|
+
interface OutputOptions {
|
|
1477
|
+
readonly json: boolean;
|
|
1478
|
+
readonly output: OutputMode;
|
|
1479
|
+
readonly quiet: boolean;
|
|
1480
|
+
readonly verbose: boolean;
|
|
1481
|
+
}
|
|
1482
|
+
//#endregion
|
|
1483
|
+
//#region src/domain/runtime-flags.d.ts
|
|
1484
|
+
interface GlobalFlags {
|
|
1485
|
+
readonly json: boolean;
|
|
1486
|
+
readonly output: OutputMode;
|
|
1487
|
+
readonly apiUrl?: string;
|
|
1488
|
+
readonly token?: string;
|
|
1489
|
+
readonly apiKey?: string;
|
|
1490
|
+
readonly lang?: string;
|
|
1491
|
+
readonly quiet: boolean;
|
|
1492
|
+
readonly verbose: boolean;
|
|
1493
|
+
readonly dryRun: boolean;
|
|
1494
|
+
readonly profile?: string;
|
|
1495
|
+
}
|
|
1496
|
+
declare const defaultGlobalFlags: GlobalFlags;
|
|
1497
|
+
/**
|
|
1498
|
+
* Walk `argv` once, extracting recognized global flags and returning both the
|
|
1499
|
+
* resolved `GlobalFlags` and the residual `argv` (with those flags removed).
|
|
1500
|
+
*
|
|
1501
|
+
* Unknown flags pass through untouched — `@effect/cli` will surface them at
|
|
1502
|
+
* the proper command layer.
|
|
1503
|
+
*
|
|
1504
|
+
* Notes:
|
|
1505
|
+
* - Both `--key value` and `--key=value` are supported for value flags.
|
|
1506
|
+
* - argv[0] (node) and argv[1] (script) pass through unchanged.
|
|
1507
|
+
* - We stop processing global flags at the first `--` (POSIX convention).
|
|
1508
|
+
*/
|
|
1509
|
+
declare const parseGlobalFlags: (argv: readonly string[]) => {
|
|
1510
|
+
readonly flags: GlobalFlags;
|
|
1511
|
+
readonly rest: readonly string[];
|
|
1512
|
+
};
|
|
394
1513
|
//#endregion
|
|
395
|
-
export {
|
|
396
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1514
|
+
export { type CliError, type CliErrorTag, type ErrorEnvelope, type GlobalFlags, type OutputMode, type OutputOptions, codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
|