@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,7 +1,285 @@
1
+ import {
2
+ byCodeUnit
3
+ } from "./chunk-WAVNUTMT.js";
1
4
  import {
2
5
  parsePathParams,
3
6
  pathSegment
4
- } from "./chunk-3IYVHVM6.js";
7
+ } from "./chunk-VJFMUJWZ.js";
8
+ import {
9
+ linkedTableOf,
10
+ tableRefOf
11
+ } from "./chunk-EHP3WPEG.js";
12
+ import {
13
+ COLUMN_NULLABLE_TYPES,
14
+ INPUT_NULLABLE_TYPES,
15
+ isListColumn
16
+ } from "./chunk-JIKGT7DO.js";
17
+
18
+ // src/emit/route-inputs.ts
19
+ var SCALAR_TYPES = /* @__PURE__ */ new Set([
20
+ "text",
21
+ "int",
22
+ "decimal",
23
+ "bool",
24
+ "email",
25
+ "password",
26
+ "uuid",
27
+ "date",
28
+ "epochms",
29
+ "json",
30
+ "file",
31
+ "blob",
32
+ "blob_img",
33
+ "blob_video",
34
+ "blob_audio",
35
+ "geo_point",
36
+ "geo_multipoint",
37
+ "geo_linestring",
38
+ "geo_multilinestring",
39
+ "geo_polygon",
40
+ "geo_multipolygon"
41
+ ]);
42
+ var INPUT_NULLABLE = new Set(INPUT_NULLABLE_TYPES);
43
+ var COLUMN_NULLABLE = new Set(COLUMN_NULLABLE_TYPES);
44
+ function isRow(v) {
45
+ return v !== null && typeof v === "object" && !Array.isArray(v);
46
+ }
47
+ function rows(v) {
48
+ return Array.isArray(v) ? v.filter(isRow) : [];
49
+ }
50
+ function tableColumns(payload) {
51
+ const out = /* @__PURE__ */ new Map();
52
+ for (const table of rows(payload.dbo)) {
53
+ if (typeof table.guid === "string" && table.guid !== "" && Array.isArray(table.schema)) {
54
+ out.set(table.guid, table.schema);
55
+ }
56
+ }
57
+ return out;
58
+ }
59
+ function describeInputs(input, tables) {
60
+ return rows(input).map((row) => describeField(row, INPUT_NULLABLE, tables));
61
+ }
62
+ function bound(v) {
63
+ const n = typeof v === "number" ? Math.trunc(v) : typeof v === "string" ? Number.parseInt(v, 10) : Number.NaN;
64
+ return Number.isFinite(n) && n > 0 ? n : void 0;
65
+ }
66
+ function listOf(row) {
67
+ if (!isListColumn({ style: isRow(row.style) ? row.style : void 0 })) return false;
68
+ const stored = isRow(row.list) ? row.list : {};
69
+ const min = bound(stored.min);
70
+ const max = bound(stored.max);
71
+ return { ...min !== void 0 ? { min } : {}, ...max !== void 0 ? { max } : {} };
72
+ }
73
+ function methodArg(v) {
74
+ return typeof v === "string" ? v : typeof v === "number" || typeof v === "boolean" ? String(v) : JSON.stringify(v);
75
+ }
76
+ function methodsOf(stored, honorDisabled = true) {
77
+ return rows(stored).flatMap((m) => {
78
+ if (typeof m.name !== "string" || m.name === "@") return [];
79
+ if (honorDisabled && m.disabled === true) return [];
80
+ return [{ name: m.name, args: Array.isArray(m.arg) ? m.arg.map(methodArg) : [] }];
81
+ });
82
+ }
83
+ function baseOf(row, type, nullableByDefault) {
84
+ return {
85
+ name: typeof row.name === "string" ? row.name : "",
86
+ required: row.required === true,
87
+ // The engine binds every `json` input nullable, whatever was stored.
88
+ nullable: type === "json" ? true : typeof row.nullable === "boolean" ? row.nullable : nullableByDefault.has(type),
89
+ list: listOf(row),
90
+ // The engine renders an enum, a vector and an object without their
91
+ // methods, so none of them applies one.
92
+ methods: type === "enum" || type === "vector" || type === "obj" ? [] : methodsOf(row.methods)
93
+ };
94
+ }
95
+ function describeField(row, nullableByDefault, tables) {
96
+ const type = typeof row.type === "string" ? row.type : "";
97
+ const field = row;
98
+ const linked = linkedTableOf(field);
99
+ if (linked !== null) return expandDbLink(row, linked, tables);
100
+ const base = baseOf(row, type, nullableByDefault);
101
+ const table = tableRefOf(field);
102
+ if (table !== null) return { ...base, type: "tableRef", keyType: type === "uuid" ? "uuid" : "int", table };
103
+ if (type === "enum") {
104
+ const values = Array.isArray(row.values) ? row.values : [];
105
+ return { ...base, type, values: values.map((v) => typeof v === "number" ? v : methodArg(v)) };
106
+ }
107
+ if (type === "vector") {
108
+ const size = isRow(row.vector) ? Number(row.vector.size) : Number.NaN;
109
+ return { ...base, type, size: Number.isFinite(size) ? size : 0 };
110
+ }
111
+ if (type === "obj") {
112
+ return { ...base, type, children: rows(row.children).map((child) => describeField(child, nullableByDefault, tables)) };
113
+ }
114
+ if (SCALAR_TYPES.has(type)) return { ...base, type };
115
+ return { ...base, type: "unknown", storedType: type };
116
+ }
117
+ function customizeMap(v) {
118
+ return isRow(v) ? v : {};
119
+ }
120
+ function expandDbLink(row, table, tables) {
121
+ const name = typeof row.name === "string" ? row.name : "";
122
+ const schema = tables.get(table);
123
+ if (schema === void 0) return { name, type: "dbLink", table, columns: void 0 };
124
+ const hidden = new Set(Array.isArray(row.hidden) ? row.hidden.filter((h) => typeof h === "string") : []);
125
+ const columns = rows(schema).filter((column) => column.name !== "id" && !hidden.has(String(column.name)));
126
+ return { name, type: "dbLink", table, columns: customizeColumns(columns, customizeMap(row.customize), tables) };
127
+ }
128
+ function customizeColumns(columns, customize, tables) {
129
+ return columns.flatMap((column) => {
130
+ const name = String(column.name);
131
+ const node = Object.hasOwn(customize, name) ? customize[name] : void 0;
132
+ if (node === void 0) {
133
+ if (column.access === "private" || column.access === "internal") return [];
134
+ return [describeField(column, COLUMN_NULLABLE, tables)];
135
+ }
136
+ const settings = isRow(node) ? node : {};
137
+ if (settings.hidden === true) return [];
138
+ const described = describeField(column, COLUMN_NULLABLE, tables);
139
+ const nested = customizeMap(settings.customize);
140
+ if (Object.keys(nested).length > 0) {
141
+ if (described.type !== "obj") return [described];
142
+ return [{ ...described, children: customizeColumns(rows(column.children), nested, tables) }];
143
+ }
144
+ if (described.type === "dbLink") return [described];
145
+ const methods = described.type === "obj" ? [] : methodsOf(settings.methods, false);
146
+ return [{ ...described, required: settings.required === true, methods }];
147
+ });
148
+ }
149
+
150
+ // src/emit/route-input-types.ts
151
+ var NO_ROUTE_INPUTS = { routes: [], channels: [], messages: [] };
152
+ var OBJECT_MEMBERS = /* @__PURE__ */ new Set([
153
+ "constructor",
154
+ "toString",
155
+ "toLocaleString",
156
+ "valueOf",
157
+ "hasOwnProperty",
158
+ "isPrototypeOf",
159
+ "propertyIsEnumerable"
160
+ ]);
161
+ var FILE_REF = "{ path?: string; name?: string; type?: string; size?: number; access?: string; meta?: unknown; url?: string }";
162
+ var FILE_UPLOAD = "{ readonly __fileUpload?: never }";
163
+ var POSITION = "{ lng: number; lat: number }";
164
+ var GEO = {
165
+ geo_point: `{ type: "point"; data: ${POSITION} }`,
166
+ geo_multipoint: `{ type: "points"; data: ${POSITION}[] }`,
167
+ geo_linestring: `{ type: "path"; data: ${POSITION}[] }`,
168
+ geo_multilinestring: `{ type: "paths"; data: ${POSITION}[][] }`,
169
+ geo_polygon: `{ type: "poly"; data: ${POSITION}[] }`,
170
+ geo_multipolygon: `{ type: "polys"; data: ${POSITION}[][] }`
171
+ };
172
+ var SCALAR = {
173
+ text: "string",
174
+ email: "string",
175
+ password: "string",
176
+ uuid: "string",
177
+ date: "string",
178
+ int: "number",
179
+ decimal: "number",
180
+ epochms: "number",
181
+ bool: "boolean",
182
+ json: "unknown",
183
+ file: FILE_UPLOAD,
184
+ blob: FILE_REF,
185
+ blob_img: FILE_REF,
186
+ blob_video: FILE_REF,
187
+ blob_audio: FILE_REF,
188
+ ...GEO
189
+ };
190
+ function propertyName(name) {
191
+ return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(name) ? name : JSON.stringify(name);
192
+ }
193
+ function baseType(d, indent) {
194
+ switch (d.type) {
195
+ case "enum":
196
+ return d.values.length === 0 ? "never" : d.values.map((v) => typeof v === "number" ? String(v) : JSON.stringify(v)).join(" | ");
197
+ case "vector":
198
+ return "number[]";
199
+ case "tableRef":
200
+ return d.keyType === "uuid" ? "string" : "number";
201
+ case "obj":
202
+ return objectType(d.children, indent);
203
+ case "unknown":
204
+ return "unknown";
205
+ default:
206
+ return SCALAR[d.type] ?? "unknown";
207
+ }
208
+ }
209
+ function valueType(d, indent) {
210
+ let type = baseType(d, indent);
211
+ if (d.list !== false) type = d.type === "enum" ? `(${type})[]` : `${type}[]`;
212
+ if (d.nullable && type !== "unknown") type = `${type} | null`;
213
+ return type;
214
+ }
215
+ function objectType(inputs, indent) {
216
+ const keys = /* @__PURE__ */ new Map();
217
+ let open = false;
218
+ const inner = `${indent} `;
219
+ const visit = (list) => {
220
+ for (const d of list) {
221
+ if (d.type === "dbLink") {
222
+ if (d.columns === void 0) open = true;
223
+ else visit(d.columns);
224
+ continue;
225
+ }
226
+ const type = valueType(d, inner);
227
+ const seen = keys.get(d.name);
228
+ if (seen === void 0) {
229
+ keys.set(d.name, { types: [type], required: d.required });
230
+ } else {
231
+ if (!seen.types.includes(type)) seen.types.push(type);
232
+ seen.required &&= d.required;
233
+ }
234
+ }
235
+ };
236
+ visit(inputs);
237
+ const rows2 = [...keys].map(([name, { types, required }]) => {
238
+ const widened = !required && OBJECT_MEMBERS.has(name) ? [...types, `Object[${JSON.stringify(name)}]`] : types;
239
+ return `${inner}${propertyName(name)}${required ? "" : "?"}: ${widened.join(" | ")};`;
240
+ });
241
+ if (open) rows2.push(`${inner}[column: string]: unknown;`);
242
+ return rows2.length === 0 ? "{}" : `{
243
+ ${rows2.join("\n")}
244
+ ${indent}}`;
245
+ }
246
+ function inputMap(name, doc, sets) {
247
+ const rows2 = sets.map((set) => ` ${JSON.stringify(set.key)}: ${objectType(set.inputs, " ")};`);
248
+ return `${doc}
249
+ export type ${name} = ${rows2.length === 0 ? "{}" : `{
250
+ ${rows2.join("\n")}
251
+ }`};
252
+ `;
253
+ }
254
+ function renderRouteInputTypes(inputs) {
255
+ return `
256
+ ${inputMap(
257
+ "RouteInputs",
258
+ `/**
259
+ * The request body/query inputs of every endpoint, keyed exactly like ROUTES.
260
+ * Path params are inputs too, so they appear here as well as in routePath().
261
+ * Matches InferInput<typeof def>, except that a database-link input appears as
262
+ * the linked table's columns, which is what the server accepts.
263
+ */`,
264
+ inputs.routes
265
+ )}
266
+ ${inputMap(
267
+ "ChannelInputs",
268
+ "/** The path params of every realtime channel, keyed exactly like CHANNELS. */",
269
+ inputs.channels
270
+ )}
271
+ ${inputMap(
272
+ "MessageInputs",
273
+ `/**
274
+ * The payload of every realtime message, keyed "<channel key> <message name>"
275
+ * (e.g. "rooms/{room_id} send").
276
+ */`,
277
+ inputs.messages
278
+ )}
279
+ /** Every realtime message in this workspace, keyed "<channel key> <message name>". */
280
+ export type MessageName = keyof MessageInputs;
281
+ `;
282
+ }
5
283
 
