@xano/sdk 1.0.4 → 1.0.6

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 (280) hide show
  1. package/CHANGELOG.md +32 -5
  2. package/README.md +250 -342
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/agent-file-refresh-67QIX45H.js +39 -0
  5. package/dist/{answer-shape-LVV2SVBK.js → answer-shape-UCDUKPAN.js} +6 -6
  6. package/dist/{backend-dir-WZADOK3L.js → backend-dir-3LIL6SCT.js} +16 -15
  7. package/dist/{backend-slot-NSCTWCUX.js → backend-slot-JREP27UD.js} +4 -4
  8. package/dist/bin.js +59 -58
  9. package/dist/{branch-ONWPJ4V6.js → branch-2IPHOAYS.js} +10 -10
  10. package/dist/{branch-commands-ZT2MJIRS.js → branch-commands-KTKAXBAN.js} +31 -32
  11. package/dist/bundle.js +9 -39
  12. package/dist/{capture-3JNUA6C2.js → capture-GW5KNKMB.js} +4 -4
  13. package/dist/{chunk-FPBGAT5D.js → chunk-26MOFAJT.js} +3 -3
  14. package/dist/{chunk-O7QOWS6M.js → chunk-2FLIJGBZ.js} +12 -12
  15. package/dist/{chunk-QAEQGT5I.js → chunk-2WBH5HUY.js} +7 -7
  16. package/dist/{chunk-37AHZ7JX.js → chunk-3BBIDW3Y.js} +6 -6
  17. package/dist/{chunk-DGWHAVRG.js → chunk-3EDSPMXN.js} +12 -1
  18. package/dist/{chunk-2AUV6NXK.js → chunk-3II44CUJ.js} +36 -36
  19. package/dist/{chunk-7GX445AE.js → chunk-4XHAT7C5.js} +2 -2
  20. package/dist/{chunk-OOXWYAA4.js → chunk-57A5ZKPO.js} +1 -1
  21. package/dist/{chunk-OOGXZL7Z.js → chunk-5KJBWIDZ.js} +84 -6
  22. package/dist/{chunk-5YL5OC2G.js → chunk-5QMJOE2K.js} +6 -6
  23. package/dist/{chunk-3H3EPMFY.js → chunk-5TVFLG3C.js} +2 -2
  24. package/dist/{chunk-WFMVKY7I.js → chunk-5YQV35C2.js} +9 -9
  25. package/dist/{chunk-NA3PXMEF.js → chunk-64WWE3EF.js} +1 -1
  26. package/dist/{chunk-FMOEVAGT.js → chunk-6X3MY2JP.js} +3 -3
  27. package/dist/{chunk-2LVTBPW2.js → chunk-6X6BJN6Y.js} +3 -3
  28. package/dist/{chunk-DYG5D3FD.js → chunk-763M6LX3.js} +16 -2
  29. package/dist/{chunk-EESV6NU2.js → chunk-7FIMUFBP.js} +2 -2
  30. package/dist/{chunk-CFSFBKHP.js → chunk-7GAIJW62.js} +2 -2
  31. package/dist/{chunk-6R7S775T.js → chunk-7REDHC4N.js} +2 -2
  32. package/dist/chunk-7VR4IO5B.js +44 -0
  33. package/dist/chunk-A7MRZ4GF.js +78 -0
  34. package/dist/{chunk-D5ZEAF4G.js → chunk-ATJ2W7DC.js} +81 -58
  35. package/dist/{chunk-BUJRS7XB.js → chunk-AVS4WPPY.js} +2 -2
  36. package/dist/{chunk-MEE5RZ6G.js → chunk-BL3AZ3AP.js} +2 -2
  37. package/dist/chunk-BTVUYHWV.js +111 -0
  38. package/dist/{chunk-T4DUFQ2S.js → chunk-CCU5CCRX.js} +5 -5
  39. package/dist/{chunk-5T2CTWTB.js → chunk-CHINR7WD.js} +6 -6
  40. package/dist/{chunk-VD32O6KZ.js → chunk-CJDPSCMX.js} +45 -5
  41. package/dist/{chunk-3HOGFGKG.js → chunk-D3KEPRRN.js} +2 -2
  42. package/dist/{chunk-SBR2WZXG.js → chunk-D7BUMOKU.js} +60 -53
  43. package/dist/{chunk-WRBKLYSJ.js → chunk-DNBP4GJN.js} +4 -3
  44. package/dist/{chunk-JTUKLCXS.js → chunk-DXUICABI.js} +1 -1
  45. package/dist/{chunk-XMDDBEEM.js → chunk-E763QI3G.js} +2 -2
  46. package/dist/{chunk-KTGRGWZW.js → chunk-EADVVTDK.js} +7 -7
  47. package/dist/{chunk-FJWZ5OVV.js → chunk-ENMBEXOP.js} +3 -3
  48. package/dist/{chunk-OPHB5ORL.js → chunk-EQFYOOO6.js} +171 -92
  49. package/dist/{chunk-WOGJB2F6.js → chunk-FNLTFOUD.js} +4 -9
  50. package/dist/{chunk-II747OWE.js → chunk-FQ53GTII.js} +10 -10
  51. package/dist/{chunk-JP7M7OU7.js → chunk-FU3VCE5A.js} +46 -27
  52. package/dist/{chunk-OGBMUST4.js → chunk-GHQ4BVI4.js} +14 -14
  53. package/dist/{chunk-45YPFB7B.js → chunk-GLY552SI.js} +84 -57
  54. package/dist/{chunk-QV3GXQRE.js → chunk-GOLFAEUV.js} +2 -2
  55. package/dist/{chunk-L2GLOJAO.js → chunk-GW5RHGOB.js} +22 -22
  56. package/dist/{chunk-A6QTTJUI.js → chunk-GWTFI3GA.js} +2 -2
  57. package/dist/{chunk-MCTIKRMN.js → chunk-GZHLCUZ6.js} +8 -8
  58. package/dist/{chunk-664LSWE5.js → chunk-HCG7NDIL.js} +4 -4
  59. package/dist/{chunk-7PMVIHB3.js → chunk-I3H3HCPY.js} +50 -29
  60. package/dist/{chunk-LIVN53UV.js → chunk-I3VHW6XM.js} +31 -31
  61. package/dist/{chunk-C4FHQA7R.js → chunk-IF4PEGVD.js} +8 -8
  62. package/dist/{chunk-WFG67AYS.js → chunk-IMELQ2I6.js} +3 -3
  63. package/dist/{chunk-3P3HXN76.js → chunk-ITC2R2OT.js} +11 -11
  64. package/dist/{chunk-W5ONYLOP.js → chunk-IXFJORNH.js} +4 -4
  65. package/dist/{chunk-HMLGM2MW.js → chunk-IYXL5NYU.js} +260 -32
  66. package/dist/{chunk-2B22WWKL.js → chunk-JFBRXRJD.js} +59 -35
  67. package/dist/chunk-JI3BLXWQ.js +107 -0
  68. package/dist/{chunk-4DJTQ6W4.js → chunk-JIKGT7DO.js} +2 -1
  69. package/dist/{chunk-O5V3YH5P.js → chunk-JRVQ7M7W.js} +8 -8
  70. package/dist/{chunk-4APOHK7Y.js → chunk-JXVJGF3Y.js} +2 -2
  71. package/dist/chunk-KPFS3RGM.js +257 -0
  72. package/dist/{chunk-PML67X22.js → chunk-LAOMN6QQ.js} +3 -3
  73. package/dist/{chunk-TTVAHCWP.js → chunk-LBJA7IEM.js} +370 -45
  74. package/dist/{chunk-KUTFFHUM.js → chunk-LD6ARK3A.js} +2 -2
  75. package/dist/{chunk-HUSH7LRI.js → chunk-LL7SGTRC.js} +36 -33
  76. package/dist/{chunk-I2BGYNHD.js → chunk-M5CSVB23.js} +7 -7
  77. package/dist/{chunk-UCQ2VUTG.js → chunk-M6ZFSTIZ.js} +2 -2
  78. package/dist/{chunk-MNVDVR3M.js → chunk-MBDFH7XB.js} +4 -4
  79. package/dist/{chunk-QXTKSOFI.js → chunk-MF4W6FHU.js} +1 -1
  80. package/dist/{chunk-RX3EMQGN.js → chunk-MFWF2NZJ.js} +12 -5
  81. package/dist/{chunk-SEUCZZCP.js → chunk-N5I37JFB.js} +3 -3
  82. package/dist/{chunk-IJ3SXSZM.js → chunk-ND43ZOS3.js} +6 -6
  83. package/dist/chunk-NDWVJ2QZ.js +67 -0
  84. package/dist/{chunk-E65QIWOO.js → chunk-NPODGBVJ.js} +4 -4
  85. package/dist/{chunk-CYB7UQA2.js → chunk-OIKLDDYC.js} +5 -5
  86. package/dist/{chunk-MLGI2SRQ.js → chunk-PFBXSVZF.js} +4 -4
  87. package/dist/{chunk-AM4FKL4J.js → chunk-PL7AIAWS.js} +12 -12
  88. package/dist/{chunk-S7E2AHV3.js → chunk-PMMHSX4H.js} +26 -9
  89. package/dist/{chunk-WL2DSNJV.js → chunk-Q22BMRPF.js} +2 -2
  90. package/dist/{chunk-3FN2BIGB.js → chunk-QJM5XZ4K.js} +6 -6
  91. package/dist/{chunk-EWCDPFW5.js → chunk-QXYMDARD.js} +4 -4
  92. package/dist/{chunk-MLPDSGJQ.js → chunk-QZEAANWP.js} +5 -5
  93. package/dist/{chunk-ESZ2FF57.js → chunk-RIN4YY34.js} +88 -74
  94. package/dist/{chunk-37FBPMNE.js → chunk-S56YBYMN.js} +5 -2
  95. package/dist/{chunk-CBYQ2ZN3.js → chunk-SKEG3V2V.js} +2 -2
  96. package/dist/{chunk-4PQHO74B.js → chunk-SLGJIWCY.js} +4 -4
  97. package/dist/{chunk-IVKRT476.js → chunk-SPITRSOF.js} +2 -2
  98. package/dist/{chunk-BUECLQXK.js → chunk-SPKA2LV6.js} +4 -4
  99. package/dist/{chunk-HHW5AWVD.js → chunk-SSITMX7I.js} +30 -30
  100. package/dist/{chunk-OPG4DYX2.js → chunk-T4LJ5UR2.js} +29 -7
  101. package/dist/{chunk-LXNQWHZM.js → chunk-TECTL2NU.js} +4 -4
  102. package/dist/{chunk-E6H5ZEV3.js → chunk-TTEIDD5Q.js} +3 -3
  103. package/dist/{chunk-6VBTPV2Y.js → chunk-U35MTOXQ.js} +3 -3
  104. package/dist/{chunk-UKUIUS3E.js → chunk-U6MTGB46.js} +5 -5
  105. package/dist/{chunk-Y2ZLKBM6.js → chunk-UD2Z7K6W.js} +4 -4
  106. package/dist/{chunk-IXUPUFCG.js → chunk-UIVMR7UK.js} +2 -2
  107. package/dist/{chunk-UDE5C2XN.js → chunk-VDHA5SSQ.js} +3 -3
  108. package/dist/{chunk-5W7DOMIU.js → chunk-VJFMUJWZ.js} +4 -4
  109. package/dist/{chunk-XNCP4KYO.js → chunk-VQPDATQT.js} +1 -1
  110. package/dist/{chunk-KCAL4QYP.js → chunk-VW4CWVYX.js} +4 -4
  111. package/dist/chunk-WAVNUTMT.js +9 -0
  112. package/dist/{chunk-DIG3NITC.js → chunk-WBH4KJWM.js} +3 -3
  113. package/dist/{chunk-HSEQYBDO.js → chunk-WZHLMU6T.js} +3 -3
  114. package/dist/{chunk-WYEQFD6A.js → chunk-XFBGXB7X.js} +173 -105
  115. package/dist/{chunk-UI4OPTYR.js → chunk-Y453TW6J.js} +2 -2
  116. package/dist/{chunk-LUTMOHOW.js → chunk-YGLMRH5U.js} +9 -9
  117. package/dist/{chunk-GPI3OWRE.js → chunk-YHB34BN6.js} +2 -1
  118. package/dist/{chunk-5WGVIXMD.js → chunk-YKP4ZKVO.js} +14 -10
  119. package/dist/{chunk-MN2PB6WB.js → chunk-YR2I5HGE.js} +3 -3
  120. package/dist/{chunk-ZG7E72VI.js → chunk-YYC2DZMG.js} +7 -7
  121. package/dist/{chunk-D64XUF5Q.js → chunk-YYLUBYXM.js} +16 -16
  122. package/dist/{chunk-VRVKNY4A.js → chunk-Z4ZGTCCD.js} +8 -8
  123. package/dist/{chunk-44B4V2LR.js → chunk-ZDP6GDAB.js} +142 -142
  124. package/dist/{chunk-ET5DSBAC.js → chunk-ZJSTUD6D.js} +8 -8
  125. package/dist/cli.d.ts +36 -26
  126. package/dist/cli.js +57 -56
  127. package/dist/{codegen-command-HTWIW56U.js → codegen-command-R5IASBFC.js} +78 -72
  128. package/dist/codegen.d.ts +2 -2
  129. package/dist/codegen.js +2 -2
  130. package/dist/{commands-CVFYC4GK.js → commands-H7CPMMHH.js} +3 -3
  131. package/dist/{completion-AUEQC4XJ.js → completion-W5ZAI6TN.js} +12 -12
  132. package/dist/{config-JU6OQC77.js → config-MZ5KG4EP.js} +5 -5
  133. package/dist/{deploy-command-5WTFHMBT.js → deploy-command-34T2LKQ5.js} +64 -63
  134. package/dist/deploy-source-YLQ7WMYR.js +82 -0
  135. package/dist/{dev-env-sync-X636HLMK.js → dev-env-sync-TMJTNU3U.js} +58 -57
  136. package/dist/{diagnostics-LSMGB4TY.js → diagnostics-OMN5Y2AH.js} +2 -2
  137. package/dist/{display-name-hint-DMORHANO.js → display-name-hint-ZJGFNJKQ.js} +12 -12
  138. package/dist/{emit-hOFbgzde.d.ts → emit-D125xxty.d.ts} +67 -21
  139. package/dist/env-example-refresh-CQP3ZMKM.js +133 -0
  140. package/dist/{env-pull-command-WZZ7RL2E.js → env-pull-command-UTG6IC2K.js} +53 -53
  141. package/dist/{env-target-PO3MOLH5.js → env-target-FZROWYFS.js} +14 -14
  142. package/dist/{env-var-command-YKTJZFJN.js → env-var-command-VYDBQJJW.js} +51 -50
  143. package/dist/{ephemeral-BMFY55BQ.js → ephemeral-BIE6FMJV.js} +10 -10
  144. package/dist/{ephemeral-command-VDSQCOYL.js → ephemeral-command-OZ26RGXF.js} +54 -54
  145. package/dist/{ephemeral-state-6TY4JIPA.js → ephemeral-state-SNZOX2YK.js} +12 -12
  146. package/dist/{generate-command-3NTNRQRS.js → generate-command-4HR7MR36.js} +87 -79
  147. package/dist/{gitignore-FWPEDX6C.js → gitignore-EWQBXNX2.js} +20 -19
  148. package/dist/{guards-EJU2ONAX.js → guards-KYEOCVHN.js} +7 -7
  149. package/dist/{hosted-file-PSHJB3HX.js → hosted-file-S7YUQAH6.js} +2 -2
  150. package/dist/{impersonate-command-QEJA72Q2.js → impersonate-command-WC7OGKUM.js} +44 -43
  151. package/dist/{import-TBTOTU52.js → import-7Z4GCCPO.js} +6 -6
  152. package/dist/index.d.ts +14 -20
  153. package/dist/index.js +14 -14
  154. package/dist/init-command-HAO3WXH3.js +128 -0
  155. package/dist/{init-modules-HZRQFRLE.js → init-modules-NSKD4ASY.js} +12 -11
  156. package/dist/{init-web-Y2PBNJTQ.js → init-web-MKFFOQUU.js} +3 -3
  157. package/dist/internal.d.ts +5 -5
  158. package/dist/internal.js +61 -35
  159. package/dist/{io-ZUKAGFVE.js → io-PGTCBSIQ.js} +7 -5
  160. package/dist/{keep-data-merge-X5LDDCI3.js → keep-data-merge-QR2TMKEO.js} +33 -34
  161. package/dist/{lambda-config-reconcile-OUZ4OYAB.js → lambda-config-reconcile-7FJXXV6V.js} +4 -4
  162. package/dist/{landed-6VO7CX5P.js → landed-F7PCHGCK.js} +4 -4
  163. package/dist/{landing-record-QYECWLQ5.js → landing-record-MWXFIRCP.js} +26 -25
  164. package/dist/{live-diff-2S7E3SBZ.js → live-diff-5E2BQWQ7.js} +10 -9
  165. package/dist/local-engine-choice-VD5LNXJU.js +80 -0
  166. package/dist/{local-engine-command-HMTQK7MN.js → local-engine-command-RYLGMQ2O.js} +96 -95
  167. package/dist/{local-engine-config-5U3SC434.js → local-engine-config-W3KB7RWM.js} +2 -2
  168. package/dist/{local-engine-deploy-TXAOYRGF.js → local-engine-deploy-6O7NKZCA.js} +17 -17
  169. package/dist/{local-engine-process-6VZ7JJBP.js → local-engine-process-ZLLZEIRF.js} +12 -12
  170. package/dist/{local-engine-state-TJWPWCC4.js → local-engine-state-OCW5YDD7.js} +3 -3
  171. package/dist/{local-engine-update-check-R5SPDVEJ.js → local-engine-update-check-LVX4HBBI.js} +8 -8
  172. package/dist/{lock-TS465GVY.js → lock-HDCHD2ON.js} +5 -3
  173. package/dist/{lock-commands-4VT3L5W5.js → lock-commands-X2OECR4R.js} +62 -61
  174. package/dist/{login-command-O6WA4FYL.js → login-command-RLLKD565.js} +31 -30
  175. package/dist/{logout-command-6CPWGFY2.js → logout-command-XDMSXCDO.js} +17 -17
  176. package/dist/{loop-UFHKSOQ4.js → loop-SUB6C2LK.js} +9 -10
  177. package/dist/{marketplace-command-HKACSYKS.js → marketplace-command-2NHHY2X3.js} +89 -53
  178. package/dist/{marketplace-resolve-KLFYVRWS.js → marketplace-resolve-OTZYT4FG.js} +9 -8
  179. package/dist/{meta-client-73PX6UGJ.js → meta-client-TMHVBZFY.js} +15 -15
  180. package/dist/{module-manifest-GIKFNXPE.js → module-manifest-FNMW23IX.js} +7 -4
  181. package/dist/node.d.ts +5 -5
  182. package/dist/node.js +63 -63
  183. package/dist/operation-outcome-RN62735X.js +51 -0
  184. package/dist/{output-target-SZMBNYF4.js → output-target-MOLCTPBP.js} +21 -20
  185. package/dist/{package-manager-PRAHUSCN.js → package-manager-K762W7XT.js} +2 -2
  186. package/dist/{plan-disclosure-BHYG7TZ7.js → plan-disclosure-CY7AF6KP.js} +21 -22
  187. package/dist/{plugin-contributions-X4V22PJQ.js → plugin-contributions-WR26U7NT.js} +6 -6
  188. package/dist/{plugin-prompt-DKNQHW6Y.js → plugin-prompt-ZUYQQIX4.js} +5 -5
  189. package/dist/{plugin-questions-CQRVOWFK.js → plugin-questions-HAZOQ67R.js} +4 -4
  190. package/dist/plugin.d.ts +254 -10
  191. package/dist/{preflight-command-EBQ6XQF3.js → preflight-command-OHJXYND3.js} +70 -70
  192. package/dist/{profile-command-NPKBJYPM.js → profile-command-6JWT2BTL.js} +33 -32
  193. package/dist/{profile-pointer-UOO7JNFG.js → profile-pointer-PDA5XBIB.js} +5 -5
  194. package/dist/{profile-select-74TRDEPD.js → profile-select-45G5VPJK.js} +2 -2
  195. package/dist/{project-dependency-RRMTWOPC.js → project-dependency-GZWWGWEW.js} +13 -10
  196. package/dist/{project-sdk-FOR4IOXL.js → project-sdk-3W72H5QO.js} +4 -4
  197. package/dist/promote-command-UYAMUXKB.js +146 -0
  198. package/dist/{prompt-5GUQTCSP.js → prompt-U37K5RPQ.js} +4 -4
  199. package/dist/{publish-command-LGLZBOCB.js → publish-command-BUS27HGB.js} +138 -66
  200. package/dist/pull-command-ZGUNP27P.js +168 -0
  201. package/dist/{pull-superseded-GGURV5J3.js → pull-superseded-EZBGYRZF.js} +4 -4
  202. package/dist/{raw-where-EoWl5fqY.d.ts → raw-where-ZMLND6AG.d.ts} +20 -3
  203. package/dist/release-command-BQ6OHS3P.js +150 -0
  204. package/dist/{release-ns-command-EIBN3JVM.js → release-ns-command-ATGVBVIU.js} +94 -94
  205. package/dist/{retry-command-Y5YJGOH3.js → retry-command-QJ57WVW7.js} +9 -9
  206. package/dist/{routes-manifest-3BNZIVST.js → routes-manifest-YR4ZIMLM.js} +16 -8
  207. package/dist/routes-manifest-file-UALYSZLY.js +41 -0
  208. package/dist/scaffold.js +3 -3
  209. package/dist/{secrets-file-FUG7WCES.js → secrets-file-LMS7KX3E.js} +20 -19
  210. package/dist/{secrets-fill-command-QEOCUOAY.js → secrets-fill-command-QNBDGCGM.js} +61 -60
  211. package/dist/{seed-GJHJSEUE.js → seed-SZ6OS5DQ.js} +9 -9
  212. package/dist/{source-resolve-DMDZVPMM.js → source-resolve-MKLNYFWG.js} +24 -24
  213. package/dist/{static-host-WM24RG25.js → static-host-ONEHA4LI.js} +10 -10
  214. package/dist/{status-command-XUH5OGQX.js → status-command-XKIFKBGM.js} +57 -56
  215. package/dist/{store-CfgPaVPO.d.ts → store-Bg4Na6Sm.d.ts} +4 -4
  216. package/dist/{store-MR7IKXKK.js → store-X6ZH7EC3.js} +7 -7
  217. package/dist/sveltekit.d.ts +5 -5
  218. package/dist/sveltekit.js +1 -1
  219. package/dist/sync-baseline-DOV5AGIO.js +36 -0
  220. package/dist/{sync-contributions-DHP7XSTX.js → sync-contributions-HNVHDIQW.js} +21 -13
  221. package/dist/sync-record-PRXHLK4S.js +42 -0
  222. package/dist/{table-ZBDPKMNH.js → table-DC36QA4Y.js} +10 -10
  223. package/dist/{tables-command-X3JK7VSK.js → tables-command-UQLKTELN.js} +44 -43
  224. package/dist/{tenant-GKXMOYLK.js → tenant-EKNQGG5A.js} +11 -11
  225. package/dist/{tenant-command-P27EQHBU.js → tenant-command-2LWP2MPB.js} +105 -100
  226. package/dist/{test-command-A4G2FP7G.js → test-command-IU5MBBXY.js} +44 -43
  227. package/dist/{tests-C55M5EQS.js → tests-RG2Y5EQ4.js} +7 -7
  228. package/dist/{token-CMAB35GD.js → token-7AWSJLKO.js} +13 -13
  229. package/dist/toolchain-hooks-4ZMQLBPQ.js +46 -0
  230. package/dist/{toolchain-modules-3M7QDJBV.js → toolchain-modules-VU7SURVJ.js} +9 -6
  231. package/dist/toolchain-peers-CIDNEEQV.js +28 -0
  232. package/dist/tracked-backend-4BHSV7NC.js +81 -0
  233. package/dist/{update-check-LNNKIMML.js → update-check-A7FXIINW.js} +60 -59
  234. package/dist/{upgrade-command-7EUXML3P.js → upgrade-command-C5KBITFI.js} +64 -63
  235. package/dist/{whoami-command-KNWFWAX6.js → whoami-command-7WQII2H4.js} +16 -16
  236. package/dist/{workspace-TGPYOODG.js → workspace-Z46PUZNI.js} +6 -6
  237. package/dist/{workspace-binding-2TWZBHQY.js → workspace-binding-JE6YNDZJ.js} +15 -15
  238. package/dist/{workspace-command-T7Z2BDHD.js → workspace-command-FC4IMLAE.js} +119 -88
  239. package/dist/{workspace-env-VA7XN3UX.js → workspace-env-N4ZPFT6A.js} +17 -16
  240. package/dist/{workspace-export-AIGM6LC7.js → workspace-export-3A5BZTPS.js} +6 -6
  241. package/dist/{writable-FYJBTJOU.js → writable-D7KCZI5N.js} +4 -4
  242. package/dist/{xano-BSHYVFSE.js → xano-LCI7VWPS.js} +9 -9
  243. package/dist/{xanosdk-import-J6SRBZHW.js → xanosdk-import-P2A2KSXM.js} +10 -10
  244. package/dist/xanosdk-project-6AGMW2SL.js +42 -0
  245. package/guides/README.md +1 -0
  246. package/guides/authoring.md +3 -5
  247. package/guides/bundle.md +45 -0
  248. package/guides/cli.md +36 -34
  249. package/guides/codegen.md +5 -4
  250. package/guides/codes.md +16 -11
  251. package/guides/deploying.md +115 -58
  252. package/guides/environment.md +13 -13
  253. package/guides/marketplace.md +21 -0
  254. package/guides/module-contract.md +80 -4
  255. package/guides/project-structure.md +14 -0
  256. package/guides/typed-frontend.md +37 -0
  257. package/llms/client.md +14 -5
  258. package/llms/errors.md +1 -1
  259. package/llms/filters.md +4 -0
  260. package/llms/kinds-core.md +1 -1
  261. package/llms/statements-data.md +3 -2
  262. package/llms/tests.md +2 -2
  263. package/llms/toolchain.md +12 -0
  264. package/llms-full.txt +47 -21
  265. package/llms.txt +10 -10
  266. package/manifest.json +110 -107
  267. package/package.json +4 -4
  268. package/dist/agent-file-refresh-LB6KIMFY.js +0 -38
  269. package/dist/chunk-XXZZGXW2.js +0 -243
  270. package/dist/deploy-source-5CET3A5D.js +0 -81
  271. package/dist/env-example-refresh-ZO6XAV44.js +0 -127
  272. package/dist/init-command-27SFBW2F.js +0 -126
  273. package/dist/local-engine-choice-6BSPEG3E.js +0 -79
  274. package/dist/operation-outcome-2P4BVSEV.js +0 -51
  275. package/dist/promote-command-4F2NAE6P.js +0 -141
  276. package/dist/pull-command-WQFPLITW.js +0 -162
  277. package/dist/release-command-2OTNVMIL.js +0 -147
  278. package/dist/toolchain-hooks-BGZBDFAT.js +0 -96
  279. package/dist/tracked-backend-PZGUWD5J.js +0 -80
  280. package/dist/xanosdk-project-6KTCO47O.js +0 -41
