@xano/sdk 1.0.5 → 1.0.7

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.
Files changed (277) hide show
  1. package/CHANGELOG.md +35 -5
  2. package/README.md +56 -20
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/{agent-file-refresh-KVLR7M5Y.js → agent-file-refresh-DGGSRPJ4.js} +15 -14
  5. package/dist/agent-skill-command-37DFYS7Q.js +414 -0
  6. package/dist/{answer-shape-XGR2DGWY.js → answer-shape-RBFDCNZ7.js} +5 -5
  7. package/dist/{backend-dir-IE4RMUFH.js → backend-dir-KDD43X7K.js} +16 -15
  8. package/dist/{backend-slot-6HBWG5FN.js → backend-slot-TBOVZXDE.js} +4 -4
  9. package/dist/bin.js +63 -61
  10. package/dist/{branch-T2APKPVG.js → branch-7PIKNUD7.js} +12 -11
  11. package/dist/{branch-commands-HXXTCSOO.js → branch-commands-EGY7ZEZE.js} +32 -32
  12. package/dist/bundle.js +9 -39
  13. package/dist/{capture-HBXFXZEW.js → capture-GW5KNKMB.js} +3 -3
  14. package/dist/{chunk-3BJYQGAZ.js → chunk-26LHXLD3.js} +2 -2
  15. package/dist/{chunk-N6BWB35H.js → chunk-2ACWDSAQ.js} +3 -3
  16. package/dist/{chunk-XIABDKFQ.js → chunk-2SD4LA22.js} +2 -2
  17. package/dist/{chunk-K6PRKPFX.js → chunk-2XWVZRL6.js} +7 -7
  18. package/dist/{chunk-ES5A66IH.js → chunk-2YER2J47.js} +13 -13
  19. package/dist/{chunk-G57RYMKB.js → chunk-3FRGNBOC.js} +2 -2
  20. package/dist/{chunk-BMCZQZMI.js → chunk-46PATL23.js} +13 -9
  21. package/dist/{chunk-MYLPOVX6.js → chunk-47XT6WQL.js} +8 -8
  22. package/dist/{chunk-AWQ7BQTQ.js → chunk-4GPIOIAC.js} +6 -1
  23. package/dist/{chunk-7GX445AE.js → chunk-4XHAT7C5.js} +2 -2
  24. package/dist/{chunk-QOLOQ35F.js → chunk-567KK6XF.js} +8 -8
  25. package/dist/{chunk-57HMNJGB.js → chunk-5GIOCDUM.js} +893 -922
  26. package/dist/{chunk-OKNE3TWU.js → chunk-5KJBWIDZ.js} +83 -5
  27. package/dist/{chunk-SRX6B544.js → chunk-5QMJOE2K.js} +5 -5
  28. package/dist/{chunk-AGD7F7YI.js → chunk-5SCPRXFB.js} +4 -4
  29. package/dist/{chunk-SNGFEESM.js → chunk-5ZG7V2VW.js} +3 -3
  30. package/dist/{chunk-XJU6UAFV.js → chunk-7FIMUFBP.js} +2 -2
  31. package/dist/{chunk-AESE434J.js → chunk-7M6JP3FS.js} +2 -2
  32. package/dist/{chunk-K6CB5TKM.js → chunk-7REDHC4N.js} +2 -2
  33. package/dist/chunk-7VR4IO5B.js +44 -0
  34. package/dist/{chunk-57B56I4B.js → chunk-7XXWKTCE.js} +65 -41
  35. package/dist/{chunk-PL7AIAWS.js → chunk-A4R5CAY4.js} +4 -111
  36. package/dist/{chunk-QZTJ2556.js → chunk-AKERAUNH.js} +4 -4
  37. package/dist/{chunk-JZWUAEMO.js → chunk-ARWMVNDJ.js} +6 -3
  38. package/dist/{chunk-WYS6XVZ3.js → chunk-AVS4WPPY.js} +2 -2
  39. package/dist/{chunk-KUU7T4ZE.js → chunk-B2URJBC4.js} +18 -18
  40. package/dist/chunk-B3P25SDP.js +78 -0
  41. package/dist/chunk-BRANWM4U.js +853 -0
  42. package/dist/{chunk-BBPAXOU6.js → chunk-BSVQEKHO.js} +6 -6
  43. package/dist/{chunk-3WHWOKU4.js → chunk-BZ6WTG3E.js} +4 -4
  44. package/dist/{chunk-XNZURZ7T.js → chunk-CH23ONYG.js} +77 -6
  45. package/dist/{chunk-SQPIECXD.js → chunk-CJDPSCMX.js} +45 -5
  46. package/dist/{chunk-M7GJ6YUF.js → chunk-CNZASQPL.js} +16 -2
  47. package/dist/{chunk-44CWK6YC.js → chunk-CPN6WSBH.js} +4 -4
  48. package/dist/{chunk-L3BDO2BI.js → chunk-CT3J5JRZ.js} +7 -7
  49. package/dist/{chunk-3HOGFGKG.js → chunk-D3KEPRRN.js} +2 -2
  50. package/dist/{chunk-OGUMHW2X.js → chunk-D5OZRJ3T.js} +7 -7
  51. package/dist/{chunk-S5KQIFKJ.js → chunk-DG3APBUJ.js} +208 -112
  52. package/dist/chunk-DIWF7L33.js +995 -0
  53. package/dist/{chunk-WRBKLYSJ.js → chunk-DNBP4GJN.js} +4 -3
  54. package/dist/{chunk-LZDA6SVD.js → chunk-DXZTL7NA.js} +141 -91
  55. package/dist/{chunk-XMDDBEEM.js → chunk-E763QI3G.js} +2 -2
  56. package/dist/{chunk-3VX7VAQT.js → chunk-EF4MHLEW.js} +26 -9
  57. package/dist/{chunk-AGSCOISO.js → chunk-ELPQTDW6.js} +108 -100
  58. package/dist/{chunk-Q22BMRPF.js → chunk-EPFDY5JU.js} +2 -2
  59. package/dist/{chunk-7DBM6XHR.js → chunk-EU32BC5B.js} +8 -8
  60. package/dist/{chunk-Y76ERHLK.js → chunk-FDTET7FZ.js} +6 -6
  61. package/dist/{chunk-Z3SNX45M.js → chunk-FENA7K7C.js} +3 -3
  62. package/dist/{chunk-WOGJB2F6.js → chunk-FNLTFOUD.js} +4 -9
  63. package/dist/{chunk-FV55SRQU.js → chunk-FQ53GTII.js} +9 -9
  64. package/dist/{chunk-DEVGLLNZ.js → chunk-GHMLRFRX.js} +8 -8
  65. package/dist/{chunk-GMVW6ZZK.js → chunk-H2K4GFUS.js} +4 -4
  66. package/dist/{chunk-NUU76247.js → chunk-HTQWAQRW.js} +3 -3
  67. package/dist/{chunk-ROY4YAEQ.js → chunk-HU7F56VF.js} +22 -2
  68. package/dist/{chunk-RXCT3OCU.js → chunk-HZ6ADG3O.js} +47 -8
  69. package/dist/{chunk-Z2BRSQ6M.js → chunk-I6XRUU6U.js} +91 -64
  70. package/dist/chunk-IPNN2KRW.js +257 -0
  71. package/dist/{chunk-SF2B7MZK.js → chunk-IYXL5NYU.js} +259 -31
  72. package/dist/chunk-JI3BLXWQ.js +107 -0
  73. package/dist/{chunk-4DJTQ6W4.js → chunk-JIKGT7DO.js} +2 -1
  74. package/dist/{chunk-OVV2HXJ6.js → chunk-JOOKM7AH.js} +2 -2
  75. package/dist/{chunk-65SW2BA5.js → chunk-JOWY6HFL.js} +3 -3
  76. package/dist/{chunk-I5VEROXW.js → chunk-JX6N73H3.js} +2 -2
  77. package/dist/{chunk-5D6DGF3W.js → chunk-L472YIGG.js} +8 -8
  78. package/dist/{chunk-HLQH3AXB.js → chunk-L6HZ67P6.js} +2 -2
  79. package/dist/{chunk-TM5LRSBB.js → chunk-LBJA7IEM.js} +370 -45
  80. package/dist/chunk-LCOCRJ4K.js +116 -0
  81. package/dist/{chunk-DGWHAVRG.js → chunk-LJM5CIY4.js} +16 -1
  82. package/dist/{chunk-5RLAF6RL.js → chunk-M2C54ZBC.js} +4 -4
  83. package/dist/{chunk-U6DR6464.js → chunk-M3NEK3LT.js} +4 -4
  84. package/dist/{chunk-5XVBT6CQ.js → chunk-MBL7CXJ7.js} +2 -2
  85. package/dist/{chunk-5YBNXNKU.js → chunk-MFWF2NZJ.js} +12 -5
  86. package/dist/{chunk-TEBS7FE6.js → chunk-MYZRMSPM.js} +2 -2
  87. package/dist/{chunk-YSLMMR2U.js → chunk-N3YFCFCO.js} +14 -14
  88. package/dist/{chunk-OJPZEUPH.js → chunk-NDJAKSE7.js} +11 -8
  89. package/dist/{chunk-PIPIA7K7.js → chunk-NV37YGOV.js} +7 -7
  90. package/dist/{chunk-ZHGWR45B.js → chunk-O56DQKPL.js} +9 -9
  91. package/dist/{chunk-4QBGE3EO.js → chunk-ORGNLQN6.js} +6 -6
  92. package/dist/{chunk-NNB7VUCH.js → chunk-PEIBGH2V.js} +55 -31
  93. package/dist/{chunk-UJ6ZZJDD.js → chunk-PEX4QZVI.js} +2 -2
  94. package/dist/{chunk-LLS2WO2K.js → chunk-PV25BDCH.js} +5 -5
  95. package/dist/{chunk-F3557PVM.js → chunk-PY722CHR.js} +2 -2
  96. package/dist/{chunk-4GDEEY2U.js → chunk-QGIZLFAS.js} +4 -4
  97. package/dist/{chunk-YI76TURL.js → chunk-QRQ54LUI.js} +16 -14
  98. package/dist/{chunk-JQOX6HW4.js → chunk-RBU2YX22.js} +3 -3
  99. package/dist/{chunk-4NEBBKOP.js → chunk-RRMH7WMY.js} +7 -7
  100. package/dist/{chunk-HOOOOJJP.js → chunk-S46ODQRA.js} +2 -2
  101. package/dist/{chunk-37FBPMNE.js → chunk-S56YBYMN.js} +5 -2
  102. package/dist/{chunk-4QFBEKXI.js → chunk-SDGV76HF.js} +2 -2
  103. package/dist/{chunk-CV54PASI.js → chunk-SGK3PTTM.js} +312 -132
  104. package/dist/{chunk-S5TEJIGP.js → chunk-SKEG3V2V.js} +2 -2
  105. package/dist/{chunk-VZ22VUAS.js → chunk-SLGJIWCY.js} +3 -3
  106. package/dist/{chunk-JSEVKRVJ.js → chunk-T4LJ5UR2.js} +29 -7
  107. package/dist/{chunk-JXKO6JT7.js → chunk-TWVUYS63.js} +24 -24
  108. package/dist/{chunk-UIEFE6FU.js → chunk-U5M7T6CI.js} +7 -7
  109. package/dist/{chunk-Z4VN347O.js → chunk-UYFUIHH3.js} +2 -2
  110. package/dist/{chunk-Y6NO3DLQ.js → chunk-V7MBRUK6.js} +3 -3
  111. package/dist/chunk-VAGSKUWC.js +67 -0
  112. package/dist/{chunk-A4NNCI4O.js → chunk-VIJ5D3RC.js} +3 -3
  113. package/dist/{chunk-3IYVHVM6.js → chunk-VJFMUJWZ.js} +4 -4
  114. package/dist/{chunk-V4IBHDIY.js → chunk-VNDR2T35.js} +7 -7
  115. package/dist/chunk-WAVNUTMT.js +9 -0
  116. package/dist/{chunk-KQLACS4Q.js → chunk-WNCW2RNB.js} +4 -4
  117. package/dist/chunk-WUEPP5HD.js +111 -0
  118. package/dist/{chunk-IV446ZLJ.js → chunk-Y453TW6J.js} +2 -2
  119. package/dist/{local-engine-command-73NHWD6V.js → chunk-YCUDOF6Q.js} +22 -76
  120. package/dist/{chunk-CJ76PSJT.js → chunk-YH2JVJAO.js} +12 -12
  121. package/dist/{chunk-GPI3OWRE.js → chunk-YHB34BN6.js} +2 -1
  122. package/dist/{chunk-AMBEITWL.js → chunk-ZGLNHA7T.js} +7 -7
  123. package/dist/{chunk-NGAODDLX.js → chunk-ZJOAWRED.js} +8 -8
  124. package/dist/{chunk-TUEFTRC2.js → chunk-ZXRDD3Q2.js} +50 -27
  125. package/dist/cli.d.ts +40 -11
  126. package/dist/cli.js +60 -56
  127. package/dist/{codegen-command-L2OO6OTE.js → codegen-command-T7TC7PQO.js} +79 -72
  128. package/dist/codegen.d.ts +2 -2
  129. package/dist/codegen.js +2 -2
  130. package/dist/{commands-2E4JB3DB.js → commands-JDENTDJS.js} +3 -3
  131. package/dist/{completion-LPJIH5VQ.js → completion-YFD5OVJW.js} +9 -5
  132. package/dist/{config-QDCRKEWD.js → config-YJFUTRJW.js} +8 -8
  133. package/dist/{deploy-command-HJZNYCUY.js → deploy-command-OEVEE6UG.js} +65 -63
  134. package/dist/deploy-source-HYVZEYXV.js +83 -0
  135. package/dist/{dev-env-sync-GZ4QQJGV.js → dev-env-sync-EFDCJ6KU.js} +63 -61
  136. package/dist/{diagnostics-LSMGB4TY.js → diagnostics-OMN5Y2AH.js} +2 -2
  137. package/dist/{display-name-hint-AHCNH6TF.js → display-name-hint-SW3GB3V7.js} +14 -13
  138. package/dist/{emit-DqG6qddr.d.ts → emit-Dov_92kn.d.ts} +66 -20
  139. package/dist/env-example-refresh-WNSOH534.js +134 -0
  140. package/dist/{env-pull-command-Z4RLVEGJ.js → env-pull-command-UYEXMQ3P.js} +53 -52
  141. package/dist/{env-target-ZHQUS5BO.js → env-target-JBSLBKNX.js} +15 -14
  142. package/dist/{env-var-command-FKQ4VVQ6.js → env-var-command-BJNRAXNV.js} +51 -49
  143. package/dist/{ephemeral-L4KUOGEU.js → ephemeral-CEOGMIEA.js} +11 -10
  144. package/dist/{ephemeral-command-GRPFI3TD.js → ephemeral-command-IPSGBCS5.js} +70 -69
  145. package/dist/{ephemeral-state-VLYU2BXR.js → ephemeral-state-MTBASPRS.js} +13 -12
  146. package/dist/{generate-command-XNODJFDQ.js → generate-command-XQXODBS6.js} +96 -86
  147. package/dist/{gitignore-VWRSZX5F.js → gitignore-RUVCIZO4.js} +21 -20
  148. package/dist/{guards-OPSGB6LG.js → guards-KYEOCVHN.js} +6 -6
  149. package/dist/{impersonate-command-AEKIZHHK.js → impersonate-command-MA27O7S5.js} +46 -44
  150. package/dist/{import-PHSSFFLA.js → import-XKRFHABE.js} +5 -5
  151. package/dist/index.d.ts +14 -20
  152. package/dist/index.js +13 -13
  153. package/dist/init-command-6RDTCMAB.js +143 -0
  154. package/dist/{init-modules-SGSX7XEY.js → init-modules-DHTBOCQT.js} +10 -9
  155. package/dist/{init-web-6HX3YLQP.js → init-web-ELBXSXDL.js} +3 -3
  156. package/dist/internal.d.ts +5 -5
  157. package/dist/internal.js +47 -20
  158. package/dist/{io-TAF4WXYQ.js → io-PGTCBSIQ.js} +6 -4
  159. package/dist/{keep-data-merge-GUGF7MVZ.js → keep-data-merge-TDJOIAVT.js} +33 -34
  160. package/dist/{lambda-config-reconcile-65U6I4KU.js → lambda-config-reconcile-47X5C2E4.js} +6 -5
  161. package/dist/{landed-QA6PRTV2.js → landed-F7PCHGCK.js} +3 -3
  162. package/dist/{landing-record-FCAWLCZU.js → landing-record-TPPYFQAS.js} +26 -25
  163. package/dist/{live-diff-IM4W3ELT.js → live-diff-5E2BQWQ7.js} +9 -8
  164. package/dist/local-engine-choice-S6VHPJRU.js +81 -0
  165. package/dist/local-engine-command-4EZCGZ6M.js +85 -0
  166. package/dist/{local-engine-config-W3KB7RWM.js → local-engine-config-2EBL3QKA.js} +3 -2
  167. package/dist/{local-engine-deploy-Y4OAWL7K.js → local-engine-deploy-FOPNWU7X.js} +18 -16
  168. package/dist/local-engine-lookup-GM3E3NPP.js +43 -0
  169. package/dist/local-engine-mcp-bridge-QKZHUGW3.js +423 -0
  170. package/dist/local-engine-mcp-command-BFQVLXZC.js +181 -0
  171. package/dist/{local-engine-process-6YPJHKYM.js → local-engine-process-XUQPQENQ.js} +12 -9
  172. package/dist/{local-engine-state-OCW5YDD7.js → local-engine-state-JQPKGB65.js} +4 -3
  173. package/dist/{local-engine-update-check-X7TZGRFL.js → local-engine-update-check-S7UF6ZF5.js} +7 -6
  174. package/dist/{lock-WXXC3QHL.js → lock-HDCHD2ON.js} +4 -2
  175. package/dist/{lock-commands-PKDBNRSD.js → lock-commands-HJ6Y5QVS.js} +66 -64
  176. package/dist/{login-command-V4U4FA5G.js → login-command-JO55NZAS.js} +34 -33
  177. package/dist/{logout-command-TV3P545Z.js → logout-command-MPRIRSJA.js} +18 -17
  178. package/dist/{loop-VKHGQ6MP.js → loop-SUB6C2LK.js} +8 -9
  179. package/dist/{marketplace-command-LEFOAEAV.js → marketplace-command-BM6G257N.js} +90 -54
  180. package/dist/{marketplace-resolve-ME7O7JBJ.js → marketplace-resolve-AWH3RG57.js} +7 -6
  181. package/dist/{meta-client-TEEECA5W.js → meta-client-AOSWODQQ.js} +16 -15
  182. package/dist/{module-manifest-7YLGIRCY.js → module-manifest-GXI46PEF.js} +7 -4
  183. package/dist/node.d.ts +5 -5
  184. package/dist/node.js +68 -67
  185. package/dist/operation-outcome-4UKPXTNC.js +53 -0
  186. package/dist/{output-target-5FWX3NGZ.js → output-target-RAZ4KN5J.js} +22 -21
  187. package/dist/{package-manager-PRAHUSCN.js → package-manager-K762W7XT.js} +2 -2
  188. package/dist/{plan-disclosure-QGL5UYQR.js → plan-disclosure-JR52DWXN.js} +21 -21
  189. package/dist/{plugin-contributions-GNFTWDEB.js → plugin-contributions-E6XHLQWK.js} +6 -6
  190. package/dist/{plugin-prompt-VEQGMZ4T.js → plugin-prompt-IODX5EU6.js} +5 -5
  191. package/dist/{plugin-questions-BGRL23GO.js → plugin-questions-AAAJ7POP.js} +4 -4
  192. package/dist/plugin.d.ts +254 -10
  193. package/dist/{preflight-command-VKJKXRRI.js → preflight-command-7GKJBWOQ.js} +71 -70
  194. package/dist/{profile-command-P7A3BH26.js → profile-command-CM6J7E2M.js} +35 -34
  195. package/dist/{profile-pointer-HG7IXE4I.js → profile-pointer-KTYXL6FU.js} +5 -4
  196. package/dist/{project-dependency-Z4CKOCJI.js → project-dependency-OQ5575QQ.js} +11 -8
  197. package/dist/{project-sdk-JWZWGXXR.js → project-sdk-2ESHHZVL.js} +4 -4
  198. package/dist/promote-command-BDRPG6UU.js +147 -0
  199. package/dist/{prompt-SURZOUUW.js → prompt-MQPGU4ZI.js} +4 -4
  200. package/dist/{publish-command-HGAB3H4A.js → publish-command-IEMYZ7LF.js} +69 -67
  201. package/dist/pull-command-S5E2ABZ4.js +169 -0
  202. package/dist/{pull-superseded-TOT5S4QU.js → pull-superseded-E34BZVLH.js} +4 -4
  203. package/dist/{raw-where-EoWl5fqY.d.ts → raw-where-ZMLND6AG.d.ts} +20 -3
  204. package/dist/release-command-7F5TBKO2.js +151 -0
  205. package/dist/{release-ns-command-WOQE2BDQ.js → release-ns-command-EK2ZQ4CC.js} +101 -100
  206. package/dist/{retry-command-JRGMZZAC.js → retry-command-GL5HCMVB.js} +10 -9
  207. package/dist/{routes-manifest-URFMAWJE.js → routes-manifest-YR4ZIMLM.js} +15 -7
  208. package/dist/routes-manifest-file-LCIKPDAG.js +41 -0
  209. package/dist/scaffold.js +4 -4
  210. package/dist/secrets-IV4N5HYI.js +20 -0
  211. package/dist/{secrets-file-YWZWVJ52.js → secrets-file-LXREYU3M.js} +21 -20
  212. package/dist/{secrets-fill-command-HIHK3VH2.js → secrets-fill-command-QHZS3KWM.js} +64 -62
  213. package/dist/{seed-24DTEY5S.js → seed-FRKMDN2Z.js} +9 -9
  214. package/dist/{source-resolve-OWD3MIEO.js → source-resolve-BBHYTOXI.js} +26 -24
  215. package/dist/{static-host-UIR2OLPQ.js → static-host-7LC7OZR4.js} +5 -5
  216. package/dist/{status-command-JKTHH5QE.js → status-command-TY253MJT.js} +54 -52
  217. package/dist/{store-zxw2go0f.d.ts → store-Boba9OOh.d.ts} +2 -2
  218. package/dist/{store-5YAQS6KU.js → store-VJ3OS6VO.js} +8 -7
  219. package/dist/sync-baseline-DOV5AGIO.js +36 -0
  220. package/dist/{sync-contributions-RBB6JVOL.js → sync-contributions-63542VE4.js} +20 -12
  221. package/dist/sync-record-RGHK7EAL.js +43 -0
  222. package/dist/{table-MQFVYA4K.js → table-OAYGFGEN.js} +8 -8
  223. package/dist/{tables-command-5Q4BSUNO.js → tables-command-PZIVDAH3.js} +45 -43
  224. package/dist/{tenant-Q3LPVSSM.js → tenant-Y3II4VY3.js} +12 -11
  225. package/dist/{tenant-command-BFVU2PEX.js → tenant-command-G6XON7CF.js} +113 -107
  226. package/dist/{test-command-F4VUU4QR.js → test-command-3FZOX7O3.js} +44 -42
  227. package/dist/{tests-5ZSDFVIJ.js → tests-KF6N6BZ7.js} +6 -6
  228. package/dist/{token-TERSTNU4.js → token-DJJUW5HY.js} +14 -13
  229. package/dist/toolchain-hooks-7PWCFLSU.js +46 -0
  230. package/dist/{toolchain-modules-FD5ANV2U.js → toolchain-modules-OTNSKK52.js} +8 -5
  231. package/dist/toolchain-peers-KQ7TQ2AR.js +28 -0
  232. package/dist/tracked-backend-AJCGTO5Y.js +82 -0
  233. package/dist/{update-check-O4C2LCZH.js → update-check-4E5L6GAW.js} +61 -59
  234. package/dist/{upgrade-command-NVFWLMTA.js → upgrade-command-BXMSQN4C.js} +68 -64
  235. package/dist/{whoami-command-YKNTISIV.js → whoami-command-NLCCIEUM.js} +17 -16
  236. package/dist/{workspace-GGVGE2S5.js → workspace-PNMJOXE4.js} +5 -5
  237. package/dist/{workspace-binding-OS4ZOX4S.js → workspace-binding-J5GWDFRI.js} +16 -15
  238. package/dist/{workspace-command-GTUNVN7K.js → workspace-command-MHIIY352.js} +125 -93
  239. package/dist/{workspace-env-467C5KHM.js → workspace-env-LLRWCHSA.js} +17 -16
  240. package/dist/{workspace-export-3XTVGQVM.js → workspace-export-BIKAYHWJ.js} +5 -5
  241. package/dist/{writable-7SSWUQJ3.js → writable-UOTO4WWC.js} +4 -4
  242. package/dist/{xano-6RS5XQZE.js → xano-LCI7VWPS.js} +8 -8
  243. package/dist/{xanosdk-import-E3WSIYUE.js → xanosdk-import-S7A3CVBN.js} +8 -8
  244. package/dist/{xanosdk-project-KH5TZ2KI.js → xanosdk-project-J4VCFRHP.js} +18 -17
  245. package/guides/README.md +2 -2
  246. package/guides/cli.md +73 -4
  247. package/guides/codegen.md +23 -5
  248. package/guides/codes.md +8 -2
  249. package/guides/coverage.md +5 -0
  250. package/guides/deploying.md +80 -0
  251. package/guides/marketplace.md +21 -0
  252. package/guides/module-contract.md +80 -4
  253. package/guides/scaffold.md +61 -10
  254. package/guides/typed-frontend.md +37 -0
  255. package/llms/client.md +11 -1
  256. package/llms/filters.md +4 -0
  257. package/llms/kinds-core.md +1 -1
  258. package/llms/statements-data.md +3 -2
  259. package/llms/toolchain.md +12 -0
  260. package/llms-full.txt +34 -7
  261. package/llms.txt +3 -3
  262. package/manifest.json +63 -5
  263. package/package.json +5 -2
  264. package/skills/xano-backend/SKILL.md +119 -0
  265. package/dist/chunk-F6IKWAIU.js +0 -664
  266. package/dist/chunk-M6ZFSTIZ.js +0 -630
  267. package/dist/chunk-MEIJDRHU.js +0 -243
  268. package/dist/deploy-source-5COWTBOC.js +0 -81
  269. package/dist/env-example-refresh-DWQIOQYR.js +0 -127
  270. package/dist/init-command-TI3HCKXZ.js +0 -126
  271. package/dist/local-engine-choice-FPJAZSSD.js +0 -79
  272. package/dist/operation-outcome-GNDD35WL.js +0 -51
  273. package/dist/promote-command-KHTIK44I.js +0 -141
  274. package/dist/pull-command-EUEWBRXZ.js +0 -162
  275. package/dist/release-command-WOVQAMUY.js +0 -147
  276. package/dist/toolchain-hooks-QVUZ6HZ4.js +0 -96
  277. package/dist/tracked-backend-B4HTME4S.js +0 -80
