@xanots/sdk 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +21 -10
  2. package/README.md +7 -3
  3. package/dist/.build-fingerprint +1 -0
  4. package/dist/{agent-file-refresh-IJ7GN2FJ.js → agent-file-refresh-6XT23SLU.js} +4 -4
  5. package/dist/bin.js +8 -8
  6. package/dist/branch-commands-R4FR75UW.js +134 -0
  7. package/dist/{chunk-7SISR3CS.js → chunk-2SUCC4DV.js} +2 -2
  8. package/dist/{chunk-BPEEGJJA.js → chunk-3FQD3QME.js} +3 -3
  9. package/dist/{chunk-EAIR6VUL.js → chunk-4HDOP7LH.js} +8 -67
  10. package/dist/chunk-4PTSTDIG.js +59 -0
  11. package/dist/{live-diff-FP4SFNT4.js → chunk-5HCDZ2XN.js} +67 -6
  12. package/dist/{chunk-5WGEURVI.js → chunk-6AAT2AYQ.js} +21 -1
  13. package/dist/{chunk-AJ7JQ4OU.js → chunk-AAFBSOSD.js} +3 -3
  14. package/dist/{chunk-VWGJQTNA.js → chunk-CEFYM6N5.js} +4 -4
  15. package/dist/{chunk-YUPQOLFX.js → chunk-CQBJNFDK.js} +2 -2
  16. package/dist/{chunk-FN4OQT2J.js → chunk-CU5VOSTW.js} +4 -4
  17. package/dist/{chunk-YUBJLB6G.js → chunk-EFH4NFPY.js} +6 -3
  18. package/dist/chunk-EQW3YT5U.js +159 -0
  19. package/dist/{chunk-CYJ7R3AD.js → chunk-GC7ZQHW7.js} +22 -10
  20. package/dist/{chunk-KGNJM4LN.js → chunk-JQLR64UC.js} +6 -5
  21. package/dist/{chunk-PXXLBXOP.js → chunk-JRGDLAEA.js} +2 -2
  22. package/dist/{chunk-7REDODS2.js → chunk-LLWK6H77.js} +20 -2
  23. package/dist/{chunk-WGDAOOXG.js → chunk-MU3O43L2.js} +3 -3
  24. package/dist/{chunk-YYSJAAJM.js → chunk-OKNSR7MT.js} +51 -3
  25. package/dist/{chunk-MFIHIS6B.js → chunk-OLQLJY5T.js} +2 -2
  26. package/dist/{chunk-ACQCK4DT.js → chunk-OR43PDCW.js} +2 -2
  27. package/dist/{chunk-QUUB7HYK.js → chunk-P5C2YKAM.js} +2 -2
  28. package/dist/{chunk-D6OGU2AI.js → chunk-P5OAM3G2.js} +2 -2
  29. package/dist/{chunk-6DHJVLYP.js → chunk-Q77KNEUL.js} +1 -1
  30. package/dist/{chunk-SWIXWJIY.js → chunk-QVSUMHNN.js} +3 -3
  31. package/dist/{chunk-C56BC2FY.js → chunk-SG4UBJ47.js} +2 -2
  32. package/dist/{chunk-DUC3PXDG.js → chunk-SOCYCBYG.js} +54 -27
  33. package/dist/{chunk-VKD3EBKG.js → chunk-TYBB7ON3.js} +58 -38
  34. package/dist/{chunk-VTIL47DT.js → chunk-W5NOKYEG.js} +6 -2
  35. package/dist/{chunk-DGSF2Q5H.js → chunk-WJYB7DSI.js} +2 -2
  36. package/dist/{chunk-T6N3VMMO.js → chunk-Y7BARS25.js} +2 -2
  37. package/dist/cli.d.ts +36 -3
  38. package/dist/cli.js +7 -7
  39. package/dist/{codegen-command-Z7WQMOJ7.js → codegen-command-6XXOIQ25.js} +18 -18
  40. package/dist/{completion-4GYN752B.js → completion-A6BZ3XGU.js} +8 -7
  41. package/dist/{deploy-command-M2S4HHLC.js → deploy-command-MTQQXPOO.js} +16 -16
  42. package/dist/{env-target-GSFCYHKZ.js → env-target-C5JFLDK3.js} +6 -6
  43. package/dist/{ephemeral-command-6WJW7LP6.js → ephemeral-command-K3UJSDS4.js} +13 -13
  44. package/dist/index.d.ts +67 -24
  45. package/dist/index.js +6 -6
  46. package/dist/init-command-AY4KSXR5.js +30 -0
  47. package/dist/internal.js +13 -11
  48. package/dist/{io-7VIA5SON.js → io-65CJNLYI.js} +3 -3
  49. package/dist/live-diff-QK4KC2FJ.js +12 -0
  50. package/dist/{lock-KXOJIGCG.js → lock-PDFCNYUW.js} +2 -2
  51. package/dist/{lock-commands-7IH7RSSP.js → lock-commands-MC6I3MZA.js} +8 -8
  52. package/dist/{login-command-QM5SBBI2.js → login-command-LCOOOPO2.js} +139 -36
  53. package/dist/{logout-command-THPASOHM.js → logout-command-J2AG5NKC.js} +2 -2
  54. package/dist/{marketplace-command-463DT7O7.js → marketplace-command-BCOAAN2I.js} +3 -3
  55. package/dist/{meta-client-OW5WKWW7.js → meta-client-57ZWVHST.js} +2 -2
  56. package/dist/node.js +10 -10
  57. package/dist/{profile-command-EUWPVWED.js → profile-command-ZPC2DPFV.js} +3 -3
  58. package/dist/{release-command-M4CVNTWL.js → release-command-V4K4IORX.js} +193 -25
  59. package/dist/{sandbox-details-command-BRII3QHG.js → sandbox-details-command-DMY2KGA2.js} +4 -4
  60. package/dist/{sandbox-export-command-PCZ5FL4U.js → sandbox-export-command-R6QMEK3D.js} +5 -5
  61. package/dist/scaffold.d.ts +10 -13
  62. package/dist/scaffold.js +3 -3
  63. package/dist/{test-command-U4G5Y3UM.js → test-command-OEBIGOPP.js} +8 -8
  64. package/dist/{upgrade-command-CKJ4BS2P.js → upgrade-command-52AAZ3NV.js} +13 -13
  65. package/dist/{validate-command-S5N37JRP.js → validate-command-KTLPSSH7.js} +10 -10
  66. package/dist/{workspace-command-RALSEJSW.js → workspace-command-LX5S5N2H.js} +24 -20
  67. package/guides/cli.md +1 -0
  68. package/guides/deploying.md +18 -0
  69. package/guides/environment.md +1 -1
  70. package/guides/scaffold.md +3 -2
  71. package/llms/statements-calls.md +1 -1
  72. package/llms/statements-data.md +2 -1
  73. package/llms-full.txt +4 -3
  74. package/llms.txt +1 -1
  75. package/manifest.json +6 -2
  76. package/package.json +1 -1
  77. package/dist/chunk-ALNQCWAW.js +0 -29
  78. package/dist/init-command-GJUPWTKA.js +0 -30
