@xano/sdk 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +33 -37
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-ZRGNOA6Q.js → agent-file-refresh-QTFMNYPY.js} +12 -12
- package/dist/{agent-skill-command-DV26SDA2.js → agent-skill-command-XZVBG34H.js} +74 -73
- package/dist/{answer-shape-AVZSKBR6.js → answer-shape-ZRQS7ZC4.js} +5 -5
- package/dist/{backend-dir-NTMXWE5R.js → backend-dir-DCT3T6HP.js} +11 -11
- package/dist/{backend-slot-DZAUHLTS.js → backend-slot-7BATLL3X.js} +4 -4
- package/dist/bin.js +64 -63
- package/dist/{branch-IJTBZZFO.js → branch-SJKKUCMZ.js} +9 -9
- package/dist/branch-commands-OEMOFAKC.js +80 -0
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +15 -69
- package/dist/{capture-GW5KNKMB.js → capture-RYBJE25P.js} +5 -5
- package/dist/{chunk-3H7R4ISR.js → chunk-2DUYJR5N.js} +2 -2
- package/dist/{chunk-MFWF2NZJ.js → chunk-2H5BQRHF.js} +2 -2
- package/dist/{chunk-GDJCWQIK.js → chunk-2IC3K22K.js} +12 -8
- package/dist/{chunk-O44MJTLR.js → chunk-35SI4GBM.js} +3 -3
- package/dist/{chunk-VUWR5YLE.js → chunk-3QQFP3AD.js} +13 -13
- package/dist/{chunk-ICK36EGF.js → chunk-4EVDCSEY.js} +2 -2
- package/dist/{chunk-GIQIMWTK.js → chunk-4LT5AVHF.js} +14 -14
- package/dist/{chunk-AXMUYBWQ.js → chunk-4XGZ325S.js} +3 -3
- package/dist/{chunk-JWASCOHO.js → chunk-52QAENY6.js} +14 -14
- package/dist/{chunk-2LF734YB.js → chunk-54CJ74BH.js} +4 -4
- package/dist/{chunk-ASQX477B.js → chunk-573RRKNT.js} +7 -7
- package/dist/{chunk-3GZMP7II.js → chunk-5AVFVC22.js} +38 -22
- package/dist/{chunk-IKXXTRMN.js → chunk-64UVVLDT.js} +4 -4
- package/dist/{chunk-RBTZEHXF.js → chunk-6DSA6W4O.js} +3 -3
- package/dist/{chunk-EQXHUWUO.js → chunk-6FCAFWD5.js} +2 -2
- package/dist/{chunk-4MX5LMPQ.js → chunk-6ODQ5GDZ.js} +2 -2
- package/dist/{chunk-ZF2CBXT5.js → chunk-7NKC4MBT.js} +3 -3
- package/dist/{chunk-Y5XAPLZS.js → chunk-7UQZ7C4W.js} +4 -4
- package/dist/{chunk-CJDPSCMX.js → chunk-7ZVQIKNL.js} +3 -3
- package/dist/{chunk-FOBVJ2UR.js → chunk-ACFBRMCS.js} +8 -8
- package/dist/{chunk-RVAEPPRH.js → chunk-AICWDCLJ.js} +2 -2
- package/dist/{chunk-WS4BA75E.js → chunk-AJBOGO5U.js} +4 -4
- package/dist/{chunk-AE5CRAKS.js → chunk-ANUBTY3C.js} +8 -8
- package/dist/{chunk-UVHSMANV.js → chunk-C6RBLPFY.js} +47 -47
- package/dist/{chunk-SHHXLI2K.js → chunk-CNNGNK46.js} +7 -7
- package/dist/{chunk-7ZQ73AHJ.js → chunk-CWC6HE66.js} +31 -31
- package/dist/{chunk-A2N2C2WD.js → chunk-DNUU4IEM.js} +7 -7
- package/dist/{chunk-Q7DGTQ5G.js → chunk-E34VGSCI.js} +2 -1
- package/dist/{chunk-YR3MNGWZ.js → chunk-E5M5P23K.js} +8 -8
- package/dist/{chunk-HJZUI2ZU.js → chunk-EAZTRU75.js} +2 -2
- package/dist/{chunk-KMKUH2IO.js → chunk-EPB6FAR5.js} +5 -5
- package/dist/{chunk-B6AFJVG4.js → chunk-ES6FBPLY.js} +5 -5
- package/dist/chunk-EUAU4QKI.js +67 -0
- package/dist/{chunk-IDOVZLPK.js → chunk-EXJ4Q5F6.js} +2 -2
- package/dist/{chunk-FKQX6KU7.js → chunk-F3JK5RIY.js} +2 -2
- package/dist/{chunk-W2QFR3ZJ.js → chunk-FIOC7RSU.js} +2 -2
- package/dist/{chunk-YEH5OIPF.js → chunk-FMXPV5JI.js} +39 -11
- package/dist/{chunk-GVHWIDEJ.js → chunk-FRJB3NTE.js} +10 -5
- package/dist/{chunk-TXFOQZUQ.js → chunk-FSHW3GQU.js} +14 -7
- package/dist/{chunk-VIRFG3WG.js → chunk-FTFAPKCW.js} +23 -7
- package/dist/{chunk-LL6ED5IB.js → chunk-FTS42N37.js} +2 -2
- package/dist/{chunk-HCNIB3EC.js → chunk-FYPTWYCU.js} +4 -4
- package/dist/{chunk-MIS6F4HM.js → chunk-G2XSDIYS.js} +4 -4
- package/dist/{chunk-ZY55DO5P.js → chunk-G6BEJ3NA.js} +2 -2
- package/dist/{chunk-RYWNNJK5.js → chunk-GA6HTO3O.js} +2 -2
- package/dist/{chunk-ZYECXDVV.js → chunk-GBPIFCWL.js} +5 -5
- package/dist/{chunk-JIKGT7DO.js → chunk-GE3JV5SI.js} +1 -1
- package/dist/{chunk-GCINMMFL.js → chunk-GJZMKMWO.js} +2 -2
- package/dist/{chunk-6X73VFCX.js → chunk-GT7PZCTK.js} +2 -2
- package/dist/{chunk-TT6LN55R.js → chunk-GUC73LRA.js} +8 -8
- package/dist/{chunk-ZC6H2ERE.js → chunk-GYM22X2X.js} +5 -5
- package/dist/{chunk-V7WCTXEH.js → chunk-H3R4PAOI.js} +5 -5
- package/dist/{chunk-QW7NGUYW.js → chunk-H5OM5G3O.js} +244 -173
- package/dist/{chunk-WXKSB2N3.js → chunk-HM5X73PY.js} +3 -3
- package/dist/{chunk-K6SWZ6H4.js → chunk-HMV2VGTU.js} +54 -54
- package/dist/{chunk-G4WRZU5T.js → chunk-HXFUCPZO.js} +7 -7
- package/dist/{chunk-ECQXASG3.js → chunk-IFHFJR5O.js} +2 -2
- package/dist/{chunk-7AKH4QDJ.js → chunk-J2KY2VNC.js} +96 -65
- package/dist/{chunk-74OPNM2Z.js → chunk-JHAZK4RY.js} +3 -3
- package/dist/{chunk-JAYHFXWH.js → chunk-LWGCUB2A.js} +7 -7
- package/dist/{chunk-CJGLAQRD.js → chunk-LXJ72GY2.js} +4 -4
- package/dist/{chunk-OZWAITII.js → chunk-M2IB6N4V.js} +6 -6
- package/dist/{chunk-GKQTXUOW.js → chunk-MOVRSULZ.js} +2 -2
- package/dist/{chunk-QAEBBTYR.js → chunk-MSYMEP7Y.js} +7 -7
- package/dist/{chunk-Y453TW6J.js → chunk-NCERS5QH.js} +2 -2
- package/dist/{chunk-T3HNISBN.js → chunk-NDRIMFSH.js} +3 -3
- package/dist/{chunk-HXFLHA5K.js → chunk-NH5Z2NOD.js} +2 -2
- package/dist/{chunk-FXZEZAV2.js → chunk-NLWYNVJV.js} +3 -3
- package/dist/{chunk-66ZU2CD5.js → chunk-O2BLNQEC.js} +236 -17
- package/dist/{chunk-5SKWGCAJ.js → chunk-O7Z3LF44.js} +5 -5
- package/dist/{chunk-DBDTQR23.js → chunk-OTQF4B37.js} +4 -4
- package/dist/{chunk-SL55XKVL.js → chunk-PCY4IPXK.js} +25 -25
- package/dist/{chunk-ZDVVIJPU.js → chunk-PODT53SQ.js} +4 -4
- package/dist/{chunk-GBSHHNSD.js → chunk-PRSNMSVG.js} +3 -3
- package/dist/{chunk-UNFQN3TT.js → chunk-Q3CBDXKL.js} +3 -3
- package/dist/{chunk-P7GKTV7N.js → chunk-Q4LJCCH5.js} +75 -32
- package/dist/{chunk-DGYXCIBV.js → chunk-Q6AKSLD2.js} +2 -2
- package/dist/{chunk-7FIMUFBP.js → chunk-QDPY7RN3.js} +3 -3
- package/dist/{chunk-MGG4CHO4.js → chunk-QIT2GGNB.js} +3 -3
- package/dist/{chunk-VXHXSGPU.js → chunk-QTOW6YXL.js} +8 -8
- package/dist/{chunk-5SJQAJLF.js → chunk-QYZSNN35.js} +3 -3
- package/dist/{chunk-NNI5R6V6.js → chunk-R7Y6S7FF.js} +72 -72
- package/dist/{chunk-BEKEOXNG.js → chunk-RGPHFHJU.js} +2 -2
- package/dist/{chunk-YCKKL5PD.js → chunk-RH3NQTGQ.js} +53 -47
- package/dist/{chunk-5FJ4M4HB.js → chunk-RHH6SCB4.js} +17 -32
- package/dist/{chunk-M7O3T7IM.js → chunk-RIT3WBBX.js} +4 -4
- package/dist/{chunk-45K2QZBR.js → chunk-RKNCISPM.js} +3 -3
- package/dist/{chunk-NPYYDTXS.js → chunk-RKTVXFBV.js} +5 -5
- package/dist/{chunk-AXNX4NWN.js → chunk-RLQX6LHW.js} +37 -37
- package/dist/{chunk-FIERONKM.js → chunk-ROWYW3JF.js} +2 -2
- package/dist/{chunk-LSJ3SQEU.js → chunk-RVWWNNZQ.js} +4 -4
- package/dist/{chunk-4MIV244X.js → chunk-SGEOXJIH.js} +9 -2
- package/dist/{chunk-QRMKQYCB.js → chunk-SINL5WMI.js} +2 -2
- package/dist/{chunk-Z6N5N4MN.js → chunk-SIW2HT2H.js} +21 -5
- package/dist/{chunk-IEDQT4Z3.js → chunk-SOAZIMWL.js} +12 -12
- package/dist/{chunk-R3GPRNBT.js → chunk-SVQMDVND.js} +87 -16
- package/dist/{chunk-45ZUMF4E.js → chunk-TPUAXIPR.js} +2 -2
- package/dist/{chunk-76SBT7KS.js → chunk-U56HK2RG.js} +7 -5
- package/dist/{chunk-RXNMZM6H.js → chunk-UDW2KAVF.js} +6 -6
- package/dist/{chunk-NDV6CBR7.js → chunk-UH5VQGNR.js} +2 -2
- package/dist/{chunk-75QC66XI.js → chunk-V2MIBJZU.js} +2 -2
- package/dist/{chunk-N72XNQNJ.js → chunk-V4466NNS.js} +14 -14
- package/dist/{chunk-XPSDDTUZ.js → chunk-VCFRALU7.js} +3 -3
- package/dist/{chunk-5KJBWIDZ.js → chunk-VQDVEHDB.js} +2 -2
- package/dist/{chunk-6EFXPTHT.js → chunk-WAP5362D.js} +5 -5
- package/dist/{chunk-DH6O5NQU.js → chunk-WDN4QIJ4.js} +29 -20
- package/dist/{chunk-XLP4CNSF.js → chunk-WGGATSIP.js} +6 -6
- package/dist/{chunk-XY4OBD26.js → chunk-WGKKDGSA.js} +4 -4
- package/dist/{chunk-ZPJXWMHK.js → chunk-WLZSKD7E.js} +4 -4
- package/dist/{chunk-7REDHC4N.js → chunk-X5NF3ZXW.js} +69 -14
- package/dist/{chunk-5W7S2SCA.js → chunk-XAE4NIZ2.js} +4 -4
- package/dist/{chunk-SPLRKCFV.js → chunk-XDGLYIB2.js} +2 -2
- package/dist/{chunk-WS2X5BB2.js → chunk-YYBBJPCL.js} +5 -5
- package/dist/{chunk-ZOHEHIFS.js → chunk-YYDM4DNP.js} +2 -2
- package/dist/{chunk-SH4RY6QX.js → chunk-Z73I7Q2H.js} +1536 -413
- package/dist/{chunk-GRXX2TOJ.js → chunk-ZHFSIQ6E.js} +2 -2
- package/dist/{chunk-SXMZNSQ6.js → chunk-ZQUBCGGR.js} +8 -8
- package/dist/{chunk-ZRXDPCMN.js → chunk-ZYZ7GRX3.js} +2 -2
- package/dist/cli.d.ts +3 -3
- package/dist/cli.js +62 -61
- package/dist/codegen-command-HCHTNHDF.js +183 -0
- package/dist/codegen.d.ts +3 -3
- package/dist/codegen.js +5 -5
- package/dist/{commands-5ILSWDSV.js → commands-Z2QZOORB.js} +3 -3
- package/dist/{completion-UNKBVVDT.js → completion-LFXXNQGR.js} +3 -3
- package/dist/{config-NTOASFCA.js → config-7GGINOFY.js} +4 -4
- package/dist/{deploy-command-BYAZZF37.js → deploy-command-LYZ76OBA.js} +69 -68
- package/dist/{deploy-source-QCPZWNJO.js → deploy-source-AJESF6J2.js} +32 -32
- package/dist/{dev-env-sync-6MHK3UHC.js → dev-env-sync-PZEIRCFC.js} +63 -62
- package/dist/{diagnostics-FNVNRYMB.js → diagnostics-T3RN3372.js} +2 -2
- package/dist/{display-name-hint-MYXCCAOP.js → display-name-hint-5GLJGPQ6.js} +11 -11
- package/dist/{emit-YLt3GfsZ.d.ts → emit-DlOKIJER.d.ts} +185 -96
- package/dist/env-example-refresh-HLE2HRV4.js +136 -0
- package/dist/{env-pull-command-KUIEKBTM.js → env-pull-command-OTTZHTLK.js} +52 -52
- package/dist/{env-target-Y77RLRS5.js → env-target-VXOMKCMO.js} +14 -14
- package/dist/{env-var-command-BZWJD75C.js → env-var-command-TDVSO3JY.js} +41 -41
- package/dist/{ephemeral-VLPRDNEJ.js → ephemeral-2DXWP3VK.js} +9 -9
- package/dist/{ephemeral-command-SYKDPALW.js → ephemeral-command-AX5TRR23.js} +52 -52
- package/dist/{ephemeral-state-RUOU2GFS.js → ephemeral-state-56XEDUJW.js} +12 -12
- package/dist/{generate-command-CSQDQZSW.js → generate-command-LMSKMR4J.js} +89 -88
- package/dist/{gitignore-OQGYM7DO.js → gitignore-GKM5G2DJ.js} +15 -15
- package/dist/{guards-JUYBDLZY.js → guards-LQ7PSXOL.js} +51 -15
- package/dist/{impersonate-command-HSFCZBV6.js → impersonate-command-QTEOBL5N.js} +37 -37
- package/dist/{import-T4ZTOTBT.js → import-VJQGIS33.js} +5 -5
- package/dist/index.d.ts +597 -118
- package/dist/index.js +29 -28
- package/dist/init-command-OMZVE54Z.js +143 -0
- package/dist/{init-modules-BL2SR5RK.js → init-modules-OTISW6LL.js} +8 -8
- package/dist/{init-web-DYE2FEXL.js → init-web-25QJ4JWB.js} +3 -3
- package/dist/internal.d.ts +55 -8
- package/dist/internal.js +696 -506
- package/dist/{io-PGTCBSIQ.js → io-47TFRYDB.js} +6 -6
- package/dist/{keep-data-merge-SHF75FC7.js → keep-data-merge-ECLY5DYP.js} +38 -38
- package/dist/{lambda-config-reconcile-VOBVZPWS.js → lambda-config-reconcile-CC5QIP6E.js} +3 -3
- package/dist/{landed-F7PCHGCK.js → landed-VIUFHLCJ.js} +5 -5
- package/dist/{landing-record-7EOLEKH3.js → landing-record-RVE5WLFS.js} +22 -22
- package/dist/{live-diff-M2OLXKM6.js → live-diff-KJ2TWWWT.js} +14 -14
- package/dist/{local-engine-choice-TOC3UYZZ.js → local-engine-choice-CMG5V7RL.js} +35 -35
- package/dist/{local-engine-command-6KSRDZBR.js → local-engine-command-UMY37AZL.js} +40 -40
- package/dist/{local-engine-deploy-4N4NFZ4T.js → local-engine-deploy-XAEDT55W.js} +12 -12
- package/dist/{local-engine-lookup-AQTUGSBT.js → local-engine-lookup-WBYTY2JE.js} +2 -2
- package/dist/{local-engine-mcp-bridge-AMYRH4SY.js → local-engine-mcp-bridge-3H5OXBWQ.js} +5 -5
- package/dist/{local-engine-mcp-command-XTP3EATV.js → local-engine-mcp-command-AV2T3U4B.js} +42 -42
- package/dist/{local-engine-process-OD5OSWDG.js → local-engine-process-35B2KQED.js} +7 -7
- package/dist/{local-engine-update-check-G3YCBXRE.js → local-engine-update-check-VXJZSIJU.js} +5 -5
- package/dist/{lock-HDCHD2ON.js → lock-JBKTDEDO.js} +4 -4
- package/dist/{lock-commands-437P6BHY.js → lock-commands-PSKHBOKS.js} +67 -66
- package/dist/{login-command-BNRDAVFV.js → login-command-M7RKU3DR.js} +27 -27
- package/dist/{logout-command-FCGCHB7Y.js → logout-command-DAC3XKLT.js} +17 -17
- package/dist/{loop-WOAEXMTC.js → loop-HILLODVH.js} +15 -15
- package/dist/{marketplace-command-SUBJZPJV.js → marketplace-command-2M33OTSN.js} +30 -30
- package/dist/{marketplace-resolve-JR4BBJ6K.js → marketplace-resolve-63QWMQZU.js} +6 -6
- package/dist/{meta-client-AYJS3RQ3.js → meta-client-FC4DWPAC.js} +15 -15
- package/dist/{module-manifest-63I5GRK4.js → module-manifest-NWJWAQLQ.js} +4 -4
- package/dist/node.d.ts +8 -8
- package/dist/node.js +71 -70
- package/dist/{operation-outcome-ORQPVJKB.js → operation-outcome-3V4G7QD3.js} +24 -24
- package/dist/{output-target-KNHHNDM3.js → output-target-LTU4L3IA.js} +16 -16
- package/dist/{plan-disclosure-4DUFRGCP.js → plan-disclosure-6MG4YYJV.js} +28 -28
- package/dist/{plugin-contributions-YYEP7IWH.js → plugin-contributions-DD6R6RL6.js} +5 -5
- package/dist/{plugin-prompt-GKCQKNYI.js → plugin-prompt-UX2TT5NS.js} +5 -5
- package/dist/{plugin-questions-P7MA3TYI.js → plugin-questions-WE2F4ZC4.js} +4 -4
- package/dist/{preflight-command-32GFVKSN.js → preflight-command-724B7Y73.js} +75 -74
- package/dist/{profile-command-U2XTKOMF.js → profile-command-REIJ4F3Y.js} +28 -28
- package/dist/{profile-pointer-JJ7K5O2R.js → profile-pointer-RCPHVTJV.js} +4 -4
- package/dist/{project-dependency-X3KCWBK5.js → project-dependency-TPVV3YIX.js} +7 -7
- package/dist/{project-sdk-YHJZRCNB.js → project-sdk-DKZBK5H5.js} +4 -4
- package/dist/promote-command-5FK2NFHG.js +149 -0
- package/dist/{prompt-QNMJIWNI.js → prompt-OYQHQWKI.js} +4 -4
- package/dist/{publish-command-5ZVZ6IYT.js → publish-command-VEDUWLVB.js} +72 -71
- package/dist/pull-command-UXNEJSDI.js +171 -0
- package/dist/{pull-superseded-6HADGGC5.js → pull-superseded-3SSM3JFT.js} +4 -4
- package/dist/{raw-where-gWGr-E4t.d.ts → raw-where-CinW0keO.d.ts} +32 -4
- package/dist/release-command-BCKJ4BUN.js +153 -0
- package/dist/{release-ns-command-LDN5DOKQ.js → release-ns-command-VFI4PPSX.js} +96 -95
- package/dist/{retry-command-LFZYEVRU.js → retry-command-WP4ZI6CJ.js} +8 -8
- package/dist/{routes-manifest-BMAOL6WN.js → routes-manifest-N73THJB3.js} +16 -16
- package/dist/routes-manifest-file-R3JLJ5CA.js +41 -0
- package/dist/scaffold.js +2 -2
- package/dist/{secrets-file-7QM3ORGX.js → secrets-file-GF46TDY7.js} +15 -15
- package/dist/{secrets-fill-command-OZ537VOD.js → secrets-fill-command-HKNROT6W.js} +66 -65
- package/dist/{seed-ATGBOEJP.js → seed-W5FNE6IB.js} +13 -13
- package/dist/{source-resolve-QYSWA3QR.js → source-resolve-QYSVNJMY.js} +22 -22
- package/dist/{static-host-MO4VDHL7.js → static-host-3HPZKVKK.js} +5 -5
- package/dist/{status-command-IEB4K7ME.js → status-command-RLXDDCZA.js} +38 -38
- package/dist/{store-AJX4MC7Y.js → store-B63BQV6R.js} +6 -6
- package/dist/{store-DspGMsFY.d.ts → store-Dg9FLJkx.d.ts} +185 -11
- package/dist/sync-baseline-GRS33AB5.js +38 -0
- package/dist/{sync-contributions-DLV5JZUK.js → sync-contributions-BV7DFWBZ.js} +9 -9
- package/dist/{sync-record-NE62ERA3.js → sync-record-AWFCSS4D.js} +15 -15
- package/dist/{table-TFD4ZQXA.js → table-WJ7YDJ6Q.js} +12 -12
- package/dist/{tables-command-IMCVPUFY.js → tables-command-EXHXLLN6.js} +41 -41
- package/dist/{tenant-IIYECNWO.js → tenant-IXIW3FOI.js} +10 -10
- package/dist/{tenant-command-77KG76MU.js → tenant-command-D5H7MR3C.js} +104 -103
- package/dist/{test-command-NSPU4RUO.js → test-command-ORMWZXC3.js} +56 -45
- package/dist/{tests-JWQRHFCT.js → tests-N4MMBABH.js} +6 -6
- package/dist/{token-BDHD7GU3.js → token-EFSD6WSQ.js} +13 -13
- package/dist/{toolchain-hooks-QHJRDCRW.js → toolchain-hooks-IJWV3ZQS.js} +18 -18
- package/dist/{toolchain-modules-LY7BMYG6.js → toolchain-modules-BC37MYYD.js} +5 -5
- package/dist/{toolchain-peers-FQJBTKEB.js → toolchain-peers-EMOYN4U7.js} +8 -8
- package/dist/{tracked-backend-BIR7YJCE.js → tracked-backend-IPEGNGNI.js} +34 -34
- package/dist/update-check-4YTFF7NB.js +141 -0
- package/dist/{upgrade-command-YCADQCIA.js → upgrade-command-J4CPYEGO.js} +68 -67
- package/dist/{whoami-command-IZCTUPM4.js → whoami-command-XGVTKQSL.js} +16 -16
- package/dist/{workspace-TK52V7WO.js → workspace-JGUNVFRE.js} +5 -5
- package/dist/{workspace-binding-3UT6PP4B.js → workspace-binding-MQ2QIWOJ.js} +15 -15
- package/dist/{workspace-command-46OCB6XT.js → workspace-command-LSEG62RA.js} +100 -99
- package/dist/{workspace-env-PVPOWFNZ.js → workspace-env-7U7OLRUO.js} +18 -12
- package/dist/{workspace-export-PUEXKZNS.js → workspace-export-3KMWNZDD.js} +5 -5
- package/dist/{writable-LMMG4AFZ.js → writable-X7BCN7XE.js} +4 -4
- package/dist/xano-RLSNDM7O.js +44 -0
- package/dist/{xanosdk-import-XXJT365U.js → xanosdk-import-Y5SBF4LP.js} +10 -10
- package/dist/{xanosdk-project-CJKRLQ6U.js → xanosdk-project-5XARMFZ7.js} +13 -13
- package/dist/{xdo-D4OwfF2J.d.ts → xdo-DNGZGO1j.d.ts} +50 -12
- package/guides/authoring.md +1 -0
- package/guides/codes.md +33 -3
- package/guides/coverage.md +2 -2
- package/guides/object-kinds.md +1 -1
- package/guides/typed-frontend.md +9 -0
- package/llms/client.md +54 -36
- package/llms/errors.md +26 -6
- package/llms/fields.md +56 -32
- package/llms/filters.md +55 -46
- package/llms/kinds-agent-mcp.md +10 -9
- package/llms/kinds-core.md +19 -15
- package/llms/kinds-knowledge.md +4 -4
- package/llms/kinds-realtime.md +25 -23
- package/llms/lambda.md +42 -30
- package/llms/legacy.md +6 -7
- package/llms/lock.md +21 -17
- package/llms/object-kinds.md +9 -11
- package/llms/statements-calls.md +41 -20
- package/llms/statements-catalog.md +32 -25
- package/llms/statements-data.md +35 -25
- package/llms/statements-runtime.md +28 -18
- package/llms/tests.md +20 -7
- package/llms/toolchain.md +12 -9
- package/llms/triggers.md +15 -19
- package/llms/values.md +16 -9
- package/llms-full.txt +647 -506
- package/llms.txt +120 -137
- package/manifest.json +147 -95
- package/package.json +1 -1
- package/skills/xano-backend/SKILL.md +10 -12
- package/types/lambda-globals.d.ts +6 -1
- package/dist/branch-commands-4PJEBNRK.js +0 -80
- package/dist/codegen-command-RDD4GL35.js +0 -182
- package/dist/env-example-refresh-MQWHY7ZS.js +0 -135
- package/dist/init-command-6Z7QNVDY.js +0 -142
- package/dist/promote-command-OO56IZBT.js +0 -148
- package/dist/pull-command-LT5PCEIW.js +0 -170
- package/dist/release-command-RBUOXIH7.js +0 -152
- package/dist/routes-manifest-file-MPOVKD6N.js +0 -41
- package/dist/sync-baseline-IB7MABZO.js +0 -38
- package/dist/update-check-JDARCXAX.js +0 -140
- package/dist/xano-EOUVXNQX.js +0 -43
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
resetXanoSdkImportDetection,
|
|
14
14
|
withDefaultBranchPointer,
|
|
15
15
|
xanosdkImport
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ES6FBPLY.js";
|
|
17
17
|
import "./chunk-3DRXWLJ5.js";
|
|
18
18
|
import "./chunk-X4DVXBFY.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-GA6HTO3O.js";
|
|
20
|
+
import "./chunk-NH5Z2NOD.js";
|
|
21
21
|
import "./chunk-4KHEMC32.js";
|
|
22
22
|
import "./chunk-MF4W6FHU.js";
|
|
23
23
|
import "./chunk-X2NL4KUO.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-ZHFSIQ6E.js";
|
|
25
|
+
import "./chunk-QDPY7RN3.js";
|
|
26
26
|
import "./chunk-H2V3N23D.js";
|
|
27
27
|
import "./chunk-3JDU4VRL.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-FMXPV5JI.js";
|
|
29
29
|
import "./chunk-UTI5G6OJ.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-VQDVEHDB.js";
|
|
31
31
|
import "./chunk-5ZSO4T2G.js";
|
|
32
32
|
import "./chunk-VQPDATQT.js";
|
|
33
33
|
import "./chunk-TFFGOFVZ.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-FTS42N37.js";
|
|
35
35
|
import "./chunk-4BW2SG2N.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-SGEOXJIH.js";
|
|
37
37
|
import "./chunk-OHX6MIUZ.js";
|
|
38
38
|
import "./chunk-36JUQZVQ.js";
|
|
39
39
|
import "./chunk-PZ5AY32C.js";
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
withDefaultBranchPointer,
|
|
54
54
|
xanosdkImport
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=xanosdk-import-
|
|
56
|
+
//# sourceMappingURL=xanosdk-import-Y5SBF4LP.js.map
|
|
@@ -3,31 +3,31 @@ import {
|
|
|
3
3
|
enterProjectRoot,
|
|
4
4
|
isProjectDir,
|
|
5
5
|
projectDirFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FYPTWYCU.js";
|
|
7
7
|
import "./chunk-EUUUMY7J.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-NLWYNVJV.js";
|
|
9
|
+
import "./chunk-RH3NQTGQ.js";
|
|
10
|
+
import "./chunk-M2IB6N4V.js";
|
|
11
|
+
import "./chunk-XAE4NIZ2.js";
|
|
12
12
|
import "./chunk-ZFDZKNGG.js";
|
|
13
13
|
import "./chunk-FWD7AL6N.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-YYBBJPCL.js";
|
|
15
15
|
import "./chunk-DXUICABI.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-NH5Z2NOD.js";
|
|
17
17
|
import "./chunk-4KHEMC32.js";
|
|
18
18
|
import "./chunk-DNBP4GJN.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-XDGLYIB2.js";
|
|
20
20
|
import "./chunk-WAVNUTMT.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-IFHFJR5O.js";
|
|
22
22
|
import "./chunk-LLNZGEFK.js";
|
|
23
23
|
import "./chunk-HU7F56VF.js";
|
|
24
24
|
import "./chunk-MF4W6FHU.js";
|
|
25
25
|
import "./chunk-X2NL4KUO.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-RHH6SCB4.js";
|
|
27
27
|
import "./chunk-LJM5CIY4.js";
|
|
28
28
|
import "./chunk-VYJYDMY6.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-ZHFSIQ6E.js";
|
|
30
|
+
import "./chunk-FMXPV5JI.js";
|
|
31
31
|
import "./chunk-UTI5G6OJ.js";
|
|
32
32
|
import "./chunk-5ZSO4T2G.js";
|
|
33
33
|
import "./chunk-TFFGOFVZ.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
isProjectDir,
|
|
41
41
|
projectDirFrom
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=xanosdk-project-
|
|
43
|
+
//# sourceMappingURL=xanosdk-project-5XARMFZ7.js.map
|
|
@@ -226,6 +226,14 @@ type Value = TaggedValue;
|
|
|
226
226
|
type RefValue<Name extends string = string> = Value & {
|
|
227
227
|
readonly __ref: Name;
|
|
228
228
|
};
|
|
229
|
+
/**
|
|
230
|
+
* A `ref(path, { safe: true })` read: the phantom `__safe` tells `InferResponse`
|
|
231
|
+
* that a null base yields null here. A plain dotted ref into a null base RAISES
|
|
232
|
+
* (HTTP 500), so its type drops the base's `| null`.
|
|
233
|
+
*/
|
|
234
|
+
type SafeRefValue<Name extends string = string> = RefValue<Name> & {
|
|
235
|
+
readonly __safe: true;
|
|
236
|
+
};
|
|
229
237
|
/**
|
|
230
238
|
* An `auth(path)` read, carrying its path at the type level only (phantom
|
|
231
239
|
* `__auth`) so `InferResponse` types it from a query's auth table row.
|
|
@@ -603,8 +611,16 @@ interface RefOptions {
|
|
|
603
611
|
* With `safe: true` the path compiles through the `get` filter
|
|
604
612
|
* (`$owner|get:"user_id"`), which walks the remaining path and resolves to
|
|
605
613
|
* null when the base is null — so an ownership/existence guard evaluates to
|
|
606
|
-
* `false` cleanly rather than throwing.
|
|
607
|
-
*
|
|
614
|
+
* `false` cleanly rather than throwing.
|
|
615
|
+
*
|
|
616
|
+
* ⚠ `safe` has NO effect on a plain, dot-free name — it compiles to the same
|
|
617
|
+
* bare `{tag:"var"}`. A BOUND bare var reads its value (or null if that value
|
|
618
|
+
* is null), but a name that NOTHING binds raises `Missing var entry: <name>`
|
|
619
|
+
* (ERROR_FATAL, HTTP 500) on both backends, and `safe` does NOT suppress it.
|
|
620
|
+
* This includes a var bound ONLY inside an `s.conditional`/`switch` arm, a
|
|
621
|
+
* loop body that ran zero times, or a `try` block: when that path is skipped
|
|
622
|
+
* the var is never bound, so a later read 500s. Declare it before the block —
|
|
623
|
+
* `s.set_var("x", c.null())` — so it always exists.
|
|
608
624
|
*/
|
|
609
625
|
safe?: boolean;
|
|
610
626
|
}
|
|
@@ -625,6 +641,9 @@ interface RefOptions {
|
|
|
625
641
|
* - {@link auth} — the authenticated caller (`auth("id")`).
|
|
626
642
|
* - `c.*` — a literal constant (`c.int(1)`, `c.text("x")`).
|
|
627
643
|
*/
|
|
644
|
+
declare function ref<const Name extends string>(name: Name, opts: RefOptions & {
|
|
645
|
+
safe: true;
|
|
646
|
+
}): SafeRefValue<Name>;
|
|
628
647
|
declare function ref<const Name extends string>(name: Name, opts?: RefOptions): RefValue<Name>;
|
|
629
648
|
/**
|
|
630
649
|
* The second parameter every non-`ref` reference creator declares, so that
|
|
@@ -652,14 +671,20 @@ declare function inp<const Name extends string>(name: Name, opts?: SafeIsRefOnly
|
|
|
652
671
|
*/
|
|
653
672
|
declare function col(name: string, opts?: SafeIsRefOnly): ColValue;
|
|
654
673
|
/**
|
|
655
|
-
* Reference the authenticated identity (`{tag:"auth", value}`).
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
*
|
|
674
|
+
* Reference the authenticated identity (`{tag:"auth", value}`). The path is
|
|
675
|
+
* REQUIRED: `auth("id")` is the authenticated row id (Xano's `$auth.id`),
|
|
676
|
+
* `auth("extras.<key>")` a claim. There is no bare form, because the engine
|
|
677
|
+
* cannot read an empty auth path (XanoScript has no bare `$auth` either), so
|
|
678
|
+
* `auth("")` throws. Use it to bind the caller into a row write on an
|
|
679
|
+
* authenticated endpoint (one whose `auth` names an auth table), e.g.
|
|
660
680
|
* `s.db.add({ table: post, row: { author_id: auth("id") } })`.
|
|
681
|
+
*
|
|
682
|
+
* Token EXTRAS are read as `auth("extras.<key>")` (`auth("extras")` is the
|
|
683
|
+
* whole map). A key the token does not carry is a 500 (`Unable to locate auth`),
|
|
684
|
+
* not null, and claims are a snapshot frozen at mint — authorize off the row
|
|
685
|
+
* when the value can change.
|
|
661
686
|
*/
|
|
662
|
-
declare function auth<const P extends string
|
|
687
|
+
declare function auth<const P extends string>(path: P, opts?: SafeIsRefOnly): AuthValue<P>;
|
|
663
688
|
/**
|
|
664
689
|
* Reference the RESPONSE of the object under test (`{tag:"response", value}`) —
|
|
665
690
|
* the subject nearly every unit-test assertion is written against.
|
|
@@ -894,7 +919,11 @@ declare const expect: {
|
|
|
894
919
|
readonly to_be_defined: (subject: Value) => TestExpect;
|
|
895
920
|
/** The subject is undefined. */
|
|
896
921
|
readonly to_not_be_defined: (subject: Value) => TestExpect;
|
|
897
|
-
/**
|
|
922
|
+
/**
|
|
923
|
+
* The subject is empty — only `""`, `[]`, or `{}`. `0`, `null` and `false`
|
|
924
|
+
* all FAIL, so use {@link to_be_null} for null and `to_equal(…, c.int(0))`
|
|
925
|
+
* for zero.
|
|
926
|
+
*/
|
|
898
927
|
readonly to_be_empty: (subject: Value) => TestExpect;
|
|
899
928
|
/** The subject is `null`. */
|
|
900
929
|
readonly to_be_null: (subject: Value) => TestExpect;
|
|
@@ -908,9 +937,9 @@ declare const expect: {
|
|
|
908
937
|
readonly to_be_in_the_future: (subject: Value) => TestExpect;
|
|
909
938
|
/** The subject is a timestamp earlier than now. */
|
|
910
939
|
readonly to_be_in_the_past: (subject: Value) => TestExpect;
|
|
911
|
-
/** `subject
|
|
940
|
+
/** `subject == value` — a LOOSE compare: text `"5"` equals int `5`, and `5` equals `5.0`. To pin a type, assert on a filter like `withFilters(subject, fl.is_text())` instead. */
|
|
912
941
|
readonly to_equal: (subject: Value, value: Value) => TestExpect;
|
|
913
|
-
/** `subject
|
|
942
|
+
/** `subject != value` — the loose inverse of {@link to_equal} (`"5"` and `5` are NOT unequal). */
|
|
914
943
|
readonly to_not_equal: (subject: Value, value: Value) => TestExpect;
|
|
915
944
|
/** `subject > value`, both read as numbers. */
|
|
916
945
|
readonly to_be_greater_than: (subject: Value, value: Value) => TestExpect;
|
|
@@ -1009,6 +1038,15 @@ interface TestDef {
|
|
|
1009
1038
|
* bring it back: a token is an expiring credential rather than authored
|
|
1010
1039
|
* configuration, so `codegen` reports a stored one as a deliberate omission
|
|
1011
1040
|
* instead of writing it into a committed tree.
|
|
1041
|
+
*
|
|
1042
|
+
* ⚠ A token is signed PER INSTANCE and EXPIRES, so a literal one is not
|
|
1043
|
+
* portable — it runs only on the backend that minted it (passes locally,
|
|
1044
|
+
* `Invalid token.` on an ephemeral or any other instance) and is a live
|
|
1045
|
+
* credential sitting in committed source. To cover `query({ auth })` logic
|
|
1046
|
+
* portably, move the body into a `defineFunction` that takes the user id as
|
|
1047
|
+
* an input and `s.function.call` it from the test (the same pattern the
|
|
1048
|
+
* workflow-test section recommends, since the gate itself is not reachable
|
|
1049
|
+
* from a test run); keep `token` for a throwaway local check only.
|
|
1012
1050
|
*/
|
|
1013
1051
|
token?: string;
|
|
1014
1052
|
}
|
|
@@ -1374,4 +1412,4 @@ type PersistedFunctionRow = FunctionXdo & {
|
|
|
1374
1412
|
};
|
|
1375
1413
|
};
|
|
1376
1414
|
|
|
1377
|
-
export {
|
|
1415
|
+
export { resp as $, type AuthValue as A, type TestXdo as B, type CacheXdo as C, auth as D, type ExprGroup as E, type FieldXdo as F, c as G, type HistoryXdo as H, type InpValue as I, caught as J, col as K, type ListBoundsXdo as L, type MethodXdo as M, type NotObjMember as N, env as O, type PersistedFunctionRow as P, QUERY_AGGREGATE_NAMES as Q, type RefValue as R, type SafeRefValue as S, TAGS as T, expect as U, type Value as V, filter as W, inp as X, out as Y, qf as Z, ref as _, type CaughtField as a, setting as a0, sys as a1, test as a2, toolset as a3, withFilters as a4, type CaughtShape as a5, type CaughtValue as b, type ConditionalContext as c, type ConditionalElifContext as d, type ConstValue as e, type ExprNode as f, type ExprOperand as g, type ExprStatement as h, type FilterXdo as i, type FilteredValue as j, type FunctionXdo as k, type InputXdo as l, QUERY_FILTER_NAMES as m, QUERY_FILTER_SPECS as n, type QueryFilter as o, type QueryFilterResults as p, type RegexValue as q, type ResultItemXdo as r, type StackItemXdo as s, type StatementInputXdo as t, TEST_EXPECT_TYPES as u, type Tag as v, type TaggedValue as w, type TestDef as x, type TestExpect as y, type TestExpectType as z };
|
package/guides/authoring.md
CHANGED
|
@@ -320,6 +320,7 @@ sources.
|
|
|
320
320
|
|
|
321
321
|
```ts
|
|
322
322
|
s.db.get({ table, fieldValue: inp("id"), as: "current" }),
|
|
323
|
+
guard.found("current"), // a miss would 500 on the `current.clicks` drill
|
|
323
324
|
s.db.edit({ table, fieldValue: inp("id"), row: { clicks: withFilters(ref("current.clicks"), fl.add(c.int(1))) } }),
|
|
324
325
|
```
|
|
325
326
|
|
package/guides/codes.md
CHANGED
|
@@ -75,7 +75,7 @@ Printed as `! …` on stderr, and as `{ code, message }` in a `--json` document'
|
|
|
75
75
|
| `env-pull.declared-missing` | … holds no value for …, which this project declares — so … has none for … either, and a deploy has nothing to send. |
|
|
76
76
|
| `env-pull.dropped-keys` | Dropped … key… that … only in the local …: …. |
|
|
77
77
|
| `env-pull.invalid-name` | … could not be written: … — a name is letters, digits and `_`, and does not start with a digit. |
|
|
78
|
-
| `env-pull.unwritable-value` | … could not be written: the dotenv format carries no
|
|
78
|
+
| `env-pull.unwritable-value` | … could not be written: the dotenv format carries no newline in a value. |
|
|
79
79
|
| `ephemeral.duplicate-name` | … also named "…" (…) — this deploy created … beside …. |
|
|
80
80
|
| `ephemeral.entry-changed` | … was last deployed from …; …. |
|
|
81
81
|
| `ephemeral.expires-not-applied` | --expires-hours … was not applied: … already exists, and an ephemeral's lifetime is set only when it is created (this one expires …). |
|
|
@@ -99,6 +99,7 @@ Printed as `! …` on stderr, and as `{ code, message }` in a `--json` document'
|
|
|
99
99
|
| `init.verify-failed` | Verification FAILED — the objects listed above do not re-export as they were pulled. |
|
|
100
100
|
| `init.workflow-exists` | … already exists — moving the new workflow there replaces it. |
|
|
101
101
|
| `landing.record-failed` | The prune landed, but … could not be updated: … |
|
|
102
|
+
| `local.capability-unavailable` | A deploy to the local Xano Engine uses a statement the engine refuses (`s.storage.sign_private_url`: 403 `Not supported`); exercise it on an ephemeral (`deploy --ephemeral`). Never a `--strict` failure. |
|
|
102
103
|
| `local.foreign` | Left running, not started by xanosdk: … |
|
|
103
104
|
| `local.import-failed` | The import failed — the engine is still running, so nothing needs restarting: |
|
|
104
105
|
| `local.list-failed` | Could not list running engines, so none are shown: … |
|
|
@@ -241,6 +242,9 @@ Printed as `! …` on stderr, and as `{ code, message }` in a `--json` document'
|
|
|
241
242
|
| `secrets.not-ignored` | … holds secrets and git was not ignoring it. |
|
|
242
243
|
| `secrets.tracked-by-git` | … holds secrets and is tracked by git — an ignore rule cannot untrack it. |
|
|
243
244
|
| `secrets.vault-in-bundle` | … contains … private stored …. |
|
|
245
|
+
| `security.encrypt-default-algorithm` | …: `s.security.…` sets no `algorithm`, so the engine uses `aes-128-cbc` — even a 256-bit key then runs AES-128. |
|
|
246
|
+
| `security.jwt-no-ttl` | …: `s.security.…` sets no `ttl`, so the token carries no `exp` and never expires. |
|
|
247
|
+
| `security.rsa-default-bits` | …: `s.security.create_rsa_key` sets no `bits`, so the engine generates a 1024-bit key — below the 2048-bit minimum now considered safe. |
|
|
244
248
|
| `seed.guarded-columns` | Could not read which columns are sensitive in … — the source's export does not carry …, so only `internal` and password columns were checked: … |
|
|
245
249
|
| `seed.none-declared` | `--seed` was passed, but no table in this project declares seed rows — no rows will be written. |
|
|
246
250
|
| `seed.password-hashes` | Seed rows land password columns as given — they must already be hashes. |
|
|
@@ -268,6 +272,7 @@ Printed as `! …` on stderr, and as `{ code, message }` in a `--json` document'
|
|
|
268
272
|
| `update.available` | A new @xano/sdk is available: … → … |
|
|
269
273
|
| `upgrade.partial` | Could not restore the … range in package.json: … |
|
|
270
274
|
| `workspace-env.compared-empty` | Workspace env: … compared as EMPTY (--allow-empty-env). |
|
|
275
|
+
| `workspace-env.inline-comment` | Workspace env: the value of … in `…` carries " #", and … sent with it: the file has no inline comments, so `KEY=abc # note` sends "abc # note". |
|
|
271
276
|
| `workspace-env.missing-values` | … declared env var… no value in …: …. |
|
|
272
277
|
| `workspace-env.not-written` | Workspace env: the bundle carries … (…) — NOT written (--no-secrets). |
|
|
273
278
|
| `workspace-env.undeclared` | A workspace env var is supplied but not declared in `workspaceConfig({ env })`; the deploy would add it. |
|
|
@@ -298,10 +303,13 @@ Raised while a workspace compiles (`export`, `deploy`, `release`, …). A warnin
|
|
|
298
303
|
| `db.addon-unknown-column` | …: the attached … binds `out("…")`, but the rows it reads have no `…` column — the binding is null on every row, so the addon grafts nothing. |
|
|
299
304
|
| `db.addon-unknown-input` | …: the attached … is passed `…`, which that addon does not declare — the engine drops it, so the addon runs with its input unset and grafts nothing. |
|
|
300
305
|
| `db.bulk-update-partial-item` | …: `s.db.bulk.update` on table "…" is a full-row REPLACE, and these items omit … — each omitted column is written to its zero value ("" / 0 / null), not left… |
|
|
306
|
+
| `db.edit-optional-input` | … "…": `…` writes … from optional, non-nullable …. |
|
|
307
|
+
| `db.eval-unselected` | …: `eval` computes …, but `output` does not select … — `output` applies to the eval columns too, so … dropped from the result with no error (and `InferRespon… |
|
|
301
308
|
| `db.filter-operand-invalid` | …: a `where` clause fails every request that reaches it, whatever the data — …. |
|
|
302
309
|
| `db.internal-column-read` | …: reads `ref("…")`, but "…" on table "…" is `access: "internal"` and a `db.get` does not return it — the row has no "…" key, so this fails at runtime with `… |
|
|
303
310
|
| `db.null-match-arg` | …: `c.null()` is the … of `…`. |
|
|
304
311
|
| `db.output-unknown-column` | …: `output` selects "…", but the row has no "…" — the key is absent from the result. |
|
|
312
|
+
| `db.patch-raw-input` | … "…": `s.db.patch` writes `inp("…")` as sent, so the caller can set ANY column, the primary key included (`{"id": 50}` renumbers the row). |
|
|
305
313
|
| `db.query-envelope-read-unpaged` | … "…": `ref("…")` reads the paging envelope, but `s.db.query` "…" is not paged with one, so it binds the row list and `…` is no key of it. |
|
|
306
314
|
| `db.query-output-joined-column` | …: `output` selects "…", a JOINED column — a join adds no key to the row, so it is dropped from the result with no error. |
|
|
307
315
|
| `db.query-output-mixed-roots` | …: `s.db.query` is PAGED, so `output` selects from the envelope (…) — but …, which no envelope key matches, so … dropped from the result. |
|
|
@@ -309,6 +317,7 @@ Raised while a workspace compiles (`export`, `deploy`, `release`, …). A warnin
|
|
|
309
317
|
| `db.query-output-totals-off` | …: `output` keeps …, but the envelope carries … only when counting is on — the key is absent from the result. |
|
|
310
318
|
| `db.query-output-unknown-column` | …: `output` selects "…", but the row has no "…" — the key is absent from the result. |
|
|
311
319
|
| `db.safe-ref-match-arg` | …: a `ref(…, { safe: true })` is the … of `…`. |
|
|
320
|
+
| `db.stream-returned` | … returns `…`, a `returnType: "stream"` binding. |
|
|
312
321
|
| `diagnostics.allow-unused` | … "…": `diagnostics.allow` accepts …, but this export raised no such warning about … — the shape … accepted is gone, or the check no longer finds it. |
|
|
313
322
|
| `doc-token.unsupplied` | API group "…" declares a documentation gate and no token was found for it in `…`, so this artifact carries no `documentation` block — the bytes an export wou… |
|
|
314
323
|
| `documentation.literal-token` | … spells a documentation token literally in …. |
|
|
@@ -317,7 +326,10 @@ Raised while a workspace compiles (`export`, `deploy`, `release`, …). A warnin
|
|
|
317
326
|
| `field.email-default-invalid` | The `default` at … is …, which is not an email address — every insert or request that leaves the field out is refused "Invalid email format.". |
|
|
318
327
|
| `field.enum-default-not-a-value` | The `default` at … is …, which is not one of the enum's values (…) — a value no request can send back. |
|
|
319
328
|
| `field.input-default-invalid` | The `default` at … is …, which … — every request that leaves the input out is refused. |
|
|
329
|
+
| `field.input-never-omittable` | …, input "…" is optional, but it can never be omitted: an omitted input binds …, and …, so every request that leaves it out is refused with a 400. |
|
|
320
330
|
| `field.input-required-default-ignored` | The `default` at …, input "…" is …, but the input is `required: true` — the engine refuses a request that leaves a required input out ("Missing param") befor… |
|
|
331
|
+
| `field.list-bounds-on-scalar` | …, … "…" sets `list`, but it is a single value: `list` is the length BOUNDS of a list and does not make the field one, so it is ignored. |
|
|
332
|
+
| `field.list-default-ignored` | The `default` at …, input "…" is …, but the input is a list, and the engine replaces any default on a list input with `[]`: an omitted list binds `[]`, not t… |
|
|
321
333
|
| `field.vector-not-nullable` | table "…", column "…" is a vector with `nullable: false` and no default — an empty default becomes NULL only on a nullable column, and `''` is not a vector,… |
|
|
322
334
|
| `function.reserved-input-name` | function "…": the input name `…` is reserved by the engine — a call passes its arguments keyed by input name, and the engine skips a `…` key when it evaluate… |
|
|
323
335
|
| `guard.role-unsatisfiable` | A guard.role on a table passed by name checks a column the table lacks, or a role its enum column cannot hold. |
|
|
@@ -349,6 +361,7 @@ Raised while a workspace compiles (`export`, `deploy`, `release`, …). A warnin
|
|
|
349
361
|
| `middleware.input-never-bound` | middleware "…" declares `input`, which the host request never binds — `inp()` inside a middleware fails at runtime with `Unable to locate input`, and a decla… |
|
|
350
362
|
| `middleware.post-merge-list` | query "…" answers a list, and the post middleware … merges its response into it: the list arrives as an object keyed by index (`{"0":{…},"1":{…},…}`), not th… |
|
|
351
363
|
| `middleware.post-reads-request` | middleware "…" is in the post chain of … "…"… and reads … from `s.util.get_all_input`. |
|
|
364
|
+
| `middleware.pre-replace-drops-input` | query "…" reads …, which the pre middleware "…" (`resultStrategy: "replace"`) does not re-emit: a replace swaps the caller's inputs for its response (…), so… |
|
|
352
365
|
| `query.auth-table-unflagged` | query "…" requires auth against table "…", which is not marked `table({ auth: true })`. |
|
|
353
366
|
| `query.auth-table-unregistered` | query "…": `auth` is a table def that isn't registered on this workspace — add it with `registerTables([…])`. |
|
|
354
367
|
| `query.input-name-mangled` | query "…" (…) has an input named …, which a query string cannot deliver — the request parser rewrites param names, so `?…=…` … and the input stays empty. |
|
|
@@ -361,48 +374,64 @@ Raised while a workspace compiles (`export`, `deploy`, `release`, …). A warnin
|
|
|
361
374
|
| `realtime.gate-denies-everyone` | … "…" gates `…` but declares no `response`, so it returns nothing on every run — and an empty return is a DENY, which refuses every client. |
|
|
362
375
|
| `realtime.join-deliver-object-response` | … "…" serves both `join` and `deliver` with one object response — `join` reads it as the admit decision, but `deliver` reads an object as the recipient's NEW… |
|
|
363
376
|
| `realtime.per-recipient-without-deliver` | realtimeChannel "…" sets `delivery: { perRecipient: true }` but no active `deliver` trigger is bound to it, so the flag is a no-op — the engine falls back to… |
|
|
377
|
+
| `realtime.precondition-fails-open` | realtimeMessage "…" guards with `s.precondition`/`guard.*`, which cannot block a realtime message: a failing one crashes the handler, and a crashed handler F… |
|
|
364
378
|
| `realtime.publish-unknown-channel` | …: `s.realtime.publish` targets channel path "…" on realtime server "…", but that path is a channel of … only, so no client of "…" can be subscribed to it —… |
|
|
365
379
|
| `realtime.publish-unknown-server` | …: `s.realtime.publish` targets realtime server "…", which this workspace does not register. |
|
|
366
380
|
| `realtime.server-disabled` | realtimeServer "…" is not enabled — `enabled` defaults to FALSE, unlike every other `enabled` — but … channel… registered on it, so no client can connect to …. |
|
|
367
381
|
| `redis.ratelimit-no-error` | … "…": an `s.redis.ratelimit` has no `error`, so it never stops a request — over `max` it …. |
|
|
368
382
|
| `reference.unresolved` | … references …, which is not registered on this workspace. |
|
|
383
|
+
| `response.return-outside-type` | …: an `s.return` in its stack serves a body other than `response`, and `InferResponse` types this def from `response` only, so the early-return body is missi… |
|
|
369
384
|
| `response.unbound-return` | … "…" ends with s.return(...) but has no `response` field. |
|
|
370
385
|
| `search.request-only-filter` | … pipes a search operand through `…`, which evaluates only in the request. |
|
|
371
386
|
| `seed.invalid` | A seed row does not match its table's columns. |
|
|
372
387
|
| `seed.public-seed` | Table "…" declares publicSeed but has no `seed`: there are no seed values to declare public. |
|
|
373
|
-
| `stack.agent-tools-off` | …: `s.ai.agent.run` of agent "…"
|
|
374
|
-
| `stack.
|
|
388
|
+
| `stack.agent-tools-off` | …: `s.ai.agent.run` of agent "…" sets `allowToolExecution: c.bool(false)`. |
|
|
389
|
+
| `stack.array-index-unbound` | …: `…`'s `if` reads `$index`, which it does not bind (only `$this`), so every non-empty request fails with 500 "Missing var entry: $index". |
|
|
390
|
+
| `stack.array-key-constant` | …: `…`'s `…` is a constant, so every item gets the same key. |
|
|
391
|
+
| `stack.auth-no-caller` | query "…" reads `auth()`, but …. |
|
|
375
392
|
| `stack.auth-null-host` | … "…": an `s.redis.ratelimit` in its stack keys off auth(), where …. |
|
|
393
|
+
| `stack.auth-token-optional-expiration` | … "…": `s.security.create_auth_token` takes `expiration` from `inp("…")`, an optional, non-nullable input with no default. |
|
|
376
394
|
| `stack.blank-table` | … has … (…) bound to no table (`table: null`) — … nothing when run. |
|
|
377
395
|
| `stack.col-outside-query` | `col("…")` outside a `db.*` statement's where/sort/eval — the engine reads it as the column NAME, so a condition on it is decided by that text and a response returns it. |
|
|
396
|
+
| `stack.drill-maybe-null` | …: `ref("…")` in … drills into `…`, which … binds to `null` when no row matches, and nothing before it checks that. |
|
|
397
|
+
| `stack.env-secret-in-response` | …: the `s.util.get_env` binding … returned in the response. |
|
|
378
398
|
| `stack.env-undeclared` | … "…" reads …, which … among the … environment variable… this workspace config declares (…). |
|
|
379
399
|
| `stack.expect-outside-test` | … runs … in its stack. |
|
|
380
400
|
| `stack.inp-undeclared` | … "…" reads …, which … here — ….… This deploys clean and fails at runtime with `Unable to locate input: …`. |
|
|
381
401
|
| `stack.loop-control-outside-loop` | … runs `…` outside any loop. |
|
|
382
402
|
| `stack.password-input-double-hash` | …: `s.security.check_password` reads `inp("…")`, and the input `…` is declared `input.password()`. |
|
|
403
|
+
| `stack.precondition-bare-error` | …: `s.precondition`'s `error` is a bare string (…), which the engine drops: the client gets "Precondition failed." instead. |
|
|
404
|
+
| `stack.predicate-unbound` | …: `…` has no `as`, so it does nothing. |
|
|
383
405
|
| `stack.reserved-var-namespace` | `ref("…")` reads a stack variable named after a reserved namespace (`auth`, `input`, `env`, …) that nothing binds — use its accessor (`auth()`, `inp()`, `env()`, …) — a 500 at runtime. |
|
|
384
406
|
| `stack.to-throw-isolated-var` | …: `ref("…")` inside an `s.expect.to_throw` body names `…`, which is bound OUTSIDE the body. |
|
|
407
|
+
| `stack.tool-call-reads-auth` | … "…": `s.tool.call` runs tool … with NO caller, even from an authenticated query: its `auth()` fails ACCESS_DENIED, the failure is bound to `as`, and the re… |
|
|
385
408
|
| `stack.unbound-var` | `ref("…")` reads a variable nothing in the stack binds with `as` — `Missing var entry`, a 500 at runtime. |
|
|
409
|
+
| `stack.var-conditionally-bound` | A var bound only on some paths (one `s.conditional` branch, some `switch` cases, a loop body, a `try` block) is read after the block — `Missing var entry` on the skipped path, a 500; declare it first with `s.set_var(name, c.null())`. |
|
|
386
410
|
| `stack.zip-password-absent` | …: `…` sends no … key (`…: null`), and the engine rejects that at run time with `Missing param: …`. |
|
|
387
411
|
| `statement.decode-only` | A pulled workspace carries a statement Xano SDK has no factory for, as a `raw(…)` call; replace it with the statement it stands in for. |
|
|
388
412
|
| `statement.omitted-input` | …: `s.function.run` of function "…" does not pass …. |
|
|
389
413
|
| `statement.reserved-input-name` | …: `…` passes an input named `…`, which is reserved by the engine — it skips a `…` key when it evaluates a call's arguments, so the callee receives the uneva… |
|
|
390
414
|
| `statement.run-family-host` | … contains `…`, which only runs inside a workflow test. |
|
|
391
415
|
| `statement.unknown-input` | …: `…` of … "…" passes `…`, which that … does not declare — the engine drops it, so the target never sees the value. |
|
|
416
|
+
| `storage.include-meta-returned` | … returns `…`, from an `s.storage.create_attachment({ include_meta: true })` binding. |
|
|
392
417
|
| `storage.stored-file-input` | … "…": `s.storage.…` reads `inp("…")`…, an `input.…()` — that input takes an already-stored file, so an upload to it is refused (`400 Missing param: path`) b… |
|
|
393
418
|
| `switch.missing-break` | … has a `s.switch` whose case … omits `break: true`, so a match there FALLS THROUGH and also runs …. |
|
|
394
419
|
| `table.column-default-unfit` | A JSON-storage column's `default` its type cannot hold: the table deploys, then every insert that leaves the column unset is refused. |
|
|
395
420
|
| `table.column-name-unusable` | A stored column name the rule refuses (inserts, filters or reads fail on it), kept on a pulled table. |
|
|
396
421
|
| `table.reserved-column-name` | table "…": the column name `…` is reserved by the engine — it is the key a block statement stores its sub-stack under, and an insert's parameter map collides… |
|
|
422
|
+
| `table.search-index-unnamed` | A `type: "search"` index with no `name`: it deploys but cannot be queried — a search needs `col("$<name>")`, so an unnamed one is unreferenceable. |
|
|
397
423
|
| `table.view-duplicate` | …: `id` "…" is also the id of … — each view needs its own uuid. |
|
|
398
424
|
| `table.view-id-not-uuid` | …: `id` "…" is not a uuid, and the engine keys the view by it. |
|
|
399
425
|
| `table.view-unknown-column` | …: `…` names "…", which is not a column of this table… The view exports and then …. |
|
|
400
426
|
| `test.live-datasource` | A def's test runs against the "live" datasource, which every run clones first; `datasource: ""` or a small fixture is the default. |
|
|
401
427
|
| `test.unknown-input` | …: `input` passes `…`, which the … does not declare — the engine drops it, so the test runs without it. |
|
|
428
|
+
| `tool.description-shadowed` | tool "…" sets both `description` and `instructions`. |
|
|
402
429
|
| `tool.output-mismatch` | tool "…": its `response` …. |
|
|
403
430
|
| `toolset.primitive-reads-auth-ungated` | mcpServer "…": … "…" reads `auth()`, but its entry names no auth table, so it runs with no caller and every `…` answers `-32603 "Access Denied"`. |
|
|
404
431
|
| `toolset.tool-reads-auth-ungated` | … "…": tool "…" reads `auth()`, but its entry names no auth table, so the tool runs with no caller. |
|
|
405
432
|
| `toolset.tool-ref-zero` | … `tools[…]` is `id: 0`, which references no tool — engine ids start at 1. |
|
|
433
|
+
| `trigger.absent-side-read` | tableTrigger "…" reads `t.…("…")` outside any branch, but on … `…` is `{}`: the read RAISES `Unable to locate input: …` and silently aborts that run (nothing… |
|
|
434
|
+
| `trigger.mcp-response-missing-key` | mcpServerTrigger "…": its response has no … key. |
|
|
406
435
|
| `trigger.no-action` | … "…" enables no action, so it deploys and never fires. |
|
|
407
436
|
| `trigger.search-bare-column` | tableTrigger "…": `search` reads `col("…")`, which names neither row the condition is tested against. |
|
|
408
437
|
| `trigger.search-unknown-column` | tableTrigger "…": `search` reads `col("…")`, but its table has no column "…" — it declares …. |
|
|
@@ -413,3 +442,4 @@ Raised while a workspace compiles (`export`, `deploy`, `release`, …). A warnin
|
|
|
413
442
|
| `value.regex-operands-reversed` | … pipes a regex filter's SUBJECT and passes its PATTERN as the argument: …. |
|
|
414
443
|
| `value.timezone-unknown` | … "…": … names a timezone the engine does not apply — it formats in UTC instead, without an error. |
|
|
415
444
|
| `workflow-test.live-datasource` | A workflow test runs against the "live" datasource, which every run clones first; `datasource: ""` or a small fixture is the default. |
|
|
445
|
+
| `workflow-test.unchecked-child` | workflowTest "…": `s.workflow_test.call` runs … and nothing reads its result. |
|
package/guides/coverage.md
CHANGED
|
@@ -10,7 +10,7 @@ the real Xano engine golden fixtures, and a coverage report prints on every test
|
|
|
10
10
|
| Surface | Coverage |
|
|
11
11
|
|---|---|
|
|
12
12
|
| Object kinds | **27 / 33** — counted over the engine's catalog, where each trigger type is its own kind |
|
|
13
|
-
| Statements (via `s`) | **
|
|
13
|
+
| Statements (via `s`) | **219 / 219 (100%)** — every engine statement surface has a factory |
|
|
14
14
|
| Filters (via `fl`) | **246 / 246 (100%)** — every filter's signature is known: 144 carry arguments, 102 take none |
|
|
15
15
|
|
|
16
16
|
The six engine kinds you cannot author here are `tablemap`, `run.job`, `run.service`, the
|
|
@@ -28,7 +28,7 @@ catalogs; this table is hand-written, so a test asserts every figure in it again
|
|
|
28
28
|
reads cannot disagree.
|
|
29
29
|
|
|
30
30
|
The statement catalog is generated from the engine's own schemas (`npm run codegen`): 153 of
|
|
31
|
-
the
|
|
31
|
+
the 219 surfaces are declarative and carry a typed field schema, and the remaining 66 —
|
|
32
32
|
control flow, the `db` family, the call family — are hand-authored. **Reachable ≠ byte-verified**: every surface is
|
|
33
33
|
authorable, but a structural special without a persisted golden yet emits a shape *modeled*
|
|
34
34
|
on the engine schema, to be deep-equal'd against fixtures as they are captured.
|
package/guides/object-kinds.md
CHANGED
|
@@ -281,7 +281,7 @@ A tool, prompt or resource can also carry the metadata MCP clients show: a `titl
|
|
|
281
281
|
const summarize = prompt({
|
|
282
282
|
name: "summarize",
|
|
283
283
|
input: { post_id: input.int({ required: true }) },
|
|
284
|
-
stack: [s.db.get({ table: posts, fieldValue: inp("post_id"), as: "post" })],
|
|
284
|
+
stack: [s.db.get({ table: posts, fieldValue: inp("post_id"), as: "post" }), guard.found("post")],
|
|
285
285
|
response: ref("post.title"), // a string is one user message
|
|
286
286
|
});
|
|
287
287
|
|
package/guides/typed-frontend.md
CHANGED
|
@@ -156,6 +156,15 @@ JSON value, `lol=[[1,2],[3]]`). A list item that sends nothing (`null`, `{}`) th
|
|
|
156
156
|
naming it. A repeated plain key (`tags=a&tags=b`) reaches the endpoint as its last
|
|
157
157
|
value only, so don't hand-roll it.
|
|
158
158
|
|
|
159
|
+
A frontend that imports only `routes.gen.ts` gets the same encoding with no SDK
|
|
160
|
+
runtime: `routeQuery(key, input)` returns the query string (path params dropped),
|
|
161
|
+
typed by `RouteInputs[key]`:
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
import { routePath, routeQuery } from "../xano/routes.gen.js";
|
|
165
|
+
fetch(`${BASE}${routePath("GET search")}?${routeQuery("GET search", { tags: ["a", "b"], range: { min: 1 } })}`);
|
|
166
|
+
```
|
|
167
|
+
|
|
159
168
|
The `@xano/sdk` entry has **zero Node dependencies**, so importing your workspace
|
|
160
169
|
graph into a browser bundle just works. The `node:fs`-backed emitters live in the
|
|
161
170
|
separate `@xano/sdk/node` entry a frontend never pulls in.
|
package/llms/client.md
CHANGED
|
@@ -8,11 +8,10 @@ Importing a def into a browser bundle or a Node script — for `getPath()`, `get
|
|
|
8
8
|
no Node built-ins, so a bundler drops unused SDK exports. But importing a **def** for its
|
|
9
9
|
`getPath()`/`verb`/`getUrl()`/`getChannel()` also pulls whatever its `stack` references:
|
|
10
10
|
the `s.*`/`c.*` factory CALLS run at module load to BUILD it. Types are free.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
adds ~2 kB, so trimming a def does not shrink it.
|
|
11
|
+
The first def costs **~267 kB minified (~65 kB gzipped)**; the floor is the RUNTIME, not the def:
|
|
12
|
+
each further def adds ~2 kB, so splitting or trimming defs does not help.
|
|
14
13
|
Fix: `npx @xano/sdk routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) — verbs, paths, and sockets as
|
|
15
|
-
plain data importing NOTHING, still compile-checked: `routePath("GET blog/{slug}", { slug })`
|
|
14
|
+
plain data importing NOTHING, still compile-checked: `routePath("GET blog/{slug}", { slug })`, `routeQuery("GET search", input)` (the GET query string, path params dropped),
|
|
16
15
|
`channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base
|
|
17
16
|
URLs lifted to `wss://h/ws/<tenant>:<canonical>`), `mcpUrl("notes_mcp", baseUrl)` (an MCP
|
|
18
17
|
server's address to show a user or hand a client; browser JS cannot call it). A rename is a type error, not a 404.
|
|
@@ -21,38 +20,43 @@ Importing a def into a browser bundle or a Node script — for `getPath()`, `get
|
|
|
21
20
|
`"<channel key> <message name>"`: `type NewListing = RouteInputs["POST listings"]`. A
|
|
22
21
|
frontend types bodies, channel params and payloads from these, not `InferInput` on a def;
|
|
23
22
|
keep `InferInput` in code that already imports defs. They match `InferInput`, except a
|
|
24
|
-
`dbLink` input
|
|
23
|
+
`dbLink` input is the linked table's columns, and an `input.file()` a `Blob`
|
|
24
|
+
(multipart). Responses
|
|
25
25
|
are not in the file: `InferResponse` on an `import type` of the def.
|
|
26
26
|
Runtime validation: `npx @xano/sdk marketplace install zod` adds `@xano-sdk/zod`, which writes
|
|
27
27
|
`ROUTE_SCHEMAS`/`CHANNEL_SCHEMAS`/`MESSAGE_SCHEMAS` into the file under the same keys, each
|
|
28
28
|
checked against its type at typecheck; the file then imports `zod`, never `@xano/sdk`.
|
|
29
|
-
- **Verifying a def outside a bundler.** Inside a bundler (Vite/webpack)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
xanosdk CLI's own loader resolves). Running from outside the project root also breaks
|
|
35
|
-
the `@xano/sdk` specifier resolution.
|
|
29
|
+
- **Verifying a def outside a bundler.** Inside a bundler (Vite/webpack), import the def and read
|
|
30
|
+
`getPath()`/`verb` directly. From Node, run a REAL file with `tsx <file.ts>` **from inside the project root**.
|
|
31
|
+
Not `tsx -e "import …"` (mis-resolves the package `exports` map → ERR_PACKAGE_PATH_NOT_EXPORTED),
|
|
32
|
+
not bare `node file.ts` (cannot resolve the `.js`-specifier intra-workspace imports), and not from
|
|
33
|
+
outside the project root (the `@xano/sdk` specifier does not resolve).
|
|
36
34
|
|
|
37
|
-
**Reading the injected backend URL.**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
**Reading the injected backend URL.**
|
|
36
|
+
|
|
37
|
+
- `npx @xano/sdk deploy <entry> --static <dir>` writes the deployed env's URL into every html
|
|
38
|
+
document. A prerendered build serves a different one per route; a route without the global
|
|
39
|
+
renders fine while every call goes to the wrong origin.
|
|
40
|
+
- Read it at runtime with a build-time fallback:
|
|
41
41
|
const HOST = (typeof window !== 'undefined' && window.XANO_HOST) || import.meta.env.VITE_XANO_HOST;
|
|
42
|
-
The scaffold's `lib/api.ts` types it (`interface Window { XANO_HOST?: string }` — `undefined` in dev)
|
|
43
|
-
and exports this as a `string`, `XANO_HOST`; outside a scaffold declare the global yourself.
|
|
44
|
-
In LOCAL DEV there is no injected global, so the fallback
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
bare `XANO_HOST` token.
|
|
42
|
+
- The scaffold's `lib/api.ts` types it (`interface Window { XANO_HOST?: string }` — `undefined` in dev)
|
|
43
|
+
and exports this as a `string`, `XANO_HOST`; outside a scaffold declare the global yourself.
|
|
44
|
+
- In LOCAL DEV there is no injected global, so the fallback answers: set `VITE_XANO_HOST` in a
|
|
45
|
+
`.env.local` beside `.env.example` at the PROJECT ROOT. The scaffold's vite config sets `envDir`
|
|
46
|
+
there (its `root` is `frontend/`, and Vite resolves `.env` files against `root`); without it the
|
|
47
|
+
var reads as undefined, the host falls back to '', and every call 404s off the dev server.
|
|
48
|
+
- It is injected in bracket form — `window["XANO_HOST"]="…"` — so grepping a deploy for
|
|
49
|
+
`window.XANO_HOST` matches nothing. Grep the bare `XANO_HOST` token.
|
|
50
|
+
|
|
52
51
|
**Frontend without the backend.** `npx @xano/sdk publish <dir> [--to <backend>]` uploads an
|
|
53
52
|
already-built directory and nothing else — no compile, no import (scaffold script
|
|
54
53
|
`npm run xano:deploy:frontend`). A Xano Engine (`--to local`, or bare after a local
|
|
55
54
|
deploy) serves it, server half included, at `http://<prefix>.localhost:<port>`.
|
|
55
|
+
The injected `XANO_HOST` is the DESTINATION's URL, so one build published to two
|
|
56
|
+
destinations serves two different documents. `--release <name>` checks only that the
|
|
57
|
+
release exists; `--branch <label>` (workspace only) refuses unless that label is LIVE —
|
|
58
|
+
a label match, not a content comparison. `--json` reports `published` and `verified` separately.
|
|
59
|
+
|
|
56
60
|
**Server-rendered SvelteKit.** `adapter()` from `@xano/sdk/sveltekit` (needs `esbuild`) writes
|
|
57
61
|
the static half at the build's root plus a server half in `.xano-ssr/`. A Xano Engine renders every
|
|
58
62
|
path that is not a file through it (`load` reads the engine's own URL as `XANO_HOST` from
|
|
@@ -61,13 +65,27 @@ is not sent `.xano-ssr/`: it serves the static half and answers other paths with
|
|
|
61
65
|
shell, where a route with a server `load` fails (no `__data.json`). A scaffolded project configures
|
|
62
66
|
SvelteKit in `vite.config.ts`'s `sveltekit({ adapter })`, where `svelte.config.js` is ignored.
|
|
63
67
|
⚠ `.xano-ssr/server.js` inlines `$env/static/private` values; it is never served (`/.xano-ssr/` answers 404).
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
|
|
69
|
+
**Displaying a stored file.** A file column comes back as `{ path, name, type, size, mime,
|
|
70
|
+
meta, access, url }` — `mime` is the exact media type (`image/png`), `type` only the coarse
|
|
71
|
+
kind (`image`). Do not use its `url`: on a tenant-scoped environment it addresses the
|
|
72
|
+
instance host without the `/tenant/<name>` segment and 404s (a broken `<img>`; API
|
|
73
|
+
assertions still pass). Build the URL from `path`: `fileUrl(row.avatar, HOST)` returns `null`
|
|
74
|
+
for an absent file and is correct on an ephemeral and an instance workspace alike.
|
|
75
|
+
|
|
76
|
+
**Consuming a streaming response.** A `responseType: "stream"` query emits Server-Sent Events —
|
|
77
|
+
`Content-Type: text/event-stream`, one `data: <json>` frame per `s.api.stream({ value })` call,
|
|
78
|
+
each with an `id:` line that is a millisecond timestamp (ids REPEAT within a ms, so do not rely on
|
|
79
|
+
`Last-Event-ID` for exactly-once resume). The query's own `response` is not sent. Read it with
|
|
80
|
+
`EventSource`:
|
|
81
|
+
const es = new EventSource(`${HOST}/api:<canonical>/stream/basic`);
|
|
82
|
+
es.onmessage = (e) => { const chunk = JSON.parse(e.data); /* … */ };
|
|
83
|
+
es.onerror = () => es.close(); // EventSource is GET-only and reconnects on its own
|
|
84
|
+
For POST or auth headers, a `fetch` + `response.body.getReader()` loop instead, splitting the text
|
|
85
|
+
on the blank-line (`\n\n`) frame delimiter and stripping the `data: ` prefix. There is no typed
|
|
86
|
+
client helper for the stream body, and `InferResponse` does not describe it.
|
|
87
|
+
**Error responses.** A failed request answers a JSON envelope `{ code, message, payload }`:
|
|
88
|
+
`if (!res.ok) { const { code, message, payload } = await res.json(); … }`. `code` is an
|
|
89
|
+
`ERROR_CODE_*` string (`ERROR_FATAL` for an engine error), `message` the human text (⚠ EMPTY
|
|
90
|
+
on a `db` NotFound), `payload` a precondition's structured detail (`""`/absent otherwise).
|
|
91
|
+
The `error_type` → HTTP status and `code` mapping is in `llms/fields.md`.
|