@@ -1,31 +1,32 @@
1
1
  import {
2
2
  ROUTES_MANIFEST_BASENAME
3
- } from "./chunk-TM5LRSBB.js";
3
+ } from "./chunk-LBJA7IEM.js";
4
4
  import {
5
5
  questionOrCancel
6
- } from "./chunk-AESE434J.js";
6
+ } from "./chunk-7M6JP3FS.js";
7
7
  import {
8
8
  ensureWorkspaceEnvGitignored
9
- } from "./chunk-3WHWOKU4.js";
9
+ } from "./chunk-BZ6WTG3E.js";
10
10
  import {
11
11
  readVersion
12
- } from "./chunk-S5KQIFKJ.js";
12
+ } from "./chunk-DG3APBUJ.js";
13
13
  import {
14
14
  WORKSPACE_ENV_EXAMPLE_FILE,
15
15
  renderWorkspaceEnvExample
16
- } from "./chunk-LLS2WO2K.js";
16
+ } from "./chunk-PV25BDCH.js";
17
17
  import {
18
18
  parseSlot,
19
19
  requireBackendSlot
20
- } from "./chunk-F3557PVM.js";
20
+ } from "./chunk-PY722CHR.js";
21
21
  import {
22
+ MERGED_IN_EXISTING,
22
23
  XANO_DIR,
23
24
  changedOnDisk,
24
- decideOverwrite,
25
+ describeClash,
26
+ existingProjectClashes,
25
27
  isNonEmptyDir,
26
- plannedAgentsMd,
27
28
  scaffoldProject
28
- } from "./chunk-F6IKWAIU.js";
29
+ } from "./chunk-DIWF7L33.js";
29
30
  import {
30
31
  inProject,
31
32
  installModules,
@@ -33,7 +34,7 @@ import {
33
34
  preflightPackages,
34
35
  rebaseLocalSpec,
35
36
  renderXanoIndexWithModules
36
- } from "./chunk-OGUMHW2X.js";
37
+ } from "./chunk-D5OZRJ3T.js";
37
38
  import {
38
39
  npmViewVersion
39
40
  } from "./chunk-ZFDZKNGG.js";