@@ -9,11 +9,11 @@ import {
9
9
  unknownFlag,
10
10
  unknownHelpTopic,
11
11
  unknownSubcommand
12
- } from "./chunk-KGNJM4LN.js";
12
+ } from "./chunk-JQLR64UC.js";
13
13
  import {
14
14
  readLockFile,
15
15
  writeLockFile
16
- } from "./chunk-MFIHIS6B.js";
16
+ } from "./chunk-OLQLJY5T.js";
17
17
  import {
18
18
  detail,
19
19
  info,
@@ -24,13 +24,13 @@ import {
24
24
  Xano,
25
25
  assertSeedIds,
26
26
  coerceSeedRowValues
27
- } from "./chunk-BPEEGJJA.js";
27
+ } from "./chunk-3FQD3QME.js";
28
28
  import {
29
29
  getCommand,
30
30
  getSubcommand,
31
31
  isCommand,
32
32
  suggest
33
- } from "./chunk-YYSJAAJM.js";
33
+ } from "./chunk-OKNSR7MT.js";
34
34
  import {
35
35
  FILTER_NAMES,
36
36
  KNOWLEDGE_DIR,
@@ -44,7 +44,7 @@ import {
44
44
  pathSegment,
45
45
  serializeBundle,
46
46
  tableColumns
47
- } from "./chunk-YUPQOLFX.js";
47
+ } from "./chunk-CQBJNFDK.js";
48
48
  import {
49
49
  WORKSPACE_KEY,
50
50
  createLockContext,
@@ -56,7 +56,7 @@ import {
56
56
  seedLockOverrides,
57
57
  serializeLock,
58
58
  validateLockModel
59
- } from "./chunk-YUBJLB6G.js";
59
+ } from "./chunk-EFH4NFPY.js";
60
60
 
61
61
  // src/emit/cli.ts
62
62
  import { pathToFileURL as pathToFileURL3, fileURLToPath as fileURLToPath3 } from "url";
