@farm.js/core 0.1.65 → 0.1.67
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/{agent-mcp-handler-QLFDDTYN.mjs → agent-mcp-handler-AZ7QW4UP.mjs} +5 -5
- package/dist/{agent-mcp-handler-OXT73ZBY.cjs → agent-mcp-handler-FER4MQDF.cjs} +6 -6
- package/dist/{agent-mcp.d-QD2WZ9BS.d.ts → agent-mcp.d-BFu9xHAi.d.ts} +1 -1
- package/dist/{agent-mcp.d-CO_ABmNK.d.mts → agent-mcp.d-DWyWkTSy.d.mts} +1 -1
- package/dist/agent-runtime.cjs +6 -5
- package/dist/agent-runtime.d.mts +6 -6
- package/dist/agent-runtime.d.ts +6 -6
- package/dist/agent-runtime.mjs +5 -4
- package/dist/analyzer-KVZGVY5Q.cjs +16 -0
- package/dist/{analyzer-PE33SK5W.mjs → analyzer-TTIIXXMQ.mjs} +3 -3
- package/dist/api/client.cjs +12 -2
- package/dist/api/client.d.mts +4 -4
- package/dist/api/client.d.ts +4 -4
- package/dist/api/client.mjs +12 -2
- package/dist/api/client.native.cjs +12 -2
- package/dist/api/client.native.d.mts +5 -5
- package/dist/api/client.native.d.ts +5 -5
- package/dist/api/client.native.mjs +12 -2
- package/dist/api/node.cjs +223 -0
- package/dist/api/node.d.mts +59 -0
- package/dist/api/node.d.ts +59 -0
- package/dist/api/node.mjs +223 -0
- package/dist/api/route-manager.cjs +11 -11
- package/dist/api/route-manager.d.mts +10 -9
- package/dist/api/route-manager.d.ts +10 -9
- package/dist/api/route-manager.mjs +10 -10
- package/dist/api/runtime.cjs +11 -7
- package/dist/api/runtime.d.mts +7 -7
- package/dist/api/runtime.d.ts +7 -7
- package/dist/api/runtime.mjs +10 -6
- package/dist/{api-client.d-BNLXNCXJ.d.mts → api-client.d-Bp35zMqR.d.mts} +1 -1
- package/dist/{api-client.d-ddQBNGtu.d.ts → api-client.d-CFI_xL0V.d.ts} +1 -1
- package/dist/api.cjs +17 -13
- package/dist/api.d.mts +11 -10
- package/dist/api.d.ts +11 -10
- package/dist/api.mjs +16 -12
- package/dist/{app-manifest.d-BpKxiU_E.d.mts → app-manifest.d-CRmjN5j9.d.mts} +1 -1
- package/dist/{app-manifest.d-DDmNkYQQ.d.ts → app-manifest.d-CwfhGrVR.d.ts} +1 -1
- package/dist/app-markdown.cjs +5 -5
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/app-markdown.mjs +4 -4
- package/dist/{app.d-x68Cwr0_.d.ts → app.d-BX9LVTiP.d.ts} +50 -9
- package/dist/{app.d-kuoVWhWM.d.mts → app.d-uBBUxwyV.d.mts} +50 -9
- package/dist/{chunk-V56632LA.cjs → chunk-22IWL4YD.cjs} +19 -5
- package/dist/{chunk-CZF4XIRZ.cjs → chunk-23PVOIPT.cjs} +3 -3
- package/dist/{chunk-5C7XMKQ4.cjs → chunk-2AFW7673.cjs} +6 -1
- package/dist/{chunk-SYW346ZN.cjs → chunk-2LHZD3OP.cjs} +1 -21
- package/dist/{chunk-ZZI56IUY.mjs → chunk-2ZOYOYEE.mjs} +13 -13
- package/dist/{chunk-RVGSVQWT.mjs → chunk-3T5TLFCQ.mjs} +10 -5
- package/dist/{chunk-XBSKPLHF.cjs → chunk-3T7ALZJF.cjs} +2 -2
- package/dist/{chunk-JCEFKP5M.mjs → chunk-423SSBYQ.mjs} +6 -0
- package/dist/{chunk-7QVRWGBL.cjs → chunk-4DRINDGN.cjs} +319 -138
- package/dist/{chunk-O6L3YYPM.cjs → chunk-4E57QHPW.cjs} +8 -16
- package/dist/{chunk-WKPBIT5Q.cjs → chunk-4HGLJOXZ.cjs} +6 -6
- package/dist/{chunk-JGAE5XPL.cjs → chunk-4JX3M4C6.cjs} +2 -1
- package/dist/{chunk-CJNAUEVC.mjs → chunk-4QENVMG7.mjs} +1 -1
- package/dist/{chunk-IMK32ERL.cjs → chunk-556H7JCE.cjs} +65 -48
- package/dist/{chunk-OLIGNTWU.cjs → chunk-5NFQ6AZI.cjs} +7 -7
- package/dist/{chunk-6HRAK7I5.mjs → chunk-5OFNUETM.mjs} +8 -2
- package/dist/{chunk-TZVUF5JJ.mjs → chunk-5TA63JD3.mjs} +4 -4
- package/dist/{chunk-RD623KW4.cjs → chunk-67MZTLTF.cjs} +21 -3
- package/dist/chunk-6I4BFRE7.cjs +51 -0
- package/dist/{chunk-OSFIUSYK.cjs → chunk-6R53ZWX2.cjs} +7 -7
- package/dist/{chunk-MGKW5XZE.cjs → chunk-6SQZXRJ2.cjs} +7 -7
- package/dist/{chunk-WNXVWXG3.cjs → chunk-6V5YWI4W.cjs} +2 -2
- package/dist/{chunk-BM2LH2JM.mjs → chunk-6YBYX4K4.mjs} +13 -12
- package/dist/{chunk-X3XUZWRB.mjs → chunk-724MGMIL.mjs} +17 -3
- package/dist/{chunk-K5EW7GUU.mjs → chunk-7BIW7VCW.mjs} +13 -5
- package/dist/{chunk-HPP2II4Z.mjs → chunk-7PJARAQQ.mjs} +1 -1
- package/dist/{chunk-LEJDW34D.cjs → chunk-7PPLTD3P.cjs} +3 -3
- package/dist/{chunk-TGULJSHD.mjs → chunk-AJNBTOVQ.mjs} +20 -9
- package/dist/{chunk-FBEBSAVI.cjs → chunk-AKIQ54FK.cjs} +82 -63
- package/dist/{chunk-2NGZFOKG.mjs → chunk-AOIUYHPH.mjs} +2 -2
- package/dist/{chunk-ZEXE4TGY.mjs → chunk-AQDLVHNF.mjs} +230 -110
- package/dist/{chunk-NKRZLQUK.mjs → chunk-AQIO3RNL.mjs} +1 -1
- package/dist/chunk-AQIRXBBY.cjs +26 -0
- package/dist/chunk-AZ6IW6SF.mjs +28 -0
- package/dist/{chunk-QMDU6QHN.mjs → chunk-B6RBJJ5G.mjs} +1 -1
- package/dist/{chunk-I32V5CZL.cjs → chunk-BDYM2TN3.cjs} +28 -17
- package/dist/{chunk-JLDNXURZ.cjs → chunk-BZWTBELF.cjs} +32 -32
- package/dist/{chunk-ITV4QQL2.cjs → chunk-C6CUUBY5.cjs} +14 -3
- package/dist/{chunk-V727H3RI.cjs → chunk-CCAUIBIS.cjs} +6 -0
- package/dist/{chunk-YN6BHOYY.cjs → chunk-CL52PD6D.cjs} +10 -3
- package/dist/{chunk-ZX2JHEWW.mjs → chunk-CO3YMZFD.mjs} +20 -9
- package/dist/{chunk-XURDCXNH.cjs → chunk-CSLHNBPS.cjs} +6 -6
- package/dist/{chunk-CNNBFGL5.cjs → chunk-DB2HSHQA.cjs} +14 -14
- package/dist/{chunk-XQSYOVCW.cjs → chunk-DBYNZIIQ.cjs} +13 -5
- package/dist/{chunk-32RPJAAS.cjs → chunk-DCXSIEFE.cjs} +40 -41
- package/dist/{chunk-D4MRNBVF.cjs → chunk-DGOFR7D5.cjs} +2 -2
- package/dist/{chunk-QTD6EMN2.mjs → chunk-DQ2DI3Y7.mjs} +11 -4
- package/dist/chunk-DXZ57EPE.mjs +375 -0
- package/dist/{chunk-SA7MLSP4.mjs → chunk-E3HDJCWF.mjs} +3 -3
- package/dist/{chunk-EFZGB7JC.cjs → chunk-E5UN4OWX.cjs} +1 -0
- package/dist/{chunk-HKNYNSOK.mjs → chunk-E6CD45JK.mjs} +30 -31
- package/dist/{chunk-752XUZIM.cjs → chunk-EGIY4A7V.cjs} +6 -6
- package/dist/chunk-EIVGPQN5.mjs +51 -0
- package/dist/{chunk-KPAJWD3N.mjs → chunk-EYPSKXO4.mjs} +1 -1
- package/dist/{chunk-E552H232.cjs → chunk-F43OG25P.cjs} +1 -1
- package/dist/{chunk-UAQD67HM.mjs → chunk-F7JKVHU2.mjs} +1 -1
- package/dist/{chunk-QISW423S.cjs → chunk-FPBOAG6N.cjs} +2 -2
- package/dist/{chunk-2C5L5RPM.cjs → chunk-FT6KJHS3.cjs} +71 -38
- package/dist/{chunk-ES2LD2YD.mjs → chunk-GCRT6GJG.mjs} +18 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-GDM3ZD2O.cjs} +10 -8
- package/dist/{chunk-EMDGXYUD.mjs → chunk-GJ7QVFAG.mjs} +16 -7
- package/dist/{chunk-TGSEVBPO.mjs → chunk-GJEC5S4V.mjs} +11 -0
- package/dist/{chunk-ZAUOOGER.mjs → chunk-GTV2ABO7.mjs} +218 -37
- package/dist/{chunk-72JSHQQQ.mjs → chunk-H37MDCPR.mjs} +1 -1
- package/dist/{chunk-HNAISJFD.cjs → chunk-HDPT6OYE.cjs} +9 -3
- package/dist/{chunk-25T5VXOE.mjs → chunk-HFHJJXSV.mjs} +106 -19
- package/dist/{chunk-ZNH6NR3H.cjs → chunk-HJZZSBVK.cjs} +2 -2
- package/dist/{chunk-A3G5IY2W.cjs → chunk-HM7AGSKU.cjs} +1 -1
- package/dist/{chunk-GL7N5UHF.cjs → chunk-HNVAZGQD.cjs} +20 -9
- package/dist/{chunk-GRBJ7VKH.mjs → chunk-HP2DQGQH.mjs} +1 -1
- package/dist/{chunk-E2TSYUHV.mjs → chunk-HRPTMX5C.mjs} +4 -4
- package/dist/{chunk-K7OZAVOI.mjs → chunk-IFR74W6S.mjs} +46 -13
- package/dist/{chunk-5A77OEIG.cjs → chunk-IHTDLCDJ.cjs} +5 -5
- package/dist/{chunk-VQJHT2ND.mjs → chunk-IRA2CZAY.mjs} +2 -2
- package/dist/{chunk-OYZXVBZP.cjs → chunk-IUKBPBM7.cjs} +2 -1
- package/dist/chunk-J6TZRYCO.cjs +22 -0
- package/dist/{chunk-WYAXRIYP.cjs → chunk-J7JHVCWA.cjs} +8 -8
- package/dist/chunk-JSOCDYER.cjs +375 -0
- package/dist/{chunk-YUW7F6SK.mjs → chunk-JVM3DKZE.mjs} +3 -3
- package/dist/{chunk-UPYIFH2H.cjs → chunk-JWLRBDDC.cjs} +2 -2
- package/dist/{chunk-BQWBHWEW.mjs → chunk-JWSI5WO4.mjs} +1 -1
- package/dist/{chunk-OLGQZRW6.mjs → chunk-JZBU7V4D.mjs} +37 -17
- package/dist/{chunk-ONG4RDW3.mjs → chunk-JZGL2PIH.mjs} +13 -3
- package/dist/chunk-K63OWRY2.mjs +22 -0
- package/dist/{chunk-TUPKMMXT.mjs → chunk-K6HIIWUB.mjs} +1 -1
- package/dist/{chunk-MESQF2JC.mjs → chunk-K6SXMVXO.mjs} +2 -2
- package/dist/{chunk-L2JG337G.cjs → chunk-K6VFYFOY.cjs} +33 -31
- package/dist/{chunk-3CCAICF7.cjs → chunk-KCY52OUQ.cjs} +4 -4
- package/dist/{chunk-EZ34EHQP.mjs → chunk-KI3MU7B5.mjs} +1 -1
- package/dist/{chunk-GHNW564E.mjs → chunk-KSZK34HU.mjs} +30 -10
- package/dist/{chunk-RFKTJTWZ.mjs → chunk-KWFNUODD.mjs} +2 -1
- package/dist/{chunk-ECKQFEX2.mjs → chunk-LENKRGBV.mjs} +8 -6
- package/dist/{chunk-C7DCMGC4.cjs → chunk-LPIZMU7D.cjs} +12 -12
- package/dist/{chunk-HEPJIKKQ.cjs → chunk-MCSRMEQV.cjs} +2 -2
- package/dist/{chunk-DQF3QLOH.mjs → chunk-ME7RVELR.mjs} +3 -2
- package/dist/{chunk-3KJPIO5D.cjs → chunk-N5DQMOAG.cjs} +589 -678
- package/dist/{chunk-O4F3JUST.mjs → chunk-NDDRTFN4.mjs} +4 -0
- package/dist/{chunk-CBOEJ5Z4.cjs → chunk-OB3IFUK6.cjs} +133 -46
- package/dist/{chunk-R62SF5R4.mjs → chunk-OB45EAQL.mjs} +6 -1
- package/dist/{chunk-SYXPWJ7N.cjs → chunk-OFBLGH6V.cjs} +17 -18
- package/dist/{chunk-VQ4NWOWO.mjs → chunk-OGVTUGMU.mjs} +5 -13
- package/dist/{chunk-3UZVPO72.mjs → chunk-OIOPQ25L.mjs} +6 -7
- package/dist/{chunk-2XGBJSDV.cjs → chunk-OO7DYIJD.cjs} +73 -24
- package/dist/{chunk-IP2KHSGF.mjs → chunk-P2NBQ5JI.mjs} +57 -4
- package/dist/{chunk-ZQQK4U66.cjs → chunk-PDFFYZAT.cjs} +72 -19
- package/dist/{chunk-GSVJ3IIF.cjs → chunk-PHCJJJZV.cjs} +2 -2
- package/dist/{chunk-EVMXPJCB.mjs → chunk-PKMUQ7LM.mjs} +2 -1
- package/dist/{chunk-YD4J37RN.cjs → chunk-PL6RTBDE.cjs} +30 -19
- package/dist/{chunk-OAJOQU5J.mjs → chunk-PLJKJJ2H.mjs} +82 -63
- package/dist/{chunk-WMTBBQHY.cjs → chunk-PPX7UOFY.cjs} +271 -151
- package/dist/{chunk-6XQSPIN6.cjs → chunk-PWKAX5MS.cjs} +13 -3
- package/dist/{chunk-7XGWBPQQ.cjs → chunk-Q37INCXG.cjs} +13 -8
- package/dist/{chunk-T4M52BA5.cjs → chunk-Q5UX55YA.cjs} +1457 -612
- package/dist/{chunk-53ZCZ46B.cjs → chunk-QGQP6QKO.cjs} +4 -3
- package/dist/{chunk-TZOGZKI7.cjs → chunk-QITSS4TD.cjs} +1381 -626
- package/dist/{chunk-4ZJ5C7UJ.cjs → chunk-QIXEU2WV.cjs} +19 -10
- package/dist/{chunk-HCGWDRZO.mjs → chunk-QJVW76JG.mjs} +17 -6
- package/dist/{chunk-FJWN7RV4.cjs → chunk-QO43L7Z4.cjs} +38 -8
- package/dist/{chunk-ZIHWAN55.cjs → chunk-RE5E2G5S.cjs} +1 -1
- package/dist/chunk-RWR7SMD7.cjs +50 -0
- package/dist/{chunk-7PTISZSQ.cjs → chunk-S7MWSFFP.cjs} +4 -0
- package/dist/chunk-SD6JGJOM.mjs +50 -0
- package/dist/{chunk-7H4SVNC4.cjs → chunk-SPP3EZTJ.cjs} +46 -26
- package/dist/{chunk-E4RDMG3K.mjs → chunk-TEG6HJVF.mjs} +4 -4
- package/dist/{chunk-WAY6LOQH.mjs → chunk-TEJ67GD2.mjs} +1 -1
- package/dist/{chunk-ZNXTU4YH.mjs → chunk-TM2E623I.mjs} +1 -0
- package/dist/{chunk-IFTGERT3.mjs → chunk-TTXIITYA.mjs} +49 -0
- package/dist/{chunk-ZFWYCVKS.mjs → chunk-TY5KCYDE.mjs} +22 -4
- package/dist/{chunk-W2ZXMMHA.mjs → chunk-UHE5JUKB.mjs} +1 -1
- package/dist/{chunk-6X5NKNBE.mjs → chunk-UHNSY2PQ.mjs} +1304 -459
- package/dist/{chunk-UJ3R2AH2.cjs → chunk-UPOYKX4S.cjs} +5 -5
- package/dist/{chunk-2DLGV2ZG.mjs → chunk-UTUS6JUH.mjs} +1 -21
- package/dist/{chunk-Q75QPLBA.mjs → chunk-V5MQMQ2P.mjs} +1 -1
- package/dist/{chunk-TRIDJQ6A.cjs → chunk-V5RTHYJB.cjs} +30 -10
- package/dist/{chunk-QHRCR44V.mjs → chunk-VK54PDQ6.mjs} +25 -5
- package/dist/{chunk-LQNW3ABP.cjs → chunk-VX2HZGC7.cjs} +14 -14
- package/dist/{chunk-2L54YV25.mjs → chunk-WDD5CTZW.mjs} +49 -32
- package/dist/{chunk-7GYCZRTH.mjs → chunk-WGHY3OL5.mjs} +355 -444
- package/dist/{chunk-A2MN5PQJ.mjs → chunk-WMLSZAKN.mjs} +9 -9
- package/dist/{chunk-3EEET2Q5.cjs → chunk-WUTFJOV7.cjs} +32 -12
- package/dist/chunk-WVQNXXNE.cjs +28 -0
- package/dist/{chunk-Y5TOT5F6.cjs → chunk-X3MHKLCO.cjs} +5 -5
- package/dist/{chunk-Z7P2BTZ3.cjs → chunk-XGTFLG73.cjs} +30 -12
- package/dist/{chunk-VHHLKIDZ.mjs → chunk-XNZWMXCF.mjs} +1090 -335
- package/dist/{chunk-FIR62CR3.mjs → chunk-XUES6OET.mjs} +1 -1
- package/dist/{chunk-XCXHQBMM.mjs → chunk-Y2LU4LE5.mjs} +1 -1
- package/dist/{chunk-5J45H65F.mjs → chunk-Y5LEPEVH.mjs} +1 -1
- package/dist/{chunk-BT4SEFLC.cjs → chunk-YAEN3L2F.cjs} +3 -2
- package/dist/chunk-YFTGIHNC.mjs +26 -0
- package/dist/{chunk-KL7SHLQB.mjs → chunk-YGJ5P3TJ.mjs} +31 -1
- package/dist/{chunk-UYRI6U3P.mjs → chunk-YQYTQJZN.mjs} +3 -2
- package/dist/{chunk-X4K7TYN6.cjs → chunk-YVTS3S3F.cjs} +24 -23
- package/dist/{chunk-72KABRWN.mjs → chunk-ZJGFAW5U.mjs} +5 -3
- package/dist/{chunk-TNBJ4LZG.mjs → chunk-ZPKJPM7K.mjs} +4 -4
- package/dist/client/lifecycle.cjs +2 -2
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/client/lifecycle.mjs +1 -1
- package/dist/{client-component.d-D74pqdea.d.mts → client-component.d-CDRvRmbU.d.mts} +2 -2
- package/dist/{client-component.d-D8VcypQA.d.ts → client-component.d-DWRKyAp5.d.ts} +2 -2
- package/dist/client-plugins.cjs +2 -2
- package/dist/{client-plugins.d-D4-6hNx7.d.mts → client-plugins.d-BNILjfX3.d.mts} +94 -140
- package/dist/{client-plugins.d-CXElzotB.d.ts → client-plugins.d-CrKZiNSN.d.ts} +94 -140
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client-plugins.mjs +1 -1
- package/dist/client.cjs +11 -9
- package/dist/client.d.mts +13 -13
- package/dist/client.d.ts +13 -13
- package/dist/client.mjs +10 -8
- package/dist/{config.d-qt-mE8O5.d.mts → config.d-BKIhJtmr.d.mts} +7 -2
- package/dist/{config.d-qt-mE8O5.d.ts → config.d-BKIhJtmr.d.ts} +7 -2
- package/dist/config.d.mts +6 -6
- package/dist/config.d.ts +6 -6
- package/dist/cron.cjs +2 -2
- package/dist/cron.mjs +1 -1
- package/dist/deferred.cjs +2 -2
- package/dist/deferred.mjs +1 -1
- package/dist/deployment.cjs +2 -2
- package/dist/deployment.mjs +1 -1
- package/dist/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{devtools-SGYOG36E.cjs → devtools-RZVT4JVN.cjs} +36 -32
- package/dist/{devtools-PUVZB3F2.mjs → devtools-UFQYT3VA.mjs} +31 -27
- package/dist/docs.cjs +26 -25
- package/dist/docs.d.mts +20 -8
- package/dist/docs.d.ts +20 -8
- package/dist/docs.mjs +25 -24
- package/dist/env-types.cjs +3 -3
- package/dist/env-types.mjs +2 -2
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.mjs +4 -4
- package/dist/headers.cjs +3 -3
- package/dist/headers.mjs +2 -2
- package/dist/image/server.d.mts +1 -1
- package/dist/image/server.d.ts +1 -1
- package/dist/image/sharp.d.mts +1 -1
- package/dist/image/sharp.d.ts +1 -1
- package/dist/{image-config.d-CeDgNyX4.d.mts → image-config.d-ByhQ0TT7.d.mts} +3 -1
- package/dist/{image-config.d-CeDgNyX4.d.ts → image-config.d-ByhQ0TT7.d.ts} +3 -1
- package/dist/image.cjs +6 -6
- package/dist/image.d.mts +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/image.mjs +1 -1
- package/dist/index.cjs +143 -128
- package/dist/{index.d-SSgYDv4D.d.mts → index.d-Bdm6866n.d.mts} +1 -1
- package/dist/{index.d-A_x10zGS.d.ts → index.d-Dey5T14f.d.ts} +1 -1
- package/dist/index.d.mts +31 -82
- package/dist/index.d.ts +31 -82
- package/dist/index.mjs +214 -199
- package/dist/{integration-orm-52GPGTHO.cjs → integrations/orm.cjs} +5 -5
- package/dist/integrations/orm.d.mts +33 -0
- package/dist/integrations/orm.d.ts +33 -0
- package/dist/{integration-orm-CO23MSFE.mjs → integrations/orm.mjs} +5 -5
- package/dist/integrations.cjs +6 -5
- package/dist/integrations.d.mts +6 -6
- package/dist/integrations.d.ts +6 -6
- package/dist/integrations.mjs +5 -4
- package/dist/internal/app-markdown-runtime.cjs +4 -4
- package/dist/internal/app-markdown-runtime.d.mts +17 -8
- package/dist/internal/app-markdown-runtime.d.ts +17 -8
- package/dist/internal/app-markdown-runtime.mjs +3 -3
- package/dist/internal/build-runtime.cjs +70 -68
- package/dist/internal/build-runtime.d.mts +8 -8
- package/dist/internal/build-runtime.d.ts +8 -8
- package/dist/internal/build-runtime.mjs +69 -67
- package/dist/internal/cli-runtime.cjs +45 -44
- package/dist/internal/cli-runtime.mjs +44 -43
- package/dist/internal/client-error-overlay.cjs +6 -6
- package/dist/internal/client-error-overlay.mjs +2 -2
- package/dist/internal/client-runtime.cjs +60 -6
- package/dist/internal/client-runtime.d.mts +40 -11
- package/dist/internal/client-runtime.d.ts +40 -11
- package/dist/internal/client-runtime.mjs +58 -4
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +25 -24
- package/dist/internal/config-runtime.d.mts +9 -9
- package/dist/internal/config-runtime.d.ts +9 -9
- package/dist/internal/config-runtime.mjs +24 -23
- package/dist/internal/docs-precompiled-runtime.cjs +16 -5
- package/dist/internal/docs-precompiled-runtime.d.mts +7 -0
- package/dist/internal/docs-precompiled-runtime.d.ts +7 -0
- package/dist/internal/docs-precompiled-runtime.mjs +15 -4
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-runtime.cjs +33 -4
- package/dist/internal/islands-runtime.d.mts +1 -1
- package/dist/internal/islands-runtime.d.ts +1 -1
- package/dist/internal/islands-runtime.mjs +31 -2
- package/dist/internal/native-server-fns.cjs +6 -6
- package/dist/internal/native-server-fns.mjs +5 -5
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +54 -40
- package/dist/internal/production-runtime.d.mts +23 -15
- package/dist/internal/production-runtime.d.ts +23 -15
- package/dist/internal/production-runtime.mjs +69 -55
- package/dist/internal/react-cache.cjs +3 -3
- package/dist/internal/react-cache.mjs +1 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.ts → lifecycle.d-keQs5Swc.d.mts} +7 -1
- package/dist/{lifecycle.d-C2aLBOwu.d.mts → lifecycle.d-keQs5Swc.d.ts} +7 -1
- package/dist/{manager-H5ZM3HAM.mjs → manager-JIA66YJ2.mjs} +4 -3
- package/dist/manager-JOHU6BQI.cjs +15 -0
- package/dist/markdown.cjs +7 -3
- package/dist/markdown.d.mts +6 -6
- package/dist/markdown.d.ts +6 -6
- package/dist/markdown.mjs +6 -2
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/mount.d-BP0nLYQO.d.mts +38 -0
- package/dist/mount.d-CkiPky_F.d.ts +38 -0
- package/dist/{native-server-fn-handler-GLRHAYWV.mjs → native-server-fn-handler-EP5AFJYE.mjs} +5 -5
- package/dist/{native-server-fn-handler-J5MYRXN6.cjs → native-server-fn-handler-QRTXGZA4.cjs} +6 -6
- package/dist/{native-tree-HE2FLS72.cjs → native-tree-W2SSJB3Y.cjs} +5 -5
- package/dist/{native-tree-YF2DSPKM.mjs → native-tree-Y5YQANW7.mjs} +4 -4
- package/dist/{navigation-delegate.d-DQVYKoaZ.d.mts → navigation-delegate.d-CdBP-hkZ.d.mts} +1 -1
- package/dist/{navigation-delegate.d-GghbHJuK.d.ts → navigation-delegate.d-DchcGzAQ.d.ts} +1 -1
- package/dist/navigation.cjs +8 -7
- package/dist/navigation.d.mts +9 -9
- package/dist/navigation.d.ts +9 -9
- package/dist/navigation.mjs +7 -6
- package/dist/{nitro-DD4QCA66.mjs → nitro-55YOZWRA.mjs} +11 -11
- package/dist/{nitro-VRDX2H4M.cjs → nitro-EEX2J3KB.cjs} +13 -13
- package/dist/{plugin-53SY5YBS.mjs → plugin-SAS22JL7.mjs} +4 -3
- package/dist/{plugin-HZIBL3DW.cjs → plugin-WIU4GDD4.cjs} +5 -4
- package/dist/plugin.cjs +61 -59
- package/dist/plugin.d.mts +8 -8
- package/dist/plugin.d.ts +8 -8
- package/dist/plugin.mjs +60 -58
- package/dist/{port-UFUZL6RI.mjs → port-CLL4BC4O.mjs} +1 -1
- package/dist/{port-VTLHPZOI.cjs → port-HASZTQGY.cjs} +9 -9
- package/dist/{production-runtime.d-Bzns3NW9.d.ts → production-runtime.d-Dou_Htas.d.ts} +1 -1
- package/dist/{production-runtime.d-DiFa5vHW.d.mts → production-runtime.d-VwsBzIee.d.mts} +1 -1
- package/dist/query/client.cjs +9 -7
- package/dist/query/client.mjs +5 -3
- package/dist/{render-plan.d-CL_Ikfg_.d.ts → render-plan.d-D8UakAIk.d.ts} +1 -1
- package/dist/{render-plan.d-CcF0MeCf.d.mts → render-plan.d-LKymStDJ.d.mts} +1 -1
- package/dist/renderer/none/server.cjs +35 -0
- package/dist/renderer/none/server.d.mts +21 -0
- package/dist/renderer/none/server.d.ts +21 -0
- package/dist/renderer/none/server.mjs +35 -0
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +9 -9
- package/dist/renderer-client.d.ts +9 -9
- package/dist/renderer-client.mjs +5 -3
- package/dist/renderer.cjs +6 -2
- package/dist/renderer.d.mts +20 -2
- package/dist/renderer.d.ts +20 -2
- package/dist/renderer.mjs +5 -1
- package/dist/request.cjs +2 -2
- package/dist/{request.d-B1RnTLri.d.ts → request.d-B928QjWy.d.ts} +1 -1
- package/dist/{request.d-DarDOCk9.d.mts → request.d-KG-4d2eG.d.mts} +1 -1
- package/dist/request.d.mts +7 -7
- package/dist/request.d.ts +7 -7
- package/dist/request.mjs +1 -1
- package/dist/{route-rendering.d-BTUYCIj4.d.ts → route-rendering.d-DoEe_w9t.d.ts} +1 -1
- package/dist/{route-rendering.d-D_2Ual0-.d.mts → route-rendering.d-NIHQeb4m.d.mts} +1 -1
- package/dist/{route.d-BaVH3V0w.d.mts → route.d-DrXkpvcg.d.mts} +1 -1
- package/dist/{route.d-DBTEqifW.d.ts → route.d-hs-_cyHn.d.ts} +1 -1
- package/dist/{router.d-Cuv1jntg.d.mts → router.d-B8PkJSGp.d.mts} +1 -1
- package/dist/{router.d-CMANF6da.d.ts → router.d-DYnRHQwz.d.ts} +1 -1
- package/dist/routes.cjs +3 -3
- package/dist/{routes.d-c2HKfrfL.d.mts → routes.d-DgZ_jgGG.d.mts} +1 -1
- package/dist/{routes.d-B6yFe6jm.d.ts → routes.d-uUBZyWoK.d.ts} +1 -1
- package/dist/routes.d.mts +6 -6
- package/dist/routes.d.ts +6 -6
- package/dist/routes.mjs +2 -2
- package/dist/{rsc-pipeline-T3PWURLJ.mjs → rsc-pipeline-4OJ5ZQNZ.mjs} +26 -25
- package/dist/{rsc-pipeline-V4ANLRAA.cjs → rsc-pipeline-7K5H2RPH.cjs} +27 -26
- package/dist/{runtime-LRIQ3XH7.mjs → runtime-U7O3HZOZ.mjs} +62 -36
- package/dist/{runtime-5AROV2C3.cjs → runtime-X52Q7JFR.cjs} +72 -46
- package/dist/{runtime.d-wvh4ngU0.d.mts → runtime.d-BxQIzwfy.d.mts} +11 -3
- package/dist/{runtime.d-C3RQUj6_.d.ts → runtime.d-DP7mEkEF.d.ts} +11 -3
- package/dist/{schema-dev-notice-JMXEQWIQ.mjs → schema-dev-notice-C2JINRZI.mjs} +3 -2
- package/dist/{schema-dev-notice-PLBFDTOF.cjs → schema-dev-notice-X7GG7QVB.cjs} +5 -4
- package/dist/schema.cjs +6 -2
- package/dist/schema.d-Dny9pnrm.d.mts +298 -0
- package/dist/schema.d-Dny9pnrm.d.ts +298 -0
- package/dist/schema.d.mts +1 -115
- package/dist/schema.d.ts +1 -115
- package/dist/schema.mjs +5 -1
- package/dist/server-fn-client.d.mts +2 -2
- package/dist/server-fn-client.d.ts +2 -2
- package/dist/server-fn.cjs +5 -5
- package/dist/server-fn.mjs +4 -4
- package/dist/server-plugins.cjs +7 -7
- package/dist/server-plugins.d.mts +16 -10
- package/dist/server-plugins.d.ts +16 -10
- package/dist/server-plugins.mjs +8 -8
- package/dist/server-query.cjs +6 -6
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +160 -120
- package/dist/server.d.mts +20 -14
- package/dist/server.d.ts +20 -14
- package/dist/server.mjs +138 -98
- package/dist/{spa-router.d-WU_qS5gJ.d.mts → spa-router.d-BgHPVMhz.d.mts} +15 -5
- package/dist/{spa-router.d-m8H_Kl_B.d.ts → spa-router.d-DsFDHTsv.d.ts} +15 -5
- package/dist/testing.cjs +17 -17
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +13 -13
- package/dist/theme/server.cjs +3 -3
- package/dist/theme/server.mjs +2 -2
- package/dist/{utils.d-W9IiEqmW.d.mts → utils.d-BKyKDBR1.d.mts} +1 -1
- package/dist/{utils.d-C9dQD5Zg.d.ts → utils.d-zxAVcf_V.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +63 -61
- package/dist/vite.d.mts +32 -12
- package/dist/vite.d.ts +32 -12
- package/dist/vite.mjs +62 -60
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +31 -1
- package/dist/analyzer-GHWK46LX.cjs +0 -16
- package/dist/chunk-5YPBFMBN.cjs +0 -19
- package/dist/chunk-OM7WILES.mjs +0 -100
- package/dist/chunk-Q5B4LNON.mjs +0 -19
- package/dist/chunk-QPJ4MZTO.mjs +0 -60
- package/dist/chunk-R53QDV6T.cjs +0 -100
- package/dist/chunk-UYTAP4FQ.cjs +0 -60
- package/dist/manager-2LUKNX2N.cjs +0 -14
- /package/dist/{chunk-QGOZLGVP.mjs → chunk-I6FIAWNT.mjs} +0 -0
- /package/dist/{chunk-XPIPMWY3.cjs → chunk-K5NI5YQR.cjs} +0 -0
- /package/dist/{chunk-NWUHS6GV.cjs → chunk-QEJWNXRI.cjs} +0 -0
- /package/dist/{chunk-FSXSQQTV.mjs → chunk-TXE4SAMV.mjs} +0 -0
- /package/dist/{chunk-ZXK2EYQW.cjs → chunk-UUQNJDGH.cjs} +0 -0
- /package/dist/{chunk-46P5KNTE.mjs → chunk-VZBAW44S.mjs} +0 -0
|
@@ -10,95 +10,96 @@ require('./chunk-SVXOCTQ2.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkQGQP6QKOcjs = require('./chunk-QGQP6QKO.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkE5UN4OWXcjs = require('./chunk-E5UN4OWX.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
var _chunkWBTHHTBOcjs = require('./chunk-WBTHHTBO.cjs');
|
|
22
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-J7JHVCWA.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk556H7JCEcjs = require('./chunk-556H7JCE.cjs');
|
|
27
27
|
require('./chunk-OZC2JPW6.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
var _chunkEGIY4A7Vcjs = require('./chunk-EGIY4A7V.cjs');
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
39
|
-
require('./chunk-
|
|
38
|
+
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
39
|
+
require('./chunk-AQIRXBBY.cjs');
|
|
40
40
|
require('./chunk-UVV3I5QA.cjs');
|
|
41
|
-
require('./chunk-
|
|
41
|
+
require('./chunk-22IWL4YD.cjs');
|
|
42
42
|
require('./chunk-LSHX2H5G.cjs');
|
|
43
43
|
require('./chunk-STF6VDYQ.cjs');
|
|
44
|
-
require('./chunk-
|
|
45
|
-
require('./chunk-6JHZPB52.cjs');
|
|
44
|
+
require('./chunk-4E57QHPW.cjs');
|
|
46
45
|
require('./chunk-BTVDYS4B.cjs');
|
|
47
|
-
require('./chunk-
|
|
46
|
+
require('./chunk-QO43L7Z4.cjs');
|
|
47
|
+
require('./chunk-6JHZPB52.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
var
|
|
57
|
-
require('./chunk-
|
|
56
|
+
var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
|
|
57
|
+
require('./chunk-MCSRMEQV.cjs');
|
|
58
|
+
require('./chunk-YAEN3L2F.cjs');
|
|
59
|
+
require('./chunk-4P5634G6.cjs');
|
|
58
60
|
require('./chunk-3EIPOTZV.cjs');
|
|
59
61
|
require('./chunk-2HW5LWAH.cjs');
|
|
60
|
-
require('./chunk-
|
|
62
|
+
require('./chunk-FT6KJHS3.cjs');
|
|
61
63
|
require('./chunk-DQJ2CIH7.cjs');
|
|
62
|
-
require('./chunk-
|
|
63
|
-
require('./chunk-BT4SEFLC.cjs');
|
|
64
|
+
require('./chunk-KCY52OUQ.cjs');
|
|
64
65
|
require('./chunk-2KMIJDY6.cjs');
|
|
65
|
-
require('./chunk-4P5634G6.cjs');
|
|
66
66
|
require('./chunk-SHIWRBFI.cjs');
|
|
67
67
|
require('./chunk-WT6RAN2I.cjs');
|
|
68
|
-
require('./chunk-
|
|
68
|
+
require('./chunk-BDYM2TN3.cjs');
|
|
69
69
|
require('./chunk-DUIP64BF.cjs');
|
|
70
70
|
require('./chunk-ZOYKJBP5.cjs');
|
|
71
|
-
require('./chunk-
|
|
71
|
+
require('./chunk-UUQNJDGH.cjs');
|
|
72
|
+
require('./chunk-J6TZRYCO.cjs');
|
|
72
73
|
require('./chunk-ZDAEHG2O.cjs');
|
|
73
|
-
require('./chunk-
|
|
74
|
+
require('./chunk-JWLRBDDC.cjs');
|
|
74
75
|
require('./chunk-5DX3O6TT.cjs');
|
|
75
|
-
require('./chunk-
|
|
76
|
+
require('./chunk-QEJWNXRI.cjs');
|
|
76
77
|
require('./chunk-LRB5OVRT.cjs');
|
|
77
|
-
require('./chunk-
|
|
78
|
-
require('./chunk-OYZXVBZP.cjs');
|
|
79
|
-
require('./chunk-ITV4QQL2.cjs');
|
|
78
|
+
require('./chunk-C6CUUBY5.cjs');
|
|
80
79
|
require('./chunk-FEFCISOX.cjs');
|
|
80
|
+
require('./chunk-E7QOEV5Z.cjs');
|
|
81
|
+
require('./chunk-IUKBPBM7.cjs');
|
|
82
|
+
require('./chunk-YIHRZBD7.cjs');
|
|
81
83
|
require('./chunk-LNVGXUL3.cjs');
|
|
82
84
|
require('./chunk-QMNWKQL4.cjs');
|
|
83
|
-
require('./chunk-SUCDVKUB.cjs');
|
|
84
|
-
require('./chunk-EVIWKPJV.cjs');
|
|
85
|
-
require('./chunk-YIHRZBD7.cjs');
|
|
86
85
|
require('./chunk-2OF5RPVU.cjs');
|
|
87
86
|
require('./chunk-CFG4QERR.cjs');
|
|
88
87
|
require('./chunk-JYT7AN37.cjs');
|
|
88
|
+
require('./chunk-SUCDVKUB.cjs');
|
|
89
|
+
require('./chunk-EVIWKPJV.cjs');
|
|
89
90
|
require('./chunk-HA7YRO53.cjs');
|
|
90
91
|
require('./chunk-CA7DNRHO.cjs');
|
|
91
92
|
require('./chunk-PMJSG4JS.cjs');
|
|
92
93
|
require('./chunk-R5U7OIPI.cjs');
|
|
93
94
|
require('./chunk-6FXBJPF5.cjs');
|
|
94
|
-
require('./chunk-
|
|
95
|
+
require('./chunk-F43OG25P.cjs');
|
|
95
96
|
require('./chunk-UZCMMJJT.cjs');
|
|
96
|
-
require('./chunk-
|
|
97
|
+
require('./chunk-PWKAX5MS.cjs');
|
|
97
98
|
require('./chunk-A25FXJ7D.cjs');
|
|
98
|
-
require('./chunk-7JUIK547.cjs');
|
|
99
|
-
require('./chunk-HNAISJFD.cjs');
|
|
100
99
|
require('./chunk-6CTFVBAT.cjs');
|
|
100
|
+
require('./chunk-HDPT6OYE.cjs');
|
|
101
101
|
require('./chunk-3BIASUGR.cjs');
|
|
102
|
+
require('./chunk-7JUIK547.cjs');
|
|
102
103
|
require('./chunk-OWQV6MLM.cjs');
|
|
103
104
|
|
|
104
105
|
|
|
@@ -995,18 +996,18 @@ async function renderFarmMobilePageShells(options) {
|
|
|
995
996
|
const queue = [...new Set(options.routes)].sort();
|
|
996
997
|
const render = async (route) => {
|
|
997
998
|
const response = await options.fetch(
|
|
998
|
-
`${options.basePath}${
|
|
999
|
+
`${options.basePath}${_chunkQGQP6QKOcjs.createFarmMobileShellRenderPath.call(void 0, route)}`,
|
|
999
1000
|
{
|
|
1000
1001
|
headers: {
|
|
1001
1002
|
Accept: "text/html",
|
|
1002
|
-
[
|
|
1003
|
-
[
|
|
1004
|
-
[
|
|
1003
|
+
[_chunkQGQP6QKOcjs.FARM_SHELL_HEADER]: options.os,
|
|
1004
|
+
[_chunkQGQP6QKOcjs.FARM_SHELL_RENDER_HEADER]: options.token,
|
|
1005
|
+
[_chunkQGQP6QKOcjs.FARM_SHELL_ROUTE_HEADER]: route
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
1008
|
);
|
|
1008
1009
|
const body = await response.text();
|
|
1009
|
-
if (response.headers.get(
|
|
1010
|
+
if (response.headers.get(_chunkQGQP6QKOcjs.FARM_SHELL_RENDER_HEADER) === "none") {
|
|
1010
1011
|
skipped.push({ route, reason: body.trim() || "the server rendered no shell" });
|
|
1011
1012
|
return;
|
|
1012
1013
|
}
|
|
@@ -1105,7 +1106,7 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1105
1106
|
const root = path2.resolve(_nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'access', _76 => _76.config, 'optionalAccess', _77 => _77.root]), () => ( options.root)), () => ( process.cwd())));
|
|
1106
1107
|
const command = _nullishCoalesce(options.command, () => ( "build"));
|
|
1107
1108
|
const mode = command === "dev" ? "development" : "production";
|
|
1108
|
-
const userConfig = options.userConfig === void 0 ? await
|
|
1109
|
+
const userConfig = options.userConfig === void 0 ? await _chunk556H7JCEcjs.loadConfig.call(void 0, root, void 0, mode) : options.userConfig;
|
|
1109
1110
|
if (_optionalChain([userConfig, 'optionalAccess', _78 => _78.mobile]) === void 0) {
|
|
1110
1111
|
throw new FarmMobileError(
|
|
1111
1112
|
'farm.config.ts has no `mobile` entry. Add one, such as `mobile: { id: "com.example.notes", server: "https://notes.example.com" }`.'
|
|
@@ -1119,12 +1120,12 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1119
1120
|
mode
|
|
1120
1121
|
});
|
|
1121
1122
|
const block = await resolveFarmMobileBlock(userConfig.mobile, context, options.cache);
|
|
1122
|
-
const config = await _asyncNullishCoalesce(options.config, async () => ( await
|
|
1123
|
-
const scan = await
|
|
1123
|
+
const config = await _asyncNullishCoalesce(options.config, async () => ( await _chunk556H7JCEcjs.resolveConfig.call(void 0, { ...userConfig, root }, mode)));
|
|
1124
|
+
const scan = await _chunkEGIY4A7Vcjs.scanRoutePatterns.call(void 0, {
|
|
1124
1125
|
root,
|
|
1125
1126
|
srcDir: config.srcDir,
|
|
1126
1127
|
sourceRoots: _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, config),
|
|
1127
|
-
componentExtensions:
|
|
1128
|
+
componentExtensions: _chunk67MZTLTFcjs.getFarmRendererComponentExtensions.call(void 0, config.renderer),
|
|
1128
1129
|
platformFiles: true
|
|
1129
1130
|
});
|
|
1130
1131
|
const routes = [...scan.pages, ...scan.nativeOnlyPages].sort();
|
|
@@ -1187,14 +1188,14 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1187
1188
|
return decision.source === "default" || decision.requested !== void 0;
|
|
1188
1189
|
});
|
|
1189
1190
|
const portable = mobile.native.engine !== "platform" && (mobile.native.auto === "on" || candidates.some((route) => screens[route].requested === "native"));
|
|
1190
|
-
const { analyzeFarmMobileRoutes } = await import("./analyzer-
|
|
1191
|
+
const { analyzeFarmMobileRoutes } = await import("./analyzer-KVZGVY5Q.cjs");
|
|
1191
1192
|
const analyzed = await analyzeFarmMobileRoutes({
|
|
1192
1193
|
root,
|
|
1193
1194
|
srcDir: config.srcDir,
|
|
1194
1195
|
routes: portable ? routes : candidates,
|
|
1195
1196
|
pageFiles: scan.pageFiles,
|
|
1196
1197
|
nativeOnlyRoutes: scan.nativeOnlyPages,
|
|
1197
|
-
serverComponents:
|
|
1198
|
+
serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) !== void 0,
|
|
1198
1199
|
cacheFile: path2.resolve(root, getFarmMobileOutputDirs(config.distDir).analyzerCache)
|
|
1199
1200
|
});
|
|
1200
1201
|
analyzerStats = analyzed.stats;
|
|
@@ -1207,7 +1208,7 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1207
1208
|
)
|
|
1208
1209
|
};
|
|
1209
1210
|
if (portable) {
|
|
1210
|
-
const { emitFarmMobilePort } = await import("./port-
|
|
1211
|
+
const { emitFarmMobilePort } = await import("./port-HASZTQGY.cjs");
|
|
1211
1212
|
const portsDir = path2.resolve(root, getFarmMobileOutputDirs(config.distDir).ports);
|
|
1212
1213
|
for (const analysis of Object.values(result.routes)) {
|
|
1213
1214
|
const graph = result.graphs[analysis.route];
|
|
@@ -1256,6 +1257,31 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1256
1257
|
analysis: result.routes
|
|
1257
1258
|
});
|
|
1258
1259
|
}
|
|
1260
|
+
const reserved = [];
|
|
1261
|
+
if (mobile.native.islands.length > 0) {
|
|
1262
|
+
reserved.push(
|
|
1263
|
+
`mobile.native.islands is reserved: no native islands render yet, so these stay web components: ${mobile.native.islands.join(", ")}.`
|
|
1264
|
+
);
|
|
1265
|
+
}
|
|
1266
|
+
if (Object.keys(mobile.native.budgets).length > 0) {
|
|
1267
|
+
reserved.push(
|
|
1268
|
+
"mobile.native.budgets is reserved: nothing measures app size, screen open time, or dropped frames yet."
|
|
1269
|
+
);
|
|
1270
|
+
}
|
|
1271
|
+
for (const page of pageExports.values()) {
|
|
1272
|
+
if (page.config.prefetch === "intent") {
|
|
1273
|
+
reserved.push(
|
|
1274
|
+
`${page.file}: mobile.prefetch "intent" has no effect yet: the shell does not prefetch a route's data.`
|
|
1275
|
+
);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
for (const files of scan.nativeLayouts.values()) {
|
|
1279
|
+
for (const file of Object.values(files)) {
|
|
1280
|
+
reserved.push(
|
|
1281
|
+
`${path2.relative(root, file).split(path2.sep).join("/")}: layout.native files are reserved: nothing renders them yet, though the analyzer reads one in place of that folder's layout.`
|
|
1282
|
+
);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1259
1285
|
const nativeLayouts = Object.fromEntries(
|
|
1260
1286
|
[...scan.nativeLayouts].sort().map(([route, files]) => [
|
|
1261
1287
|
route,
|
|
@@ -1288,7 +1314,7 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1288
1314
|
manifest,
|
|
1289
1315
|
config,
|
|
1290
1316
|
screens,
|
|
1291
|
-
warnings,
|
|
1317
|
+
warnings: [...reserved, ...warnings],
|
|
1292
1318
|
nativeLayouts,
|
|
1293
1319
|
pageFiles: scan.pageFiles,
|
|
1294
1320
|
ports: Object.fromEntries(ports),
|
|
@@ -1345,4 +1371,4 @@ async function generateFarmMobileRoutes(options = {}) {
|
|
|
1345
1371
|
|
|
1346
1372
|
|
|
1347
1373
|
|
|
1348
|
-
exports.FARM_SHELL_PARAM_SEGMENT =
|
|
1374
|
+
exports.FARM_SHELL_PARAM_SEGMENT = _chunkQGQP6QKOcjs.FARM_SHELL_PARAM_SEGMENT; exports.FARM_SHELL_RENDER_HEADER = _chunkQGQP6QKOcjs.FARM_SHELL_RENDER_HEADER; exports.FARM_SHELL_ROUTE_HEADER = _chunkQGQP6QKOcjs.FARM_SHELL_ROUTE_HEADER; exports.FarmMobileError = FarmMobileError; exports.createFarmMobileContext = createFarmMobileContext; exports.createFarmMobileModuleId = createFarmMobileModuleId; exports.createFarmMobilePageShell = createFarmMobilePageShell; exports.createFarmMobileRouteManifest = createFarmMobileRouteManifest; exports.createFarmMobileRoutePattern = createFarmMobileRoutePattern; exports.createFarmMobileShellRenderPath = _chunkQGQP6QKOcjs.createFarmMobileShellRenderPath; exports.formatFarmMobileNativeReport = formatFarmMobileNativeReport; exports.generateFarmMobileRoutes = generateFarmMobileRoutes; exports.getFarmMobileOutputDirs = getFarmMobileOutputDirs; exports.getFarmMobilePageShellFile = getFarmMobilePageShellFile; exports.readFarmMobileClientManifest = _chunkE5UN4OWXcjs.readFarmMobileClientManifest; exports.readFarmMobilePageExport = readFarmMobilePageExport; exports.renderFarmMobilePageShells = renderFarmMobilePageShells; exports.resolveFarmMobileApp = resolveFarmMobileApp; exports.resolveFarmMobileBlock = resolveFarmMobileBlock; exports.resolveFarmMobileConfig = resolveFarmMobileConfig; exports.resolveFarmMobileScreens = resolveFarmMobileScreens; exports.validateFarmMobileConfig = validateFarmMobileConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as EndpointFailure } from './endpoint.d-BkMSCRf6.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { k as PluginRoutesFactory } from './route.d-DrXkpvcg.mjs';
|
|
3
3
|
import { b as APIRouteParams, A as APIRouteMatch } from './route-pattern.d-CVsVbq5n.mjs';
|
|
4
|
-
import './client-plugins.d-
|
|
4
|
+
import './client-plugins.d-BNILjfX3.mjs';
|
|
5
5
|
|
|
6
6
|
interface MountedRoute {
|
|
7
7
|
path: string;
|
|
@@ -64,6 +64,14 @@ declare function isFarmAPIPathname(pathname: string, serverBasePath?: string): b
|
|
|
64
64
|
declare function invokeAPIRouteEndpoint(endpoint: any, request: Request, params?: APIRouteParams, bodySizeLimit?: number): Promise<Response>;
|
|
65
65
|
declare function normalizeRouteResponse(result: unknown): Response;
|
|
66
66
|
declare function isWebResponse(value: unknown): value is Response;
|
|
67
|
+
/**
|
|
68
|
+
* @internal The JSON body of the generic `500` Farm answers when an API route, a docs API
|
|
69
|
+
* route, or app middleware throws. It is the production entry's body, so `farm dev` sends the
|
|
70
|
+
* same one. Typed endpoint failures answer {@link createEndpointFailureResponse} instead.
|
|
71
|
+
*/
|
|
72
|
+
declare const FARM_INTERNAL_SERVER_ERROR_BODY: string;
|
|
73
|
+
/** @internal The generic `500` response, with {@link FARM_INTERNAL_SERVER_ERROR_BODY}. */
|
|
74
|
+
declare function createFarmInternalServerErrorResponse(): Response;
|
|
67
75
|
declare function createEndpointFailureResponse(failure: EndpointFailure<string, unknown>): Response;
|
|
68
76
|
|
|
69
|
-
export { API_ROUTE_METHODS as A, type PluginAPIDispatch as P, isWebResponse as a, type APIRouteShapeSource as b, createEndpointFailureResponse as c,
|
|
77
|
+
export { API_ROUTE_METHODS as A, FARM_INTERNAL_SERVER_ERROR_BODY as F, type PluginAPIDispatch as P, isWebResponse as a, type APIRouteShapeSource as b, createEndpointFailureResponse as c, createFarmInternalServerErrorResponse as d, createStaticAPIRouteMatcherAtBasePath as e, isFarmAPIPathname as f, getAllowedAPIRouteMethods as g, mergePluginAPIRoutes as h, invokeAPIRouteEndpoint as i, registerAPIRouteShape as j, matchAPIRouteAtBasePath as m, normalizeRouteResponse as n, resolveAPIRouteEndpoint as r };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as EndpointFailure } from './endpoint.d-BgHn0lhl.js';
|
|
2
|
-
import {
|
|
2
|
+
import { k as PluginRoutesFactory } from './route.d-hs-_cyHn.js';
|
|
3
3
|
import { b as APIRouteParams, A as APIRouteMatch } from './route-pattern.d-CVsVbq5n.js';
|
|
4
|
-
import './client-plugins.d-
|
|
4
|
+
import './client-plugins.d-CrKZiNSN.js';
|
|
5
5
|
|
|
6
6
|
interface MountedRoute {
|
|
7
7
|
path: string;
|
|
@@ -64,6 +64,14 @@ declare function isFarmAPIPathname(pathname: string, serverBasePath?: string): b
|
|
|
64
64
|
declare function invokeAPIRouteEndpoint(endpoint: any, request: Request, params?: APIRouteParams, bodySizeLimit?: number): Promise<Response>;
|
|
65
65
|
declare function normalizeRouteResponse(result: unknown): Response;
|
|
66
66
|
declare function isWebResponse(value: unknown): value is Response;
|
|
67
|
+
/**
|
|
68
|
+
* @internal The JSON body of the generic `500` Farm answers when an API route, a docs API
|
|
69
|
+
* route, or app middleware throws. It is the production entry's body, so `farm dev` sends the
|
|
70
|
+
* same one. Typed endpoint failures answer {@link createEndpointFailureResponse} instead.
|
|
71
|
+
*/
|
|
72
|
+
declare const FARM_INTERNAL_SERVER_ERROR_BODY: string;
|
|
73
|
+
/** @internal The generic `500` response, with {@link FARM_INTERNAL_SERVER_ERROR_BODY}. */
|
|
74
|
+
declare function createFarmInternalServerErrorResponse(): Response;
|
|
67
75
|
declare function createEndpointFailureResponse(failure: EndpointFailure<string, unknown>): Response;
|
|
68
76
|
|
|
69
|
-
export { API_ROUTE_METHODS as A, type PluginAPIDispatch as P, isWebResponse as a, type APIRouteShapeSource as b, createEndpointFailureResponse as c,
|
|
77
|
+
export { API_ROUTE_METHODS as A, FARM_INTERNAL_SERVER_ERROR_BODY as F, type PluginAPIDispatch as P, isWebResponse as a, type APIRouteShapeSource as b, createEndpointFailureResponse as c, createFarmInternalServerErrorResponse as d, createStaticAPIRouteMatcherAtBasePath as e, isFarmAPIPathname as f, getAllowedAPIRouteMethods as g, mergePluginAPIRoutes as h, invokeAPIRouteEndpoint as i, registerAPIRouteShape as j, matchAPIRouteAtBasePath as m, normalizeRouteResponse as n, resolveAPIRouteEndpoint as r };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findSchemaTableOwners,
|
|
3
3
|
migrateSchemaTables
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-ZJGFAW5U.mjs";
|
|
5
|
+
import "./chunk-UTUS6JUH.mjs";
|
|
6
6
|
import "./chunk-WNLPQW7W.mjs";
|
|
7
7
|
import "./chunk-F3N52U7S.mjs";
|
|
8
|
+
import "./chunk-K63OWRY2.mjs";
|
|
8
9
|
import {
|
|
9
10
|
logger
|
|
10
11
|
} from "./chunk-JSDV2NUN.mjs";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkGDM3ZD2Ocjs = require('./chunk-GDM3ZD2O.cjs');
|
|
5
|
+
require('./chunk-2LHZD3OP.cjs');
|
|
6
6
|
require('./chunk-SHD265HW.cjs');
|
|
7
7
|
require('./chunk-GBMWLDCC.cjs');
|
|
8
|
+
require('./chunk-J6TZRYCO.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
@@ -17,12 +18,12 @@ require('./chunk-BTZ5O6VM.cjs');
|
|
|
17
18
|
async function noticePendingSchemaChanges(config, options = {}) {
|
|
18
19
|
const lines = [];
|
|
19
20
|
try {
|
|
20
|
-
const owners =
|
|
21
|
+
const owners = _chunkGDM3ZD2Ocjs.findSchemaTableOwners.call(void 0, config);
|
|
21
22
|
const timeoutMs = _nullishCoalesce(options.timeoutMs, () => ( 5e3));
|
|
22
23
|
for (const owner of owners) {
|
|
23
24
|
try {
|
|
24
25
|
const result = await withTimeout(
|
|
25
|
-
|
|
26
|
+
_chunkGDM3ZD2Ocjs.migrateSchemaTables.call(void 0, owner, { config, log: () => {
|
|
26
27
|
} }),
|
|
27
28
|
timeoutMs
|
|
28
29
|
);
|
package/dist/schema.cjs
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUUQNJDGHcjs = require('./chunk-UUQNJDGH.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkJ6TZRYCOcjs = require('./chunk-J6TZRYCO.cjs');
|
|
4
7
|
require('./chunk-BTZ5O6VM.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
|
|
11
|
+
exports.declareSchemaTables = _chunkJ6TZRYCOcjs.declareSchemaTables; exports.defineSchema = _chunkUUQNJDGHcjs.defineSchema;
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
type ResolvedSchemaField = FarmSchemaField & {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
4
|
+
type ResolvedSchemaModel = Omit<FarmSchemaModel, "fields"> & {
|
|
5
|
+
name: string;
|
|
6
|
+
fields: Record<string, ResolvedSchemaField>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Resolve a schema's extensions, overrides, and name mappings.
|
|
10
|
+
*
|
|
11
|
+
* Table and column names fall back to the schema's own keys, which is what the
|
|
12
|
+
* runtime ORM uses. Any other default would generate artifacts describing
|
|
13
|
+
* tables the app cannot actually read.
|
|
14
|
+
*/
|
|
15
|
+
declare function resolveSchemaModels(ownerKey: string, schema: FarmSchema): Record<string, ResolvedSchemaModel>;
|
|
16
|
+
|
|
17
|
+
type FarmSqlDialect = "postgres" | "mysql" | "sqlite";
|
|
18
|
+
type CollectedSchemaModel = {
|
|
19
|
+
/** Namespace that owns the model: an integration key or a plugin name. */
|
|
20
|
+
ownerKey: string;
|
|
21
|
+
modelKey: string;
|
|
22
|
+
modelName: string;
|
|
23
|
+
exportName: string;
|
|
24
|
+
prismaModelName: string;
|
|
25
|
+
model: ResolvedSchemaModel;
|
|
26
|
+
/**
|
|
27
|
+
* Real table and column for references to models this owner describes but
|
|
28
|
+
* does not create (external, or outside its `models`), keyed by field. Only
|
|
29
|
+
* shown in comments: Farm never creates a foreign key to them.
|
|
30
|
+
*/
|
|
31
|
+
referenceTargets?: Record<string, {
|
|
32
|
+
table: string;
|
|
33
|
+
column: string;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* References to tables other owners create that may carry a real foreign
|
|
37
|
+
* key, keyed by field. Set by migrate after checking the database; only a
|
|
38
|
+
* table created now gets one inline.
|
|
39
|
+
*/
|
|
40
|
+
foreignKeys?: Record<string, {
|
|
41
|
+
table: string;
|
|
42
|
+
column: string;
|
|
43
|
+
onDelete: NonNullable<FarmSchemaReference["onDelete"]>;
|
|
44
|
+
}>;
|
|
45
|
+
};
|
|
46
|
+
/** `table.column` a field's reference points at, using real names when known. */
|
|
47
|
+
declare function describeSchemaReference(model: CollectedSchemaModel, fieldKey: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Flatten owners' schemas into one list, rejecting two models that would
|
|
50
|
+
* resolve to the same table.
|
|
51
|
+
*
|
|
52
|
+
* `only` narrows an owner to the models it actually controls; an owner handed a
|
|
53
|
+
* schema it shares with the rest of the app should not claim all of it.
|
|
54
|
+
*/
|
|
55
|
+
declare function collectSchemaModels(entries: ReadonlyArray<readonly [string, FarmSchema, (readonly string[])?]>): CollectedSchemaModel[];
|
|
56
|
+
type FarmSqlStatement = {
|
|
57
|
+
kind: "table" | "index" | "column";
|
|
58
|
+
/** The object this statement creates, for drift reporting. */
|
|
59
|
+
target: string;
|
|
60
|
+
sql: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Emit create statements for a set of models.
|
|
64
|
+
*
|
|
65
|
+
* Everything here is derivable from the schema: nothing is inferred from a live
|
|
66
|
+
* database, so the output is stable and reviewable before it is applied.
|
|
67
|
+
*/
|
|
68
|
+
declare function generateSqlStatements(models: readonly CollectedSchemaModel[], dialect: FarmSqlDialect): FarmSqlStatement[];
|
|
69
|
+
/** Render models as a standalone `.sql` file. */
|
|
70
|
+
declare function renderSqlSchemaFile(models: readonly CollectedSchemaModel[], dialect: FarmSqlDialect): string;
|
|
71
|
+
declare function getSqlColumnType(field: ResolvedSchemaField, dialect: FarmSqlDialect): "BOOLEAN" | "INTEGER" | "DOUBLE PRECISION" | "TIMESTAMPTZ" | "JSONB" | "TEXT" | "INT" | "DOUBLE" | "DATETIME" | "JSON" | "VARCHAR(255)" | "REAL";
|
|
72
|
+
declare function getSqlDefaultExpression(field: ResolvedSchemaField, dialect: FarmSqlDialect): string | null;
|
|
73
|
+
declare function isNullableField(field: ResolvedSchemaField): boolean;
|
|
74
|
+
declare function quoteSqlIdentifier(dialect: FarmSqlDialect, value: string): string;
|
|
75
|
+
declare function toSnakeCase(value: string): string;
|
|
76
|
+
declare function toPascalCase(value: string): string;
|
|
77
|
+
declare function toCamelCase(value: string): string;
|
|
78
|
+
declare function escapeSqlString(value: string, dialect?: FarmSqlDialect): string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* An ordered change a plugin release makes to its own tables that Farm will
|
|
82
|
+
* not infer: a rename looks exactly like a removal plus an addition. Each step
|
|
83
|
+
* runs once per database, in the order listed.
|
|
84
|
+
*
|
|
85
|
+
* Names are the plugin's own: `model` and `to` are keys in the current
|
|
86
|
+
* schema, so the app's renames apply; `from` is the old name in the database.
|
|
87
|
+
*/
|
|
88
|
+
type FarmSchemaMigrationStep = {
|
|
89
|
+
id: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
} & ({
|
|
92
|
+
renameColumn: {
|
|
93
|
+
model: string;
|
|
94
|
+
from: string;
|
|
95
|
+
to: string;
|
|
96
|
+
};
|
|
97
|
+
} | {
|
|
98
|
+
renameTable: {
|
|
99
|
+
from: string;
|
|
100
|
+
to: string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Deletes data, so it runs only with `--allow-destructive`, and only on a
|
|
105
|
+
* column or table Farm recorded this plugin creating.
|
|
106
|
+
*/
|
|
107
|
+
| {
|
|
108
|
+
dropColumn: {
|
|
109
|
+
model: string;
|
|
110
|
+
column: string;
|
|
111
|
+
};
|
|
112
|
+
} | {
|
|
113
|
+
dropTable: {
|
|
114
|
+
table: string;
|
|
115
|
+
};
|
|
116
|
+
} | {
|
|
117
|
+
/** Per dialect; a dialect without SQL cannot run the step. */
|
|
118
|
+
sql: Partial<Record<FarmSqlDialect, string | readonly string[]>>;
|
|
119
|
+
/**
|
|
120
|
+
* Custom SQL runs after this release's new tables and columns exist, so
|
|
121
|
+
* a backfill can fill them. Set `before` to run it with the renames.
|
|
122
|
+
*/
|
|
123
|
+
before?: boolean;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Attached to a plugin or integration to say "I own these tables".
|
|
128
|
+
*
|
|
129
|
+
* Read by tooling so it can reach an already-resolved schema and connection
|
|
130
|
+
* instead of re-reading and re-validating configuration.
|
|
131
|
+
*
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
declare const FARM_SCHEMA_TABLES: unique symbol;
|
|
135
|
+
/** @internal What `definePlugin({ schema })` records on a plugin. */
|
|
136
|
+
interface FarmSchemaTablesDeclaration {
|
|
137
|
+
/** Command namespace: this is the `<name>` in `farm <name> migrate`. */
|
|
138
|
+
name: string;
|
|
139
|
+
/** The schema whose models this owner stores. */
|
|
140
|
+
schema: FarmSchema;
|
|
141
|
+
/**
|
|
142
|
+
* Model keys this owner actually controls. Defaults to every model in the
|
|
143
|
+
* schema; narrow it when an app shares one schema with the rest of its code.
|
|
144
|
+
*/
|
|
145
|
+
models?: readonly string[];
|
|
146
|
+
/**
|
|
147
|
+
* Resolves the configured database client, or the storage mount behind it.
|
|
148
|
+
*
|
|
149
|
+
* The app's resolved config is passed because an owner may read its
|
|
150
|
+
* connection from there rather than from its own options — an integration
|
|
151
|
+
* configured through `storage.client`, for example.
|
|
152
|
+
*/
|
|
153
|
+
resolveClient(config: FarmSchemaOwnerConfig): Promise<unknown>;
|
|
154
|
+
/** Set explicitly when the client's dialect cannot be detected. */
|
|
155
|
+
dialect?: FarmSqlDialect;
|
|
156
|
+
/** Owners whose tables must exist first, by owner name. */
|
|
157
|
+
dependsOn?: readonly string[];
|
|
158
|
+
/** The owner's release, shown when an upgrade changes its tables. */
|
|
159
|
+
version?: string;
|
|
160
|
+
/** Ordered steps for changes Farm does not infer, such as renames. */
|
|
161
|
+
migrations?: readonly FarmSchemaMigrationStep[];
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Record that a plugin or integration owns tables, so `farm <name> migrate`,
|
|
165
|
+
* `farm generate`, and `farm schema check` find them.
|
|
166
|
+
*
|
|
167
|
+
* @internal Not part of the plugin API: plugins set `schema` (and `database`)
|
|
168
|
+
* on `definePlugin`, which calls this. Exported for Farm's own packages and for
|
|
169
|
+
* code written against earlier betas.
|
|
170
|
+
*
|
|
171
|
+
* The declaration is non-enumerable, so it never reaches a config serializer or
|
|
172
|
+
* a plugin's own option spreading.
|
|
173
|
+
*/
|
|
174
|
+
declare function declareSchemaTables<TTarget extends object>(target: TTarget, declaration: FarmSchemaTablesDeclaration): TTarget;
|
|
175
|
+
/** @internal The declaration on a plugin, when it has one. */
|
|
176
|
+
declare function readSchemaTables(candidate: unknown): FarmSchemaTablesDeclaration | undefined;
|
|
177
|
+
/** What an owner may read when resolving its client. */
|
|
178
|
+
type FarmSchemaOwnerConfig = {
|
|
179
|
+
storage?: unknown;
|
|
180
|
+
integrations?: Record<string, unknown> | readonly unknown[];
|
|
181
|
+
[key: string]: unknown;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Farm's declarative data schema: a serializable description of models and
|
|
186
|
+
* fields shared by integrations, applications, ORM generation, and any feature
|
|
187
|
+
* that needs one schema story across storage targets.
|
|
188
|
+
*
|
|
189
|
+
* The shape is plain data, not code, so it can be inspected at build time,
|
|
190
|
+
* mapped onto an ORM schema, and serialized to other tooling.
|
|
191
|
+
*/
|
|
192
|
+
type FarmSchemaFieldType = "id" | "uuid" | "string" | "text" | "boolean" | "integer" | "number" | "datetime" | "json" | "enum";
|
|
193
|
+
interface FarmSchemaReference {
|
|
194
|
+
model: string;
|
|
195
|
+
field: string;
|
|
196
|
+
relation?: "belongsTo" | "hasOne" | "hasMany";
|
|
197
|
+
onDelete?: "cascade" | "restrict" | "setNull" | "noAction";
|
|
198
|
+
enforced?: "db" | "app" | "none";
|
|
199
|
+
}
|
|
200
|
+
interface FarmSchemaField {
|
|
201
|
+
type: FarmSchemaFieldType;
|
|
202
|
+
name?: string;
|
|
203
|
+
description?: string;
|
|
204
|
+
required?: boolean;
|
|
205
|
+
nullable?: boolean;
|
|
206
|
+
primaryKey?: boolean;
|
|
207
|
+
unique?: boolean;
|
|
208
|
+
index?: boolean;
|
|
209
|
+
list?: boolean;
|
|
210
|
+
default?: unknown;
|
|
211
|
+
values?: readonly string[];
|
|
212
|
+
reference?: FarmSchemaReference;
|
|
213
|
+
meta?: Record<string, unknown>;
|
|
214
|
+
}
|
|
215
|
+
interface FarmSchemaConstraint {
|
|
216
|
+
type: "unique" | "index";
|
|
217
|
+
fields: readonly string[];
|
|
218
|
+
name?: string;
|
|
219
|
+
meta?: Record<string, unknown>;
|
|
220
|
+
}
|
|
221
|
+
interface FarmSchemaModel {
|
|
222
|
+
name?: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
/**
|
|
225
|
+
* A table someone else creates, such as the app's or an auth library's
|
|
226
|
+
* `user`. It is described so references to it resolve to its real name, and
|
|
227
|
+
* so queries can read it, but Farm never creates it: migrate, generated ORM
|
|
228
|
+
* schemas, and conflict checks skip it.
|
|
229
|
+
*/
|
|
230
|
+
external?: boolean;
|
|
231
|
+
fields: Record<string, FarmSchemaField>;
|
|
232
|
+
constraints?: readonly FarmSchemaConstraint[];
|
|
233
|
+
meta?: Record<string, unknown>;
|
|
234
|
+
}
|
|
235
|
+
interface FarmSchemaModelExtension {
|
|
236
|
+
name?: string;
|
|
237
|
+
description?: string;
|
|
238
|
+
fields?: Record<string, FarmSchemaField>;
|
|
239
|
+
constraints?: readonly FarmSchemaConstraint[];
|
|
240
|
+
meta?: Record<string, unknown>;
|
|
241
|
+
}
|
|
242
|
+
interface FarmSchemaModelOverride {
|
|
243
|
+
name?: string;
|
|
244
|
+
description?: string;
|
|
245
|
+
fields?: Record<string, Partial<FarmSchemaField>>;
|
|
246
|
+
constraints?: readonly FarmSchemaConstraint[];
|
|
247
|
+
meta?: Record<string, unknown>;
|
|
248
|
+
}
|
|
249
|
+
interface FarmSchema {
|
|
250
|
+
models: Record<string, FarmSchemaModel>;
|
|
251
|
+
meta?: Record<string, unknown>;
|
|
252
|
+
extend?: Record<string, FarmSchemaModelExtension>;
|
|
253
|
+
override?: Record<string, FarmSchemaModelOverride>;
|
|
254
|
+
}
|
|
255
|
+
/** App-level rules for the tables plugins and integrations declare. */
|
|
256
|
+
interface FarmSchemaConfig {
|
|
257
|
+
/**
|
|
258
|
+
* Tables a plugin may add columns to, keyed by the plugin's migrate name.
|
|
259
|
+
* List the plugin's model names (`user`) or your real table names
|
|
260
|
+
* (`members_auth`). Without an entry, `farm <plugin> migrate` prints the
|
|
261
|
+
* `ALTER TABLE` and refuses to run it.
|
|
262
|
+
*
|
|
263
|
+
* ```ts
|
|
264
|
+
* schema: { allowExtend: { loyalty: ["user"] } }
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
allowExtend?: Record<string, readonly string[]>;
|
|
268
|
+
/**
|
|
269
|
+
* A plugin's existing tables that may get foreign keys to other plugins'
|
|
270
|
+
* tables, keyed by the plugin's migrate name. Tables created from now on
|
|
271
|
+
* get them automatically; an existing table may hold rows that point at
|
|
272
|
+
* nothing, so Farm checks for those first and adds the key only when allowed.
|
|
273
|
+
*
|
|
274
|
+
* ```ts
|
|
275
|
+
* schema: { allowForeignKeys: { billing: ["subscription"] } }
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
allowForeignKeys?: Record<string, readonly string[]>;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Declare a data schema with full type inference preserved.
|
|
282
|
+
*
|
|
283
|
+
* ```ts
|
|
284
|
+
* export const schema = defineSchema({
|
|
285
|
+
* models: {
|
|
286
|
+
* tasks: {
|
|
287
|
+
* fields: {
|
|
288
|
+
* id: { type: "uuid", primaryKey: true },
|
|
289
|
+
* title: { type: "string", required: true },
|
|
290
|
+
* },
|
|
291
|
+
* },
|
|
292
|
+
* },
|
|
293
|
+
* });
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
declare function defineSchema<TSchema extends FarmSchema>(schema: TSchema): TSchema;
|
|
297
|
+
|
|
298
|
+
export { renderSqlSchemaFile as A, resolveSchemaModels as B, type CollectedSchemaModel as C, toCamelCase as D, toPascalCase as E, type FarmSchemaField as F, toSnakeCase as G, type ResolvedSchemaField as R, type FarmSchema as a, type FarmSqlStatement as b, type FarmSqlDialect as c, type FarmSchemaMigrationStep as d, type FarmSchemaReference as e, type FarmSchemaOwnerConfig as f, type FarmSchemaTablesDeclaration as g, FARM_SCHEMA_TABLES as h, type FarmSchemaConfig as i, type FarmSchemaConstraint as j, type FarmSchemaFieldType as k, type FarmSchemaModel as l, type FarmSchemaModelExtension as m, type FarmSchemaModelOverride as n, type ResolvedSchemaModel as o, collectSchemaModels as p, declareSchemaTables as q, defineSchema as r, describeSchemaReference as s, escapeSqlString as t, generateSqlStatements as u, getSqlColumnType as v, getSqlDefaultExpression as w, isNullableField as x, quoteSqlIdentifier as y, readSchemaTables as z };
|