6
284
  // src/emit/routes-manifest.ts
7
285
  var RouteManifestError = class extends Error {
@@ -12,16 +290,36 @@ function routeKey(route) {
12
290
  function qualifiedRouteKey(route) {
13
291
  return `${route.group}:${routeKey(route)}`;
14
292
  }
293
+ function keyRoutes(routes) {
294
+ const sorted = [...routes].sort(
295
+ (a, b) => a.canonical.localeCompare(b.canonical) || a.name.localeCompare(b.name) || a.verb.localeCompare(b.verb)
296
+ );
297
+ const holders = /* @__PURE__ */ new Map();
298
+ for (const route of sorted) holders.set(routeKey(route), (holders.get(routeKey(route)) ?? 0) + 1);
299
+ return sorted.map((route) => {
300
+ const short = routeKey(route);
301
+ const group = route.group ?? route.canonical;
302
+ return { route, key: holders.get(short) > 1 ? qualifiedRouteKey({ ...route, group }) : short, short, group };
303
+ });
304
+ }
305
+ function keyChannels(channels) {
306
+ const holders = /* @__PURE__ */ new Map();
307
+ for (const channel of channels) holders.set(channel.name, (holders.get(channel.name) ?? 0) + 1);
308
+ return [...channels].sort((a, b) => a.name.localeCompare(b.name) || a.server.localeCompare(b.server)).map((channel) => ({
309
+ channel,
310
+ key: holders.get(channel.name) > 1 ? `${channel.server}:${channel.name}` : channel.name
311
+ }));
312
+ }
15
313
  function literal(value) {
16
314
  return JSON.stringify(value);
17
315
  }
18
- function objectLiteral(rows) {
19
- return rows.length === 0 ? "{}" : `{
20
- ${rows.join("\n")}
316
+ function objectLiteral(rows2) {
317
+ return rows2.length === 0 ? "{}" : `{
318
+ ${rows2.join("\n")}
21
319
  }`;
22
320
  }
23
- function overloadsFor(fn, rows) {
24
- return rows.map(
321
+ function overloadsFor(fn, rows2) {
322
+ return rows2.map(
25
323
  (r) => r.params.length === 0 ? `export function ${fn}(name: ${literal(r.name)}): string;` : `export function ${fn}(name: ${literal(r.name)}, params: { ${r.params.map((p) => `${literal(p)}: string | number`).join("; ")} }): string;`
26
324
  ).join("\n");
27
325
  }
@@ -37,17 +335,14 @@ function renderRealtime(realtime) {
37
335
  }
38
336
  seenServer.add(server.name);
39
337
  }
40
- const holders = /* @__PURE__ */ new Map();
41
- for (const channel of realtime.channels) holders.set(channel.name, (holders.get(channel.name) ?? 0) + 1);
42
338
  const ambiguous = /* @__PURE__ */ new Map();
43
339
  const seenChannel = /* @__PURE__ */ new Set();
44
- const channels = [...realtime.channels].sort((a, b) => a.name.localeCompare(b.name) || a.server.localeCompare(b.server)).map((channel) => {
340
+ const channels = keyChannels(realtime.channels).map(({ channel, key }) => {
45
341
  if (!known.has(channel.server)) {
46
342
  throw new RouteManifestError(
47
343
  `The channel "${channel.name}" names the realtime server "${channel.server}", which is not in this workspace. A channel's socket URL comes from its server's canonical, so the server must be registered too.`
48
344
  );
49
345
  }
50
- const key = holders.get(channel.name) > 1 ? `${channel.server}:${channel.name}` : channel.name;
51
346
  if (seenChannel.has(key)) {
52
347
  throw new RouteManifestError(
53
348
  `The realtime server "${channel.server}" has two channels both named "${channel.name}". Rename one.`
@@ -91,18 +386,10 @@ export type ChannelName = keyof typeof CHANNELS;
91
386
  ${ambiguousOverloads}${overloadsFor("channelPath", channels.map((c) => ({ name: c.key, params: c.params })))}
92
387
  ${realtimeImplementation(ambiguousKeys.length > 0)}`;
93
388
  }
94
- function renderRouteManifest(routes, realtime) {
95
- const sorted = [...routes].sort(
96
- (a, b) => a.canonical.localeCompare(b.canonical) || a.name.localeCompare(b.name) || a.verb.localeCompare(b.verb)
97
- );
98
- const holders = /* @__PURE__ */ new Map();
99
- for (const route of sorted) holders.set(routeKey(route), (holders.get(routeKey(route)) ?? 0) + 1);
389
+ function renderRouteManifest(routes, realtime, inputs = NO_ROUTE_INPUTS) {
100
390
  const ambiguous = /* @__PURE__ */ new Map();
101
391
  const seen = /* @__PURE__ */ new Map();
102
- const rows = sorted.map((route) => {
103
- const short = routeKey(route);
104
- const group = route.group ?? route.canonical;
105
- const key = holders.get(short) > 1 ? qualifiedRouteKey({ ...route, group }) : short;
392
+ const rows2 = keyRoutes(routes).map(({ route, key, short, group }) => {
106
393
  const clash = seen.get(key);
107
394
  if (clash !== void 0) {
108
395
  throw new RouteManifestError(
@@ -115,7 +402,7 @@ function renderRouteManifest(routes, realtime) {
115
402
  const path = `/api:${route.canonical}/${route.name.replace(/^\/+/, "")}`;
116
403
  return { ...route, key, params, path };
117
404
  });
118
- const entries = rows.map(
405
+ const entries = rows2.map(
119
406
  (r) => ` ${literal(r.key)}: { verb: ${literal(r.verb)}, path: ${literal(r.path)} },`
120
407
  );
121
408
  const ambiguousKeys = [...ambiguous.keys()].sort();
@@ -133,7 +420,7 @@ const AMBIGUOUS: Record<string, readonly string[]> = ${objectLiteral(
133
420
  )};
134
421
  `;
135
422
  const realtimeSection = realtime && (realtime.servers.length > 0 || realtime.channels.length > 0) ? renderRealtime(realtime) : "";
136
- return `${HEADER}${FILL_PARAMS}${ambiguousSection}
423
+ return `${MANIFEST_HEADER}${FILL_PARAMS}${ambiguousSection}
137
424
  export const ROUTES = ${objectLiteral(entries)} as const;
138
425
 
139
426
  /**
@@ -141,10 +428,10 @@ export const ROUTES = ${objectLiteral(entries)} as const;
141
428
  * or \`"<group>:<VERB> <name>"\` when that pair is in more than one api group.
142
429
  */
143
430
  export type RouteName = keyof typeof ROUTES;
144
- ${rows.length > 1 ? MANY_ROUTES : ""}
145
- ${rows.length > 1 ? UNION_OVERLOAD : ""}${ambiguousOverloads ? `${ambiguousOverloads}
146
- ` : ""}${overloadsFor("routePath", rows.map((r) => ({ name: r.key, params: r.params })))}
147
- ${implementation(ambiguousKeys.length > 0)}${realtimeSection}`;
431
+ ${rows2.length > 1 ? MANY_ROUTES : ""}
432
+ ${rows2.length > 1 ? UNION_OVERLOAD : ""}${ambiguousOverloads ? `${ambiguousOverloads}
433
+ ` : ""}${overloadsFor("routePath", rows2.map((r) => ({ name: r.key, params: r.params })))}
434
+ ${implementation(ambiguousKeys.length > 0)}${realtimeSection}${renderRouteInputTypes(inputs)}`;
148
435
  }
149
436
  var UNION_OVERLOAD = `/** A union of route names (e.g. a \`key: RouteName\` parameter): params checked at runtime. */
150
437
  export function routePath<N extends RouteName>(name: ManyRoutes<N>, params?: Record<string, string | number>): string;
@@ -153,13 +440,16 @@ var MANY_ROUTES = `
153
440
  /** \`N\` when it is a union of two or more route names, else \`never\`. */
154
441
  type ManyRoutes<N> = [(N extends unknown ? (x: N) => void : never) extends (x: infer I) => void ? I : never] extends [never] ? N : never;
155
442
  `;
156
- var HEADER = `/**
443
+ var MANIFEST_HEADER = `/**
157
444
  * GENERATED by \`xanosdk routes --emit\`. Do not edit.
158
445
  *
159
- * Plain data plus one interpolator \u2014 this file imports nothing, so a frontend
160
- * gets the typed path/verb (and socket) contract without pulling the SDK runtime
161
- * into its bundle. Regenerate after changing an endpoint's name, verb, or api
162
- * group, or a realtime server's or channel's name.
446
+ * Plain data plus one interpolator, and the request input types of every
447
+ * endpoint, channel and message. The core sections import nothing; the only
448
+ * imports are the packages an installed module's block declares, never the
449
+ * SDK itself. So a frontend gets the typed path/verb (and socket) contract
450
+ * without pulling the SDK runtime into its bundle. Regenerate after changing an
451
+ * endpoint's name, verb, api group or inputs, or a realtime server's, channel's
452
+ * or message's name or inputs.
163
453
  */
164
454
  `;
165
455
  var FILL_PARAMS = `
@@ -376,12 +666,13 @@ function planRouteManifest(payload, locked = () => void 0) {
376
666
  if (guid === void 0) continue;
377
667
  const name = text(a.name);
378
668
  if (name !== void 0) groupByGuid.set(guid, name);
379
- const resolved = text(a.canonical) ?? (name !== void 0 ? locked("app", name) : void 0);
380
- if (resolved) canonicalByGuid.set(guid, resolved);
669
+ const resolved2 = text(a.canonical) ?? (name !== void 0 ? locked("app", name) : void 0);
670
+ if (resolved2) canonicalByGuid.set(guid, resolved2);
381
671
  }
382
- const rows = list("query").map((q) => {
672
+ const storedInputs = /* @__PURE__ */ new Map();
673
+ const rows2 = list("query").map((q) => {
383
674
  const group = ref(q.app);
384
- return {
675
+ const row = {
385
676
  verb: q.verb,
386
677
  // already an uppercase HttpVerb in the bundle
387
678
  // Match getPath(): the path segment drops any leading slash on the name.
@@ -389,8 +680,10 @@ function planRouteManifest(payload, locked = () => void 0) {
389
680
  canonical: group !== void 0 ? canonicalByGuid.get(group) : void 0,
390
681
  ...group !== void 0 && groupByGuid.has(group) ? { group: groupByGuid.get(group) } : {}
391
682
  };
683
+ storedInputs.set(row, q.input);
684
+ return row;
392
685
  });
393
- rows.sort((a, b) => (a.canonical ?? "").localeCompare(b.canonical ?? "") || a.name.localeCompare(b.name));
686
+ rows2.sort((a, b) => (a.canonical ?? "").localeCompare(b.canonical ?? "") || a.name.localeCompare(b.name));
394
687
  const serverNameByGuid = /* @__PURE__ */ new Map();
395
688
  const serverRows = list("realtime_server").flatMap((s) => {
396
689
  const name = text(s.name);
@@ -401,23 +694,51 @@ function planRouteManifest(payload, locked = () => void 0) {
401
694
  });
402
695
  const servers = serverRows.flatMap((s) => s.canonical ? [{ name: s.name, canonical: s.canonical }] : []);
403
696
  const describable = new Set(servers.map((s) => s.name));
697
+ const channelGuids = /* @__PURE__ */ new Map();
404
698
  const channels = list("channel").flatMap((c) => {
405
699
  const name = text(c.name);
406
700
  if (name === void 0) return [];
407
701
  const serverGuid = ref(c.server);
408
702
  const server = serverGuid !== void 0 ? serverNameByGuid.get(serverGuid) : void 0;
409
703
  if (server === void 0 || !describable.has(server)) return [];
410
- return [{ name, server }];
704
+ const channel = { name, server };
705
+ channelGuids.set(channel, text(c.guid));
706
+ storedInputs.set(channel, c.input);
707
+ return [channel];
708
+ });
709
+ const resolved = rows2.flatMap((r) => {
710
+ if (!r.canonical) return [];
711
+ const entry = { name: r.name, verb: r.verb, canonical: r.canonical, ...r.group !== void 0 ? { group: r.group } : {} };
712
+ storedInputs.set(entry, storedInputs.get(r));
713
+ return [entry];
714
+ });
715
+ const tables = tableColumns(payload);
716
+ const routeInputs = keyRoutes(resolved).map(({ route, key }) => ({
717
+ key,
718
+ inputs: describeInputs(storedInputs.get(route), tables)
719
+ }));
720
+ const channelKeyByGuid = /* @__PURE__ */ new Map();
721
+ const channelInputs = keyChannels(channels).map(({ channel, key }) => {
722
+ const guid = channelGuids.get(channel);
723
+ if (guid !== void 0) channelKeyByGuid.set(guid, key);
724
+ return { key, inputs: describeInputs(storedInputs.get(channel), tables) };
725
+ });
726
+ const messageInputs = list("message").flatMap((m) => {
727
+ const name = text(m.name);
728
+ const guid = ref(m.channel);
729
+ const channel = guid !== void 0 ? channelKeyByGuid.get(guid) : void 0;
730
+ if (name === void 0 || channel === void 0) return [];
731
+ return [{ key: `${channel} ${name}`, channel, name, inputs: describeInputs(m.input, tables) }];
411
732
  });
733
+ messageInputs.sort((a, b) => byCodeUnit(a.key, b.key));
412
734
  return {
413
- rows,
414
- resolved: rows.flatMap(
415
- (r) => r.canonical ? [{ name: r.name, verb: r.verb, canonical: r.canonical, ...r.group !== void 0 ? { group: r.group } : {} }] : []
416
- ),
417
- unresolved: rows.filter((r) => !r.canonical),
735
+ rows: rows2,
736
+ resolved,
737
+ unresolved: rows2.filter((r) => !r.canonical),
418
738
  servers,
419
739
  unresolvedServers: serverRows.filter((s) => !s.canonical).map((s) => s.name),
420
- channels
740
+ channels,
741
+ inputs: { routes: routeInputs, channels: channelInputs, messages: messageInputs }
421
742
  };
422
743
  }
423
744
  function unresolvedCanonicalMessage(unresolved, entry) {
@@ -430,7 +751,8 @@ function renderPlannedManifest(plan, entry = "<entry>") {
430
751
  if (plan.resolved.length === 0 && plan.servers.length === 0) return void 0;
431
752
  return renderRouteManifest(
432
753
  plan.resolved,
433
- plan.servers.length > 0 ? { servers: plan.servers, channels: plan.channels } : void 0
754
+ plan.servers.length > 0 ? { servers: plan.servers, channels: plan.channels } : void 0,
755
+ plan.inputs
434
756
  );
435
757
  }
436
758
 
@@ -438,10 +760,13 @@ export {
438
760
  RouteManifestError,
439
761
  routeKey,
440
762
  qualifiedRouteKey,
763
+ keyRoutes,
764
+ keyChannels,
441
765
  renderRouteManifest,
766
+ MANIFEST_HEADER,
442
767
  ROUTES_MANIFEST_BASENAME,
443
768
  planRouteManifest,
444
769
  unresolvedCanonicalMessage,
445
770
  renderPlannedManifest
446
771
  };
447
- //# sourceMappingURL=chunk-TM5LRSBB.js.map
772
+ //# sourceMappingURL=chunk-LBJA7IEM.js.map
@@ -0,0 +1,116 @@
1
+ // src/deploy/local-engine-handshake.ts
2
+ var LOOPBACK_HOSTS = ["127.0.0.1", "::1", "localhost"];
3
+ var ALLOWED_PROTOCOLS = ["http:", "https:"];
4
+ function isLoopbackUrl(url) {
5
+ let parsed;
6
+ try {
7
+ parsed = new URL(url);
8
+ } catch {
9
+ return false;
10
+ }
11
+ if (!ALLOWED_PROTOCOLS.includes(parsed.protocol)) return false;
12
+ const host = parsed.hostname.replace(/^\[|\]$/g, "");
13
+ if (!LOOPBACK_HOSTS.includes(host)) return false;
14
+ return /^[0-9]+$/.test(parsed.port);
15
+ }
16
+ function assertLoopbackUrl(url, what) {
17
+ if (isLoopbackUrl(url)) return;
18
+ throw new Error(
19
+ `${what} reports a url this SDK will not send a token to: ${url}
20
+ A Xano Engine has to serve loopback over http on a port of its own \u2014 ${LOOPBACK_HOSTS.join(", ")} \u2014 and anything else is reachable from off this machine. Stop that engine and start a fresh one without binding it to all interfaces.`
21
+ );
22
+ }
23
+ function requireString(raw, key, source) {
24
+ const value = raw[key];
25
+ if (typeof value !== "string" || value === "") {
26
+ throw new Error(
27
+ `${source} is missing \`${key}\`, or gave it as something other than text.
28
+ That is not an engine this SDK knows how to drive \u2014 the engine on this machine is older or newer than the one it was built against. Move to a current one with \`xanosdk local update\`.`
29
+ );
30
+ }
31
+ return value;
32
+ }
33
+ function optionalString(raw, key, source) {
34
+ return raw[key] === void 0 ? void 0 : requireString(raw, key, source);
35
+ }
36
+ function requireNumber(raw, key, source) {
37
+ const value = raw[key];
38
+ if (typeof value !== "number" || !Number.isFinite(value)) {
39
+ throw new Error(
40
+ `${source} is missing \`${key}\`, or gave it as something other than a number.
41
+ That is not an engine this SDK knows how to drive \u2014 the engine on this machine is older or newer than the one it was built against. Move to a current one with \`xanosdk local update\`.`
42
+ );
43
+ }
44
+ return value;
45
+ }
46
+ function readEngine(value, source) {
47
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
48
+ throw new Error(
49
+ `${source} did not print an engine description.
50
+ Re-run, and if it happens again fetch a fresh copy with \`xanosdk local cache clear\`, then \`xanosdk deploy --local\`.`
51
+ );
52
+ }
53
+ const raw = value;
54
+ const mcpUrl = optionalString(raw, "mcp_url", source);
55
+ return {
56
+ name: requireString(raw, "name", source),
57
+ url: requireString(raw, "url", source),
58
+ workspaceId: requireNumber(raw, "workspace_id", source),
59
+ token: requireString(raw, "access_token", source),
60
+ pid: requireNumber(raw, "pid", source),
61
+ signInUrl: requireString(raw, "sign_in_url", source),
62
+ loginLinkEndpoint: requireString(raw, "login_link_endpoint", source),
63
+ logPath: requireString(raw, "log", source),
64
+ ...mcpUrl === void 0 ? {} : { mcpUrl }
65
+ };
66
+ }
67
+ var HANDSHAKE_SOURCE = "The engine's start handshake";
68
+ var LISTING_SOURCE = "The engine's list of running engines";
69
+ function parseEngineHandshake(stdout) {
70
+ let value;
71
+ try {
72
+ value = JSON.parse(stdout.trim());
73
+ } catch {
74
+ throw new Error(
75
+ `${HANDSHAKE_SOURCE} did not print an engine description.
76
+ Re-run, and if it happens again fetch a fresh copy with \`xanosdk local cache clear\`, then \`xanosdk deploy --local\`.`
77
+ );
78
+ }
79
+ const engine = readEngine(value, HANDSHAKE_SOURCE);
80
+ assertLoopbackUrl(engine.url, "The engine that just started");
81
+ return engine;
82
+ }
83
+ function parseEngineListing(stdout) {
84
+ const text = stdout.trim();
85
+ if (text === "") return [];
86
+ let value;
87
+ try {
88
+ value = JSON.parse(text);
89
+ } catch {
90
+ throw new Error(
91
+ `${LISTING_SOURCE} was not readable.
92
+ Re-run, and if it happens again fetch a fresh copy with \`xanosdk local cache clear\`, then \`xanosdk deploy --local\`.`
93
+ );
94
+ }
95
+ if (!Array.isArray(value)) {
96
+ throw new Error(
97
+ `${LISTING_SOURCE} was not a list.
98
+ Re-run, and if it happens again fetch a fresh copy with \`xanosdk local cache clear\`, then \`xanosdk deploy --local\`.`
99
+ );
100
+ }
101
+ return value.filter((entry) => !isForeignEngine(entry)).map((entry) => readEngine(entry, LISTING_SOURCE));
102
+ }
103
+ function isForeignEngine(entry) {
104
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) return false;
105
+ const raw = entry;
106
+ return raw.workspace_id === void 0 && raw.access_token === void 0;
107
+ }
108
+
109
+ export {
110
+ LOOPBACK_HOSTS,
111
+ isLoopbackUrl,
112
+ assertLoopbackUrl,
113
+ parseEngineHandshake,
114
+ parseEngineListing
115
+ };
116
+ //# sourceMappingURL=chunk-LCOCRJ4K.js.map