@@ -42,39 +43,48 @@ import {
42
43
  } from "./chunk-FWD7AL6N.js";
43
44
  import {
44
45
  isLocalSpecifier
45
- } from "./chunk-MYLPOVX6.js";
46
+ } from "./chunk-47XT6WQL.js";
46
47
  import {
47
- readToolchainBlock
48
+ readToolchainBlock,
49
+ readToolchainConfig
48
50
  } from "./chunk-DXUICABI.js";
51
+ import {
52
+ statusLabel
53
+ } from "./chunk-L6HZ67P6.js";
49
54
  import {
50
55
  detectInstallRoot,
51
56
  detectPackageManager,
52
57
  installCommandFor,
53
58
  userAgentVersion
54
- } from "./chunk-WRBKLYSJ.js";
59
+ } from "./chunk-DNBP4GJN.js";
55
60
  import {
56
61
  localPackageName,
57
62
  localPathOf,
58
63
  packageNameOf,
59
64
  readInstalledManifestState
60
- } from "./chunk-M7GJ6YUF.js";
61
- import {
62
- statusLabel
63
- } from "./chunk-HLQH3AXB.js";
65
+ } from "./chunk-CNZASQPL.js";
64
66
  import {
65
67
  readEnvVar
66
68
  } from "./chunk-X2NL4KUO.js";