@@ -395,6 +395,7 @@ function parseArgs(argv) {
395
395
  let authHost;
396
396
  let authFile;
397
397
  let useLocal = false;
398
+ let paste = false;
398
399
  let allWorkspaces = false;
399
400
  let guest = false;
400
401
  let urlOnly = false;
@@ -429,6 +430,10 @@ function parseArgs(argv) {
429
430
  let resetData = false;
430
431
  let seed = false;
431
432
  let replace = false;
433
+ let branch;
434
+ let setLive = false;
435
+ let allowSharedSchemaChanges = false;
436
+ let backupBranch;
432
437
  let emit2;
433
438
  let json = false;
434
439
  let open = false;
@@ -515,6 +520,8 @@ function parseArgs(argv) {
515
520
  authFile = arg.slice("--config=".length);
516
521
  } else if (arg === "--local") {
517
522
  useLocal = true;
523
+ } else if (arg === "--paste") {
524
+ paste = true;
518
525
  } else if (arg === "--all-workspaces") {
519
526
  allWorkspaces = true;
520
527
  } else if (arg === "--guest" || arg === "-g") {
@@ -621,6 +628,21 @@ function parseArgs(argv) {
621
628
  seed = true;
622
629
  } else if (arg === "--replace") {
623
630
  replace = true;
631
+ } else if (arg === "--branch" || arg.startsWith("--branch=")) {
632
+ const value = arg === "--branch" ? rest[++i] : arg.slice("--branch=".length);
633
+ if (value === void 0 || value === "") {
634
+ throw new Error("--branch expects a branch label (e.g. `--branch staging`).");
635
+ }
636
+ branch = value;
637
+ } else if (arg === "--set-live") {
638
+ setLive = true;
639
+ } else if (arg === "--allow-shared-schema-changes") {
640
+ allowSharedSchemaChanges = true;
641
+ } else if (arg === "--backup-branch") {
642
+ backupBranch = true;
643
+ } else if (arg.startsWith("--backup-branch=")) {
644
+ const value = arg.slice("--backup-branch=".length);
645
+ backupBranch = value === "" ? true : value;
624
646
  } else if (arg === "--json") {
625
647
  json = true;
626
648
  } else if (arg === "--open") {
@@ -686,6 +708,7 @@ function parseArgs(argv) {
686
708
  authHost,
687
709
  authFile,
688
710
  local: useLocal,
711
+ paste,
689
712
  allWorkspaces,
690
713
  guest,
691
714
  urlOnly,
@@ -720,6 +743,10 @@ function parseArgs(argv) {
720
743
  resetData,
721
744
  seed,
722
745
  replace,
746
+ branch,
747
+ setLive,
748
+ allowSharedSchemaChanges,
749
+ backupBranch,
723
750
  emit: emit2,
724
751
  json,
725
752
  open,
@@ -928,11 +955,11 @@ async function run(argv) {
928
955
  return;
929
956
  }
930
957
  if (command === "init") {
931
- const { runInitCommand } = await import("./init-command-GJUPWTKA.js");
958
+ const { runInitCommand } = await import("./init-command-AY4KSXR5.js");
932
959
  return runInitCommand(args);
933
960
  }
934
961
  if (command === "completion") {
935
- const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-4GYN752B.js");
962
+ const { isCompletionShell, runCompletionCommand, COMPLETION_SHELLS } = await import("./completion-A6BZ3XGU.js");
936
963
  const shell = args.positionals[0];
937
964
  if (shell === void 0 || !isCompletionShell(shell)) {
938
965
  throw new UsageError(
@@ -943,31 +970,31 @@ async function run(argv) {
943
970
  return runCompletionCommand(shell);
944
971
  }
945
972
  if (command === "upgrade") {
946
- const { runUpgradeCommand } = await import("./upgrade-command-CKJ4BS2P.js");
973
+ const { runUpgradeCommand } = await import("./upgrade-command-52AAZ3NV.js");
947
974
  return runUpgradeCommand(args);
948
975
  }
949
976
  if (command === "lock") {
950
- const { runLockCommand } = await import("./lock-commands-7IH7RSSP.js");
977
+ const { runLockCommand } = await import("./lock-commands-MC6I3MZA.js");
951
978
  return runLockCommand(args);
952
979
  }
953
980
  if (command === "login") {
954
- const { runLoginCommand } = await import("./login-command-QM5SBBI2.js");
981
+ const { runLoginCommand } = await import("./login-command-LCOOOPO2.js");
955
982
  return runLoginCommand(args);
956
983
  }
957
984
  if (command === "logout") {
958
- const { runLogoutCommand } = await import("./logout-command-THPASOHM.js");
985
+ const { runLogoutCommand } = await import("./logout-command-J2AG5NKC.js");
959
986
  return runLogoutCommand(args);
960
987
  }
961
988
  if (command === "deploy") {
962
- const { runDeployCommand } = await import("./deploy-command-M2S4HHLC.js");
989
+ const { runDeployCommand } = await import("./deploy-command-MTQQXPOO.js");
963
990
  return runDeployCommand(args);
964
991
  }
965
992
  if (command === "ephemeral") {
966
- const { runEphemeralCommand } = await import("./ephemeral-command-6WJW7LP6.js");
993
+ const { runEphemeralCommand } = await import("./ephemeral-command-K3UJSDS4.js");
967
994
  return runEphemeralCommand(args);
968
995
  }
969
996
  if (command === "release") {
970
- const { runReleaseCommand } = await import("./release-command-M4CVNTWL.js");
997
+ const { runReleaseCommand } = await import("./release-command-V4K4IORX.js");
971
998
  return runReleaseCommand(args);
972
999
  }
973
1000
  if (command === "sandbox") {
@@ -975,47 +1002,47 @@ async function run(argv) {
975
1002
  throw removedSubcommand("sandbox", "deploy");
976
1003
  }
977
1004
  if (args.subcommand === "details") {
978
- const { runSandboxDetailsCommand } = await import("./sandbox-details-command-BRII3QHG.js");
1005
+ const { runSandboxDetailsCommand } = await import("./sandbox-details-command-DMY2KGA2.js");
979
1006
  return runSandboxDetailsCommand(args);
980
1007
  }
981
1008
  if (args.subcommand === "export") {
982
- const { runSandboxExportCommand } = await import("./sandbox-export-command-PCZ5FL4U.js");
1009
+ const { runSandboxExportCommand } = await import("./sandbox-export-command-R6QMEK3D.js");
983
1010
  return runSandboxExportCommand(args);
984
1011
  }
985
1012
  if (args.subcommand === "codegen") {
986
- const { runCodegenCommand } = await import("./codegen-command-Z7WQMOJ7.js");
1013
+ const { runCodegenCommand } = await import("./codegen-command-6XXOIQ25.js");
987
1014
  return runCodegenCommand(args, { kind: "sandbox" });
988
1015
  }
989
1016
  throw unknownSubcommand("sandbox", args.subcommand);
990
1017
  }
991
1018
  if (command === "test") {
992
- const { runTestCommand } = await import("./test-command-U4G5Y3UM.js");
1019
+ const { runTestCommand } = await import("./test-command-OEBIGOPP.js");
993
1020
  return runTestCommand(args);
994
1021
  }
995
1022
  if (command === "workspace") {
996
- const { runWorkspaceCommand } = await import("./workspace-command-RALSEJSW.js");
1023
+ const { runWorkspaceCommand } = await import("./workspace-command-LX5S5N2H.js");
997
1024
  return runWorkspaceCommand(args);
998
1025
  }
999
1026
  if (command === "codegen") {
1000
- const { runCodegenCommand } = await import("./codegen-command-Z7WQMOJ7.js");
1027
+ const { runCodegenCommand } = await import("./codegen-command-6XXOIQ25.js");
1001
1028
  return runCodegenCommand(args, { kind: "file" });
1002
1029
  }
1003
1030
  if (command === "profile") {
1004
1031
  if (args.subcommand !== "me") {
1005
1032
  throw unknownSubcommand("profile", args.subcommand);
1006
1033
  }
1007
- const { runProfileCommand } = await import("./profile-command-EUWPVWED.js");
1034
+ const { runProfileCommand } = await import("./profile-command-ZPC2DPFV.js");
1008
1035
  return runProfileCommand(args);
1009
1036
  }
1010
1037
  if (command === "whoami") {
1011
- const { runProfileCommand } = await import("./profile-command-EUWPVWED.js");
1038
+ const { runProfileCommand } = await import("./profile-command-ZPC2DPFV.js");
1012
1039
  return runProfileCommand(args);
1013
1040
  }
1014
1041
  if (command === "marketplace") {
1015
1042
  if (!["list", "search", "details", "install"].includes(args.subcommand ?? "")) {
1016
1043
  throw unknownSubcommand("marketplace", args.subcommand);
1017
1044
  }
1018
- const marketplace = await import("./marketplace-command-463DT7O7.js");
1045
+ const marketplace = await import("./marketplace-command-BCOAAN2I.js");
1019
1046
  if (args.subcommand === "list") return marketplace.runMarketplaceListCommand(args);
1020
1047
  if (args.subcommand === "search") return marketplace.runMarketplaceSearchCommand(args);
1021
1048
  if (args.subcommand === "details") return marketplace.runMarketplaceDetailsCommand(args);
@@ -1025,7 +1052,7 @@ async function run(argv) {
1025
1052
  throw unknownCommand("push");
1026
1053
  }
1027
1054
  if (command === "validate") {
1028
- const { runValidateCommand } = await import("./validate-command-S5N37JRP.js");
1055
+ const { runValidateCommand } = await import("./validate-command-KTLPSSH7.js");
1029
1056
  return runValidateCommand(args);
1030
1057
  }
1031
1058
  if (command !== "compile" && command !== "export" && command !== "paths" && command !== "routes") {
@@ -1057,7 +1084,7 @@ async function run(argv) {
1057
1084
  }
1058
1085
  async function refreshAgentGuidance() {
1059
1086
  try {
1060
- const { refreshAgentFiles } = await import("./agent-file-refresh-IJ7GN2FJ.js");
1087
+ const { refreshAgentFiles } = await import("./agent-file-refresh-6XT23SLU.js");
1061
1088
  const refreshed = refreshAgentFiles({
1062
1089
  projectDir: process.cwd(),
1063
1090
  sdkVersion: readVersion()
@@ -1290,4 +1317,4 @@ export {
1290
1317
  exportBundleJson,
1291
1318
  compileBundle
1292
1319
  };
1293
- //# sourceMappingURL=chunk-DUC3PXDG.js.map
1320
+ //# sourceMappingURL=chunk-SOCYCBYG.js.map
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-ZOYMZZ3S.js";
19
19
  import {
20
20
  getAccessToken
21
- } from "./chunk-C56BC2FY.js";
21
+ } from "./chunk-SG4UBJ47.js";
22
22
  import {
23
23
  exportWorkspaceBundle
24
24
  } from "./chunk-QTNO2WD6.js";
@@ -27,15 +27,15 @@ import {
27
27
  resolveFrontendPreset,
28
28
  resolveThemeChoice,
29
29
  sanitizeAppName
30
- } from "./chunk-EAIR6VUL.js";
30
+ } from "./chunk-4HDOP7LH.js";
31
31
  import {
32
32
  XANO_DIR,
33
33
  resolveAiPresets,
34
34
  scaffoldProject
35
- } from "./chunk-7SISR3CS.js";
35
+ } from "./chunk-2SUCC4DV.js";
36
36
  import {
37
37
  TEST_EXPECT_TYPES
38
- } from "./chunk-PXXLBXOP.js";
38
+ } from "./chunk-JRGDLAEA.js";
39
39
  import {
40
40
  raw
41
41
  } from "./chunk-LU7TRWMC.js";
@@ -44,7 +44,7 @@ import {
44
44
  describeOrigin,
45
45
  renderCodegenMarker,
46
46
  renderCodegenReadme
47
- } from "./chunk-QUUB7HYK.js";
47
+ } from "./chunk-P5C2YKAM.js";
48
48
  import {
49
49
  FIELD_METHODS,
50
50
  STATEMENT_SURFACES,
@@ -67,14 +67,14 @@ import {
67
67
  searchConstrainsRows,
68
68
  tableTrigger,
69
69
  workspaceTrigger
70
- } from "./chunk-CYJ7R3AD.js";
70
+ } from "./chunk-GC7ZQHW7.js";
71
71
  import {
72
72
  loadDefault,
73
73
  readVersion
74
- } from "./chunk-DUC3PXDG.js";
74
+ } from "./chunk-SOCYCBYG.js";
75
75
  import {
76
76
  UsageError
77
- } from "./chunk-KGNJM4LN.js";
77
+ } from "./chunk-JQLR64UC.js";
78
78
  import {
79
79
  blank,
80
80
  detail,
@@ -115,7 +115,7 @@ import {
115
115
  sys,
116
116
  toolset,
117
117
  withFilters
118
- } from "./chunk-YUPQOLFX.js";
118
+ } from "./chunk-CQBJNFDK.js";
119
119
  import {
120
120
  parsePathParams,
121
121
  unboundPathParams
@@ -130,7 +130,7 @@ import {
130
130
  } from "./chunk-5XZ744TS.js";
131
131
  import {
132
132
  REFERENCEABLE_KIND_PAYLOAD_KEYS
133
- } from "./chunk-YUBJLB6G.js";
133
+ } from "./chunk-EFH4NFPY.js";
134
134
 
135
135
  // src/emit/codegen-command.ts
136
136
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -2732,10 +2732,7 @@ function callDecoder(shape) {
2732
2732
  shape.path
2733
2733
  );
2734
2734
  }
2735
- const target = unbound ? lit(null) : shape.external ? obj2([
2736
- ["name", lit("")],
2737
- ["guid", lit(guid)]
2738
- ]) : resolveReference(a.ctx, a.refs, guid, { ...a.resolve, unresolved: "object-ref" });
2735
+ const target = unbound ? lit(null) : resolveReference(a.ctx, a.refs, guid, { ...a.resolve, unresolved: "object-ref" });
2739
2736
  const entries = [[shape.arg, target]];
2740
2737
  const runtime = {
2741
2738
  [shape.arg]: unbound ? null : { name: "", guid }
@@ -2845,11 +2842,7 @@ var CALL_DECODERS = /* @__PURE__ */ new Map([
2845
2842
  "mvp:workspace_run_middleware",
2846
2843
  callDecoder({ path: "middleware.call", arg: "middleware", idPath: "id" })
2847
2844
  ],
2848
- ["mvp:workspace_run_addon", callDecoder({ path: "addon.call", arg: "addon", idPath: "id" })],
2849
- [
2850
- "mvp:action",
2851
- callDecoder({ path: "action.call", arg: "action", idPath: "run_version.id", external: true })
2852
- ]
2845
+ ["mvp:workspace_run_addon", callDecoder({ path: "addon.call", arg: "addon", idPath: "id" })]
2853
2846
  ]);
2854
2847
 
2855
2848
  // src/codegen/specials/db.ts
@@ -4032,26 +4025,52 @@ function callInput2(a) {
4032
4025
  }
4033
4026
  return { expr: obj2(cells), runtime };
4034
4027
  }
4028
+ function registryInput(a) {
4029
+ const list = a.stored.settings_registry;
4030
+ return callInput2({ ...a, stored: { ...a.stored, input: Array.isArray(list) ? list : [] } });
4031
+ }
4032
+ function withCallBindings(a, entries, runtime) {
4033
+ for (const [key2, read] of [
4034
+ ["input", callInput2],
4035
+ ["registry", registryInput]
4036
+ ]) {
4037
+ const decoded = read(a);
4038
+ if (!decoded) return false;
4039
+ if (Object.keys(decoded.runtime).length > 0) {
4040
+ entries.push([key2, decoded.expr]);
4041
+ runtime[key2] = decoded.runtime;
4042
+ }
4043
+ }
4044
+ return true;
4045
+ }
4046
+ var actionCall = (a) => {
4047
+ const context = a.stored.context ?? {};
4048
+ const id2 = getPath2(context, "run_version.id");
4049
+ if (typeof id2 !== "string" || id2 === "")
4050
+ return declineHere("action.call: context.run_version.id is blank");
4051
+ const entries = [["actionId", lit(id2)]];
4052
+ const runtime = { actionId: id2 };
4053
+ withAs(a, entries, runtime);
4054
+ if (!withCallBindings(a, entries, runtime)) return null;
4055
+ return prove(a.ctx, a.stored, "action.call", [runtime], [obj2(entries)]);
4056
+ };
4035
4057
  var actionPackageCall = (a) => {
4036
4058
  const context = a.stored.context ?? {};
4037
- if (getPath2(context, "action.trace_id") !== "" || getPath2(context, "package_version.id") !== "")
4038
- return declineHere("action.package.call: statement carries a marketplace identity");
4039
- const slug = getPath2(context, "package.slug");
4040
- if (typeof slug !== "string")
4041
- return declineHere("action.package.call: context.package.slug is not a string");
4042
- const entries = [["action", lit("")]];
4043
- const runtime = { action: "" };
4044
- if (slug !== "") {
4045
- entries.push(["package", lit(slug)]);
4046
- runtime.package = slug;
4047
- }
4048
- const input2 = callInput2(a);
4049
- if (!input2) return null;
4050
- if (Object.keys(input2.runtime).length > 0) {
4051
- entries.push(["input", input2.expr]);
4052
- runtime.input = input2.runtime;
4059
+ const parts = {
4060
+ traceId: getPath2(context, "action.trace_id"),
4061
+ versionId: getPath2(context, "package_version.id"),
4062
+ slug: getPath2(context, "package.slug")
4063
+ };
4064
+ const entries = [];
4065
+ const runtime = {};
4066
+ for (const [arg, value] of Object.entries(parts)) {
4067
+ if (typeof value !== "string" || value === "")
4068
+ return declineHere(`action.package.call: context identity part \`${arg}\` is blank`);
4069
+ entries.push([arg, lit(value)]);
4070
+ runtime[arg] = value;
4053
4071
  }
4054
4072
  withAs(a, entries, runtime);
4073
+ if (!withCallBindings(a, entries, runtime)) return null;
4055
4074
  return prove(a.ctx, a.stored, "action.package.call", [runtime], [obj2(entries)]);
4056
4075
  };
4057
4076
  var workflowTestCall = (a) => {
@@ -4165,6 +4184,7 @@ var MISC_DECODERS = /* @__PURE__ */ new Map([
4165
4184
  ["mvp:realtime_publish", realtimePublish],
4166
4185
  ["mvp:create_auth", createAuthToken],
4167
4186
  ["mvp:guid", createGuid],
4187
+ ["mvp:action", actionCall],
4168
4188
  ["mvp:action_package", actionPackageCall],
4169
4189
  ["mvp:workspace_run_workflow_test", workflowTestCall]
4170
4190
  ]);
@@ -6731,7 +6751,7 @@ async function fetchBundle(args, source) {
6731
6751
  if (source.kind === "sandbox") {
6732
6752
  const auth3 = await getAccessToken(args);
6733
6753
  step("Reading the sandbox workspace");
6734
- const { fetchSandboxBundle } = await import("./sandbox-export-command-PCZ5FL4U.js");
6754
+ const { fetchSandboxBundle } = await import("./sandbox-export-command-R6QMEK3D.js");
6735
6755
  return {
6736
6756
  bundle: await fetchSandboxBundle(auth3),
6737
6757
  origin: { source: "sandbox", origin: auth3.instance }
@@ -6745,7 +6765,7 @@ async function fetchBundle(args, source) {
6745
6765
  );
6746
6766
  }
6747
6767
  const auth3 = await getAccessToken(args);
6748
- const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-6WJW7LP6.js");
6768
+ const { resolveLive, fetchEphemeralBundle } = await import("./ephemeral-command-K3UJSDS4.js");
6749
6769
  const summary = await resolveLive(auth3, auth3.workspaceId, name);
6750
6770
  step(`Reading ephemeral "${name}"`);
6751
6771
  return {
@@ -7014,4 +7034,4 @@ export {
7014
7034
  verifyCrashEntry,
7015
7035
  blameGeneratedFile
7016
7036
  };
7017
- //# sourceMappingURL=chunk-VKD3EBKG.js.map
7037
+ //# sourceMappingURL=chunk-TYBB7ON3.js.map
@@ -2,6 +2,9 @@
2
2
  import { createServer } from "http";
3
3
  import { spawn } from "child_process";
4
4
  var DEFAULT_TIMEOUT_MS = 5 * 60 * 1e3;
5
+ function loopbackRedirectUri(port, callbackPath) {
6
+ return `http://127.0.0.1:${port}${callbackPath}`;
7
+ }
5
8
  function formatDuration(ms) {
6
9
  const seconds = Math.round(ms / 1e3);
7
10
  if (seconds < 60) return `${seconds} second${seconds === 1 ? "" : "s"}`;
@@ -81,7 +84,7 @@ function startCallbackServer(opts) {
81
84
  });
82
85
  server.listen(port ?? 0, "127.0.0.1", () => {
83
86
  const boundPort = server.address().port;
84
- redirectUri = `http://127.0.0.1:${boundPort}${callbackPath}`;
87
+ redirectUri = loopbackRedirectUri(boundPort, callbackPath);
85
88
  resolveListener({
86
89
  redirectUri,
87
90
  waitForCallback,
@@ -119,7 +122,8 @@ function openBrowser(url) {
119
122
  }
120
123
 
121
124
  export {
125
+ loopbackRedirectUri,
122
126
  startCallbackServer,
123
127
  openBrowser
124
128
  };
125
- //# sourceMappingURL=chunk-VTIL47DT.js.map
129
+ //# sourceMappingURL=chunk-W5NOKYEG.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureGitignored
3
- } from "./chunk-7REDODS2.js";
3
+ } from "./chunk-LLWK6H77.js";
4
4
  import {
5
5
  atomicWrite
6
6
  } from "./chunk-GNPVYOPB.js";
@@ -57,4 +57,4 @@ export {
57
57
  setEnvironment,
58
58
  clearEnvironment
59
59
  };
60
- //# sourceMappingURL=chunk-DGSF2Q5H.js.map
60
+ //# sourceMappingURL=chunk-WJYB7DSI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readVersion
3
- } from "./chunk-DUC3PXDG.js";
3
+ } from "./chunk-SOCYCBYG.js";
4
4
  import {
5
5
  atomicWrite
6
6
  } from "./chunk-GNPVYOPB.js";
@@ -170,4 +170,4 @@ export {
170
170
  upgradeCommand,
171
171
  maybeNotifyUpdate
172
172
  };
173
- //# sourceMappingURL=chunk-T6N3VMMO.js.map
173
+ //# sourceMappingURL=chunk-Y7BARS25.js.map
package/dist/cli.d.ts CHANGED
@@ -141,8 +141,15 @@ interface ParsedArgs {
141
141
  urlOnly: boolean;
142
142
  /** `marketplace details --prompt`: print the add-on's agent prompt alone, for piping. */
143
143
  prompt: boolean;
144
- /** `login --port <n>`: fixed loopback callback port (default: an ephemeral port). */
144
+ /** `login --port <n>`: loopback callback port (default: `DEFAULT_PORT`, 47100). */
145
145
  port: number | undefined;
146
+ /**
147
+ * `login --paste`: skip the loopback callback server and read the redirect back
148
+ * from the user, for a host whose 127.0.0.1 the browser cannot reach (remote
149
+ * shell, container, Codespace). Distinct from `XANO_NO_BROWSER`, which only
150
+ * suppresses the browser launch and still needs the redirect to arrive.
151
+ */
152
+ paste: boolean;
146
153
  /** `login --scope "<space list>"`: OAuth scopes to request (default: the built-in xano-cli set). */
147
154
  scope: string | undefined;
148
155
  /** `validate --runtime`: after import + round-trip, run each deployed function and report. */
@@ -183,8 +190,8 @@ interface ParsedArgs {
183
190
  /**
184
191
  * `init`/`codegen` `--theme <id>`: the shadcn/ui palette to render into the
185
192
  * scaffold's stylesheet — a `<base>` or `<base>-<accent>` pair, a registry
186
- * theme URL, or a path to a registry item JSON file. Undefined = prompt in a
187
- * TTY, else plain shadcn. Validated in `theme-presets.ts`, not at parse time.
193
+ * theme URL, or a path to a registry item JSON file. Undefined = plain
194
+ * shadcn. Validated in `theme-presets.ts`, not at parse time.
188
195
  */
189
196
  theme: string | undefined;
190
197
  /** `init`/`codegen` `--radius <len>`: corner radius override, bare number = rem. */
@@ -267,6 +274,32 @@ interface ParsedArgs {
267
274
  * Named rather than implicit so it can never be reached by accident.
268
275
  */
269
276
  replace: boolean;
277
+ /**
278
+ * `release --branch <label>`: land on this branch instead of the live one.
279
+ *
280
+ * The staging boundary for a workspace that has no second workspace. Branches
281
+ * scope LOGIC only — see {@link allowSharedSchemaChanges}.
282
+ */
283
+ branch: string | undefined;
284
+ /**
285
+ * `release --branch <label> --set-live`: promote the branch the moment the
286
+ * import lands, in the same call.
287
+ */
288
+ setLive: boolean;
289
+ /**
290
+ * `release --branch <label> --allow-shared-schema-changes`: proceed even
291
+ * though the bundle changes tables or microservices.
292
+ *
293
+ * Those carry no branch dimension, so they reach PRODUCTION whichever branch
294
+ * is targeted. A separate flag rather than a prompt, because the failure mode
295
+ * is not knowing — and `--yes` in CI answers a prompt without reading it.
296
+ */
297
+ allowSharedSchemaChanges: boolean;
298
+ /**
299
+ * `release --backup-branch[=<label>]`: clone the live branch before importing,
300
+ * so a bad promote is one `set-live` away from being undone.
301
+ */
302
+ backupBranch: string | boolean | undefined;
270
303
  /**
271
304
  * `--json`: force the machine-readable JSON on stdout even at a terminal.
272
305
  * Absent, the format is inferred from stdout being a TTY. Read through
package/dist/cli.js CHANGED
@@ -8,17 +8,17 @@ import {
8
8
  resolveHelpRequest,
9
9
  resolveLockPath,
10
10
  run
11
- } from "./chunk-DUC3PXDG.js";
12
- import "./chunk-KGNJM4LN.js";
13
- import "./chunk-MFIHIS6B.js";
11
+ } from "./chunk-SOCYCBYG.js";
12
+ import "./chunk-JQLR64UC.js";
13
+ import "./chunk-OLQLJY5T.js";
14
14
  import "./chunk-GNPVYOPB.js";
15
15
  import "./chunk-EZG76F7R.js";
16
- import "./chunk-BPEEGJJA.js";
17
- import "./chunk-YYSJAAJM.js";
18
- import "./chunk-YUPQOLFX.js";
16
+ import "./chunk-3FQD3QME.js";
17
+ import "./chunk-OKNSR7MT.js";
18
+ import "./chunk-CQBJNFDK.js";
19
19
  import "./chunk-WHOJWOSV.js";
20
20
  import "./chunk-5XZ744TS.js";
21
- import "./chunk-YUBJLB6G.js";
21
+ import "./chunk-EFH4NFPY.js";
22
22
  export {
23
23
  compileBundle,
24
24
  exportBundleJson,
@@ -4,35 +4,35 @@ import {
4
4
  isMissingDependencyError,
5
5
  runCodegenCommand,
6
6
  verifyCrashEntry
7
- } from "./chunk-VKD3EBKG.js";
7
+ } from "./chunk-TYBB7ON3.js";
8
8
  import "./chunk-ZOYMZZ3S.js";
9
- import "./chunk-C56BC2FY.js";
10
- import "./chunk-7REDODS2.js";
9
+ import "./chunk-SG4UBJ47.js";
10
+ import "./chunk-LLWK6H77.js";
11
11
  import "./chunk-QTNO2WD6.js";
12
12
  import "./chunk-ZUTSMMAG.js";
13
13
  import "./chunk-X4DVXBFY.js";
14
- import "./chunk-EAIR6VUL.js";
15
- import "./chunk-7SISR3CS.js";
14
+ import "./chunk-4HDOP7LH.js";
15
+ import "./chunk-2SUCC4DV.js";
16
16
  import "./chunk-ZSYZTGJH.js";
17
17
  import "./chunk-3IGNIP6R.js";
18
- import "./chunk-PXXLBXOP.js";
18
+ import "./chunk-JRGDLAEA.js";
19
19
  import "./chunk-LU7TRWMC.js";
20
- import "./chunk-WGDAOOXG.js";
21
- import "./chunk-QUUB7HYK.js";
22
- import "./chunk-6DHJVLYP.js";
20
+ import "./chunk-MU3O43L2.js";
21
+ import "./chunk-P5C2YKAM.js";
22
+ import "./chunk-Q77KNEUL.js";
23
23
  import "./chunk-4BXJGVZ3.js";
24
- import "./chunk-CYJ7R3AD.js";
25
- import "./chunk-DUC3PXDG.js";
26
- import "./chunk-KGNJM4LN.js";
27
- import "./chunk-MFIHIS6B.js";
24
+ import "./chunk-GC7ZQHW7.js";
25
+ import "./chunk-SOCYCBYG.js";
26
+ import "./chunk-JQLR64UC.js";
27
+ import "./chunk-OLQLJY5T.js";
28
28
  import "./chunk-GNPVYOPB.js";
29
29
  import "./chunk-EZG76F7R.js";
30
- import "./chunk-BPEEGJJA.js";
31
- import "./chunk-YYSJAAJM.js";
32
- import "./chunk-YUPQOLFX.js";
30
+ import "./chunk-3FQD3QME.js";
31
+ import "./chunk-OKNSR7MT.js";
32
+ import "./chunk-CQBJNFDK.js";
33
33
  import "./chunk-WHOJWOSV.js";
34
34
  import "./chunk-5XZ744TS.js";
35
- import "./chunk-YUBJLB6G.js";
35
+ import "./chunk-EFH4NFPY.js";
36
36
  export {
37
37
  blameGeneratedFile,
38
38
  fetchWorkspaceBundle,
@@ -40,4 +40,4 @@ export {
40
40
  runCodegenCommand,
41
41
  verifyCrashEntry
42
42
  };
43
- //# sourceMappingURL=codegen-command-Z7WQMOJ7.js.map
43
+ //# sourceMappingURL=codegen-command-6XXOIQ25.js.map