@velastack/patterns 0.13.0 → 0.13.2
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/chunks/{_layout-DQhSAhfF.js → _layout-xBzFhszN.js} +36 -20
- package/dist/chunks/_layout-xBzFhszN.js.map +1 -0
- package/dist/chunks/{_page-C7kGoW7_.js → _page-44USwLXO.js} +2 -3
- package/dist/chunks/{_page-C7kGoW7_.js.map → _page-44USwLXO.js.map} +1 -1
- package/dist/chunks/{_page-DoPdZgZv.js → _page-Bt37d4uo.js} +2 -3
- package/dist/chunks/_page-Bt37d4uo.js.map +1 -0
- package/dist/chunks/{_page-B6yd6_Vl.js → _page-DcbEFpyw.js} +2 -3
- package/dist/chunks/_page-DcbEFpyw.js.map +1 -0
- package/dist/chunks/{auth-pages-jsyDV1GR.js → auth-pages-BW3_yluN.js} +6 -9
- package/dist/chunks/{auth-pages-jsyDV1GR.js.map → auth-pages-BW3_yluN.js.map} +1 -1
- package/dist/chunks/{collections-DZOuRpvS.js → collections-CFW9ZqUE.js} +5 -7
- package/dist/chunks/{collections-DZOuRpvS.js.map → collections-CFW9ZqUE.js.map} +1 -1
- package/dist/chunks/{collections-zEoRuILr.js → collections-D-xbHi4M.js} +39 -45
- package/dist/chunks/{collections-zEoRuILr.js.map → collections-D-xbHi4M.js.map} +1 -1
- package/dist/chunks/{compose-handle-BBlamPfx.js → compose-handle-Da7m6lV_.js} +3 -4
- package/dist/chunks/{compose-handle-BBlamPfx.js.map → compose-handle-Da7m6lV_.js.map} +1 -1
- package/dist/chunks/{config-target-BgyFkbFL.js → config-target-DJbVHwHl.js} +3 -4
- package/dist/chunks/{config-target-BgyFkbFL.js.map → config-target-DJbVHwHl.js.map} +1 -1
- package/dist/chunks/{constants-CUv536Rj.js → constants-DpK-r_m5.js} +2 -4
- package/dist/chunks/{constants-CUv536Rj.js.map → constants-DpK-r_m5.js.map} +1 -1
- package/dist/chunks/{currency.server-DygAf6a1.js → currency.server-BwuXG0a9.js} +9 -11
- package/dist/chunks/{currency.server-DygAf6a1.js.map → currency.server-BwuXG0a9.js.map} +1 -1
- package/dist/chunks/{dedent-Gq6Krl4n.js → dedent-CCUOcPFW.js} +2 -3
- package/dist/chunks/{dedent-Gq6Krl4n.js.map → dedent-CCUOcPFW.js.map} +1 -1
- package/dist/chunks/{dispatch-BIvOwbKN.js → dispatch-BxlKS_5v.js} +2 -3
- package/dist/chunks/{dispatch-BIvOwbKN.js.map → dispatch-BxlKS_5v.js.map} +1 -1
- package/dist/chunks/{env-BugddEjd.js → env-AxyRWcC_.js} +2 -3
- package/dist/chunks/{env-BugddEjd.js.map → env-AxyRWcC_.js.map} +1 -1
- package/dist/chunks/{env-vars-mnRA0hOe.js → env-vars-CUh4mLM_.js} +2 -3
- package/dist/chunks/{env-vars-mnRA0hOe.js.map → env-vars-CUh4mLM_.js.map} +1 -1
- package/dist/chunks/{env-vars-XvAeH6u5.js → env-vars-CVn2076k.js} +58 -59
- package/dist/chunks/{env-vars-XvAeH6u5.js.map → env-vars-CVn2076k.js.map} +1 -1
- package/dist/chunks/{env-vars-Cr4lbMD_.js → env-vars-T3_7JNSg.js} +3 -4
- package/dist/chunks/{env-vars-Cr4lbMD_.js.map → env-vars-T3_7JNSg.js.map} +1 -1
- package/dist/chunks/{env-vars-file-B_6esJW3.js → env-vars-file-B2zHQZqO.js} +2 -3
- package/dist/chunks/{env-vars-file-B_6esJW3.js.map → env-vars-file-B2zHQZqO.js.map} +1 -1
- package/dist/chunks/{env.preview-uMRKT5Pc.js → env.preview-C676UTOP.js} +2 -3
- package/dist/chunks/{env.preview-uMRKT5Pc.js.map → env.preview-C676UTOP.js.map} +1 -1
- package/dist/chunks/{errors-DR3gF_7a.js → errors-DdSUZI8f.js} +2 -3
- package/dist/chunks/{errors-DR3gF_7a.js.map → errors-DdSUZI8f.js.map} +1 -1
- package/dist/chunks/{format-result-BVoLVknk.js → format-result-CojavkIZ.js} +2 -3
- package/dist/chunks/{format-result-BVoLVknk.js.map → format-result-CojavkIZ.js.map} +1 -1
- package/dist/chunks/{generate-Cbg-Z3sA.js → generate-BCYvhyF9.js} +62 -63
- package/dist/chunks/{generate-Cbg-Z3sA.js.map → generate-BCYvhyF9.js.map} +1 -1
- package/dist/chunks/{generate-DyV5R8NP.js → generate-CKuUg3p-.js} +3 -4
- package/dist/chunks/{generate-DyV5R8NP.js.map → generate-CKuUg3p-.js.map} +1 -1
- package/dist/chunks/{generate-DjuhSibA.js → generate-CY_Ii_bz.js} +61 -64
- package/dist/chunks/{generate-DjuhSibA.js.map → generate-CY_Ii_bz.js.map} +1 -1
- package/dist/chunks/generate-CuOm66dn.js +57 -0
- package/dist/chunks/{generate-BtWZCvuO.js.map → generate-CuOm66dn.js.map} +1 -1
- package/dist/chunks/{generate-BrOPb9tW.js → generate-DYq5Oj58.js} +3 -4
- package/dist/chunks/{generate-BrOPb9tW.js.map → generate-DYq5Oj58.js.map} +1 -1
- package/dist/chunks/{generate-Crdzw45a.js → generate-F4FDWvFo.js} +13 -14
- package/dist/chunks/{generate-Crdzw45a.js.map → generate-F4FDWvFo.js.map} +1 -1
- package/dist/chunks/{generate-DgZhFNjO.js → generate-oZ1QeqPr.js} +17 -19
- package/dist/chunks/{generate-DgZhFNjO.js.map → generate-oZ1QeqPr.js.map} +1 -1
- package/dist/chunks/{generate.runtime-ByC9kOl2.js → generate.runtime-22jW8aVT.js} +37 -41
- package/dist/chunks/{generate.runtime-ByC9kOl2.js.map → generate.runtime-22jW8aVT.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BfQlxsWK.js → generate.runtime-B06rPt_j.js} +103 -108
- package/dist/chunks/{generate.runtime-BfQlxsWK.js.map → generate.runtime-B06rPt_j.js.map} +1 -1
- package/dist/chunks/{generate.runtime-s9ai7PxV.js → generate.runtime-B6FeCL5I.js} +85 -90
- package/dist/chunks/{generate.runtime-s9ai7PxV.js.map → generate.runtime-B6FeCL5I.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DzCVGruq.js → generate.runtime-BgGeOqYG.js} +19 -21
- package/dist/chunks/{generate.runtime-DzCVGruq.js.map → generate.runtime-BgGeOqYG.js.map} +1 -1
- package/dist/chunks/{generate.runtime-USnFqTbU.js → generate.runtime-Bv_16lWi.js} +94 -99
- package/dist/chunks/{generate.runtime-USnFqTbU.js.map → generate.runtime-Bv_16lWi.js.map} +1 -1
- package/dist/chunks/generate.runtime-Bz9z0VPR.js +108 -0
- package/dist/chunks/{generate.runtime-DVUj1LJK.js.map → generate.runtime-Bz9z0VPR.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CHaE6Mm9.js → generate.runtime-C37djibw.js} +25 -27
- package/dist/chunks/{generate.runtime-CHaE6Mm9.js.map → generate.runtime-C37djibw.js.map} +1 -1
- package/dist/chunks/{generate.runtime-BsjcGBme.js → generate.runtime-CM3bj0nP.js} +12 -14
- package/dist/chunks/{generate.runtime-BsjcGBme.js.map → generate.runtime-CM3bj0nP.js.map} +1 -1
- package/dist/chunks/generate.runtime-CMuxVUIY.js +46 -0
- package/dist/chunks/{generate.runtime-BfM3dX_R.js.map → generate.runtime-CMuxVUIY.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DRZDjZqw.js → generate.runtime-CVqPHddZ.js} +44 -46
- package/dist/chunks/generate.runtime-CVqPHddZ.js.map +1 -0
- package/dist/chunks/{generate.runtime-CEd3qCtW.js → generate.runtime-C_SdcnRs.js} +44 -47
- package/dist/chunks/generate.runtime-C_SdcnRs.js.map +1 -0
- package/dist/chunks/generate.runtime-Cco2mFW2.js +63 -0
- package/dist/chunks/{generate.runtime-taYl9Tg5.js.map → generate.runtime-Cco2mFW2.js.map} +1 -1
- package/dist/chunks/generate.runtime-Cg-dfN9B.js +48 -0
- package/dist/chunks/{generate.runtime-TKR-qAJM.js.map → generate.runtime-Cg-dfN9B.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DqYYJXAz.js → generate.runtime-CjqX4tDg.js} +5 -6
- package/dist/chunks/{generate.runtime-DqYYJXAz.js.map → generate.runtime-CjqX4tDg.js.map} +1 -1
- package/dist/chunks/generate.runtime-Cry-DBNl.js +111 -0
- package/dist/chunks/{generate.runtime-2GD2E1NK.js.map → generate.runtime-Cry-DBNl.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DGmpjkRe.js → generate.runtime-Ct7cG8va.js} +76 -79
- package/dist/chunks/generate.runtime-Ct7cG8va.js.map +1 -0
- package/dist/chunks/generate.runtime-Cxg1b_BK.js +63 -0
- package/dist/chunks/{generate.runtime-CXGiQWDK.js.map → generate.runtime-Cxg1b_BK.js.map} +1 -1
- package/dist/chunks/{generate.runtime-4TxcYKld.js → generate.runtime-CyWuhV6m.js} +16 -18
- package/dist/chunks/{generate.runtime-4TxcYKld.js.map → generate.runtime-CyWuhV6m.js.map} +1 -1
- package/dist/chunks/generate.runtime-CzYArKUA.js +42 -0
- package/dist/chunks/{generate.runtime-g6qaIY3k.js.map → generate.runtime-CzYArKUA.js.map} +1 -1
- package/dist/chunks/{generate.runtime-C_5Ghjri.js → generate.runtime-D769VJFt.js} +3 -4
- package/dist/chunks/{generate.runtime-C_5Ghjri.js.map → generate.runtime-D769VJFt.js.map} +1 -1
- package/dist/chunks/{generate.runtime-C9yduilW.js → generate.runtime-DICcLOts.js} +19 -22
- package/dist/chunks/{generate.runtime-C9yduilW.js.map → generate.runtime-DICcLOts.js.map} +1 -1
- package/dist/chunks/generate.runtime-DLg2CKxQ.js +341 -0
- package/dist/chunks/generate.runtime-DLg2CKxQ.js.map +1 -0
- package/dist/chunks/{generate.runtime-C2pIioyZ.js → generate.runtime-DaPA2NNL.js} +47 -50
- package/dist/chunks/{generate.runtime-C2pIioyZ.js.map → generate.runtime-DaPA2NNL.js.map} +1 -1
- package/dist/chunks/{generate.runtime-B2DI0x05.js → generate.runtime-DfHFd8xs.js} +36 -44
- package/dist/chunks/{generate.runtime-B2DI0x05.js.map → generate.runtime-DfHFd8xs.js.map} +1 -1
- package/dist/chunks/generate.runtime-Dfl-07VS.js +428 -0
- package/dist/chunks/generate.runtime-Dfl-07VS.js.map +1 -0
- package/dist/chunks/{generate.runtime-BO1KyRcJ.js → generate.runtime-DhNspd-h.js} +64 -76
- package/dist/chunks/generate.runtime-DhNspd-h.js.map +1 -0
- package/dist/chunks/{generate.runtime-BPVZsAL0.js → generate.runtime-DkS7CBmK.js} +8 -10
- package/dist/chunks/{generate.runtime-BPVZsAL0.js.map → generate.runtime-DkS7CBmK.js.map} +1 -1
- package/dist/chunks/generate.runtime-Dtae524O.js +34 -0
- package/dist/chunks/{generate.runtime-Du8puIJQ.js.map → generate.runtime-Dtae524O.js.map} +1 -1
- package/dist/chunks/{generate.runtime-CvtSK0E1.js → generate.runtime-EB8vpc7D.js} +57 -66
- package/dist/chunks/{generate.runtime-CvtSK0E1.js.map → generate.runtime-EB8vpc7D.js.map} +1 -1
- package/dist/chunks/{generate.runtime-UrLaWKvN.js → generate.runtime-TCVlsBbJ.js} +7 -8
- package/dist/chunks/{generate.runtime-UrLaWKvN.js.map → generate.runtime-TCVlsBbJ.js.map} +1 -1
- package/dist/chunks/{generate.runtime-B8y_l-6N.js → generate.runtime-YFyuyFhh.js} +108 -132
- package/dist/chunks/generate.runtime-YFyuyFhh.js.map +1 -0
- package/dist/chunks/{generate.runtime-bWGwyz2U.js → generate.runtime-cYh0CQ5d.js} +36 -41
- package/dist/chunks/{generate.runtime-bWGwyz2U.js.map → generate.runtime-cYh0CQ5d.js.map} +1 -1
- package/dist/chunks/generate.runtime-erWI6j7m.js +64 -0
- package/dist/chunks/{generate.runtime-B-WOQsda.js.map → generate.runtime-erWI6j7m.js.map} +1 -1
- package/dist/chunks/{generate.runtime-DI73x08q.js → generate.runtime-hq8xt0m_.js} +21 -23
- package/dist/chunks/generate.runtime-hq8xt0m_.js.map +1 -0
- package/dist/chunks/{generate.runtime-C4hyve9h.js → generate.runtime-i3tMIA1A.js} +85 -108
- package/dist/chunks/{generate.runtime-C4hyve9h.js.map → generate.runtime-i3tMIA1A.js.map} +1 -1
- package/dist/chunks/generate.runtime-j_5K3Uue.js +120 -0
- package/dist/chunks/generate.runtime-j_5K3Uue.js.map +1 -0
- package/dist/chunks/{generate.runtime-BEvi6bml.js → generate.runtime-mE0knt2T.js} +34 -38
- package/dist/chunks/{generate.runtime-BEvi6bml.js.map → generate.runtime-mE0knt2T.js.map} +1 -1
- package/dist/chunks/{layout.svelte-Cb12mxua.js → layout.svelte-B6wOQ7SM.js} +10 -11
- package/dist/chunks/{layout.svelte-Cb12mxua.js.map → layout.svelte-B6wOQ7SM.js.map} +1 -1
- package/dist/chunks/{lib-specifier-Cngo1zF_.js → lib-specifier-C3M0WTev.js} +2 -3
- package/dist/chunks/{lib-specifier-Cngo1zF_.js.map → lib-specifier-C3M0WTev.js.map} +1 -1
- package/dist/chunks/{load-function-Dmkhg1pQ.js → load-function-BFvIVsh7.js} +3 -4
- package/dist/chunks/{load-function-Dmkhg1pQ.js.map → load-function-BFvIVsh7.js.map} +1 -1
- package/dist/chunks/{logger-CQONztPm.js → logger-t1HxmpG2.js} +2 -3
- package/dist/chunks/{logger-CQONztPm.js.map → logger-t1HxmpG2.js.map} +1 -1
- package/dist/chunks/{modify-file-D9U2LXEa.js → modify-file-CRZ_gMg0.js} +7 -10
- package/dist/chunks/{modify-file-D9U2LXEa.js.map → modify-file-CRZ_gMg0.js.map} +1 -1
- package/dist/chunks/{modify-nav-user-CJ1LevSU.js → modify-nav-user--7OwY9fI.js} +7 -16
- package/dist/chunks/{modify-nav-user-CJ1LevSU.js.map → modify-nav-user--7OwY9fI.js.map} +1 -1
- package/dist/chunks/{modify-nav-user-iUpv2lm-.js → modify-nav-user-D42kWyU6.js} +8 -14
- package/dist/chunks/{modify-nav-user-iUpv2lm-.js.map → modify-nav-user-D42kWyU6.js.map} +1 -1
- package/dist/chunks/modify-svelte-config-remote-wE5K2bU_.js +20 -0
- package/dist/chunks/{modify-svelte-config-remote-CEyYydL7.js.map → modify-svelte-config-remote-wE5K2bU_.js.map} +1 -1
- package/dist/chunks/{modify-user-signup-DLtopazD.js → modify-user-signup-ENhadGKH.js} +5 -6
- package/dist/chunks/{modify-user-signup-DLtopazD.js.map → modify-user-signup-ENhadGKH.js.map} +1 -1
- package/dist/chunks/{modify-utils-Cw-on_cL.js → modify-utils--zro3IGe.js} +3 -4
- package/dist/chunks/{modify-utils-Cw-on_cL.js.map → modify-utils--zro3IGe.js.map} +1 -1
- package/dist/chunks/{package-imports-B9Asv3ZH.js → package-imports-CcIIHbp5.js} +3 -4
- package/dist/chunks/{package-imports-B9Asv3ZH.js.map → package-imports-CcIIHbp5.js.map} +1 -1
- package/dist/chunks/{pocketbase-C5GS-Dh5.js → pocketbase-CvsJYXj-.js} +2 -3
- package/dist/chunks/{pocketbase-C5GS-Dh5.js.map → pocketbase-CvsJYXj-.js.map} +1 -1
- package/dist/chunks/{pocketbase-DpudAAmd.js → pocketbase-YG9yht8R.js} +2 -3
- package/dist/chunks/{pocketbase-DpudAAmd.js.map → pocketbase-YG9yht8R.js.map} +1 -1
- package/dist/chunks/{pocketbase-BTR3gI8o.js → pocketbase-gUn2UrDd.js} +6 -14
- package/dist/chunks/{pocketbase-BTR3gI8o.js.map → pocketbase-gUn2UrDd.js.map} +1 -1
- package/dist/chunks/{providers-CpRRQdMg.js → providers-BB3Z2TrN.js} +4 -5
- package/dist/chunks/{providers-CpRRQdMg.js.map → providers-BB3Z2TrN.js.map} +1 -1
- package/dist/chunks/{providers-CL9kQ4hp.js → providers-tjlFH5di.js} +4 -5
- package/dist/chunks/{providers-CL9kQ4hp.js.map → providers-tjlFH5di.js.map} +1 -1
- package/dist/chunks/{rolldown-runtime-5HNE8Q1r.js → rolldown-runtime-CwxnZyOB.js} +1 -2
- package/dist/chunks/{root-layout.svelte-CUVbnlX-.js → root-layout.svelte-DE0c_y-T.js} +12 -16
- package/dist/chunks/{root-layout.svelte-CUVbnlX-.js.map → root-layout.svelte-DE0c_y-T.js.map} +1 -1
- package/dist/chunks/{shared-CAjLx_8Z.js → shared-DE-J_b1j.js} +4 -5
- package/dist/chunks/{shared-CAjLx_8Z.js.map → shared-DE-J_b1j.js.map} +1 -1
- package/dist/chunks/{site-D0IuWkAR.js → site-B9hDxucR.js} +11 -12
- package/dist/chunks/{site-D0IuWkAR.js.map → site-B9hDxucR.js.map} +1 -1
- package/dist/chunks/{stripe-customer-B3tP8gtD.js → stripe-customer-5S-nOXP1.js} +2 -3
- package/dist/chunks/stripe-customer-5S-nOXP1.js.map +1 -0
- package/dist/chunks/{svelte-file-Dv5-bl79.js → svelte-file-DfplF3BU.js} +2 -3
- package/dist/chunks/{svelte-file-Dv5-bl79.js.map → svelte-file-DfplF3BU.js.map} +1 -1
- package/dist/chunks/{table-core-BKBoEStB.js → table-core-BXmnfjln.js} +26 -33
- package/dist/chunks/{table-core-BKBoEStB.js.map → table-core-BXmnfjln.js.map} +1 -1
- package/dist/chunks/{taggedTemplateLiteral-KSUnuvOk.js → taggedTemplateLiteral-CLenToGE.js} +1 -2
- package/dist/chunks/test-setup-cZj1tqaf.js +176 -0
- package/dist/chunks/test-setup-cZj1tqaf.js.map +1 -0
- package/dist/chunks/{ts-morph-helpers-CHI9wAil.js → ts-morph-helpers-B4KZXP44.js} +2 -3
- package/dist/chunks/{ts-morph-helpers-CHI9wAil.js.map → ts-morph-helpers-B4KZXP44.js.map} +1 -1
- package/dist/chunks/{ui-DD4NltyN.js → ui-D5xgIDR_.js} +3 -4
- package/dist/chunks/{ui-DD4NltyN.js.map → ui-D5xgIDR_.js.map} +1 -1
- package/dist/chunks/{ui-B3Db8cQg.js → ui-IkdkLwmB.js} +53 -55
- package/dist/chunks/{ui-B3Db8cQg.js.map → ui-IkdkLwmB.js.map} +1 -1
- package/dist/chunks/{unmodify-load-Buak-r1f.js → unmodify-load-CdWXJ_Ac.js} +3 -4
- package/dist/chunks/{unmodify-load-Buak-r1f.js.map → unmodify-load-CdWXJ_Ac.js.map} +1 -1
- package/dist/chunks/{util-BLYliuUK.js → util-ILWdjRAd.js} +2 -3
- package/dist/chunks/{util-BLYliuUK.js.map → util-ILWdjRAd.js.map} +1 -1
- package/dist/chunks/{whatsapp-Pya8Zi07.js → whatsapp-Bt4o4_q2.js} +3 -4
- package/dist/chunks/{whatsapp-Pya8Zi07.js.map → whatsapp-Bt4o4_q2.js.map} +1 -1
- package/dist/chunks/write-result-C1GYInL8.js +499 -0
- package/dist/chunks/write-result-C1GYInL8.js.map +1 -0
- package/dist/chunks/{wuchale-config-c3Q4JVSF.js → wuchale-config-CNXoq4rc.js} +2 -3
- package/dist/chunks/{wuchale-config-c3Q4JVSF.js.map → wuchale-config-CNXoq4rc.js.map} +1 -1
- package/dist/index.js +1497 -1581
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/_layout-DQhSAhfF.js.map +0 -1
- package/dist/chunks/_page-B6yd6_Vl.js.map +0 -1
- package/dist/chunks/_page-DoPdZgZv.js.map +0 -1
- package/dist/chunks/generate-BtWZCvuO.js +0 -58
- package/dist/chunks/generate.runtime-2GD2E1NK.js +0 -114
- package/dist/chunks/generate.runtime-7sU7RzIA.js +0 -483
- package/dist/chunks/generate.runtime-7sU7RzIA.js.map +0 -1
- package/dist/chunks/generate.runtime-B-WOQsda.js +0 -67
- package/dist/chunks/generate.runtime-B8y_l-6N.js.map +0 -1
- package/dist/chunks/generate.runtime-BO1KyRcJ.js.map +0 -1
- package/dist/chunks/generate.runtime-BfM3dX_R.js +0 -48
- package/dist/chunks/generate.runtime-CEd3qCtW.js.map +0 -1
- package/dist/chunks/generate.runtime-CXGiQWDK.js +0 -64
- package/dist/chunks/generate.runtime-DGmpjkRe.js.map +0 -1
- package/dist/chunks/generate.runtime-DI73x08q.js.map +0 -1
- package/dist/chunks/generate.runtime-DIkM5xIB.js +0 -326
- package/dist/chunks/generate.runtime-DIkM5xIB.js.map +0 -1
- package/dist/chunks/generate.runtime-DRZDjZqw.js.map +0 -1
- package/dist/chunks/generate.runtime-DVUj1LJK.js +0 -112
- package/dist/chunks/generate.runtime-Deg1Tz9u.js +0 -124
- package/dist/chunks/generate.runtime-Deg1Tz9u.js.map +0 -1
- package/dist/chunks/generate.runtime-Du8puIJQ.js +0 -35
- package/dist/chunks/generate.runtime-TKR-qAJM.js +0 -50
- package/dist/chunks/generate.runtime-g6qaIY3k.js +0 -43
- package/dist/chunks/generate.runtime-taYl9Tg5.js +0 -65
- package/dist/chunks/modify-svelte-config-remote-CEyYydL7.js +0 -42
- package/dist/chunks/stripe-customer-B3tP8gtD.js.map +0 -1
- package/dist/chunks/test-setup-CbCXmPkE.js +0 -179
- package/dist/chunks/test-setup-CbCXmPkE.js.map +0 -1
- package/dist/chunks/write-result-BWXq9RRn.js +0 -499
- package/dist/chunks/write-result-BWXq9RRn.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import { n } from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { r as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { n as e } from "./logger-t1HxmpG2.js";
|
|
2
|
+
import { r as t } from "./modify-file-CRZ_gMg0.js";
|
|
3
|
+
import { c as n, i as r, n as i, o as a, r as o, t as s } from "./test-setup-cZj1tqaf.js";
|
|
4
|
+
import { a as c } from "./util-ILWdjRAd.js";
|
|
5
|
+
import { t as l } from "./dedent-CCUOcPFW.js";
|
|
6
|
+
import { r as u } from "./compose-handle-Da7m6lV_.js";
|
|
7
|
+
import { c as d, i as f, n as p, o as m } from "./ts-morph-helpers-B4KZXP44.js";
|
|
8
|
+
import { modifyEnvVarsFiles as h } from "./env-vars-CVn2076k.js";
|
|
9
|
+
import { t as g } from "./env-vars-CUh4mLM_.js";
|
|
10
10
|
import _ from "node:fs";
|
|
11
11
|
import v from "node:path";
|
|
12
12
|
import { Node as y, Project as b, QuoteKind as x } from "ts-morph";
|
|
13
|
-
|
|
13
|
+
// src/patterns/enable/backend/modifies/tsconfig.ts
|
|
14
14
|
var S = ".svelte-kit/types/pocketbase/*.d.ts", C = [
|
|
15
15
|
"ts",
|
|
16
16
|
"mts",
|
|
@@ -63,19 +63,18 @@ function w(e) {
|
|
|
63
63
|
changed: !0
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
//#region src/patterns/enable/backend/modifies/hooks.server.ts
|
|
66
|
+
// src/patterns/enable/backend/modifies/hooks.server.ts
|
|
68
67
|
var T = [
|
|
69
68
|
"POCKETBASE_URL",
|
|
70
69
|
"POCKETBASE_SUPERUSER_EMAIL",
|
|
71
70
|
"POCKETBASE_SUPERUSER_PASSWORD"
|
|
72
|
-
], E =
|
|
71
|
+
], E = l`
|
|
73
72
|
handlePocketbase({
|
|
74
73
|
pocketbaseUrl: POCKETBASE_URL,
|
|
75
74
|
superuserEmail: POCKETBASE_SUPERUSER_EMAIL,
|
|
76
75
|
superuserPassword: POCKETBASE_SUPERUSER_PASSWORD
|
|
77
76
|
})
|
|
78
|
-
`, D =
|
|
77
|
+
`, D = l`
|
|
79
78
|
Add the PocketBase handle to the exported handle in src/hooks.server.ts:
|
|
80
79
|
|
|
81
80
|
import { sequence } from '@sveltejs/kit/hooks';
|
|
@@ -112,44 +111,43 @@ function O(e) {
|
|
|
112
111
|
status: "success",
|
|
113
112
|
changed: !1
|
|
114
113
|
};
|
|
115
|
-
let
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
for (let e of T)
|
|
119
|
-
return
|
|
114
|
+
let i = r.statement;
|
|
115
|
+
if (i && y.isJSDocable(i)) for (let e of i.getJsDocs()) e.getText().includes("vela legal") && e.remove();
|
|
116
|
+
d(n, ["@velastack/kit"]);
|
|
117
|
+
for (let e of T) f(n, "$app/env/private", e);
|
|
118
|
+
return f(n, "@velastack/pocketbase", "handlePocketbase"), m(n), p(n), n.saveSync(), {
|
|
120
119
|
status: "success",
|
|
121
120
|
changed: n.getFullText() !== t
|
|
122
121
|
};
|
|
123
122
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
content: n,
|
|
123
|
+
// src/patterns/enable/backend/generate.runtime.ts
|
|
124
|
+
async function k(l) {
|
|
125
|
+
let u = e(l), d = [], f = [], p = (e, t) => f.push({
|
|
126
|
+
path: e,
|
|
127
|
+
language: c(e),
|
|
128
|
+
content: t,
|
|
131
129
|
status: "success"
|
|
132
130
|
});
|
|
133
|
-
|
|
134
|
-
let
|
|
135
|
-
y &&
|
|
136
|
-
let b = v.join(
|
|
137
|
-
x && (
|
|
138
|
-
let S = l
|
|
139
|
-
S.create &&
|
|
140
|
-
let C = v.join(
|
|
141
|
-
T &&
|
|
142
|
-
let E = v.join(
|
|
131
|
+
u.info("Modifying adapter config");
|
|
132
|
+
let m = n(l.root), y = t(m.filePath, m.outcome);
|
|
133
|
+
y && d.push(y);
|
|
134
|
+
let b = v.join(l.root, "src", "hooks.server.ts"), x = t(b, O(b));
|
|
135
|
+
x && (u.info("Modifying hooks.server.ts"), d.push(x)), u.info("Declaring the PocketBase variables in src/env.ts");
|
|
136
|
+
let S = h(l.root, g);
|
|
137
|
+
S.create && f.push(S.create), S.modify && d.push(S.modify), u.info("Modifying .gitignore");
|
|
138
|
+
let C = v.join(l.root, ".gitignore"), T = t(C, a(C));
|
|
139
|
+
T && d.push(T);
|
|
140
|
+
let E = v.join(l.root, "test", "setup.ts");
|
|
143
141
|
if (_.existsSync(E)) {
|
|
144
|
-
|
|
145
|
-
let e =
|
|
146
|
-
e &&
|
|
147
|
-
} else
|
|
148
|
-
|
|
149
|
-
let D = v.join(
|
|
150
|
-
return k && (
|
|
151
|
-
creates:
|
|
152
|
-
modifies:
|
|
142
|
+
u.info("Modifying test/setup.ts");
|
|
143
|
+
let e = t(E, r(E));
|
|
144
|
+
e && d.push(e);
|
|
145
|
+
} else u.info("Creating test/setup.ts"), p("test/setup.ts", i);
|
|
146
|
+
o(l.root) || (u.info("Creating vitest.config.ts"), p("vitest.config.ts", s));
|
|
147
|
+
let D = v.join(l.root, "tsconfig.json"), k = t(D, w(l.root));
|
|
148
|
+
return k && (u.info("Modifying tsconfig.json"), d.push(k)), {
|
|
149
|
+
creates: f,
|
|
150
|
+
modifies: d,
|
|
153
151
|
deletes: [],
|
|
154
152
|
components: [],
|
|
155
153
|
packages: [],
|
|
@@ -158,7 +156,6 @@ async function k(t) {
|
|
|
158
156
|
collectionDrops: []
|
|
159
157
|
};
|
|
160
158
|
}
|
|
161
|
-
//#endregion
|
|
162
159
|
export { k as generate };
|
|
163
160
|
|
|
164
|
-
//# sourceMappingURL=generate.runtime-
|
|
161
|
+
//# sourceMappingURL=generate.runtime-C_SdcnRs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.runtime-C_SdcnRs.js","names":["getLogger","modifyOutcomeToFile","modifySvelteConfig","modifyTestSetup","WITH_BACKEND","modifyGitignore","hasVitestConfig","VITEST_CONFIG","languageFromPath","dedent","replaceHandle","pruneUnusedImports","ensureNamedImport","ensureBlankLineAfterImports","formatLikeSource","BACKEND_ENV_VARS","fs","path","POCKETBASE_TYPES","VITEST_CONFIGS","ext","modifyTsconfigBackend","filePath","root","original","vitestConfig","name","wanted","config","entry","include","normalize","has","existing","next","insertAfter","index","after","i","indent","POCKETBASE_ENV_NAMES","POCKETBASE_HANDLE","FAILURE_HINT","modifyHooksServerBackend","hooksServerPath","sourceFile","Project","QuoteKind","composed","statement","Node","doc","generate","logger","options","modifies","creates","create","adapter","svelteConfigFile","hooksServerFile","envVars","modifyEnvVarsFiles","gitignorePath","gitignoreFile","testSetupPath","testSetupFile","tsconfigPath","tsconfigFile"],"sources":["../../src/patterns/enable/backend/modifies/tsconfig.ts","../../src/patterns/enable/backend/modifies/hooks.server.ts","../../src/patterns/enable/backend/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\n/** Where `vela sync` writes PocketBase's generated types (`Schemas`, the typed client). */\nexport const POCKETBASE_TYPES = \".svelte-kit/types/pocketbase/*.d.ts\";\n\nconst VITEST_CONFIGS = [\"ts\", \"mts\", \"js\", \"mjs\"].map(\n (ext) => `vitest.config.${ext}`,\n);\n\n/**\n * SvelteKit 3's `$app/tsconfig` lists no files: the project's own `include`\n * decides what is type-checked, and `sv create` writes `[\"src\",\n * \"vite.config.ts\"]`. A backend adds three things that have to be in it, as\n * they are in vela's minimal template: `test` (the server-test context that\n * every `server.test.ts` reads), the vitest config, and PocketBase's generated\n * types, without which `Schemas` is missing from `@velastack/pocketbase`.\n *\n * Entries already there stay, in their order. A tsconfig with no `include`\n * checks everything already; one that is not plain JSON (comments) is left\n * alone with the entries to add.\n */\nexport function modifyTsconfigBackend(root: string): ModifyOutcome {\n const filePath = path.join(root, \"tsconfig.json\");\n if (!fs.existsSync(filePath)) {\n return { status: \"success\", changed: false };\n }\n const original = fs.readFileSync(filePath, \"utf8\");\n const vitestConfig =\n VITEST_CONFIGS.find((name) => fs.existsSync(path.join(root, name))) ??\n \"vitest.config.ts\";\n const wanted = [\"test\", vitestConfig, POCKETBASE_TYPES];\n\n let config: Record<string, unknown>;\n try {\n config = JSON.parse(original) as Record<string, unknown>;\n } catch {\n return {\n status: \"failed\",\n message: `Add these to the \"include\" array of tsconfig.json: ${wanted\n .map((entry) => JSON.stringify(entry))\n .join(\", \")}`,\n };\n }\n const include = config.include;\n if (include === undefined) {\n return { status: \"success\", changed: false };\n }\n if (!Array.isArray(include)) {\n return {\n status: \"failed\",\n message: `tsconfig.json \"include\" is not an array; it needs ${wanted.join(\", \")}`,\n };\n }\n\n const normalize = (entry: unknown) =>\n typeof entry === \"string\" ? entry.replace(/^\\.\\//, \"\") : entry;\n const has = (entry: string) =>\n include.some((existing) => normalize(existing) === entry);\n const next = [...include] as unknown[];\n const insertAfter = (entry: string, after: (e: unknown) => boolean) => {\n if (has(entry)) return;\n let index = -1;\n next.forEach((e, i) => {\n if (after(e)) index = i;\n });\n next.splice(index === -1 ? next.length : index + 1, 0, entry);\n };\n insertAfter(\"test\", (e) => normalize(e) === \"src\");\n insertAfter(vitestConfig, (e) =>\n /^vite\\.config\\.[cm]?[jt]s$/.test(String(normalize(e))),\n );\n insertAfter(POCKETBASE_TYPES, () => false);\n\n if (next.length === include.length) {\n return { status: \"success\", changed: false };\n }\n config.include = next;\n const indent = original.match(/^\\{\\s*\\n([\\t ]+)/)?.[1] ?? \"\\t\";\n fs.writeFileSync(filePath, `${JSON.stringify(config, null, indent)}\\n`);\n return { status: \"success\", changed: true };\n}\n","import fs from \"node:fs\";\nimport dedent from \"dedent\";\nimport { Node, Project, QuoteKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { replaceHandle } from \"../../../../runtime/compose-handle\";\nimport {\n ensureBlankLineAfterImports,\n ensureNamedImport,\n pruneUnusedImports,\n formatLikeSource,\n} from \"../../../../runtime/ts-morph-helpers\";\n\n/** The variables the handle reads, imported from `$app/env/private`. */\nexport const POCKETBASE_ENV_NAMES = [\n \"POCKETBASE_URL\",\n \"POCKETBASE_SUPERUSER_EMAIL\",\n \"POCKETBASE_SUPERUSER_PASSWORD\",\n] as const;\n\n/** The handle `creates/src/hooks.server.ts` exports, for a file that already exists. */\nexport const POCKETBASE_HANDLE = dedent`\n handlePocketbase({\n \tpocketbaseUrl: POCKETBASE_URL,\n \tsuperuserEmail: POCKETBASE_SUPERUSER_EMAIL,\n \tsuperuserPassword: POCKETBASE_SUPERUSER_PASSWORD\n })\n`;\n\nconst FAILURE_HINT = dedent`\n Add the PocketBase handle to the exported handle in src/hooks.server.ts:\n\n import { sequence } from '@sveltejs/kit/hooks';\n import {\n \tPOCKETBASE_URL,\n \tPOCKETBASE_SUPERUSER_EMAIL,\n \tPOCKETBASE_SUPERUSER_PASSWORD\n } from '$app/env/private';\n import { handlePocketbase } from '@velastack/pocketbase';\n\n export const handle = sequence(\n \t/* your existing handle */,\n \t${POCKETBASE_HANDLE.replace(/\\n/g, \"\\n\\t\")}\n );\n`;\n\n/**\n * Compose the PocketBase handle into a `hooks.server.ts` the project already\n * has, instead of the create overwriting it: a static site's, or one i18n or\n * content negotiation wrote. It takes `handleStatic()`'s place, since\n * `handlePocketbase` does what that did and more; otherwise it goes last, so\n * the handles already there keep running first.\n */\nexport function modifyHooksServerBackend(\n hooksServerPath: string,\n): ModifyOutcome {\n if (!fs.existsSync(hooksServerPath)) {\n // The create writes it.\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(hooksServerPath, \"utf8\");\n const project = new Project({\n compilerOptions: { allowJs: true },\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(hooksServerPath);\n\n const composed = replaceHandle(sourceFile, \"handleStatic\", {\n expression: POCKETBASE_HANDLE,\n name: \"handlePocketbase\",\n position: \"last\",\n });\n if (composed.status === \"unsupported\") {\n return { status: \"failed\", message: FAILURE_HINT };\n }\n if (composed.status === \"unchanged\") {\n return { status: \"success\", changed: false };\n }\n\n // The static template's comment explains handleStatic(). Where that was the\n // whole handle, replaceHandle already dropped it; in a sequence (i18n or\n // negotiation composed in since) it is still there, describing a handle\n // that is gone.\n const statement = composed.statement;\n if (statement && Node.isJSDocable(statement)) {\n for (const doc of statement.getJsDocs()) {\n if (doc.getText().includes(\"vela legal\")) doc.remove();\n }\n }\n\n pruneUnusedImports(sourceFile, [\"@velastack/kit\"]);\n for (const name of POCKETBASE_ENV_NAMES) {\n ensureNamedImport(sourceFile, \"$app/env/private\", name);\n }\n ensureNamedImport(sourceFile, \"@velastack/pocketbase\", \"handlePocketbase\");\n\n formatLikeSource(sourceFile);\n ensureBlankLineAfterImports(sourceFile);\n sourceFile.saveSync();\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== original,\n };\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { modifySvelteConfig } from \"./modifies/svelte-config\";\nimport { modifyGitignore } from \"./modifies/gitignore\";\nimport { modifyTsconfigBackend } from \"./modifies/tsconfig\";\nimport { languageFromPath } from \"../../../core/util\";\nimport {\n hasVitestConfig,\n modifyTestSetup,\n VITEST_CONFIG,\n WITH_BACKEND,\n} from \"./modifies/test-setup\";\nimport { modifyHooksServerBackend } from \"./modifies/hooks.server\";\nimport { modifyEnvVarsFiles } from \"../../../runtime/env-vars\";\nimport { BACKEND_ENV_VARS } from \"./env-vars\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n const creates: File[] = [];\n const create = (filePath: string, content: string) =>\n creates.push({\n path: filePath,\n language: languageFromPath(filePath),\n content,\n status: \"success\",\n });\n\n logger.info(\"Modifying adapter config\");\n const adapter = modifySvelteConfig(options.root);\n const svelteConfigFile = modifyOutcomeToFile(\n adapter.filePath,\n adapter.outcome,\n );\n if (svelteConfigFile) modifies.push(svelteConfigFile);\n\n // A hooks.server.ts the project already has keeps its handles; the create\n // only writes the file where there is none (see `keepMissing` in index.ts).\n const hooksServerPath = path.join(options.root, \"src\", \"hooks.server.ts\");\n const hooksServerFile = modifyOutcomeToFile(\n hooksServerPath,\n modifyHooksServerBackend(hooksServerPath),\n );\n if (hooksServerFile) {\n logger.info(\"Modifying hooks.server.ts\");\n modifies.push(hooksServerFile);\n }\n\n // SvelteKit 3 exposes only declared variables: the handle above reads\n // these three from `$app/env/private`.\n logger.info(\"Declaring the PocketBase variables in src/env.ts\");\n const envVars = modifyEnvVarsFiles(options.root, BACKEND_ENV_VARS);\n if (envVars.create) creates.push(envVars.create);\n if (envVars.modify) modifies.push(envVars.modify);\n\n logger.info(\"Modifying .gitignore\");\n const gitignorePath = path.join(options.root, \".gitignore\");\n const gitignoreFile = modifyOutcomeToFile(\n gitignorePath,\n modifyGitignore(gitignorePath),\n );\n if (gitignoreFile) modifies.push(gitignoreFile);\n\n // A backend brings server tests with it. The static template and a project\n // vela did not create have no harness at all, so what is missing is created:\n // the setup file, and the vitest config that loads it.\n const testSetupPath = path.join(options.root, \"test\", \"setup.ts\");\n if (fs.existsSync(testSetupPath)) {\n logger.info(\"Modifying test/setup.ts\");\n const testSetupFile = modifyOutcomeToFile(\n testSetupPath,\n modifyTestSetup(testSetupPath),\n );\n if (testSetupFile) modifies.push(testSetupFile);\n } else {\n logger.info(\"Creating test/setup.ts\");\n create(\"test/setup.ts\", WITH_BACKEND);\n }\n\n if (!hasVitestConfig(options.root)) {\n logger.info(\"Creating vitest.config.ts\");\n create(\"vitest.config.ts\", VITEST_CONFIG);\n }\n\n // Kit 3's tsconfig lists no files, so the test harness and PocketBase's\n // generated types are type-checked only when the project's include names them.\n const tsconfigPath = path.join(options.root, \"tsconfig.json\");\n const tsconfigFile = modifyOutcomeToFile(\n tsconfigPath,\n modifyTsconfigBackend(options.root),\n );\n if (tsconfigFile) {\n logger.info(\"Modifying tsconfig.json\");\n modifies.push(tsconfigFile);\n }\n\n return {\n creates,\n modifies,\n deletes: [],\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;;;;;AAKA,IAAakB,IAAmB,uCAE1BC,IAAiB;CAAC;CAAM;CAAO;CAAM;AAAK,CAAC,CAAC,KAC/C,MAAQ,iBAAiBC,GAC5B;AAcA,SAAgBC,EAAsB,GAA6B;CACjE,IAAMC,IAAWL,EAAK,KAAKM,GAAM,eAAe;CAChD,IAAI,CAACP,EAAG,WAAWM,CAAQ,GACzB,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAE7C,IAAME,IAAWR,EAAG,aAAaM,GAAU,MAAM,GAC3CG,IACJN,EAAe,MAAM,MAASH,EAAG,WAAWC,EAAK,KAAKM,GAAMG,CAAI,CAAC,CAAC,KAClE,oBACIC,IAAS;EAAC;EAAQF;EAAcP;CAAgB,GAElDU;CACJ,IAAI;EACF,IAAS,KAAK,MAAM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AAM4D,IAAelD,EAAK,KAAKqC,EAAQ,MAAM,eAAe,GACtDc,IAAenE,EACnBkE,GACA9C,EAAsBiC,EAAQ,IAAI,CACpC;CAMA,OALIc,MACFf,EAAO,KAAK,yBAAyB,GACrCE,EAAS,KAAKa,CAAY,IAGrB;EACL;EACA;EACA,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { n as e } from "./logger-t1HxmpG2.js";
|
|
2
|
+
import { n as t } from "./env-AxyRWcC_.js";
|
|
3
|
+
import { r as n, t as r } from "./modify-file-CRZ_gMg0.js";
|
|
4
|
+
import { n as i, t as a } from "./generate-F4FDWvFo.js";
|
|
5
|
+
import { unmodifyEnvVarsFiles as o } from "./env-vars-CVn2076k.js";
|
|
6
|
+
import { t as s } from "./svelte-file-DfplF3BU.js";
|
|
7
|
+
import { _ as c, n as l, u } from "./ts-morph-helpers-B4KZXP44.js";
|
|
8
|
+
import { r as d } from "./lib-specifier-C3M0WTev.js";
|
|
9
|
+
import f from "node:fs";
|
|
10
|
+
import p from "node:path";
|
|
11
|
+
// src/patterns/disable/analytics/modifies/layout.svelte.ts
|
|
12
|
+
var m = "components/analytics/analytics.svelte";
|
|
13
|
+
function h(e) {
|
|
14
|
+
if (!f.existsSync(e)) return {
|
|
15
|
+
status: "success",
|
|
16
|
+
changed: !1
|
|
17
|
+
};
|
|
18
|
+
let t = f.readFileSync(e, "utf8");
|
|
19
|
+
if (!t.includes(m) && !t.includes("<Analytics")) return {
|
|
20
|
+
status: "success",
|
|
21
|
+
changed: !1
|
|
22
|
+
};
|
|
23
|
+
let n = s.fromPath(e);
|
|
24
|
+
n.modifyScript((e) => {
|
|
25
|
+
let { source: t } = c(e, (e) => {
|
|
26
|
+
u(e, d(m)), l(e);
|
|
27
|
+
});
|
|
28
|
+
return t;
|
|
29
|
+
});
|
|
30
|
+
let r = n.toString().replace(/[ \t]*<Analytics\s*\/>[ \t]*\r?\n?/g, "");
|
|
31
|
+
return r === t ? {
|
|
32
|
+
status: "success",
|
|
33
|
+
changed: !1
|
|
34
|
+
} : (f.writeFileSync(e, r, "utf8"), {
|
|
35
|
+
status: "success",
|
|
36
|
+
changed: !0
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// src/patterns/disable/analytics/generate.runtime.ts
|
|
40
|
+
async function g(s) {
|
|
41
|
+
let c = e(s), l = [], u = [], d = (e) => {
|
|
42
|
+
e && l.push(e);
|
|
43
|
+
};
|
|
44
|
+
c.info("Reverting src/routes/+layout.svelte");
|
|
45
|
+
let f = p.join(s.root, "src", "routes", "+layout.svelte");
|
|
46
|
+
d(n(f, h(f))), c.info("Removing analytics variables from src/env.ts");
|
|
47
|
+
let m = o(s.root, i());
|
|
48
|
+
d(m.modify), m.delete && u.push(m.delete), c.info("Removing analytics variables from .env");
|
|
49
|
+
let g = p.join(s.root, ".env"), _ = r(g, t(g, a()));
|
|
50
|
+
return d(_.modify), _.delete && u.push(_.delete), {
|
|
51
|
+
creates: [],
|
|
52
|
+
modifies: l,
|
|
53
|
+
deletes: u,
|
|
54
|
+
components: [],
|
|
55
|
+
packages: [],
|
|
56
|
+
collections: [],
|
|
57
|
+
collectionPatches: [],
|
|
58
|
+
collectionDrops: []
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export { g as generate };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=generate.runtime-Cco2mFW2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.runtime-
|
|
1
|
+
{"version":3,"file":"generate.runtime-Cco2mFW2.js","names":["getLogger","modifyEnvRemove","modifyOutcomeToFile","envRevertOutcomeToFile","allEnvNames","allEnvEdits","SvelteFile","withInMemoryScript","ensureBlankLineAfterImports","libModule","fs","path","MODULE","unmodifyLayoutSvelte","layoutPath","original","file","out","source","removeImportByModuleSpecifier","sf","updated","generate","logger","options","modifies","deletes","pushResult","envVars","unmodifyEnvVarsFiles","envPath","env"],"sources":["../../src/patterns/disable/analytics/modifies/layout.svelte.ts","../../src/patterns/disable/analytics/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport {\n ensureBlankLineAfterImports,\n removeImportByModuleSpecifier,\n withInMemoryScript,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport { libModule } from \"../../../../runtime/lib-specifier\";\n\nconst MODULE = \"components/analytics/analytics.svelte\";\n\n/**\n * Takes `<Analytics />` and its import back out of the root layout. The\n * element goes with its whole line, since enable-analytics put it on one of\n * its own. A layout without it, or no layout at all, is left alone.\n */\nexport function unmodifyLayoutSvelte(layoutPath: string): ModifyOutcome {\n if (!fs.existsSync(layoutPath)) {\n return { status: \"success\", changed: false };\n }\n\n const original = fs.readFileSync(layoutPath, \"utf8\");\n if (!original.includes(MODULE) && !original.includes(\"<Analytics\")) {\n return { status: \"success\", changed: false };\n }\n\n const file = SvelteFile.fromPath(layoutPath);\n file.modifyScript((source) => {\n const { source: out } = withInMemoryScript(source, (sf) => {\n removeImportByModuleSpecifier(sf, libModule(MODULE));\n ensureBlankLineAfterImports(sf);\n });\n return out;\n });\n\n const updated = file\n .toString()\n .replace(/[ \\t]*<Analytics\\s*\\/>[ \\t]*\\r?\\n?/g, \"\");\n\n if (updated === original) {\n return { status: \"success\", changed: false };\n }\n fs.writeFileSync(layoutPath, updated, \"utf8\");\n return { status: \"success\", changed: true };\n}\n","import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyEnvRemove } from \"../../../runtime/env\";\nimport {\n envRevertOutcomeToFile,\n modifyOutcomeToFile,\n} from \"../../../runtime/modify-file\";\nimport { allEnvEdits, allEnvNames } from \"./generate\";\nimport { unmodifyEnvVarsFiles } from \"../../../runtime/env-vars\";\nimport { unmodifyLayoutSvelte } from \"./modifies/layout.svelte\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n const deletes: File[] = [];\n const pushResult = (file: File | null) => {\n if (file) modifies.push(file);\n };\n\n logger.info(\"Reverting src/routes/+layout.svelte\");\n const layoutPath = path.join(options.root, \"src\", \"routes\", \"+layout.svelte\");\n pushResult(modifyOutcomeToFile(layoutPath, unmodifyLayoutSvelte(layoutPath)));\n\n // Which provider was chosen is not recorded, so every one's variables go;\n // the file goes too when these were all it declared.\n logger.info(\"Removing analytics variables from src/env.ts\");\n const envVars = unmodifyEnvVarsFiles(options.root, allEnvNames());\n pushResult(envVars.modify);\n if (envVars.delete) deletes.push(envVars.delete);\n\n logger.info(\"Removing analytics variables from .env\");\n const envPath = path.join(options.root, \".env\");\n const env = envRevertOutcomeToFile(\n envPath,\n modifyEnvRemove(envPath, allEnvEdits()),\n );\n pushResult(env.modify);\n if (env.delete) deletes.push(env.delete);\n\n return {\n creates: [],\n modifies,\n deletes,\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;;;AAUA,IAAMY,IAAS;AAOf,SAAgBC,EAAqB,GAAmC;CACtE,IAAI,CAACH,EAAG,WAAWI,CAAU,GAC3B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAWL,EAAG,aAAaI,GAAY,MAAM;CACnD,IAAI,CAACC,EAAS,SAASH,CAAM,KAAK,CAACG,EAAS,SAAS,YAAY,GAC/D,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAOV,EAAW,SAASQ,CAAU;CAC3C,EAAK,cAAc,MAAW;EAC5B,IAAM,EAAE,QAAQG,MAAQV,EAAmBW,IAAS,MAAO;GAEzD,AADAC,EAA8BC,GAAIX,EAAUG,CAAM,CAAC,GACnDJ,EAA4BY,CAAE;EAChC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import { t as n } from "./svelte-file-DfplF3BU.js";
|
|
4
|
+
import { _ as r, n as i, u as a } from "./ts-morph-helpers-B4KZXP44.js";
|
|
5
|
+
import { n as o, t as s } from "./layout.svelte-B6wOQ7SM.js";
|
|
6
|
+
import c from "node:fs";
|
|
7
|
+
import l from "node:path";
|
|
8
|
+
import { Node as u } from "ts-morph";
|
|
9
|
+
// src/patterns/disable/og/modifies/layout.svelte.ts
|
|
10
|
+
function d(e) {
|
|
11
|
+
if (!c.existsSync(e)) return {
|
|
12
|
+
status: "success",
|
|
13
|
+
changed: !1
|
|
14
|
+
};
|
|
15
|
+
let t = n.fromPath(e);
|
|
16
|
+
return t.getScript()?.content.includes("withCard") ? (t.modifyScript((e) => {
|
|
17
|
+
let { source: t } = r(e, (e) => {
|
|
18
|
+
let t = o(e)?.getArguments()[0];
|
|
19
|
+
t && u.isCallExpression(t) && t.getExpression().getText() === "withCard" && t.replaceWithText(t.getArguments()[0].getText()), a(e, s), i(e);
|
|
20
|
+
});
|
|
21
|
+
return t;
|
|
22
|
+
}), t.writeTo(e), {
|
|
23
|
+
status: "success",
|
|
24
|
+
changed: t.hasChanged()
|
|
25
|
+
}) : {
|
|
26
|
+
status: "success",
|
|
27
|
+
changed: !1
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
// src/patterns/disable/og/generate.runtime.ts
|
|
31
|
+
async function f(n) {
|
|
32
|
+
let r = e(n), i = [];
|
|
33
|
+
r.info("Reverting src/routes/+layout.svelte");
|
|
34
|
+
let a = l.join(n.root, "src", "routes", "+layout.svelte"), o = t(a, d(a));
|
|
35
|
+
return o && i.push(o), {
|
|
36
|
+
creates: [],
|
|
37
|
+
modifies: i,
|
|
38
|
+
deletes: [],
|
|
39
|
+
components: [],
|
|
40
|
+
packages: [],
|
|
41
|
+
collections: [],
|
|
42
|
+
collectionPatches: [],
|
|
43
|
+
collectionDrops: []
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export { f as generate };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=generate.runtime-Cg-dfN9B.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.runtime-
|
|
1
|
+
{"version":3,"file":"generate.runtime-Cg-dfN9B.js","names":["getLogger","modifyOutcomeToFile","SvelteFile","withInMemoryScript","ensureBlankLineAfterImports","removeImportByModuleSpecifier","findMetaTagsDerived","MODULE_SPECIFIER","fs","path","unmodifyLayoutSvelte","layoutPath","file","out","source","call","sf","Node","generate","logger","options","modifies"],"sources":["../../src/patterns/disable/og/modifies/layout.svelte.ts","../../src/patterns/disable/og/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport { Node } from \"ts-morph\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport {\n ensureBlankLineAfterImports,\n removeImportByModuleSpecifier,\n withInMemoryScript,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport {\n findMetaTagsDerived,\n MODULE_SPECIFIER,\n} from \"../../../enable/og/modifies/layout.svelte\";\n\n/**\n * Takes `withCard(..., page.url)` back off the root layout's `metaTags`, and\n * its import with it. `page` stays imported: the layout used it before.\n */\nexport function unmodifyLayoutSvelte(layoutPath: string): ModifyOutcome {\n if (!fs.existsSync(layoutPath)) {\n return { status: \"success\", changed: false };\n }\n\n const file = SvelteFile.fromPath(layoutPath);\n if (!file.getScript()?.content.includes(\"withCard\")) {\n return { status: \"success\", changed: false };\n }\n\n file.modifyScript((source) => {\n const { source: out } = withInMemoryScript(source, (sf) => {\n const call = findMetaTagsDerived(sf)?.getArguments()[0];\n if (\n call &&\n Node.isCallExpression(call) &&\n call.getExpression().getText() === \"withCard\"\n ) {\n call.replaceWithText(call.getArguments()[0].getText());\n }\n removeImportByModuleSpecifier(sf, MODULE_SPECIFIER);\n ensureBlankLineAfterImports(sf);\n });\n return out;\n });\n\n file.writeTo(layoutPath);\n return { status: \"success\", changed: file.hasChanged() };\n}\n","import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { unmodifyLayoutSvelte } from \"./modifies/layout.svelte\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n\n logger.info(\"Reverting src/routes/+layout.svelte\");\n const layoutPath = path.join(options.root, \"src\", \"routes\", \"+layout.svelte\");\n const file = modifyOutcomeToFile(\n layoutPath,\n unmodifyLayoutSvelte(layoutPath),\n );\n if (file) modifies.push(file);\n\n return {\n creates: [],\n modifies,\n deletes: [],\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAgBU,EAAqB,GAAmC;CACtE,IAAI,CAACF,EAAG,WAAWG,CAAU,GAC3B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAOV,EAAW,SAASS,CAAU;CAsB3C,OArBKC,EAAK,UAAU,CAAC,EAAE,QAAQ,SAAS,UAAU,KAIlDA,EAAK,cAAc,MAAW;EAC5B,IAAM,EAAE,QAAQC,MAAQV,EAAmBW,IAAS,MAAO;GACzD,IAAMC,IAAOT,EAAoBU,CAAE,CAAC,EAAE,aAAa,CAAC,CAAC;GASrD,AAPED,KACAE,EAAK,iBAAiBF,CAAI,KAC1BA,EAAK,cAAc,CAAC,CAAC,QAAQ,MAAM,cAEnCA,EAAK,gBAAgBA,EAAK,aAAa,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,GAEvDV,EAA8BW,GAAIT,CAAgB,GAClDH,EAA4BY,CAAE;EAChC,CAAC;EACD,OAAOH;CACT,CAAC,GAEDD,EAAK,QAAQD,CAAU,GAChB;EAAE,QAAQ;EAAW,SAASC,EAAK,WAAW;CAAE,KApB9C;EAAE,QAAQ;EAAW,SAAS;CAAM;AAqB/C;;ACxCA,eAAsBM,EAAS,GAAkB;CAC/C,IAAMC,IAASnB,EAAUoB,CAAO,GAC1BC,IAAmB,CAAC;CAE1B,EAAO,KAAK,qCAAqC;CACjD,IAAMV,IAAaF,EAAK,KAAKW,EAAQ,MAAM,OAAO,UAAU,gBAAgB,GACtER,IAAOX,EACXU,GACAD,EAAqBC,CAAU,CACjC;CAGA,OAFIC,KAAMS,EAAS,KAAKT,CAAI,GAErB;EACL,SAAS,CAAC;EACV;EACA,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as e } from "./logger-
|
|
2
|
-
import { r as t } from "./modify-file-
|
|
3
|
-
import { r as n } from "./layout.svelte-
|
|
1
|
+
import { n as e } from "./logger-t1HxmpG2.js";
|
|
2
|
+
import { r as t } from "./modify-file-CRZ_gMg0.js";
|
|
3
|
+
import { r as n } from "./layout.svelte-B6wOQ7SM.js";
|
|
4
4
|
import r from "node:path";
|
|
5
|
-
|
|
5
|
+
// src/patterns/enable/og/generate.runtime.ts
|
|
6
6
|
async function i(i) {
|
|
7
7
|
let a = e(i), o = [];
|
|
8
8
|
a.info("Modifying src/routes/+layout.svelte");
|
|
@@ -18,7 +18,6 @@ async function i(i) {
|
|
|
18
18
|
collectionDrops: []
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { i as generate };
|
|
23
22
|
|
|
24
|
-
//# sourceMappingURL=generate.runtime-
|
|
23
|
+
//# sourceMappingURL=generate.runtime-CjqX4tDg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.runtime-
|
|
1
|
+
{"version":3,"file":"generate.runtime-CjqX4tDg.js","names":["getLogger","modifyOutcomeToFile","modifyLayoutSvelte","path","generate","logger","options","modifies","layoutPath","file"],"sources":["../../src/patterns/enable/og/generate.runtime.ts"],"sourcesContent":["import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { modifyLayoutSvelte } from \"./modifies/layout.svelte\";\n\nexport async function generate(options: Options) {\n const logger = getLogger(options);\n const modifies: File[] = [];\n\n logger.info(\"Modifying src/routes/+layout.svelte\");\n const layoutPath = path.join(options.root, \"src\", \"routes\", \"+layout.svelte\");\n const file = modifyOutcomeToFile(layoutPath, modifyLayoutSvelte(layoutPath));\n if (file) modifies.push(file);\n\n return {\n creates: [],\n modifies,\n deletes: [],\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;AAMA,eAAsBI,EAAS,GAAkB;CAC/C,IAAMC,IAASL,EAAUM,CAAO,GAC1BC,IAAmB,CAAC;CAE1B,EAAO,KAAK,qCAAqC;CACjD,IAAMC,IAAaL,EAAK,KAAKG,EAAQ,MAAM,OAAO,UAAU,gBAAgB,GACtEG,IAAOR,EAAoBO,GAAYN,EAAmBM,CAAU,CAAC;CAG3E,OAFIC,KAAMF,EAAS,KAAKE,CAAI,GAErB;EACL,SAAS,CAAC;EACV;EACA,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { n as e } from "./logger-t1HxmpG2.js";
|
|
2
|
+
import { r as t } from "./modify-file-CRZ_gMg0.js";
|
|
3
|
+
import { n } from "./env-AxyRWcC_.js";
|
|
4
|
+
import { unmodifyEnvVarsFiles as r } from "./env-vars-CVn2076k.js";
|
|
5
|
+
import { a as i } from "./currency.server-BwuXG0a9.js";
|
|
6
|
+
import { n as a } from "./generate-BCYvhyF9.js";
|
|
7
|
+
import { t as o } from "./svelte-file-DfplF3BU.js";
|
|
8
|
+
import { f as s, m as c, n as l, o as u } from "./ts-morph-helpers-B4KZXP44.js";
|
|
9
|
+
import { c as d, i as f, n as p, o as m } from "./root-layout.svelte-DE0c_y-T.js";
|
|
10
|
+
import { t as h } from "./lib-specifier-C3M0WTev.js";
|
|
11
|
+
import { t as g } from "./shared-DE-J_b1j.js";
|
|
12
|
+
import { n as _, t as v } from "./wuchale-config-CNXoq4rc.js";
|
|
13
|
+
import y from "node:fs";
|
|
14
|
+
import b from "node:path";
|
|
15
|
+
import { Project as x, QuoteKind as S, SyntaxKind as C } from "ts-morph";
|
|
16
|
+
// src/patterns/disable/payments/modifies/modify-nav-user.ts
|
|
17
|
+
function w(e) {
|
|
18
|
+
if (!y.existsSync(e)) return {
|
|
19
|
+
status: "success",
|
|
20
|
+
changed: !1
|
|
21
|
+
};
|
|
22
|
+
let t = y.readFileSync(e, "utf8");
|
|
23
|
+
if (!t.includes("/billing")) return {
|
|
24
|
+
status: "success",
|
|
25
|
+
changed: !1
|
|
26
|
+
};
|
|
27
|
+
let n = new o(t), r = !1, i = (e) => {
|
|
28
|
+
r || e((e) => {
|
|
29
|
+
let t = s(e, "Billing", "@lucide/svelte/icons/credit-card");
|
|
30
|
+
return t.wasRemoved && (r = !0), t.source;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return i((e) => n.modifyModuleScript(e)), r || i((e) => n.modifyScript(e)), r ? (y.writeFileSync(e, n.toString(), "utf8"), {
|
|
34
|
+
status: "success",
|
|
35
|
+
changed: !0
|
|
36
|
+
}) : {
|
|
37
|
+
status: "success",
|
|
38
|
+
changed: !1
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// src/patterns/disable/payments/modifies/modify-user-signup.ts
|
|
42
|
+
var T = /* @__PURE__ */ new Set(["linkStripeCustomer.run", "linkStripeCustomer"]);
|
|
43
|
+
function E(e) {
|
|
44
|
+
if (!y.existsSync(e)) return {
|
|
45
|
+
status: "success",
|
|
46
|
+
changed: !1
|
|
47
|
+
};
|
|
48
|
+
let t = y.readFileSync(e, "utf8");
|
|
49
|
+
if (!t.includes("linkStripeCustomer")) return {
|
|
50
|
+
status: "success",
|
|
51
|
+
changed: !1
|
|
52
|
+
};
|
|
53
|
+
let n = new x({ manipulationSettings: { quoteKind: S.Single } }).addSourceFileAtPath(e);
|
|
54
|
+
for (let e of ["workflows/link-stripe-customer", "stripe"]) {
|
|
55
|
+
let t = n.getImportDeclarations().find((t) => h(t.getModuleSpecifierValue(), e));
|
|
56
|
+
t && t.remove();
|
|
57
|
+
}
|
|
58
|
+
let r = n.getVariableStatement((e) => e.getDeclarations().some((e) => e.getName() === "linkStripeCustomer"));
|
|
59
|
+
r && r.remove();
|
|
60
|
+
let i = n.getDescendantsOfKind(C.CallExpression).filter((e) => T.has(e.getExpression().getText()));
|
|
61
|
+
for (let e of i) {
|
|
62
|
+
let t = e.getFirstAncestorByKind(C.ExpressionStatement);
|
|
63
|
+
t && c(n, t);
|
|
64
|
+
}
|
|
65
|
+
return u(n), l(n), n.saveSync(), {
|
|
66
|
+
status: "success",
|
|
67
|
+
changed: n.getFullText() !== t
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
// src/patterns/disable/payments/generate.runtime.ts
|
|
71
|
+
var D = [
|
|
72
|
+
"transactions",
|
|
73
|
+
"stripe_customers",
|
|
74
|
+
"stripe_payment_methods",
|
|
75
|
+
"stripe_prices",
|
|
76
|
+
"stripe_products"
|
|
77
|
+
];
|
|
78
|
+
async function O(o) {
|
|
79
|
+
let s = o.features.auth, c = e(o), l = a(o), u = l.some((e) => e.id === "stripe"), h = [], x = [], S = (e) => {
|
|
80
|
+
e && h.push(e);
|
|
81
|
+
}, C = b.join(o.root, ".env");
|
|
82
|
+
for (let e of l) c.info(`Stripping ${e.label} credentials from .env`), S(t(C, n(C, i(e))));
|
|
83
|
+
c.info("Removing the currency select from the navbar");
|
|
84
|
+
let T = b.join(o.root, "src", "routes", "(public)", "root-layout.svelte");
|
|
85
|
+
S(t(T, p(T)));
|
|
86
|
+
let O = b.join(o.root, "src", "hooks.server.ts"), k = b.join(o.root, "src", "routes", "+layout.server.ts"), A = b.join(o.root, "src", "routes", "+layout.svelte");
|
|
87
|
+
y.existsSync(k) && (c.info("Removing the visitor's currency from the server"), S(t(A, f(A))), S(t(k, m(k))), S(t(O, d(O)))), c.info("Removing payment variables from src/env.ts");
|
|
88
|
+
let j = r(o.root, l.flatMap((e) => (e.env ?? []).map((e) => e.key)));
|
|
89
|
+
S(j.modify), j.delete && x.push(j.delete);
|
|
90
|
+
let M = b.join(o.root, "wuchale.config.js");
|
|
91
|
+
if (l.some((e) => e.id === "whatsapp") && y.existsSync(M) && (c.info("Removing src/lib/order.ts from wuchale's js adapter"), S(t(M, _(M, v, "remove")))), u && s) {
|
|
92
|
+
c.info("Reverting nav-user.svelte");
|
|
93
|
+
let e = b.join(o.root, "src", "lib", "components", "nav-user.svelte");
|
|
94
|
+
S(t(e, w(e))), c.info("Reverting signup +page.server.ts");
|
|
95
|
+
let n = b.join(o.root, "src", "routes", "(public)", "(auth)", "signup", "+page.server.ts");
|
|
96
|
+
S(t(n, E(n)));
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
creates: [],
|
|
100
|
+
modifies: h,
|
|
101
|
+
deletes: x,
|
|
102
|
+
components: [],
|
|
103
|
+
packages: [],
|
|
104
|
+
collections: [],
|
|
105
|
+
collectionPatches: [],
|
|
106
|
+
collectionDrops: u && o.features.backend ? await g(D, o) : []
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export { O as generate };
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=generate.runtime-Cry-DBNl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.runtime-2GD2E1NK.js","names":["isLibSpecifier","getLogger","envEditsFor","planDropsForCollections","providersToRemove","modifyEnvRemove","removeNavItemFromScript","removeStatementWithComments","ensureBlankLineAfterImports","formatLikeSource","modifyOutcomeToFile","SvelteFile","unmodifyHooksServerCurrency","unmodifyLayoutSvelteCurrency","unmodifyRootLayoutCurrencySelect","unmodifyLayoutServerCurrency","modifyWuchaleJsFiles","TRANSLATED_LIB_FILES","fs","path","unmodifyNavUser","navUserPath","source","file","wasRemoved","tryRemove","run","result","src","fn","CALL_EXPRESSIONS","unmodifyUserSignup","userSignupPath","originalSource","sourceFile","Project","QuoteKind","module","decl","d","linkFn","s","callStatements","SyntaxKind","ce","call","stmt","STRIPE_COLLECTIONS","generate","isAppMode","options","logger","providers","isStripe","provider","modifies","deletes","pushResult","envPath","layoutPath","hooksServerPath","layoutServerPath","rootLayoutPath","envVars","unmodifyEnvVarsFiles","variable","wuchaleConfig"],"sources":["../../src/patterns/disable/payments/modifies/modify-nav-user.ts","../../src/patterns/disable/payments/modifies/modify-user-signup.ts","../../src/patterns/disable/payments/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport { removeNavItemFromScript } from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\nexport function unmodifyNavUser(navUserPath: string): ModifyOutcome {\n if (!fs.existsSync(navUserPath)) {\n return { status: \"success\", changed: false };\n }\n\n const source = fs.readFileSync(navUserPath, \"utf8\");\n if (!source.includes(\"/billing\")) {\n return { status: \"success\", changed: false };\n }\n\n const file = new SvelteFile(source);\n let wasRemoved = false;\n\n const tryRemove = (run: (fn: (s: string) => string) => boolean) => {\n if (wasRemoved) return;\n run((src) => {\n const result = removeNavItemFromScript(\n src,\n \"Billing\",\n \"@lucide/svelte/icons/credit-card\",\n );\n if (result.wasRemoved) wasRemoved = true;\n return result.source;\n });\n };\n\n tryRemove((fn) => file.modifyModuleScript(fn));\n if (!wasRemoved) tryRemove((fn) => file.modifyScript(fn));\n\n if (!wasRemoved) {\n return { status: \"success\", changed: false };\n }\n\n fs.writeFileSync(navUserPath, file.toString(), \"utf8\");\n return { status: \"success\", changed: true };\n}\n","import fs from \"node:fs\";\nimport { Project, QuoteKind, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport {\n ensureBlankLineAfterImports,\n formatLikeSource,\n removeStatementWithComments,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport { isLibSpecifier } from \"../../../../runtime/lib-specifier\";\n\nconst CALL_EXPRESSIONS = new Set([\n \"linkStripeCustomer.run\",\n // Projects from before the workflow: an inline helper called directly.\n \"linkStripeCustomer\",\n]);\n\nexport function unmodifyUserSignup(userSignupPath: string): ModifyOutcome {\n if (!fs.existsSync(userSignupPath)) {\n return { status: \"success\", changed: false };\n }\n\n const originalSource = fs.readFileSync(userSignupPath, \"utf8\");\n if (!originalSource.includes(\"linkStripeCustomer\")) {\n return { status: \"success\", changed: false };\n }\n\n const project = new Project({\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(userSignupPath);\n\n for (const module of [\"workflows/link-stripe-customer\", \"stripe\"]) {\n const decl = sourceFile\n .getImportDeclarations()\n .find((d) => isLibSpecifier(d.getModuleSpecifierValue(), module));\n if (decl) decl.remove();\n }\n\n const linkFn = sourceFile.getVariableStatement((s) =>\n s.getDeclarations().some((d) => d.getName() === \"linkStripeCustomer\"),\n );\n if (linkFn) linkFn.remove();\n\n const callStatements = sourceFile\n .getDescendantsOfKind(SyntaxKind.CallExpression)\n .filter((ce) => CALL_EXPRESSIONS.has(ce.getExpression().getText()));\n for (const call of callStatements) {\n const stmt = call.getFirstAncestorByKind(SyntaxKind.ExpressionStatement);\n // With the two comment lines enable-payments put above it: left behind,\n // they keep the file from matching the stock signup, and enable-whatsapp\n // then refuses to swap it.\n if (stmt) removeStatementWithComments(sourceFile, stmt);\n }\n\n formatLikeSource(sourceFile);\n ensureBlankLineAfterImports(sourceFile);\n sourceFile.saveSync();\n\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== originalSource,\n };\n}\n","import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { modifyEnvRemove } from \"../../../runtime/env\";\nimport { unmodifyEnvVarsFiles } from \"../../../runtime/env-vars\";\nimport { envEditsFor } from \"../../enable/payments/generate\";\nimport { providersToRemove } from \"./generate\";\nimport { unmodifyNavUser } from \"./modifies/modify-nav-user\";\nimport { unmodifyHooksServerCurrency } from \"../../enable/payments/modifies/hooks.server\";\nimport { unmodifyLayoutServerCurrency } from \"../../enable/payments/modifies/layout.server\";\nimport { unmodifyLayoutSvelteCurrency } from \"../../enable/payments/modifies/layout.svelte\";\nimport { unmodifyRootLayoutCurrencySelect } from \"../../enable/payments/modifies/root-layout.svelte\";\nimport { unmodifyUserSignup } from \"./modifies/modify-user-signup\";\nimport { planDropsForCollections } from \"../../destroy/shared\";\nimport fs from \"node:fs\";\nimport {\n modifyWuchaleJsFiles,\n TRANSLATED_LIB_FILES,\n} from \"../../../runtime/wuchale-config\";\n\n/** Everything enable-payments creates in PocketBase for Stripe. */\nconst STRIPE_COLLECTIONS = [\n \"transactions\",\n \"stripe_customers\",\n \"stripe_payment_methods\",\n \"stripe_prices\",\n \"stripe_products\",\n];\n\nexport async function generate(options: Options) {\n const isAppMode = options.features.auth;\n const logger = getLogger(options);\n const providers = providersToRemove(options);\n const isStripe = providers.some((provider) => provider.id === \"stripe\");\n const modifies: File[] = [];\n const deletes: File[] = [];\n const pushResult = (file: File | null) => {\n if (file) modifies.push(file);\n };\n\n const envPath = path.join(options.root, \".env\");\n for (const provider of providers) {\n logger.info(`Stripping ${provider.label} credentials from .env`);\n pushResult(\n modifyOutcomeToFile(\n envPath,\n modifyEnvRemove(envPath, envEditsFor(provider)),\n ),\n );\n }\n\n logger.info(\"Removing the currency select from the navbar\");\n const layoutPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"(public)\",\n \"root-layout.svelte\",\n );\n pushResult(\n modifyOutcomeToFile(\n layoutPath,\n unmodifyRootLayoutCurrencySelect(layoutPath),\n ),\n );\n\n // The server half of the store, where enable-payments added it.\n const hooksServerPath = path.join(options.root, \"src\", \"hooks.server.ts\");\n const layoutServerPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"+layout.server.ts\",\n );\n const rootLayoutPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"+layout.svelte\",\n );\n if (fs.existsSync(layoutServerPath)) {\n logger.info(\"Removing the visitor's currency from the server\");\n pushResult(\n modifyOutcomeToFile(\n rootLayoutPath,\n unmodifyLayoutSvelteCurrency(rootLayoutPath),\n ),\n );\n pushResult(\n modifyOutcomeToFile(\n layoutServerPath,\n unmodifyLayoutServerCurrency(layoutServerPath),\n ),\n );\n pushResult(\n modifyOutcomeToFile(\n hooksServerPath,\n unmodifyHooksServerCurrency(hooksServerPath),\n ),\n );\n }\n\n logger.info(\"Removing payment variables from src/env.ts\");\n const envVars = unmodifyEnvVarsFiles(\n options.root,\n providers.flatMap((provider) =>\n (provider.env ?? []).map((variable) => variable.key),\n ),\n );\n pushResult(envVars.modify);\n if (envVars.delete) deletes.push(envVars.delete);\n\n // WhatsApp's order message was listed for wuchale; the module goes, so the\n // entry does too.\n const wuchaleConfig = path.join(options.root, \"wuchale.config.js\");\n if (\n providers.some((provider) => provider.id === \"whatsapp\") &&\n fs.existsSync(wuchaleConfig)\n ) {\n logger.info(\"Removing src/lib/order.ts from wuchale's js adapter\");\n pushResult(\n modifyOutcomeToFile(\n wuchaleConfig,\n modifyWuchaleJsFiles(wuchaleConfig, TRANSLATED_LIB_FILES, \"remove\"),\n ),\n );\n }\n\n // The nav item and the signup link exist only in auth's files, which\n // enable-payments edits for Stripe alone.\n if (isStripe && isAppMode) {\n logger.info(\"Reverting nav-user.svelte\");\n const navUserPath = path.join(\n options.root,\n \"src\",\n \"lib\",\n \"components\",\n \"nav-user.svelte\",\n );\n pushResult(modifyOutcomeToFile(navUserPath, unmodifyNavUser(navUserPath)));\n\n logger.info(\"Reverting signup +page.server.ts\");\n const userSignupPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"(public)\",\n \"(auth)\",\n \"signup\",\n \"+page.server.ts\",\n );\n pushResult(\n modifyOutcomeToFile(userSignupPath, unmodifyUserSignup(userSignupPath)),\n );\n }\n\n // Every Stripe collection is planned, whatever auth is now; one that was\n // never created is planned as missing and left alone. Without a backend\n // (no provider detected, on a Shopify project) there is nothing to drop.\n const collectionDrops =\n isStripe && options.features.backend\n ? await planDropsForCollections(STRIPE_COLLECTIONS, options)\n : [];\n\n return {\n creates: [],\n modifies,\n deletes,\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops,\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAKA,SAAgBoB,EAAgB,GAAoC;CAClE,IAAI,CAACF,EAAG,WAAWG,CAAW,GAC5B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAASJ,EAAG,aAAaG,GAAa,MAAM;CAClD,IAAI,CAACC,EAAO,SAAS,UAAU,GAC7B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAO,IAAIZ,EAAWW,CAAM,GAC9BE,IAAa,IAEXC,KAAa,MAAgD;EACjE,AAAID,KACJE,GAAK,MAAQ;GACX,IAAMC,IAASrB,EACbsB,GACA,WACA,kCACF;GAEA,OADID,EAAO,eAAY,IAAa,KAC7BA,EAAO;EAChB,CAAC;CACH;CAUA,OARAF,GAAW,MAAOF,EAAK,mBAAmBM,CAAE,CAAC,GACxCL,KAAYC,GAAW,MAAOF,EAAK,aAAaM,CAAE,CAAC,GAEnDL,KAILN,EAAG,cAAcG,GAAaE,EAAK,SAAS,GAAG,MAAM,GAC9C;EAAE,QAAQ;EAAW,SAAS;CAAK,KAJjC;EAAE,QAAQ;EAAW,SAAS;CAAM;AAK/C;;;AC9BA,IAAMO,oBAAmB,IAAI,IAAI,CAC/B,0BAEA,oBACF,CAAC;AAED,SAAgBC,EAAmB,GAAuC;CACxE,IAA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AQ,MAAM,mBAAmB;CAgBjE,IAdEE,EAAU,MAAM,MAAaE,EAAS,OAAO,UAAU,KACvDpC,EAAG,WAAWgD,CAAa,MAE3Bf,EAAO,KAAK,qDAAqD,GACjEM,EACE/C,EACEwD,GACAlD,EAAqBkD,GAAejD,GAAsB,QAAQ,CACpE,CACF,IAKEoC,KAAYJ,GAAW;EACzB,EAAO,KAAK,2BAA2B;EACvC,IAAM5B,IAAcF,EAAK,KACvB+B,EAAQ,MACR,OACA,OACA,cACA,iBACF;EAGA,AAFAO,EAAW/C,EAAoBW,GAAaD,EAAgBC,CAAW,CAAC,CAAC,GAEzE8B,EAAO,KAAK,kCAAkC;EAC9C,IAAMnB,IAAiBb,EAAK,KAC1B+B,EAAQ,MACR,OACA,UACA,YACA,UACA,UACA,iBACF;EACA,EACExC,EAAoBsB,GAAgBD,EAAmBC,CAAc,CAAC,CACxE;CACF;CAUA,OAAO;EACL,SAAS,CAAC;EACV;EACA;EACA,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAZAqB,KAAYH,EAAQ,SAAS,UACzB,MAAM/C,EAAwB4C,GAAoBG,CAAO,IACzD,CAAC;CAWP;AACF"}
|
|
1
|
+
{"version":3,"file":"generate.runtime-Cry-DBNl.js","names":["getLogger","modifyOutcomeToFile","envEditsFor","providersToRemove","SvelteFile","removeNavItemFromScript","removeStatementWithComments","ensureBlankLineAfterImports","formatLikeSource","unmodifyHooksServerCurrency","unmodifyLayoutSvelteCurrency","unmodifyRootLayoutCurrencySelect","unmodifyLayoutServerCurrency","isLibSpecifier","planDropsForCollections","modifyWuchaleJsFiles","TRANSLATED_LIB_FILES","fs","path","unmodifyNavUser","navUserPath","source","file","wasRemoved","tryRemove","run","result","src","fn","CALL_EXPRESSIONS","unmodifyUserSignup","userSignupPath","originalSource","sourceFile","Project","QuoteKind","module","decl","d","linkFn","s","callStatements","SyntaxKind","ce","call","stmt","STRIPE_COLLECTIONS","generate","isAppMode","options","logger","providers","isStripe","provider","modifies","deletes","pushResult","envPath","modifyEnvRemove","layoutPath","hooksServerPath","layoutServerPath","rootLayoutPath","envVars","unmodifyEnvVarsFiles","variable","wuchaleConfig"],"sources":["../../src/patterns/disable/payments/modifies/modify-nav-user.ts","../../src/patterns/disable/payments/modifies/modify-user-signup.ts","../../src/patterns/disable/payments/generate.runtime.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport { SvelteFile } from \"../../../../runtime/svelte-file\";\nimport { removeNavItemFromScript } from \"../../../../runtime/ts-morph-helpers\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\n\nexport function unmodifyNavUser(navUserPath: string): ModifyOutcome {\n if (!fs.existsSync(navUserPath)) {\n return { status: \"success\", changed: false };\n }\n\n const source = fs.readFileSync(navUserPath, \"utf8\");\n if (!source.includes(\"/billing\")) {\n return { status: \"success\", changed: false };\n }\n\n const file = new SvelteFile(source);\n let wasRemoved = false;\n\n const tryRemove = (run: (fn: (s: string) => string) => boolean) => {\n if (wasRemoved) return;\n run((src) => {\n const result = removeNavItemFromScript(\n src,\n \"Billing\",\n \"@lucide/svelte/icons/credit-card\",\n );\n if (result.wasRemoved) wasRemoved = true;\n return result.source;\n });\n };\n\n tryRemove((fn) => file.modifyModuleScript(fn));\n if (!wasRemoved) tryRemove((fn) => file.modifyScript(fn));\n\n if (!wasRemoved) {\n return { status: \"success\", changed: false };\n }\n\n fs.writeFileSync(navUserPath, file.toString(), \"utf8\");\n return { status: \"success\", changed: true };\n}\n","import fs from \"node:fs\";\nimport { Project, QuoteKind, SyntaxKind } from \"ts-morph\";\nimport type { ModifyOutcome } from \"../../../../core/types\";\nimport {\n ensureBlankLineAfterImports,\n formatLikeSource,\n removeStatementWithComments,\n} from \"../../../../runtime/ts-morph-helpers\";\nimport { isLibSpecifier } from \"../../../../runtime/lib-specifier\";\n\nconst CALL_EXPRESSIONS = new Set([\n \"linkStripeCustomer.run\",\n // Projects from before the workflow: an inline helper called directly.\n \"linkStripeCustomer\",\n]);\n\nexport function unmodifyUserSignup(userSignupPath: string): ModifyOutcome {\n if (!fs.existsSync(userSignupPath)) {\n return { status: \"success\", changed: false };\n }\n\n const originalSource = fs.readFileSync(userSignupPath, \"utf8\");\n if (!originalSource.includes(\"linkStripeCustomer\")) {\n return { status: \"success\", changed: false };\n }\n\n const project = new Project({\n manipulationSettings: { quoteKind: QuoteKind.Single },\n });\n const sourceFile = project.addSourceFileAtPath(userSignupPath);\n\n for (const module of [\"workflows/link-stripe-customer\", \"stripe\"]) {\n const decl = sourceFile\n .getImportDeclarations()\n .find((d) => isLibSpecifier(d.getModuleSpecifierValue(), module));\n if (decl) decl.remove();\n }\n\n const linkFn = sourceFile.getVariableStatement((s) =>\n s.getDeclarations().some((d) => d.getName() === \"linkStripeCustomer\"),\n );\n if (linkFn) linkFn.remove();\n\n const callStatements = sourceFile\n .getDescendantsOfKind(SyntaxKind.CallExpression)\n .filter((ce) => CALL_EXPRESSIONS.has(ce.getExpression().getText()));\n for (const call of callStatements) {\n const stmt = call.getFirstAncestorByKind(SyntaxKind.ExpressionStatement);\n // With the two comment lines enable-payments put above it: left behind,\n // they keep the file from matching the stock signup, and enable-whatsapp\n // then refuses to swap it.\n if (stmt) removeStatementWithComments(sourceFile, stmt);\n }\n\n formatLikeSource(sourceFile);\n ensureBlankLineAfterImports(sourceFile);\n sourceFile.saveSync();\n\n return {\n status: \"success\",\n changed: sourceFile.getFullText() !== originalSource,\n };\n}\n","import path from \"node:path\";\nimport type { File, Options, Result } from \"../../../core/types\";\nimport { getLogger } from \"../../../core/logger\";\nimport { modifyOutcomeToFile } from \"../../../runtime/modify-file\";\nimport { modifyEnvRemove } from \"../../../runtime/env\";\nimport { unmodifyEnvVarsFiles } from \"../../../runtime/env-vars\";\nimport { envEditsFor } from \"../../enable/payments/generate\";\nimport { providersToRemove } from \"./generate\";\nimport { unmodifyNavUser } from \"./modifies/modify-nav-user\";\nimport { unmodifyHooksServerCurrency } from \"../../enable/payments/modifies/hooks.server\";\nimport { unmodifyLayoutServerCurrency } from \"../../enable/payments/modifies/layout.server\";\nimport { unmodifyLayoutSvelteCurrency } from \"../../enable/payments/modifies/layout.svelte\";\nimport { unmodifyRootLayoutCurrencySelect } from \"../../enable/payments/modifies/root-layout.svelte\";\nimport { unmodifyUserSignup } from \"./modifies/modify-user-signup\";\nimport { planDropsForCollections } from \"../../destroy/shared\";\nimport fs from \"node:fs\";\nimport {\n modifyWuchaleJsFiles,\n TRANSLATED_LIB_FILES,\n} from \"../../../runtime/wuchale-config\";\n\n/** Everything enable-payments creates in PocketBase for Stripe. */\nconst STRIPE_COLLECTIONS = [\n \"transactions\",\n \"stripe_customers\",\n \"stripe_payment_methods\",\n \"stripe_prices\",\n \"stripe_products\",\n];\n\nexport async function generate(options: Options) {\n const isAppMode = options.features.auth;\n const logger = getLogger(options);\n const providers = providersToRemove(options);\n const isStripe = providers.some((provider) => provider.id === \"stripe\");\n const modifies: File[] = [];\n const deletes: File[] = [];\n const pushResult = (file: File | null) => {\n if (file) modifies.push(file);\n };\n\n const envPath = path.join(options.root, \".env\");\n for (const provider of providers) {\n logger.info(`Stripping ${provider.label} credentials from .env`);\n pushResult(\n modifyOutcomeToFile(\n envPath,\n modifyEnvRemove(envPath, envEditsFor(provider)),\n ),\n );\n }\n\n logger.info(\"Removing the currency select from the navbar\");\n const layoutPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"(public)\",\n \"root-layout.svelte\",\n );\n pushResult(\n modifyOutcomeToFile(\n layoutPath,\n unmodifyRootLayoutCurrencySelect(layoutPath),\n ),\n );\n\n // The server half of the store, where enable-payments added it.\n const hooksServerPath = path.join(options.root, \"src\", \"hooks.server.ts\");\n const layoutServerPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"+layout.server.ts\",\n );\n const rootLayoutPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"+layout.svelte\",\n );\n if (fs.existsSync(layoutServerPath)) {\n logger.info(\"Removing the visitor's currency from the server\");\n pushResult(\n modifyOutcomeToFile(\n rootLayoutPath,\n unmodifyLayoutSvelteCurrency(rootLayoutPath),\n ),\n );\n pushResult(\n modifyOutcomeToFile(\n layoutServerPath,\n unmodifyLayoutServerCurrency(layoutServerPath),\n ),\n );\n pushResult(\n modifyOutcomeToFile(\n hooksServerPath,\n unmodifyHooksServerCurrency(hooksServerPath),\n ),\n );\n }\n\n logger.info(\"Removing payment variables from src/env.ts\");\n const envVars = unmodifyEnvVarsFiles(\n options.root,\n providers.flatMap((provider) =>\n (provider.env ?? []).map((variable) => variable.key),\n ),\n );\n pushResult(envVars.modify);\n if (envVars.delete) deletes.push(envVars.delete);\n\n // WhatsApp's order message was listed for wuchale; the module goes, so the\n // entry does too.\n const wuchaleConfig = path.join(options.root, \"wuchale.config.js\");\n if (\n providers.some((provider) => provider.id === \"whatsapp\") &&\n fs.existsSync(wuchaleConfig)\n ) {\n logger.info(\"Removing src/lib/order.ts from wuchale's js adapter\");\n pushResult(\n modifyOutcomeToFile(\n wuchaleConfig,\n modifyWuchaleJsFiles(wuchaleConfig, TRANSLATED_LIB_FILES, \"remove\"),\n ),\n );\n }\n\n // The nav item and the signup link exist only in auth's files, which\n // enable-payments edits for Stripe alone.\n if (isStripe && isAppMode) {\n logger.info(\"Reverting nav-user.svelte\");\n const navUserPath = path.join(\n options.root,\n \"src\",\n \"lib\",\n \"components\",\n \"nav-user.svelte\",\n );\n pushResult(modifyOutcomeToFile(navUserPath, unmodifyNavUser(navUserPath)));\n\n logger.info(\"Reverting signup +page.server.ts\");\n const userSignupPath = path.join(\n options.root,\n \"src\",\n \"routes\",\n \"(public)\",\n \"(auth)\",\n \"signup\",\n \"+page.server.ts\",\n );\n pushResult(\n modifyOutcomeToFile(userSignupPath, unmodifyUserSignup(userSignupPath)),\n );\n }\n\n // Every Stripe collection is planned, whatever auth is now; one that was\n // never created is planned as missing and left alone. Without a backend\n // (no provider detected, on a Shopify project) there is nothing to drop.\n const collectionDrops =\n isStripe && options.features.backend\n ? await planDropsForCollections(STRIPE_COLLECTIONS, options)\n : [];\n\n return {\n creates: [],\n modifies,\n deletes,\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops,\n } satisfies Result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAKA,SAAgBmB,EAAgB,GAAoC;CAClE,IAAI,CAACF,EAAG,WAAWG,CAAW,GAC5B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAASJ,EAAG,aAAaG,GAAa,MAAM;CAClD,IAAI,CAACC,EAAO,SAAS,UAAU,GAC7B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAO,IAAIlB,EAAWiB,CAAM,GAC9BE,IAAa,IAEXC,KAAa,MAAgD;EACjE,AAAID,KACJE,GAAK,MAAQ;GACX,IAAMC,IAASrB,EACbsB,GACA,WACA,kCACF;GAEA,OADID,EAAO,eAAY,IAAa,KAC7BA,EAAO;EAChB,CAAC;CACH;CAUA,OARAF,GAAW,MAAOF,EAAK,mBAAmBM,CAAE,CAAC,GACxCL,KAAYC,GAAW,MAAOF,EAAK,aAAaM,CAAE,CAAC,GAEnDL,KAILN,EAAG,cAAcG,GAAaE,EAAK,SAAS,GAAG,MAAM,GAC9C;EAAE,QAAQ;EAAW,SAAS;CAAK,KAJjC;EAAE,QAAQ;EAAW,SAAS;CAAM;AAK/C;;AC9BA,IAAMO,oBAAmB,IAAI,IAAI,CAC/B,0BAEA,oBACF,CAAC;AAED,SAAgBC,EAAmB,GAAuC;CACxE,IAAI,CAACb,EAAG,WAAWc,CAAc,GAC/B,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAG7C,IAAMC,IAAiBf,EAAG,aAAac,GAAgB,MAAM;CAC7D,IAAI,CAACC,EAAe,SAAS,oBAAoB,GAC/C,OAAO;EAAE,QAAQ;EAAW,SAAS;CAAM;CAM7C,IAAMC,IAAa,IAHCC,EAAQ,EAC1B,sBAAsB,EAAE,WAAWC,E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