67
69
  import {
68
70
  DEFAULT_FRAMEWORK,
69
71
  FRAMEWORKS,
70
- NODE_MIN,
71
72
  allFrontendPresets,
73
+ findFrontendPreset
74
+ } from "./chunk-BRANWM4U.js";
75
+ import {
76
+ BACKEND_TSCONFIG_PATH,
77
+ ICON_LIBRARIES,
78
+ NODE_MIN,
72
79
  checkJobDir,
73
80
  checkWorkflowName,
74
81
  checkWorkflowPath,
75
- findFrontendPreset,
76
82
  initLanding,
83
+ mergeGitignore,
77
84
  renderApiTs,
85
+ renderBackendPackageJson,
86
+ renderBackendReadme,
87
+ renderBackendTsconfig,
78
88
  renderCheckWorkflow,
79
89
  renderCnUtil,
80
90
  renderEnvExample,
@@ -90,13 +100,14 @@ import {
90
100
  renderViteConfig,
91
101
  renderXanoExampleMd,
92
102
  renderXanoIndex,
93
- resolveFrameworkFlag,
103
+ resolveIconsFlag,
94
104
  sdkDep
95
- } from "./chunk-57HMNJGB.js";
105
+ } from "./chunk-5GIOCDUM.js";
96
106
  import {
97
- ICON_LIBRARIES,
98
- resolveIconsFlag
99
- } from "./chunk-M6ZFSTIZ.js";
107
+ composeBlock,
108
+ gitattributesSpec,
109
+ upsertBlock
110
+ } from "./chunk-LJM5CIY4.js";
100
111
  import {
101
112
  UsageError,
102
113
  blank,
@@ -119,7 +130,7 @@ import {
119
130
  unknownFlag,
120
131
  warn,
121
132
  writeJson
122
- } from "./chunk-XNZURZ7T.js";
133
+ } from "./chunk-CH23ONYG.js";
123
134
  import {
124
135
  suggest
125
136
  } from "./chunk-UTI5G6OJ.js";
@@ -234,6 +245,8 @@ async function resolveThemeChoice(args) {
234
245
  }
235
246
 
236
247
  // src/emit/frontend-resolve.ts
248
+ var NO_FRONTEND = "none";
249
+ var FRAMEWORK_CHOICES = [...FRAMEWORKS, NO_FRONTEND];
237
250
  function defaultFrontendPreset() {
238
251
  const preset = findFrontendPreset(DEFAULT_FRAMEWORK);
239
252
  if (preset === void 0) {
@@ -241,6 +254,10 @@ function defaultFrontendPreset() {
241
254
  }
242
255
  return preset;
243
256
  }
257
+ function isNoFrontend(token) {
258
+ const t = token.trim().toLowerCase();
259
+ return t === NO_FRONTEND || t === "no frontend";
260
+ }
244
261
  async function promptFramework() {
245
262
  const presets = allFrontendPresets();
246
263
  const rl = createInterface({ input: process.stdin, output: process.stderr });
@@ -249,6 +266,7 @@ async function promptFramework() {
249
266
  `
250
267
  Which frontend framework?
251
268
  ` + presets.map((p, i) => ` ${i + 1}) ${p.label}${p.id === DEFAULT_FRAMEWORK ? " (default)" : ""}`).join("\n") + `
269
+ ${presets.length + 1}) No frontend (the backend only)
252
270
  `
253
271
  );
254
272
  const answer = await questionOrCancel(rl, `Enter a number or name, or leave blank for the default: `);
@@ -258,13 +276,24 @@ Which frontend framework?
258
276
  if (Number.isInteger(byIndex) && byIndex >= 1 && byIndex <= presets.length) {
259
277
  return presets[byIndex - 1];
260
278
  }
279
+ if (byIndex === presets.length + 1 || isNoFrontend(token)) return null;
261
280
  return findFrontendPreset(token) ?? defaultFrontendPreset();
262
281
  } finally {
263
282
  rl.close();
264
283
  }
265
284
  }
285
+ function resolveFrameworkValue(flag) {
286
+ if (isNoFrontend(flag)) return null;
287
+ return flagValue(flag, FRAMEWORK_CHOICES, () => {
288
+ const preset = findFrontendPreset(flag);
289
+ if (preset === void 0) {
290
+ throw new Error(`Unknown --framework "${flag}". Valid values: ${FRAMEWORK_CHOICES.join(", ")}.`);
291
+ }
292
+ return preset;
293
+ });
294
+ }
266
295
  async function resolveFrontendPreset(flag) {
267
- if (flag !== void 0 && flag !== "") return flagValue(flag, FRAMEWORKS, () => resolveFrameworkFlag(flag));
296
+ if (flag !== void 0 && flag !== "") return resolveFrameworkValue(flag);
268
297
  if (process.stdin.isTTY && process.stderr.isTTY) return promptFramework();
269
298
  return defaultFrontendPreset();
270
299
  }
@@ -431,12 +460,78 @@ function projectShellFiles(vars, preset, parts, choice = defaultThemeChoice(), c
431
460
  ...preset.files(vars, parts.landing, choice)
432
461
  ]);
433
462
  }
