@xano/sdk 1.0.13 → 1.0.15
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 +28 -0
- package/README.md +28 -28
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-DAFGNMQX.js → agent-file-refresh-ZRGNOA6Q.js} +12 -11
- package/dist/{agent-skill-command-6M46ZGOL.js → agent-skill-command-DV26SDA2.js} +51 -50
- package/dist/{answer-shape-CBUQRSXI.js → answer-shape-AVZSKBR6.js} +4 -4
- package/dist/{backend-dir-J2J7JNS6.js → backend-dir-NTMXWE5R.js} +11 -10
- package/dist/{backend-slot-X5AUX2TT.js → backend-slot-DZAUHLTS.js} +3 -3
- package/dist/bin.js +47 -46
- package/dist/{branch-YS2K3VOB.js → branch-IJTBZZFO.js} +8 -8
- package/dist/{branch-commands-BUKVE637.js → branch-commands-4PJEBNRK.js} +26 -25
- package/dist/{chunk-PCHIHVX6.js → chunk-2LF734YB.js} +4 -4
- package/dist/{chunk-ENBGJJJH.js → chunk-3GZMP7II.js} +9 -9
- package/dist/{chunk-R7XZW4SB.js → chunk-3H7R4ISR.js} +2 -2
- package/dist/{chunk-DB7P2SSK.js → chunk-45K2QZBR.js} +3 -3
- package/dist/{chunk-C2SAVXAB.js → chunk-4MX5LMPQ.js} +2 -2
- package/dist/{chunk-IZI3SYXH.js → chunk-5FJ4M4HB.js} +38 -38
- package/dist/{chunk-FBWMKHLO.js → chunk-5SJQAJLF.js} +3 -3
- package/dist/{chunk-E763QI3G.js → chunk-5SKWGCAJ.js} +2 -2
- package/dist/{chunk-JKGRQW6D.js → chunk-5W7S2SCA.js} +4 -4
- package/dist/{chunk-KICERNAP.js → chunk-66ZU2CD5.js} +4 -4
- package/dist/{chunk-F2NFNYCB.js → chunk-6EFXPTHT.js} +3 -3
- package/dist/{chunk-CTUIMNEM.js → chunk-6X73VFCX.js} +2 -2
- package/dist/{chunk-VTMTIBKP.js → chunk-74OPNM2Z.js} +2 -2
- package/dist/{chunk-DZUNF7IH.js → chunk-75QC66XI.js} +2 -2
- package/dist/{chunk-U4BGBU3R.js → chunk-7AKH4QDJ.js} +44 -44
- package/dist/{chunk-CGZSF756.js → chunk-7ZQ73AHJ.js} +28 -28
- package/dist/{chunk-5SMUND4J.js → chunk-A2N2C2WD.js} +6 -6
- package/dist/{chunk-XL7EA62X.js → chunk-AE5CRAKS.js} +5 -5
- package/dist/{chunk-5ONWBQ2C.js → chunk-ASQX477B.js} +7 -7
- package/dist/{chunk-JFPLHK6Y.js → chunk-AXMUYBWQ.js} +2 -2
- package/dist/{chunk-5XDKKE5Y.js → chunk-B6AFJVG4.js} +4 -4
- package/dist/{chunk-4CS4DKQC.js → chunk-BEKEOXNG.js} +2 -2
- package/dist/{chunk-ZSMHS7BU.js → chunk-CJGLAQRD.js} +4 -4
- package/dist/{chunk-M7DIIJPW.js → chunk-DBDTQR23.js} +4 -4
- package/dist/{chunk-RZABQ4YH.js → chunk-DGYXCIBV.js} +4 -4
- package/dist/{chunk-P6HXDOFG.js → chunk-DH6O5NQU.js} +13 -13
- package/dist/{chunk-I2AVVARA.js → chunk-ECQXASG3.js} +2 -2
- package/dist/{chunk-2BHYGUTI.js → chunk-EQXHUWUO.js} +2 -2
- package/dist/{chunk-EGEANMMK.js → chunk-FIERONKM.js} +2 -2
- package/dist/{chunk-A2AOUBJS.js → chunk-FKQX6KU7.js} +3 -2
- package/dist/{chunk-UECNKDDA.js → chunk-FOBVJ2UR.js} +8 -8
- package/dist/{chunk-GRWYO2MS.js → chunk-FXZEZAV2.js} +3 -3
- package/dist/{chunk-H6VVSGKN.js → chunk-G4WRZU5T.js} +7 -7
- package/dist/{chunk-K6BQPFRS.js → chunk-GBSHHNSD.js} +3 -3
- package/dist/{chunk-N3XSXGAL.js → chunk-GCINMMFL.js} +2 -2
- package/dist/{chunk-WZXEQUIM.js → chunk-GDJCWQIK.js} +2 -2
- package/dist/{chunk-ZACMAKZE.js → chunk-GIQIMWTK.js} +14 -14
- package/dist/{chunk-POZ6V4MU.js → chunk-GKQTXUOW.js} +2 -2
- package/dist/{chunk-D4VKPOD4.js → chunk-GRXX2TOJ.js} +13 -112
- package/dist/{chunk-YJK4NPXC.js → chunk-GVHWIDEJ.js} +3 -3
- package/dist/{chunk-UKC65HBQ.js → chunk-HCNIB3EC.js} +4 -4
- package/dist/{chunk-DILYWJVP.js → chunk-HXFLHA5K.js} +2 -2
- package/dist/{chunk-FLDFKG24.js → chunk-IKXXTRMN.js} +4 -4
- package/dist/{chunk-QWWQM4XZ.js → chunk-JAYHFXWH.js} +7 -7
- package/dist/{chunk-6LECAG3Y.js → chunk-JWASCOHO.js} +4 -4
- package/dist/{chunk-DPSR5GRE.js → chunk-K6SWZ6H4.js} +49 -49
- package/dist/{chunk-VA4JK4TW.js → chunk-KMKUH2IO.js} +3 -3
- package/dist/{chunk-UFFIU57H.js → chunk-LSJ3SQEU.js} +4 -4
- package/dist/{chunk-JHQAVWHW.js → chunk-M7O3T7IM.js} +2 -2
- package/dist/{chunk-BXVNRUDB.js → chunk-MGG4CHO4.js} +3 -3
- package/dist/{chunk-7NNLRNXE.js → chunk-MIS6F4HM.js} +4 -4
- package/dist/{chunk-6HTXQAMG.js → chunk-N72XNQNJ.js} +14 -14
- package/dist/{chunk-H7GMGZHI.js → chunk-NDV6CBR7.js} +2 -2
- package/dist/{chunk-6OOZJQJK.js → chunk-NNI5R6V6.js} +68 -68
- package/dist/{chunk-IFXPHVPY.js → chunk-NPYYDTXS.js} +3 -3
- package/dist/{chunk-DYGRTWAI.js → chunk-O44MJTLR.js} +3 -3
- package/dist/{chunk-HDANNK4A.js → chunk-OZWAITII.js} +9 -9
- package/dist/{chunk-ONNSFD73.js → chunk-P7GKTV7N.js} +10 -10
- package/dist/{chunk-373AVIL2.js → chunk-QAEBBTYR.js} +7 -7
- package/dist/{chunk-3ZVSOZZC.js → chunk-QRMKQYCB.js} +2 -2
- package/dist/{chunk-TANWE2ZY.js → chunk-QW7NGUYW.js} +80 -80
- package/dist/{chunk-U4DSFCH5.js → chunk-R3GPRNBT.js} +2 -2
- package/dist/{chunk-SBS2IYTN.js → chunk-RBTZEHXF.js} +3 -3
- package/dist/{chunk-XFQAA2SU.js → chunk-RVAEPPRH.js} +2 -2
- package/dist/{chunk-W5MKVFBQ.js → chunk-RXNMZM6H.js} +5 -5
- package/dist/{chunk-6QJORUHC.js → chunk-RYWNNJK5.js} +2 -2
- package/dist/{chunk-NZ7ML6LG.js → chunk-SH4RY6QX.js} +290 -98
- package/dist/{chunk-ZGNWMGN3.js → chunk-SHHXLI2K.js} +26 -8
- package/dist/{chunk-MLKJUEG3.js → chunk-SL55XKVL.js} +23 -23
- package/dist/{chunk-H5FAYLCR.js → chunk-SPLRKCFV.js} +2 -2
- package/dist/{chunk-XYVPF63S.js → chunk-SXMZNSQ6.js} +8 -8
- package/dist/{chunk-NMHTB346.js → chunk-TT6LN55R.js} +36 -10
- package/dist/{chunk-B5N6EWOM.js → chunk-TXFOQZUQ.js} +3 -3
- package/dist/{chunk-VFRL4G72.js → chunk-UNFQN3TT.js} +3 -3
- package/dist/{chunk-EKS7SAZS.js → chunk-UVHSMANV.js} +53 -61
- package/dist/{chunk-RQHXYL77.js → chunk-V7WCTXEH.js} +5 -7
- package/dist/{chunk-HEMWBHQS.js → chunk-VUWR5YLE.js} +13 -13
- package/dist/{chunk-O6PWEJUV.js → chunk-VXHXSGPU.js} +8 -8
- package/dist/chunk-VYJYDMY6.js +9 -0
- package/dist/{chunk-C4TZP5PQ.js → chunk-WS2X5BB2.js} +5 -5
- package/dist/{chunk-P5JF3U65.js → chunk-WS4BA75E.js} +37 -4
- package/dist/{chunk-HUEFVPYW.js → chunk-WXKSB2N3.js} +3 -3
- package/dist/{chunk-DFCYAEBE.js → chunk-XLP4CNSF.js} +3 -3
- package/dist/{chunk-OCNTMJSY.js → chunk-XPSDDTUZ.js} +3 -3
- package/dist/{chunk-OBRMA2VK.js → chunk-XY4OBD26.js} +3 -3
- package/dist/{chunk-XVOODRNK.js → chunk-Y5XAPLZS.js} +4 -4
- package/dist/{chunk-ZISPEBNM.js → chunk-YCKKL5PD.js} +60 -55
- package/dist/{chunk-XM56DAM7.js → chunk-YR3MNGWZ.js} +8 -8
- package/dist/{chunk-WQZCFVAD.js → chunk-ZC6H2ERE.js} +5 -5
- package/dist/{chunk-UDCKYLBW.js → chunk-ZDVVIJPU.js} +4 -4
- package/dist/{chunk-ENAUSLMP.js → chunk-ZF2CBXT5.js} +3 -3
- package/dist/{chunk-AUYXBKGR.js → chunk-ZOHEHIFS.js} +2 -2
- package/dist/{chunk-3RZ4UJWV.js → chunk-ZPJXWMHK.js} +4 -4
- package/dist/{chunk-A3CT26GX.js → chunk-ZRXDPCMN.js} +2 -2
- package/dist/{chunk-RAGFXELQ.js → chunk-ZYECXDVV.js} +5 -5
- package/dist/cli.js +45 -44
- package/dist/{codegen-command-BAFON45M.js → codegen-command-RDD4GL35.js} +63 -62
- package/dist/codegen.js +2 -2
- package/dist/{commands-IFRAGWGK.js → commands-5ILSWDSV.js} +2 -2
- package/dist/{completion-RTXCODHS.js → completion-UNKBVVDT.js} +2 -2
- package/dist/{config-EHFXNFSP.js → config-NTOASFCA.js} +3 -3
- package/dist/{deploy-command-JW7R3BPW.js → deploy-command-BYAZZF37.js} +52 -51
- package/dist/{deploy-source-ZUPLAL7L.js → deploy-source-QCPZWNJO.js} +27 -26
- package/dist/{dev-env-sync-W7OTV7OD.js → dev-env-sync-6MHK3UHC.js} +46 -45
- package/dist/{display-name-hint-BKPMISQU.js → display-name-hint-MYXCCAOP.js} +10 -10
- package/dist/{env-example-refresh-TS7WBVZQ.js → env-example-refresh-MQWHY7ZS.js} +64 -63
- package/dist/{env-pull-command-5IYXQ2WK.js → env-pull-command-KUIEKBTM.js} +42 -41
- package/dist/{env-target-TQBPLU2S.js → env-target-Y77RLRS5.js} +9 -9
- package/dist/{env-var-command-AKCWYZPB.js → env-var-command-BZWJD75C.js} +37 -36
- package/dist/{ephemeral-CART6DIR.js → ephemeral-VLPRDNEJ.js} +8 -8
- package/dist/{ephemeral-command-SJYH6XRS.js → ephemeral-command-SYKDPALW.js} +43 -42
- package/dist/{ephemeral-state-HPKSKC4Y.js → ephemeral-state-RUOU2GFS.js} +7 -7
- package/dist/{generate-command-FSCFZPOJ.js → generate-command-CSQDQZSW.js} +68 -67
- package/dist/{gitignore-6IJ66XME.js → gitignore-OQGYM7DO.js} +15 -14
- package/dist/{guards-RU4C7TFG.js → guards-JUYBDLZY.js} +6 -6
- package/dist/{impersonate-command-IH4HMSS3.js → impersonate-command-HSFCZBV6.js} +33 -32
- package/dist/{import-RUBCGLCA.js → import-T4ZTOTBT.js} +4 -4
- package/dist/index.d.ts +105 -109
- package/dist/index.js +11 -11
- package/dist/{init-command-STB4YSAK.js → init-command-6Z7QNVDY.js} +50 -51
- package/dist/{init-modules-YIZYPCMM.js → init-modules-BL2SR5RK.js} +7 -7
- package/dist/{init-web-OGKACAOC.js → init-web-DYE2FEXL.js} +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +68 -62
- package/dist/{keep-data-merge-VRKS64JK.js → keep-data-merge-SHF75FC7.js} +24 -24
- package/dist/{lambda-config-reconcile-FXPDH2U5.js → lambda-config-reconcile-VOBVZPWS.js} +3 -3
- package/dist/{landing-record-5EFK7RI6.js → landing-record-7EOLEKH3.js} +17 -16
- package/dist/{live-diff-HARRGFV4.js → live-diff-M2OLXKM6.js} +6 -6
- package/dist/{local-engine-choice-TRTEJVMV.js → local-engine-choice-TOC3UYZZ.js} +30 -29
- package/dist/{local-engine-command-2FK2PE2P.js → local-engine-command-6KSRDZBR.js} +35 -34
- package/dist/{local-engine-deploy-ZZVHBI2X.js → local-engine-deploy-4N4NFZ4T.js} +11 -11
- package/dist/{local-engine-lookup-QFRKO35F.js → local-engine-lookup-AQTUGSBT.js} +2 -2
- package/dist/{local-engine-mcp-bridge-T2EFRRAF.js → local-engine-mcp-bridge-AMYRH4SY.js} +9 -9
- package/dist/{local-engine-mcp-command-FB7EOGG6.js → local-engine-mcp-command-XTP3EATV.js} +41 -48
- package/dist/{local-engine-process-XH35DURU.js → local-engine-process-OD5OSWDG.js} +6 -6
- package/dist/{local-engine-update-check-HAXE7BVG.js → local-engine-update-check-G3YCBXRE.js} +4 -4
- package/dist/{lock-commands-7PBZIRWR.js → lock-commands-437P6BHY.js} +50 -49
- package/dist/{login-command-2O6GRMTH.js → login-command-BNRDAVFV.js} +23 -22
- package/dist/{logout-command-RZXGW3O2.js → logout-command-FCGCHB7Y.js} +13 -12
- package/dist/{loop-QHZD37KX.js → loop-WOAEXMTC.js} +6 -6
- package/dist/{marketplace-command-NCMLGIMS.js → marketplace-command-SUBJZPJV.js} +33 -33
- package/dist/{marketplace-resolve-HPCRNV5O.js → marketplace-resolve-JR4BBJ6K.js} +5 -5
- package/dist/{meta-client-DYYM5F5G.js → meta-client-AYJS3RQ3.js} +10 -10
- package/dist/{module-manifest-EFE6JBZW.js → module-manifest-63I5GRK4.js} +3 -3
- package/dist/node.d.ts +2 -2
- package/dist/node.js +50 -49
- package/dist/{operation-outcome-SHNROAFA.js → operation-outcome-ORQPVJKB.js} +19 -19
- package/dist/{output-target-PSSR3E4N.js → output-target-KNHHNDM3.js} +16 -15
- package/dist/{plan-disclosure-WEMB5ZJ2.js → plan-disclosure-4DUFRGCP.js} +16 -16
- package/dist/{plugin-contributions-U5PAZKBE.js → plugin-contributions-YYEP7IWH.js} +4 -4
- package/dist/{plugin-prompt-O5PAMV5B.js → plugin-prompt-GKCQKNYI.js} +4 -4
- package/dist/{plugin-questions-ZVYNKDRB.js → plugin-questions-P7MA3TYI.js} +3 -3
- package/dist/{preflight-command-6F7JF3YQ.js → preflight-command-32GFVKSN.js} +56 -55
- package/dist/{profile-command-5AOGD6GV.js → profile-command-U2XTKOMF.js} +24 -23
- package/dist/{profile-pointer-VTOZDBHM.js → profile-pointer-JJ7K5O2R.js} +3 -3
- package/dist/{project-dependency-EZNTHMWI.js → project-dependency-X3KCWBK5.js} +6 -6
- package/dist/{project-sdk-ZGJM4WYQ.js → project-sdk-YHJZRCNB.js} +3 -3
- package/dist/promote-command-OO56IZBT.js +148 -0
- package/dist/{prompt-F7UVH4GP.js → prompt-QNMJIWNI.js} +3 -3
- package/dist/{publish-command-6VVSJPLI.js → publish-command-5ZVZ6IYT.js} +55 -54
- package/dist/{pull-command-GE2WUEUF.js → pull-command-LT5PCEIW.js} +66 -65
- package/dist/{pull-superseded-77UZ7CHH.js → pull-superseded-6HADGGC5.js} +3 -3
- package/dist/{release-command-55RTR674.js → release-command-RBUOXIH7.js} +60 -59
- package/dist/{release-ns-command-5XPZ2B6N.js → release-ns-command-LDN5DOKQ.js} +78 -77
- package/dist/{retry-command-S5QALD5Z.js → retry-command-LFZYEVRU.js} +7 -7
- package/dist/{routes-manifest-ET2TTSCL.js → routes-manifest-BMAOL6WN.js} +6 -6
- package/dist/{routes-manifest-file-42FTJHRY.js → routes-manifest-file-MPOVKD6N.js} +9 -9
- package/dist/scaffold.d.ts +0 -5
- package/dist/scaffold.js +2 -2
- package/dist/{secrets-file-N5IF265R.js → secrets-file-7QM3ORGX.js} +15 -14
- package/dist/{secrets-fill-command-35WKBURT.js → secrets-fill-command-OZ537VOD.js} +49 -48
- package/dist/{seed-5YLQRT2D.js → seed-ATGBOEJP.js} +6 -6
- package/dist/{source-resolve-JXGOVJD3.js → source-resolve-QYSWA3QR.js} +17 -17
- package/dist/{static-host-TQP3FXPI.js → static-host-MO4VDHL7.js} +4 -4
- package/dist/{status-command-G3DFRMU7.js → status-command-IEB4K7ME.js} +60 -34
- package/dist/{store-ZE5BXCOW.js → store-AJX4MC7Y.js} +5 -5
- package/dist/{store-BM7SQcUt.d.ts → store-DspGMsFY.d.ts} +112 -118
- package/dist/{sync-baseline-JGAAOS25.js → sync-baseline-IB7MABZO.js} +7 -7
- package/dist/{sync-contributions-7T4CSPVQ.js → sync-contributions-DLV5JZUK.js} +8 -8
- package/dist/{sync-record-ILWS44DG.js → sync-record-NE62ERA3.js} +9 -9
- package/dist/{table-V3LTQUY6.js → table-TFD4ZQXA.js} +8 -8
- package/dist/{tables-command-7NUOZBHX.js → tables-command-IMCVPUFY.js} +35 -34
- package/dist/{tenant-7WUS7Q6V.js → tenant-IIYECNWO.js} +9 -9
- package/dist/{tenant-command-JGEHRKN7.js → tenant-command-77KG76MU.js} +83 -82
- package/dist/{test-command-2LNEA6GK.js → test-command-NSPU4RUO.js} +32 -31
- package/dist/{tests-ENFUACKD.js → tests-JWQRHFCT.js} +5 -5
- package/dist/{token-DWNH44NW.js → token-BDHD7GU3.js} +9 -8
- package/dist/{toolchain-hooks-QIFGPGH2.js → toolchain-hooks-QHJRDCRW.js} +8 -8
- package/dist/{toolchain-modules-F4DUMWTO.js → toolchain-modules-LY7BMYG6.js} +4 -4
- package/dist/{toolchain-peers-K44IINPG.js → toolchain-peers-FQJBTKEB.js} +7 -7
- package/dist/{tracked-backend-ZFXVLBBJ.js → tracked-backend-BIR7YJCE.js} +30 -29
- package/dist/{update-check-KBHT63GJ.js → update-check-JDARCXAX.js} +48 -47
- package/dist/{upgrade-command-CI543AZP.js → upgrade-command-YCADQCIA.js} +51 -50
- package/dist/{whoami-command-77DXENWD.js → whoami-command-IZCTUPM4.js} +12 -11
- package/dist/{workspace-RI5C77BZ.js → workspace-TK52V7WO.js} +4 -4
- package/dist/{workspace-binding-PR57NBGH.js → workspace-binding-3UT6PP4B.js} +11 -10
- package/dist/{workspace-command-6HHVFQKW.js → workspace-command-46OCB6XT.js} +79 -78
- package/dist/{workspace-env-2APJEASO.js → workspace-env-PVPOWFNZ.js} +12 -11
- package/dist/{workspace-export-GHMUSX2P.js → workspace-export-PUEXKZNS.js} +4 -4
- package/dist/{writable-Y6CE2CGK.js → writable-LMMG4AFZ.js} +3 -3
- package/dist/{xano-2A2GT7EH.js → xano-EOUVXNQX.js} +7 -7
- package/dist/{xanosdk-import-HBQH3ZBS.js → xanosdk-import-XXJT365U.js} +5 -5
- package/dist/{xanosdk-project-W45IR3Q7.js → xanosdk-project-CJKRLQ6U.js} +13 -12
- package/guides/README.md +3 -3
- package/guides/authoring.md +11 -11
- package/guides/bundle.md +2 -2
- package/guides/cli.md +179 -176
- package/guides/codegen.md +17 -17
- package/guides/codes.md +3 -3
- package/guides/coverage.md +2 -2
- package/guides/deploying.md +123 -123
- package/guides/environment.md +30 -30
- package/guides/marketplace.md +24 -24
- package/guides/module-contract.md +9 -9
- package/guides/object-kinds.md +4 -4
- package/guides/project-structure.md +4 -4
- package/guides/scaffold.md +22 -22
- package/guides/typed-frontend.md +3 -3
- package/llms/client.md +4 -4
- package/llms/errors.md +2 -2
- package/llms/fields.md +1 -1
- package/llms/kinds-agent-mcp.md +1 -1
- package/llms/kinds-realtime.md +2 -2
- package/llms/lock.md +3 -3
- package/llms/statements-calls.md +1 -1
- package/llms/statements-catalog.md +57 -57
- package/llms/statements-runtime.md +2 -2
- package/llms/tests.md +3 -3
- package/llms/toolchain.md +2 -2
- package/llms-full.txt +113 -110
- package/llms.txt +35 -32
- package/manifest.json +82 -152
- package/package.json +1 -1
- package/skills/xano-backend/SKILL.md +7 -7
- package/dist/promote-command-O2NRRFLK.js +0 -147
package/guides/typed-frontend.md
CHANGED
|
@@ -179,7 +179,7 @@ is paid by importing any def at all.
|
|
|
179
179
|
almost no bundle cost:
|
|
180
180
|
|
|
181
181
|
```bash
|
|
182
|
-
|
|
182
|
+
npx @xano/sdk routes ./xano/index.ts --emit xano/routes.gen.ts
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
The emitted file is plain data plus one interpolator and imports nothing at all — the same
|
|
@@ -249,7 +249,7 @@ import { mcpUrl } from "../xano/routes.gen";
|
|
|
249
249
|
const connectUrl = mcpUrl("notes_mcp", XANO_HOST); // https://host/x2/mcp/<canonical>/mcp/stream
|
|
250
250
|
```
|
|
251
251
|
|
|
252
|
-
Run `
|
|
252
|
+
Run `npx @xano/sdk routes ./xano/index.ts` without `--emit` to see every address the file carries:
|
|
253
253
|
each route in its `api:<canonical>/<name>` form, and each socket, channel and MCP server with
|
|
254
254
|
the call that builds it.
|
|
255
255
|
|
|
@@ -284,7 +284,7 @@ manifest types it as the linked table's columns, which is what the server accept
|
|
|
284
284
|
type them with `InferResponse` on an `import type` of the def.
|
|
285
285
|
|
|
286
286
|
These are types, so they add nothing to a bundle. For runtime validation, install
|
|
287
|
-
`@xano-sdk/zod` (`npx
|
|
287
|
+
`@xano-sdk/zod` (`npx @xano/sdk marketplace install zod`): it writes `ROUTE_SCHEMAS`,
|
|
288
288
|
`CHANNEL_SCHEMAS` and `MESSAGE_SCHEMAS` into the same file under the same keys
|
|
289
289
|
(`ROUTE_SCHEMAS["POST listings"].parse(body)`), each checked against its type when you
|
|
290
290
|
typecheck, so a schema cannot drift from the type it validates. The file then imports `zod`,
|
package/llms/client.md
CHANGED
|
@@ -11,7 +11,7 @@ Importing a def into a browser bundle or a Node script — for `getPath()`, `get
|
|
|
11
11
|
⚠ A FLOOR — **~267 kB minified (~65 kB gzipped)** for the FIRST def; splitting modules
|
|
12
12
|
never removes it. The floor is the RUNTIME, not the def: a second or much richer def
|
|
13
13
|
adds ~2 kB, so trimming a def does not shrink it.
|
|
14
|
-
Fix: `
|
|
14
|
+
Fix: `npx @xano/sdk routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) — verbs, paths, and sockets as
|
|
15
15
|
plain data importing NOTHING, still compile-checked: `routePath("GET blog/{slug}", { slug })`
|
|
16
16
|
`channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base
|
|
17
17
|
URLs lifted to `wss://h/ws/<tenant>:<canonical>`), `mcpUrl("notes_mcp", baseUrl)` (an MCP
|
|
@@ -23,7 +23,7 @@ Importing a def into a browser bundle or a Node script — for `getPath()`, `get
|
|
|
23
23
|
keep `InferInput` in code that already imports defs. They match `InferInput`, except a
|
|
24
24
|
`dbLink` input appears as the linked table's columns (what the server accepts). Responses
|
|
25
25
|
are not in the file: `InferResponse` on an `import type` of the def.
|
|
26
|
-
Runtime validation: `
|
|
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
29
|
- **Verifying a def outside a bundler.** Inside a bundler (Vite/webpack) importing a
|
|
@@ -34,7 +34,7 @@ Importing a def into a browser bundle or a Node script — for `getPath()`, `get
|
|
|
34
34
|
xanosdk CLI's own loader resolves). Running from outside the project root also breaks
|
|
35
35
|
the `@xano/sdk` specifier resolution.
|
|
36
36
|
|
|
37
|
-
**Reading the injected backend URL.** `
|
|
37
|
+
**Reading the injected backend URL.** `npx @xano/sdk deploy <entry> --static <dir>` writes the deployed env's URL
|
|
38
38
|
into every html document: a prerendered build serves a different one per
|
|
39
39
|
route, and a route without the global renders fine while every call goes to the wrong
|
|
40
40
|
origin. Read it at runtime with a build-time fallback:
|
|
@@ -49,7 +49,7 @@ host falls back to '', and every call 404s off the dev server.
|
|
|
49
49
|
⚠ It is INJECTED in bracket form — `window["XANO_HOST"]="…"` — so verifying a deploy
|
|
50
50
|
by grepping `window.XANO_HOST` matches nothing and reads as a failed inject. Grep the
|
|
51
51
|
bare `XANO_HOST` token.
|
|
52
|
-
**Frontend without the backend.** `
|
|
52
|
+
**Frontend without the backend.** `npx @xano/sdk publish <dir> [--to <backend>]` uploads an
|
|
53
53
|
already-built directory and nothing else — no compile, no import (scaffold script
|
|
54
54
|
`npm run xano:deploy:frontend`). A Xano Engine (`--to local`, or bare after a local
|
|
55
55
|
deploy) serves it, server half included, at `http://<prefix>.localhost:<port>`.
|
package/llms/errors.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
- `ERR_PACKAGE_PATH_NOT_EXPORTED` — `tsx -e "import …"`, or running from outside the project root; run a real file with `tsx <file.ts>` from the root. `llms/client.md`.
|
|
38
38
|
- `Missing statement: mvp:placeholder` on import — an unconfigured slot in a pulled tree; replace it with the statement it stands in for. `llms/legacy.md`.
|
|
39
39
|
- A CLI command fails under `--json` or piped (unless stdout carries data): stdout is `{ ok: false, error: { code, message, exitCode, details?, suggestion? } }`, as does a failed release write. Codes: `SDK_SEED_IN_STATIC` (`details.leaks[]` → `publicSeed`), `SDK_EXPORT_INVALID` (`details.diagnostics[]`, `--strict` too), `SDK_DRIFT`, `SDK_BRANCH_TAKEN`, `SDK_BRANCH_LIVE`, `SDK_RELEASE_NAME_TAKEN`, `SDK_RELEASE_FILES_NOT_CARRIED`, `SDK_LIVE_BRANCH_MISMATCH` (`details.conflictsWith`), `SDK_IDENTITY_CONFLICT`, `SDK_KIND_CONFLICT`, `SDK_PRUNE_OUT_OF_SCOPE`, `SDK_IMPORT_REFUSED`, `SDK_SHARED_SCHEMA_CHANGE`, `SDK_CONSTRAINT_VIOLATION`, `SDK_CREDENTIAL_REJECTED` (`details`: `{ profile, credentialType, instance, workspaceId, signIn }`; ids null on a refused env refresh), `SDK_WORKSPACE_CHANGED` (deploy over objects edited in Xano since the last sync; `details.objects`; pull first or `--overwrite`), `SDK_USAGE` (`details.reason: "needs-confirmation"`: run its `Re-run as`), `SDK_ERROR`. Landing refusal `details.refused`: identityConflict, renamePending, kindConflict, uniqueViolation, tableTrigger, importInProgress, importRefused, pruneOutOfScope. `warnings[]` / `details.warnings` / `accepted[]` entries: `{ code, message, subject? }` (`subject`: the def's `{ kind, name }`). Backend documents add `selector` and `workspaceId`.
|
|
40
|
-
- A CLI command reports `could not reach <url>: fetch failed (<code>)` — blocked egress, not a bad credential; fix it before `
|
|
40
|
+
- A CLI command reports `could not reach <url>: fetch failed (<code>)` — blocked egress, not a bad credential; fix it before `npx @xano/sdk login`, which rotates a single-use refresh token.
|
|
41
41
|
|
|
42
42
|
### CLI exit codes
|
|
43
43
|
|
|
@@ -52,7 +52,7 @@ A failure document's `exitCode` matches.
|
|
|
52
52
|
| 4 | `deploy --require-microservices`: a microservice was not ready in time. The backend landed. | Check the microservice. |
|
|
53
53
|
| 5 | `test` / `deploy --test`: the suite ran and a test failed. A deploy is not retracted. | Fix the test or the code. |
|
|
54
54
|
| 6 | `test`, `deploy --test`: the suite could not be reached. | Check the backend; rerun. |
|
|
55
|
-
| 7 | `upgrade --check`: an upgrade is available. | `
|
|
55
|
+
| 7 | `upgrade --check`: an upgrade is available. | `npx @xano/sdk upgrade`. |
|
|
56
56
|
| 8 | A named backend could not be addressed (or a named release, profile, branch, test, module, lock entry, `--seed` guid or Xano Engine version is missing): gone, expired, unreachable, a stopped Xano Engine, or a busy import. | Retry, or redeploy. |
|
|
57
57
|
| 9 | A write whose outcome is unknown, Ctrl-C during a write included. | Read the target's state before retrying. |
|
|
58
58
|
| 130 | Ctrl-C outside a write or install. | — |
|
package/llms/fields.md
CHANGED
|
@@ -51,7 +51,7 @@ typed against the table's schema as a WRITE shape (a column without
|
|
|
51
51
|
(`seed: seedFile("./seed.json", import.meta.url)`; path resolves against the DECLARING
|
|
52
52
|
file), or a thunk (`seed: () => import("./seed.json")`, async ok, `.default` unwrapped).
|
|
53
53
|
Inline rows are TYPED against the schema at compile time; a `seedFile`/thunk seed is
|
|
54
|
-
not — `
|
|
54
|
+
not — `npx @xano/sdk export`/`deploy` validates it, naming the row index and column.
|
|
55
55
|
Timestamp seeds: epoch ms, `Date`, ISO 8601 date, or date-time with `Z`/offset; else THROWS.
|
|
56
56
|
Int seeds: whole, in int64 (past 2^53: a string).
|
|
57
57
|
⚠ Prefer `seedFile` for a file: a thunk's `import()` sits in
|
package/llms/kinds-agent-mcp.md
CHANGED
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
- `tools?`: same `ToolsetToolEntry[]` as `mcpServer` — bare `tool()` handles, or a `{ tool, enabled?, auth? }` wrapper when one needs `enabled`/`auth`. A tool reading `auth()` MUST use the wrapper naming the auth table — a bare handle runs it with no caller (see `mcpServer`'s `tools?`).
|
|
30
30
|
- `output?`: `{ schema: Record<string, input.*>, enabled? }` — structured-output schema. `schema` is a named-field record authored with the `input.*` catalog, exactly like a `defineFunction`/`query` `input:` map (the stored `structuredOutputsSchema` is the same wire shape as function inputs). e.g. `output: { schema: { priority: input.enum(["low","high"]), summary: input.text() } }`. When you pass the agent *handle* to `s.ai.agent.run({ agent })`, `.result` is typed straight from this schema — no `resultShape` witness needed (the shape is declared once). `resultShape` remains only to override that, or to type an agent referenced by bare name.
|
|
31
31
|
- **Run + read recipe (`s.ai.agent.run`):** bind the run to a var (`s.ai.agent.run({ agent, args, allowToolExecution: c.bool(true), as: "run" })`) — it produces a rich envelope, and the completion is at **`.result`**. Read one structured field with a dotted ref (`response: ref("run.result.priority")`) or the whole completion (`ref("run.result")`, typed from `output.schema`); persist it in a later step the same way (`s.set_var("summary", ref("run.result.summary"))`). `args` is a plain object of run inputs (`{ topic: inp("topic") }` — raw literals are fine, e.g. `{ max_steps: 3 }`) surfaced to the agent as `{{ $args.topic }}`. `.toolCalls` is the FINAL step's calls only (often `[]`); every call is a `.steps[].content[]` entry of `type: "tool-call"`. ⚠ An agent with tools needs `allowToolExecution: c.bool(true)` on the run: unset, its tools are OFF and it answers without them (warns `stack.agent-tools-off`).
|
|
32
|
-
- **Marketplace:** for chat history, use `@xano-sdk/chatbot`; for vector RAG, use `@xano-sdk/vector` (`tools: [vector.searchTool]`). Find add-ons with `
|
|
32
|
+
- **Marketplace:** for chat history, use `@xano-sdk/chatbot`; for vector RAG, use `@xano-sdk/vector` (`tools: [vector.searchTool]`). Find add-ons with `npx @xano/sdk marketplace search <q>`.
|
|
33
33
|
- Both kinds persist under the `toolset` payload key, so a same-name `agent` + `mcpServer` pair derives ONE guid and `export()` throws — give them distinct names.
|
package/llms/kinds-realtime.md
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
- ⚠ FAIL-SOFT — a missing/disabled server or dead bus is swallowed engine-side, so a mis-targeted publish is SILENT with no result to check.
|
|
36
36
|
- `authTable`/`authId` are ASSERTED attribution on the frame — not a credential, nothing validates them.
|
|
37
37
|
- **Client recipe (derive, never hardcode):**
|
|
38
|
-
- `server.getUrl(baseUrl)` → `wss://<host>/ws/<canonical>` — accepts the `https://…` instance base URL and normalizes the scheme. `channel.getChannel({ room_id: 42 })` → `"rooms/42"`, the path that goes in a frame's `channel` field. Both throw rather than guess. A canonical is minted by `
|
|
38
|
+
- `server.getUrl(baseUrl)` → `wss://<host>/ws/<canonical>` — accepts the `https://…` instance base URL and normalizes the scheme. `channel.getChannel({ room_id: 42 })` → `"rooms/42"`, the path that goes in a frame's `channel` field. Both throw rather than guess. A canonical is minted by `npx @xano/sdk export <entry> --lock`.
|
|
39
39
|
- Auth is a bearer token passed as the websocket SUBPROTOCOL: `new WebSocket(url, token)`. No token = an anonymous client, admitted only where `anonymousClients: true`.
|
|
40
40
|
- Frames are JSON `{ action: "join"|"leave"|"broadcast"|"ack"|"ping"|"presence", channel, type?, payload?, options?, id? }`. `broadcast` REQUIRES `type`: a `realtimeMessage` of that channel, else refused `Unknown message type`. You must `join` before you may `broadcast`, and the server's context is ready only a moment after `open` — an immediate first frame is refused.
|
|
41
41
|
- `options` is `{ to?, client_id?, channel? }` — `to: { dbo_id, row_id }` makes the frame a direct message (needs `publish.direct`), `client_id` is the at-least-once cursor handle, and `options.channel` WINS over a top-level `channel`.
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
- **Tenant instances (isolated DB):** a tenant's realtime objects live in the TENANT's database, so BOTH halves of a client must name the tenant.
|
|
48
48
|
- Socket: `server.getUrl(base, { tenant })` → `/ws/<tenant>:<canonical>`. ⚠ A bare canonical on a tenant host resolves against the INSTANCE workspace instead.
|
|
49
49
|
- That colon form is PECULIAR TO THE SOCKET. Every other tenant URL gives the tenant its OWN segment — the HTTP half of the same client is `https://<host>/tenant/<tenant>/api:<canonical>/…`. NO request header is required for either.
|
|
50
|
-
- Because the shapes differ, `getUrl` TRANSLATES a tenant base URL instead of concatenating: pass the `https://<host>/tenant/<name>` that `
|
|
50
|
+
- Because the shapes differ, `getUrl` TRANSLATES a tenant base URL instead of concatenating: pass the `https://<host>/tenant/<name>` that `npx @xano/sdk status` prints (and that deploy injects as `window.XANO_HOST`) and the tenant is LIFTED into the socket form. So `getUrl(window.XANO_HOST)` needs no `{ tenant }`, and a CONFLICTING `{ tenant }` alongside it throws.
|
|
51
51
|
- ⚠ `getUrl`/`socketUrl` are NOT idempotent — a `baseUrl` that already carries a `/ws/<…>` path THROWS. Resolve ONCE from the http(s) base; never feed a result back in.
|
|
52
52
|
- Still pass `{ tenant }` explicitly for a tenant on its OWN DOMAIN — the hostname carries it for HTTP, but there is nothing in the URL for the socket to lift.
|
|
53
53
|
- ⚠ Tokens are tenant-scoped (audience `<tenant>:<license>`, not the bare license), so one minted through the instance workspace is REJECTED by a tenant's realtime server — authenticate and dial through the same tenant.
|
package/llms/lock.md
CHANGED
|
@@ -8,13 +8,13 @@ verb, name)`). Committed. A composed entry is keyed by that identity —
|
|
|
8
8
|
`query:<group>|<verb>|<name>`, `channel:<server>|<path>`, `message:<server>|<path>|<name>`
|
|
9
9
|
— its guid's seed; a legacy `query:<name>` is migrated by the next locked export.
|
|
10
10
|
|
|
11
|
-
- `
|
|
11
|
+
- `npx @xano/sdk lock rename <kind> <old> <new>` — `kind` is the SDK kind (`table`, `apiGroup`) or stored key (`dbo`).
|
|
12
12
|
Run it when `export` names it after a rename in code (it prints the command); the next export emits the original guid under the new name.
|
|
13
13
|
Reads the `index.ts` beside the lock (or `--entry`); refused while `<old>` is still exported. Composed names go in full; renaming a parent moves them.
|
|
14
|
-
- `
|
|
14
|
+
- `npx @xano/sdk lock prune <entry-file> [keys…] --yes` — drops orphaned entries. Finding orphans
|
|
15
15
|
RUNS the entry's module scope (env assertions included); `--identity-only --yes <key>…`
|
|
16
16
|
prunes named keys (`table:users`) with no evaluation and no orphan check.
|
|
17
|
-
- `
|
|
17
|
+
- `npx @xano/sdk lock import <live-bundle.json> [--yes]` — seed the lock from a `workspace export`
|
|
18
18
|
to take over an existing workspace (a compiled bundle is refused).
|
|
19
19
|
- Every lock subcommand accepts `--lock=<path>`; from outside the lock's directory pass it.
|
|
20
20
|
- Merge conflict: keep both sides; two keys on one guid → `lock rename` onto the kept
|
package/llms/statements-calls.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Auth & calls:
|
|
6
6
|
|
|
7
7
|
- `s.security.create_auth_token({ table, id, extras?, expiration?, as? })` — `extras` defaults to `{}`, `expiration` (seconds, a `Value`: `c.int(3600)`) to 86400 (`c.int(0)` = never).
|
|
8
|
-
- **Marketplace first:** `@xano-sdk/auth` registers a complete auth surface — signup/login/me endpoints plus their `user`/`account`/`event_log` tables — via `registerAuth(ws, { canonical: "authn" })`. Authentication only, not authorization. Inspect with `
|
|
8
|
+
- **Marketplace first:** `@xano-sdk/auth` registers a complete auth surface — signup/login/me endpoints plus their `user`/`account`/`event_log` tables — via `registerAuth(ws, { canonical: "authn" })`. Authentication only, not authorization. Inspect with `npx @xano/sdk marketplace details @xano-sdk/auth --prompt`.
|
|
9
9
|
- **The auth loop end to end** — what that module implements; author it directly for a custom flow. An auth TABLE (`table({ auth: true })`) backs identity; a PUBLIC login query verifies and mints a token; every protected query names that table as `auth:` and reads the caller with `auth(...)`.
|
|
10
10
|
- Signup: `s.db.add({ table: users, row: { email: inp("email"), password: inp("password") } })` — the `f.password()` column hashes on write; take the submission as `input.text()` on signup AND login (see Gotchas on double-hashing).
|
|
11
11
|
- Login: `s.db.get({ table: users, fieldName: "email", fieldValue: inp("email"), output: ["id", "password"], as: "u" })` — the `output` naming `password` is REQUIRED (the column is `access: "internal"` and absent from the row otherwise) → `s.precondition({ expr: expr(ref("u", { safe: true }), "!=", c.null()), error: c.text("No such user."), error_type: "notfound" })` → `s.security.check_password({ text_password: inp("password"), hash_password: ref("u.password"), as: "ok" })` → precondition on `ok` → `s.security.create_auth_token({ table: users, id: ref("u.id"), as: "token" })` → `response: { token: ref("token") }`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
`s.throw` raises a named error `s.try_catch` catches; uncaught, it answers HTTP 200 `{ payload, statement: "Throw Error" }` (`s.precondition` sets a status). Inside `s.db.transaction` a throw or failed precondition rolls it back.
|
|
8
8
|
|
|
9
|
-
- `s.await({ as?: string; ids?: value; timeout?: value })`
|
|
9
|
+
- `s.await({ as?: string; ids?: value; timeout?: value; terminate?: value })`
|
|
10
10
|
- `s.foreach_break` [special]
|
|
11
11
|
- `s.comment` [special]
|
|
12
12
|
- `s.conditional` [special]
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- `s.foreach` [special]
|
|
17
17
|
- `s.group` [special]
|
|
18
18
|
- `s.lambda({ as?: string; code: value; timeout?: value })`
|
|
19
|
-
- `s.precondition({ expr
|
|
19
|
+
- `s.precondition({ expr: comparison; error_type?: "standard" | "notfound" | "toomanyrequests" | "accessdenied" | "unauthorized" | "badrequest" | "inputerror"; error?: value; payload?: value })`
|
|
20
20
|
- `s.return` [special]
|
|
21
21
|
- `s.switch` [special]
|
|
22
22
|
- `s.throw({ name?: string; value: value })`
|
|
@@ -49,23 +49,23 @@
|
|
|
49
49
|
|
|
50
50
|
### array
|
|
51
51
|
|
|
52
|
-
- `s.array.difference({ as?: string; expr
|
|
53
|
-
- `s.array.every({ expr
|
|
54
|
-
- `s.array.filter_count({ expr
|
|
55
|
-
- `s.array.filter({ expr
|
|
56
|
-
- `s.array.find_index({ expr
|
|
57
|
-
- `s.array.find({ expr
|
|
58
|
-
- `s.array.group_by({ as?: string; expr
|
|
59
|
-
- `s.array.has({ expr
|
|
60
|
-
- `s.array.intersection({ as?: string; expr
|
|
52
|
+
- `s.array.difference({ as?: string; expr: value; value: value; by?: value })`
|
|
53
|
+
- `s.array.every({ expr: value; as?: string; if: comparison })` [output] → as: boolean
|
|
54
|
+
- `s.array.filter_count({ expr: value; as?: string; if: comparison })`
|
|
55
|
+
- `s.array.filter({ expr: value; as?: string; if: comparison })`
|
|
56
|
+
- `s.array.find_index({ expr: value; as?: string; if: comparison })`
|
|
57
|
+
- `s.array.find({ expr: value; as?: string; if: comparison })` [output]
|
|
58
|
+
- `s.array.group_by({ as?: string; expr: value; by?: value })`
|
|
59
|
+
- `s.array.has({ expr: value; as?: string; if: comparison })`
|
|
60
|
+
- `s.array.intersection({ as?: string; expr: value; value: value; by?: value })`
|
|
61
61
|
- `s.array.map` [special]
|
|
62
|
-
- `s.array.merge({ name
|
|
63
|
-
- `s.array.partition({ expr
|
|
64
|
-
- `s.array.pop({ name
|
|
65
|
-
- `s.array.push({ name
|
|
66
|
-
- `s.array.shift({ name
|
|
62
|
+
- `s.array.merge({ name: string; value: value })` [output]
|
|
63
|
+
- `s.array.partition({ expr: value; as?: string; if: comparison })`
|
|
64
|
+
- `s.array.pop({ name: string; as?: string })` [output]
|
|
65
|
+
- `s.array.push({ name: string; value: value })` [output]
|
|
66
|
+
- `s.array.shift({ name: string; as?: string })`
|
|
67
67
|
- `s.array.union` [special]
|
|
68
|
-
- `s.array.unshift({ name
|
|
68
|
+
- `s.array.unshift({ name: string; value: value })`
|
|
69
69
|
|
|
70
70
|
### cloud
|
|
71
71
|
|
|
@@ -142,24 +142,24 @@
|
|
|
142
142
|
|
|
143
143
|
Assertions. **Put them in a `workflowTest({...})` stack** — assert on what a `.call` bound with `as`. They are NOT inert elsewhere: a failure aborts the stack, so an `s.expect.*` in a `query`/`function`/`task` fails the request with HTTP 500 and the assertion's message (`to_equal failed - expected value 2 does not equal 1`) — remove it. `to_throw` sees only an error carrying a MESSAGE, so an empty-message failure (`ERROR_CODE_ACCESS_DENIED`) reports "response is ok", and `to_be_within` EXCLUDES both bounds — `min < expr < max` — while `s.security.random_number`'s are inclusive.
|
|
144
144
|
|
|
145
|
-
- `s.expect.to_be_defined({ expr
|
|
146
|
-
- `s.expect.to_be_empty({ expr
|
|
147
|
-
- `s.expect.to_be_false({ expr
|
|
148
|
-
- `s.expect.to_be_greater_than({ expr
|
|
149
|
-
- `s.expect.to_be_in_the_future({ expr
|
|
150
|
-
- `s.expect.to_be_in_the_past({ expr
|
|
151
|
-
- `s.expect.to_be_less_than({ expr
|
|
152
|
-
- `s.expect.to_be_null({ expr
|
|
153
|
-
- `s.expect.to_be_true({ expr
|
|
154
|
-
- `s.expect.to_be_within({ expr
|
|
155
|
-
- `s.expect.to_contain({ expr
|
|
156
|
-
- `s.expect.to_end_with({ expr
|
|
157
|
-
- `s.expect.to_equal({ expr
|
|
158
|
-
- `s.expect.to_match({ expr
|
|
159
|
-
- `s.expect.to_not_be_defined({ expr
|
|
160
|
-
- `s.expect.to_not_be_null({ expr
|
|
161
|
-
- `s.expect.to_not_equal({ expr
|
|
162
|
-
- `s.expect.to_start_with({ expr
|
|
145
|
+
- `s.expect.to_be_defined({ expr: value })`
|
|
146
|
+
- `s.expect.to_be_empty({ expr: value })`
|
|
147
|
+
- `s.expect.to_be_false({ expr: value })`
|
|
148
|
+
- `s.expect.to_be_greater_than({ expr: value; value: value })`
|
|
149
|
+
- `s.expect.to_be_in_the_future({ expr: value })`
|
|
150
|
+
- `s.expect.to_be_in_the_past({ expr: value })`
|
|
151
|
+
- `s.expect.to_be_less_than({ expr: value; value: value })`
|
|
152
|
+
- `s.expect.to_be_null({ expr: value })`
|
|
153
|
+
- `s.expect.to_be_true({ expr: value })`
|
|
154
|
+
- `s.expect.to_be_within({ expr: value; min: value; max: value })`
|
|
155
|
+
- `s.expect.to_contain({ expr: value; value: value })`
|
|
156
|
+
- `s.expect.to_end_with({ expr: value; value: value })`
|
|
157
|
+
- `s.expect.to_equal({ expr: value; value: value })`
|
|
158
|
+
- `s.expect.to_match({ expr: value; value: value })`
|
|
159
|
+
- `s.expect.to_not_be_defined({ expr: value })`
|
|
160
|
+
- `s.expect.to_not_be_null({ expr: value })`
|
|
161
|
+
- `s.expect.to_not_equal({ expr: value; value: value })`
|
|
162
|
+
- `s.expect.to_start_with({ expr: value; value: value })`
|
|
163
163
|
- `s.expect.to_throw` [special]
|
|
164
164
|
|
|
165
165
|
### function
|
|
@@ -169,14 +169,14 @@ Assertions. **Put them in a `workflowTest({...})` stack** — assert on what a `
|
|
|
169
169
|
|
|
170
170
|
### math
|
|
171
171
|
|
|
172
|
-
- `s.math.add({ name
|
|
173
|
-
- `s.math.bitwise.and({ name
|
|
174
|
-
- `s.math.bitwise.or({ name
|
|
175
|
-
- `s.math.bitwise.xor({ name
|
|
176
|
-
- `s.math.div({ name
|
|
177
|
-
- `s.math.mod({ name
|
|
178
|
-
- `s.math.mul({ name
|
|
179
|
-
- `s.math.sub({ name
|
|
172
|
+
- `s.math.add({ name: string; value: value })` [output] → as: number
|
|
173
|
+
- `s.math.bitwise.and({ name: string; value: value })` [output] → as: number
|
|
174
|
+
- `s.math.bitwise.or({ name: string; value: value })` [output] → as: number
|
|
175
|
+
- `s.math.bitwise.xor({ name: string; value: value })` [output] → as: number
|
|
176
|
+
- `s.math.div({ name: string; value: value })`
|
|
177
|
+
- `s.math.mod({ name: string; value: value })`
|
|
178
|
+
- `s.math.mul({ name: string; value: value })`
|
|
179
|
+
- `s.math.sub({ name: string; value: value })`
|
|
180
180
|
|
|
181
181
|
### mcp
|
|
182
182
|
|
|
@@ -196,9 +196,9 @@ Assertions. **Put them in a `workflowTest({...})` stack** — assert on what a `
|
|
|
196
196
|
|
|
197
197
|
### object
|
|
198
198
|
|
|
199
|
-
- `s.object.entries({ as?: string; value
|
|
200
|
-
- `s.object.keys({ as?: string; value
|
|
201
|
-
- `s.object.values({ as?: string; value
|
|
199
|
+
- `s.object.entries({ as?: string; value: value })` [output] → as: [string, unknown][]
|
|
200
|
+
- `s.object.keys({ as?: string; value: value })` [output] → as: string[]
|
|
201
|
+
- `s.object.values({ as?: string; value: value })` [output] → as: unknown[]
|
|
202
202
|
|
|
203
203
|
### realtime
|
|
204
204
|
|
|
@@ -264,17 +264,17 @@ Assertions. **Put them in a `workflowTest({...})` stack** — assert on what a `
|
|
|
264
264
|
|
|
265
265
|
### text
|
|
266
266
|
|
|
267
|
-
- `s.text.append({ name
|
|
268
|
-
- `s.text.contains({ name
|
|
269
|
-
- `s.text.ends_with({ name
|
|
270
|
-
- `s.text.icontains({ name
|
|
271
|
-
- `s.text.iends_with({ name
|
|
272
|
-
- `s.text.istarts_with({ name
|
|
273
|
-
- `s.text.ltrim({ name
|
|
274
|
-
- `s.text.prepend({ name
|
|
275
|
-
- `s.text.rtrim({ name
|
|
276
|
-
- `s.text.starts_with({ name
|
|
277
|
-
- `s.text.trim({ name
|
|
267
|
+
- `s.text.append({ name: string; value: value })`
|
|
268
|
+
- `s.text.contains({ name: string; as?: string; value: value })`
|
|
269
|
+
- `s.text.ends_with({ name: string; as?: string; value: value })`
|
|
270
|
+
- `s.text.icontains({ name: string; as?: string; value: value })`
|
|
271
|
+
- `s.text.iends_with({ name: string; as?: string; value: value })`
|
|
272
|
+
- `s.text.istarts_with({ name: string; as?: string; value: value })`
|
|
273
|
+
- `s.text.ltrim({ name: string; value: value })`
|
|
274
|
+
- `s.text.prepend({ name: string; value: value })`
|
|
275
|
+
- `s.text.rtrim({ name: string; value: value })`
|
|
276
|
+
- `s.text.starts_with({ name: string; as?: string; value: value })`
|
|
277
|
+
- `s.text.trim({ name: string; value: value })`
|
|
278
278
|
|
|
279
279
|
### tool
|
|
280
280
|
|
|
@@ -60,10 +60,10 @@ Runtime behavior (what the `as:` output holds, and misses):
|
|
|
60
60
|
- Workspace-level defaults are the terminal tier: `workspaceConfig({ history: { query, function, task, tool, trigger, middleware } })` emits the flat `{objType}_enabled`/`{objType}_limit` map (no inherit flag) — setting it is wholesale (unlisted types fall back to their engine default), so declare every default you want to keep; omit the field to leave existing workspace history untouched.
|
|
61
61
|
|
|
62
62
|
- **Workspace environment variables** set a tenant's env vars through the workspace object: `workspaceConfig({ env: { STRIPE_KEY: "", APP_BASE_URL: "" } })`, passed to `registerWorkspace()` — unattached, it declares nothing. Author them as a name→value MAP, declaring each NAME with an EMPTY value. Read a var back with `env("NAME")` (→ `$env.NAME`), which compiles to tag "setting" with the plain name.
|
|
63
|
-
- Values are SECRETS and do NOT belong here: they live in `xano/.env`, which is gitignored and survives a `
|
|
63
|
+
- Values are SECRETS and do NOT belong here: they live in `xano/.env`, which is gitignored and survives a `npx @xano/sdk pull`, and every command that compiles a bundle reads it with no flag. Fill it by hand from `xano/.env.example`, or run `npx @xano/sdk env pull`. CI passes `--backend-env-file <path>` or `--env-var KEY=VALUE` instead. A compiled bundle carries the values in cleartext — don't commit one.
|
|
64
64
|
- What a deploy sends is the RESOLVED map (the declared names, then ONE file — `xano/.env`, or `--backend-env-file <path>` which REPLACES it, never both — then `--env-var`), not the literal object written here. `deploy` REPLACES the tenant's env with it, so a declared name with no value anywhere REFUSES the deploy rather than clearing the live value — fill the name in rather than putting the value back in source, and reach for `--allow-empty-env=NAME` only when clearing is what you mean.
|
|
65
65
|
|
|
66
66
|
- **Workspace documentation** gates the workspace's hosted docs: `workspaceConfig({ documentation: { require_token: true } })`. `require_token: true` IS the declaration that a token exists; the value lives in `xano/.secrets.json`, keyed by the object it gates rather than by a name, and a literal `token` FAILS the export. It is NOT a backend env var — `env()` cannot read it. Other members are carried verbatim.
|
|
67
67
|
- ⚠ OMIT the block and NO `documentation` key is emitted, leaving the target's live block as it is; the legacy `realtime` block follows the same rule. An `apiGroup`'s `documentation` follows the OPPOSITE rule — see its def shape.
|
|
68
|
-
- A declared gate with no token emits no block at all and REFUSES a `deploy`; `--allow-empty-doc-token=<scope>` clears that gate deliberately (scope = `workspace`, or an API group's NAME). `
|
|
68
|
+
- A declared gate with no token emits no block at all and REFUSES a `deploy`; `--allow-empty-doc-token=<scope>` clears that gate deliberately (scope = `workspace`, or an API group's NAME). `npx @xano/sdk pull` writes `xano/.secrets.json`, and `--no-secrets` writes none.
|
|
69
69
|
- A merge (`deploy --to`) is ADD-ONLY, matched BY NAME — it creates names the target lacks but does NOT update or remove ones it has, so the target's value wins. Two gaps: a release carries no env values, so a NEW name reads null after `promote`/`tenant deploy` until `env set` (both name it first) — and a `--replace` deploy rebuilds it so every env var the target holds that the config does not declare is DROPPED (named, and confirmed, before it runs). Omit `env` entirely to leave existing env untouched. The separate `settings` field is a plain object.
|
package/llms/tests.md
CHANGED
|
@@ -49,11 +49,11 @@ The run is isolated in ways that make a correct test fail for reasons the failur
|
|
|
49
49
|
|
|
50
50
|
### Running them
|
|
51
51
|
|
|
52
|
-
`
|
|
52
|
+
`npx @xano/sdk test run-all` runs the unit tests AND the `workflowTest()` objects an environment carries. It takes no entry file and compiles nothing: it runs what is DEPLOYED, so deploy before testing.
|
|
53
53
|
|
|
54
54
|
- `--on <backend>` picks the backend — `--on ephemeral:<name>`, `--on local`, `--on tenant:<name>`, `--on workspace`; omitted, the one this project last deployed to (grammar: **Backends** in `llms.txt`). ⚠ `workspace` runs against the REAL database: safe only while every test keeps `datasource: ""`, since a stored non-empty datasource is CLONED before the run.
|
|
55
|
-
- `
|
|
55
|
+
- `npx @xano/sdk test list` shows what is there without running it; `test run "<name>"` runs one; an ambiguous name prints qualified forms (`function:math/happy path`, `workflow:<name>`) `run` accepts.
|
|
56
56
|
- `--kind unit|workflow` narrows to one family. `--concurrency <n>` defaults to 1: tests share the environment database.
|
|
57
57
|
- A failing suite exits 5; exit 6 when the suite could not be reached — retry it; a backend that can't be looked up exits 8 (see errors). Having no tests is success.
|
|
58
58
|
- For CI: the exit code says THAT something failed, the JSON says WHICH. Progress goes to stderr; stdout carries one JSON document when not a terminal, or with `--json`. `run-all` and `run`: `{ kind, env, name, display, total, passed, failed, tests: [{ kind, name, qualified, object?, status: "pass"|"fail", message?, expectations?: [{ index, status, message? }], timing? }] }` (`message`: the first failure; `expectations`: a unit test's every expectation in order, `index` from 0; `env`: an ephemeral's or tenant's name; `name`: the backend's own, a Xano Engine's too; null if none), same keys on an empty suite. `list` is `{ kind, env, name, display, total, tests }`; `deploy --test` nests the run under `testRun`.
|
|
59
|
-
- `
|
|
59
|
+
- `npx @xano/sdk deploy ./index.ts --test` deploys and then runs the suite against what it just shipped. A failure exits 5 WITHOUT retracting the deploy — the environment is live either way.
|
package/llms/toolchain.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Toolchain modules
|
|
2
2
|
|
|
3
|
-
> Read when `package.json` has a `"xanosdk"` block or you run `
|
|
3
|
+
> Read when `package.json` has a `"xanosdk"` block or you run `npx @xano/sdk marketplace`.
|
|
4
4
|
|
|
5
5
|
**Toolchain modules** extend the CLI, not the workspace — nothing to register in
|
|
6
6
|
`xano/index.ts`. An installed one runs on `export` and `deploy` (after the compile,
|
|
@@ -25,4 +25,4 @@ the request inputs under the manifest's keys and its config, it returns `{ impor
|
|
|
25
25
|
imports as bare package names (`@xano/sdk*`, relative and `node:` are refused). A module that
|
|
26
26
|
fails to load or throws leaves its previous block as it was, with a warning naming it, and the
|
|
27
27
|
core sections still refresh; under `routes --emit --strict` it is fatal. `@xano-sdk/zod`
|
|
28
|
-
(`
|
|
28
|
+
(`npx @xano/sdk marketplace install zod`) is one: it adds `ROUTE_SCHEMAS` and its siblings.
|