@@ -1,26 +1,22 @@
1
1
  import {
2
2
  createOperation,
3
3
  runOperation
4
- } from "./chunk-PML67X22.js";
4
+ } from "./chunk-LAOMN6QQ.js";
5
5
  import {
6
6
  fetchWorkspaceBundle
7
- } from "./chunk-ESZ2FF57.js";
7
+ } from "./chunk-RIN4YY34.js";
8
8
  import {
9
9
  assertReleaseIdentitiesFree,
10
10
  pinnedCanonicalGuids,
11
11
  setLiveRollback
12
- } from "./chunk-45YPFB7B.js";
12
+ } from "./chunk-GLY552SI.js";
13
13
  import {
14
14
  liveBranchMismatch,
15
15
  liveMismatch
16
- } from "./chunk-OGBMUST4.js";
16
+ } from "./chunk-GHQ4BVI4.js";
17
17
  import {
18
18
  confirm
19
- } from "./chunk-4APOHK7Y.js";
20
- import {
21
- landingLockPath,
22
- recordForeignLanding
23
- } from "./chunk-C4FHQA7R.js";
19
+ } from "./chunk-JXVJGF3Y.js";
24
20
  import {
25
21
  CONSTRAINT_FIX,
26
22
  CONSTRAINT_PHRASE,
@@ -39,24 +35,35 @@ import {
39
35
  releaseTableEffects,
40
36
  renameHint,
41
37
  tableEffectsPayload
42
- } from "./chunk-5T2CTWTB.js";
38
+ } from "./chunk-CHINR7WD.js";
43
39
  import {
44
40
  tableRowCounter
45
- } from "./chunk-MNVDVR3M.js";
41
+ } from "./chunk-MBDFH7XB.js";
42
+ import {
43
+ landingLockPath,
44
+ recordForeignLanding
45
+ } from "./chunk-IF4PEGVD.js";
46
+ import {
47
+ recordSync
48
+ } from "./chunk-NDWVJ2QZ.js";
49
+ import {
50
+ objectDigests,
51
+ syncDigests
52
+ } from "./chunk-JI3BLXWQ.js";
46
53
  import {
47
54
  asWorkspaceArchive,
48
55
  resolveProjectEntry
49
- } from "./chunk-VRVKNY4A.js";
56
+ } from "./chunk-Z4ZGTCCD.js";
50
57
  import {
51
58
  exportWorkspaceBundle
52
- } from "./chunk-QV3GXQRE.js";
59
+ } from "./chunk-GOLFAEUV.js";
53
60
  import {
54
61
  decodeWorkspaceArchive
55
62
  } from "./chunk-3DRXWLJ5.js";
