@powerlines/plugin-alloy 0.19.13 → 0.19.15
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/builtin-file-0k9DccCv.cjs +67 -0
- package/dist/builtin-file-DcLp9sck.d.mts +35 -0
- package/dist/builtin-file-DcLp9sck.d.mts.map +1 -0
- package/dist/builtin-file-DtkZ-2Hs.d.cts +35 -0
- package/dist/builtin-file-DtkZ-2Hs.d.cts.map +1 -0
- package/dist/builtin-file-Ie_jPokg.mjs +62 -0
- package/dist/builtin-file-Ie_jPokg.mjs.map +1 -0
- package/dist/builtin-file-MrUfX3YE.d.cts +35 -0
- package/dist/builtin-file-MrUfX3YE.d.cts.map +1 -0
- package/dist/builtin-file-RXdRpQs-.d.mts +35 -0
- package/dist/builtin-file-RXdRpQs-.d.mts.map +1 -0
- package/dist/capnp-CRMDa2Ok.d.mts +88 -0
- package/dist/capnp-CRMDa2Ok.d.mts.map +1 -0
- package/dist/capnp-ClfqI-5t.cjs +356 -0
- package/dist/capnp-CnQcwo0s.mjs +260 -0
- package/dist/capnp-CnQcwo0s.mjs.map +1 -0
- package/dist/capnp-YnGBPkLK.d.cts +88 -0
- package/dist/capnp-YnGBPkLK.d.cts.map +1 -0
- package/dist/{_virtual/rolldown_runtime.cjs → chunk-CbDLau6x.cjs} +6 -1
- package/dist/components-B0evB5xd.cjs +0 -0
- package/dist/components-BNK9p5AE.cjs +0 -0
- package/dist/components-C_Rnle_h.mjs +1 -0
- package/dist/components-CpjG2zC9.mjs +1 -0
- package/dist/components-CrWk5KiP.mjs +1 -0
- package/dist/components-CyQi7RHT.mjs +1 -0
- package/dist/components-DPKSrvP-.cjs +0 -0
- package/dist/components-IRVnipN0.d.cts +143 -0
- package/dist/components-IRVnipN0.d.cts.map +1 -0
- package/dist/components-ISRFDWTF.cjs +0 -0
- package/dist/components-oHSM7vmp.d.mts +143 -0
- package/dist/components-oHSM7vmp.d.mts.map +1 -0
- package/dist/context--KBspFnw.cjs +79 -0
- package/dist/context-Du_bVzRZ.d.mts +67 -0
- package/dist/context-Du_bVzRZ.d.mts.map +1 -0
- package/dist/context-Gqs3Ru42.d.cts +67 -0
- package/dist/context-Gqs3Ru42.d.cts.map +1 -0
- package/dist/context-e2kZWEFW.mjs +51 -0
- package/dist/context-e2kZWEFW.mjs.map +1 -0
- package/dist/contexts-DezKayEz.cjs +0 -0
- package/dist/contexts-J643Nrrt.cjs +0 -0
- package/dist/contexts-_jq-yJQG.mjs +1 -0
- package/dist/contexts-juWSyBfb.mjs +1 -0
- package/dist/core/components/index.cjs +11 -6
- package/dist/core/components/index.d.cts +6 -3
- package/dist/core/components/index.d.mts +6 -3
- package/dist/core/components/index.mjs +8 -3
- package/dist/core/components/output.cjs +2 -32
- package/dist/core/components/output.d.cts +2 -22
- package/dist/core/components/output.d.mts +2 -22
- package/dist/core/components/output.mjs +1 -30
- package/dist/core/components/single-line-comment.cjs +2 -21
- package/dist/core/components/single-line-comment.d.cts +2 -21
- package/dist/core/components/single-line-comment.d.mts +2 -21
- package/dist/core/components/single-line-comment.mjs +1 -19
- package/dist/core/components/source-file.cjs +6 -63
- package/dist/core/components/source-file.d.cts +2 -31
- package/dist/core/components/source-file.d.mts +2 -31
- package/dist/core/components/source-file.mjs +5 -60
- package/dist/core/contexts/context.cjs +7 -53
- package/dist/core/contexts/context.d.cts +1 -65
- package/dist/core/contexts/context.d.mts +1 -65
- package/dist/core/contexts/context.mjs +2 -48
- package/dist/core/contexts/index.cjs +17 -15
- package/dist/core/contexts/index.d.cts +4 -2
- package/dist/core/contexts/index.d.mts +4 -2
- package/dist/core/contexts/index.mjs +4 -2
- package/dist/core/contexts/reflection.cjs +9 -67
- package/dist/core/contexts/reflection.d.cts +2 -51
- package/dist/core/contexts/reflection.d.mts +2 -51
- package/dist/core/contexts/reflection.mjs +1 -58
- package/dist/core/index.cjs +24 -23
- package/dist/core/index.d.cts +8 -7
- package/dist/core/index.d.mts +8 -7
- package/dist/core/index.mjs +8 -7
- package/dist/create-builtin-BiKyN2s2.cjs +24 -0
- package/dist/create-builtin-DFiWd6Zc.d.cts +16 -0
- package/dist/create-builtin-DFiWd6Zc.d.cts.map +1 -0
- package/dist/create-builtin-DQuJyeZw.mjs +19 -0
- package/dist/create-builtin-DQuJyeZw.mjs.map +1 -0
- package/dist/create-builtin-FtQ6qKzX.d.mts +16 -0
- package/dist/create-builtin-FtQ6qKzX.d.mts.map +1 -0
- package/dist/dynamic-import-statement-B5Pdwr4Z.d.mts +33 -0
- package/dist/dynamic-import-statement-B5Pdwr4Z.d.mts.map +1 -0
- package/dist/dynamic-import-statement-BbNJchii.mjs +25 -0
- package/dist/dynamic-import-statement-BbNJchii.mjs.map +1 -0
- package/dist/dynamic-import-statement-DNJlI3ND.d.cts +33 -0
- package/dist/dynamic-import-statement-DNJlI3ND.d.cts.map +1 -0
- package/dist/dynamic-import-statement-DTSUoDt2.d.cts +33 -0
- package/dist/dynamic-import-statement-DTSUoDt2.d.cts.map +1 -0
- package/dist/dynamic-import-statement-Dy_MY_Ua.cjs +30 -0
- package/dist/entry-file-CfMzpF03.d.cts +28 -0
- package/dist/entry-file-CfMzpF03.d.cts.map +1 -0
- package/dist/entry-file-CnC6P3j6.d.mts +28 -0
- package/dist/entry-file-CnC6P3j6.d.mts.map +1 -0
- package/dist/entry-file-D64eurjX.mjs +41 -0
- package/dist/entry-file-D64eurjX.mjs.map +1 -0
- package/dist/entry-file-DVueLVSn.d.cts +28 -0
- package/dist/entry-file-DVueLVSn.d.cts.map +1 -0
- package/dist/entry-file-GR5Rsn25.cjs +47 -0
- package/dist/entry-file-ayzYWEo5.d.mts +28 -0
- package/dist/entry-file-ayzYWEo5.d.mts.map +1 -0
- package/dist/front-matter-2eGRXX11.mjs +28 -0
- package/dist/front-matter-2eGRXX11.mjs.map +1 -0
- package/dist/front-matter-DGpkM9OE.d.mts +16 -0
- package/dist/front-matter-DGpkM9OE.d.mts.map +1 -0
- package/dist/front-matter-DZ1tB-Uj.cjs +33 -0
- package/dist/front-matter-gcouRI-6.d.cts +16 -0
- package/dist/front-matter-gcouRI-6.d.cts.map +1 -0
- package/dist/front-matter-u9H7VPAF.d.cts +16 -0
- package/dist/front-matter-u9H7VPAF.d.cts.map +1 -0
- package/dist/helpers/capnp.cjs +18 -276
- package/dist/helpers/capnp.d.cts +1 -86
- package/dist/helpers/capnp.d.mts +1 -86
- package/dist/helpers/capnp.mjs +1 -257
- package/dist/helpers/create-builtin.cjs +2 -18
- package/dist/helpers/create-builtin.d.cts +1 -14
- package/dist/helpers/create-builtin.d.mts +1 -14
- package/dist/helpers/create-builtin.mjs +1 -16
- package/dist/helpers/index.cjs +23 -23
- package/dist/helpers/index.d.cts +4 -4
- package/dist/helpers/index.d.mts +4 -4
- package/dist/helpers/index.mjs +4 -4
- package/dist/helpers/refkey.cjs +2 -15
- package/dist/helpers/refkey.d.cts +1 -12
- package/dist/helpers/refkey.d.mts +1 -12
- package/dist/helpers/refkey.mjs +1 -13
- package/dist/helpers/typescript.cjs +2 -45
- package/dist/helpers/typescript.d.cts +1 -24
- package/dist/helpers/typescript.d.mts +1 -24
- package/dist/helpers/typescript.mjs +1 -43
- package/dist/index-B-Y-ZG2x.d.mts +1 -0
- package/dist/index-BH1nuHdZ.d.cts +1 -0
- package/dist/index-BUYyA1Xh.d.cts +1 -0
- package/dist/index-C-lwXyQ6.d.mts +1 -0
- package/dist/index-C6HcjJiY.d.mts +1 -0
- package/dist/index-C6yvNuzO.d.cts +1 -0
- package/dist/index-CrhZaFgN.d.cts +1 -0
- package/dist/index-CzItj62a.d.mts +1 -0
- package/dist/index-DcDTDbdz.d.cts +1 -0
- package/dist/index-hcx6LMSC.d.mts +1 -0
- package/dist/index.cjs +8 -6
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -0
- package/dist/markdown/components/front-matter.cjs +2 -27
- package/dist/markdown/components/front-matter.d.cts +1 -14
- package/dist/markdown/components/front-matter.d.mts +1 -14
- package/dist/markdown/components/front-matter.mjs +1 -25
- package/dist/markdown/components/index.cjs +17 -9
- package/dist/markdown/components/index.d.cts +7 -3
- package/dist/markdown/components/index.d.mts +7 -3
- package/dist/markdown/components/index.mjs +11 -3
- package/dist/markdown/components/markdown-file.cjs +10 -130
- package/dist/markdown/components/markdown-file.d.cts +4 -27
- package/dist/markdown/components/markdown-file.d.mts +4 -27
- package/dist/markdown/components/markdown-file.mjs +8 -127
- package/dist/markdown/components/markdown-table.cjs +5 -100
- package/dist/markdown/components/markdown-table.d.cts +3 -26
- package/dist/markdown/components/markdown-table.d.mts +3 -26
- package/dist/markdown/components/markdown-table.mjs +2 -96
- package/dist/markdown/contexts/index.cjs +6 -5
- package/dist/markdown/contexts/index.d.cts +2 -1
- package/dist/markdown/contexts/index.d.mts +2 -1
- package/dist/markdown/contexts/index.mjs +2 -1
- package/dist/markdown/contexts/markdown-table.cjs +5 -36
- package/dist/markdown/contexts/markdown-table.d.cts +1 -36
- package/dist/markdown/contexts/markdown-table.d.mts +1 -36
- package/dist/markdown/contexts/markdown-table.mjs +1 -31
- package/dist/markdown/index.cjs +22 -16
- package/dist/markdown/index.d.cts +8 -6
- package/dist/markdown/index.d.mts +8 -6
- package/dist/markdown/index.mjs +12 -6
- package/dist/markdown-file-CAwtMwsl.cjs +141 -0
- package/dist/markdown-file-CIGTz9xQ.d.cts +29 -0
- package/dist/markdown-file-CIGTz9xQ.d.cts.map +1 -0
- package/dist/markdown-file-CxDM6MCV.d.cts +29 -0
- package/dist/markdown-file-CxDM6MCV.d.cts.map +1 -0
- package/dist/markdown-file-DIcSvowq.mjs +130 -0
- package/dist/markdown-file-DIcSvowq.mjs.map +1 -0
- package/dist/markdown-file-EtJaVhJ3.d.mts +29 -0
- package/dist/markdown-file-EtJaVhJ3.d.mts.map +1 -0
- package/dist/markdown-table-AoJIzA89.d.cts +28 -0
- package/dist/markdown-table-AoJIzA89.d.cts.map +1 -0
- package/dist/markdown-table-BWPm6GbJ.cjs +57 -0
- package/dist/markdown-table-Br2Ihl2z.d.cts +38 -0
- package/dist/markdown-table-Br2Ihl2z.d.cts.map +1 -0
- package/dist/markdown-table-CFL7L6rA.d.mts +38 -0
- package/dist/markdown-table-CFL7L6rA.d.mts.map +1 -0
- package/dist/markdown-table-ChvYobzz.d.mts +28 -0
- package/dist/markdown-table-ChvYobzz.d.mts.map +1 -0
- package/dist/markdown-table-D3DonpwR.mjs +99 -0
- package/dist/markdown-table-D3DonpwR.mjs.map +1 -0
- package/dist/markdown-table-DFSFKzCN.d.cts +28 -0
- package/dist/markdown-table-DFSFKzCN.d.cts.map +1 -0
- package/dist/markdown-table-eTnxxb46.cjs +116 -0
- package/dist/markdown-table-g6DeP10e.mjs +34 -0
- package/dist/markdown-table-g6DeP10e.mjs.map +1 -0
- package/dist/output-BnmXIAFP.d.cts +24 -0
- package/dist/output-BnmXIAFP.d.cts.map +1 -0
- package/dist/output-CMC94bm-.d.mts +24 -0
- package/dist/output-CMC94bm-.d.mts.map +1 -0
- package/dist/output-CQXrGP3y.cjs +38 -0
- package/dist/output-D3UQ5nZo.mjs +33 -0
- package/dist/output-D3UQ5nZo.mjs.map +1 -0
- package/dist/output-Dq1RRbJY.d.cts +24 -0
- package/dist/output-Dq1RRbJY.d.cts.map +1 -0
- package/dist/plugin-B8wUxSXi.cjs +0 -0
- package/dist/plugin-BmQ6pIes.mjs +1 -0
- package/dist/plugin-C6SupJ8C.d.cts +41 -0
- package/dist/plugin-C6SupJ8C.d.cts.map +1 -0
- package/dist/plugin-bEu9fq1G.d.mts +41 -0
- package/dist/plugin-bEu9fq1G.d.mts.map +1 -0
- package/dist/record-expression-6ElbFyR0.cjs +17 -0
- package/dist/record-expression-BjXMzi4r.mjs +12 -0
- package/dist/record-expression-BjXMzi4r.mjs.map +1 -0
- package/dist/record-expression-adlQJuNw.d.cts +13 -0
- package/dist/record-expression-adlQJuNw.d.cts.map +1 -0
- package/dist/record-expression-c9kQA93k.d.mts +13 -0
- package/dist/record-expression-c9kQA93k.d.mts.map +1 -0
- package/dist/refkey-Bf_2_U5t.d.cts +14 -0
- package/dist/refkey-Bf_2_U5t.d.cts.map +1 -0
- package/dist/refkey-C08kDOQ0.cjs +21 -0
- package/dist/refkey-CIFiGvgZ.mjs +16 -0
- package/dist/refkey-CIFiGvgZ.mjs.map +1 -0
- package/dist/refkey-CSZgFc0P.d.mts +14 -0
- package/dist/refkey-CSZgFc0P.d.mts.map +1 -0
- package/dist/reflection-B-NMNIoB.mjs +61 -0
- package/dist/reflection-B-NMNIoB.mjs.map +1 -0
- package/dist/reflection-CUo0047e.d.mts +53 -0
- package/dist/reflection-CUo0047e.d.mts.map +1 -0
- package/dist/reflection-DHpdhvwI.cjs +108 -0
- package/dist/reflection-xU09ifzp.d.cts +53 -0
- package/dist/reflection-xU09ifzp.d.cts.map +1 -0
- package/dist/single-line-comment-B258_x1B.d.cts +23 -0
- package/dist/single-line-comment-B258_x1B.d.cts.map +1 -0
- package/dist/single-line-comment-COZ9RWsm.cjs +27 -0
- package/dist/single-line-comment-D9dIL45u.d.cts +23 -0
- package/dist/single-line-comment-D9dIL45u.d.cts.map +1 -0
- package/dist/single-line-comment-PMv_zrfe.d.mts +23 -0
- package/dist/single-line-comment-PMv_zrfe.d.mts.map +1 -0
- package/dist/single-line-comment-mOQtfhWt.mjs +22 -0
- package/dist/single-line-comment-mOQtfhWt.mjs.map +1 -0
- package/dist/source-file-95cXzcLB.d.cts +33 -0
- package/dist/source-file-95cXzcLB.d.cts.map +1 -0
- package/dist/source-file-BAVTBVJy.cjs +68 -0
- package/dist/source-file-BTsyACav.d.cts +33 -0
- package/dist/source-file-BTsyACav.d.cts.map +1 -0
- package/dist/source-file-BiJK-nH_.mjs +62 -0
- package/dist/source-file-BiJK-nH_.mjs.map +1 -0
- package/dist/source-file-CQl0UCgf.d.mts +33 -0
- package/dist/source-file-CQl0UCgf.d.mts.map +1 -0
- package/dist/tsdoc-BId4fp5_.cjs +585 -0
- package/dist/tsdoc-CfvwK4Ml.d.cts +164 -0
- package/dist/tsdoc-CfvwK4Ml.d.cts.map +1 -0
- package/dist/tsdoc-Crv526i6.mjs +466 -0
- package/dist/tsdoc-Crv526i6.mjs.map +1 -0
- package/dist/tsdoc-OUuKjTbh.d.mts +164 -0
- package/dist/tsdoc-OUuKjTbh.d.mts.map +1 -0
- package/dist/tsdoc-reflection-B4bfElmj.d.cts +19 -0
- package/dist/tsdoc-reflection-B4bfElmj.d.cts.map +1 -0
- package/dist/tsdoc-reflection-BbjnIsUV.d.cts +19 -0
- package/dist/tsdoc-reflection-BbjnIsUV.d.cts.map +1 -0
- package/dist/tsdoc-reflection-D-eKs6S1.mjs +176 -0
- package/dist/tsdoc-reflection-D-eKs6S1.mjs.map +1 -0
- package/dist/tsdoc-reflection-IH-Mt2o_.cjs +193 -0
- package/dist/tsdoc-reflection-ulqYHfKL.d.mts +19 -0
- package/dist/tsdoc-reflection-ulqYHfKL.d.mts.map +1 -0
- package/dist/types/components.cjs +1 -0
- package/dist/types/components.d.cts +1 -141
- package/dist/types/components.d.mts +1 -141
- package/dist/types/components.mjs +2 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -39
- package/dist/types/plugin.d.mts +1 -39
- package/dist/types/plugin.mjs +2 -0
- package/dist/typescript/components/builtin-file.cjs +10 -61
- package/dist/typescript/components/builtin-file.d.cts +5 -33
- package/dist/typescript/components/builtin-file.d.mts +5 -33
- package/dist/typescript/components/builtin-file.mjs +9 -59
- package/dist/typescript/components/dynamic-import-statement.cjs +2 -24
- package/dist/typescript/components/dynamic-import-statement.d.cts +1 -31
- package/dist/typescript/components/dynamic-import-statement.d.mts +1 -31
- package/dist/typescript/components/dynamic-import-statement.mjs +1 -22
- package/dist/typescript/components/entry-file.cjs +9 -41
- package/dist/typescript/components/entry-file.d.cts +4 -26
- package/dist/typescript/components/entry-file.d.mts +4 -26
- package/dist/typescript/components/entry-file.mjs +8 -38
- package/dist/typescript/components/index.cjs +50 -43
- package/dist/typescript/components/index.d.cts +12 -9
- package/dist/typescript/components/index.d.mts +12 -9
- package/dist/typescript/components/index.mjs +16 -9
- package/dist/typescript/components/record-expression.cjs +2 -11
- package/dist/typescript/components/record-expression.d.cts +1 -11
- package/dist/typescript/components/record-expression.d.mts +1 -11
- package/dist/typescript/components/record-expression.mjs +1 -9
- package/dist/typescript/components/tsdoc-reflection.cjs +8 -177
- package/dist/typescript/components/tsdoc-reflection.d.cts +3 -17
- package/dist/typescript/components/tsdoc-reflection.d.mts +3 -17
- package/dist/typescript/components/tsdoc-reflection.mjs +5 -173
- package/dist/typescript/components/tsdoc.cjs +23 -484
- package/dist/typescript/components/tsdoc.d.cts +2 -162
- package/dist/typescript/components/tsdoc.d.mts +2 -162
- package/dist/typescript/components/tsdoc.mjs +3 -463
- package/dist/typescript/components/typescript-file.cjs +10 -215
- package/dist/typescript/components/typescript-file.d.cts +3 -48
- package/dist/typescript/components/typescript-file.d.mts +3 -48
- package/dist/typescript/components/typescript-file.mjs +7 -211
- package/dist/typescript/components/typescript-interface.cjs +8 -72
- package/dist/typescript/components/typescript-interface.d.cts +2 -24
- package/dist/typescript/components/typescript-interface.d.mts +2 -24
- package/dist/typescript/components/typescript-interface.mjs +6 -69
- package/dist/typescript/components/typescript-object.cjs +8 -124
- package/dist/typescript/components/typescript-object.d.cts +2 -28
- package/dist/typescript/components/typescript-object.d.mts +2 -28
- package/dist/typescript/components/typescript-object.mjs +6 -121
- package/dist/typescript/index.cjs +50 -44
- package/dist/typescript/index.d.cts +12 -10
- package/dist/typescript/index.d.mts +12 -10
- package/dist/typescript/index.mjs +16 -10
- package/dist/typescript-BCc7kwL_.mjs +46 -0
- package/dist/typescript-BCc7kwL_.mjs.map +1 -0
- package/dist/typescript-BbjCTT04.cjs +51 -0
- package/dist/typescript-DWzPF4n4.d.mts +26 -0
- package/dist/typescript-DWzPF4n4.d.mts.map +1 -0
- package/dist/typescript-file-BWaBMfMr.d.mts +50 -0
- package/dist/typescript-file-BWaBMfMr.d.mts.map +1 -0
- package/dist/typescript-file-BmLwVIQP.cjs +231 -0
- package/dist/typescript-file-C5NjN3H2.mjs +214 -0
- package/dist/typescript-file-C5NjN3H2.mjs.map +1 -0
- package/dist/typescript-file-MYxikvB6.d.cts +50 -0
- package/dist/typescript-file-MYxikvB6.d.cts.map +1 -0
- package/dist/typescript-file-fOVF6YF2.d.cts +50 -0
- package/dist/typescript-file-fOVF6YF2.d.cts.map +1 -0
- package/dist/typescript-interface-BNdWrKgb.cjs +83 -0
- package/dist/typescript-interface-D-d9A720.d.cts +26 -0
- package/dist/typescript-interface-D-d9A720.d.cts.map +1 -0
- package/dist/typescript-interface-LN3uCdA6.mjs +72 -0
- package/dist/typescript-interface-LN3uCdA6.mjs.map +1 -0
- package/dist/typescript-interface-MV4qwTHs.d.mts +26 -0
- package/dist/typescript-interface-MV4qwTHs.d.mts.map +1 -0
- package/dist/typescript-o4AsClkT.d.cts +26 -0
- package/dist/typescript-o4AsClkT.d.cts.map +1 -0
- package/dist/typescript-object-Bbza8TK7.d.cts +30 -0
- package/dist/typescript-object-Bbza8TK7.d.cts.map +1 -0
- package/dist/typescript-object-C7p9fJBF.d.mts +30 -0
- package/dist/typescript-object-C7p9fJBF.d.mts.map +1 -0
- package/dist/typescript-object-DIyR8xhW.mjs +124 -0
- package/dist/typescript-object-DIyR8xhW.mjs.map +1 -0
- package/dist/typescript-object-ENaG1YGI.cjs +135 -0
- package/dist/typescript-object-v1WiBD8W.d.cts +30 -0
- package/dist/typescript-object-v1WiBD8W.d.cts.map +1 -0
- package/dist/unctx-MFxscYXI.mjs +12 -0
- package/dist/unctx-MFxscYXI.mjs.map +1 -0
- package/dist/unctx-r7Vvh6XR.cjs +17 -0
- package/package.json +6 -6
- package/dist/internal/unctx.cjs +0 -8
- package/dist/internal/unctx.mjs +0 -7
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "
|
|
1
|
+
import "../unctx-MFxscYXI.mjs";
|
|
2
|
+
import "../single-line-comment-mOQtfhWt.mjs";
|
|
3
|
+
import "../context-e2kZWEFW.mjs";
|
|
4
|
+
import "../reflection-B-NMNIoB.mjs";
|
|
5
|
+
import "../contexts-juWSyBfb.mjs";
|
|
6
|
+
import "../source-file-BiJK-nH_.mjs";
|
|
7
|
+
import { _ as TSDocReturns, a as TSDocDomain, b as TSDocTitle, c as TSDocIgnore, d as TSDocModule, f as TSDocParam, g as TSDocRemarks, h as TSDocReadonly, i as TSDocDefaultValue, l as TSDocInternal, m as TSDocPermission, n as TSDocAlias, o as TSDocExample, p as TSDocParams, r as TSDocAttributesTags, s as TSDocHidden, t as TSDoc, u as TSDocLink, v as TSDocTag, y as TSDocThrows } from "../tsdoc-Crv526i6.mjs";
|
|
8
|
+
import { n as TypescriptFileHeader, r as TypescriptFileHeaderImports, t as TypescriptFile } from "../typescript-file-C5NjN3H2.mjs";
|
|
9
|
+
import { t as BuiltinFile } from "../builtin-file-Ie_jPokg.mjs";
|
|
10
|
+
import { t as DynamicImportStatement } from "../dynamic-import-statement-BbNJchii.mjs";
|
|
11
|
+
import { t as EntryFile } from "../entry-file-D64eurjX.mjs";
|
|
12
|
+
import { t as RecordExpression } from "../record-expression-BjXMzi4r.mjs";
|
|
13
|
+
import { n as TSDocReflectionMethod, r as TSDocReflectionProperty, t as TSDocReflectionClass } from "../tsdoc-reflection-D-eKs6S1.mjs";
|
|
14
|
+
import { n as TypescriptInterfaceProperty, t as TypeScriptInterface } from "../typescript-interface-LN3uCdA6.mjs";
|
|
15
|
+
import { n as TypescriptObjectProperty, t as TypescriptObject } from "../typescript-object-DIyR8xhW.mjs";
|
|
16
|
+
import "../components-C_Rnle_h.mjs";
|
|
11
17
|
|
|
12
18
|
export { BuiltinFile, DynamicImportStatement, EntryFile, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle, TypeScriptInterface, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptInterfaceProperty, TypescriptObject, TypescriptObjectProperty };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { stringifyValue } from "@powerlines/deepkit/utilities";
|
|
2
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
3
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
4
|
+
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
5
|
+
|
|
6
|
+
//#region src/helpers/typescript.ts
|
|
7
|
+
/**
|
|
8
|
+
* Generates a TypeScript object for the given reflection class.
|
|
9
|
+
*
|
|
10
|
+
* @param reflection - The reflection class to generate the object for.
|
|
11
|
+
* @param options - Options for generating the object.
|
|
12
|
+
* @returns A string containing the TypeScript object definition.
|
|
13
|
+
*/
|
|
14
|
+
function generateTypeScriptObject(reflection, options = {}) {
|
|
15
|
+
if (!reflection) return "";
|
|
16
|
+
return `
|
|
17
|
+
/**
|
|
18
|
+
* ${reflection.getDescription() || `${titleCase(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
|
|
19
|
+
*/
|
|
20
|
+
export const ${camelCase(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
|
|
21
|
+
${reflection.getProperties().filter((item) => !item.isIgnored() && !isUndefined(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
22
|
+
if (isUndefined(ret) && !isUndefined(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
23
|
+
return ret;
|
|
24
|
+
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
|
|
25
|
+
* ${item.getDescription() || item.getTitle() || titleCase(item.getNameAsString())}
|
|
26
|
+
*
|
|
27
|
+
* @title ${item.getTitle() || titleCase(item.getNameAsString())}${item.getAlias().length ? `
|
|
28
|
+
${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
|
|
29
|
+
* @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
|
|
30
|
+
${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
|
|
31
|
+
* @internal` : ""}${item.isReadonly() ? `
|
|
32
|
+
* @readonly` : ""}${item.isIgnored() ? `
|
|
33
|
+
* @ignored` : ""}${item.isHidden() ? `
|
|
34
|
+
* @hidden` : ""}
|
|
35
|
+
*/
|
|
36
|
+
${item.getNameAsString()}: ${stringifyValue(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
37
|
+
if (isUndefined(ret) && !isUndefined(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
38
|
+
return ret;
|
|
39
|
+
}, void 0) ?? item.getDefaultValue())}`).join(", \n")}
|
|
40
|
+
};
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { generateTypeScriptObject as t };
|
|
46
|
+
//# sourceMappingURL=typescript-BCc7kwL_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-BCc7kwL_.mjs","names":["stringifyValue","camelCase","titleCase","isUndefined","generateTypeScriptObject","reflection","options","getDescription","overrideName","getClassName","getName","overrideExtends","getSuperReflectionClass","getProperties","filter","item","isIgnored","defaultValues","getNameAsString","getAlias","reduce","ret","alias","undefined","getDefaultValue","sort","a","b","isReadonly","localeCompare","map","getTitle","length","join","getDomain","getPermission","permission","isInternal","isHidden","getType"],"sources":["../src/helpers/typescript.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { stringifyValue } from \"@powerlines/deepkit/utilities\";\nimport type { ReflectionClass } from \"@powerlines/deepkit/vendor/type\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isUndefined } from \"@stryke/type-checks/is-undefined\";\n\nexport interface GenerateTypeScriptInterfaceOptions<T> {\n overrideName?: string;\n overrideExtends?: string | false;\n defaultValues?: Partial<T>;\n}\n\n// /**\n// * Generates a TypeScript interface for the given reflection class.\n// *\n// * @param reflection - The reflection class to generate the interface for.\n// * @returns A string containing the TypeScript interface definition.\n// */\n// export function TypeScriptInterface<T>(\n// reflection: ReflectionClass<T>,\n// options: GenerateTypeScriptInterfaceOptions<T> = {}\n// ): string {\n// if (!reflection) {\n// return \"\";\n// }\n\n// return `\n// /**\n// * Interface for ${reflection.getTitle() || titleCase(options.overrideName || reflection.getName())}.\n// *\n// * @title ${reflection.getTitle() || titleCase(reflection.getName())}${\n// reflection.getAlias().length\n// ? ` ${reflection\n// .getAlias()\n// .map(alias => ` * @alias ${alias}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${reflection.getDomain() ? ` * @domain ${reflection.getDomain()}` : \"\"}${\n// reflection.getPermission().length\n// ? `\n// ${reflection\n// .getPermission()\n// .map(permission => ` * @permission ${permission}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// reflection.isInternal()\n// ? `\n// * @internal`\n// : \"\"\n// }${\n// reflection.isReadonly()\n// ? `\n// * @readonly`\n// : \"\"\n// }${\n// reflection.isIgnored()\n// ? `\n// * @ignored`\n// : \"\"\n// }${\n// reflection.isHidden()\n// ? `\n// * @hidden`\n// : \"\"\n// }\n// */\n// export interface ${pascalCase(options.overrideName || reflection.getName())}${\n// options.overrideExtends !== false &&\n// (options.overrideExtends || reflection.getSuperReflectionClass()?.getName())\n// ? ` extends ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}`\n// : \"\"\n// } {\n// ${reflection\n// .getProperties()\n// .filter(item => !item.isIgnored())\n// .sort((a, b) =>\n// (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n// ? a.getNameAsString().localeCompare(b.getNameAsString())\n// : a.isReadonly()\n// ? 1\n// : -1\n// )\n// .map(\n// item =>\n// ` /**\n// * ${\n// item.getDescription() ||\n// item.getTitle() ||\n// titleCase(item.getNameAsString())\n// }\n// *\n// * @title ${item.getTitle() || titleCase(item.getNameAsString())}${\n// item.getAlias().length\n// ? `\n// ${item\n// .getAlias()\n// .map(alias => ` * @alias ${alias}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// item.getDomain()\n// ? `\n// * @domain ${item.getDomain()}`\n// : \"\"\n// }${\n// item.getPermission().length\n// ? `\n// ${item\n// .getPermission()\n// .map(permission => ` * @permission ${permission}`)\n// .join(\"\\n\")}`\n// : \"\"\n// }${\n// !isUndefined(item.getDefaultValue()) && item.getDefaultValue() !== \"\"\n// ? `\n// * @defaultValue ${item.getDefaultValue()}`\n// : \"\"\n// }${\n// item.isInternal()\n// ? `\n// * @internal`\n// : \"\"\n// }${\n// item.isReadonly()\n// ? `\n// * @readonly`\n// : \"\"\n// }${\n// item.isHidden()\n// ? `\n// * @hidden`\n// : \"\"\n// }\n// */\n// ${item.isReadonly() ? \"readonly \" : \"\"}${item.getNameAsString()}${\n// isUndefined(\n// (options.defaultValues as Record<string, any>)?.[item.getNameAsString()]\n// ) &&\n// isUndefined(item.getDefaultValue()) &&\n// !item\n// .getAlias()\n// .some(\n// alias =>\n// !isUndefined(\n// (options.defaultValues as Record<string, any>)?.[alias]\n// )\n// ) &&\n// item.isOptional()\n// ? \"?\"\n// : \"\"\n// }: ${stringifyType(item.getType())}`\n// )\n// .join(\", \\n\")}\n// }\n// `;\n// }\n\nexport interface GenerateTypeScriptObjectOptions<T> {\n overrideName?: string;\n overrideExtends?: string | false;\n defaultValues?: Partial<T>;\n}\n\n/**\n * Generates a TypeScript object for the given reflection class.\n *\n * @param reflection - The reflection class to generate the object for.\n * @param options - Options for generating the object.\n * @returns A string containing the TypeScript object definition.\n */\nexport function generateTypeScriptObject<T extends Record<string, any>>(\n reflection: ReflectionClass<T>,\n options: GenerateTypeScriptObjectOptions<T> = {}\n) {\n if (!reflection) {\n return \"\";\n }\n\n return `\n/**\n * ${\n reflection.getDescription() ||\n `${titleCase(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`\n }.\n */\nexport const ${camelCase(options.overrideName || reflection.getName())}${\n options.overrideExtends !== false &&\n (options.overrideExtends || reflection.getSuperReflectionClass()?.getName())\n ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}`\n : \"\"\n } = {\n ${reflection\n .getProperties()\n .filter(\n item =>\n !item.isIgnored() &&\n !isUndefined(\n options.defaultValues?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined(\n (options.defaultValues as Record<string, any>)?.[alias]\n )\n ) {\n return (options.defaultValues as Record<string, any>)?.[alias];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )\n )\n .sort((a, b) =>\n (a.isReadonly() && b.isReadonly()) || (!a.isReadonly() && !b.isReadonly())\n ? a.getNameAsString().localeCompare(b.getNameAsString())\n : a.isReadonly()\n ? 1\n : -1\n )\n .map(\n item =>\n ` /**\n * ${\n item.getDescription() ||\n item.getTitle() ||\n titleCase(item.getNameAsString())\n }\n *\n * @title ${item.getTitle() || titleCase(item.getNameAsString())}${\n item.getAlias().length\n ? `\n ${item\n .getAlias()\n .map(alias => ` * @alias ${alias}`)\n .join(\"\\n\")}`\n : \"\"\n }${\n item.getDomain()\n ? `\n * @domain ${item.getDomain()}`\n : \"\"\n }${\n item.getPermission().length\n ? `\n ${item\n .getPermission()\n .map(permission => ` * @permission ${permission}`)\n .join(\"\\n\")}`\n : \"\"\n }${\n item.isInternal()\n ? `\n * @internal`\n : \"\"\n }${\n item.isReadonly()\n ? `\n * @readonly`\n : \"\"\n }${\n item.isIgnored()\n ? `\n * @ignored`\n : \"\"\n }${\n item.isHidden()\n ? `\n * @hidden`\n : \"\"\n }\n */\n ${item.getNameAsString()}: ${stringifyValue(\n item.getType(),\n options.defaultValues?.[item.getNameAsString()] ??\n item.getAlias().reduce((ret, alias) => {\n if (\n isUndefined(ret) &&\n !isUndefined((options.defaultValues as Record<string, any>)?.[alias])\n ) {\n return (options.defaultValues as Record<string, any>)?.[alias];\n }\n\n return ret;\n }, undefined) ??\n item.getDefaultValue()\n )}`\n )\n .join(\", \\n\")}\n};\n`;\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
+
let __powerlines_deepkit_utilities = require("@powerlines/deepkit/utilities");
|
|
3
|
+
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
4
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
5
|
+
let __stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
6
|
+
|
|
7
|
+
//#region src/helpers/typescript.ts
|
|
8
|
+
/**
|
|
9
|
+
* Generates a TypeScript object for the given reflection class.
|
|
10
|
+
*
|
|
11
|
+
* @param reflection - The reflection class to generate the object for.
|
|
12
|
+
* @param options - Options for generating the object.
|
|
13
|
+
* @returns A string containing the TypeScript object definition.
|
|
14
|
+
*/
|
|
15
|
+
function generateTypeScriptObject(reflection, options = {}) {
|
|
16
|
+
if (!reflection) return "";
|
|
17
|
+
return `
|
|
18
|
+
/**
|
|
19
|
+
* ${reflection.getDescription() || `${(0, __stryke_string_format_title_case.titleCase)(options.overrideName || reflection.getClassName() || reflection.getName())} object instance`}.
|
|
20
|
+
*/
|
|
21
|
+
export const ${(0, __stryke_string_format_camel_case.camelCase)(options.overrideName || reflection.getName())}${options.overrideExtends !== false && (options.overrideExtends || reflection.getSuperReflectionClass()?.getName()) ? `: ${options.overrideExtends || reflection.getSuperReflectionClass()?.getName()}` : ""} = {
|
|
22
|
+
${reflection.getProperties().filter((item) => !item.isIgnored() && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
23
|
+
if ((0, __stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
24
|
+
return ret;
|
|
25
|
+
}, void 0) ?? item.getDefaultValue())).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1).map((item) => ` /**
|
|
26
|
+
* ${item.getDescription() || item.getTitle() || (0, __stryke_string_format_title_case.titleCase)(item.getNameAsString())}
|
|
27
|
+
*
|
|
28
|
+
* @title ${item.getTitle() || (0, __stryke_string_format_title_case.titleCase)(item.getNameAsString())}${item.getAlias().length ? `
|
|
29
|
+
${item.getAlias().map((alias) => ` * @alias ${alias}`).join("\n")}` : ""}${item.getDomain() ? `
|
|
30
|
+
* @domain ${item.getDomain()}` : ""}${item.getPermission().length ? `
|
|
31
|
+
${item.getPermission().map((permission) => ` * @permission ${permission}`).join("\n")}` : ""}${item.isInternal() ? `
|
|
32
|
+
* @internal` : ""}${item.isReadonly() ? `
|
|
33
|
+
* @readonly` : ""}${item.isIgnored() ? `
|
|
34
|
+
* @ignored` : ""}${item.isHidden() ? `
|
|
35
|
+
* @hidden` : ""}
|
|
36
|
+
*/
|
|
37
|
+
${item.getNameAsString()}: ${(0, __powerlines_deepkit_utilities.stringifyValue)(item.getType(), options.defaultValues?.[item.getNameAsString()] ?? item.getAlias().reduce((ret, alias) => {
|
|
38
|
+
if ((0, __stryke_type_checks_is_undefined.isUndefined)(ret) && !(0, __stryke_type_checks_is_undefined.isUndefined)(options.defaultValues?.[alias])) return options.defaultValues?.[alias];
|
|
39
|
+
return ret;
|
|
40
|
+
}, void 0) ?? item.getDefaultValue())}`).join(", \n")}
|
|
41
|
+
};
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
Object.defineProperty(exports, 'generateTypeScriptObject', {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return generateTypeScriptObject;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReflectionClass } from "@powerlines/deepkit/vendor/type";
|
|
2
|
+
|
|
3
|
+
//#region src/helpers/typescript.d.ts
|
|
4
|
+
interface GenerateTypeScriptInterfaceOptions<T> {
|
|
5
|
+
overrideName?: string;
|
|
6
|
+
overrideExtends?: string | false;
|
|
7
|
+
defaultValues?: Partial<T>;
|
|
8
|
+
}
|
|
9
|
+
interface GenerateTypeScriptObjectOptions<T> {
|
|
10
|
+
overrideName?: string;
|
|
11
|
+
overrideExtends?: string | false;
|
|
12
|
+
defaultValues?: Partial<T>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Generates a TypeScript object for the given reflection class.
|
|
16
|
+
*
|
|
17
|
+
* @param reflection - The reflection class to generate the object for.
|
|
18
|
+
* @param options - Options for generating the object.
|
|
19
|
+
* @returns A string containing the TypeScript object definition.
|
|
20
|
+
*/
|
|
21
|
+
declare function generateTypeScriptObject<T extends Record<string, any>>(reflection: ReflectionClass<T>, options?: GenerateTypeScriptObjectOptions<T>): string;
|
|
22
|
+
declare type __ΩGenerateTypeScriptInterfaceOptions = any[];
|
|
23
|
+
declare type __ΩGenerateTypeScriptObjectOptions = any[];
|
|
24
|
+
//#endregion
|
|
25
|
+
export { generateTypeScriptObject as a, __ΩGenerateTypeScriptObjectOptions as i, GenerateTypeScriptObjectOptions as n, __ΩGenerateTypeScriptInterfaceOptions as r, GenerateTypeScriptInterfaceOptions as t };
|
|
26
|
+
//# sourceMappingURL=typescript-DWzPF4n4.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-DWzPF4n4.d.mts","names":[],"sources":["../src/helpers/typescript.ts"],"sourcesContent":[],"mappings":";;;UAwBiB;;EAAA,eAAA,CAAA,EAAA,MAAA,GAAA,KAAA;EAwJA,aAAA,CAAA,EArJC,OAqJD,CArJS,CAqJT,CAAA;AAajB;AAAmD,UAblC,+BAakC,CAAA,CAAA,CAAA,CAAA;EACrB,YAAA,CAAA,EAAA,MAAA;EAAhB,eAAA,CAAA,EAAA,MAAA,GAAA,KAAA;EAC6B,aAAA,CAAA,EAZzB,OAYyB,CAZjB,CAYiB,CAAA;;;;;;;;;iBAF3B,mCAAmC,iCACrC,gBAAgB,cACnB,gCAAgC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { h as TypescriptFileImports, n as ComponentProps, p as SourceFileHeaderProps } from "./components-oHSM7vmp.mjs";
|
|
2
|
+
import { n as SourceFileProps$1 } from "./source-file-CQl0UCgf.mjs";
|
|
3
|
+
import { Children } from "@alloy-js/core";
|
|
4
|
+
import { TSModuleScope } from "@alloy-js/typescript";
|
|
5
|
+
|
|
6
|
+
//#region src/typescript/components/typescript-file.d.ts
|
|
7
|
+
type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
|
|
8
|
+
hashbang?: Children | true;
|
|
9
|
+
header?: Children;
|
|
10
|
+
imports?: TypescriptFileImports;
|
|
11
|
+
builtinImports?: TypescriptFileImports;
|
|
12
|
+
export?: boolean | string;
|
|
13
|
+
tsx?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
17
|
+
*
|
|
18
|
+
* @param props - The properties for the source file.
|
|
19
|
+
* @returns The rendered source file component.
|
|
20
|
+
*/
|
|
21
|
+
declare function TypescriptFile(props: TypescriptFileProps): Children;
|
|
22
|
+
interface TypescriptFileHeaderProps extends SourceFileHeaderProps {
|
|
23
|
+
header?: Children;
|
|
24
|
+
hashbang?: Children | true;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
28
|
+
*
|
|
29
|
+
* @param props - The properties for the source file header.
|
|
30
|
+
* @returns The rendered source file header.
|
|
31
|
+
*/
|
|
32
|
+
declare function TypescriptFileHeader(props: TypescriptFileHeaderProps): Children;
|
|
33
|
+
interface TypescriptFileHeaderImportsProps extends SourceFileHeaderProps {
|
|
34
|
+
imports?: TypescriptFileImports;
|
|
35
|
+
builtinImports?: TypescriptFileImports;
|
|
36
|
+
scope?: TSModuleScope;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
40
|
+
*
|
|
41
|
+
* @param props - The properties for the source file header.
|
|
42
|
+
* @returns The rendered source file header.
|
|
43
|
+
*/
|
|
44
|
+
declare function TypescriptFileHeaderImports(props: TypescriptFileHeaderImportsProps): Children;
|
|
45
|
+
declare type __ΩTypescriptFileProps = any[];
|
|
46
|
+
declare type __ΩTypescriptFileHeaderProps = any[];
|
|
47
|
+
declare type __ΩTypescriptFileHeaderImportsProps = any[];
|
|
48
|
+
//#endregion
|
|
49
|
+
export { TypescriptFileHeaderProps as a, __ΩTypescriptFileHeaderProps as c, TypescriptFileHeaderImportsProps as i, __ΩTypescriptFileProps as l, TypescriptFileHeader as n, TypescriptFileProps as o, TypescriptFileHeaderImports as r, __ΩTypescriptFileHeaderImportsProps as s, TypescriptFile as t };
|
|
50
|
+
//# sourceMappingURL=typescript-file-BWaBMfMr.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-file-BWaBMfMr.d.mts","names":[],"sources":["../src/typescript/components/typescript-file.tsx"],"sourcesContent":[],"mappings":";;;;;;KAmDY,mBAAA,GAAsB,KAAK,iCACrC;aACa;EAFH,MAAA,CAAA,EAGC,QAHD;EAA2B,OAAA,CAAA,EAIzB,qBAJyB;EAAL,cAAA,CAAA,EAKb,qBALa;EAChC,MAAA,CAAA,EAAA,OAAA,GAAA,MAAA;EACa,GAAA,CAAA,EAAA,OAAA;CACF;;;;AAab;AAgEA;;AAEa,iBAlEG,cAAA,CAkEH,KAAA,EAlEyB,mBAkEzB,CAAA,EAlE4C,QAkE5C;AAFsC,UAAlC,yBAAA,SAAkC,qBAAA,CAAA;EAAqB,MAAA,CAAA,EAC7D,QAD6D;EAWxD,QAAA,CAAA,EATH,QASG,GAAA,IAAoB;AAuEpC;;;;;;AAYA;iBAnFgB,oBAAA,QAA4B,4BAAyB;UAuEpD,gCAAA,SAAyC;YAC9C;mBACO;UACT;;;;;;;;iBASM,2BAAA,QACP,mCAAgC"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
+
const require_single_line_comment = require('./single-line-comment-COZ9RWsm.cjs');
|
|
3
|
+
const require_context = require('./context--KBspFnw.cjs');
|
|
4
|
+
const require_source_file = require('./source-file-BAVTBVJy.cjs');
|
|
5
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
6
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
7
|
+
let __stryke_path_append = require("@stryke/path/append");
|
|
8
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
|
+
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
10
|
+
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
11
|
+
let __stryke_type_checks_is_boolean = require("@stryke/type-checks/is-boolean");
|
|
12
|
+
|
|
13
|
+
//#region src/typescript/components/typescript-file.tsx
|
|
14
|
+
/**
|
|
15
|
+
* A base component representing a Powerlines generated Typescript source file.
|
|
16
|
+
*
|
|
17
|
+
* @param props - The properties for the source file.
|
|
18
|
+
* @returns The rendered source file component.
|
|
19
|
+
*/
|
|
20
|
+
function TypescriptFile(props) {
|
|
21
|
+
const [{ children, path, imports, builtinImports, tsx, header, hashbang }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
22
|
+
"children",
|
|
23
|
+
"path",
|
|
24
|
+
"imports",
|
|
25
|
+
"builtinImports",
|
|
26
|
+
"tsx",
|
|
27
|
+
"header",
|
|
28
|
+
"hashbang"
|
|
29
|
+
]);
|
|
30
|
+
const directoryContext = (0, __alloy_js_core.useContext)(__alloy_js_core.SourceDirectoryContext);
|
|
31
|
+
const sdData = (0, __alloy_js_typescript.getSourceDirectoryData)(directoryContext);
|
|
32
|
+
const modulePath = (0, __stryke_path_append.appendPath)(path, directoryContext.path);
|
|
33
|
+
const scope = new __alloy_js_typescript.TSModuleScope(modulePath, (0, __alloy_js_core.useScope)());
|
|
34
|
+
sdData.modules.add(scope);
|
|
35
|
+
const pkg = (0, __alloy_js_core.useContext)(__alloy_js_typescript.PackageContext);
|
|
36
|
+
if (pkg) pkg.scope.addModule(scope);
|
|
37
|
+
if (props.export) {
|
|
38
|
+
if (pkg) if ((0, __stryke_type_checks_is_boolean.isBoolean)(props.export)) pkg.scope.addExport(modulePath, scope);
|
|
39
|
+
else pkg.scope.addExport(props.export, scope);
|
|
40
|
+
}
|
|
41
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.SourceFileContext.Provider, {
|
|
42
|
+
value: { scope },
|
|
43
|
+
get children() {
|
|
44
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Scope, {
|
|
45
|
+
value: scope,
|
|
46
|
+
get children() {
|
|
47
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_source_file.SourceFile, (0, __alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
48
|
+
path: modulePath,
|
|
49
|
+
get header() {
|
|
50
|
+
return header ?? (0, __alloy_js_core_jsx_runtime.createComponent)(TypescriptFileHeader, {
|
|
51
|
+
hashbang,
|
|
52
|
+
get children() {
|
|
53
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(TypescriptFileHeaderImports, {
|
|
54
|
+
imports,
|
|
55
|
+
builtinImports,
|
|
56
|
+
scope
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
filetype: tsx ? "tsx" : "typescript",
|
|
62
|
+
children
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
71
|
+
*
|
|
72
|
+
* @param props - The properties for the source file header.
|
|
73
|
+
* @returns The rendered source file header.
|
|
74
|
+
*/
|
|
75
|
+
function TypescriptFileHeader(props) {
|
|
76
|
+
const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
|
|
77
|
+
const context = require_context.usePowerlinesSafe();
|
|
78
|
+
return [
|
|
79
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
80
|
+
get when() {
|
|
81
|
+
return Boolean(hashbang);
|
|
82
|
+
},
|
|
83
|
+
get children() {
|
|
84
|
+
return [(0, __alloy_js_core_jsx_runtime.memo)(() => hashbang === true ? __alloy_js_core.code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
85
|
+
}
|
|
86
|
+
}),
|
|
87
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
88
|
+
get when() {
|
|
89
|
+
return Boolean(header);
|
|
90
|
+
},
|
|
91
|
+
get children() {
|
|
92
|
+
return [header, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
96
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
97
|
+
get when() {
|
|
98
|
+
return Boolean(disableEslint);
|
|
99
|
+
},
|
|
100
|
+
get children() {
|
|
101
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
102
|
+
variant: "slash-star",
|
|
103
|
+
children: "eslint-disable"
|
|
104
|
+
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
108
|
+
get when() {
|
|
109
|
+
return Boolean(disablePrettier);
|
|
110
|
+
},
|
|
111
|
+
get children() {
|
|
112
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, {
|
|
113
|
+
variant: "slash-star",
|
|
114
|
+
children: "prettier-ignore"
|
|
115
|
+
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
119
|
+
get when() {
|
|
120
|
+
return Boolean(disableBiome);
|
|
121
|
+
},
|
|
122
|
+
get children() {
|
|
123
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, { children: "biome-ignore lint: disable" }), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
124
|
+
}
|
|
125
|
+
}),
|
|
126
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
127
|
+
get when() {
|
|
128
|
+
return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
|
|
129
|
+
},
|
|
130
|
+
get children() {
|
|
131
|
+
return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
135
|
+
get when() {
|
|
136
|
+
return Boolean(children);
|
|
137
|
+
},
|
|
138
|
+
get children() {
|
|
139
|
+
return [children, (0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})];
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, { get children() {
|
|
143
|
+
return `Generated by ${(0, __stryke_string_format_title_case.titleCase)(context?.config?.framework) || "Powerlines"}`;
|
|
144
|
+
} }),
|
|
145
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {}),
|
|
146
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(require_single_line_comment.SingleLineComment, { children: __alloy_js_core.code`NOTE: Do not edit this file manually - it will be overwritten automatically` }),
|
|
147
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
148
|
+
];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Renders the header for a Powerlines Typescript source file.
|
|
152
|
+
*
|
|
153
|
+
* @param props - The properties for the source file header.
|
|
154
|
+
* @returns The rendered source file header.
|
|
155
|
+
*/
|
|
156
|
+
function TypescriptFileHeaderImports(props) {
|
|
157
|
+
const { imports, builtinImports } = props;
|
|
158
|
+
const context = require_context.usePowerlinesSafe();
|
|
159
|
+
const sourceFile = (0, __alloy_js_typescript.useSourceFile)();
|
|
160
|
+
const scope = props.scope ?? sourceFile.scope;
|
|
161
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
162
|
+
get when() {
|
|
163
|
+
return scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0 || !!builtinImports && Object.keys(builtinImports).length > 0;
|
|
164
|
+
},
|
|
165
|
+
get children() {
|
|
166
|
+
return [
|
|
167
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
168
|
+
get when() {
|
|
169
|
+
return !!imports && Object.keys(imports).length > 0;
|
|
170
|
+
},
|
|
171
|
+
get children() {
|
|
172
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
173
|
+
get each() {
|
|
174
|
+
return Object.entries(imports ?? {});
|
|
175
|
+
},
|
|
176
|
+
hardline: true,
|
|
177
|
+
children: ([module$1, importItem]) => {
|
|
178
|
+
return [(0, __alloy_js_core_jsx_runtime.memo)(() => __alloy_js_core.code`import ${importItem === null ? "" : (0, __stryke_type_checks_is_string.isString)(importItem) ? importItem : ` ${importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} from "${module$1}";`)];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
184
|
+
get when() {
|
|
185
|
+
return builtinImports && Object.keys(builtinImports).length > 0;
|
|
186
|
+
},
|
|
187
|
+
get children() {
|
|
188
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
189
|
+
get each() {
|
|
190
|
+
return Object.entries(builtinImports ?? {});
|
|
191
|
+
},
|
|
192
|
+
hardline: true,
|
|
193
|
+
children: ([module$1, importItem]) => __alloy_js_core.code`import ${importItem === null ? "" : (0, __stryke_type_checks_is_string.isString)(importItem) ? importItem : ` ${importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${importItem.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} from "${module$1.includes(":") ? module$1 : `${context?.config?.framework || "powerlines"}:${module$1}`}";`
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
197
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
198
|
+
get when() {
|
|
199
|
+
return scope.importedModules.size > 0;
|
|
200
|
+
},
|
|
201
|
+
get children() {
|
|
202
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ImportStatements, { get records() {
|
|
203
|
+
return scope.importedModules;
|
|
204
|
+
} });
|
|
205
|
+
}
|
|
206
|
+
}),
|
|
207
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {})
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//#endregion
|
|
214
|
+
Object.defineProperty(exports, 'TypescriptFile', {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
get: function () {
|
|
217
|
+
return TypescriptFile;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(exports, 'TypescriptFileHeader', {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
get: function () {
|
|
223
|
+
return TypescriptFileHeader;
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
Object.defineProperty(exports, 'TypescriptFileHeaderImports', {
|
|
227
|
+
enumerable: true,
|
|
228
|
+
get: function () {
|
|
229
|
+
return TypescriptFileHeaderImports;
|
|
230
|
+
}
|
|
231
|
+
});
|