463
+ function backendShellFiles(vars, shell, contributions = {}, existingXanoSdk) {
464
+ const backend = [
465
+ { path: BACKEND_TSCONFIG_PATH, content: renderBackendTsconfig() },
466
+ { path: "xano/lambdas/tsconfig.json", content: renderLambdaTsconfig("backend") }
467
+ ];
468
+ const manifest = {
469
+ path: "package.json",
470
+ content: withXanoSdkBlock(
471
+ renderBackendPackageJson(vars),
472
+ contributions.xanosdk,
473
+ shell.kind === "existing" ? void 0 : existingXanoSdk
474
+ )
475
+ };
476
+ if (shell.kind === "existing") {
477
+ return spelledForProject(vars, [
478
+ manifest,
479
+ ...backend,
480
+ ...moduleTypeMarker(shell.dir),
481
+ // The line-ending rule, scoped to `xano/`: a `*` rule at the project's
482
+ // root would renormalize every file the project already has.
483
+ { path: `${XANO_DIR}/.gitattributes`, content: renderGitattributes() },
484
+ ...moduleGitattributes(shell.dir, contributions.gitattributes ?? []),
485
+ ...gitignoreBlock(shell.dir, vars.sdkVersion)
486
+ ]);
487
+ }
488
+ return spelledForProject(vars, [
489
+ manifest,
490
+ ...backend,
491
+ { path: ".gitignore", content: renderGitignore() },
492
+ { path: ".gitattributes", content: renderGitattributes(contributions.gitattributes) },
493
+ { path: checkWorkflowPath(vars.install), content: renderCheckWorkflow(vars.install) },
494
+ { path: "README.md", content: shell.readme }
495
+ ]);
496
+ }
497
+ function moduleTypeMarker(dir) {
498
+ let manifest;
499
+ try {
500
+ manifest = JSON.parse(readFileSync2(join(dir, "package.json"), "utf8"));
501
+ } catch {
502
+ return [];
503
+ }
504
+ if (manifest?.type === "module") return [];
505
+ return [{ path: `${XANO_DIR}/package.json`, content: `${JSON.stringify({ type: "module" }, null, 2)}
506
+ ` }];
507
+ }
508
+ function gitignoreBlock(dir, version) {
509
+ const path = join(dir, ".gitignore");
510
+ const existing = existsSync(path) ? readFileSync2(path, "utf8") : null;
511
+ const merged = mergeGitignore(existing, version);
512
+ return merged === existing ? [] : [{ path: ".gitignore", content: merged }];
513
+ }
514
+ function moduleGitattributes(dir, contributions) {
515
+ if (contributions.length === 0) return [];
516
+ const path = join(dir, ".gitattributes");
517
+ let text = existsSync(path) ? readFileSync2(path, "utf8") : "";
518
+ for (const { pkg, version, lines } of contributions) {
519
+ const spec = gitattributesSpec(pkg);
520
+ text = upsertBlock(text, spec, composeBlock(spec, lines, version)).text;
521
+ }
522
+ return [{ path: ".gitattributes", content: text }];
523
+ }
434
524
  function spelledForProject(vars, files) {
435
525
  return files.map((f) => ({ ...f, content: spellProjectSdkDir(spellProjectCli(f.content, vars.cli), vars.sdkDir) }));
436
526
  }