56
63
  import {
57
64
  SettledWriteFailure,
58
65
  classifyFailure
59
- } from "./chunk-O5V3YH5P.js";
66
+ } from "./chunk-JRVQ7M7W.js";
60
67
  import {
61
68
  BranchTakenError,
62
69
  assertBranchAbsent,
@@ -67,16 +74,16 @@ import {
67
74
  listBranchListing,
68
75
  liveBranchLabel,
69
76
  setLiveBranch
70
- } from "./chunk-E65QIWOO.js";
77
+ } from "./chunk-NPODGBVJ.js";
71
78
  import {
72
79
  envValuesOf
73
- } from "./chunk-HMLGM2MW.js";
80
+ } from "./chunk-IYXL5NYU.js";
74
81
  import {
75
82
  assertOneName
76
- } from "./chunk-DIG3NITC.js";
83
+ } from "./chunk-WBH4KJWM.js";
77
84
  import {
78
85
  resolveSource
79
- } from "./chunk-2AUV6NXK.js";
86
+ } from "./chunk-3II44CUJ.js";
80
87
  import {
81
88
  ReleaseHttpError,
82
89
  UNPROMOTABLE_RELEASE_PARTS,
@@ -85,27 +92,27 @@ import {
85
92
  promotableReleaseName,
86
93
  unpromotableReleasePart,
87
94
  untenantDeployableReleasePart
88
- } from "./chunk-A6QTTJUI.js";
95
+ } from "./chunk-GWTFI3GA.js";
89
96
  import {
90
97
  getAccessToken
91
- } from "./chunk-LUTMOHOW.js";
98
+ } from "./chunk-YGLMRH5U.js";
92
99
  import {
93
100
  pipedYes,
94
101
  retryCommand,
95
102
  withheldNote
96
- } from "./chunk-FMOEVAGT.js";
103
+ } from "./chunk-6X3MY2JP.js";
97
104
  import {
98
105
  contextFlags
99
- } from "./chunk-SEUCZZCP.js";
106
+ } from "./chunk-N5I37JFB.js";
100
107
  import {
101
108
  shellWord
102
109
  } from "./chunk-FWD7AL6N.js";
