@xano/sdk 1.0.14 → 1.0.16
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 +27 -0
- package/README.md +33 -37
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-3J6YRVFL.js → agent-file-refresh-DBHTEFYM.js} +12 -12
- package/dist/{agent-skill-command-VWDMQWCT.js → agent-skill-command-LHNTU7MH.js} +74 -73
- package/dist/{answer-shape-AVZSKBR6.js → answer-shape-ZRQS7ZC4.js} +5 -5
- package/dist/{backend-dir-ISP7RVF2.js → backend-dir-AXR43HNV.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-KGR52SZU.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-Z3DQ7ULY.js → chunk-23GEFHRX.js} +236 -17
- package/dist/{chunk-3H7R4ISR.js → chunk-2DUYJR5N.js} +2 -2
- package/dist/{chunk-MFWF2NZJ.js → chunk-2H5BQRHF.js} +2 -2
- package/dist/{chunk-O44MJTLR.js → chunk-35SI4GBM.js} +3 -3
- package/dist/{chunk-QKHNJ7LE.js → chunk-3ZV23FVR.js} +5 -5
- package/dist/{chunk-HKI5Y5KW.js → chunk-47XIVDJ6.js} +14 -14
- package/dist/{chunk-ICK36EGF.js → chunk-4EVDCSEY.js} +2 -2
- package/dist/{chunk-FBSGFPZ4.js → chunk-4XGZ325S.js} +3 -3
- package/dist/{chunk-EYVIUX2T.js → chunk-4XYXUK5H.js} +76 -33
- package/dist/{chunk-MAXDJZQR.js → chunk-4ZBXS7YN.js} +8 -8
- package/dist/{chunk-ZMJRAMLA.js → chunk-52QAENY6.js} +14 -14
- package/dist/{chunk-2LF734YB.js → chunk-54CJ74BH.js} +4 -4
- package/dist/{chunk-3SZ7QRYA.js → chunk-57PGTPT3.js} +8 -8
- package/dist/{chunk-IKXXTRMN.js → chunk-64UVVLDT.js} +4 -4
- package/dist/{chunk-EQXHUWUO.js → chunk-6FCAFWD5.js} +2 -2
- package/dist/{chunk-4MX5LMPQ.js → chunk-6ODQ5GDZ.js} +2 -2
- package/dist/{chunk-HK554MDD.js → chunk-74YCPI4G.js} +7 -7
- package/dist/{chunk-Y5XAPLZS.js → chunk-7UQZ7C4W.js} +4 -4
- package/dist/{chunk-CJDPSCMX.js → chunk-7ZVQIKNL.js} +3 -3
- package/dist/{chunk-RVAEPPRH.js → chunk-AICWDCLJ.js} +2 -2
- package/dist/{chunk-WS4BA75E.js → chunk-AJBOGO5U.js} +4 -4
- package/dist/{chunk-2FDHIBEU.js → chunk-AJQFUJEQ.js} +8 -8
- package/dist/{chunk-2KOB4QPW.js → chunk-C7AYP4H6.js} +29 -20
- package/dist/{chunk-XCFQLP6G.js → chunk-DJMGDCVX.js} +8 -8
- package/dist/{chunk-VBSCWV5H.js → chunk-DLD4FVRP.js} +54 -54
- 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-QX5XQEYB.js → chunk-EINZSVEU.js} +5 -5
- package/dist/{chunk-KMKUH2IO.js → chunk-EPB6FAR5.js} +5 -5
- package/dist/chunk-EUAU4QKI.js +67 -0
- package/dist/{chunk-IDOVZLPK.js → chunk-EXJ4Q5F6.js} +2 -2
- package/dist/{chunk-IHL2O7VY.js → chunk-F3JK5RIY.js} +3 -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-VIRFG3WG.js → chunk-FTFAPKCW.js} +23 -7
- package/dist/{chunk-LL6ED5IB.js → chunk-FTS42N37.js} +2 -2
- 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-JIKGT7DO.js → chunk-GE3JV5SI.js} +1 -1
- package/dist/{chunk-GCINMMFL.js → chunk-GJZMKMWO.js} +2 -2
- package/dist/{chunk-LW7TOIS7.js → chunk-GRZ62LLU.js} +8 -8
- package/dist/{chunk-6X73VFCX.js → chunk-GT7PZCTK.js} +2 -2
- package/dist/{chunk-HINRE3UM.js → chunk-HXPQXCOZ.js} +1821 -506
- package/dist/{chunk-ECQXASG3.js → chunk-IFHFJR5O.js} +2 -2
- package/dist/{chunk-P4OWRYE7.js → chunk-IOWNQEMW.js} +31 -31
- package/dist/{chunk-SUKO4SZG.js → chunk-ISIZFK5Q.js} +53 -47
- package/dist/{chunk-QJ25N4W6.js → chunk-IUJDUFT7.js} +4 -4
- package/dist/{chunk-L34DM6QB.js → chunk-JHAZK4RY.js} +3 -3
- package/dist/{chunk-YL3WVBR5.js → chunk-KGHJ74HF.js} +6 -6
- package/dist/{chunk-NUZXSIEA.js → chunk-L2O5KG5Q.js} +6 -6
- package/dist/{chunk-L4WG4BKJ.js → chunk-L3Q2QYIQ.js} +72 -72
- package/dist/{chunk-SAEIVQLP.js → chunk-LLBEPJBO.js} +3 -3
- package/dist/{chunk-NOW522B4.js → chunk-LWBGPPI5.js} +13 -13
- package/dist/{chunk-GOKRKTCX.js → chunk-MBSHONP3.js} +3 -3
- 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-HXFLHA5K.js → chunk-NH5Z2NOD.js} +2 -2
- package/dist/{chunk-T3HNISBN.js → chunk-NJVY3GAX.js} +3 -3
- package/dist/{chunk-J62TYONQ.js → chunk-NQPPUNWP.js} +3 -3
- package/dist/{chunk-LJZIBT75.js → chunk-O7Z3LF44.js} +5 -5
- package/dist/{chunk-B7CPSWQX.js → chunk-OLXYZQR7.js} +7 -7
- package/dist/{chunk-7F3V6CFP.js → chunk-OQNYZ2OM.js} +3 -3
- package/dist/{chunk-DBDTQR23.js → chunk-OTQF4B37.js} +4 -4
- package/dist/{chunk-GBSHHNSD.js → chunk-PRSNMSVG.js} +3 -3
- package/dist/{chunk-DGYXCIBV.js → chunk-Q6AKSLD2.js} +2 -2
- package/dist/{chunk-YTQYP7UJ.js → chunk-Q7KXMIR3.js} +3 -3
- package/dist/{chunk-IWJ6GFST.js → chunk-QCVH32T2.js} +5 -5
- package/dist/{chunk-7FIMUFBP.js → chunk-QDPY7RN3.js} +3 -3
- package/dist/{chunk-DLDYQNGP.js → chunk-QIT2GGNB.js} +3 -3
- package/dist/{chunk-J3XLCYTQ.js → chunk-QSJH5AFU.js} +244 -173
- package/dist/{chunk-DERQSEB5.js → chunk-R7DS2TRZ.js} +38 -22
- package/dist/{chunk-BEKEOXNG.js → chunk-RGPHFHJU.js} +2 -2
- package/dist/{chunk-5FJ4M4HB.js → chunk-RHH6SCB4.js} +17 -32
- package/dist/{chunk-Z4BQPABS.js → chunk-RIT3WBBX.js} +4 -4
- package/dist/{chunk-45K2QZBR.js → chunk-RKNCISPM.js} +3 -3
- package/dist/{chunk-6LJS4M6P.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-LPQZICYN.js → chunk-S7MVI4W7.js} +7 -7
- 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-RPBB7P4Q.js → chunk-SVQMDVND.js} +87 -16
- package/dist/{chunk-45ZUMF4E.js → chunk-TPUAXIPR.js} +2 -2
- package/dist/{chunk-HMYJOQXT.js → chunk-TXU34ELY.js} +25 -25
- package/dist/{chunk-MTBKTGZT.js → chunk-U4UAWGIT.js} +12 -8
- package/dist/{chunk-76SBT7KS.js → chunk-U56HK2RG.js} +7 -5
- package/dist/{chunk-RV2BDU7V.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-RDZBXTZ3.js → chunk-VAQPQXOI.js} +4 -4
- package/dist/{chunk-XPSDDTUZ.js → chunk-VCFRALU7.js} +3 -3
- package/dist/{chunk-5KJBWIDZ.js → chunk-VQDVEHDB.js} +2 -2
- package/dist/{chunk-6ILHYSLR.js → chunk-WAP5362D.js} +5 -5
- package/dist/{chunk-XY4OBD26.js → chunk-WGKKDGSA.js} +4 -4
- package/dist/{chunk-UQ2OD7D4.js → chunk-WVVUE7LU.js} +14 -7
- package/dist/{chunk-LB76VK6D.js → chunk-WXQ7BHVQ.js} +7 -7
- 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-BSGU4HS6.js → chunk-XKMZYU5B.js} +96 -65
- package/dist/{chunk-OLQN4Z5R.js → chunk-Y3RH35KM.js} +47 -47
- package/dist/{chunk-YFQCDLCQ.js → chunk-YHT7TDSH.js} +14 -14
- package/dist/{chunk-KDEU5FUJ.js → chunk-YJXJOMXW.js} +3 -3
- package/dist/{chunk-N6LGLNAC.js → chunk-YPLHVRMS.js} +4 -4
- package/dist/{chunk-WS2X5BB2.js → chunk-YYBBJPCL.js} +5 -5
- package/dist/{chunk-ZOHEHIFS.js → chunk-YYDM4DNP.js} +2 -2
- package/dist/{chunk-MYIIBV6A.js → chunk-ZF4LCHCT.js} +5 -5
- package/dist/{chunk-GRXX2TOJ.js → chunk-ZHFSIQ6E.js} +2 -2
- package/dist/{chunk-CB67GIR3.js → chunk-ZJQFKBX7.js} +7 -7
- package/dist/{chunk-ZRXDPCMN.js → chunk-ZYZ7GRX3.js} +2 -2
- package/dist/{chunk-5TWLVFYB.js → chunk-ZZC5VSLP.js} +4 -4
- package/dist/cli.d.ts +3 -3
- package/dist/cli.js +62 -61
- package/dist/codegen-command-NAY6YAOD.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-WESYWFJN.js → deploy-command-PBM3S4ZL.js} +69 -68
- package/dist/{deploy-source-ZQQNMDFX.js → deploy-source-JW7DAN75.js} +32 -32
- package/dist/{dev-env-sync-4XJT7WOT.js → dev-env-sync-FHJTFH3V.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-t-gDE1BL.d.ts} +181 -93
- package/dist/env-example-refresh-HHEGMFNH.js +136 -0
- package/dist/{env-pull-command-SK5FS477.js → env-pull-command-FFPNRVWD.js} +52 -52
- package/dist/{env-target-TEFSYACA.js → env-target-XHVRZXHX.js} +14 -14
- package/dist/{env-var-command-IJHKA2WJ.js → env-var-command-DJS62YRR.js} +41 -41
- package/dist/{ephemeral-VLPRDNEJ.js → ephemeral-2DXWP3VK.js} +9 -9
- package/dist/{ephemeral-command-WCO5J4SN.js → ephemeral-command-VLQIQ5TS.js} +52 -52
- package/dist/{ephemeral-state-RUOU2GFS.js → ephemeral-state-56XEDUJW.js} +12 -12
- package/dist/{generate-command-3WCOUOEQ.js → generate-command-PSDIIOTU.js} +89 -88
- package/dist/{gitignore-WYS3GMOX.js → gitignore-PMJ6MFNA.js} +15 -15
- package/dist/{guards-PPIBIMFZ.js → guards-YICHJKX3.js} +51 -15
- package/dist/{impersonate-command-UMYVQTCG.js → impersonate-command-IKV4KUYA.js} +37 -37
- package/dist/{import-T4ZTOTBT.js → import-VJQGIS33.js} +5 -5
- package/dist/index.d.ts +653 -222
- package/dist/index.js +29 -28
- package/dist/init-command-LEQIE6GC.js +143 -0
- package/dist/{init-modules-7KALFI5C.js → init-modules-G47Q7ABV.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 +692 -503
- package/dist/{io-PGTCBSIQ.js → io-47TFRYDB.js} +6 -6
- package/dist/{keep-data-merge-OVHCIEBG.js → keep-data-merge-XCPCX7BZ.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-AIHNW4AZ.js → landing-record-JQ7HZDGI.js} +22 -22
- package/dist/{live-diff-UMSOGPX3.js → live-diff-KJ2TWWWT.js} +14 -14
- package/dist/{local-engine-choice-XDGTATKJ.js → local-engine-choice-DFAMYOIF.js} +35 -35
- package/dist/{local-engine-command-VQWNQ7UK.js → local-engine-command-5RP2J5QZ.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-AIMNMXQG.js → local-engine-mcp-command-JSYVVZKK.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-H3YV2D6M.js → lock-commands-7VO6YWOV.js} +67 -66
- package/dist/{login-command-NMM3JNDZ.js → login-command-WTZUBCW6.js} +27 -27
- package/dist/{logout-command-7DYC6G32.js → logout-command-5BJUNK3C.js} +17 -17
- package/dist/{loop-DJNIHC7O.js → loop-HILLODVH.js} +15 -15
- package/dist/{marketplace-command-UCSHDZGO.js → marketplace-command-NMOH4XOV.js} +30 -30
- package/dist/{marketplace-resolve-JR4BBJ6K.js → marketplace-resolve-63QWMQZU.js} +6 -6
- package/dist/{meta-client-CD3TXQP6.js → meta-client-MRAMWUKV.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-2ONIIDRU.js → operation-outcome-WK7UW6PJ.js} +24 -24
- package/dist/{output-target-67LHZKCO.js → output-target-5PYRCCK4.js} +16 -16
- package/dist/{plan-disclosure-T7DF4SRJ.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-TJ7FURXB.js → preflight-command-3BX2WW3S.js} +75 -74
- package/dist/{profile-command-LDPLTJEJ.js → profile-command-GSUX3UMB.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-3LQTXWCD.js +149 -0
- package/dist/{prompt-QNMJIWNI.js → prompt-OYQHQWKI.js} +4 -4
- package/dist/{publish-command-IIRN6NWN.js → publish-command-3BQCV4NE.js} +72 -71
- package/dist/pull-command-B7OVWTZD.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-XSDICMJE.js +153 -0
- package/dist/{release-ns-command-YLCQPVH3.js → release-ns-command-EVAHK4CU.js} +96 -95
- package/dist/{retry-command-LFZYEVRU.js → retry-command-WP4ZI6CJ.js} +8 -8
- package/dist/{routes-manifest-R3TQRB24.js → routes-manifest-N73THJB3.js} +16 -16
- package/dist/routes-manifest-file-LDUDIVFJ.js +41 -0
- package/dist/scaffold.js +2 -2
- package/dist/{secrets-file-PCNAFXNV.js → secrets-file-7XWR7HW3.js} +15 -15
- package/dist/{secrets-fill-command-G7NQMRXU.js → secrets-fill-command-NKCGC75L.js} +66 -65
- package/dist/{seed-4CD55LB4.js → seed-YKTZDS2Q.js} +13 -13
- package/dist/{source-resolve-U4SJR7ZA.js → source-resolve-CQGDFQQC.js} +22 -22
- package/dist/{static-host-MO4VDHL7.js → static-host-3HPZKVKK.js} +5 -5
- package/dist/{status-command-CD72PXIT.js → status-command-TBMQ3GJP.js} +38 -38
- package/dist/{store-AJX4MC7Y.js → store-B63BQV6R.js} +6 -6
- package/dist/{store-BM7SQcUt.d.ts → store-in7gSpMS.d.ts} +297 -129
- package/dist/sync-baseline-GRS33AB5.js +38 -0
- package/dist/{sync-contributions-XK6LHISZ.js → sync-contributions-RKPLZPPO.js} +9 -9
- package/dist/{sync-record-NE62ERA3.js → sync-record-AWFCSS4D.js} +15 -15
- package/dist/{table-WPRAM4VW.js → table-ONGT3JGE.js} +12 -12
- package/dist/{tables-command-NMTKR52H.js → tables-command-UYQ277TJ.js} +41 -41
- package/dist/{tenant-IIYECNWO.js → tenant-IXIW3FOI.js} +10 -10
- package/dist/{tenant-command-XQAWT46C.js → tenant-command-7LWZUK2V.js} +104 -103
- package/dist/{test-command-W4AD4KT4.js → test-command-7KTT5EAF.js} +56 -45
- package/dist/{tests-JWQRHFCT.js → tests-N4MMBABH.js} +6 -6
- package/dist/{token-P3VQ6ITJ.js → token-3TCMW2AP.js} +13 -13
- package/dist/{toolchain-hooks-UAJBPSTC.js → toolchain-hooks-IJWV3ZQS.js} +18 -18
- package/dist/{toolchain-modules-S3MPHCUI.js → toolchain-modules-PBVBCPQJ.js} +5 -5
- package/dist/{toolchain-peers-FQJBTKEB.js → toolchain-peers-EMOYN4U7.js} +8 -8
- package/dist/{tracked-backend-WWEPNUD5.js → tracked-backend-YDUUQZQF.js} +34 -34
- package/dist/update-check-C6KDFGMT.js +141 -0
- package/dist/{upgrade-command-J6LRNHYF.js → upgrade-command-ZSBTSMBR.js} +68 -67
- package/dist/{whoami-command-KWRP2CII.js → whoami-command-L6ERHR5K.js} +16 -16
- package/dist/{workspace-3YNK4XO4.js → workspace-5DPSDM4A.js} +5 -5
- package/dist/{workspace-binding-TTDNXHO5.js → workspace-binding-MVOWGNYW.js} +15 -15
- package/dist/{workspace-command-W4ANGLCZ.js → workspace-command-PKQ5TDR7.js} +100 -99
- package/dist/{workspace-env-6LJGCTZA.js → workspace-env-UZJZUIYV.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-YB6Y2IJS.js +44 -0
- package/dist/{xanosdk-import-PNNMZ4SF.js → xanosdk-import-HHMQDK2I.js} +10 -10
- package/dist/{xanosdk-project-YW3BQY2E.js → xanosdk-project-CKEUNJU4.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 +53 -30
- 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 +78 -71
- 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 +14 -18
- package/llms/values.md +16 -9
- package/llms-full.txt +689 -549
- package/llms.txt +120 -137
- package/manifest.json +228 -246
- 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-75IYFTBS.js +0 -80
- package/dist/codegen-command-JWOW6HE5.js +0 -182
- package/dist/env-example-refresh-4V2OCDJE.js +0 -135
- package/dist/init-command-UR5MSXIH.js +0 -142
- package/dist/promote-command-RURHOLNR.js +0 -148
- package/dist/pull-command-ITO76ENU.js +0 -170
- package/dist/release-command-CVGIUD4M.js +0 -152
- package/dist/routes-manifest-file-GYNYFKAH.js +0 -41
- package/dist/sync-baseline-BJDKG4F2.js +0 -38
- package/dist/update-check-O7QC5TBB.js +0 -140
- package/dist/xano-Z3SRHYOR.js +0 -43
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertOneName,
|
|
3
3
|
noteRunArgs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PRSNMSVG.js";
|
|
5
5
|
import {
|
|
6
6
|
WORKSPACE_ENV_FILE,
|
|
7
7
|
classifyEnv,
|
|
8
8
|
declaredEnv,
|
|
9
9
|
defaultWorkspaceEnvPath,
|
|
10
10
|
namesInEnvExample,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
11
|
+
readEnvFile,
|
|
12
|
+
readWorkspaceEnvFileContents
|
|
13
|
+
} from "./chunk-R7DS2TRZ.js";
|
|
14
14
|
import {
|
|
15
15
|
readTrackedBackend
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LWBGPPI5.js";
|
|
17
17
|
import {
|
|
18
18
|
isExpired
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7UQZ7C4W.js";
|
|
20
20
|
import {
|
|
21
21
|
readLockFile,
|
|
22
22
|
readLockFileReport,
|
|
23
23
|
writeLockFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7ZVQIKNL.js";
|
|
25
25
|
import {
|
|
26
26
|
isCI
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EINZSVEU.js";
|
|
28
28
|
import {
|
|
29
29
|
backendSlotForFlag,
|
|
30
30
|
slotValueMissing
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-V2MIBJZU.js";
|
|
32
32
|
import {
|
|
33
33
|
defaultWorkspaceSecretsPath,
|
|
34
34
|
readSecretsFile
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-VAQPQXOI.js";
|
|
36
36
|
import {
|
|
37
37
|
allLandings,
|
|
38
38
|
getEnvironment,
|
|
39
39
|
readEphemeralState
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WGKKDGSA.js";
|
|
41
41
|
import {
|
|
42
42
|
isUnwritableError,
|
|
43
43
|
unwritableError
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-YYDM4DNP.js";
|
|
45
45
|
import {
|
|
46
46
|
contextFlags,
|
|
47
47
|
setHintContext
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ZYZ7GRX3.js";
|
|
49
49
|
import {
|
|
50
50
|
expandHome
|
|
51
51
|
} from "./chunk-EUUUMY7J.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
inCredentialScope,
|
|
57
57
|
lastResolvedAuth,
|
|
58
58
|
pinnedWorkspaceMissed
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-NH5Z2NOD.js";
|
|
60
60
|
import {
|
|
61
61
|
buildSeedContentFiles,
|
|
62
62
|
collectNonPublicSeedValues,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
hostedFileResolver,
|
|
65
65
|
isMissingFile,
|
|
66
66
|
registerSeedHostedFiles
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-L2O5KG5Q.js";
|
|
68
68
|
import {
|
|
69
69
|
holdsProjectManifest,
|
|
70
70
|
projectRootFrom
|
|
@@ -79,8 +79,9 @@ import {
|
|
|
79
79
|
writeData
|
|
80
80
|
} from "./chunk-4GPIOIAC.js";
|
|
81
81
|
import {
|
|
82
|
-
bundleCapabilities
|
|
83
|
-
|
|
82
|
+
bundleCapabilities,
|
|
83
|
+
capabilityReport
|
|
84
|
+
} from "./chunk-X5NF3ZXW.js";
|
|
84
85
|
import {
|
|
85
86
|
BARE,
|
|
86
87
|
CliError,
|
|
@@ -135,7 +136,7 @@ import {
|
|
|
135
136
|
warn,
|
|
136
137
|
withCliPrefix,
|
|
137
138
|
writeJson
|
|
138
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-ZHFSIQ6E.js";
|
|
139
140
|
import {
|
|
140
141
|
KNOWLEDGE_DIR,
|
|
141
142
|
KNOWLEDGE_FILE,
|
|
@@ -143,16 +144,19 @@ import {
|
|
|
143
144
|
isOsMetadataFile,
|
|
144
145
|
registerAllKinds,
|
|
145
146
|
serializeBundle
|
|
146
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-4XYXUK5H.js";
|
|
147
148
|
import {
|
|
148
149
|
Xano,
|
|
150
|
+
checkDrillMaybeNull,
|
|
149
151
|
checkFilterOperands,
|
|
150
152
|
standaloneDefKind
|
|
151
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-23GEFHRX.js";
|
|
152
154
|
import {
|
|
153
155
|
knowledgeBodiesAllEmpty
|
|
154
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-QDPY7RN3.js";
|
|
155
157
|
import {
|
|
158
|
+
checkConditionallyBoundVars,
|
|
159
|
+
checkConstantArrayKeys,
|
|
156
160
|
checkDecodeOnlyStatements,
|
|
157
161
|
checkExpressionOperands,
|
|
158
162
|
checkInterpolatedValues,
|
|
@@ -162,9 +166,14 @@ import {
|
|
|
162
166
|
checkNullMatchArgs,
|
|
163
167
|
checkPasswordInputHashing,
|
|
164
168
|
checkPathSegmentCandidates,
|
|
169
|
+
checkPreconditionBareErrors,
|
|
170
|
+
checkPredicateIndexReads,
|
|
165
171
|
checkRegexOperandOrder,
|
|
166
172
|
checkReservedColumnNames,
|
|
167
173
|
checkReservedInputNames,
|
|
174
|
+
checkReturnedIncludeMeta,
|
|
175
|
+
checkReturnedStreams,
|
|
176
|
+
checkReturnsOutsideInferredType,
|
|
168
177
|
checkRunFamilyHosts,
|
|
169
178
|
checkSafeRefMatchArgs,
|
|
170
179
|
checkSearchOperandFilters,
|
|
@@ -172,20 +181,23 @@ import {
|
|
|
172
181
|
checkStacks,
|
|
173
182
|
checkSwitchFallthrough,
|
|
174
183
|
checkToThrowScope,
|
|
184
|
+
checkToolDescriptionShadowed,
|
|
185
|
+
checkUnboundPredicates,
|
|
175
186
|
checkUnboundVarRefs,
|
|
187
|
+
checkUncheckedWorkflowTestCalls,
|
|
176
188
|
checkZipPasswordKeys,
|
|
177
189
|
isQueryExpressionFilter
|
|
178
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-HXPQXCOZ.js";
|
|
179
191
|
import {
|
|
180
192
|
FILTER_NAMES
|
|
181
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-RLQX6LHW.js";
|
|
182
194
|
import {
|
|
183
195
|
isRepresentableName,
|
|
184
196
|
safeNames
|
|
185
197
|
} from "./chunk-GSGDWJB5.js";
|
|
186
198
|
import {
|
|
187
199
|
getKind
|
|
188
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-JHAZK4RY.js";
|
|
189
201
|
import {
|
|
190
202
|
WORKSPACE_SECRETS_FILE,
|
|
191
203
|
documentationScopeFlagLabel,
|
|
@@ -196,7 +208,7 @@ import {
|
|
|
196
208
|
DiagnosticError,
|
|
197
209
|
isDiagnosticError,
|
|
198
210
|
setDiagnosticSink
|
|
199
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-FMXPV5JI.js";
|
|
200
212
|
import {
|
|
201
213
|
suggest
|
|
202
214
|
} from "./chunk-UTI5G6OJ.js";
|
|
@@ -212,7 +224,7 @@ import {
|
|
|
212
224
|
toolsetKindsFromPayload,
|
|
213
225
|
validateLockModel,
|
|
214
226
|
withoutGuidSources
|
|
215
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-VQDVEHDB.js";
|
|
216
228
|
import {
|
|
217
229
|
shellQuote
|
|
218
230
|
} from "./chunk-5ZSO4T2G.js";
|
|
@@ -225,10 +237,10 @@ import {
|
|
|
225
237
|
IDENT,
|
|
226
238
|
installLambdaFreeReads,
|
|
227
239
|
installLambdaSyntaxCheck
|
|
228
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-SIW2HT2H.js";
|
|
229
241
|
import {
|
|
230
242
|
rawDeriveGuid
|
|
231
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-FTS42N37.js";
|
|
232
244
|
import {
|
|
233
245
|
resetLockOverrides,
|
|
234
246
|
seedLockOverrides
|
|
@@ -236,12 +248,13 @@ import {
|
|
|
236
248
|
|
|
237
249
|
// src/emit/cli.ts
|
|
238
250
|
import { pathToFileURL as pathToFileURL2, fileURLToPath as fileURLToPath3 } from "url";
|
|
239
|
-
import { existsSync as
|
|
240
|
-
import { basename, dirname as dirname2, isAbsolute, join as
|
|
251
|
+
import { existsSync as existsSync3, mkdirSync, readdirSync as readdirSync2, readFileSync as readFileSync3, realpathSync, statSync as statSync3, writeFileSync } from "fs";
|
|
252
|
+
import { basename, dirname as dirname2, isAbsolute, join as join3, relative as relative3, resolve as resolve2 } from "path";
|
|
241
253
|
import { createRequire as createRequire2 } from "module";
|
|
242
254
|
|
|
243
255
|
// src/emit/authoring-site.ts
|
|
244
|
-
import {
|
|
256
|
+
import { existsSync } from "fs";
|
|
257
|
+
import { dirname, join, relative, resolve, sep } from "path";
|
|
245
258
|
import { fileURLToPath } from "url";
|
|
246
259
|
var OWN_ROOT = dirname(fileURLToPath(import.meta.url)).replace(/[\\/](src[\\/]emit|dist)$/, "");
|
|
247
260
|
function authorFrame(err, entry) {
|
|
@@ -313,8 +326,22 @@ function withAuthoringSite(err, entry) {
|
|
|
313
326
|
if (frame.top || Object.getPrototypeOf(err) === Error.prototype) asUsage(err);
|
|
314
327
|
if (!err.message.includes(frame.site)) err.message = `${err.message}
|
|
315
328
|
(thrown while loading ${frame.site})`;
|
|
329
|
+
const tsc = typeCheckHint(err, entry);
|
|
330
|
+
if (tsc !== void 0 && !err.message.includes(tsc)) err.message = `${err.message}
|
|
331
|
+
${tsc}`;
|
|
316
332
|
return err;
|
|
317
333
|
}
|
|
334
|
+
function typeCheckHint(err, entry) {
|
|
335
|
+
if (!(err instanceof TypeError || err instanceof ReferenceError)) return void 0;
|
|
336
|
+
const project = projectRootFrom(dirname(resolve(entry)));
|
|
337
|
+
for (let dir = dirname(resolve(entry)); ; dir = dirname(dir)) {
|
|
338
|
+
if (existsSync(join(dir, "tsconfig.json"))) {
|
|
339
|
+
const p = relative(process.cwd(), dir) || ".";
|
|
340
|
+
return `A misused SDK call usually fails like this: \`npx tsc --noEmit -p ${p}\` reports it as a type error, with the signature it expected.`;
|
|
341
|
+
}
|
|
342
|
+
if (dir === project || dirname(dir) === dir) return void 0;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
318
345
|
|
|
319
346
|
// src/emit/compile-checks.ts
|
|
320
347
|
function payloadKeyOf(def) {
|
|
@@ -336,19 +363,30 @@ function checkCompiledDef(def, artifact, strict, raised = []) {
|
|
|
336
363
|
checkExpressionOperands(sections, bag);
|
|
337
364
|
checkInterpolatedValues(sections, bag);
|
|
338
365
|
checkRegexOperandOrder(sections, bag);
|
|
366
|
+
checkUnboundPredicates(sections, bag);
|
|
367
|
+
checkConstantArrayKeys(sections, bag);
|
|
368
|
+
checkPredicateIndexReads(sections, bag);
|
|
369
|
+
checkPreconditionBareErrors(sections, bag);
|
|
370
|
+
checkReturnedStreams(sections, bag);
|
|
371
|
+
checkReturnedIncludeMeta(sections, bag);
|
|
372
|
+
checkToolDescriptionShadowed(sections, bag);
|
|
373
|
+
checkReturnsOutsideInferredType(sections, bag, () => Object.hasOwn(def, "responseShape"));
|
|
339
374
|
checkDecodeOnlyStatements(sections, bag);
|
|
340
375
|
checkRunFamilyHosts(sections, bag);
|
|
341
376
|
checkLiveDatasourceTests(sections, bag);
|
|
377
|
+
checkUncheckedWorkflowTestCalls(sections, bag);
|
|
342
378
|
checkLoopControl(sections, bag);
|
|
343
379
|
checkSwitchFallthrough(sections, bag);
|
|
344
380
|
checkSearchOperandFilters(sections, bag);
|
|
345
381
|
checkFilterOperands(sections, bag);
|
|
346
382
|
checkUnboundVarRefs(sections, bag);
|
|
383
|
+
checkConditionallyBoundVars(sections, bag);
|
|
347
384
|
checkToThrowScope(sections, bag);
|
|
348
385
|
checkPasswordInputHashing(sections, bag);
|
|
349
386
|
checkZipPasswordKeys(sections, bag);
|
|
350
387
|
checkSafeRefMatchArgs(sections, bag);
|
|
351
388
|
checkNullMatchArgs(sections, bag);
|
|
389
|
+
checkDrillMaybeNull(sections, bag);
|
|
352
390
|
checkPathSegmentCandidates(sections, bag);
|
|
353
391
|
checkSeed(tables, bag);
|
|
354
392
|
checkReservedColumnNames(tables, bag);
|
|
@@ -480,7 +518,7 @@ function findUnresolvableFilters(bundle) {
|
|
|
480
518
|
// src/workspace/knowledge.ts
|
|
481
519
|
import { readFileSync, readdirSync, statSync } from "fs";
|
|
482
520
|
import { fileURLToPath as fileURLToPath2, pathToFileURL } from "url";
|
|
483
|
-
import { join, relative as relative2, sep as sep2 } from "path";
|
|
521
|
+
import { join as join2, relative as relative2, sep as sep2 } from "path";
|
|
484
522
|
var MAX_KNOWLEDGE_FILE_BYTES = 1024 * 1024;
|
|
485
523
|
function resolveMarker(ref) {
|
|
486
524
|
const base = /^[a-z][a-z0-9+.-]*:/i.test(ref.base) ? ref.base : pathToFileURL(ref.base).href;
|
|
@@ -502,7 +540,7 @@ function collectRefFiles(dir, itemName, refsWhere, warnings) {
|
|
|
502
540
|
const links = [];
|
|
503
541
|
const walk = (cur) => {
|
|
504
542
|
for (const entry of readdirSync(cur, { withFileTypes: true })) {
|
|
505
|
-
const full =
|
|
543
|
+
const full = join2(cur, entry.name);
|
|
506
544
|
const rel = relative2(dir, full).split(sep2).join("/");
|
|
507
545
|
if (entry.isDirectory()) {
|
|
508
546
|
walk(full);
|
|
@@ -594,7 +632,7 @@ function resolveKnowledge(defs) {
|
|
|
594
632
|
}
|
|
595
633
|
const shipped = files.map((f) => ({
|
|
596
634
|
rel: f.path,
|
|
597
|
-
what: own.get(
|
|
635
|
+
what: own.get(join2(abs, ...f.path.split("/"))) ?? (/\.[cm]?[jt]sx?$/i.test(f.path) ? "a source file" : void 0)
|
|
598
636
|
})).filter((f) => f.what !== void 0);
|
|
599
637
|
if (shipped.length > 0) {
|
|
600
638
|
warnings.push({
|
|
@@ -1143,7 +1181,7 @@ function installNodeLambdaChecks() {
|
|
|
1143
1181
|
}
|
|
1144
1182
|
|
|
1145
1183
|
// src/emit/bundle-input.ts
|
|
1146
|
-
import { existsSync, readFileSync as readFileSync2, statSync as statSync2 } from "fs";
|
|
1184
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, statSync as statSync2 } from "fs";
|
|
1147
1185
|
function assertBundleInput(args, target) {
|
|
1148
1186
|
if (args.bundle === void 0 && args.file === void 0) throw missingArgument("file", target);
|
|
1149
1187
|
if (args.bundle === void 0) return;
|
|
@@ -1158,9 +1196,9 @@ function assertBundleFile(args, target, consequence) {
|
|
|
1158
1196
|
if (args.bundle === void 0) return;
|
|
1159
1197
|
const tail = `${consequence === void 0 ? "" : ` ${consequence}`} Pass the path of a bundle \`xanosdk export <entry> --out <path>\` wrote.`;
|
|
1160
1198
|
const typed = args.bundlePositional === true ? `"${args.bundle}"` : `\`--bundle ${args.bundle}\``;
|
|
1161
|
-
if (!
|
|
1162
|
-
const Refusal =
|
|
1163
|
-
throw new Refusal(`${typed} ${
|
|
1199
|
+
if (!existsSync2(args.bundle) || !statSync2(args.bundle).isFile()) {
|
|
1200
|
+
const Refusal = existsSync2(args.bundle) ? UsageError : LocalFileNotFoundError;
|
|
1201
|
+
throw new Refusal(`${typed} ${existsSync2(args.bundle) ? "is not a file" : "does not exist"}.${tail}`, {
|
|
1164
1202
|
hintFor: target
|
|
1165
1203
|
});
|
|
1166
1204
|
}
|
|
@@ -1240,9 +1278,9 @@ function assertValueFiles(args, target) {
|
|
|
1240
1278
|
["--secrets-file", args.secretsFile]
|
|
1241
1279
|
]) {
|
|
1242
1280
|
if (path === void 0) continue;
|
|
1243
|
-
if (
|
|
1244
|
-
throw new (
|
|
1245
|
-
`\`${flag} ${path}\` ${
|
|
1281
|
+
if (existsSync2(path) && statSync2(path).isFile()) continue;
|
|
1282
|
+
throw new (existsSync2(path) ? UsageError : LocalFileNotFoundError)(
|
|
1283
|
+
`\`${flag} ${path}\` ${existsSync2(path) ? "is not a file" : "does not exist"}. Check the path, and make sure the file is present wherever this runs (a CI secret mounted at deploy time, not a file committed to the repo).`,
|
|
1246
1284
|
{ hintFor: target }
|
|
1247
1285
|
);
|
|
1248
1286
|
}
|
|
@@ -2407,11 +2445,11 @@ function onlyFlags(tokens) {
|
|
|
2407
2445
|
function resolveHelpRequest(argv) {
|
|
2408
2446
|
const asVerb = argv[0] === "help";
|
|
2409
2447
|
const [first, second, ...after] = argv;
|
|
2410
|
-
if (first !== void 0 && first !== "init" && second === "help" && isCommand(first) && onlyFlags(after) && !
|
|
2448
|
+
if (first !== void 0 && first !== "init" && second === "help" && isCommand(first) && onlyFlags(after) && !existsSync3("help")) {
|
|
2411
2449
|
return { command: first };
|
|
2412
2450
|
}
|
|
2413
2451
|
const [third, ...rest] = after;
|
|
2414
|
-
if (first !== void 0 && second !== void 0 && third === "help" && isCommand(first) && getSubcommand(first, second) !== void 0 && onlyFlags(rest) && !
|
|
2452
|
+
if (first !== void 0 && second !== void 0 && third === "help" && isCommand(first) && getSubcommand(first, second) !== void 0 && onlyFlags(rest) && !existsSync3("help")) {
|
|
2415
2453
|
return { command: first, subcommand: second };
|
|
2416
2454
|
}
|
|
2417
2455
|
if (!asVerb && !argv.some((a) => a === "--help" || a === "-h")) return void 0;
|
|
@@ -2467,7 +2505,7 @@ function tsxEsmApiPath(from) {
|
|
|
2467
2505
|
const pkg = JSON.parse(readFileSync3(manifest, "utf8"));
|
|
2468
2506
|
const api = pkg.exports?.["./esm/api"];
|
|
2469
2507
|
const entry = typeof api?.import === "string" ? api.import : api?.import?.default;
|
|
2470
|
-
if (typeof entry === "string") return
|
|
2508
|
+
if (typeof entry === "string") return join3(dirname2(manifest), entry);
|
|
2471
2509
|
} catch {
|
|
2472
2510
|
}
|
|
2473
2511
|
return req.resolve("tsx/esm/api");
|
|
@@ -2485,8 +2523,8 @@ function entryIsCommonJs(file) {
|
|
|
2485
2523
|
if (/\.cts$/.test(path)) return true;
|
|
2486
2524
|
let dir = dirname2(path);
|
|
2487
2525
|
for (; ; ) {
|
|
2488
|
-
const manifest =
|
|
2489
|
-
if (
|
|
2526
|
+
const manifest = join3(dir, "package.json");
|
|
2527
|
+
if (existsSync3(manifest)) {
|
|
2490
2528
|
try {
|
|
2491
2529
|
const pkg = JSON.parse(readFileSync3(manifest, "utf8"));
|
|
2492
2530
|
return pkg.type !== "module";
|
|
@@ -2519,7 +2557,7 @@ function findEntryInAncestor(file) {
|
|
|
2519
2557
|
const parent = dirname2(dir);
|
|
2520
2558
|
if (parent === dir) return void 0;
|
|
2521
2559
|
dir = parent;
|
|
2522
|
-
if (
|
|
2560
|
+
if (existsSync3(resolve2(dir, file))) return dir;
|
|
2523
2561
|
}
|
|
2524
2562
|
}
|
|
2525
2563
|
async function loadDefault(file) {
|
|
@@ -2539,7 +2577,7 @@ function noProjectEntryError(file, cause) {
|
|
|
2539
2577
|
async function tsxRemedy(file) {
|
|
2540
2578
|
const fallback = `Install it in your project (\`npm i -D tsx\`) or precompile the file to .js first.`;
|
|
2541
2579
|
for (let dir = dirname2(resolve2(file)); ; dir = dirname2(dir)) {
|
|
2542
|
-
const manifest =
|
|
2580
|
+
const manifest = join3(dir, "package.json");
|
|
2543
2581
|
if (holdsProjectManifest(dir)) {
|
|
2544
2582
|
let pkg;
|
|
2545
2583
|
try {
|
|
@@ -2552,7 +2590,7 @@ async function tsxRemedy(file) {
|
|
|
2552
2590
|
);
|
|
2553
2591
|
if (!declared) return fallback;
|
|
2554
2592
|
const { detectPackageManager } = await import("./package-manager-K762W7XT.js");
|
|
2555
|
-
const { inProject } = await import("./init-modules-
|
|
2593
|
+
const { inProject } = await import("./init-modules-G47Q7ABV.js");
|
|
2556
2594
|
return `This project's package.json declares it, but its dependencies are not installed \u2014 run \`${inProject(dir)}${detectPackageManager(dir)} install\` first.`;
|
|
2557
2595
|
}
|
|
2558
2596
|
if (dirname2(dir) === dir) return fallback;
|
|
@@ -2569,7 +2607,7 @@ function hasPackageJsonAbove(file) {
|
|
|
2569
2607
|
}
|
|
2570
2608
|
function assertEntryExists(file) {
|
|
2571
2609
|
const path = resolve2(file);
|
|
2572
|
-
if (!
|
|
2610
|
+
if (!existsSync3(path)) {
|
|
2573
2611
|
const elsewhere = findEntryInAncestor(file);
|
|
2574
2612
|
const where = elsewhere !== void 0 ? `A relative entry resolves against the current directory (${process.cwd()}), and "${file}" does exist under ${elsewhere} \u2014 run xanosdk from there.` : `A relative entry resolves against the current directory (${process.cwd()}).`;
|
|
2575
2613
|
throw new LocalFileNotFoundError(
|
|
@@ -2634,8 +2672,8 @@ function resolveVersion() {
|
|
|
2634
2672
|
function ownPackage() {
|
|
2635
2673
|
let dir = dirname2(fileURLToPath3(import.meta.url));
|
|
2636
2674
|
for (let i = 0; i < 6; i++) {
|
|
2637
|
-
const p =
|
|
2638
|
-
if (
|
|
2675
|
+
const p = join3(dir, "package.json");
|
|
2676
|
+
if (existsSync3(p)) {
|
|
2639
2677
|
try {
|
|
2640
2678
|
const pkg = JSON.parse(readFileSync3(p, "utf8"));
|
|
2641
2679
|
if (pkg.name === "@xano/sdk" && typeof pkg.version === "string") return { root: dir, version: pkg.version };
|
|
@@ -2663,7 +2701,7 @@ async function emitterFor(file) {
|
|
|
2663
2701
|
const dot = pkg.exports?.["."];
|
|
2664
2702
|
const entry = (typeof dot === "string" ? dot : dot?.import) ?? pkg.main;
|
|
2665
2703
|
if (entry === void 0) return emit;
|
|
2666
|
-
const mod = await import(pathToFileURL2(
|
|
2704
|
+
const mod = await import(pathToFileURL2(join3(root, entry)).href);
|
|
2667
2705
|
return typeof mod.emit === "function" ? mod.emit : emit;
|
|
2668
2706
|
} catch {
|
|
2669
2707
|
return emit;
|
|
@@ -3173,7 +3211,7 @@ async function explainUnreachableWorkspace(err) {
|
|
|
3173
3211
|
let verdict = unreachableVerdicts.get(auth);
|
|
3174
3212
|
if (verdict === void 0) {
|
|
3175
3213
|
verdict = (async () => {
|
|
3176
|
-
const { readReachableWorkspaces, unreachableWorkspaceMessage } = await import("./workspace-binding-
|
|
3214
|
+
const { readReachableWorkspaces, unreachableWorkspaceMessage } = await import("./workspace-binding-MVOWGNYW.js");
|
|
3177
3215
|
const all = await readReachableWorkspaces(auth, 15e3);
|
|
3178
3216
|
if (all === void 0 || all.length === 0 || all.some((w) => w.id === auth.workspaceId)) return void 0;
|
|
3179
3217
|
return new UsageError(unreachableWorkspaceMessage(auth, all));
|
|
@@ -3187,7 +3225,7 @@ async function explainRejectedCredential(err) {
|
|
|
3187
3225
|
if (!(err instanceof Error) || resolved === void 0) return err;
|
|
3188
3226
|
const [first = "", ...rest] = err.message.split("\n");
|
|
3189
3227
|
if (!/\(401\b[^)]*\)|\banswered (HTTP )?401\b/.test(first) || /\brejected\b/.test(err.message)) return err;
|
|
3190
|
-
const { asRejectedCredential, rejectedRemedy } = await import("./whoami-command-
|
|
3228
|
+
const { asRejectedCredential, rejectedRemedy } = await import("./whoami-command-L6ERHR5K.js");
|
|
3191
3229
|
const { auth, args } = resolved;
|
|
3192
3230
|
err.message = [first, rejectedRemedy(auth, args), ...rest].join("\n");
|
|
3193
3231
|
if (failureCode(err) === "SDK_ERROR") asRejectedCredential(err, auth, args);
|
|
@@ -3225,10 +3263,10 @@ function withoutSecretValue(args) {
|
|
|
3225
3263
|
}
|
|
3226
3264
|
async function nameLookupRerun(failure) {
|
|
3227
3265
|
if (!(failure instanceof Error) || runArgs?.argv === void 0) return failure;
|
|
3228
|
-
const { LookupFailedError, rateLimitedFailure } = await import("./source-resolve-
|
|
3266
|
+
const { LookupFailedError, rateLimitedFailure } = await import("./source-resolve-CQGDFQQC.js");
|
|
3229
3267
|
const err = rateLimitedFailure(failure);
|
|
3230
3268
|
if (!(err instanceof LookupFailedError)) return err;
|
|
3231
|
-
const { retryCommand, withheldNote } = await import("./deploy-command-
|
|
3269
|
+
const { retryCommand, withheldNote } = await import("./deploy-command-PBM3S4ZL.js");
|
|
3232
3270
|
if (runArgs.command === "env" && runArgs.subcommand === "set") {
|
|
3233
3271
|
const retry2 = retryCommand(withoutSecretValue(runArgs));
|
|
3234
3272
|
return err.withRerun(
|
|
@@ -3283,7 +3321,7 @@ function isPathlessRun(args) {
|
|
|
3283
3321
|
return PATHLESS_COMMANDS.has(command) || PATHLESS_VERBS[command]?.has(args.subcommand ?? "") === true;
|
|
3284
3322
|
}
|
|
3285
3323
|
async function atProjectRoot(args, command, positional) {
|
|
3286
|
-
const { enterProjectRoot } = await import("./xanosdk-project-
|
|
3324
|
+
const { enterProjectRoot } = await import("./xanosdk-project-CKEUNJU4.js");
|
|
3287
3325
|
const entered = enterProjectRoot(args, process.cwd(), positional);
|
|
3288
3326
|
if (entered === void 0) return command(args);
|
|
3289
3327
|
if (isPathlessRun(args)) {
|
|
@@ -3384,7 +3422,7 @@ async function dispatch(rawArgv) {
|
|
|
3384
3422
|
if (typed[0] === "init") {
|
|
3385
3423
|
const web = typed.indexOf("--web", 1);
|
|
3386
3424
|
if (web !== -1) {
|
|
3387
|
-
const { runInitWebCommand } = await import("./init-web-
|
|
3425
|
+
const { runInitWebCommand } = await import("./init-web-25QJ4JWB.js");
|
|
3388
3426
|
return runInitWebCommand([...typed.slice(1, web), ...typed.slice(web + 1)]);
|
|
3389
3427
|
}
|
|
3390
3428
|
}
|
|
@@ -3402,7 +3440,7 @@ async function dispatch(rawArgv) {
|
|
|
3402
3440
|
throw unknownSubcommand(helpRequest.command, helpRequest.unknownSubcommand, helpRequest.positionals ?? []);
|
|
3403
3441
|
}
|
|
3404
3442
|
if (argv.includes("--json")) {
|
|
3405
|
-
const { helpDocument } = await import("./commands-
|
|
3443
|
+
const { helpDocument } = await import("./commands-Z2QZOORB.js");
|
|
3406
3444
|
writeJson({ version: readVersion(), ...helpDocument(helpRequest) });
|
|
3407
3445
|
return;
|
|
3408
3446
|
}
|
|
@@ -3423,7 +3461,7 @@ async function dispatch(rawArgv) {
|
|
|
3423
3461
|
setHintContext(args);
|
|
3424
3462
|
runArgs = args;
|
|
3425
3463
|
noteRunArgs(args);
|
|
3426
|
-
if (isMachineOutput(args)) (await import("./update-check-
|
|
3464
|
+
if (isMachineOutput(args)) (await import("./update-check-C6KDFGMT.js")).routeUpdateNoticeToDocument();
|
|
3427
3465
|
const { command } = args;
|
|
3428
3466
|
const out = args.out === "-" ? void 0 : args.out;
|
|
3429
3467
|
if (command === void 0) {
|
|
@@ -3444,11 +3482,11 @@ async function dispatch(rawArgv) {
|
|
|
3444
3482
|
return;
|
|
3445
3483
|
}
|
|
3446
3484
|
if (command === "init") {
|
|
3447
|
-
const { runInitCommand } = await import("./init-command-
|
|
3485
|
+
const { runInitCommand } = await import("./init-command-LEQIE6GC.js");
|
|
3448
3486
|
return runInitCommand(args);
|
|
3449
3487
|
}
|
|
3450
3488
|
if (command === "completion") {
|
|
3451
|
-
const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS, UNSUPPORTED_SHELLS } = await import("./completion-
|
|
3489
|
+
const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS, UNSUPPORTED_SHELLS } = await import("./completion-LFXXNQGR.js");
|
|
3452
3490
|
const shell = args.positionals[0];
|
|
3453
3491
|
if (shell === void 0) throw missingArgument("shell", { command: "completion" });
|
|
3454
3492
|
if (!isCompletionShell(shell)) {
|
|
@@ -3467,115 +3505,115 @@ async function dispatch(rawArgv) {
|
|
|
3467
3505
|
return runCompletionCommand(shell);
|
|
3468
3506
|
}
|
|
3469
3507
|
if (command === "agent-skill") {
|
|
3470
|
-
const { runAgentSkillCommand } = await import("./agent-skill-command-
|
|
3508
|
+
const { runAgentSkillCommand } = await import("./agent-skill-command-LHNTU7MH.js");
|
|
3471
3509
|
return runAgentSkillCommand(args);
|
|
3472
3510
|
}
|
|
3473
3511
|
if (command === "upgrade") {
|
|
3474
|
-
const { runUpgradeCommand } = await import("./upgrade-command-
|
|
3512
|
+
const { runUpgradeCommand } = await import("./upgrade-command-ZSBTSMBR.js");
|
|
3475
3513
|
return runUpgradeCommand(args);
|
|
3476
3514
|
}
|
|
3477
3515
|
if (command === "lock") {
|
|
3478
|
-
const { runLockCommand } = await import("./lock-commands-
|
|
3516
|
+
const { runLockCommand } = await import("./lock-commands-7VO6YWOV.js");
|
|
3479
3517
|
const verb = args.positionals[0];
|
|
3480
|
-
const { isProjectDir } = await import("./xanosdk-project-
|
|
3481
|
-
const here = verb !== "prune" && args.lockPath === void 0 && args.entryPath === void 0 &&
|
|
3518
|
+
const { isProjectDir } = await import("./xanosdk-project-CKEUNJU4.js");
|
|
3519
|
+
const here = verb !== "prune" && args.lockPath === void 0 && args.entryPath === void 0 && existsSync3("xano.lock") && !isProjectDir(process.cwd()) ? { ...args, lockPath: "xano.lock" } : args;
|
|
3482
3520
|
return atProjectRoot(here, runLockCommand, verb === "prune" || verb === "import" ? "verb-path" : void 0);
|
|
3483
3521
|
}
|
|
3484
3522
|
if (command === "login") {
|
|
3485
|
-
const { runLoginCommand } = await import("./login-command-
|
|
3523
|
+
const { runLoginCommand } = await import("./login-command-WTZUBCW6.js");
|
|
3486
3524
|
return runLoginCommand(args);
|
|
3487
3525
|
}
|
|
3488
3526
|
if (command === "logout") {
|
|
3489
|
-
const { runLogoutCommand } = await import("./logout-command-
|
|
3527
|
+
const { runLogoutCommand } = await import("./logout-command-5BJUNK3C.js");
|
|
3490
3528
|
return runLogoutCommand(args);
|
|
3491
3529
|
}
|
|
3492
3530
|
if (command === "deploy") {
|
|
3493
|
-
const { runDeployCommand } = await import("./deploy-command-
|
|
3531
|
+
const { runDeployCommand } = await import("./deploy-command-PBM3S4ZL.js");
|
|
3494
3532
|
return atProjectRoot(args, runDeployCommand, entryPositional(args));
|
|
3495
3533
|
}
|
|
3496
3534
|
if (command === "ephemeral") {
|
|
3497
|
-
const { runEphemeralCommand } = await import("./ephemeral-command-
|
|
3535
|
+
const { runEphemeralCommand } = await import("./ephemeral-command-VLQIQ5TS.js");
|
|
3498
3536
|
return atProjectRoot(args, runEphemeralCommand);
|
|
3499
3537
|
}
|
|
3500
3538
|
if (command === "local") {
|
|
3501
|
-
const { runLocalEngineCommand } = await import("./local-engine-command-
|
|
3539
|
+
const { runLocalEngineCommand } = await import("./local-engine-command-5RP2J5QZ.js");
|
|
3502
3540
|
const readsProject = ["token", "stop", "update", "mcp"].includes(args.subcommand ?? "");
|
|
3503
3541
|
return readsProject ? atProjectRoot(args, runLocalEngineCommand) : runLocalEngineCommand(args);
|
|
3504
3542
|
}
|
|
3505
3543
|
if (command === "env") {
|
|
3506
3544
|
if (args.subcommand === "set" || args.subcommand === "unset") {
|
|
3507
|
-
const { runEnvVarCommand } = await import("./env-var-command-
|
|
3545
|
+
const { runEnvVarCommand } = await import("./env-var-command-DJS62YRR.js");
|
|
3508
3546
|
return atProjectRoot(args, (a) => runEnvVarCommand(a, args.subcommand));
|
|
3509
3547
|
}
|
|
3510
3548
|
if (args.subcommand !== "pull") throw unknownSubcommand("env", args.subcommand);
|
|
3511
|
-
const { runEnvPullCommand } = await import("./env-pull-command-
|
|
3549
|
+
const { runEnvPullCommand } = await import("./env-pull-command-FFPNRVWD.js");
|
|
3512
3550
|
return atProjectRoot(args, runEnvPullCommand);
|
|
3513
3551
|
}
|
|
3514
3552
|
if (command === "secrets") {
|
|
3515
3553
|
if (args.subcommand !== "fill") throw unknownSubcommand("secrets", args.subcommand);
|
|
3516
|
-
const { runSecretsFillCommand } = await import("./secrets-fill-command-
|
|
3554
|
+
const { runSecretsFillCommand } = await import("./secrets-fill-command-NKCGC75L.js");
|
|
3517
3555
|
return atProjectRoot(args, runSecretsFillCommand, entryPositional(args));
|
|
3518
3556
|
}
|
|
3519
3557
|
if (command === "release") {
|
|
3520
|
-
const { runReleaseCommand: runReleaseNs } = await import("./release-ns-command-
|
|
3558
|
+
const { runReleaseCommand: runReleaseNs } = await import("./release-ns-command-EVAHK4CU.js");
|
|
3521
3559
|
return atProjectRoot(args, runReleaseNs);
|
|
3522
3560
|
}
|
|
3523
3561
|
if (command === "pull") {
|
|
3524
|
-
const { runPullCommand } = await import("./pull-command-
|
|
3562
|
+
const { runPullCommand } = await import("./pull-command-B7OVWTZD.js");
|
|
3525
3563
|
const first = args.positionals[0];
|
|
3526
3564
|
const file = first !== void 0 && !isKindShaped(first) && (/\.json$/i.test(first) || /[\\/]/.test(first));
|
|
3527
3565
|
return file ? runPullCommand(args) : atProjectRoot(args, runPullCommand);
|
|
3528
3566
|
}
|
|
3529
3567
|
if (command === "generate") {
|
|
3530
|
-
const { runGenerateCommand } = await import("./generate-command-
|
|
3568
|
+
const { runGenerateCommand } = await import("./generate-command-PSDIIOTU.js");
|
|
3531
3569
|
return runGenerateCommand(args);
|
|
3532
3570
|
}
|
|
3533
3571
|
if (command === "tables") {
|
|
3534
|
-
const { runTablesCommand } = await import("./tables-command-
|
|
3572
|
+
const { runTablesCommand } = await import("./tables-command-UYQ277TJ.js");
|
|
3535
3573
|
return atProjectRoot(args, runTablesCommand);
|
|
3536
3574
|
}
|
|
3537
3575
|
if (command === "impersonate") {
|
|
3538
|
-
const { runImpersonateCommand } = await import("./impersonate-command-
|
|
3576
|
+
const { runImpersonateCommand } = await import("./impersonate-command-IKV4KUYA.js");
|
|
3539
3577
|
return atProjectRoot(args, runImpersonateCommand);
|
|
3540
3578
|
}
|
|
3541
3579
|
if (command === "promote") {
|
|
3542
|
-
const { runPromoteCommand } = await import("./promote-command-
|
|
3580
|
+
const { runPromoteCommand } = await import("./promote-command-3LQTXWCD.js");
|
|
3543
3581
|
return atProjectRoot(args, runPromoteCommand);
|
|
3544
3582
|
}
|
|
3545
3583
|
if (command === "publish") {
|
|
3546
|
-
const { runPublishCommand } = await import("./publish-command-
|
|
3584
|
+
const { runPublishCommand } = await import("./publish-command-3BQCV4NE.js");
|
|
3547
3585
|
return atProjectRoot(args, runPublishCommand, "path");
|
|
3548
3586
|
}
|
|
3549
3587
|
if (command === "tenant") {
|
|
3550
|
-
const { runTenantCommand } = await import("./tenant-command-
|
|
3588
|
+
const { runTenantCommand } = await import("./tenant-command-7LWZUK2V.js");
|
|
3551
3589
|
return atProjectRoot(args, runTenantCommand);
|
|
3552
3590
|
}
|
|
3553
3591
|
if (command === "test") {
|
|
3554
|
-
const { runTestCommand } = await import("./test-command-
|
|
3592
|
+
const { runTestCommand } = await import("./test-command-7KTT5EAF.js");
|
|
3555
3593
|
return atProjectRoot(args, runTestCommand);
|
|
3556
3594
|
}
|
|
3557
3595
|
if (command === "workspace") {
|
|
3558
|
-
const { runWorkspaceCommand } = await import("./workspace-command-
|
|
3596
|
+
const { runWorkspaceCommand } = await import("./workspace-command-PKQ5TDR7.js");
|
|
3559
3597
|
return runWorkspaceCommand(args);
|
|
3560
3598
|
}
|
|
3561
3599
|
if (command === "status") {
|
|
3562
|
-
const { runStatusCommand } = await import("./status-command-
|
|
3600
|
+
const { runStatusCommand } = await import("./status-command-TBMQ3GJP.js");
|
|
3563
3601
|
return runStatusCommand(args);
|
|
3564
3602
|
}
|
|
3565
3603
|
if (command === "whoami") {
|
|
3566
|
-
const { runWhoamiCommand } = await import("./whoami-command-
|
|
3604
|
+
const { runWhoamiCommand } = await import("./whoami-command-L6ERHR5K.js");
|
|
3567
3605
|
return runWhoamiCommand(args);
|
|
3568
3606
|
}
|
|
3569
3607
|
if (command === "profile") {
|
|
3570
|
-
const { runProfileCommand } = await import("./profile-command-
|
|
3608
|
+
const { runProfileCommand } = await import("./profile-command-GSUX3UMB.js");
|
|
3571
3609
|
return runProfileCommand(args);
|
|
3572
3610
|
}
|
|
3573
3611
|
if (command === "marketplace") {
|
|
3574
3612
|
if (!["list", "search", "details", "install", "reinstall", "remove"].includes(args.subcommand ?? "")) {
|
|
3575
3613
|
throw unknownSubcommand("marketplace", args.subcommand);
|
|
3576
3614
|
}
|
|
3577
|
-
const marketplace = await import("./marketplace-command-
|
|
3578
|
-
const { withCatalogueRerun } = await import("./marketplace-resolve-
|
|
3615
|
+
const marketplace = await import("./marketplace-command-NMOH4XOV.js");
|
|
3616
|
+
const { withCatalogueRerun } = await import("./marketplace-resolve-63QWMQZU.js");
|
|
3579
3617
|
try {
|
|
3580
3618
|
if (args.subcommand === "list") return await marketplace.runMarketplaceListCommand(args);
|
|
3581
3619
|
if (args.subcommand === "search") return await marketplace.runMarketplaceSearchCommand(args);
|
|
@@ -3588,7 +3626,7 @@ async function dispatch(rawArgv) {
|
|
|
3588
3626
|
}
|
|
3589
3627
|
}
|
|
3590
3628
|
if (command === "preflight") {
|
|
3591
|
-
const { runPreflightCommand } = await import("./preflight-command-
|
|
3629
|
+
const { runPreflightCommand } = await import("./preflight-command-3BX2WW3S.js");
|
|
3592
3630
|
return runPreflightCommand(args);
|
|
3593
3631
|
}
|
|
3594
3632
|
if (command !== "compile" && command !== "export" && command !== "paths" && command !== "routes") {
|
|
@@ -3603,12 +3641,12 @@ async function dispatch(rawArgv) {
|
|
|
3603
3641
|
if (command === "paths" || command === "routes") {
|
|
3604
3642
|
return runPaths(args);
|
|
3605
3643
|
}
|
|
3606
|
-
const { discoverToolchainPlugins } = await import("./toolchain-modules-
|
|
3644
|
+
const { discoverToolchainPlugins } = await import("./toolchain-modules-PBVBCPQJ.js");
|
|
3607
3645
|
const toolchain = await discoverToolchainPlugins(process.cwd(), {
|
|
3608
3646
|
frozen: args.frozenLock === true || args.check === true
|
|
3609
3647
|
});
|
|
3610
3648
|
if (out && !args.check) {
|
|
3611
|
-
const { assertWritableTarget } = await import("./output-target-
|
|
3649
|
+
const { assertWritableTarget } = await import("./output-target-5PYRCCK4.js");
|
|
3612
3650
|
assertWritableTarget(out, "--out");
|
|
3613
3651
|
}
|
|
3614
3652
|
const { bundle: json, bundleObject, omittedSeedTables, lock: lockOutcome, declaredEnvNames } = await compileBundle(args);
|
|
@@ -3626,7 +3664,7 @@ async function dispatch(rawArgv) {
|
|
|
3626
3664
|
"export.hosted-files-omitted"
|
|
3627
3665
|
);
|
|
3628
3666
|
}
|
|
3629
|
-
const { runBundleHooks } = await import("./toolchain-hooks-
|
|
3667
|
+
const { runBundleHooks } = await import("./toolchain-hooks-IJWV3ZQS.js");
|
|
3630
3668
|
await runBundleHooks(
|
|
3631
3669
|
toolchain.loaded,
|
|
3632
3670
|
{
|
|
@@ -3639,15 +3677,15 @@ async function dispatch(rawArgv) {
|
|
|
3639
3677
|
},
|
|
3640
3678
|
""
|
|
3641
3679
|
);
|
|
3642
|
-
const { refreshEnvExample, bundleEnvNames: bundleEnvNames2 } = await import("./env-example-refresh-
|
|
3643
|
-
const { backendDirFor } = await import("./backend-dir-
|
|
3680
|
+
const { refreshEnvExample, bundleEnvNames: bundleEnvNames2 } = await import("./env-example-refresh-HHEGMFNH.js");
|
|
3681
|
+
const { backendDirFor } = await import("./backend-dir-AXR43HNV.js");
|
|
3644
3682
|
const declaredSet = new Set(declaredEnvNames);
|
|
3645
3683
|
const templateDir = backendDirFor(args.file);
|
|
3646
|
-
const ownsTemplate = isWithin(resolve2(args.file), templateDir) && (dirname2(resolve2(args.file)) === templateDir || !
|
|
3684
|
+
const ownsTemplate = isWithin(resolve2(args.file), templateDir) && (dirname2(resolve2(args.file)) === templateDir || !existsSync3(join3(templateDir, "index.ts")));
|
|
3647
3685
|
const templateEnv = Object.fromEntries(
|
|
3648
3686
|
Object.entries(bundleEnvNames2(bundleObject)).filter(([name]) => declaredSet.has(name))
|
|
3649
3687
|
);
|
|
3650
|
-
const { skewedProjectSdk, skewNote, installedCliCommand } = await import("./project-sdk-
|
|
3688
|
+
const { skewedProjectSdk, skewNote, installedCliCommand } = await import("./project-sdk-DKZBK5H5.js");
|
|
3651
3689
|
const projectSdk = skewedProjectSdk(dirname2(resolve2(args.file)), readVersion());
|
|
3652
3690
|
const regenerate = projectSdk === void 0 ? `xanosdk export ${shellWord(pastePath(args.file))} --out ${NULL_DEVICE}` : installedCliCommand(projectSdk.root, (path) => `export ${path(args.file)} --out ${NULL_DEVICE}`);
|
|
3653
3691
|
if (args.check) {
|
|
@@ -3673,7 +3711,7 @@ async function dispatch(rawArgv) {
|
|
|
3673
3711
|
}
|
|
3674
3712
|
}
|
|
3675
3713
|
const lockPath = resolveLockPath(args, args.file);
|
|
3676
|
-
const lock = !args.noLock &&
|
|
3714
|
+
const lock = !args.noLock && existsSync3(lockPath) ? { path: displayPath(lockPath), changed: false } : null;
|
|
3677
3715
|
if (isMachineOutput(args)) writeJson({ checked: resolve2(args.file), lock, written: false });
|
|
3678
3716
|
else {
|
|
3679
3717
|
success(
|
|
@@ -3682,7 +3720,7 @@ async function dispatch(rawArgv) {
|
|
|
3682
3720
|
}
|
|
3683
3721
|
return;
|
|
3684
3722
|
}
|
|
3685
|
-
const hadEnvExample =
|
|
3723
|
+
const hadEnvExample = existsSync3(join3(templateDir, ".env.example"));
|
|
3686
3724
|
const held = ownsTemplate && projectSdk !== void 0 ? refreshEnvExample(templateDir, templateEnv, { write: false }) : void 0;
|
|
3687
3725
|
if (held !== void 0) {
|
|
3688
3726
|
warn(skewNote(displayPath(held), readVersion(), projectSdk.version, regenerate), "export.env-example-cli-skew");
|
|
@@ -3691,22 +3729,22 @@ async function dispatch(rawArgv) {
|
|
|
3691
3729
|
try {
|
|
3692
3730
|
refreshed = ownsTemplate && projectSdk === void 0 ? refreshEnvExample(templateDir, templateEnv) : void 0;
|
|
3693
3731
|
} catch (err) {
|
|
3694
|
-
if (isUnwritableError(err)) throw unwritableError(
|
|
3732
|
+
if (isUnwritableError(err)) throw unwritableError(join3(templateDir, ".env.example"));
|
|
3695
3733
|
throw err;
|
|
3696
3734
|
}
|
|
3697
3735
|
if (refreshed !== void 0) {
|
|
3698
3736
|
info(`${hadEnvExample ? "Updated" : "Wrote"} ${displayPath(refreshed)} to list the env names this source declares.`);
|
|
3699
3737
|
}
|
|
3700
3738
|
if (out) {
|
|
3701
|
-
const { secretsCarriedBy } = await import("./live-diff-
|
|
3702
|
-
const { writeExportFile } = await import("./output-target-
|
|
3739
|
+
const { secretsCarriedBy } = await import("./live-diff-KJ2TWWWT.js");
|
|
3740
|
+
const { writeExportFile } = await import("./output-target-5PYRCCK4.js");
|
|
3703
3741
|
const written = lockOutcome?.changed ? `Only ${lockOutcome.path} was written` : void 0;
|
|
3704
3742
|
writeExportFile(out, json + "\n", secretsCarriedBy(bundleObject), "--out", written);
|
|
3705
3743
|
reportWrote(args, out, lockOutcome);
|
|
3706
3744
|
} else {
|
|
3707
3745
|
process.stdout.write(json + "\n");
|
|
3708
|
-
const { secretsCarriedBy } = await import("./live-diff-
|
|
3709
|
-
const { secretsPhrase } = await import("./output-target-
|
|
3746
|
+
const { secretsCarriedBy } = await import("./live-diff-KJ2TWWWT.js");
|
|
3747
|
+
const { secretsPhrase } = await import("./output-target-5PYRCCK4.js");
|
|
3710
3748
|
const secrets = secretsCarriedBy(bundleObject);
|
|
3711
3749
|
if (secrets.length > 0) {
|
|
3712
3750
|
warn(
|
|
@@ -3725,11 +3763,11 @@ async function refreshAgentGuidance(args) {
|
|
|
3725
3763
|
if (args.noRefresh) return;
|
|
3726
3764
|
if (args.check || args.frozenLock || args.dryRun) return;
|
|
3727
3765
|
try {
|
|
3728
|
-
const { installedSdk, skewedProjectSdk, skewNote, installedCliCommand } = await import("./project-sdk-
|
|
3766
|
+
const { installedSdk, skewedProjectSdk, skewNote, installedCliCommand } = await import("./project-sdk-DKZBK5H5.js");
|
|
3729
3767
|
const entryProject = args.file === void 0 ? void 0 : installedSdk(dirname2(resolve2(args.file)))?.root;
|
|
3730
|
-
const projectDir =
|
|
3768
|
+
const projectDir = existsSync3(join3(process.cwd(), "AGENTS.md")) || entryProject === void 0 ? process.cwd() : entryProject;
|
|
3731
3769
|
const projectSdk = skewedProjectSdk(projectDir, readVersion());
|
|
3732
|
-
const { refreshAgentFiles } = await import("./agent-file-refresh-
|
|
3770
|
+
const { refreshAgentFiles } = await import("./agent-file-refresh-DBHTEFYM.js");
|
|
3733
3771
|
if (projectSdk !== void 0) {
|
|
3734
3772
|
const stale = refreshAgentFiles({ projectDir, sdkVersion: readVersion(), write: false });
|
|
3735
3773
|
const file = args.file;
|
|
@@ -3737,7 +3775,7 @@ async function refreshAgentGuidance(args) {
|
|
|
3737
3775
|
projectSdk.root,
|
|
3738
3776
|
(path) => `export${file === void 0 ? "" : ` ${path(file)}`} --out ${NULL_DEVICE}`
|
|
3739
3777
|
);
|
|
3740
|
-
for (const path of stale) info(skewNote(displayPath(
|
|
3778
|
+
for (const path of stale) info(skewNote(displayPath(join3(projectDir, path)), readVersion(), projectSdk.version, command));
|
|
3741
3779
|
return;
|
|
3742
3780
|
}
|
|
3743
3781
|
const refreshed = refreshAgentFiles({
|
|
@@ -3745,7 +3783,7 @@ async function refreshAgentGuidance(args) {
|
|
|
3745
3783
|
sdkVersion: readVersion()
|
|
3746
3784
|
});
|
|
3747
3785
|
for (const path of refreshed) {
|
|
3748
|
-
process.stderr.write(`Refreshed ${displayPath(
|
|
3786
|
+
process.stderr.write(`Refreshed ${displayPath(join3(projectDir, path))} for @xano/sdk ${readVersion()}.
|
|
3749
3787
|
`);
|
|
3750
3788
|
}
|
|
3751
3789
|
} catch {
|
|
@@ -3755,22 +3793,22 @@ function nearestLockPath(file) {
|
|
|
3755
3793
|
const start = dirname2(resolve2(file));
|
|
3756
3794
|
let dir = start;
|
|
3757
3795
|
for (; ; ) {
|
|
3758
|
-
const candidate =
|
|
3759
|
-
if (
|
|
3760
|
-
if (holdsProjectManifest(dir)) return
|
|
3796
|
+
const candidate = join3(dir, "xano.lock");
|
|
3797
|
+
if (existsSync3(candidate)) return candidate;
|
|
3798
|
+
if (holdsProjectManifest(dir)) return join3(start, "xano.lock");
|
|
3761
3799
|
const parent = dirname2(dir);
|
|
3762
|
-
if (parent === dir) return
|
|
3800
|
+
if (parent === dir) return join3(start, "xano.lock");
|
|
3763
3801
|
dir = parent;
|
|
3764
3802
|
}
|
|
3765
3803
|
}
|
|
3766
3804
|
function missingLockDir(args) {
|
|
3767
3805
|
if (args.lockPath === void 0) return void 0;
|
|
3768
3806
|
const dir = dirname2(resolve2(args.lockPath));
|
|
3769
|
-
if (
|
|
3807
|
+
if (existsSync3(dir)) return void 0;
|
|
3770
3808
|
return `\`--lock=${args.lockPath}\`: ${displayPath(dir)}/ doesn't exist \u2014 create it, or pass a \`--lock\` path in an existing directory.`;
|
|
3771
3809
|
}
|
|
3772
3810
|
function resolveLockPath(args, file) {
|
|
3773
|
-
return args.lockPath !== void 0 ? resolve2(args.lockPath) :
|
|
3811
|
+
return args.lockPath !== void 0 ? resolve2(args.lockPath) : join3(dirname2(resolve2(file)), "xano.lock");
|
|
3774
3812
|
}
|
|
3775
3813
|
function isParseableLock(lockPath) {
|
|
3776
3814
|
try {
|
|
@@ -3834,22 +3872,22 @@ function describeDefaultExport(def) {
|
|
|
3834
3872
|
}
|
|
3835
3873
|
async function runCompile(args) {
|
|
3836
3874
|
const file = args.file;
|
|
3837
|
-
if (
|
|
3875
|
+
if (existsSync3(file) && statSync3(file).isDirectory()) {
|
|
3838
3876
|
const example = readdirSync2(file).filter((n) => /\.[mc]?ts$/.test(n) && !n.endsWith(".d.ts")).sort()[0] ?? "<def>.ts";
|
|
3839
3877
|
throw new UsageError(
|
|
3840
|
-
`compile: "${file}" is a directory. \`compile\` takes one module that exports a single def \u2014 \`xanosdk compile ${shellWord(
|
|
3878
|
+
`compile: "${file}" is a directory. \`compile\` takes one module that exports a single def \u2014 \`xanosdk compile ${shellWord(join3(file, example))}\`; for a whole workspace, \`xanosdk export <entry>\`.`,
|
|
3841
3879
|
{ hintFor: { command: "compile" } }
|
|
3842
3880
|
);
|
|
3843
3881
|
}
|
|
3844
3882
|
const lockPath = args.lockPath !== void 0 ? resolve2(args.lockPath) : nearestLockPath(file);
|
|
3845
|
-
if (args.lockPath !== void 0 && !
|
|
3883
|
+
if (args.lockPath !== void 0 && !existsSync3(lockPath)) {
|
|
3846
3884
|
throw new UsageError(
|
|
3847
3885
|
`compile: no lock file at ${displayPath(lockPath)}. \`compile\` reads the lock and never writes one \u2014 point \`--lock\` at the xano.lock \`xanosdk export\` wrote, or drop it to use the nearest one.`,
|
|
3848
3886
|
{ hintFor: { command: "compile" } }
|
|
3849
3887
|
);
|
|
3850
3888
|
}
|
|
3851
3889
|
resetLockOverrides();
|
|
3852
|
-
if (
|
|
3890
|
+
if (existsSync3(lockPath)) {
|
|
3853
3891
|
seedLockOverrides(readLockFile(lockPath));
|
|
3854
3892
|
}
|
|
3855
3893
|
const mod = await loadModule(file);
|
|
@@ -3894,7 +3932,7 @@ async function runCompile(args) {
|
|
|
3894
3932
|
const raised = [];
|
|
3895
3933
|
const previousSink = setDiagnosticSink((d) => raised.push(d));
|
|
3896
3934
|
const docTokens = /* @__PURE__ */ Object.create(null);
|
|
3897
|
-
for (const [key, entry] of Object.entries(readSecretsFile(
|
|
3935
|
+
for (const [key, entry] of Object.entries(readSecretsFile(join3(dirname2(lockPath), ".secrets.json"))?.documentationTokens ?? {})) {
|
|
3898
3936
|
docTokens[key] = entry.value;
|
|
3899
3937
|
}
|
|
3900
3938
|
let artifact;
|
|
@@ -3915,7 +3953,7 @@ async function runCompile(args) {
|
|
|
3915
3953
|
raised.push({
|
|
3916
3954
|
severity: "warning",
|
|
3917
3955
|
code: "doc-token.unsupplied",
|
|
3918
|
-
message: `API group "${one.name}" declares a documentation gate and no token was found for it in \`${displayPath(
|
|
3956
|
+
message: `API group "${one.name}" declares a documentation gate and no token was found for it in \`${displayPath(join3(dirname2(lockPath), ".secrets.json"))}\`, so this artifact carries no \`documentation\` block \u2014 the bytes an export would write CLEAR the group's gate. \`xanosdk pull\` stores the token there.`
|
|
3919
3957
|
});
|
|
3920
3958
|
}
|
|
3921
3959
|
checkCompiledDef(one, artifact, args.strict === true, raised);
|
|
@@ -3962,8 +4000,8 @@ async function runPaths(args) {
|
|
|
3962
4000
|
}
|
|
3963
4001
|
const lockPath = resolveLockPath(args, file);
|
|
3964
4002
|
resetLockOverrides();
|
|
3965
|
-
const lockModel =
|
|
3966
|
-
const toolchain = args.emit !== void 0 ? await (await import("./toolchain-modules-
|
|
4003
|
+
const lockModel = existsSync3(lockPath) ? readLockFile(lockPath) : void 0;
|
|
4004
|
+
const toolchain = args.emit !== void 0 ? await (await import("./toolchain-modules-PBVBCPQJ.js")).discoverToolchainPlugins(emitProjectDir(args.emit, file), {
|
|
3967
4005
|
frozen: args.strict === true,
|
|
3968
4006
|
// A module outside its SDK peer range keeps its block and is named,
|
|
3969
4007
|
// as any other skip is; it does not abort every `dev` and `build`.
|
|
@@ -3985,13 +4023,13 @@ async function runPaths(args) {
|
|
|
3985
4023
|
setDiagnosticSink(outerSink);
|
|
3986
4024
|
}
|
|
3987
4025
|
const payload = bundle.payload;
|
|
3988
|
-
const { planRouteManifest, manifestCounts, describeManifestCounts, routesListing, formatRoutesListing, NO_MANIFEST_COUNTS } = await import("./routes-manifest-
|
|
4026
|
+
const { planRouteManifest, manifestCounts, describeManifestCounts, routesListing, formatRoutesListing, NO_MANIFEST_COUNTS } = await import("./routes-manifest-N73THJB3.js");
|
|
3989
4027
|
const plan = planRouteManifest(payload, (kind, name) => lockModel?.objects[lockKey(kind, name)]?.canonical);
|
|
3990
4028
|
const queryCount = plan.rows.length;
|
|
3991
4029
|
const serverCount = plan.servers.length + plan.unresolvedServers.length + plan.mcpServers.length + plan.unresolvedMcpServers.length;
|
|
3992
4030
|
const machine = isMachineOutput(args);
|
|
3993
4031
|
const emitDoc = (written, counts = NO_MANIFEST_COUNTS) => ({ emit: resolve2(args.emit), written, ...counts });
|
|
3994
|
-
const emptiedManifest = args.emit !== void 0 && queryCount === 0 && serverCount === 0 &&
|
|
4032
|
+
const emptiedManifest = args.emit !== void 0 && queryCount === 0 && serverCount === 0 && existsSync3(args.emit);
|
|
3995
4033
|
if (queryCount === 0 && serverCount === 0 && !emptiedManifest) {
|
|
3996
4034
|
if (args.emit === void 0) info("No endpoints, realtime servers or MCP servers registered in this workspace.");
|
|
3997
4035
|
if (machine && args.emit !== "-") writeJson(args.emit !== void 0 ? emitDoc(false) : routesListing(plan));
|
|
@@ -4015,7 +4053,7 @@ async function runPaths(args) {
|
|
|
4015
4053
|
if (args.emit !== void 0) {
|
|
4016
4054
|
const counts = manifestCounts(plan);
|
|
4017
4055
|
if (unresolved.length > 0) {
|
|
4018
|
-
const { unresolvedCanonicalMessage } = await import("./routes-manifest-
|
|
4056
|
+
const { unresolvedCanonicalMessage } = await import("./routes-manifest-N73THJB3.js");
|
|
4019
4057
|
const why = `${args.emit} was not written: ${unresolvedCanonicalMessage(unresolved, shellWord(file))}`;
|
|
4020
4058
|
if (args.strict) throw new Error(`--strict: ${why}`);
|
|
4021
4059
|
warn(why, "routes.not-written");
|
|
@@ -4027,7 +4065,7 @@ async function runPaths(args) {
|
|
|
4027
4065
|
if (machine && args.emit !== "-") writeJson(emitDoc(false));
|
|
4028
4066
|
return;
|
|
4029
4067
|
}
|
|
4030
|
-
const { renderManifestFile, reportModuleFailures } = await import("./routes-manifest-file-
|
|
4068
|
+
const { renderManifestFile, reportModuleFailures } = await import("./routes-manifest-file-LDUDIVFJ.js");
|
|
4031
4069
|
const loaded = toolchain?.loaded ?? [];
|
|
4032
4070
|
const skipped = toolchain?.skipped ?? [];
|
|
4033
4071
|
const rendered = renderManifestFile(
|
|
@@ -4037,7 +4075,7 @@ async function runPaths(args) {
|
|
|
4037
4075
|
skipped,
|
|
4038
4076
|
// Read only when a module could fail or be skipped: with none, nothing
|
|
4039
4077
|
// is carried forward and `renderManifestFile` never consults it.
|
|
4040
|
-
previous: loaded.length + skipped.length > 0 && args.emit !== "-" &&
|
|
4078
|
+
previous: loaded.length + skipped.length > 0 && args.emit !== "-" && existsSync3(args.emit) ? readFileSync3(args.emit, "utf8") : void 0,
|
|
4041
4079
|
sdkVersion: readVersion()
|
|
4042
4080
|
},
|
|
4043
4081
|
{ orEmpty: true }
|
|
@@ -4049,10 +4087,10 @@ async function runPaths(args) {
|
|
|
4049
4087
|
writeData(process.stdout, source);
|
|
4050
4088
|
return;
|
|
4051
4089
|
}
|
|
4052
|
-
const { installedSdk, skewedProjectSdk, skewNote, installedCliCommand } = await import("./project-sdk-
|
|
4090
|
+
const { installedSdk, skewedProjectSdk, skewNote, installedCliCommand } = await import("./project-sdk-DKZBK5H5.js");
|
|
4053
4091
|
const emitDir = dirname2(resolve2(args.emit));
|
|
4054
4092
|
const projectSdk = skewedProjectSdk(installedSdk(emitDir) !== void 0 ? emitDir : dirname2(resolve2(file)), readVersion());
|
|
4055
|
-
if (projectSdk !== void 0 &&
|
|
4093
|
+
if (projectSdk !== void 0 && existsSync3(args.emit) && readFileSync3(args.emit, "utf8") !== source) {
|
|
4056
4094
|
const emit2 = args.emit;
|
|
4057
4095
|
const installed = installedCliCommand(
|
|
4058
4096
|
projectSdk.root,
|
|
@@ -4069,7 +4107,7 @@ async function runPaths(args) {
|
|
|
4069
4107
|
return;
|
|
4070
4108
|
}
|
|
4071
4109
|
if (args.strict) {
|
|
4072
|
-
const current =
|
|
4110
|
+
const current = existsSync3(args.emit) ? readFileSync3(args.emit, "utf8") : void 0;
|
|
4073
4111
|
if (current !== source) {
|
|
4074
4112
|
throw new CliError(
|
|
4075
4113
|
DRIFT,
|
|
@@ -4080,7 +4118,7 @@ async function runPaths(args) {
|
|
|
4080
4118
|
}
|
|
4081
4119
|
let written = false;
|
|
4082
4120
|
if (!args.strict) {
|
|
4083
|
-
const current =
|
|
4121
|
+
const current = existsSync3(args.emit) ? readFileSync3(args.emit, "utf8") : void 0;
|
|
4084
4122
|
if (current === source) {
|
|
4085
4123
|
info(`${args.emit} is already up to date (${count}).`);
|
|
4086
4124
|
} else {
|
|
@@ -4104,16 +4142,16 @@ async function runPaths(args) {
|
|
|
4104
4142
|
process.stdout.write(formatRoutesListing(routesListing(plan)));
|
|
4105
4143
|
}
|
|
4106
4144
|
if (unresolved.length > 0) {
|
|
4107
|
-
const { unresolvedCanonicalMessage } = await import("./routes-manifest-
|
|
4145
|
+
const { unresolvedCanonicalMessage } = await import("./routes-manifest-N73THJB3.js");
|
|
4108
4146
|
throw new UsageError(`${commandLabel(args)}: ${unresolvedCanonicalMessage(unresolved, shellWord(file))}`);
|
|
4109
4147
|
}
|
|
4110
4148
|
}
|
|
4111
4149
|
async function refreshRouteManifest(entry, emit2, projectDir) {
|
|
4112
4150
|
resetLockOverrides();
|
|
4113
|
-
const lockPath =
|
|
4114
|
-
const lockModel =
|
|
4115
|
-
const { discoverToolchainPlugins } = await import("./toolchain-modules-
|
|
4116
|
-
const toolchain =
|
|
4151
|
+
const lockPath = join3(dirname2(resolve2(entry)), "xano.lock");
|
|
4152
|
+
const lockModel = existsSync3(lockPath) ? readLockFile(lockPath) : void 0;
|
|
4153
|
+
const { discoverToolchainPlugins } = await import("./toolchain-modules-PBVBCPQJ.js");
|
|
4154
|
+
const toolchain = existsSync3(emit2) ? await discoverToolchainPlugins(projectDir, { frozen: false, configuring: true, peerSkew: "skip" }) : void 0;
|
|
4117
4155
|
const def = await loadDefault(entry);
|
|
4118
4156
|
if (!Xano.isXano(def)) return { manifest: "absent", lockOrphans: 0 };
|
|
4119
4157
|
const previousSink = setDiagnosticSink(() => {
|
|
@@ -4124,12 +4162,12 @@ async function refreshRouteManifest(entry, emit2, projectDir) {
|
|
|
4124
4162
|
} finally {
|
|
4125
4163
|
setDiagnosticSink(previousSink);
|
|
4126
4164
|
}
|
|
4127
|
-
const { pulledIdentities } = await import("./pull-command-
|
|
4165
|
+
const { pulledIdentities } = await import("./pull-command-B7OVWTZD.js");
|
|
4128
4166
|
const live = pulledIdentities(payload);
|
|
4129
4167
|
const lockOrphans = lockModel === void 0 ? 0 : Object.keys(lockModel.objects).filter((k) => k !== WORKSPACE_KEY && !live.has(k)).length;
|
|
4130
|
-
if (!
|
|
4131
|
-
const { planRouteManifest, RouteManifestError } = await import("./routes-manifest-
|
|
4132
|
-
const { renderManifestFile, reportModuleFailures } = await import("./routes-manifest-file-
|
|
4168
|
+
if (!existsSync3(emit2)) return { manifest: "absent", lockOrphans };
|
|
4169
|
+
const { planRouteManifest, RouteManifestError } = await import("./routes-manifest-N73THJB3.js");
|
|
4170
|
+
const { renderManifestFile, reportModuleFailures } = await import("./routes-manifest-file-LDUDIVFJ.js");
|
|
4133
4171
|
const plan = planRouteManifest(payload, (kind, name) => lockModel?.objects[lockKey(kind, name)]?.canonical);
|
|
4134
4172
|
if (plan.unresolved.length > 0) return { manifest: "skipped", lockOrphans };
|
|
4135
4173
|
const current = readFileSync3(emit2, "utf8");
|
|
@@ -4158,7 +4196,7 @@ async function refreshRouteManifest(entry, emit2, projectDir) {
|
|
|
4158
4196
|
}
|
|
4159
4197
|
function routesRegenerateCommand(file, emit2) {
|
|
4160
4198
|
try {
|
|
4161
|
-
const pkg = JSON.parse(readFileSync3(
|
|
4199
|
+
const pkg = JSON.parse(readFileSync3(join3(process.cwd(), "package.json"), "utf8"));
|
|
4162
4200
|
const script = pkg.scripts?.["xano:routes"];
|
|
4163
4201
|
if (typeof script === "string" && script.includes(`--emit ${emit2}`)) return "`npm run xano:routes`";
|
|
4164
4202
|
} catch {
|
|
@@ -4171,7 +4209,7 @@ async function exportBundleJson(args) {
|
|
|
4171
4209
|
async function compileBundle(args, opts = {}) {
|
|
4172
4210
|
const file = args.file;
|
|
4173
4211
|
const lockPath = resolveLockPath(args, file);
|
|
4174
|
-
const lockExists =
|
|
4212
|
+
const lockExists = existsSync3(lockPath);
|
|
4175
4213
|
resetLockOverrides();
|
|
4176
4214
|
let lockCtx;
|
|
4177
4215
|
let originalSerialized;
|
|
@@ -4357,7 +4395,7 @@ ${remedy}`;
|
|
|
4357
4395
|
if (dryRun && opts.deferOrphanWarning !== true) warnLockOrphans();
|
|
4358
4396
|
} else writeLock();
|
|
4359
4397
|
}
|
|
4360
|
-
reportCapabilities(bundle);
|
|
4398
|
+
reportCapabilities(bundle, args);
|
|
4361
4399
|
const files = hostedFiles.files().map((f) => ({ name: hostedFileArchivePath(f), content: f.bytes }));
|
|
4362
4400
|
const resolvedContent = await buildSeedContentFiles(
|
|
4363
4401
|
def.tables(),
|
|
@@ -4397,7 +4435,7 @@ function secretsRemedyFor(entryFile) {
|
|
|
4397
4435
|
const dir = dirname2(path);
|
|
4398
4436
|
return {
|
|
4399
4437
|
file: projectRelative(path, entryFile, WORKSPACE_SECRETS_FILE),
|
|
4400
|
-
fill:
|
|
4438
|
+
fill: existsSync3(dir) ? fill : `mkdir ${shellWord(displayPath(dir))} && ${fill}`
|
|
4401
4439
|
};
|
|
4402
4440
|
}
|
|
4403
4441
|
function resolveWorkspaceEnv(args, file, settings) {
|
|
@@ -4407,7 +4445,8 @@ function resolveWorkspaceEnv(args, file, settings) {
|
|
|
4407
4445
|
const explicit = args.envFile !== void 0 ? resolve2(args.envFile) : void 0;
|
|
4408
4446
|
const defaultPath = defaultWorkspaceEnvPath(file);
|
|
4409
4447
|
const defaultLabel = projectRelative(defaultPath, file, WORKSPACE_ENV_FILE);
|
|
4410
|
-
const
|
|
4448
|
+
const fileContents = explicit !== void 0 ? readEnvFile(explicit) : readWorkspaceEnvFileContents(defaultPath);
|
|
4449
|
+
const fileValues = fileContents?.values;
|
|
4411
4450
|
const badDeclared = declaredNames.filter((n) => !isRepresentableName(n));
|
|
4412
4451
|
if (badDeclared.length > 0) {
|
|
4413
4452
|
const one = badDeclared.length === 1;
|
|
@@ -4431,7 +4470,18 @@ function resolveWorkspaceEnv(args, file, settings) {
|
|
|
4431
4470
|
});
|
|
4432
4471
|
const source = explicit !== void 0 ? displayPath(explicit) : fileValues !== void 0 ? defaultLabel : void 0;
|
|
4433
4472
|
const allowed = new Set(args.allowEmptyEnv);
|
|
4434
|
-
const
|
|
4473
|
+
const fileBare = (fileContents?.bareEmpty ?? []).filter((n) => !Object.hasOwn(args.envVars, n));
|
|
4474
|
+
const inlineHash = (fileContents?.inlineHash ?? []).filter((n) => !Object.hasOwn(args.envVars, n));
|
|
4475
|
+
if (inlineHash.length > 0) {
|
|
4476
|
+
const one = inlineHash.length === 1;
|
|
4477
|
+
exportWarn(
|
|
4478
|
+
"workspace-env.inline-comment",
|
|
4479
|
+
`Workspace env: the value of ${inlineHash.join(", ")} in \`${explicit !== void 0 ? displayPath(explicit) : defaultLabel}\` carries " #", and ${one ? "it is" : "they are"} sent with it: the file has no inline comments, so \`KEY=abc # note\` sends "abc # note". Move the comment to its own line, or quote the value (\`KEY="abc # note"\`) if the "#" is meant.`
|
|
4480
|
+
);
|
|
4481
|
+
}
|
|
4482
|
+
const undeclared = [...allowed].filter(
|
|
4483
|
+
(n) => !declaredNames.includes(n) && args.envVars[n] !== "" && !fileBare.includes(n)
|
|
4484
|
+
);
|
|
4435
4485
|
if (undeclared.length > 0) {
|
|
4436
4486
|
throw new UsageError(
|
|
4437
4487
|
`--allow-empty-env: ${safeNames(undeclared)} ${undeclared.length === 1 ? "is" : "are"} not declared.` + (declaredNames.length === 0 ? ` This workspace declares no env vars \u2014 a name is declared in \`workspaceConfig({ env })\`.` : ` Declared: ${safeNames(declaredNames)}.`)
|
|
@@ -4450,6 +4500,7 @@ function resolveWorkspaceEnv(args, file, settings) {
|
|
|
4450
4500
|
source,
|
|
4451
4501
|
flagged,
|
|
4452
4502
|
allowed,
|
|
4503
|
+
fileBare,
|
|
4453
4504
|
refuses,
|
|
4454
4505
|
defaultLabel,
|
|
4455
4506
|
comparesOnly,
|
|
@@ -4457,17 +4508,30 @@ function resolveWorkspaceEnv(args, file, settings) {
|
|
|
4457
4508
|
merges: merges ? "`--keep-data`" : toMerge ? "`--to`" : void 0
|
|
4458
4509
|
});
|
|
4459
4510
|
const examplePath = `${defaultPath}.example`;
|
|
4460
|
-
const exampleLacks =
|
|
4511
|
+
const exampleLacks = existsSync3(examplePath) ? unsupplied.filter((n) => !namesInEnvExample(examplePath).includes(n)) : void 0;
|
|
4461
4512
|
const dryRun = args.dryRun === true;
|
|
4462
|
-
const
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4513
|
+
const bare = fileBare.filter((n) => !allowed.has(n));
|
|
4514
|
+
const refusal = (replaceWhy) => {
|
|
4515
|
+
const parts = [];
|
|
4516
|
+
if (unsupplied.length > 0) {
|
|
4517
|
+
parts.push(
|
|
4518
|
+
unsuppliedEnvError(unsupplied, source ?? defaultLabel, source !== void 0, exampleLacks, {
|
|
4519
|
+
...replaceWhy !== void 0 ? { replaceWhy } : {},
|
|
4520
|
+
mode: replaceWhy === void 0 && toMerge ? "merge" : "replace",
|
|
4521
|
+
dryRun
|
|
4522
|
+
})
|
|
4523
|
+
);
|
|
4524
|
+
}
|
|
4525
|
+
if (bare.length > 0 && (replaceWhy !== void 0 || !toMerge)) {
|
|
4526
|
+
parts.push(bareEmptyEnvError(bare, source ?? defaultLabel, { ...replaceWhy !== void 0 ? { replaceWhy } : {}, dryRun }));
|
|
4527
|
+
}
|
|
4528
|
+
return parts.length > 0 ? parts.join("\n\n") : void 0;
|
|
4529
|
+
};
|
|
4530
|
+
mergeExcusedEnv = merges && (unsupplied.length > 0 || bare.length > 0) ? (why) => refusal(why) ?? "" : void 0;
|
|
4531
|
+
const refused = refuses && !merges ? refusal() : void 0;
|
|
4532
|
+
if (refused !== void 0) {
|
|
4533
|
+
if (dryRun) warn(refused, "workspace-env.unsupplied");
|
|
4534
|
+
else throw new Error(refused);
|
|
4471
4535
|
}
|
|
4472
4536
|
return resolution.values;
|
|
4473
4537
|
}
|
|
@@ -4524,8 +4588,8 @@ function resolveDocumentationTokens(args, file, def) {
|
|
|
4524
4588
|
"doc-token.orphan",
|
|
4525
4589
|
`Documentation tokens: \`${source}\` holds ${orphans.length} entr${orphans.length === 1 ? "y" : "ies"} no scope in this source claims \u2014 ${safeNames(orphans)}. Nothing is sent for ${orphans.length === 1 ? "it" : "them"}, and nothing is deleted. ` + // A lock keeps a renamed group's identity, so there the cause is a
|
|
4526
4590
|
// group removed, or its gate dropped from the source.
|
|
4527
|
-
(
|
|
4528
|
-
(
|
|
4591
|
+
(existsSync3(join3(dirname2(secretsPath), "xano.lock")) ? `Usually an API group that was removed, or whose \`documentation\` gate was dropped; ` : `Usually a renamed API group in a project with no lock; `) + // Only a decoded project has a pull that rebuilds the file.
|
|
4592
|
+
(existsSync3(join3(dirname2(secretsPath), ".xanosdk-codegen.json")) ? `pull again to rebuild the file.` : `move the token to the group's new entry, or delete ${orphans.length === 1 ? "the entry" : "them"} from \`${source}\`.`)
|
|
4529
4593
|
);
|
|
4530
4594
|
}
|
|
4531
4595
|
const refuses = REFUSES_EMPTY_DOC_TOKEN.has(args.command ?? "");
|
|
@@ -4653,7 +4717,7 @@ async function refineGonePullHint(err) {
|
|
|
4653
4717
|
if (offer === void 0 || auth === void 0 || !(err instanceof Error) || !err.message.includes(offer.clause)) return;
|
|
4654
4718
|
let gone;
|
|
4655
4719
|
try {
|
|
4656
|
-
const { lookupEphemeral } = await import("./source-resolve-
|
|
4720
|
+
const { lookupEphemeral } = await import("./source-resolve-CQGDFQQC.js");
|
|
4657
4721
|
gone = await lookupEphemeral(auth, offer.name) === null;
|
|
4658
4722
|
} catch {
|
|
4659
4723
|
return;
|
|
@@ -4663,6 +4727,12 @@ async function refineGonePullHint(err) {
|
|
|
4663
4727
|
err.message = taken.replace(DO_NOT_COMMIT, `
|
|
4664
4728
|
${pullGone(offer.name, "is gone")}${DO_NOT_COMMIT}`);
|
|
4665
4729
|
}
|
|
4730
|
+
function bareEmptyEnvError(names, source, opts) {
|
|
4731
|
+
const one = names.length === 1;
|
|
4732
|
+
return (opts.dryRun ? "Dry run \u2014 the deploy would refuse: " : "Refusing to deploy: ") + `\`${source}\` leaves ${names.join(", ")} with nothing after the \`=\`.
|
|
4733
|
+
` + (opts.replaceWhy !== void 0 ? `${opts.replaceWhy}: this deploy REPLACES` : "A deploy REPLACES") + ` the backend's env set, so sending ${one ? "it" : "them"} empty would clear ${one ? "that value" : "those values"} in the target.
|
|
4734
|
+
Fill in the value, write \`${names[0]}=""\` to send ${one ? "it" : "each"} empty on purpose, or pass \`--allow-empty-env=${names.join(",")}\`.`;
|
|
4735
|
+
}
|
|
4666
4736
|
function unsuppliedEnvError(unsupplied, source, found, exampleLacks, opts) {
|
|
4667
4737
|
const one = unsupplied.length === 1;
|
|
4668
4738
|
const { replaceWhy } = opts;
|
|
@@ -4688,7 +4758,7 @@ function suppliedFrom(fromFile, file, fromFlag, flag, flagOnly) {
|
|
|
4688
4758
|
}
|
|
4689
4759
|
function reportWorkspaceEnv(r) {
|
|
4690
4760
|
const sent = Object.keys(r.resolution.values).length;
|
|
4691
|
-
const cleared = r.resolution.clearing.filter((n) => r.allowed.has(n));
|
|
4761
|
+
const cleared = [...r.resolution.clearing, ...r.fileBare].filter((n) => r.allowed.has(n));
|
|
4692
4762
|
const unsupplied = r.resolution.clearing.filter((n) => !r.allowed.has(n));
|
|
4693
4763
|
if (r.declaredNames.length === 0 && sent === 0) {
|
|
4694
4764
|
info("Workspace env: no env vars are declared and none were supplied.");
|
|
@@ -4731,15 +4801,16 @@ function reportWorkspaceEnv(r) {
|
|
|
4731
4801
|
);
|
|
4732
4802
|
}
|
|
4733
4803
|
}
|
|
4734
|
-
function reportCapabilities(bundle) {
|
|
4735
|
-
const
|
|
4736
|
-
if (
|
|
4737
|
-
info(
|
|
4738
|
-
for (const
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4804
|
+
function reportCapabilities(bundle, args) {
|
|
4805
|
+
const report = capabilityReport(bundleCapabilities(bundle), { localEngine: deploysToLocalEngine(args) });
|
|
4806
|
+
if (report.info === void 0) return;
|
|
4807
|
+
info(report.info.heading);
|
|
4808
|
+
for (const line of report.info.lines) detail(line);
|
|
4809
|
+
detail(report.info.footer);
|
|
4810
|
+
for (const u of report.unavailable) exportWarn("local.capability-unavailable", u.message, [], false);
|
|
4811
|
+
}
|
|
4812
|
+
function deploysToLocalEngine(args) {
|
|
4813
|
+
return args.command === "deploy" && (args.localEngine || args.to === "local" || args.to?.startsWith("local:") === true);
|
|
4743
4814
|
}
|
|
4744
4815
|
var strictFindings;
|
|
4745
4816
|
var exportFindings = [];
|
|
@@ -4857,4 +4928,4 @@ export {
|
|
|
4857
4928
|
docTokenRefusalIfReplaced,
|
|
4858
4929
|
envRefusalIfReplaced
|
|
4859
4930
|
};
|
|
4860
|
-
//# sourceMappingURL=chunk-
|
|
4931
|
+
//# sourceMappingURL=chunk-QSJH5AFU.js.map
|