@xano/sdk 1.0.4 → 1.0.5
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 +17 -5
- package/README.md +232 -334
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-LB6KIMFY.js → agent-file-refresh-KVLR7M5Y.js} +13 -13
- package/dist/{answer-shape-LVV2SVBK.js → answer-shape-XGR2DGWY.js} +5 -5
- package/dist/{backend-dir-WZADOK3L.js → backend-dir-IE4RMUFH.js} +12 -12
- package/dist/{backend-slot-NSCTWCUX.js → backend-slot-6HBWG5FN.js} +3 -3
- package/dist/bin.js +52 -52
- package/dist/{branch-ONWPJ4V6.js → branch-T2APKPVG.js} +9 -9
- package/dist/{branch-commands-ZT2MJIRS.js → branch-commands-HXXTCSOO.js} +26 -26
- package/dist/{capture-3JNUA6C2.js → capture-HBXFXZEW.js} +4 -4
- package/dist/{chunk-A6QTTJUI.js → chunk-3BJYQGAZ.js} +2 -2
- package/dist/{chunk-5W7DOMIU.js → chunk-3IYVHVM6.js} +2 -2
- package/dist/{chunk-S7E2AHV3.js → chunk-3VX7VAQT.js} +4 -4
- package/dist/{chunk-Y2ZLKBM6.js → chunk-3WHWOKU4.js} +4 -4
- package/dist/{chunk-LXNQWHZM.js → chunk-44CWK6YC.js} +3 -3
- package/dist/{chunk-KCAL4QYP.js → chunk-4GDEEY2U.js} +4 -4
- package/dist/{chunk-KTGRGWZW.js → chunk-4NEBBKOP.js} +7 -7
- package/dist/{chunk-UKUIUS3E.js → chunk-4QBGE3EO.js} +5 -5
- package/dist/{chunk-IVKRT476.js → chunk-4QFBEKXI.js} +2 -2
- package/dist/{chunk-OOXWYAA4.js → chunk-57A5ZKPO.js} +1 -1
- package/dist/{chunk-2B22WWKL.js → chunk-57B56I4B.js} +29 -29
- package/dist/{chunk-OPHB5ORL.js → chunk-57HMNJGB.js} +120 -76
- package/dist/{chunk-O5V3YH5P.js → chunk-5D6DGF3W.js} +8 -8
- package/dist/{chunk-E65QIWOO.js → chunk-5RLAF6RL.js} +4 -4
- package/dist/{chunk-MEE5RZ6G.js → chunk-5XVBT6CQ.js} +2 -2
- package/dist/{chunk-RX3EMQGN.js → chunk-5YBNXNKU.js} +2 -2
- package/dist/{chunk-NA3PXMEF.js → chunk-64WWE3EF.js} +1 -1
- package/dist/{chunk-2LVTBPW2.js → chunk-65SW2BA5.js} +3 -3
- package/dist/{chunk-ET5DSBAC.js → chunk-7DBM6XHR.js} +8 -8
- package/dist/{chunk-DIG3NITC.js → chunk-A4NNCI4O.js} +3 -3
- package/dist/{chunk-4APOHK7Y.js → chunk-AESE434J.js} +2 -2
- package/dist/{chunk-E6H5ZEV3.js → chunk-AGD7F7YI.js} +3 -3
- package/dist/{chunk-44B4V2LR.js → chunk-AGSCOISO.js} +139 -139
- package/dist/{chunk-MLGI2SRQ.js → chunk-AMBEITWL.js} +4 -4
- package/dist/{chunk-5T2CTWTB.js → chunk-BBPAXOU6.js} +5 -5
- package/dist/{chunk-5WGVIXMD.js → chunk-BMCZQZMI.js} +4 -4
- package/dist/{chunk-LUTMOHOW.js → chunk-CJ76PSJT.js} +9 -9
- package/dist/{chunk-D5ZEAF4G.js → chunk-CV54PASI.js} +53 -50
- package/dist/{chunk-MLPDSGJQ.js → chunk-DEVGLLNZ.js} +5 -5
- package/dist/{chunk-JTUKLCXS.js → chunk-DXUICABI.js} +1 -1
- package/dist/{chunk-C4FHQA7R.js → chunk-ES5A66IH.js} +8 -8
- package/dist/{chunk-UDE5C2XN.js → chunk-F3557PVM.js} +3 -3
- package/dist/{chunk-HUSH7LRI.js → chunk-F6IKWAIU.js} +21 -17
- package/dist/{chunk-II747OWE.js → chunk-FV55SRQU.js} +7 -7
- package/dist/{chunk-SEUCZZCP.js → chunk-G57RYMKB.js} +3 -3
- package/dist/{chunk-MNVDVR3M.js → chunk-GMVW6ZZK.js} +4 -4
- package/dist/{chunk-MN2PB6WB.js → chunk-HLQH3AXB.js} +3 -3
- package/dist/{chunk-HSEQYBDO.js → chunk-HOOOOJJP.js} +3 -3
- package/dist/{chunk-IXUPUFCG.js → chunk-I5VEROXW.js} +2 -2
- package/dist/{chunk-UI4OPTYR.js → chunk-IV446ZLJ.js} +2 -2
- package/dist/{chunk-CYB7UQA2.js → chunk-JQOX6HW4.js} +5 -5
- package/dist/{chunk-OPG4DYX2.js → chunk-JSEVKRVJ.js} +3 -3
- package/dist/{chunk-2AUV6NXK.js → chunk-JXKO6JT7.js} +36 -36
- package/dist/{chunk-FPBGAT5D.js → chunk-JZWUAEMO.js} +3 -3
- package/dist/{chunk-6R7S775T.js → chunk-K6CB5TKM.js} +2 -2
- package/dist/{chunk-MCTIKRMN.js → chunk-K6PRKPFX.js} +8 -8
- package/dist/{chunk-W5ONYLOP.js → chunk-KQLACS4Q.js} +4 -4
- package/dist/{chunk-LIVN53UV.js → chunk-KUU7T4ZE.js} +31 -31
- package/dist/{chunk-WFMVKY7I.js → chunk-L3BDO2BI.js} +9 -9
- package/dist/{chunk-664LSWE5.js → chunk-LLS2WO2K.js} +4 -4
- package/dist/{chunk-ESZ2FF57.js → chunk-LZDA6SVD.js} +46 -45
- package/dist/{chunk-UCQ2VUTG.js → chunk-M6ZFSTIZ.js} +2 -2
- package/dist/{chunk-DYG5D3FD.js → chunk-M7GJ6YUF.js} +2 -2
- package/dist/{chunk-XXZZGXW2.js → chunk-MEIJDRHU.js} +2 -2
- package/dist/{chunk-QXTKSOFI.js → chunk-MF4W6FHU.js} +1 -1
- package/dist/{chunk-3FN2BIGB.js → chunk-MYLPOVX6.js} +6 -6
- package/dist/{chunk-FJWZ5OVV.js → chunk-N6BWB35H.js} +3 -3
- package/dist/{chunk-T4DUFQ2S.js → chunk-NGAODDLX.js} +5 -5
- package/dist/{chunk-7PMVIHB3.js → chunk-NNB7VUCH.js} +23 -23
- package/dist/{chunk-6VBTPV2Y.js → chunk-NUU76247.js} +3 -3
- package/dist/{chunk-ZG7E72VI.js → chunk-OGUMHW2X.js} +6 -6
- package/dist/{chunk-I2BGYNHD.js → chunk-OJPZEUPH.js} +7 -7
- package/dist/{chunk-OOGXZL7Z.js → chunk-OKNE3TWU.js} +2 -2
- package/dist/{chunk-KUTFFHUM.js → chunk-OVV2HXJ6.js} +2 -2
- package/dist/{chunk-VRVKNY4A.js → chunk-PIPIA7K7.js} +8 -8
- package/dist/{chunk-AM4FKL4J.js → chunk-PL7AIAWS.js} +12 -12
- package/dist/{chunk-WL2DSNJV.js → chunk-Q22BMRPF.js} +2 -2
- package/dist/{chunk-IJ3SXSZM.js → chunk-QOLOQ35F.js} +6 -6
- package/dist/{chunk-BUECLQXK.js → chunk-QZTJ2556.js} +4 -4
- package/dist/{chunk-O7QOWS6M.js → chunk-RXCT3OCU.js} +12 -12
- package/dist/{chunk-WYEQFD6A.js → chunk-S5KQIFKJ.js} +122 -98
- package/dist/{chunk-CBYQ2ZN3.js → chunk-S5TEJIGP.js} +2 -2
- package/dist/{chunk-HMLGM2MW.js → chunk-SF2B7MZK.js} +3 -3
- package/dist/{chunk-PML67X22.js → chunk-SNGFEESM.js} +3 -3
- package/dist/{chunk-VD32O6KZ.js → chunk-SQPIECXD.js} +3 -3
- package/dist/{chunk-5YL5OC2G.js → chunk-SRX6B544.js} +5 -5
- package/dist/{chunk-CFSFBKHP.js → chunk-TEBS7FE6.js} +2 -2
- package/dist/{chunk-TTVAHCWP.js → chunk-TM5LRSBB.js} +2 -2
- package/dist/{chunk-JP7M7OU7.js → chunk-TUEFTRC2.js} +5 -5
- package/dist/{chunk-EWCDPFW5.js → chunk-U6DR6464.js} +4 -4
- package/dist/{chunk-QAEQGT5I.js → chunk-UIEFE6FU.js} +7 -7
- package/dist/{chunk-3H3EPMFY.js → chunk-UJ6ZZJDD.js} +2 -2
- package/dist/{chunk-3P3HXN76.js → chunk-V4IBHDIY.js} +11 -11
- package/dist/{chunk-XNCP4KYO.js → chunk-VQPDATQT.js} +1 -1
- package/dist/{chunk-4PQHO74B.js → chunk-VZ22VUAS.js} +2 -2
- package/dist/{chunk-BUJRS7XB.js → chunk-WYS6XVZ3.js} +2 -2
- package/dist/{chunk-QV3GXQRE.js → chunk-XIABDKFQ.js} +2 -2
- package/dist/{chunk-EESV6NU2.js → chunk-XJU6UAFV.js} +2 -2
- package/dist/{chunk-SBR2WZXG.js → chunk-XNZURZ7T.js} +59 -52
- package/dist/{chunk-WFG67AYS.js → chunk-Y6NO3DLQ.js} +3 -3
- package/dist/{chunk-37AHZ7JX.js → chunk-Y76ERHLK.js} +5 -5
- package/dist/{chunk-HHW5AWVD.js → chunk-YI76TURL.js} +30 -30
- package/dist/{chunk-OGBMUST4.js → chunk-YSLMMR2U.js} +14 -14
- package/dist/{chunk-45YPFB7B.js → chunk-Z2BRSQ6M.js} +49 -49
- package/dist/{chunk-D64XUF5Q.js → chunk-Z3SNX45M.js} +16 -16
- package/dist/{chunk-FMOEVAGT.js → chunk-Z4VN347O.js} +3 -3
- package/dist/{chunk-L2GLOJAO.js → chunk-ZHGWR45B.js} +22 -22
- package/dist/cli.d.ts +20 -18
- package/dist/cli.js +50 -50
- package/dist/{codegen-command-HTWIW56U.js → codegen-command-L2OO6OTE.js} +63 -63
- package/dist/{commands-CVFYC4GK.js → commands-2E4JB3DB.js} +2 -2
- package/dist/{completion-AUEQC4XJ.js → completion-LPJIH5VQ.js} +11 -11
- package/dist/{config-JU6OQC77.js → config-QDCRKEWD.js} +4 -4
- package/dist/{deploy-command-5WTFHMBT.js → deploy-command-HJZNYCUY.js} +57 -57
- package/dist/{deploy-source-5CET3A5D.js → deploy-source-5COWTBOC.js} +34 -34
- package/dist/{dev-env-sync-X636HLMK.js → dev-env-sync-GZ4QQJGV.js} +51 -51
- package/dist/{display-name-hint-DMORHANO.js → display-name-hint-AHCNH6TF.js} +11 -11
- package/dist/{emit-hOFbgzde.d.ts → emit-DqG6qddr.d.ts} +2 -2
- package/dist/env-example-refresh-DWQIOQYR.js +127 -0
- package/dist/{env-pull-command-WZZ7RL2E.js → env-pull-command-Z4RLVEGJ.js} +46 -46
- package/dist/{env-target-PO3MOLH5.js → env-target-ZHQUS5BO.js} +13 -13
- package/dist/{env-var-command-YKTJZFJN.js → env-var-command-FKQ4VVQ6.js} +47 -47
- package/dist/{ephemeral-BMFY55BQ.js → ephemeral-L4KUOGEU.js} +9 -9
- package/dist/{ephemeral-command-VDSQCOYL.js → ephemeral-command-GRPFI3TD.js} +47 -47
- package/dist/{ephemeral-state-6TY4JIPA.js → ephemeral-state-VLYU2BXR.js} +11 -11
- package/dist/{generate-command-3NTNRQRS.js → generate-command-XNODJFDQ.js} +68 -68
- package/dist/{gitignore-FWPEDX6C.js → gitignore-VWRSZX5F.js} +16 -16
- package/dist/{guards-EJU2ONAX.js → guards-OPSGB6LG.js} +5 -5
- package/dist/{hosted-file-PSHJB3HX.js → hosted-file-S7YUQAH6.js} +2 -2
- package/dist/{impersonate-command-QEJA72Q2.js → impersonate-command-AEKIZHHK.js} +40 -40
- package/dist/{import-TBTOTU52.js → import-PHSSFFLA.js} +5 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -10
- package/dist/{init-command-27SFBW2F.js → init-command-TI3HCKXZ.js} +55 -55
- package/dist/{init-modules-HZRQFRLE.js → init-modules-SGSX7XEY.js} +9 -9
- package/dist/{init-web-Y2PBNJTQ.js → init-web-6HX3YLQP.js} +2 -2
- package/dist/internal.d.ts +4 -4
- package/dist/internal.js +24 -25
- package/dist/{io-ZUKAGFVE.js → io-TAF4WXYQ.js} +5 -5
- package/dist/{keep-data-merge-X5LDDCI3.js → keep-data-merge-GUGF7MVZ.js} +28 -28
- package/dist/{lambda-config-reconcile-OUZ4OYAB.js → lambda-config-reconcile-65U6I4KU.js} +3 -3
- package/dist/{landed-6VO7CX5P.js → landed-QA6PRTV2.js} +4 -4
- package/dist/{landing-record-QYECWLQ5.js → landing-record-FCAWLCZU.js} +22 -22
- package/dist/{live-diff-2S7E3SBZ.js → live-diff-IM4W3ELT.js} +5 -5
- package/dist/local-engine-choice-FPJAZSSD.js +79 -0
- package/dist/{local-engine-command-HMTQK7MN.js → local-engine-command-73NHWD6V.js} +92 -92
- package/dist/{local-engine-config-5U3SC434.js → local-engine-config-W3KB7RWM.js} +2 -2
- package/dist/{local-engine-deploy-TXAOYRGF.js → local-engine-deploy-Y4OAWL7K.js} +16 -16
- package/dist/{local-engine-process-6VZ7JJBP.js → local-engine-process-6YPJHKYM.js} +11 -11
- package/dist/{local-engine-state-TJWPWCC4.js → local-engine-state-OCW5YDD7.js} +3 -3
- package/dist/{local-engine-update-check-R5SPDVEJ.js → local-engine-update-check-X7TZGRFL.js} +7 -7
- package/dist/{lock-TS465GVY.js → lock-WXXC3QHL.js} +3 -3
- package/dist/{lock-commands-4VT3L5W5.js → lock-commands-PKDBNRSD.js} +55 -55
- package/dist/{login-command-O6WA4FYL.js → login-command-V4U4FA5G.js} +27 -27
- package/dist/{logout-command-6CPWGFY2.js → logout-command-TV3P545Z.js} +16 -16
- package/dist/{loop-UFHKSOQ4.js → loop-VKHGQ6MP.js} +6 -6
- package/dist/{marketplace-command-HKACSYKS.js → marketplace-command-LEFOAEAV.js} +30 -30
- package/dist/{marketplace-resolve-KLFYVRWS.js → marketplace-resolve-ME7O7JBJ.js} +7 -7
- package/dist/{meta-client-73PX6UGJ.js → meta-client-TEEECA5W.js} +14 -14
- package/dist/{module-manifest-GIKFNXPE.js → module-manifest-7YLGIRCY.js} +3 -3
- package/dist/node.d.ts +4 -4
- package/dist/node.js +56 -56
- package/dist/operation-outcome-GNDD35WL.js +51 -0
- package/dist/{output-target-SZMBNYF4.js → output-target-5FWX3NGZ.js} +17 -17
- package/dist/{plan-disclosure-BHYG7TZ7.js → plan-disclosure-QGL5UYQR.js} +16 -16
- package/dist/{plugin-contributions-X4V22PJQ.js → plugin-contributions-GNFTWDEB.js} +4 -4
- package/dist/{plugin-prompt-DKNQHW6Y.js → plugin-prompt-VEQGMZ4T.js} +4 -4
- package/dist/{plugin-questions-CQRVOWFK.js → plugin-questions-BGRL23GO.js} +3 -3
- package/dist/{preflight-command-EBQ6XQF3.js → preflight-command-VKJKXRRI.js} +63 -63
- package/dist/{profile-command-NPKBJYPM.js → profile-command-P7A3BH26.js} +29 -29
- package/dist/{profile-pointer-UOO7JNFG.js → profile-pointer-HG7IXE4I.js} +4 -4
- package/dist/{profile-select-74TRDEPD.js → profile-select-45G5VPJK.js} +2 -2
- package/dist/{project-dependency-RRMTWOPC.js → project-dependency-Z4CKOCJI.js} +8 -8
- package/dist/{project-sdk-FOR4IOXL.js → project-sdk-JWZWGXXR.js} +3 -3
- package/dist/promote-command-KHTIK44I.js +141 -0
- package/dist/{prompt-5GUQTCSP.js → prompt-SURZOUUW.js} +3 -3
- package/dist/{publish-command-LGLZBOCB.js → publish-command-HGAB3H4A.js} +131 -60
- package/dist/{pull-command-WQFPLITW.js → pull-command-EUEWBRXZ.js} +66 -66
- package/dist/{pull-superseded-GGURV5J3.js → pull-superseded-TOT5S4QU.js} +3 -3
- package/dist/{release-command-2OTNVMIL.js → release-command-WOVQAMUY.js} +64 -64
- package/dist/{release-ns-command-EIBN3JVM.js → release-ns-command-WOQE2BDQ.js} +87 -87
- package/dist/{retry-command-Y5YJGOH3.js → retry-command-JRGMZZAC.js} +8 -8
- package/dist/{routes-manifest-3BNZIVST.js → routes-manifest-URFMAWJE.js} +5 -5
- package/dist/scaffold.js +2 -2
- package/dist/{secrets-file-FUG7WCES.js → secrets-file-YWZWVJ52.js} +16 -16
- package/dist/{secrets-fill-command-QEOCUOAY.js → secrets-fill-command-HIHK3VH2.js} +54 -54
- package/dist/{seed-GJHJSEUE.js → seed-24DTEY5S.js} +7 -7
- package/dist/{source-resolve-DMDZVPMM.js → source-resolve-OWD3MIEO.js} +23 -23
- package/dist/{static-host-WM24RG25.js → static-host-UIR2OLPQ.js} +9 -9
- package/dist/{status-command-XUH5OGQX.js → status-command-JKTHH5QE.js} +53 -53
- package/dist/{store-MR7IKXKK.js → store-5YAQS6KU.js} +6 -6
- package/dist/{store-CfgPaVPO.d.ts → store-zxw2go0f.d.ts} +3 -3
- package/dist/sveltekit.d.ts +5 -5
- package/dist/sveltekit.js +1 -1
- package/dist/{sync-contributions-DHP7XSTX.js → sync-contributions-RBB6JVOL.js} +9 -9
- package/dist/{table-ZBDPKMNH.js → table-MQFVYA4K.js} +8 -8
- package/dist/{tables-command-X3JK7VSK.js → tables-command-5Q4BSUNO.js} +39 -39
- package/dist/{tenant-GKXMOYLK.js → tenant-Q3LPVSSM.js} +10 -10
- package/dist/{tenant-command-P27EQHBU.js → tenant-command-BFVU2PEX.js} +84 -84
- package/dist/{test-command-A4G2FP7G.js → test-command-F4VUU4QR.js} +40 -40
- package/dist/{tests-C55M5EQS.js → tests-5ZSDFVIJ.js} +6 -6
- package/dist/{token-CMAB35GD.js → token-TERSTNU4.js} +12 -12
- package/dist/{toolchain-hooks-BGZBDFAT.js → toolchain-hooks-QVUZ6HZ4.js} +2 -2
- package/dist/{toolchain-modules-3M7QDJBV.js → toolchain-modules-FD5ANV2U.js} +5 -5
- package/dist/tracked-backend-B4HTME4S.js +80 -0
- package/dist/{update-check-LNNKIMML.js → update-check-O4C2LCZH.js} +53 -53
- package/dist/{upgrade-command-7EUXML3P.js → upgrade-command-NVFWLMTA.js} +56 -56
- package/dist/{whoami-command-KNWFWAX6.js → whoami-command-YKNTISIV.js} +15 -15
- package/dist/{workspace-TGPYOODG.js → workspace-GGVGE2S5.js} +5 -5
- package/dist/{workspace-binding-2TWZBHQY.js → workspace-binding-OS4ZOX4S.js} +14 -14
- package/dist/{workspace-command-T7Z2BDHD.js → workspace-command-GTUNVN7K.js} +77 -77
- package/dist/{workspace-env-VA7XN3UX.js → workspace-env-467C5KHM.js} +13 -13
- package/dist/{workspace-export-AIGM6LC7.js → workspace-export-3XTVGQVM.js} +5 -5
- package/dist/{writable-FYJBTJOU.js → writable-7SSWUQJ3.js} +3 -3
- package/dist/{xano-BSHYVFSE.js → xano-6RS5XQZE.js} +7 -7
- package/dist/{xanosdk-import-J6SRBZHW.js → xanosdk-import-E3WSIYUE.js} +9 -9
- package/dist/{xanosdk-project-6KTCO47O.js → xanosdk-project-KH5TZ2KI.js} +14 -14
- package/guides/README.md +1 -0
- package/guides/authoring.md +3 -5
- package/guides/bundle.md +45 -0
- package/guides/cli.md +32 -30
- package/guides/codegen.md +5 -4
- package/guides/codes.md +9 -9
- package/guides/deploying.md +63 -58
- package/guides/environment.md +13 -13
- package/guides/project-structure.md +14 -0
- package/llms/client.md +3 -4
- package/llms/errors.md +1 -1
- package/llms/tests.md +2 -2
- package/llms-full.txt +14 -15
- package/llms.txt +8 -8
- package/manifest.json +110 -107
- package/package.json +4 -4
- package/dist/env-example-refresh-ZO6XAV44.js +0 -127
- package/dist/local-engine-choice-6BSPEG3E.js +0 -79
- package/dist/operation-outcome-2P4BVSEV.js +0 -51
- package/dist/promote-command-4F2NAE6P.js +0 -141
- package/dist/tracked-backend-PZGUWD5J.js +0 -80
|
@@ -21,7 +21,7 @@ import { randomBytes } from "crypto";
|
|
|
21
21
|
import { AsyncLocalStorage } from "async_hooks";
|
|
22
22
|
|
|
23
23
|
// src/emit/json-target.ts
|
|
24
|
-
var BACKEND_KINDS = /* @__PURE__ */ new Set(["workspace", "ephemeral", "tenant", "local
|
|
24
|
+
var BACKEND_KINDS = /* @__PURE__ */ new Set(["workspace", "ephemeral", "tenant", "local"]);
|
|
25
25
|
var isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
26
26
|
var text = (v) => typeof v === "string" && v !== "" ? v : void 0;
|
|
27
27
|
function backendSelector(kind, name) {
|
|
@@ -43,7 +43,7 @@ function derive(doc) {
|
|
|
43
43
|
const kind = doc.deployed.kind;
|
|
44
44
|
const env = isObject(doc.environment) ? doc.environment.name : void 0;
|
|
45
45
|
if (kind === "ephemeral" && text(env) !== void 0) out.selector = `ephemeral:${env}`;
|
|
46
|
-
else if (kind === "local
|
|
46
|
+
else if (kind === "local") out.selector = "local";
|
|
47
47
|
}
|
|
48
48
|
if (out.workspaceId === void 0 && isObject(doc.workspace) && typeof doc.workspace.id === "number") {
|
|
49
49
|
out.workspaceId = doc.workspace.id;
|
|
@@ -604,11 +604,11 @@ function formatExpiration(expiresAt) {
|
|
|
604
604
|
return `in ${hours}h ${minutes}m`;
|
|
605
605
|
}
|
|
606
606
|
function isLocalEngine(target) {
|
|
607
|
-
return "kind" in target && target.kind === "local
|
|
607
|
+
return "kind" in target && target.kind === "local";
|
|
608
608
|
}
|
|
609
609
|
function describeWriteTarget(target) {
|
|
610
610
|
if (isLocalEngine(target)) {
|
|
611
|
-
return `
|
|
611
|
+
return `Xano Engine \xB7 ${hostLabel(target.url)} \xB7 workspace ${target.workspaceId}`;
|
|
612
612
|
}
|
|
613
613
|
const where = `${hostLabel(target.base)} \xB7 workspace ${target.workspaceId}`;
|
|
614
614
|
return target.label === void 0 || target.label === "" ? where : `${target.label} \u2014 ${where}`;
|
|
@@ -621,7 +621,7 @@ function credentialWriteTarget(binding) {
|
|
|
621
621
|
}
|
|
622
622
|
function writeTargetPayload(target) {
|
|
623
623
|
if (isLocalEngine(target)) {
|
|
624
|
-
return { instance: target.url, workspaceId: target.workspaceId, kind: "local
|
|
624
|
+
return { instance: target.url, workspaceId: target.workspaceId, kind: "local", local: true };
|
|
625
625
|
}
|
|
626
626
|
return {
|
|
627
627
|
instance: target.base,
|
|
@@ -1048,7 +1048,7 @@ function extraArguments(extras, target, max, attachedValueFlag) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
);
|
|
1050
1050
|
}
|
|
1051
|
-
var BACKEND_HANDLE = /^(?:workspace|ephemeral|local
|
|
1051
|
+
var BACKEND_HANDLE = /^(?:workspace|ephemeral|local|tenant)(?::[^\s=]+)?$/;
|
|
1052
1052
|
function positionalSelectorHint(extra, target) {
|
|
1053
1053
|
if (!BACKEND_HANDLE.test(extra)) return void 0;
|
|
1054
1054
|
const own = selectorSpellings(target.command, target.subcommand);
|
|
@@ -1176,8 +1176,8 @@ function processExitCode(err) {
|
|
|
1176
1176
|
return err instanceof Error && statesOutcomeUnknown(err.message) ? EXIT_OUTCOME_UNKNOWN : 1;
|
|
1177
1177
|
}
|
|
1178
1178
|
var MOVED_TO_TOP_LEVEL = /* @__PURE__ */ new Map([
|
|
1179
|
-
["tables", /* @__PURE__ */ new Set(["workspace", "ephemeral", "tenant", "local
|
|
1180
|
-
["impersonate", /* @__PURE__ */ new Set(["ephemeral", "tenant", "local
|
|
1179
|
+
["tables", /* @__PURE__ */ new Set(["workspace", "ephemeral", "tenant", "local"])],
|
|
1180
|
+
["impersonate", /* @__PURE__ */ new Set(["ephemeral", "tenant", "local"])]
|
|
1181
1181
|
]);
|
|
1182
1182
|
function movedVerb(command, sub, positionals) {
|
|
1183
1183
|
if (command === void 0 || sub === void 0 || MOVED_TO_TOP_LEVEL.get(sub)?.has(command) !== true) {
|
|
@@ -1257,9 +1257,12 @@ var PREFIXED = {
|
|
|
1257
1257
|
release: "required",
|
|
1258
1258
|
tenant: "required",
|
|
1259
1259
|
ephemeral: "optional",
|
|
1260
|
-
"local
|
|
1260
|
+
"local": "optional"
|
|
1261
1261
|
};
|
|
1262
|
-
var BARE = ["workspace", "ephemeral", "local
|
|
1262
|
+
var BARE = ["workspace", "ephemeral", "local"];
|
|
1263
|
+
function kindNoun(kind) {
|
|
1264
|
+
return kind === "local" ? "Xano Engine" : kind;
|
|
1265
|
+
}
|
|
1263
1266
|
function isKindShaped(raw) {
|
|
1264
1267
|
return /^[a-z][a-z-]*:/.test(raw);
|
|
1265
1268
|
}
|
|
@@ -1269,8 +1272,8 @@ function spellingsOf(kind) {
|
|
|
1269
1272
|
return ["workspace"];
|
|
1270
1273
|
case "ephemeral":
|
|
1271
1274
|
return ["ephemeral", "ephemeral:<name>"];
|
|
1272
|
-
case "local
|
|
1273
|
-
return ["local
|
|
1275
|
+
case "local":
|
|
1276
|
+
return ["local", "local:<name>"];
|
|
1274
1277
|
case "release":
|
|
1275
1278
|
return ["release:<name>"];
|
|
1276
1279
|
case "tenant":
|
|
@@ -1310,7 +1313,7 @@ function parseSource(raw, accepted, helpFor, noun = SOURCE_NOUN) {
|
|
|
1310
1313
|
throw BARE.includes(kind) ? refuse(raw, accepted, helpFor, `takes no name \u2014 ${kind} names one thing`, noun) : refuse(raw, accepted, helpFor, `names no ${noun.singular} kind "${kind}"`, noun, keywordSuggestion(raw, accepted));
|
|
1311
1314
|
}
|
|
1312
1315
|
if (!accepted.includes(kind)) {
|
|
1313
|
-
throw refuse(raw, accepted, helpFor, `names ${withArticle(kind
|
|
1316
|
+
throw refuse(raw, accepted, helpFor, `names ${withArticle(kindNoun(kind))}, which this command does not take`, noun);
|
|
1314
1317
|
}
|
|
1315
1318
|
if (name === "") throw refuse(raw, accepted, helpFor, `names no ${kind}`, noun);
|
|
1316
1319
|
return { kind, name };
|
|
@@ -1350,7 +1353,7 @@ function verbBackendName(raw, kind, helpFor, flags = "") {
|
|
|
1350
1353
|
const other = shared && (typed === "tenant" || typed === "ephemeral") ? `xanosdk ${typed} ${helpFor.subcommand}` : void 0;
|
|
1351
1354
|
const known = Object.hasOwn(PREFIXED, typed) || BARE.includes(typed);
|
|
1352
1355
|
throw new UsageError(
|
|
1353
|
-
`"${raw}" ${known ? `names ${withArticle(typed
|
|
1356
|
+
`"${raw}" ${known ? `names ${withArticle(kindNoun(typed))}` : `names no backend kind "${typed}"`}, and \`${verb}\` takes ${withArticle(kind)} name (\`${kind}:<name>\` or the bare name).` + (other !== void 0 && name !== "" ? ` For ${withArticle(typed)}, run \`${other} ${shellQuote(name)}${flags}\`.` : ""),
|
|
1354
1357
|
{ hintFor: helpFor }
|
|
1355
1358
|
);
|
|
1356
1359
|
}
|
|
@@ -1414,9 +1417,13 @@ var FLAGS = {
|
|
|
1414
1417
|
},
|
|
1415
1418
|
"expires-hours": { spec: "--expires-hours <n>", summary: "Ephemeral TTL at create time, 1\u201324 (default: 1)" },
|
|
1416
1419
|
static: { spec: "--static <dir>", summary: "Archive this built frontend and deploy it to the static host" },
|
|
1417
|
-
|
|
1418
|
-
spec: "--
|
|
1419
|
-
summary: "Deploy to
|
|
1420
|
+
ephemeral: {
|
|
1421
|
+
spec: "--ephemeral",
|
|
1422
|
+
summary: "Deploy to a disposable ephemeral on Xano's cloud instead of the Xano Engine on this machine"
|
|
1423
|
+
},
|
|
1424
|
+
"local": {
|
|
1425
|
+
spec: "--local[=<version|url|path>]",
|
|
1426
|
+
summary: "Deploy to the Xano Engine on this machine \u2014 the default, so the flag is needed only to name an engine. Bare: runs the project's pinned engine version (the latest on first run, then pinned in package.json \u2014 commit it); a newer engine is offered, never applied without a yes. A version, URL or archive path (or XANOSDK_ENGINE_OVERRIDE, for every run in a shell) runs that engine as an override and never touches the pin; a URL must be https (plain http only from this machine). Not combinable with --to or --ephemeral"
|
|
1420
1427
|
},
|
|
1421
1428
|
// Keyed apart from the global `version` row: that one is the first-argument
|
|
1422
1429
|
// `xanosdk --version`, this one a value an engine verb takes after the verb.
|
|
@@ -1506,7 +1513,7 @@ var FLAGS = {
|
|
|
1506
1513
|
summary: "Xano OAuth host for `login` and a XANO_REFRESH_TOKEN exchange (default: $XANO_ORIGIN)"
|
|
1507
1514
|
},
|
|
1508
1515
|
config: { spec: "--config <path>", summary: "Explicit credential file (default: $XANO_CONFIG)" },
|
|
1509
|
-
local: { spec: "--local", summary: "Use the project-local ./.xano/auth.json instead of the shared cache" },
|
|
1516
|
+
"local-auth": { spec: "--local-auth", summary: "Use the project-local ./.xano/auth.json instead of the shared cache" },
|
|
1510
1517
|
profile: {
|
|
1511
1518
|
spec: "--profile, -p <name>",
|
|
1512
1519
|
summary: "Commands that sign in: which stored credential profile to act as \u2014 the only thing that overrides this project's xano.profile.json (then $XANO_PROFILE, then the credential file default)"
|
|
@@ -1696,8 +1703,8 @@ var GLOBAL_FLAGS = [
|
|
|
1696
1703
|
"help",
|
|
1697
1704
|
"version"
|
|
1698
1705
|
];
|
|
1699
|
-
var AUTH = ["origin", "config", "local"];
|
|
1700
|
-
var CREDENTIAL_FILE = ["config", "local"];
|
|
1706
|
+
var AUTH = ["origin", "config", "local-auth"];
|
|
1707
|
+
var CREDENTIAL_FILE = ["config", "local-auth"];
|
|
1701
1708
|
function isAuthenticatedCommand(command, subcommand) {
|
|
1702
1709
|
return flagRefFor(command, subcommand, "config") !== void 0;
|
|
1703
1710
|
}
|
|
@@ -1707,7 +1714,7 @@ function takesProfileFlag(command, subcommand) {
|
|
|
1707
1714
|
return isAuthenticatedCommand(command, subcommand);
|
|
1708
1715
|
}
|
|
1709
1716
|
var CUT = ["workspace", "ephemeral", "tenant"];
|
|
1710
|
-
var BACKEND = ["workspace", "ephemeral", "local
|
|
1717
|
+
var BACKEND = ["workspace", "ephemeral", "local", "tenant"];
|
|
1711
1718
|
var TEST_ON = {
|
|
1712
1719
|
key: "on",
|
|
1713
1720
|
summary: "Run on this backend instead of the one this project last deployed to",
|
|
@@ -1958,7 +1965,7 @@ var COMMANDS = {
|
|
|
1958
1965
|
deploy: {
|
|
1959
1966
|
group: "Deploy",
|
|
1960
1967
|
display: "deploy [source]",
|
|
1961
|
-
summary: "
|
|
1968
|
+
summary: "Deploy to the Xano Engine on this machine (default) or an ephemeral (--ephemeral) \u2192 URL",
|
|
1962
1969
|
// Optional: a bare `deploy` inside a project compiles its entry, and the
|
|
1963
1970
|
// argument may name a backend to take the bytes FROM instead of a path.
|
|
1964
1971
|
args: [
|
|
@@ -1978,8 +1985,8 @@ var COMMANDS = {
|
|
|
1978
1985
|
),
|
|
1979
1986
|
{
|
|
1980
1987
|
key: "to",
|
|
1981
|
-
summary: "Merge into a real destination instead of replacing an ephemeral. The escape hatch from the release flow",
|
|
1982
|
-
// An ephemeral and a
|
|
1988
|
+
summary: "Merge into a real destination instead of replacing the Xano Engine or an ephemeral. The escape hatch from the release flow",
|
|
1989
|
+
// An ephemeral and a Xano Engine are where a deploy goes WITHOUT
|
|
1983
1990
|
// `--to`; naming one here is the other path spelled wrong, and the
|
|
1984
1991
|
// reason says which flag that path is.
|
|
1985
1992
|
selector: {
|
|
@@ -1987,12 +1994,13 @@ var COMMANDS = {
|
|
|
1987
1994
|
role: "to",
|
|
1988
1995
|
default: "none",
|
|
1989
1996
|
refused: {
|
|
1990
|
-
"local
|
|
1991
|
-
ephemeral: "
|
|
1997
|
+
"local": "a deploy to a Xano Engine is `--local`, which also downloads, pins and starts one",
|
|
1998
|
+
ephemeral: "`--ephemeral` already replaces an ephemeral. To merge into one instead, name it as the tenant it is: `--to tenant:<ephemeral name>`"
|
|
1992
1999
|
}
|
|
1993
2000
|
}
|
|
1994
2001
|
},
|
|
1995
|
-
"local
|
|
2002
|
+
"local",
|
|
2003
|
+
"ephemeral",
|
|
1996
2004
|
withToOnly("dry-run"),
|
|
1997
2005
|
withToOnly("prune"),
|
|
1998
2006
|
withToOnly("reset-data"),
|
|
@@ -2101,7 +2109,7 @@ var COMMANDS = {
|
|
|
2101
2109
|
args: [{ name: "name", required: true }],
|
|
2102
2110
|
flags: [
|
|
2103
2111
|
// A release is cut from something that RAN, so a path is not in the
|
|
2104
|
-
// set, and the cut runs on the instance, so a
|
|
2112
|
+
// set, and the cut runs on the instance, so a Xano Engine is refused
|
|
2105
2113
|
// with that reason rather than left unknown.
|
|
2106
2114
|
{
|
|
2107
2115
|
key: "from",
|
|
@@ -2111,7 +2119,7 @@ var COMMANDS = {
|
|
|
2111
2119
|
role: "from",
|
|
2112
2120
|
default: "tracked",
|
|
2113
2121
|
refused: {
|
|
2114
|
-
"local
|
|
2122
|
+
"local": "the cut runs on the instance, which cannot reach an engine on this machine"
|
|
2115
2123
|
}
|
|
2116
2124
|
}
|
|
2117
2125
|
},
|
|
@@ -2289,10 +2297,9 @@ var COMMANDS = {
|
|
|
2289
2297
|
key: "to",
|
|
2290
2298
|
summary: "Where to publish, instead of the backend this project last deployed to",
|
|
2291
2299
|
selector: {
|
|
2292
|
-
accepted:
|
|
2300
|
+
accepted: BACKEND,
|
|
2293
2301
|
role: "to",
|
|
2294
|
-
default: "tracked"
|
|
2295
|
-
refused: { "local-engine": "a local engine takes a frontend only through `xanosdk deploy --local-engine --static <dir>`" }
|
|
2302
|
+
default: "tracked"
|
|
2296
2303
|
}
|
|
2297
2304
|
},
|
|
2298
2305
|
"release",
|
|
@@ -2464,31 +2471,31 @@ var COMMANDS = {
|
|
|
2464
2471
|
}
|
|
2465
2472
|
}
|
|
2466
2473
|
},
|
|
2467
|
-
"local
|
|
2474
|
+
"local": {
|
|
2468
2475
|
group: "Environments",
|
|
2469
|
-
display: "local
|
|
2470
|
-
// The handles that ship with `deploy --local
|
|
2476
|
+
display: "local",
|
|
2477
|
+
// The handles that ship with `deploy --local`: a Xano Engine has no
|
|
2471
2478
|
// TTL and nothing reclaims it, and its binary is never on `PATH`, so these
|
|
2472
|
-
// verbs are the only way to see or stop one (`impersonate local
|
|
2479
|
+
// verbs are the only way to see or stop one (`impersonate local`
|
|
2473
2480
|
// opens one, like any other backend).
|
|
2474
|
-
summary: "See, authenticate against and stop
|
|
2481
|
+
summary: "See, authenticate against and stop Xano Engines on this machine; move the project's engine pin and manage cached engine versions",
|
|
2475
2482
|
subcommands: {
|
|
2476
2483
|
list: {
|
|
2477
|
-
summary: "List
|
|
2478
|
-
example: "xanosdk local
|
|
2484
|
+
summary: "List Xano Engines on this machine, marking the ones xanosdk started",
|
|
2485
|
+
example: "xanosdk local list"
|
|
2479
2486
|
},
|
|
2480
2487
|
token: {
|
|
2481
2488
|
// The engine's meta API accepts only its own bearer, and no summary
|
|
2482
2489
|
// carries it — so this verb is the only way a suite gets one. Bare on
|
|
2483
2490
|
// stdout even when piped, because `$(…)` is the form it exists for.
|
|
2484
|
-
summary: "Print a
|
|
2491
|
+
summary: "Print a Xano Engine's meta API bearer \u2014 the local XANO_META_TOKEN; `--json` adds its url and workspace id. Re-run after a restart, which re-mints it (default: the engine this project deployed to)",
|
|
2485
2492
|
args: [{ name: "name", required: false }],
|
|
2486
|
-
example: "XANO_META_TOKEN=$(xanosdk local
|
|
2493
|
+
example: "XANO_META_TOKEN=$(xanosdk local token)"
|
|
2487
2494
|
},
|
|
2488
2495
|
stop: {
|
|
2489
2496
|
// The name is optional because `--all` stands in for it — and `--all`
|
|
2490
2497
|
// is the form most runs want, since it covers every project.
|
|
2491
|
-
summary: "Stop one
|
|
2498
|
+
summary: "Stop one Xano Engine by name, or every one xanosdk started on this machine",
|
|
2492
2499
|
args: [{ name: "name", required: true, satisfiedBy: ["all"] }],
|
|
2493
2500
|
flags: [
|
|
2494
2501
|
{
|
|
@@ -2496,7 +2503,7 @@ var COMMANDS = {
|
|
|
2496
2503
|
summary: "Every engine xanosdk started on this machine, across projects (foreign ones are reported, not stopped)"
|
|
2497
2504
|
}
|
|
2498
2505
|
],
|
|
2499
|
-
example: "xanosdk local
|
|
2506
|
+
example: "xanosdk local stop --all"
|
|
2500
2507
|
},
|
|
2501
2508
|
update: {
|
|
2502
2509
|
// Running it IS the confirmation, so it never prompts — the deploy only
|
|
@@ -2508,7 +2515,7 @@ var COMMANDS = {
|
|
|
2508
2515
|
summary: "Pin this engine version instead of the latest, like v0.1.5 \u2014 or `latest`, the default"
|
|
2509
2516
|
}
|
|
2510
2517
|
],
|
|
2511
|
-
example: "xanosdk local
|
|
2518
|
+
example: "xanosdk local update"
|
|
2512
2519
|
},
|
|
2513
2520
|
cache: {
|
|
2514
2521
|
// One verb with an action argument, not two top-level verbs: both act on
|
|
@@ -2526,7 +2533,7 @@ var COMMANDS = {
|
|
|
2526
2533
|
},
|
|
2527
2534
|
{ key: "yes", summary: "Skip the `--legacy-runtime` confirmation (required when there is no terminal)" }
|
|
2528
2535
|
],
|
|
2529
|
-
example: "xanosdk local
|
|
2536
|
+
example: "xanosdk local cache clear --version v0.1.5"
|
|
2530
2537
|
}
|
|
2531
2538
|
}
|
|
2532
2539
|
},
|
|
@@ -2593,7 +2600,7 @@ var COMMANDS = {
|
|
|
2593
2600
|
name: "backend",
|
|
2594
2601
|
required: false,
|
|
2595
2602
|
selector: {
|
|
2596
|
-
accepted: ["ephemeral", "local
|
|
2603
|
+
accepted: ["ephemeral", "local", "tenant"],
|
|
2597
2604
|
role: "subject",
|
|
2598
2605
|
default: "tracked",
|
|
2599
2606
|
refused: {
|
|
@@ -2614,9 +2621,9 @@ var COMMANDS = {
|
|
|
2614
2621
|
login: {
|
|
2615
2622
|
group: "Account",
|
|
2616
2623
|
display: "login",
|
|
2617
|
-
summary: "OAuth sign-in \u2014 shared cache, or --local per project",
|
|
2624
|
+
summary: "OAuth sign-in \u2014 shared cache, or --local-auth per project",
|
|
2618
2625
|
flags: [
|
|
2619
|
-
"local",
|
|
2626
|
+
"local-auth",
|
|
2620
2627
|
"paste",
|
|
2621
2628
|
"port",
|
|
2622
2629
|
"scope",
|
|
@@ -2624,13 +2631,13 @@ var COMMANDS = {
|
|
|
2624
2631
|
"config",
|
|
2625
2632
|
{ key: "force", summary: "Overwrite the cached credential \u2014 sign in again even when one is already there" }
|
|
2626
2633
|
],
|
|
2627
|
-
example: "xanosdk login --local"
|
|
2634
|
+
example: "xanosdk login --local-auth"
|
|
2628
2635
|
},
|
|
2629
2636
|
logout: {
|
|
2630
2637
|
group: "Account",
|
|
2631
2638
|
display: "logout",
|
|
2632
2639
|
summary: "Revoke the active profile and remove it from the credential file",
|
|
2633
|
-
flags: ["all", "yes", "local", "config"],
|
|
2640
|
+
flags: ["all", "yes", "local-auth", "config"],
|
|
2634
2641
|
example: "xanosdk logout --profile staging"
|
|
2635
2642
|
},
|
|
2636
2643
|
status: {
|
|
@@ -2823,7 +2830,7 @@ function flagSummary(ref) {
|
|
|
2823
2830
|
function selectorValues(selector) {
|
|
2824
2831
|
return SELECTOR_BARE.filter((k) => selector.accepted.includes(k));
|
|
2825
2832
|
}
|
|
2826
|
-
var SELECTOR_BARE = ["workspace", "ephemeral", "local
|
|
2833
|
+
var SELECTOR_BARE = ["workspace", "ephemeral", "local"];
|
|
2827
2834
|
function argValues(arg) {
|
|
2828
2835
|
if (arg.values !== void 0) return arg.values;
|
|
2829
2836
|
return arg.selector !== void 0 ? selectorValues(arg.selector) : void 0;
|
|
@@ -3033,4 +3040,4 @@ export {
|
|
|
3033
3040
|
movedVerb,
|
|
3034
3041
|
installCliDiagnosticSink
|
|
3035
3042
|
};
|
|
3036
|
-
//# sourceMappingURL=chunk-
|
|
3043
|
+
//# sourceMappingURL=chunk-XNZURZ7T.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
questionOrCancel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AESE434J.js";
|
|
4
4
|
import {
|
|
5
5
|
style,
|
|
6
6
|
terminalText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XNZURZ7T.js";
|
|
8
8
|
|
|
9
9
|
// src/emit/plugin-prompt.ts
|
|
10
10
|
import { createInterface } from "readline/promises";
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
promptPluginQuestion,
|
|
55
55
|
pluginPrompter
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-Y6NO3DLQ.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-ROY4YAEQ.js";
|
|
4
4
|
import {
|
|
5
5
|
LocalFileNotFoundError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XNZURZ7T.js";
|
|
7
7
|
import {
|
|
8
8
|
buildContentEnvelope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XJU6UAFV.js";
|
|
10
10
|
import {
|
|
11
11
|
SEED_FILE,
|
|
12
12
|
assertSeedIds,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
seedFailure,
|
|
18
18
|
tableColumns,
|
|
19
19
|
tableIndexes
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VZ22VUAS.js";
|
|
21
21
|
import {
|
|
22
22
|
DiagnosticError
|
|
23
23
|
} from "./chunk-GPI3OWRE.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
HOSTED_FILE_SCHEME,
|
|
27
27
|
HOSTED_ROW_PATH_PREFIX,
|
|
28
28
|
isHostedFile
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VQPDATQT.js";
|
|
30
30
|
import {
|
|
31
31
|
resolveRef
|
|
32
32
|
} from "./chunk-LL6ED5IB.js";
|
|
@@ -404,4 +404,4 @@ export {
|
|
|
404
404
|
collectNonPublicSeedValues,
|
|
405
405
|
seedRowsByTableGuid
|
|
406
406
|
};
|
|
407
|
-
//# sourceMappingURL=chunk-
|
|
407
|
+
//# sourceMappingURL=chunk-Y76ERHLK.js.map
|
|
@@ -6,43 +6,43 @@ import {
|
|
|
6
6
|
startEngine,
|
|
7
7
|
stopEngineNamed,
|
|
8
8
|
stopOrphanedEngineProcesses
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RXCT3OCU.js";
|
|
10
10
|
import {
|
|
11
11
|
RELEASE_VERSION,
|
|
12
12
|
readEngineEntry,
|
|
13
13
|
stageEngine,
|
|
14
14
|
verifiedEngineExecutable
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z3SNX45M.js";
|
|
16
16
|
import {
|
|
17
17
|
sha256Hex
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-64WWE3EF.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeEngineVersion,
|
|
21
21
|
resolveEngineRelease,
|
|
22
22
|
usesCustomReleaseManager
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JQOX6HW4.js";
|
|
24
24
|
import {
|
|
25
25
|
compareSemver,
|
|
26
26
|
parseSemver
|
|
27
27
|
} from "./chunk-2TFRR6JV.js";
|
|
28
28
|
import {
|
|
29
29
|
recordDeployed
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HOOOOJJP.js";
|
|
31
31
|
import {
|
|
32
32
|
ImportHttpError
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-5XVBT6CQ.js";
|
|
34
34
|
import {
|
|
35
35
|
engineNameForProject,
|
|
36
36
|
getEngineRecord,
|
|
37
37
|
setEngineRecord
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Q22BMRPF.js";
|
|
39
39
|
import {
|
|
40
40
|
SUPPORTED_PLATFORMS,
|
|
41
41
|
assertLoopbackUrl,
|
|
42
42
|
expandArchivePath,
|
|
43
43
|
isTrustedEngineUrl,
|
|
44
44
|
resolveEnginePlatform
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PL7AIAWS.js";
|
|
46
46
|
import {
|
|
47
47
|
registerSecret,
|
|
48
48
|
tokenTextProblem
|
|
@@ -50,18 +50,18 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
TransportError,
|
|
52
52
|
fetchOrExplain
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HLQH3AXB.js";
|
|
54
54
|
import {
|
|
55
55
|
readEnvVar
|
|
56
56
|
} from "./chunk-X2NL4KUO.js";
|
|
57
57
|
import {
|
|
58
58
|
UsageError
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-XNZURZ7T.js";
|
|
60
60
|
|
|
61
61
|
// src/deploy/local-engine-release.ts
|
|
62
62
|
import { readFileSync } from "fs";
|
|
63
63
|
import { gunzipSync } from "zlib";
|
|
64
|
-
var LOCAL_ENGINE_TOKEN_ENV = "
|
|
64
|
+
var LOCAL_ENGINE_TOKEN_ENV = "XANOSDK_ENGINE_TOKEN";
|
|
65
65
|
var MAX_ENGINE_BYTES = 256 * 1024 * 1024;
|
|
66
66
|
var DOWNLOAD_TIMEOUT_MS = 6e5;
|
|
67
67
|
var MAX_REDIRECTS = 5;
|
|
@@ -73,7 +73,7 @@ function displayDownloadUrl(url) {
|
|
|
73
73
|
return "the engine download URL";
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
var defaultFetch = (url, init) => fetchOrExplain(url, init, "The
|
|
76
|
+
var defaultFetch = (url, init) => fetchOrExplain(url, init, "The Xano Engine download", DOWNLOAD_TIMEOUT_MS, displayDownloadUrl(url));
|
|
77
77
|
function isRedirect(status) {
|
|
78
78
|
return status === 301 || status === 302 || status === 303 || status === 307 || status === 308;
|
|
79
79
|
}
|
|
@@ -99,7 +99,7 @@ async function fetchFollowingRedirects(url, opts) {
|
|
|
99
99
|
}
|
|
100
100
|
throw new Error(
|
|
101
101
|
`The engine download redirected more than ${MAX_REDIRECTS} times, so it was abandoned.
|
|
102
|
-
` + (opts.release === void 0 ? `Check the URL passed to \`--local
|
|
102
|
+
` + (opts.release === void 0 ? `Check the URL passed to \`--local\` addresses the artifact itself.` : `Re-run in a moment; if it keeps failing, engine ${opts.release}'s archive is unavailable \u2014 \`xanosdk local update\` moves to another release.`)
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
function safeOrigin(url) {
|
|
@@ -114,7 +114,7 @@ function releaseDownloadRefusal(status, version) {
|
|
|
114
114
|
status,
|
|
115
115
|
new Error(
|
|
116
116
|
`The download of engine ${version} failed (HTTP ${status}), so nothing was written.
|
|
117
|
-
Re-run in a moment; if it keeps failing, that release's archive is unavailable \u2014 \`xanosdk local
|
|
117
|
+
Re-run in a moment; if it keeps failing, that release's archive is unavailable \u2014 \`xanosdk local update\` moves to another release.`
|
|
118
118
|
)
|
|
119
119
|
);
|
|
120
120
|
}
|
|
@@ -126,7 +126,7 @@ function downloadRefusal(status, hasToken) {
|
|
|
126
126
|
if (status === 404) {
|
|
127
127
|
return new Error(
|
|
128
128
|
`The engine download found nothing at that URL (HTTP 404 Not Found).
|
|
129
|
-
Check the URL passed to \`--local
|
|
129
|
+
Check the URL passed to \`--local\` addresses the artifact` + (hasToken ? ` and that ${LOCAL_ENGINE_TOKEN_ENV} can read it` : `; if it is a private release, which also answers 404 without a credential, set ${LOCAL_ENGINE_TOKEN_ENV} to one that can read it`) + `, then re-run.`
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
if (status === 401 || status === 403) {
|
|
@@ -140,13 +140,13 @@ Set ${LOCAL_ENGINE_TOKEN_ENV} to a credential that can read the release and re-r
|
|
|
140
140
|
status,
|
|
141
141
|
new Error(
|
|
142
142
|
`The engine download failed (HTTP ${status}) \u2014 the server hosting it erred, so nothing was written.
|
|
143
|
-
Re-run in a moment; if it keeps failing, check the URL passed to \`--local
|
|
143
|
+
Re-run in a moment; if it keeps failing, check the URL passed to \`--local\` is still served.`
|
|
144
144
|
)
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
return new Error(
|
|
148
148
|
`The engine download failed (HTTP ${status}).
|
|
149
|
-
Check the URL passed to \`--local
|
|
149
|
+
Check the URL passed to \`--local\` still addresses the artifact` + (hasToken ? ` and that ${LOCAL_ENGINE_TOKEN_ENV} can read it` : ``) + `, then re-run.`
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
152
|
function artifactName(url) {
|
|
@@ -212,7 +212,7 @@ function headerChecksumOk(block) {
|
|
|
212
212
|
}
|
|
213
213
|
var badArchive = (why, release) => new Error(
|
|
214
214
|
`The engine archive ${why}.
|
|
215
|
-
It is not the artifact this expects, so nothing was written. ` + (release === void 0 ? `Check the URL or path passed to \`--local
|
|
215
|
+
It is not the artifact this expects, so nothing was written. ` + (release === void 0 ? `Check the URL or path passed to \`--local\` addresses the engine archive itself \u2014 a partial download, a login page and a release listing all save as ordinary files.` : `Engine ${release}'s published archive is unusable; \`xanosdk local update\` moves to another release.`)
|
|
216
216
|
);
|
|
217
217
|
function extractEngineExecutable(archive, opts = {}) {
|
|
218
218
|
const maxBytes = opts.maxBytes ?? MAX_ENGINE_BYTES;
|
|
@@ -267,7 +267,7 @@ function readArchiveFile(path) {
|
|
|
267
267
|
} catch {
|
|
268
268
|
throw new Error(
|
|
269
269
|
`There is no engine archive to read at ${path}.
|
|
270
|
-
Check the path \u2014 it is read exactly as passed to \`--local
|
|
270
|
+
Check the path \u2014 it is read exactly as passed to \`--local\`, with \`~\` and relative paths resolved from where the command ran.`
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
@@ -294,8 +294,8 @@ async function acquireEngineUnclassified(opts) {
|
|
|
294
294
|
const platform = resolveEnginePlatform(opts.platform ?? process.platform, opts.arch ?? process.arch);
|
|
295
295
|
if (platform === void 0) {
|
|
296
296
|
throw new Error(
|
|
297
|
-
`There is no
|
|
298
|
-
Deploy from one of those machines, or drop \`--local
|
|
297
|
+
`There is no Xano Engine build for ${opts.platform ?? process.platform} ${opts.arch ?? process.arch} \u2014 it runs on ${SUPPORTED_PLATFORMS.join(", ")} and nothing else.
|
|
298
|
+
Deploy from one of those machines, or drop \`--local\`: \`xanosdk deploy\` reaches an ephemeral from anywhere.`
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
if (opts.spec.kind === "release") {
|
|
@@ -438,7 +438,7 @@ async function ensureProjectEngine(opts) {
|
|
|
438
438
|
throw withDeployFallbackNote(err);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
var DEPLOY_FALLBACK_NOTE = "Meanwhile `xanosdk deploy` still deploys to an ephemeral.";
|
|
441
|
+
var DEPLOY_FALLBACK_NOTE = "Meanwhile `xanosdk deploy --ephemeral` still deploys to an ephemeral.";
|
|
442
442
|
function withDeployFallbackNote(err) {
|
|
443
443
|
if (!(err instanceof Error) || err.message.includes(DEPLOY_FALLBACK_NOTE)) return err;
|
|
444
444
|
err.message = `${err.message.trimEnd()}
|
|
@@ -472,7 +472,7 @@ async function ensureProjectEngineUnnoted(opts) {
|
|
|
472
472
|
const priorFilled = record?.filled;
|
|
473
473
|
const carry = opts.carryFilled?.({ reused, hadRecord, priorFilled, url: engine.url }) === true;
|
|
474
474
|
writeRecord(opts.dir, engine, entry, shownVersion, reused && carry ? priorFilled : void 0, env);
|
|
475
|
-
if (!reused) recordDeployed(opts.dir, "local
|
|
475
|
+
if (!reused) recordDeployed(opts.dir, "local");
|
|
476
476
|
return {
|
|
477
477
|
engine,
|
|
478
478
|
reused,
|
|
@@ -550,8 +550,8 @@ function stopMismatched(name, record, entry, env, run) {
|
|
|
550
550
|
const previous = recordedBinary(record, env);
|
|
551
551
|
if (previous !== void 0 && previous.digest !== entry.digest && attempt(previous)) return;
|
|
552
552
|
throw new Error(
|
|
553
|
-
`The
|
|
554
|
-
Stop it with \`xanosdk local
|
|
553
|
+
`The Xano Engine "${name}" already serving this project is not the engine this deploy resolved to, and it could not be stopped` + (previous === void 0 ? `` : ` by either engine version`) + `.
|
|
554
|
+
Stop it with \`xanosdk local stop ${name}\` (or end the process), then deploy again.`
|
|
555
555
|
);
|
|
556
556
|
}
|
|
557
557
|
function recordedBinary(record, env) {
|
|
@@ -576,22 +576,22 @@ function reuseCandidate(name, record, running) {
|
|
|
576
576
|
}
|
|
577
577
|
function explainUnsupportedEngineImport(err, engineVersion2, ctx = {}) {
|
|
578
578
|
if (!(err instanceof ImportHttpError) || err.status !== 501) return void 0;
|
|
579
|
-
const which = engineVersion2 === void 0 ? "The
|
|
579
|
+
const which = engineVersion2 === void 0 ? "The Xano Engine" : `Xano Engine ${engineVersion2}`;
|
|
580
580
|
const newer = newerRelease(engineVersion2, ctx.latest);
|
|
581
581
|
if (newer !== void 0) {
|
|
582
582
|
return new Error(
|
|
583
|
-
`${which} does not support this import (HTTP 501): it is older than this SDK needs. Nothing was written. Deploy with ${newer} \u2014 \`xanosdk local
|
|
583
|
+
`${which} does not support this import (HTTP 501): it is older than this SDK needs. Nothing was written. Deploy with ${newer} \u2014 \`xanosdk local update\` moves this project's pin to it, or pass \`--local=${newer}\` for one deploy.`,
|
|
584
584
|
{ cause: err }
|
|
585
585
|
);
|
|
586
586
|
}
|
|
587
587
|
if (ctx.resetRerun !== void 0) {
|
|
588
588
|
return new Error(
|
|
589
|
-
`${which} cannot apply this merge (HTTP 501): keeping the rows through this schema change is not available on the
|
|
589
|
+
`${which} cannot apply this merge (HTTP 501): keeping the rows through this schema change is not available on the Xano Engine yet. Nothing was written. Deploy with \`${ctx.resetRerun}\` instead \u2014 it replaces the workspace and writes every table's seed rows, so rows entered since the last deploy are lost.`,
|
|
590
590
|
{ cause: err }
|
|
591
591
|
);
|
|
592
592
|
}
|
|
593
593
|
return new Error(
|
|
594
|
-
`${which} does not support this import (HTTP 501). Nothing was written. \`xanosdk deploy\` deploys to an ephemeral meanwhile.`,
|
|
594
|
+
`${which} does not support this import (HTTP 501). Nothing was written. \`xanosdk deploy --ephemeral\` deploys to an ephemeral meanwhile.`,
|
|
595
595
|
{ cause: err }
|
|
596
596
|
);
|
|
597
597
|
}
|
|
@@ -609,4 +609,4 @@ export {
|
|
|
609
609
|
restartMismatchedEngine,
|
|
610
610
|
explainUnsupportedEngineImport
|
|
611
611
|
};
|
|
612
|
-
//# sourceMappingURL=chunk-
|
|
612
|
+
//# sourceMappingURL=chunk-YI76TURL.js.map
|