103
110
  import {
104
111
  readLockFile
105
- } from "./chunk-VD32O6KZ.js";
112
+ } from "./chunk-CJDPSCMX.js";
106
113
  import {
107
114
  withoutReadAftermath
108
- } from "./chunk-MN2PB6WB.js";
115
+ } from "./chunk-YR2I5HGE.js";
109
116
  import {
110
117
  CliError,
111
118
  LocalFileNotFoundError,
@@ -123,19 +130,19 @@ import {
123
130
  success,
124
131
  warn,
125
132
  withoutUrls
126
- } from "./chunk-SBR2WZXG.js";
133
+ } from "./chunk-D7BUMOKU.js";
127
134
  import {
128
135
  envNamesRead
129
- } from "./chunk-OPG4DYX2.js";
136
+ } from "./chunk-T4LJ5UR2.js";
130
137
  import {
131
138
  safeNames
132
139
  } from "./chunk-GSGDWJB5.js";
133
140
  import {
134
141
  setDiagnosticSink
135
- } from "./chunk-GPI3OWRE.js";
142
+ } from "./chunk-YHB34BN6.js";
136
143
  import {
137
144
  sdkKindName2 as sdkKindName
138
- } from "./chunk-OOGXZL7Z.js";
145
+ } from "./chunk-5KJBWIDZ.js";
139
146
  import {
140
147
  shellQuote
141
148
  } from "./chunk-5ZSO4T2G.js";