437
- function buildFileSet(vars, preset, choice, contributions = {}, existingXanoSdk) {
527
+ function buildFileSet(targetDir, vars, preset, mode, choice, contributions = {}, existingXanoSdk) {
438
528
  return [
439
- ...projectShellFiles(
529
+ ...preset === null ? backendShellFiles(
530
+ vars,
531
+ mode === "new" ? { kind: "new", readme: renderBackendReadme(vars) } : { kind: "existing", dir: targetDir },
532
+ contributions,
533
+ existingXanoSdk
534
+ ) : projectShellFiles(
440
535
  vars,
441
536
  preset,
442
537
  { readme: renderReadme(vars, preset, choice), landing: initLanding(vars) },
@@ -487,14 +582,41 @@ function rejectPullOnlyFlags(args) {
487
582
  { helpFor: { command: "init" } }
488
583
  );
489
584
  }
490
- function decideScaffoldTarget(targetDir, force) {
491
- const decided = decideOverwrite(targetDir, { force, regenerable: false });
492
- if (decided === "refuse") {
493
- throw new UsageError(
494
- `Target directory ${targetDir} is not empty. ` + (process.stdin.isTTY === true ? `Re-run with --force to scaffold into it anyway.` : `Re-run with --force --yes to scaffold into it anyway (--yes confirms the overwrite, which cannot be asked without a terminal).`)
495
- );
585
+ function frontendOnlyFlags(args) {
586
+ return [
587
+ ...args.theme !== void 0 ? ["--theme"] : [],
588
+ ...args.radius !== void 0 ? ["--radius"] : [],
589
+ ...args.dark !== void 0 ? ["--dark"] : [],
590
+ ...args.font !== void 0 ? ["--font"] : [],
591
+ ...args.fontMono !== void 0 ? ["--font-mono"] : [],
592
+ ...args.fontHeading !== void 0 ? ["--font-heading"] : [],
593
+ ...args.icons !== void 0 ? ["--icons"] : []
594
+ ];
595
+ }
596
+ function refuseFrontendOnlyFlags(args, why) {
597
+ const passed = frontendOnlyFlags(args);
598
+ if (passed.length === 0) return;
599
+ const one = passed.length === 1;
600
+ throw new UsageError(
601
+ `${passed.join(", ")} ${one ? "applies" : "apply"} only with a frontend, and ${why}. Drop ${one ? "it" : "them"}.`,
602
+ { helpFor: { command: "init" } }
603
+ );
604
+ }
605
+ async function resolveInitFrontend(args, targetDir, mode) {
606
+ if (mode === "existing") {
607
+ if (args.framework !== void 0 && resolveFrameworkValue(args.framework) !== null) {
608
+ throw new UsageError(
609
+ `\`--framework ${args.framework}\` writes a new frontend, and ${targetDir} is not empty: an existing app gets the backend only. Drop --framework to add the backend to it, or run init in an empty directory for a full app.`,
610
+ { helpFor: { command: "init" } }
611
+ );
612
+ }
613
+ refuseFrontendOnlyFlags(args, `${targetDir} is an existing project, which gets the backend only`);
614
+ return null;
496
615
  }
497
- return decided;
616
+ if (args.framework === void 0) return void 0;
617
+ const preset = resolveFrameworkValue(args.framework);
618
+ if (preset === null) refuseFrontendOnlyFlags(args, `\`--framework ${NO_FRONTEND}\` writes none`);
619
+ return preset;
498
620
  }
499
621
  function readLockEntryCount(targetDir) {
500
622
  const path = join(targetDir, LOCK_REL);
@@ -506,32 +628,43 @@ function readLockEntryCount(targetDir) {
506
628
  return 0;
507
629
  }
508
630
  }
509
- async function confirmForcedOverwrite(targetDir, files, args, agents) {
510
- const agentsMd = plannedAgentsMd(targetDir, {
511
- agentsMd: !args.noAgentsMd,
512
- appName: agents.appName,
513
- regenerable: false,
514
- sdkVersion: readVersion(),
515
- frontend: agents.frontend,
516
- theme: agents.theme
517
- });
518
- const changed = changedOnDisk(targetDir, agentsMd === void 0 ? files : [...files, agentsMd]);
519
- if (changed.length === 0) return true;
520
- warn(
521
- `init --force overwrites ${changed.length} file${changed.length === 1 ? "" : "s"} already in ${targetDir}:`,
522
- "init.overwrite",
523
- [...changed.slice(0, 30), ...changed.length > 30 ? [`\u2026 and ${changed.length - 30} more`] : []]
524
- );
525
- if (args.yes === true) return true;
526
- const { confirm } = await import("./prompt-SURZOUUW.js");
527
- const { yesRerun } = await import("./retry-command-JRGMZZAC.js");
631
+ async function settleClashes(targetDir, files, args) {
632
+ const clashes = existingProjectClashes(targetDir, files);
633
+ if (clashes.length === 0) return [];
634
+ const one = clashes.length === 1;
635
+ if (!args.force) {
636
+ throw new UsageError(
637
+ `init adds the backend to ${targetDir}, and ${one ? "this clashes" : `these ${clashes.length} clash`} with what is already there:
638
+ ${clashes.map((c) => ` ${describeClash(c)}`).join("\n")}
639
+ Nothing was written. ` + (process.stdin.isTTY === true ? `Re-run with --force to write over ${one ? "it" : "them"}.` : `Re-run with --force --yes to write over ${one ? "it" : "them"} (--yes confirms the overwrite, which cannot be asked without a terminal).`)
640
+ );
641
+ }
642
+ const scripts = clashes.flatMap((c) => c.kind === "script" ? [c.name] : []);
643
+ const changed = changedOnDisk(targetDir, files.filter((f) => !MERGED_IN_EXISTING.has(f.path)));
644
+ const listed = [...changed, ...clashes.filter((c) => c.kind === "script").map(describeClash)];
645
+ if (listed.length === 0) return scripts;
646
+ const counted = [
647
+ ...changed.length === 0 ? [] : [`${changed.length} file${changed.length === 1 ? "" : "s"}`],
648
+ ...scripts.length === 0 ? [] : [`${scripts.length} script${scripts.length === 1 ? "" : "s"}`]
649
+ ].join(" and ");
650
+ warn(`init --force overwrites ${counted} already in ${targetDir}:`, "init.overwrite", [
651
+ ...listed.slice(0, 30),
652
+ ...listed.length > 30 ? [`\u2026 and ${listed.length - 30} more`] : []
653
+ ]);
654
+ if (args.yes === true) return scripts;
655
+ const { confirm } = await import("./prompt-MQPGU4ZI.js");
656
+ const { yesRerun } = await import("./retry-command-GL5HCMVB.js");
528
657
  const { rerun, note } = yesRerun(args, "init");
658
+ const noun = scripts.length === 0 ? "file" : changed.length === 0 ? "script" : "file and script";
529
659
  const ok = await confirm(
530
- `Overwrite ${changed.length === 1 ? "this file" : `these ${changed.length} files`} in ${targetDir}?`,
531
- { flag: "--yes", refusal: { details: { written: false, files: changed }, rerun, note } }
660
+ `Overwrite ${listed.length === 1 ? `this ${noun}` : `these ${listed.length} ${noun === "file and script" ? "files and scripts" : `${noun}s`}`} in ${targetDir}?`,
661
+ { flag: "--yes", refusal: { details: { written: false, files: listed }, rerun, note } }
532
662
  );
533
- if (!ok) info("Cancelled. Nothing was written.");
534
- return ok;
663
+ if (!ok) {
664
+ info("Cancelled. Nothing was written.");
665
+ return "cancelled";
666
+ }
667
+ return scripts;
535
668
  }
536
669
  function renderMinimalPackageJson(appName, sdkVersion) {
537
670
  return `${JSON.stringify(
@@ -595,7 +728,7 @@ async function runInitCommand(args) {
595
728
  }
596
729
  const source = resolveFromSource(args.from);
597
730
  if (source.kind === "file") await refuseUnknownProfileFlag(args, resolve(args.positionals[0] ?? "."));
598
- const { runInitFromCommand } = await import("./codegen-command-L2OO6OTE.js");
731
+ const { runInitFromCommand } = await import("./codegen-command-T7TC7PQO.js");
599
732
  return runInitFromCommand(args, source);
600
733
  }
601
734
  rejectPullOnlyFlags(args);
@@ -603,10 +736,11 @@ async function runInitCommand(args) {
603
736
  const targetDir = resolve(targetArg);
604
737
  await refuseUnknownProfileFlag(args, targetDir);
605
738
  const appName = sanitizeAppName(args.name ?? basename(targetDir));
739
+ const mode = isNonEmptyDir(targetDir) ? "existing" : "new";
606
740
  const existingXanoSdk = readToolchainBlock(targetDir);
607
741
  const typedModules = parseMarketplaceFlag(args.marketplace);
608
- if (args.framework !== void 0) await resolveFrontendPreset(args.framework);
609
- await resolveThemeChoice(args);
742
+ const flagFrontend = await resolveInitFrontend(args, targetDir, mode);
743
+ if (flagFrontend !== null) await resolveThemeChoice(args);
610
744
  const unclaimable = args.unknownFlags.filter((f) => {
611
745
  const name = flagName(f);
612
746
  if (!name.startsWith("--")) return true;
@@ -614,10 +748,10 @@ async function runInitCommand(args) {
614
748
  return flagNames().includes(bare) || bare.startsWith("no-") && flagNames().includes(bare.slice(3));
615
749
  });
616
750
  if (unclaimable.length > 0) throw unknownFlag(unclaimable, { command: "init" });
617
- const { refusePlugAndPlay } = await import("./project-dependency-Z4CKOCJI.js");
618
- const { retryCommand } = await import("./retry-command-JRGMZZAC.js");
751
+ const { refusePlugAndPlay } = await import("./project-dependency-OQ5575QQ.js");
752
+ const { retryCommand } = await import("./retry-command-GL5HCMVB.js");
619
753
  refusePlugAndPlay(targetDir, retryCommand(args, { command: "init" }).command);
620
- const { resolveMarketplaceSpecs, withCatalogueRerun } = await import("./marketplace-resolve-ME7O7JBJ.js");
754
+ const { resolveMarketplaceSpecs, withCatalogueRerun } = await import("./marketplace-resolve-AWH3RG57.js");
621
755
  const resolvedModules = typedModules.length === 0 ? [] : await resolveMarketplaceSpecs(typedModules, "xanosdk init --marketplace").catch(async (err) => {
622
756
  throw await withCatalogueRerun(err, args, "init");
623
757
  });
@@ -626,45 +760,45 @@ async function runInitCommand(args) {
626
760
  if (requestedModules.length > 0) preflightPackages(requestedModules, targetDir);
627
761
  const deferredModules = args.noInstall ? requestedModules : [];
628
762
  const modules = args.noInstall ? [] : requestedModules;
629
- let overwrite;
630
763
  let moduleOutcome;
631
- const forcedOver = args.force && isNonEmptyDir(targetDir);
632
764
  const hadLock = readLockEntryCount(targetDir);
633
- let earlyPreset;
765
+ let overrideScripts;
766
+ const settle = async () => mode === "existing" ? settleClashes(
767
+ targetDir,
768
+ buildFileSet(targetDir, { appName, sdkVersion: readVersion() }, null, mode, defaultThemeChoice(), {}, existingXanoSdk),
769
+ args
770
+ ) : [];
634
771
  let passOne;
635
772
  if (modules.length > 0) {
636
- overwrite = decideScaffoldTarget(targetDir, args.force);
637
- if (forcedOver) {
638
- earlyPreset = await resolveFrontendPreset(args.framework);
639
- const earlyTheme = await resolveThemeChoice(args);
640
- const provisional = buildFileSet(
641
- { appName, sdkVersion: readVersion() },
642
- earlyPreset,
643
- earlyTheme,
644
- { gitattributes: [], xanosdk: {} },
645
- existingXanoSdk
646
- );
647
- const agents = { appName, frontend: earlyPreset, theme: earlyTheme };
648
- if (!await confirmForcedOverwrite(targetDir, provisional, args, agents)) return;
649
- }
773
+ const settled = await settle();
774
+ if (settled === "cancelled") return;
775
+ overrideScripts = settled;
650
776
  passOne = snapshotForRollback(targetDir);
651
777
  mkdirSync(targetDir, { recursive: true });
652
- writeFileSync(
653
- join(targetDir, "package.json"),
654
- renderMinimalPackageJson(appName, readVersion()),
655
- "utf8"
656
- );
778
+ if (mode === "new" || !existsSync(join(targetDir, "package.json"))) {
779
+ writeFileSync(
780
+ join(targetDir, "package.json"),
781
+ renderMinimalPackageJson(appName, readVersion()),
782
+ "utf8"
783
+ );
784
+ }
657
785
  blank();
658
786
  moduleOutcome = await installModules(targetDir, modules);
787
+ if (moduleOutcome.toolchain.length > 0) {
788
+ const { addToolchainPeers } = await import("./toolchain-peers-KQ7TQ2AR.js");
789
+ const rerun = retryCommand(args, { command: "init" }).command;
790
+ for (const pkg of moduleOutcome.toolchain) await addToolchainPeers(targetDir, pkg, rerun);
791
+ }
659
792
  }
660
793
  let scaffolded = false;
661
794
  try {
662
- const { discoverToolchainPlugins } = await import("./toolchain-modules-FD5ANV2U.js");
795
+ const { discoverToolchainPlugins } = await import("./toolchain-modules-OTNSKK52.js");
663
796
  const toolchain = await discoverToolchainPlugins(targetDir, { frozen: false, configuring: true });
664
- const preset = earlyPreset ?? await resolveFrontendPreset(args.framework);
797
+ const preset = flagFrontend !== void 0 ? flagFrontend : await resolveFrontendPreset(args.framework);
798
+ if (preset === null && flagFrontend === void 0) refuseFrontendOnlyFlags(args, "no frontend was chosen");
665
799
  const choice = await resolveThemeChoice(args);
666
- const { pluginPrompter } = await import("./plugin-prompt-VEQGMZ4T.js");
667
- const { contributionOutcomes, recordedConfig, runPluginQuestionnaire } = await import("./plugin-contributions-GNFTWDEB.js");
800
+ const { pluginPrompter } = await import("./plugin-prompt-IODX5EU6.js");
801
+ const { contributionOutcomes, recordedConfig, runPluginQuestionnaire } = await import("./plugin-contributions-E6XHLQWK.js");
668
802
  const { answers: pluginAnswers } = await runPluginQuestionnaire(toolchain.loaded, {
669
803
  host: "init",
670
804
  unknownFlags: args.unknownFlags,
@@ -683,12 +817,14 @@ async function runInitCommand(args) {
683
817
  if (record !== void 0) pluginConfig[outcome.pkg] = record;
684
818
  }
685
819
  const vars = templateVarsFor(appName, targetDir);
686
- overwrite ??= decideScaffoldTarget(targetDir, args.force);
687
- const fileSet = buildFileSet(vars, preset, choice, { gitattributes, xanosdk: pluginConfig }, existingXanoSdk);
688
- if (forcedOver && earlyPreset === void 0 && !await confirmForcedOverwrite(targetDir, fileSet, args, { appName, frontend: preset, theme: choice }))
689
- return;
820
+ if (overrideScripts === void 0) {
821
+ const settled = await settle();
822
+ if (settled === "cancelled") return;
823
+ overrideScripts = settled;
824
+ }
825
+ const fileSet = buildFileSet(targetDir, vars, preset, mode, choice, { gitattributes, xanosdk: pluginConfig }, existingXanoSdk);
690
826
  step(
691
- `Scaffolding ${style.bold(appName)} (${preset.label}, ${choice.theme.label}) in ${targetDir}`
827
+ mode === "existing" ? `Adding a Xano backend to ${style.bold(appName)} in ${targetDir}` : preset === null ? `Scaffolding ${style.bold(appName)} (no frontend) in ${targetDir}` : `Scaffolding ${style.bold(appName)} (${preset.label}, ${choice.theme.label}) in ${targetDir}`
692
828
  );
693
829
  const pin = await planProfilePin(args, targetDir);
694
830
  scaffolded = true;
@@ -702,9 +838,14 @@ async function runInitCommand(args) {
702
838
  // An `init` project's `xano/` is hand-authored, never machine-written: it is
703
839
  // not refreshable, and `--force` must not clear it.
704
840
  regenerable: false,
705
- overwrite,
706
- // Only this path writes package.json twice, so only this path merges.
707
- mergePackageJson: modules.length > 0,
841
+ // A new project's directory is empty, and an existing one's clashes were
842
+ // settled above: nothing here is refused.
843
+ overwrite: "full",
844
+ // An existing project's manifest is the user's, merged into with the
845
+ // project winning. Otherwise only the module path writes package.json
846
+ // twice, so only that path merges.
847
+ mergePackageJson: mode === "existing" ? "project" : modules.length > 0 ? "rendered" : void 0,
848
+ overrideScripts,
708
849
  // A project install failing for the reason an add-on's already did (the
709
850
  // manifest they share names a range npm has no version for) is that one
710
851
  // failure, already warned — not a second warning repeating npm's text.
@@ -722,7 +863,7 @@ async function runInitCommand(args) {
722
863
  reportWorkflowPlacement(result.written, vars.install, targetDir);
723
864
  pin.report();
724
865
  const pinnedProfile = pin.name;
725
- info(`Theme: ${choice.theme.label} \u2014 dark mode: ${choice.dark}`);
866
+ if (preset !== null) info(`Theme: ${choice.theme.label} \u2014 dark mode: ${choice.dark}`);
726
867
  if (deferredModules.length > 0) {
727
868
  recordDeferredModules(targetDir, deferredModules);
728
869
  info(`Added to package.json, not installed (--no-install): ${deferredModules.join(", ")}.`);
@@ -757,7 +898,8 @@ async function runInitCommand(args) {
757
898
  if (result.install === "installed" && sdkResolves(targetDir)) {
758
899
  const derivation = await writeDerivedFiles(
759
900
  targetDir,
760
- (env) => spellProjectCli(renderXanoIndexWithModules(appName, outcome.registered, outcome.unwired, env), vars.cli)
901
+ (env) => spellProjectCli(renderXanoIndexWithModules(appName, outcome.registered, outcome.unwired, env), vars.cli),
902
+ toolchain
761
903
  );
762
904
  derived = derivation.written;
763
905
  entryFailed = derivation.failed === true;
@@ -782,10 +924,10 @@ async function runInitCommand(args) {
782
924
  }
783
925
  }
784
926
  if (result.install === "installed") {
785
- const { skewedProjectSdk } = await import("./project-sdk-JWZWGXXR.js");
927
+ const { skewedProjectSdk } = await import("./project-sdk-2ESHHZVL.js");
786
928
  const installedSdk = skewedProjectSdk(targetDir, readVersion());
787
929
  if (installedSdk !== void 0) {
788
- const { reconcileWithInstalled } = await import("./upgrade-command-NVFWLMTA.js");
930
+ const { reconcileWithInstalled } = await import("./upgrade-command-BXMSQN4C.js");
789
931
  const rendered = reconcileWithInstalled(targetDir);
790
932
  if (rendered.length > 0) {
791
933
  info(`Rendered ${rendered.join(", ")} with the installed @xano/sdk ${installedSdk.version} (this CLI is ${readVersion()}).`);
@@ -817,17 +959,18 @@ async function runInitCommand(args) {
817
959
  }
818
960
  const cdHint = targetDir === process.cwd() ? "" : ` cd ${shellWord(targetArg)}
819
961
  `;
962
+ const needsInstall = !(result.install === "installed" || sdkResolves(targetDir));
820
963
  detail(
821
964
  `Next steps:
822
- ` + cdHint + (result.install === "installed" || sdkResolves(targetDir) ? `` : ` ${installLine}
823
- `) + // A declared name with no line in xano/.env refuses the deploy, so the
965
+ ` + cdHint + (needsInstall ? ` ${installLine}
966
+ ` : ``) + // A declared name with no line in xano/.env refuses the deploy, so the
824
967
  // step that supplies it comes first.
825
968
  (addonEnv.length > 0 ? ` cp xano/.env.example xano/.env # then set ${addonEnv.join(", ")} \u2014 the add-ons read ${addonEnv.length === 1 ? "it" : "them"}
826
969
  ` : ``) + // The Xano Engine first: it needs no account, so sign-in waits for
827
970
  // the cloud deploy that does.
828
971
  ` npm run xano:deploy # run the backend on the Xano Engine, on this machine
829
- npm run dev # run the frontend, pointed at it
830
- ` + loginNextStep(pin, targetDir) + ` npm run xano:deploy:ephemeral # build the frontend, then deploy \u2192 live ephemeral URL
972
+ ` + (preset === null ? `` : ` npm run dev # run the frontend, pointed at it
973
+ `) + loginNextStep(pin, targetDir) + `${ephemeralNextStep(preset !== null)}
831
974
 
832
975
  ` + (hadLock !== void 0 ? `xano/xano.lock was kept (${hadLock} ${hadLock === 1 ? "entry" : "entries"}). An entry the new xano/index.ts
833
976
  does not export fails \`npm run xano:check\`; once those objects are gone for good,
@@ -841,11 +984,18 @@ ${ROUTES_REL} was written for the add-ons' endpoints \u2014 commit it too.` : ""
841
984
  writeJson({
842
985
  dir: targetDir,
843
986
  name: appName,
844
- framework: preset.id,
845
- theme: choice.theme.id,
846
- dark: choice.dark,
987
+ // `new` or `existing`: whether this run wrote a project, or added the
988
+ // backend to one that was already there.
989
+ mode,
990
+ framework: preset?.id ?? NO_FRONTEND,
991
+ theme: preset === null ? null : choice.theme.id,
992
+ dark: preset === null ? null : choice.dark,
847
993
  install: result.install,
848
994
  pinnedProfile,
995
+ // Every file this run wrote or merged into, project-relative.
996
+ files: runFiles(result.written, derived),
997
+ // The one command to run next, from where `init` was typed.
998
+ next: deployNextCommand(cdHint === "" ? null : targetArg, needsInstall ? installLine : null, manager),
849
999
  // `--no-install` still names what it added: recorded in package.json,
850
1000
  // not installed, not wired.
851
1001
  ...moduleOutcome === void 0 && deferredModules.length > 0 ? {
@@ -908,25 +1058,27 @@ function deferredDependency(specifier, targetDir) {
908
1058
  { helpFor: { command: "init" } }
909
1059
  );
910
1060
  }
911
- async function writeDerivedFiles(targetDir, renderIndexWithEnv) {
1061
+ async function writeDerivedFiles(targetDir, renderIndexWithEnv, toolchain) {
912
1062
  const written = [];
913
1063
  let declaredEnv = [];
914
1064
  const lockPath = join(targetDir, LOCK_REL);
915
1065
  const routesPath = join(targetDir, ROUTES_REL);
916
1066
  try {
917
1067
  const { loadDefault, checkStandInTokens } = await import("./cli.js");
918
- const { Xano } = await import("./xano-6RS5XQZE.js");
919
- const { createLockContext, lockKey, mergeObserved } = await import("./lock-WXXC3QHL.js");
1068
+ const { Xano } = await import("./xano-LCI7VWPS.js");
1069
+ const { createLockContext, lockKey, mergeObserved } = await import("./lock-HDCHD2ON.js");
920
1070
  const { resetLockOverrides, seedLockOverrides } = await import("./store-6VNCD4D7.js");
921
- const { readLockFile, writeLockFile } = await import("./io-TAF4WXYQ.js");
922
- const { setDiagnosticSink } = await import("./diagnostics-LSMGB4TY.js");
923
- const { planRouteManifest, renderPlannedManifest } = await import("./routes-manifest-URFMAWJE.js");
1071
+ const { readLockFile, writeLockFile } = await import("./io-PGTCBSIQ.js");
1072
+ const { setDiagnosticSink } = await import("./diagnostics-OMN5Y2AH.js");
1073
+ const { planRouteManifest } = await import("./routes-manifest-YR4ZIMLM.js");
1074
+ const { renderManifestFile, reportModuleFailures } = await import("./routes-manifest-file-LCIKPDAG.js");
1075
+ const { isEnabled } = await import("./toolchain-modules-OTNSKK52.js");
924
1076
  const existing = existsSync(lockPath) ? readLockFile(lockPath) : void 0;
925
1077
  resetLockOverrides();
926
1078
  if (existing !== void 0) seedLockOverrides(existing);
927
1079
  const ctx = createLockContext(existing);
928
- const { envNamesRead } = await import("./guards-OPSGB6LG.js");
929
- const { refreshEnvExample } = await import("./env-example-refresh-DWQIOQYR.js");
1080
+ const { envNamesRead } = await import("./guards-KYEOCVHN.js");
1081
+ const { refreshEnvExample } = await import("./env-example-refresh-WNSOH534.js");
930
1082
  const def = await loadDefault(join(targetDir, XANO_DIR, "index.ts"));
931
1083
  if (!Xano.isXano(def)) return { written, env: declaredEnv };
932
1084
  const previousSink = setDiagnosticSink(() => {
@@ -950,11 +1102,22 @@ async function writeDerivedFiles(targetDir, renderIndexWithEnv) {
950
1102
  writeLockFile(lockPath, lock);
951
1103
  written.push(LOCK_REL);
952
1104
  }
953
- const manifest = renderPlannedManifest(
954
- planRouteManifest(payload, (kind, name) => lock.objects[lockKey(kind, name)]?.canonical)
1105
+ const loaded = toolchain.loaded.flatMap((plugin) => {
1106
+ const config = readToolchainConfig(targetDir, plugin.pkg) ?? {};
1107
+ return isEnabled(config) ? [{ ...plugin, config }] : [];
1108
+ });
1109
+ const manifest = renderManifestFile(
1110
+ planRouteManifest(payload, (kind, name) => lock.objects[lockKey(kind, name)]?.canonical),
1111
+ {
1112
+ loaded,
1113
+ skipped: toolchain.skipped,
1114
+ previous: existsSync(routesPath) ? readFileSync2(routesPath, "utf8") : void 0,
1115
+ sdkVersion: readVersion()
1116
+ }
955
1117
  );
956
1118
  if (manifest !== void 0) {
957
- writeFileSync(routesPath, manifest, "utf8");
1119
+ reportModuleFailures(manifest.failed, ROUTES_REL);
1120
+ writeFileSync(routesPath, manifest.source, "utf8");
958
1121
  written.push(ROUTES_REL);
959
1122
  }
960
1123
  } catch (err) {
@@ -974,15 +1137,15 @@ async function refuseUnknownProfileFlag(args, targetDir) {
974
1137
  const name = args.profile ?? (fromEnv ? envRaw : void 0);
975
1138
  if (name === void 0) return;
976
1139
  if (fromEnv && targetDir !== void 0) {
977
- const { POINTER_FILE } = await import("./profile-pointer-HG7IXE4I.js");
1140
+ const { POINTER_FILE } = await import("./profile-pointer-KTYXL6FU.js");
978
1141
  if (existsSync(join(targetDir, POINTER_FILE))) return;
979
1142
  }
980
- const { readCredentialFile, resolveAuthFilePath, profileNames, loginHint } = await import("./store-5YAQS6KU.js");
1143
+ const { readCredentialFile, resolveAuthFilePath, profileNames, loginHint } = await import("./store-VJ3OS6VO.js");
981
1144
  const path = resolveAuthFilePath(args, "read");
982
1145
  const file = readCredentialFile(path);
983
1146
  const stored = file === null ? [] : profileNames(file);
984
1147
  if (stored.includes(name)) return;
985
- const { ProfileNotFoundError } = await import("./token-TERSTNU4.js");
1148
+ const { ProfileNotFoundError } = await import("./token-DJJUW5HY.js");
986
1149
  const have = stored.length === 0 ? "Nothing is signed in on this machine." : `Stored profiles: ${quotedNames(stored)}.`;
987
1150
  throw new ProfileNotFoundError(
988
1151
  `No credential profile "${name}" in ${path} (from ${fromEnv ? `$${ENV_PROFILE}` : "--profile"}), so there is nothing to pin this project to. ${have} Run ${loginHint(name)} to add it, or name a stored one${fromEnv ? ` (or unset ${ENV_PROFILE})` : ""}.`,
@@ -991,13 +1154,22 @@ async function refuseUnknownProfileFlag(args, targetDir) {
991
1154
  );
992
1155
  }
993
1156
  async function envCredentialSet() {
994
- const { envMetaCredentialVarsSet } = await import("./token-TERSTNU4.js");
1157
+ const { envMetaCredentialVarsSet } = await import("./token-DJJUW5HY.js");
995
1158
  return envMetaCredentialVarsSet().length > 0;
996
1159
  }
997
1160
  function loginNextStep(pin, projectDir) {
998
1161
  return pin.signedIn ? "" : ` ${projectCli(projectDir)} login # authenticate with Xano
999
1162
  `;
1000
1163
  }
1164
+ function ephemeralNextStep(frontend) {
1165
+ return frontend ? ` npm run xano:deploy:ephemeral # build the frontend, then deploy \u2192 live ephemeral URL` : ` npm run xano:deploy:ephemeral # deploy the backend \u2192 live ephemeral URL`;
1166
+ }
1167
+ function deployNextCommand(cdArg, install, manager) {
1168
+ return (cdArg === null ? "" : `cd ${shellWord(cdArg)} && `) + (install === null ? "" : `${install} && `) + `${manager} run xano:deploy`;
1169
+ }
1170
+ function runFiles(...groups) {
1171
+ return [...new Set(groups.flat())].sort();
1172
+ }
1001
1173
  function projectCli(projectDir) {
1002
1174
  const prefix = cliPrefixAt(projectDir);
1003
1175
  return prefix === "xanosdk" || prefix === "npx @xano/sdk" ? "npx xanosdk" : prefix;
@@ -1006,8 +1178,8 @@ function runFromHere(text, targetDir) {
1006
1178
  return text.replace(/`npx xanosdk /g, `\`${inProject(targetDir)}xanosdk `);
1007
1179
  }
1008
1180
  async function planProfilePin(args, targetDir, opts = {}) {
1009
- const { POINTER_FILE, readPointerFile } = await import("./profile-pointer-HG7IXE4I.js");
1010
- const { readCredentialFile, resolveAuthFilePath, profileNames, loginHint } = await import("./store-5YAQS6KU.js");
1181
+ const { POINTER_FILE, readPointerFile } = await import("./profile-pointer-KTYXL6FU.js");
1182
+ const { readCredentialFile, resolveAuthFilePath, profileNames, loginHint } = await import("./store-VJ3OS6VO.js");
1011
1183
  const credentialPath = resolveAuthFilePath(args, "read");
1012
1184
  const file = readCredentialFile(credentialPath);
1013
1185
  const signedIn = file !== null && profileNames(file).length > 0 || await envCredentialSet();
@@ -1037,7 +1209,7 @@ async function planProfilePin(args, targetDir, opts = {}) {
1037
1209
  };
1038
1210
  }
1039
1211
  if (opts.credentialRead === true) {
1040
- const { environmentCredentialVars } = await import("./token-TERSTNU4.js");
1212
+ const { environmentCredentialVars } = await import("./token-DJJUW5HY.js");
1041
1213
  const env = environmentCredentialVars();
1042
1214
  if (env.complete) {
1043
1215
  return {
@@ -1060,7 +1232,7 @@ async function planProfilePin(args, targetDir, opts = {}) {
1060
1232
  });
1061
1233
  const stored = file === null ? [] : profileNames(file);
1062
1234
  if (!stored.includes(selection.name)) {
1063
- const env = stored.length === 0 ? (await import("./token-TERSTNU4.js")).environmentCredentialVars() : void 0;
1235
+ const env = stored.length === 0 ? (await import("./token-DJJUW5HY.js")).environmentCredentialVars() : void 0;
1064
1236
  const storeEnv = env?.complete === true ? await storeEnvCredentialCommand(credentialPath, targetDir) : "";
1065
1237
  return {
1066
1238
  name: null,
@@ -1084,7 +1256,7 @@ async function planProfilePin(args, targetDir, opts = {}) {
1084
1256
  };
1085
1257
  }
1086
1258
  }
1087
- const { writePointerFile } = await import("./profile-pointer-HG7IXE4I.js");
1259
+ const { writePointerFile } = await import("./profile-pointer-KTYXL6FU.js");
1088
1260
  return {
1089
1261
  name: selection.name,
1090
1262
  signedIn,
@@ -1101,7 +1273,7 @@ async function envAddressesElsewhere(file, name, credentialPath) {
1101
1273
  const instance = readEnvVar("XANO_INSTANCE_URL")?.trim();
1102
1274
  const workspace = readEnvVar("XANO_WORKSPACE_ID")?.trim();
1103
1275
  if (instance === void 0 || workspace === void 0 || readEnvVar("XANO_META_TOKEN") === void 0) return null;
1104
- const { readProfile, sameOriginAs } = await import("./store-5YAQS6KU.js");
1276
+ const { readProfile, sameOriginAs } = await import("./store-VJ3OS6VO.js");
1105
1277
  let record;
1106
1278
  try {
1107
1279
  record = readProfile(file, name, credentialPath);
@@ -1117,7 +1289,7 @@ async function envAddressesElsewhere(file, name, credentialPath) {
1117
1289
  };
1118
1290
  }
1119
1291
  async function storeEnvCredentialCommand(credentialPath, targetDir) {
1120
- const { credentialFileFlag, profileAddCommand } = await import("./store-5YAQS6KU.js");
1292
+ const { credentialFileFlag, profileAddCommand } = await import("./store-VJ3OS6VO.js");
1121
1293
  const { DEFAULT_PROFILE } = await import("./profile-select-45G5VPJK.js");
1122
1294
  const instance = readEnvVar("XANO_INSTANCE_URL");
1123
1295
  const workspaceId = readEnvVar("XANO_WORKSPACE_ID");
@@ -1131,6 +1303,7 @@ function sdkResolves(dir) {
1131
1303
 
1132
1304
  export {
1133
1305
  resolveThemeChoice,
1306
+ resolveFrameworkValue,
1134
1307
  resolveFrontendPreset,
1135
1308
  projectInstallOf,
1136
1309
  workflowPlacementNote,
@@ -1139,10 +1312,17 @@ export {
1139
1312
  templateVarsFor,
1140
1313
  sanitizeAppName,
1141
1314
  projectShellFiles,
1315
+ backendShellFiles,
1142
1316
  resolveFromSource,
1317
+ refuseFrontendOnlyFlags,
1318
+ resolveInitFrontend,
1319
+ settleClashes,
1143
1320
  runInitCommand,
1144
1321
  loginNextStep,
1322
+ ephemeralNextStep,
1323
+ deployNextCommand,
1324
+ runFiles,
1145
1325
  projectCli,
1146
1326
  planProfilePin
1147
1327
  };
1148
- //# sourceMappingURL=chunk-CV54PASI.js.map
1328
+ //# sourceMappingURL=chunk-SGK3PTTM.js.map