@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,216 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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");
|
|
1
|
+
require('../../unctx-r7Vvh6XR.cjs');
|
|
2
|
+
require('../../single-line-comment-COZ9RWsm.cjs');
|
|
3
|
+
require('../../context--KBspFnw.cjs');
|
|
4
|
+
require('../../reflection-DHpdhvwI.cjs');
|
|
5
|
+
require('../../contexts-DezKayEz.cjs');
|
|
6
|
+
require('../../source-file-BAVTBVJy.cjs');
|
|
7
|
+
const require_typescript_file = require('../../typescript-file-BmLwVIQP.cjs');
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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_core_components_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_core_contexts_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_core_components_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_core_components_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_core_components_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_core_components_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_core_components_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_core_contexts_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
|
-
exports.TypescriptFile = TypescriptFile;
|
|
215
|
-
exports.TypescriptFileHeader = TypescriptFileHeader;
|
|
216
|
-
exports.TypescriptFileHeaderImports = TypescriptFileHeaderImports;
|
|
9
|
+
exports.TypescriptFile = require_typescript_file.TypescriptFile;
|
|
10
|
+
exports.TypescriptFileHeader = require_typescript_file.TypescriptFileHeader;
|
|
11
|
+
exports.TypescriptFileHeaderImports = require_typescript_file.TypescriptFileHeaderImports;
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
|
1
|
+
import "../../components-IRVnipN0.cjs";
|
|
2
|
+
import "../../source-file-BTsyACav.cjs";
|
|
3
|
+
import { a as TypescriptFileHeaderProps, c as __ΩTypescriptFileHeaderProps, i as TypescriptFileHeaderImportsProps, l as __ΩTypescriptFileProps, n as TypescriptFileHeader, o as TypescriptFileProps, r as TypescriptFileHeaderImports, s as __ΩTypescriptFileHeaderImportsProps, t as TypescriptFile } from "../../typescript-file-fOVF6YF2.cjs";
|
|
49
4
|
export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
|
|
@@ -1,49 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
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
|
|
1
|
+
import "../../components-oHSM7vmp.mjs";
|
|
2
|
+
import "../../source-file-CQl0UCgf.mjs";
|
|
3
|
+
import { a as TypescriptFileHeaderProps, c as __ΩTypescriptFileHeaderProps, i as TypescriptFileHeaderImportsProps, l as __ΩTypescriptFileProps, n as TypescriptFileHeader, o as TypescriptFileProps, r as TypescriptFileHeaderImports, s as __ΩTypescriptFileHeaderImportsProps, t as TypescriptFile } from "../../typescript-file-BWaBMfMr.mjs";
|
|
49
4
|
export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
|
|
@@ -1,213 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { isString } from "@stryke/type-checks/is-string";
|
|
9
|
-
import { ImportStatements, PackageContext, SourceFileContext as SourceFileContext$1, TSModuleScope, getSourceDirectoryData, useSourceFile } from "@alloy-js/typescript";
|
|
10
|
-
import { isBoolean } from "@stryke/type-checks/is-boolean";
|
|
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 { n as TypescriptFileHeader, r as TypescriptFileHeaderImports, t as TypescriptFile } from "../../typescript-file-C5NjN3H2.mjs";
|
|
11
8
|
|
|
12
|
-
//#region src/typescript/components/typescript-file.tsx
|
|
13
|
-
/**
|
|
14
|
-
* A base component representing a Powerlines generated Typescript source file.
|
|
15
|
-
*
|
|
16
|
-
* @param props - The properties for the source file.
|
|
17
|
-
* @returns The rendered source file component.
|
|
18
|
-
*/
|
|
19
|
-
function TypescriptFile(props) {
|
|
20
|
-
const [{ children, path, imports, builtinImports, tsx, header, hashbang }, rest] = splitProps(props, [
|
|
21
|
-
"children",
|
|
22
|
-
"path",
|
|
23
|
-
"imports",
|
|
24
|
-
"builtinImports",
|
|
25
|
-
"tsx",
|
|
26
|
-
"header",
|
|
27
|
-
"hashbang"
|
|
28
|
-
]);
|
|
29
|
-
const directoryContext = useContext(SourceDirectoryContext);
|
|
30
|
-
const sdData = getSourceDirectoryData(directoryContext);
|
|
31
|
-
const modulePath = appendPath(path, directoryContext.path);
|
|
32
|
-
const scope = new TSModuleScope(modulePath, useScope());
|
|
33
|
-
sdData.modules.add(scope);
|
|
34
|
-
const pkg = useContext(PackageContext);
|
|
35
|
-
if (pkg) pkg.scope.addModule(scope);
|
|
36
|
-
if (props.export) {
|
|
37
|
-
if (pkg) if (isBoolean(props.export)) pkg.scope.addExport(modulePath, scope);
|
|
38
|
-
else pkg.scope.addExport(props.export, scope);
|
|
39
|
-
}
|
|
40
|
-
return createComponent(SourceFileContext$1.Provider, {
|
|
41
|
-
value: { scope },
|
|
42
|
-
get children() {
|
|
43
|
-
return createComponent(Scope, {
|
|
44
|
-
value: scope,
|
|
45
|
-
get children() {
|
|
46
|
-
return createComponent(SourceFile, mergeProps(rest, {
|
|
47
|
-
path: modulePath,
|
|
48
|
-
get header() {
|
|
49
|
-
return header ?? createComponent(TypescriptFileHeader, {
|
|
50
|
-
hashbang,
|
|
51
|
-
get children() {
|
|
52
|
-
return createComponent(TypescriptFileHeaderImports, {
|
|
53
|
-
imports,
|
|
54
|
-
builtinImports,
|
|
55
|
-
scope
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
filetype: tsx ? "tsx" : "typescript",
|
|
61
|
-
children
|
|
62
|
-
}));
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Renders the header for a Powerlines Typescript source file.
|
|
70
|
-
*
|
|
71
|
-
* @param props - The properties for the source file header.
|
|
72
|
-
* @returns The rendered source file header.
|
|
73
|
-
*/
|
|
74
|
-
function TypescriptFileHeader(props) {
|
|
75
|
-
const { header, hashbang, disableEslint = true, disableBiome = true, disablePrettier = false, children } = props;
|
|
76
|
-
const context = usePowerlinesSafe();
|
|
77
|
-
return [
|
|
78
|
-
createComponent(Show, {
|
|
79
|
-
get when() {
|
|
80
|
-
return Boolean(hashbang);
|
|
81
|
-
},
|
|
82
|
-
get children() {
|
|
83
|
-
return [memo(() => hashbang === true ? code`#!/usr/bin/env ${context?.config.mode === "development" ? "-S NODE_OPTIONS=--enable-source-maps" : ""} node` : hashbang), createIntrinsic("hbr", {})];
|
|
84
|
-
}
|
|
85
|
-
}),
|
|
86
|
-
createComponent(Show, {
|
|
87
|
-
get when() {
|
|
88
|
-
return Boolean(header);
|
|
89
|
-
},
|
|
90
|
-
get children() {
|
|
91
|
-
return [header, createIntrinsic("hbr", {})];
|
|
92
|
-
}
|
|
93
|
-
}),
|
|
94
|
-
createIntrinsic("hbr", {}),
|
|
95
|
-
createComponent(Show, {
|
|
96
|
-
get when() {
|
|
97
|
-
return Boolean(disableEslint);
|
|
98
|
-
},
|
|
99
|
-
get children() {
|
|
100
|
-
return [createComponent(SingleLineComment, {
|
|
101
|
-
variant: "slash-star",
|
|
102
|
-
children: "eslint-disable"
|
|
103
|
-
}), createIntrinsic("hbr", {})];
|
|
104
|
-
}
|
|
105
|
-
}),
|
|
106
|
-
createComponent(Show, {
|
|
107
|
-
get when() {
|
|
108
|
-
return Boolean(disablePrettier);
|
|
109
|
-
},
|
|
110
|
-
get children() {
|
|
111
|
-
return [createComponent(SingleLineComment, {
|
|
112
|
-
variant: "slash-star",
|
|
113
|
-
children: "prettier-ignore"
|
|
114
|
-
}), createIntrinsic("hbr", {})];
|
|
115
|
-
}
|
|
116
|
-
}),
|
|
117
|
-
createComponent(Show, {
|
|
118
|
-
get when() {
|
|
119
|
-
return Boolean(disableBiome);
|
|
120
|
-
},
|
|
121
|
-
get children() {
|
|
122
|
-
return [createComponent(SingleLineComment, { children: "biome-ignore lint: disable" }), createIntrinsic("hbr", {})];
|
|
123
|
-
}
|
|
124
|
-
}),
|
|
125
|
-
createComponent(Show, {
|
|
126
|
-
get when() {
|
|
127
|
-
return Boolean(disableEslint) || Boolean(disablePrettier) || Boolean(disableBiome);
|
|
128
|
-
},
|
|
129
|
-
get children() {
|
|
130
|
-
return createIntrinsic("hbr", {});
|
|
131
|
-
}
|
|
132
|
-
}),
|
|
133
|
-
createComponent(Show, {
|
|
134
|
-
get when() {
|
|
135
|
-
return Boolean(children);
|
|
136
|
-
},
|
|
137
|
-
get children() {
|
|
138
|
-
return [children, createIntrinsic("hbr", {})];
|
|
139
|
-
}
|
|
140
|
-
}),
|
|
141
|
-
createComponent(SingleLineComment, { get children() {
|
|
142
|
-
return `Generated by ${titleCase(context?.config?.framework) || "Powerlines"}`;
|
|
143
|
-
} }),
|
|
144
|
-
createIntrinsic("hbr", {}),
|
|
145
|
-
createComponent(SingleLineComment, { children: code`NOTE: Do not edit this file manually - it will be overwritten automatically` }),
|
|
146
|
-
createIntrinsic("hbr", {})
|
|
147
|
-
];
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Renders the header for a Powerlines Typescript source file.
|
|
151
|
-
*
|
|
152
|
-
* @param props - The properties for the source file header.
|
|
153
|
-
* @returns The rendered source file header.
|
|
154
|
-
*/
|
|
155
|
-
function TypescriptFileHeaderImports(props) {
|
|
156
|
-
const { imports, builtinImports } = props;
|
|
157
|
-
const context = usePowerlinesSafe();
|
|
158
|
-
const sourceFile = useSourceFile();
|
|
159
|
-
const scope = props.scope ?? sourceFile.scope;
|
|
160
|
-
return createComponent(Show, {
|
|
161
|
-
get when() {
|
|
162
|
-
return scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0 || !!builtinImports && Object.keys(builtinImports).length > 0;
|
|
163
|
-
},
|
|
164
|
-
get children() {
|
|
165
|
-
return [
|
|
166
|
-
createComponent(Show, {
|
|
167
|
-
get when() {
|
|
168
|
-
return !!imports && Object.keys(imports).length > 0;
|
|
169
|
-
},
|
|
170
|
-
get children() {
|
|
171
|
-
return createComponent(For, {
|
|
172
|
-
get each() {
|
|
173
|
-
return Object.entries(imports ?? {});
|
|
174
|
-
},
|
|
175
|
-
hardline: true,
|
|
176
|
-
children: ([module, importItem]) => {
|
|
177
|
-
return [memo(() => code`import ${importItem === null ? "" : isString(importItem) ? importItem : ` ${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} from "${module}";`)];
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
}),
|
|
182
|
-
createComponent(Show, {
|
|
183
|
-
get when() {
|
|
184
|
-
return builtinImports && Object.keys(builtinImports).length > 0;
|
|
185
|
-
},
|
|
186
|
-
get children() {
|
|
187
|
-
return createComponent(For, {
|
|
188
|
-
get each() {
|
|
189
|
-
return Object.entries(builtinImports ?? {});
|
|
190
|
-
},
|
|
191
|
-
hardline: true,
|
|
192
|
-
children: ([module, importItem]) => code`import ${importItem === null ? "" : isString(importItem) ? importItem : ` ${importItem.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (importItem.filter((i) => !isString(i) && i.default).length > 0 && importItem.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (importItem.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${importItem.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} from "${module.includes(":") ? module : `${context?.config?.framework || "powerlines"}:${module}`}";`
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}),
|
|
196
|
-
createComponent(Show, {
|
|
197
|
-
get when() {
|
|
198
|
-
return scope.importedModules.size > 0;
|
|
199
|
-
},
|
|
200
|
-
get children() {
|
|
201
|
-
return createComponent(ImportStatements, { get records() {
|
|
202
|
-
return scope.importedModules;
|
|
203
|
-
} });
|
|
204
|
-
}
|
|
205
|
-
}),
|
|
206
|
-
createIntrinsic("hbr", {})
|
|
207
|
-
];
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
//#endregion
|
|
213
9
|
export { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports };
|
|
@@ -1,73 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
|
|
8
|
-
let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
|
|
9
|
-
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
1
|
+
require('../../unctx-r7Vvh6XR.cjs');
|
|
2
|
+
require('../../context--KBspFnw.cjs');
|
|
3
|
+
require('../../reflection-DHpdhvwI.cjs');
|
|
4
|
+
require('../../tsdoc-BId4fp5_.cjs');
|
|
5
|
+
require('../../tsdoc-reflection-IH-Mt2o_.cjs');
|
|
6
|
+
const require_typescript_interface = require('../../typescript-interface-BNdWrKgb.cjs');
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* Generates a TypeScript interface for the given reflection class.
|
|
14
|
-
*/
|
|
15
|
-
function TypeScriptInterface(props) {
|
|
16
|
-
const [{ name, reflection, doc }, rest] = (0, __alloy_js_core.splitProps)(props, [
|
|
17
|
-
"name",
|
|
18
|
-
"reflection",
|
|
19
|
-
"doc"
|
|
20
|
-
]);
|
|
21
|
-
const interfaceName = (0, __alloy_js_core.computed)(() => (0, __stryke_string_format_pascal_case.pascalCase)(((0, __stryke_type_checks_is_string.isString)(name) ? name : name.toString()) || reflection.getName()));
|
|
22
|
-
const properties = reflection.getProperties().filter((item) => !item.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1);
|
|
23
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_reflection.ReflectionClassContext.Provider, {
|
|
24
|
-
value: { reflection },
|
|
25
|
-
get children() {
|
|
26
|
-
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc_reflection.TSDocReflectionClass, { heading: doc }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.InterfaceDeclaration, (0, __alloy_js_core_jsx_runtime.mergeProps)({
|
|
27
|
-
"export": true,
|
|
28
|
-
get name() {
|
|
29
|
-
return interfaceName.value;
|
|
30
|
-
}
|
|
31
|
-
}, rest, { get children() {
|
|
32
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
33
|
-
each: properties,
|
|
34
|
-
doubleHardline: true,
|
|
35
|
-
semicolon: true,
|
|
36
|
-
children: (prop) => (0, __alloy_js_core_jsx_runtime.createComponent)(TypescriptInterfaceProperty, { property: prop })
|
|
37
|
-
});
|
|
38
|
-
} }))];
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Generates a TypeScript interface property for the given reflection class.
|
|
44
|
-
*/
|
|
45
|
-
function TypescriptInterfaceProperty(props) {
|
|
46
|
-
const [{ property }, rest] = (0, __alloy_js_core.splitProps)(props, ["property"]);
|
|
47
|
-
return (0, __alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_reflection.ReflectionPropertyContext.Provider, {
|
|
48
|
-
value: property,
|
|
49
|
-
get children() {
|
|
50
|
-
return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc_reflection.TSDocReflectionProperty, {}), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.InterfaceMember, (0, __alloy_js_core_jsx_runtime.mergeProps)({
|
|
51
|
-
get name() {
|
|
52
|
-
return property.getNameAsString();
|
|
53
|
-
},
|
|
54
|
-
get readonly() {
|
|
55
|
-
return property.isReadonly();
|
|
56
|
-
},
|
|
57
|
-
get optional() {
|
|
58
|
-
return property.isOptional();
|
|
59
|
-
},
|
|
60
|
-
get nullish() {
|
|
61
|
-
return property.isNullable();
|
|
62
|
-
},
|
|
63
|
-
get type() {
|
|
64
|
-
return (0, __powerlines_deepkit_vendor_type.stringifyType)(property.getType());
|
|
65
|
-
}
|
|
66
|
-
}, rest))];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
//#endregion
|
|
72
|
-
exports.TypeScriptInterface = TypeScriptInterface;
|
|
73
|
-
exports.TypescriptInterfaceProperty = TypescriptInterfaceProperty;
|
|
8
|
+
exports.TypeScriptInterface = require_typescript_interface.TypeScriptInterface;
|
|
9
|
+
exports.TypescriptInterfaceProperty = require_typescript_interface.TypescriptInterfaceProperty;
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { InterfaceDeclarationProps, InterfaceMemberProps } from "@alloy-js/typescript";
|
|
4
|
-
import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
|
|
5
|
-
|
|
6
|
-
//#region src/typescript/components/typescript-interface.d.ts
|
|
7
|
-
interface TypeScriptInterfaceProps<T extends Record<string, any> = Record<string, any>> extends InterfaceDeclarationProps, ComponentProps {
|
|
8
|
-
reflection: ReflectionClass<T>;
|
|
9
|
-
defaultValue?: Partial<T>;
|
|
10
|
-
}
|
|
11
|
-
interface TypescriptInterfacePropertyProps extends Omit<InterfaceMemberProps, "name">, ComponentProps {
|
|
12
|
-
property: ReflectionProperty;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generates a TypeScript interface for the given reflection class.
|
|
16
|
-
*/
|
|
17
|
-
declare function TypeScriptInterface<T extends Record<string, any> = Record<string, any>>(props: TypeScriptInterfaceProps<T>): _alloy_js_core13.Children;
|
|
18
|
-
/**
|
|
19
|
-
* Generates a TypeScript interface property for the given reflection class.
|
|
20
|
-
*/
|
|
21
|
-
declare function TypescriptInterfaceProperty(props: TypescriptInterfacePropertyProps): _alloy_js_core13.Children;
|
|
22
|
-
declare type __ΩTypeScriptInterfaceProps = any[];
|
|
23
|
-
declare type __ΩTypescriptInterfacePropertyProps = any[];
|
|
24
|
-
//#endregion
|
|
1
|
+
import "../../components-IRVnipN0.cjs";
|
|
2
|
+
import { a as __ΩTypeScriptInterfaceProps, i as TypescriptInterfacePropertyProps, n as TypeScriptInterfaceProps, o as __ΩTypescriptInterfacePropertyProps, r as TypescriptInterfaceProperty, t as TypeScriptInterface } from "../../typescript-interface-D-d9A720.cjs";
|
|
25
3
|
export { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps };
|