@@ -292,7 +299,7 @@ async function verifyLanding(auth, opts) {
292
299
  } catch (err) {
293
300
  return unverified(shortReason(err));
294
301
  }
295
- const { compareToLive, declaredLabels } = await import("./live-diff-2S7E3SBZ.js");
302
+ const { compareToLive, declaredLabels } = await import("./live-diff-5E2BQWQ7.js");
296
303
  let result;
297
304
  try {
298
305
  result = compareToLive(declared, landedBundle, void 0, { sample: "all" });
@@ -311,7 +318,8 @@ async function verifyLanding(auth, opts) {
311
318
  undeclared,
312
319
  suffixed: suffixedSiblings(declaredLabels(declared), undeclared),
313
320
  compared: result.compared,
314
- canonicals
321
+ canonicals,
322
+ landed: landedBundle
315
323
  };
316
324
  }
317
325
  function shortReason(err) {
@@ -407,7 +415,7 @@ async function seedRowRemedies(release, tables, flags, named) {
407
415
  const resettable = seededHere === void 0 ? [] : tables.filter((t) => seededHere.has(t.name) && t.guid !== void 0);
408
416
  const r = shellWord(release.name);
409
417
  const before = [
410
- `The release's rows land with a deploy of the release: \`xanosdk deploy release:${r}${flags}\` on this project's ephemeral, or \`xanosdk tenant deploy <tenant> ${r}${flags}\` on a tenant.`
418
+ `The release's rows land with a deploy of the release: \`xanosdk deploy release:${r} --ephemeral${flags}\` on this project's ephemeral, or \`xanosdk tenant deploy <tenant> ${r}${flags}\` on a tenant.`
411
419
  ];
412
420
  if (resettable.length === 0) return { before };
413
421
  const one = resettable.length === 1;
@@ -464,7 +472,7 @@ async function runPromoteCommand(args) {
464
472
  discloseWriteTarget(destination);
465
473
  const lockPath = landingLockPath(args, args.entryPath === void 0 ? {} : { entryFile: args.entryPath });
466
474
  if (lockPath === void 0 && args.noLock !== true) {
467
- const { nestedBackendEntries } = await import("./tracked-backend-PZGUWD5J.js");
475
+ const { nestedBackendEntries } = await import("./tracked-backend-4BHSV7NC.js");
468
476
  const nested = nestedBackendEntries(process.cwd());
469
477
  if (nested.length > 0) {
470
478
  warn(
@@ -488,7 +496,7 @@ async function runPromoteCommand(args) {
488
496
  // sending every caller on an instance with an unreadable export to resolve
489
497
  // a write that already answered.
490
498
  checks: ["verify"],
491
- extras: { declined: false, landingRecord: null, tableEffects: null, canonicalMoves: [] }
499
+ extras: { declined: false, landingRecord: null, syncBaseline: null, tableEffects: null, canonicalMoves: [] }
492
500
  });
493
501
  const flags = contextFlags(args);
494
502
  const yesFlags = `${pipedYes(args)}${flags}`;
@@ -775,6 +783,22 @@ Check what is serving with \`xanosdk workspace branch list${flags}\`, then promo
775
783
  );
776
784
  }
777
785
  }
786
+ if (verification.outcome === "passed" && verification.landed !== void 0) {
787
+ const released = await ctx.loadArchive().catch(() => void 0);
788
+ op.set(
789
+ "syncBaseline",
790
+ recordSync({
791
+ lockPath,
792
+ target: { instance: auth.instance, workspaceId: auth.workspaceId, branch },
793
+ digests: syncDigests({
794
+ held: [verification.landed],
795
+ ...released === void 0 ? {} : { heldLabels: new Set(Object.keys(objectDigests(released))) }
796
+ }),
797
+ by: "promote",
798
+ complete: true
799
+ })
800
+ );
801
+ }
778
802
  let live = false;
779
803
  let rollback;
780
804
  if (setLiveRequested) {
@@ -911,7 +935,7 @@ Nothing was switched. Serve it deliberately with \`xanosdk workspace branch set-
911
935
  }
912
936
  }
913
937
  async function unansweredBranchRead(err, args, what) {
914
- const { LookupFailedError, isServerError, isTransportFailure, unansweredCause } = await import("./source-resolve-DMDZVPMM.js");
938
+ const { LookupFailedError, isServerError, isTransportFailure, unansweredCause } = await import("./source-resolve-MKLNYFWG.js");
915
939
  const transport = isTransportFailure(err);
916
940
  if (!transport && !isServerError(err)) return err;
917
941
  const first = what !== void 0 ? `could not read ${what}` : ((err instanceof Error ? err.message : String(err)).trim().split("\n")[0] ?? "").replace(/[.:]$/, "");
@@ -937,4 +961,4 @@ export {
937
961
  reportNotRun,
938
962
  runPromoteCommand
939
963
  };
940
- //# sourceMappingURL=chunk-2B22WWKL.js.map
964
+ //# sourceMappingURL=chunk-JFBRXRJD.js.map
@@ -0,0 +1,107 @@
1
+ import {
2
+ SETTINGS_LABEL,
3
+ canonicalRow,
4
+ payloadOf,
5
+ rowLabeler,
6
+ sectionKind,
7
+ sectionOmission
8
+ } from "./chunk-IYXL5NYU.js";
9
+ import {
10
+ canonicalJson
11
+ } from "./chunk-7VR4IO5B.js";
12
+ import {
13
+ md5Hex
14
+ } from "./chunk-OHX6MIUZ.js";
15
+
16
+ // src/deploy/sync-baseline.ts
17
+ var DIGEST_SCHEME = 1;
18
+ var SKIPPED_SECTIONS = /* @__PURE__ */ new Set(["env", "metadata", "partial", "workspace"]);
19
+ function digestOf(canonical) {
20
+ return md5Hex(canonicalJson(canonical));
21
+ }
22
+ function objectDigests(bundle, which = "all") {
23
+ const payload = payloadOf(bundle);
24
+ const label = rowLabeler(payload);
25
+ const out = {};
26
+ for (const [key, section] of Object.entries(payload)) {
27
+ if (SKIPPED_SECTIONS.has(key)) continue;
28
+ if (which !== "all" && sectionOmission(key) === void 0 !== (which === "carried")) continue;
29
+ if (!Array.isArray(section)) {
30
+ if (section !== void 0 && section !== null) out[`${sectionKind(key)}:(settings)`] = digestOf(canonicalRow(key, { value: section }, true));
31
+ continue;
32
+ }
33
+ for (const row of section) {
34
+ if (row === null || typeof row !== "object") continue;
35
+ const record = row;
36
+ out[label(key, record)] = digestOf(canonicalRow(key, record, false));
37
+ }
38
+ }
39
+ return out;
40
+ }
41
+ function syncDigests(opts) {
42
+ const objects = {};
43
+ const others = {};
44
+ for (const bundle of opts.others ?? []) Object.assign(others, objectDigests(bundle));
45
+ for (const bundle of opts.held) {
46
+ for (const [label, digest] of Object.entries(objectDigests(bundle, "carried"))) {
47
+ if (opts.heldLabels === void 0 || opts.heldLabels.has(label)) objects[label] = digest;
48
+ else others[label] = digest;
49
+ }
50
+ Object.assign(others, objectDigests(bundle, "uncarried"));
51
+ }
52
+ for (const label of Object.keys(objects)) delete others[label];
53
+ return { scheme: DIGEST_SCHEME, objects, others };
54
+ }
55
+ function syncDirection(local, live, result, baseline) {
56
+ if (baseline === void 0 || baseline.scheme !== DIGEST_SCHEME) {
57
+ return { baseline: null, changedThere: [], changedHere: [], changedBoth: [], unclassified: [] };
58
+ }
59
+ const here = objectDigests(local);
60
+ const there = objectDigests(live);
61
+ const held = baseline.objects;
62
+ const others = baseline.others ?? {};
63
+ const digest = (map, label) => Object.hasOwn(map, label) ? map[label] : void 0;
64
+ const changedThere = [];
65
+ const changedHere = [];
66
+ const changedBoth = [];
67
+ const unclassified = [];
68
+ const file = (label, movedHere, movedThere) => {
69
+ if (movedHere && movedThere) changedBoth.push(label);
70
+ else if (movedHere) changedHere.push(label);
71
+ else if (movedThere) changedThere.push(label);
72
+ else unclassified.push(label);
73
+ };
74
+ for (const label of result.differing) {
75
+ const b = digest(held, label) ?? digest(others, label);
76
+ const h = digest(here, label);
77
+ const t = digest(there, label);
78
+ if (label === SETTINGS_LABEL || b === void 0 || h === void 0 || t === void 0) {
79
+ unclassified.push(label);
80
+ continue;
81
+ }
82
+ file(label, h !== b, t !== b);
83
+ }
84
+ for (const label of result.missing) {
85
+ const b = digest(held, label);
86
+ if (b !== void 0) file(label, digest(here, label) !== b, true);
87
+ else if (digest(others, label) !== void 0) file(label, true, true);
88
+ else changedHere.push(label);
89
+ }
90
+ for (const label of result.liveOnly) {
91
+ const b = digest(held, label);
92
+ const other = digest(others, label);
93
+ if (b !== void 0) file(label, true, digest(there, label) !== b);
94
+ else if (other !== void 0) {
95
+ if (digest(there, label) !== other) changedThere.push(label);
96
+ } else if (baseline.complete) changedThere.push(label);
97
+ }
98
+ return { baseline: { at: baseline.at, by: baseline.by }, changedThere, changedHere, changedBoth, unclassified };
99
+ }
100
+
101
+ export {
102
+ DIGEST_SCHEME,
103
+ objectDigests,
104
+ syncDigests,
105
+ syncDirection
106
+ };
107
+ //# sourceMappingURL=chunk-JI3BLXWQ.js.map
@@ -120,6 +120,7 @@ function authoredFieldType(type) {
120
120
 
121
121
  export {
122
122
  COLUMN_NULLABLE_TYPES,
123
+ INPUT_NULLABLE_TYPES,
123
124
  INPUT_CONTEXT,
124
125
  COLUMN_CONTEXT,
125
126
  defaultNullable,
@@ -130,4 +131,4 @@ export {
130
131
  CATALOG_BY_TYPE,
131
132
  authoredFieldType
132
133
  };
133
- //# sourceMappingURL=chunk-4DJTQ6W4.js.map
134
+ //# sourceMappingURL=chunk-JIKGT7DO.js.map
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  BranchHttpError,
3
3
  BranchTakenError
4
- } from "./chunk-E65QIWOO.js";
4
+ } from "./chunk-NPODGBVJ.js";
5
5
  import {
6
6
  SourceError
7
- } from "./chunk-2AUV6NXK.js";
7
+ } from "./chunk-3II44CUJ.js";
8
8
  import {
9
9
  ReleaseHttpError
10
- } from "./chunk-A6QTTJUI.js";
10
+ } from "./chunk-GWTFI3GA.js";
11
11
  import {
12
12
  ImportHttpError
13
- } from "./chunk-MEE5RZ6G.js";
13
+ } from "./chunk-BL3AZ3AP.js";
14
14
  import {
15
15
  TenantHttpError
16
- } from "./chunk-KCAL4QYP.js";
16
+ } from "./chunk-VW4CWVYX.js";
17
17
  import {
18
18
  TLS_CERTIFICATE_CODES,
19
19
  isTimeoutError,
20
20
  writeRefusedBy
21
- } from "./chunk-MN2PB6WB.js";
21
+ } from "./chunk-YR2I5HGE.js";
22
22
  import {
23
23
  UsageError
24
- } from "./chunk-SBR2WZXG.js";
24
+ } from "./chunk-D7BUMOKU.js";
25
25
 
26
26
  // src/emit/operation-outcome.ts
27
27
  var SettledWriteFailure = class extends Error {
@@ -82,4 +82,4 @@ export {
82
82
  SettledWriteFailure,
83
83
  classifyFailure
84
84
  };
85
- //# sourceMappingURL=chunk-O5V3YH5P.js.map
85
+ //# sourceMappingURL=chunk-JRVQ7M7W.js.map
@@ -6,7 +6,7 @@ import {
6
6
  UsageError,
7
7
  style,
8
8
  terminalText
9
- } from "./chunk-SBR2WZXG.js";
9
+ } from "./chunk-D7BUMOKU.js";
10
10
 
11
11
  // src/emit/prompt.ts
12
12
  import { createInterface } from "readline";
@@ -174,4 +174,4 @@ export {
174
174
  STDIN_IDLE_MS,
175
175
  readStdin
176
176
  };
177
- //# sourceMappingURL=chunk-4APOHK7Y.js.map
177
+ //# sourceMappingURL=chunk-JXVJGF3Y.js.map
@@ -0,0 +1,257 @@
1
+ import {
2
+ MANIFEST_HEADER,
3
+ ROUTES_MANIFEST_BASENAME,
4
+ RouteManifestError
5
+ } from "./chunk-LBJA7IEM.js";
6
+ import {
7
+ byCodeUnit
8
+ } from "./chunk-WAVNUTMT.js";
9
+ import {
10
+ blockPackages,
11
+ composeBlock,
12
+ findBlock
13
+ } from "./chunk-3EDSPMXN.js";
14
+ import {
15
+ UsageError,
16
+ detail,
17
+ info,
18
+ warn
19
+ } from "./chunk-D7BUMOKU.js";
20
+
21
+ // src/emit/routes-manifest-modules.ts
22
+ var MODULE_DIALECT = {
23
+ begin: (pkg) => `// xanosdk:begin ${pkg}`,
24
+ end: (pkg) => `// xanosdk:end ${pkg}`,
25
+ stamp: (version) => `// xanosdk:version ${version} - generated; edits inside this block are overwritten`,
26
+ parseStamp: (block) => /^\/\/ xanosdk:version (\S+)/m.exec(block)?.[1] ?? null
27
+ };
28
+ var IMPORTS_LINE = "// xanosdk:imports ";
29
+ var moduleSpec = (pkg) => ({ dialect: MODULE_DIALECT, pkg, file: ROUTES_MANIFEST_BASENAME });
30
+ var BARE_SPECIFIER = /^(?:@[a-z0-9~][\w.~-]*\/)?[a-z0-9~][\w.~-]*(?:\/[\w.~@-]+)*$/i;
31
+ var IDENTIFIER = /^[A-Za-z_$][\w$]*$/;
32
+ var STATIC_IMPORT = /^import(?:\s+type)?(?:\s*["'{*]|\s+[A-Za-z_$][\w$]*\s*(?:,|from\b))/;
33
+ var RE_EXPORT = /^[ \t]*export\s+(?:type\s+)?(?:\*(?:\s+as\s+[A-Za-z_$][\w$]*)?|\{[^}]*\})\s*from\s*["']/m;
34
+ var SDK_LOAD = /\b(?:import|require)\s*\(\s*["'`]@xano\/sdk(?:\/|["'`])/;
35
+ function checkModuleSection(pkg, section) {
36
+ const refuse = (why) => {
37
+ throw new RouteManifestError(`${pkg}: its routes.gen.ts section ${why}`);
38
+ };
39
+ if (section === null || typeof section !== "object") return refuse("is not an object with a `source` string.");
40
+ if (typeof section.then === "function") {
41
+ return refuse("is a Promise. `routesManifest` must be synchronous: every writer of the file has to produce the same bytes, and the decode paths write it synchronously.");
42
+ }
43
+ const { source, imports } = section;
44
+ if (typeof source !== "string") return refuse("has no `source` string.");
45
+ const lines = source.split(/\r?\n/);
46
+ const trimmed = lines.map((line) => line.trim());
47
+ const markers = [MODULE_DIALECT.begin("").trim(), MODULE_DIALECT.end("").trim()];
48
+ const forged = trimmed.find((line) => markers.some((marker) => line.startsWith(marker)));
49
+ if (forged !== void 0) {
50
+ return refuse(`has a line that spells a block marker (${forged}); the file's blocks are found by counting them.`);
51
+ }
52
+ const first = lines.find((line) => line.trim() !== "");
53
+ if (first?.startsWith(IMPORTS_LINE)) {
54
+ return refuse(`starts with a line that spells the block's imports line (${first.trim()}); declare imports in \`imports\`.`);
55
+ }
56
+ const written = trimmed.find((line) => STATIC_IMPORT.test(line) || SDK_LOAD.test(line)) ?? RE_EXPORT.exec(source)?.[0].trim().split(/\r?\n/)[0];
57
+ if (written !== void 0) {
58
+ return refuse(`writes an import in its source (${written}); declare imports in \`imports\`.`);
59
+ }
60
+ if (imports !== void 0 && !Array.isArray(imports)) return refuse("has `imports` that is not an array.");
61
+ const merged = /* @__PURE__ */ new Map();
62
+ for (const entry of imports ?? []) {
63
+ const { from, names } = entry ?? {};
64
+ if (typeof from !== "string") return refuse("declares an import with no `from` string.");
65
+ if (from === "@xano/sdk" || from.startsWith("@xano/sdk/")) {
66
+ return refuse(
67
+ `imports from ${JSON.stringify(from)}. The manifest exists so a frontend can skip the SDK runtime; a module section may not import it.`
68
+ );
69
+ }
70
+ if (!BARE_SPECIFIER.test(from) || from.split("/").some((part) => part === "." || part === "..")) {
71
+ return refuse(
72
+ `imports from ${JSON.stringify(from)}, which is not a bare package specifier. A relative or absolute path resolves against wherever the file is written, and a protocol is not a package the project depends on.`
73
+ );
74
+ }
75
+ if (!Array.isArray(names) || names.length === 0) return refuse(`imports nothing by name from ${JSON.stringify(from)}.`);
76
+ for (const name of names) {
77
+ if (typeof name !== "string" || !IDENTIFIER.test(name)) {
78
+ return refuse(`imports ${JSON.stringify(name)} from ${JSON.stringify(from)}, which is not a plain identifier.`);
79
+ }
80
+ merged.set(from, (merged.get(from) ?? /* @__PURE__ */ new Set()).add(name));
81
+ }
82
+ }
83
+ return [...merged].sort(([a], [b]) => byCodeUnit(a, b)).map(([from, names]) => ({ from, names: [...names].sort(byCodeUnit) }));
84
+ }
85
+ function composeRoutesManifest(core, modules) {
86
+ if (!core.startsWith(MANIFEST_HEADER)) {
87
+ throw new RouteManifestError("composeRoutesManifest: `core` is not a rendered route manifest.");
88
+ }
89
+ const imports = /* @__PURE__ */ new Map();
90
+ const blocks = [];
91
+ let previous;
92
+ for (const { pkg, version, section } of [...modules].sort((a, b) => byCodeUnit(a.pkg, b.pkg))) {
93
+ if (pkg === previous) {
94
+ throw new RouteManifestError(`${pkg}: two routes.gen.ts sections for one module; a module contributes one.`);
95
+ }
96
+ previous = pkg;
97
+ const own = checkModuleSection(pkg, section);
98
+ if (section.source.trim() === "") continue;
99
+ for (const { from, names } of own) {
100
+ for (const name of names) imports.set(from, (imports.get(from) ?? /* @__PURE__ */ new Set()).add(name));
101
+ }
102
+ const lines = own.length > 0 ? [`${IMPORTS_LINE}${JSON.stringify(own)}`, section.source] : [section.source];
103
+ try {
104
+ blocks.push(composeBlock(moduleSpec(pkg), lines, version));
105
+ } catch (error) {
106
+ throw new RouteManifestError(error instanceof Error ? error.message : String(error));
107
+ }
108
+ }
109
+ if (blocks.length === 0) return core;
110
+ const importLines = [...imports].sort(([a], [b]) => byCodeUnit(a, b)).map(([from, names]) => `import { ${[...names].sort(byCodeUnit).join(", ")} } from ${JSON.stringify(from)};
111
+ `);
112
+ return `${MANIFEST_HEADER}${importLines.join("")}${core.slice(MANIFEST_HEADER.length)}${blocks.map((b) => `
113
+ ${b}
114
+ `).join("")}`;
115
+ }
116
+ function parseModuleSections(text, only) {
117
+ return blockPackages(text, MODULE_DIALECT).filter((pkg) => only === void 0 || only.has(pkg)).sort(byCodeUnit).map((pkg) => {
118
+ const fail = (why) => {
119
+ throw new RouteManifestError(
120
+ `${pkg}: its block in ${ROUTES_MANIFEST_BASENAME} ${why} Repair or delete the block by hand, then regenerate the file.`
121
+ );
122
+ };
123
+ let span;
124
+ try {
125
+ span = findBlock(text, moduleSpec(pkg));
126
+ } catch (error) {
127
+ return fail(`cannot be read: ${error instanceof Error ? error.message : String(error)}.`);
128
+ }
129
+ const lines = span.text.split(/\r?\n/);
130
+ const version = MODULE_DIALECT.parseStamp(lines[1] ?? "");
131
+ if (version === null || lines[2] !== "") return fail("has no version stamp under its begin marker.");
132
+ let body = lines.slice(3, -1);
133
+ let imports;
134
+ if (body[0]?.startsWith(IMPORTS_LINE)) {
135
+ try {
136
+ imports = JSON.parse(body[0].slice(IMPORTS_LINE.length));
137
+ } catch {
138
+ return fail("has an imports line that is not valid JSON.");
139
+ }
140
+ body = body.slice(1);
141
+ }
142
+ const section = { ...imports === void 0 ? {} : { imports }, source: body.join("\n") };
143
+ checkModuleSection(pkg, section);
144
+ return { pkg, version, section };
145
+ });
146
+ }
147
+
148
+ // src/emit/toolchain-hooks.ts
149
+ function redactEnvValues(payload) {
150
+ const env = payload["env"];
151
+ if (!Array.isArray(env)) return payload;
152
+ return {
153
+ ...payload,
154
+ env: env.map(
155
+ (entry) => typeof entry === "object" && entry !== null && "value" in entry ? { ...entry, value: "" } : entry
156
+ )
157
+ };
158
+ }
159
+ function report(pkg, result) {
160
+ if (result.message !== void 0 && result.message !== "") {
161
+ if (result.failed === true) warn(`${pkg} \u2014 ${result.message}`, "toolchain.failed");
162
+ else info(result.message);
163
+ }
164
+ for (const line of result.warnings ?? []) detail(line);
165
+ }
166
+ function handleThrow(pkg, error, frozen) {
167
+ const why = error instanceof Error ? error.message : String(error);
168
+ if (frozen) {
169
+ throw new UsageError(
170
+ `${pkg} failed while checking this bundle, so whatever it verifies was not verified \u2014 and this run was asked to verify, not to write:
171
+ ${why}`
172
+ );
173
+ }
174
+ warn(`${pkg} failed and was skipped.`, "toolchain.failed", [why]);
175
+ }
176
+ async function fireOnBundle(plugins, ctx) {
177
+ let failed = false;
178
+ const bundle = { ...ctx.bundle, payload: redactEnvValues(ctx.bundle.payload) };
179
+ for (const { pkg, plugin, config } of plugins) {
180
+ if (plugin.onBundle === void 0) continue;
181
+ try {
182
+ const result = await plugin.onBundle({ ...ctx, bundle, config });
183
+ report(pkg, result);
184
+ if (result.failed === true) failed = true;
185
+ } catch (error) {
186
+ handleThrow(pkg, error, ctx.frozen);
187
+ }
188
+ }
189
+ return { failed };
190
+ }
191
+ async function fireOnPreflight(plugins, ctx) {
192
+ let failed = false;
193
+ const payloads = {
194
+ exportedPayload: redactEnvValues(ctx.exportedPayload),
195
+ remappedPayload: redactEnvValues(ctx.remappedPayload)
196
+ };
197
+ for (const { pkg, plugin, config } of plugins) {
198
+ if (plugin.onPreflight === void 0) continue;
199
+ try {
200
+ const result = await plugin.onPreflight({ ...ctx, ...payloads, config });
201
+ report(pkg, result);
202
+ if (result.failed === true) failed = true;
203
+ } catch (error) {
204
+ const why = error instanceof Error ? error.message : String(error);
205
+ warn(`${pkg} could not complete its check.`, "toolchain.failed", [why]);
206
+ failed = true;
207
+ }
208
+ }
209
+ return { failed };
210
+ }
211
+ async function runBundleHooks(plugins, ctx, consequence) {
212
+ if (plugins.length === 0) return;
213
+ const outcome = await fireOnBundle(plugins, ctx);
214
+ if (outcome.failed) {
215
+ throw new UsageError(
216
+ `A toolchain module reported that its check did not pass${consequence}. See the report above.`
217
+ );
218
+ }
219
+ }
220
+ function fireRoutesManifest(plugins, ctx) {
221
+ const results = [];
222
+ for (const { pkg, version, plugin, config } of [...plugins].sort((a, b) => byCodeUnit(a.pkg, b.pkg))) {
223
+ if (plugin.routesManifest === void 0) continue;
224
+ try {
225
+ const section = plugin.routesManifest({ ...ctx, config });
226
+ if (typeof section?.then === "function") {
227
+ Promise.resolve(section).catch(() => {
228
+ });
229
+ }
230
+ const imports = checkModuleSection(pkg, section);
231
+ results.push({
232
+ kind: "section",
233
+ pkg,
234
+ version,
235
+ section: { ...imports.length > 0 ? { imports } : {}, source: section.source }
236
+ });
237
+ } catch (error) {
238
+ results.push({ kind: "failed", pkg, version, why: error instanceof Error ? error.message : String(error) });
239
+ }
240
+ }
241
+ return results;
242
+ }
243
+ function anyDeclares(plugins, hook) {
244
+ return plugins.some((p) => p.plugin[hook] !== void 0);
245
+ }
246
+
247
+ export {
248
+ composeRoutesManifest,
249
+ parseModuleSections,
250
+ redactEnvValues,
251
+ fireOnBundle,
252
+ fireOnPreflight,
253
+ runBundleHooks,
254
+ fireRoutesManifest,
255
+ anyDeclares
256
+ };
257
+ //# sourceMappingURL=chunk-KPFS3RGM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  classifyFailure
3
- } from "./chunk-O5V3YH5P.js";
3
+ } from "./chunk-JRVQ7M7W.js";
4
4
  import {
5
5
  describeWrite
6
6
  } from "./chunk-4KHEMC32.js";
@@ -14,7 +14,7 @@ import {
14
14
  warn,
15
15
  writeJson,
16
16
  writeTargetPayload
17
- } from "./chunk-SBR2WZXG.js";
17
+ } from "./chunk-D7BUMOKU.js";
18
18
 
19
19
  // src/emit/operation-result.ts
20
20
  var SERVER_PROCESSING_BOUND_MS = 6e5;
@@ -253,4 +253,4 @@ export {
253
253
  OperationError,
254
254
  runOperation
255
255
  };
256
- //# sourceMappingURL=chunk-PML67X22.js.map
256
+ //# sourceMappingURL=chunk-LAOMN6QQ.js.map