@xanots/sdk 0.0.5 → 0.0.7

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 (83) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +3 -3
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/{agent-file-refresh-IJ7GN2FJ.js → agent-file-refresh-4W37DGXS.js} +4 -4
  5. package/dist/bin.js +8 -8
  6. package/dist/branch-commands-PBQ36L4A.js +134 -0
  7. package/dist/{chunk-CYJ7R3AD.js → chunk-2V3JUXTF.js} +24 -11
  8. package/dist/{chunk-OR43PDCW.js → chunk-3EYUR3TX.js} +2 -2
  9. package/dist/{chunk-SG4UBJ47.js → chunk-3QW5NFZJ.js} +26 -5
  10. package/dist/{chunk-7SISR3CS.js → chunk-4PE4ZAB7.js} +3 -3
  11. package/dist/{chunk-PGBK64U5.js → chunk-4PTSTDIG.js} +2 -2
  12. package/dist/{live-diff-FP4SFNT4.js → chunk-5HCDZ2XN.js} +67 -6
  13. package/dist/{chunk-OARSPAIE.js → chunk-5PDOAR77.js} +58 -38
  14. package/dist/{chunk-5WGEURVI.js → chunk-6AAT2AYQ.js} +21 -1
  15. package/dist/{chunk-QA5ICJ4M.js → chunk-7BUTRVKA.js} +3 -3
  16. package/dist/{chunk-YUBJLB6G.js → chunk-7JDT4PBU.js} +75 -8
  17. package/dist/{chunk-LLWK6H77.js → chunk-BKDJN76G.js} +31 -1
  18. package/dist/{chunk-MS3BRZAZ.js → chunk-CL2H2WYE.js} +50 -27
  19. package/dist/{chunk-KXCPZUUM.js → chunk-DBHE35JM.js} +8 -67
  20. package/dist/chunk-EQW3YT5U.js +159 -0
  21. package/dist/{chunk-BPEEGJJA.js → chunk-FAWNUE2U.js} +39 -8
  22. package/dist/{chunk-ZGA5MUNC.js → chunk-FDKR4YMN.js} +2 -2
  23. package/dist/{chunk-APOR6TCV.js → chunk-H2DEDWQF.js} +4 -4
  24. package/dist/{chunk-PXXLBXOP.js → chunk-JAVB27HL.js} +2 -2
  25. package/dist/{chunk-AAFBSOSD.js → chunk-JQJPFUZI.js} +3 -3
  26. package/dist/{chunk-IVP6TS26.js → chunk-JQLR64UC.js} +6 -5
  27. package/dist/{chunk-FN4OQT2J.js → chunk-JUHKEAHJ.js} +4 -4
  28. package/dist/{chunk-WJYB7DSI.js → chunk-MDXR5E5Q.js} +2 -2
  29. package/dist/{chunk-WGDAOOXG.js → chunk-MU3O43L2.js} +3 -3
  30. package/dist/{chunk-YUPQOLFX.js → chunk-NJGNUVXR.js} +15 -4
  31. package/dist/{chunk-F5T45NAM.js → chunk-OKNSR7MT.js} +45 -2
  32. package/dist/{chunk-MFIHIS6B.js → chunk-OYMR5AMJ.js} +2 -2
  33. package/dist/{chunk-QUUB7HYK.js → chunk-P5C2YKAM.js} +2 -2
  34. package/dist/{chunk-6DHJVLYP.js → chunk-Q77KNEUL.js} +1 -1
  35. package/dist/{chunk-D6OGU2AI.js → chunk-QIWBCS7N.js} +2 -2
  36. package/dist/cli.d.ts +28 -2
  37. package/dist/cli.js +7 -7
  38. package/dist/{codegen-command-BLOS3GR3.js → codegen-command-DYH4H4TD.js} +18 -18
  39. package/dist/{completion-GHP5RRLQ.js → completion-A6BZ3XGU.js} +8 -7
  40. package/dist/{deploy-command-XOH76USO.js → deploy-command-HM57BINV.js} +15 -15
  41. package/dist/{env-target-POGJMD6Q.js → env-target-WA3BH5YU.js} +6 -6
  42. package/dist/{ephemeral-command-46SL27GJ.js → ephemeral-command-SD2KLX4P.js} +10 -10
  43. package/dist/index.d.ts +69 -26
  44. package/dist/index.js +6 -6
  45. package/dist/init-command-VIPWAQYS.js +30 -0
  46. package/dist/internal.d.ts +2 -2
  47. package/dist/internal.js +120 -62
  48. package/dist/{io-7VIA5SON.js → io-M7XZEMK7.js} +3 -3
  49. package/dist/live-diff-QK4KC2FJ.js +12 -0
  50. package/dist/{lock-KXOJIGCG.js → lock-GFXD6G2E.js} +6 -2
  51. package/dist/{lock-commands-6UONZW26.js → lock-commands-7VJKAXV6.js} +8 -8
  52. package/dist/{login-command-SG7IWTHW.js → login-command-DFCURZLC.js} +6 -6
  53. package/dist/{logout-command-J2AG5NKC.js → logout-command-WXVZQCAV.js} +2 -2
  54. package/dist/{marketplace-command-NKTQ3VPS.js → marketplace-command-BCOAAN2I.js} +3 -3
  55. package/dist/{meta-client-OW5WKWW7.js → meta-client-57ZWVHST.js} +2 -2
  56. package/dist/node.d.ts +2 -2
  57. package/dist/node.js +10 -10
  58. package/dist/{profile-command-ZPC2DPFV.js → profile-command-QJAAUZIV.js} +3 -3
  59. package/dist/{release-command-FKQ6E3TD.js → release-command-3IET7YII.js} +206 -26
  60. package/dist/{sandbox-details-command-DMY2KGA2.js → sandbox-details-command-EDO56IY3.js} +4 -4
  61. package/dist/{sandbox-export-command-R6QMEK3D.js → sandbox-export-command-MO6DEZ7Z.js} +5 -5
  62. package/dist/scaffold.d.ts +10 -13
  63. package/dist/scaffold.js +3 -3
  64. package/dist/{store-BJONDJoZ.d.ts → store-DfuWu1tE.d.ts} +1 -1
  65. package/dist/{test-command-56IAEYHX.js → test-command-S7SMRWMP.js} +8 -8
  66. package/dist/{upgrade-command-M2DZ3ZPD.js → upgrade-command-TZYSGXP7.js} +13 -13
  67. package/dist/{validate-command-CIBQJND7.js → validate-command-MMXEVHH3.js} +10 -10
  68. package/dist/{workspace-command-HZS43PHJ.js → workspace-command-X6L7HTXO.js} +24 -20
  69. package/guides/environment.md +6 -3
  70. package/guides/scaffold.md +3 -2
  71. package/llms/fields.md +8 -0
  72. package/llms/kinds-core.md +2 -1
  73. package/llms/lambda.md +1 -1
  74. package/llms/legacy.md +1 -1
  75. package/llms/lock.md +32 -0
  76. package/llms/object-kinds.md +2 -2
  77. package/llms/statements-calls.md +10 -3
  78. package/llms/statements-data.md +2 -1
  79. package/llms-full.txt +108 -58
  80. package/llms.txt +49 -49
  81. package/manifest.json +2 -2
  82. package/package.json +1 -1
  83. package/dist/init-command-NCRPVFGE.js +0 -30
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  sandboxBaseUrl
3
- } from "./chunk-OR43PDCW.js";
3
+ } from "./chunk-3EYUR3TX.js";
4
4
  import {
5
5
  getAccessToken
6
- } from "./chunk-SG4UBJ47.js";
6
+ } from "./chunk-3QW5NFZJ.js";
7
7
  import {
8
8
  exportWorkspaceBundle
9
9
  } from "./chunk-QTNO2WD6.js";
@@ -115,4 +115,4 @@ export {
115
115
  fetchSandboxBundle,
116
116
  runSandboxExportCommand
117
117
  };
118
- //# sourceMappingURL=chunk-AAFBSOSD.js.map
118
+ //# sourceMappingURL=chunk-JQJPFUZI.js.map
@@ -18,8 +18,9 @@ import {
18
18
  liveCommandNames,
19
19
  liveSubcommandNames,
20
20
  renderArgs,
21
- suggest
22
- } from "./chunk-F5T45NAM.js";
21
+ suggest,
22
+ visibleFlags
23
+ } from "./chunk-OKNSR7MT.js";
23
24
 
24
25
  // src/emit/help.ts
25
26
  function table(rows, s, indent = " ", fixedWidth) {
@@ -96,7 +97,7 @@ function renderCommandHelp(command, s = stdoutStyle()) {
96
97
  lines.push("", s.bold("Subcommands"), ...table(rows, s));
97
98
  }
98
99
  lines.push(...argSection(spec.args, s));
99
- lines.push(...flagSection(spec.flags, s));
100
+ lines.push(...flagSection(visibleFlags(spec), s));
100
101
  lines.push(...exampleSection(spec.example, s));
101
102
  if (subs.length > 0) {
102
103
  lines.push("", s.dim(`Run \`xanots ${command} <subcommand> --help\` for a subcommand's flags.`));
@@ -113,7 +114,7 @@ function renderSubcommandHelp(command, sub, s = stdoutStyle()) {
113
114
  `${s.dim("Usage:")} xanots ${command} ${sub}${args ? ` ${args}` : ""} ${s.dim("[options]")}`
114
115
  ];
115
116
  lines.push(...argSection(spec.args, s));
116
- lines.push(...flagSection(spec.flags, s));
117
+ lines.push(...flagSection(visibleFlags(spec), s));
117
118
  lines.push(...exampleSection(spec.example, s));
118
119
  return lines.join("\n") + "\n";
119
120
  }
@@ -245,4 +246,4 @@ export {
245
246
  reportFailure,
246
247
  exitCodeOf
247
248
  };
248
- //# sourceMappingURL=chunk-IVP6TS26.js.map
249
+ //# sourceMappingURL=chunk-JQLR64UC.js.map
@@ -6,7 +6,7 @@ import {
6
6
  realtimeChannelGuid,
7
7
  realtimeServerRefName,
8
8
  resolveRealtimeServerRef
9
- } from "./chunk-CYJ7R3AD.js";
9
+ } from "./chunk-2V3JUXTF.js";
10
10
  import {
11
11
  assertCanonical,
12
12
  assertOneOf,
@@ -25,7 +25,7 @@ import {
25
25
  resolveAuthRef,
26
26
  resolveMockKeys,
27
27
  warnLiveDatasource
28
- } from "./chunk-YUPQOLFX.js";
28
+ } from "./chunk-NJGNUVXR.js";
29
29
  import {
30
30
  encodeStatement
31
31
  } from "./chunk-5XZ744TS.js";
@@ -35,7 +35,7 @@ import {
35
35
  lockKey,
36
36
  realtimeMessageSeedName,
37
37
  resolveRef
38
- } from "./chunk-YUBJLB6G.js";
38
+ } from "./chunk-7JDT4PBU.js";
39
39
 
40
40
  // src/kinds/canonical.ts
41
41
  function resolveCanonicalToken(label, payloadKey, accessor, def, override) {
@@ -667,4 +667,4 @@ export {
667
667
  addonKind,
668
668
  addon
669
669
  };
670
- //# sourceMappingURL=chunk-FN4OQT2J.js.map
670
+ //# sourceMappingURL=chunk-JUHKEAHJ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ensureGitignored
3
- } from "./chunk-LLWK6H77.js";
3
+ } from "./chunk-BKDJN76G.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-WJYB7DSI.js.map
60
+ //# sourceMappingURL=chunk-MDXR5E5Q.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  renderThemeScript
3
- } from "./chunk-QUUB7HYK.js";
3
+ } from "./chunk-P5C2YKAM.js";
4
4
  import {
5
5
  defaultThemeChoice,
6
6
  iconLibraryOf,
7
7
  reactPreset
8
- } from "./chunk-6DHJVLYP.js";
8
+ } from "./chunk-Q77KNEUL.js";
9
9
 
10
10
  // src/emit/frontend-svelte.ts
11
11
  var CODE_CLASS = "bg-muted rounded px-1.5 py-0.5 font-mono text-sm";
@@ -842,4 +842,4 @@ export {
842
842
  allFrontendPresets,
843
843
  resolveFrameworkFlag
844
844
  };
845
- //# sourceMappingURL=chunk-WGDAOOXG.js.map
845
+ //# sourceMappingURL=chunk-MU3O43L2.js.map
@@ -14,12 +14,16 @@ import {
14
14
  registerStatement
15
15
  } from "./chunk-5XZ744TS.js";
16
16
  import {
17
+ appNamesByGuid,
17
18
  deriveGuid,
19
+ deriveQueryGuid,
18
20
  getLockedCanonical,
19
21
  lockKey,
22
+ lockNameForObject,
23
+ queryGroupComponent,
20
24
  resolveRef,
21
25
  sha1Bytes
22
- } from "./chunk-YUBJLB6G.js";
26
+ } from "./chunk-7JDT4PBU.js";
23
27
 
24
28
  // src/types/xdo.ts
25
29
  var TAGS = [
@@ -3535,10 +3539,15 @@ function encodeQuery(def) {
3535
3539
  resolveMockKeys(xdo.run, xdo.test, "query", def.name);
3536
3540
  return xdo;
3537
3541
  }
3542
+ function queryGuid(def) {
3543
+ if (def.guid) return def.guid;
3544
+ return deriveQueryGuid(queryGroupComponent(def), def.verb, def.name);
3545
+ }
3538
3546
  var queryKind = {
3539
3547
  name: "query",
3540
3548
  payloadKey: "query",
3541
- encode: encodeQuery
3549
+ encode: encodeQuery,
3550
+ guidOf: (def) => queryGuid(def)
3542
3551
  };
3543
3552
  registerKind(queryKind);
3544
3553
  function resolveCanonical(def, override) {
@@ -3749,6 +3758,7 @@ function calcSignatureJson(exportObj) {
3749
3758
  }
3750
3759
  function assertUniqueGuids(payload, lock) {
3751
3760
  const seen = /* @__PURE__ */ new Map();
3761
+ const appNames = appNamesByGuid(payload.app);
3752
3762
  for (const key of PAYLOAD_ARRAY_KEYS) {
3753
3763
  const arr = payload[key];
3754
3764
  if (!Array.isArray(arr)) continue;
@@ -3761,7 +3771,8 @@ function assertUniqueGuids(payload, lock) {
3761
3771
  const prev = seen.get(guid);
3762
3772
  if (prev !== void 0) {
3763
3773
  const pinnedBy = lock ? Object.entries(lock.objects).find(([, e]) => e.guid === guid)?.[0] : void 0;
3764
- const lockNote = pinnedBy ? ` This guid is pinned by lock entry "${pinnedBy}" \u2014 if that entry was moved by \`xanots lock rename\`, a new object now re-derives the old name's guid. Pin a distinct explicit \`guid\` on the new object, or update the lock entry.` : ` Object identity is derived from (type, name) \u2014 two objects of the same kind share a name. Rename one, or pin a distinct explicit \`guid\`.`;
3774
+ const legacyQueryKey = key === "query" && pinnedBy !== void 0 && !pinnedBy.includes("|") ? pinnedBy : void 0;
3775
+ const lockNote = legacyQueryKey ? ` Lock entry "${legacyQueryKey}" pins it by NAME ALONE \u2014 a lock written before a query's identity included its api group and verb. Both of these queries claim it. Move it onto the one that already existed, e.g. \`xanots lock rename query ${legacyQueryKey.slice("query:".length)} "${lockNameForObject("query", obj2, appNames)}"\` (--lock=<path> if it is not in the current directory), then re-export: that endpoint keeps its identity and the newcomer derives its own.` : pinnedBy ? ` This guid is pinned by lock entry "${pinnedBy}" \u2014 if that entry was moved by \`xanots lock rename\`, a new object now re-derives the old name's guid. Pin a distinct explicit \`guid\` on the new object, or update the lock entry.` : ` Object identity is derived from (type, name) \u2014 for a query, (api group, verb, name) \u2014 so two objects of the same kind compose the same identity. Rename one, or pin a distinct explicit \`guid\`.`;
3765
3776
  throw new Error(`Duplicate object guid (${guid}) shared by "${prev}" and "${label}".` + lockNote);
3766
3777
  }
3767
3778
  seen.set(guid, label);
@@ -4068,4 +4079,4 @@ export {
4068
4079
  serializeBundle,
4069
4080
  emitBundle
4070
4081
  };
4071
- //# sourceMappingURL=chunk-YUPQOLFX.js.map
4082
+ //# sourceMappingURL=chunk-NJGNUVXR.js.map
@@ -142,6 +142,19 @@ var FLAGS = {
142
142
  "reset-data": { spec: "--reset-data", summary: "Empty every table the bundle carries before importing" },
143
143
  seed: { spec: "--seed", summary: "Write the bundle's table rows (off by default)" },
144
144
  replace: { spec: "--replace", summary: "Wipe the workspace and import in its place, instead of merging" },
145
+ branch: {
146
+ spec: "--branch <label>",
147
+ summary: "Release to this branch instead of the live one (stages logic; schema is shared)"
148
+ },
149
+ "set-live": { spec: "--set-live", summary: "Promote the branch to live once the import lands" },
150
+ "allow-shared-schema-changes": {
151
+ spec: "--allow-shared-schema-changes",
152
+ summary: "Proceed even though table/microservice changes reach every branch"
153
+ },
154
+ "backup-branch": {
155
+ spec: "--backup-branch[=<label>]",
156
+ summary: "Snapshot the live branch before importing, so the release can be rolled back"
157
+ },
145
158
  open: { spec: "--open", summary: "Open the deployed URL in your browser when it lands" },
146
159
  // ── Global (accepted by every command; see GLOBAL_FLAGS) ───────────────
147
160
  json: {
@@ -316,6 +329,10 @@ var COMMANDS = {
316
329
  "reset-data",
317
330
  "seed",
318
331
  "replace",
332
+ "branch",
333
+ "set-live",
334
+ "allow-shared-schema-changes",
335
+ "backup-branch",
319
336
  "yes",
320
337
  { key: "force", summary: "Skip the confirmation prompt (same as --yes)" },
321
338
  "static",
@@ -327,6 +344,13 @@ var COMMANDS = {
327
344
  ...COMPILE,
328
345
  ...AUTH
329
346
  ],
347
+ // Branch-targeted releases are built and tested, but the instance-side
348
+ // support they need is not live yet, so they stay off every discovery
349
+ // surface for now. The flags still parse and run — and the release refuses
350
+ // outright unless the server confirms the branch it planned against, so an
351
+ // instance without support fails closed rather than overwriting production.
352
+ // Delete this line (and nothing else) to announce them.
353
+ unreleasedFlags: ["branch", "set-live", "allow-shared-schema-changes", "backup-branch"],
330
354
  example: "xanots release ./index.ts --dry-run"
331
355
  },
332
356
  validate: {
@@ -365,6 +389,19 @@ var COMMANDS = {
365
389
  flags: ["path", { key: "name", summary: "Output basename (default: `workspace`)" }, ...AUTH],
366
390
  example: "xanots workspace export --path -"
367
391
  },
392
+ branch: {
393
+ // Hidden until instance-side branch support ships — see
394
+ // `release.unreleasedFlags`. The verb works; it is just not advertised.
395
+ unreleased: true,
396
+ summary: "List, promote, or delete its branches",
397
+ display: "workspace branch <list|set-live|delete> [label]",
398
+ args: [
399
+ { name: "verb", required: true },
400
+ { name: "label", required: false }
401
+ ],
402
+ flags: ["yes", ...AUTH],
403
+ example: "xanots workspace branch list"
404
+ },
368
405
  codegen: {
369
406
  summary: "Decode it into a runnable XanoTS project",
370
407
  args: [{ name: "path", required: true, path: true }],
@@ -627,7 +664,12 @@ function flagValues(ref) {
627
664
  function liveSubcommandNames(command) {
628
665
  const subs = getCommand(command)?.subcommands;
629
666
  if (!subs) return [];
630
- return Object.entries(subs).filter(([, spec]) => spec.removed === void 0).map(([name]) => name);
667
+ return Object.entries(subs).filter(([, spec]) => spec.removed === void 0 && spec.unreleased === void 0).map(([name]) => name);
668
+ }
669
+ function visibleFlags(spec) {
670
+ const hidden = spec.unreleasedFlags;
671
+ if (!spec.flags || !hidden || hidden.length === 0) return spec.flags;
672
+ return spec.flags.filter((ref) => !hidden.includes(flagKey(ref)));
631
673
  }
632
674
  function distance(a, b) {
633
675
  let row = Array.from({ length: b.length + 1 }, (_, j) => j);
@@ -673,6 +715,7 @@ export {
673
715
  flagSummary,
674
716
  flagValues,
675
717
  liveSubcommandNames,
718
+ visibleFlags,
676
719
  suggest
677
720
  };
678
- //# sourceMappingURL=chunk-F5T45NAM.js.map
721
+ //# sourceMappingURL=chunk-OKNSR7MT.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  parseLock,
6
6
  serializeLock
7
- } from "./chunk-YUBJLB6G.js";
7
+ } from "./chunk-7JDT4PBU.js";
8
8
 
9
9
  // src/lock/io.ts
10
10
  import { readFileSync, existsSync } from "fs";
@@ -35,4 +35,4 @@ export {
35
35
  readLockFile,
36
36
  writeLockFile
37
37
  };
38
- //# sourceMappingURL=chunk-MFIHIS6B.js.map
38
+ //# sourceMappingURL=chunk-OYMR5AMJ.js.map
@@ -5,7 +5,7 @@ import {
5
5
  fontImports,
6
6
  fontThemeVars,
7
7
  orderedTokens
8
- } from "./chunk-6DHJVLYP.js";
8
+ } from "./chunk-Q77KNEUL.js";
9
9
 
10
10
  // src/emit/init-templates.ts
11
11
  function sdkDep(sdkVersion) {
@@ -887,4 +887,4 @@ export {
887
887
  renderCnUtil,
888
888
  renderApiTs
889
889
  };
890
- //# sourceMappingURL=chunk-QUUB7HYK.js.map
890
+ //# sourceMappingURL=chunk-P5C2YKAM.js.map
@@ -2041,4 +2041,4 @@ export {
2041
2041
  iconLibraryOf,
2042
2042
  reactPreset
2043
2043
  };
2044
- //# sourceMappingURL=chunk-6DHJVLYP.js.map
2044
+ //# sourceMappingURL=chunk-Q77KNEUL.js.map
@@ -5,7 +5,7 @@ import {
5
5
  presetFilePath,
6
6
  renderPreset,
7
7
  upsertManagedBlock
8
- } from "./chunk-7SISR3CS.js";
8
+ } from "./chunk-4PE4ZAB7.js";
9
9
  import {
10
10
  warn
11
11
  } from "./chunk-EZG76F7R.js";
@@ -92,4 +92,4 @@ export {
92
92
  isCI,
93
93
  refreshAgentFiles
94
94
  };
95
- //# sourceMappingURL=chunk-D6OGU2AI.js.map
95
+ //# sourceMappingURL=chunk-QIWBCS7N.js.map
package/dist/cli.d.ts CHANGED
@@ -190,8 +190,8 @@ interface ParsedArgs {
190
190
  /**
191
191
  * `init`/`codegen` `--theme <id>`: the shadcn/ui palette to render into the
192
192
  * scaffold's stylesheet — a `<base>` or `<base>-<accent>` pair, a registry
193
- * theme URL, or a path to a registry item JSON file. Undefined = prompt in a
194
- * 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.
195
195
  */
196
196
  theme: string | undefined;
197
197
  /** `init`/`codegen` `--radius <len>`: corner radius override, bare number = rem. */
@@ -274,6 +274,32 @@ interface ParsedArgs {
274
274
  * Named rather than implicit so it can never be reached by accident.
275
275
  */
276
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;
277
303
  /**
278
304
  * `--json`: force the machine-readable JSON on stdout even at a terminal.
279
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-MS3BRZAZ.js";
12
- import "./chunk-IVP6TS26.js";
13
- import "./chunk-MFIHIS6B.js";
11
+ } from "./chunk-CL2H2WYE.js";
12
+ import "./chunk-JQLR64UC.js";
13
+ import "./chunk-OYMR5AMJ.js";
14
14
  import "./chunk-GNPVYOPB.js";
15
15
  import "./chunk-EZG76F7R.js";
16
- import "./chunk-BPEEGJJA.js";
17
- import "./chunk-F5T45NAM.js";
18
- import "./chunk-YUPQOLFX.js";
16
+ import "./chunk-FAWNUE2U.js";
17
+ import "./chunk-OKNSR7MT.js";
18
+ import "./chunk-NJGNUVXR.js";
19
19
  import "./chunk-WHOJWOSV.js";
20
20
  import "./chunk-5XZ744TS.js";
21
- import "./chunk-YUBJLB6G.js";
21
+ import "./chunk-7JDT4PBU.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-OARSPAIE.js";
7
+ } from "./chunk-5PDOAR77.js";
8
8
  import "./chunk-ZOYMZZ3S.js";
9
- import "./chunk-SG4UBJ47.js";
10
- import "./chunk-LLWK6H77.js";
9
+ import "./chunk-3QW5NFZJ.js";
10
+ import "./chunk-BKDJN76G.js";
11
11
  import "./chunk-QTNO2WD6.js";
12
12
  import "./chunk-ZUTSMMAG.js";
13
13
  import "./chunk-X4DVXBFY.js";
14
- import "./chunk-KXCPZUUM.js";
15
- import "./chunk-7SISR3CS.js";
14
+ import "./chunk-DBHE35JM.js";
15
+ import "./chunk-4PE4ZAB7.js";
16
16
  import "./chunk-ZSYZTGJH.js";
17
17
  import "./chunk-3IGNIP6R.js";
18
- import "./chunk-PXXLBXOP.js";
18
+ import "./chunk-JAVB27HL.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-MS3BRZAZ.js";
26
- import "./chunk-IVP6TS26.js";
27
- import "./chunk-MFIHIS6B.js";
24
+ import "./chunk-2V3JUXTF.js";
25
+ import "./chunk-CL2H2WYE.js";
26
+ import "./chunk-JQLR64UC.js";
27
+ import "./chunk-OYMR5AMJ.js";
28
28
  import "./chunk-GNPVYOPB.js";
29
29
  import "./chunk-EZG76F7R.js";
30
- import "./chunk-BPEEGJJA.js";
31
- import "./chunk-F5T45NAM.js";
32
- import "./chunk-YUPQOLFX.js";
30
+ import "./chunk-FAWNUE2U.js";
31
+ import "./chunk-OKNSR7MT.js";
32
+ import "./chunk-NJGNUVXR.js";
33
33
  import "./chunk-WHOJWOSV.js";
34
34
  import "./chunk-5XZ744TS.js";
35
- import "./chunk-YUBJLB6G.js";
35
+ import "./chunk-7JDT4PBU.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-BLOS3GR3.js.map
43
+ //# sourceMappingURL=codegen-command-DYH4H4TD.js.map
@@ -4,8 +4,9 @@ import {
4
4
  flagValues,
5
5
  getCommand,
6
6
  liveCommandNames,
7
- liveSubcommandNames
8
- } from "./chunk-F5T45NAM.js";
7
+ liveSubcommandNames,
8
+ visibleFlags
9
+ } from "./chunk-OKNSR7MT.js";
9
10
 
10
11
  // src/emit/completion.ts
11
12
  var COMPLETION_SHELLS = ["bash", "zsh", "fish"];
@@ -46,19 +47,19 @@ function scopes() {
46
47
  const spec = getCommand(name);
47
48
  out.push({
48
49
  key: name,
49
- flags: tokensFor(spec.flags),
50
+ flags: tokensFor(visibleFlags(spec)),
50
51
  paths: wantsPaths(spec.args),
51
52
  values: argValues(spec.args),
52
- valued: valuedFlags(spec.flags)
53
+ valued: valuedFlags(visibleFlags(spec))
53
54
  });
54
55
  for (const verb of liveSubcommandNames(name)) {
55
56
  const sub = spec.subcommands[verb];
56
57
  out.push({
57
58
  key: `${name} ${verb}`,
58
- flags: tokensFor(sub.flags),
59
+ flags: tokensFor(visibleFlags(sub)),
59
60
  paths: wantsPaths(sub.args),
60
61
  values: argValues(sub.args),
61
- valued: valuedFlags(sub.flags)
62
+ valued: valuedFlags(visibleFlags(sub))
62
63
  });
63
64
  }
64
65
  }
@@ -295,4 +296,4 @@ export {
295
296
  renderCompletion,
296
297
  runCompletionCommand
297
298
  };
298
- //# sourceMappingURL=completion-GHP5RRLQ.js.map
299
+ //# sourceMappingURL=completion-A6BZ3XGU.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  importWorkspaceArchive
3
- } from "./chunk-5WGEURVI.js";
3
+ } from "./chunk-6AAT2AYQ.js";
4
4
  import {
5
5
  assertBundleInput,
6
6
  loadBundleText
7
- } from "./chunk-QA5ICJ4M.js";
7
+ } from "./chunk-7BUTRVKA.js";
8
8
  import {
9
9
  createEphemeral,
10
10
  getEphemeral,
@@ -17,7 +17,7 @@ import {
17
17
  getEnvironment,
18
18
  readEphemeralState,
19
19
  setEnvironment
20
- } from "./chunk-WJYB7DSI.js";
20
+ } from "./chunk-MDXR5E5Q.js";
21
21
  import {
22
22
  openBrowser
23
23
  } from "./chunk-W5NOKYEG.js";
@@ -28,8 +28,8 @@ import {
28
28
  } from "./chunk-NDZFBZHC.js";
29
29
  import {
30
30
  getAccessToken
31
- } from "./chunk-SG4UBJ47.js";
32
- import "./chunk-LLWK6H77.js";
31
+ } from "./chunk-3QW5NFZJ.js";
32
+ import "./chunk-BKDJN76G.js";
33
33
  import {
34
34
  encodeWorkspaceArchive
35
35
  } from "./chunk-ZUTSMMAG.js";
@@ -42,11 +42,11 @@ import {
42
42
  fetchOrExplain,
43
43
  httpFailure
44
44
  } from "./chunk-3IGNIP6R.js";
45
- import "./chunk-MS3BRZAZ.js";
45
+ import "./chunk-CL2H2WYE.js";
46
46
  import {
47
47
  assertWritableDest
48
- } from "./chunk-IVP6TS26.js";
49
- import "./chunk-MFIHIS6B.js";
48
+ } from "./chunk-JQLR64UC.js";
49
+ import "./chunk-OYMR5AMJ.js";
50
50
  import "./chunk-GNPVYOPB.js";
51
51
  import {
52
52
  blank,
@@ -62,12 +62,12 @@ import {
62
62
  warn,
63
63
  withSpinner
64
64
  } from "./chunk-EZG76F7R.js";
65
- import "./chunk-BPEEGJJA.js";
66
- import "./chunk-F5T45NAM.js";
67
- import "./chunk-YUPQOLFX.js";
65
+ import "./chunk-FAWNUE2U.js";
66
+ import "./chunk-OKNSR7MT.js";
67
+ import "./chunk-NJGNUVXR.js";
68
68
  import "./chunk-WHOJWOSV.js";
69
69
  import "./chunk-5XZ744TS.js";
70
- import "./chunk-YUBJLB6G.js";
70
+ import "./chunk-7JDT4PBU.js";
71
71
 
72
72
  // src/emit/deploy-command.ts
73
73
  import { basename } from "path";
@@ -158,7 +158,7 @@ async function runDeployedTests(auth, dest, summary, args) {
158
158
  }
159
159
  }
160
160
  async function runTestsOrThrow(auth, dest, summary, args) {
161
- const { runSuite, EXIT_TESTS_FAILED } = await import("./test-command-56IAEYHX.js");
161
+ const { runSuite, EXIT_TESTS_FAILED } = await import("./test-command-S7SMRWMP.js");
162
162
  let target;
163
163
  if (dest === "ephemeral") {
164
164
  if (summary.url === void 0) {
@@ -168,7 +168,7 @@ async function runTestsOrThrow(auth, dest, summary, args) {
168
168
  const name = summary.ephemeral?.name;
169
169
  target = { base: summary.url, workspaceId: 1, label: name ? `ephemeral ${name}` : "the ephemeral", env: name };
170
170
  } else {
171
- const { resolveMetaTarget } = await import("./env-target-POGJMD6Q.js");
171
+ const { resolveMetaTarget } = await import("./env-target-WA3BH5YU.js");
172
172
  target = await resolveMetaTarget(auth, { dest: "sandbox" });
173
173
  }
174
174
  const outcomes = await runSuite(auth, target, {
@@ -448,4 +448,4 @@ export {
448
448
  runDeployedTests,
449
449
  verifyMicroservices
450
450
  };
451
- //# sourceMappingURL=deploy-command-XOH76USO.js.map
451
+ //# sourceMappingURL=deploy-command-HM57BINV.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveMetaTarget
3
- } from "./chunk-APOR6TCV.js";
4
- import "./chunk-WJYB7DSI.js";
5
- import "./chunk-OR43PDCW.js";
3
+ } from "./chunk-H2DEDWQF.js";
4
+ import "./chunk-MDXR5E5Q.js";
5
+ import "./chunk-3EYUR3TX.js";
6
6
  import "./chunk-NDZFBZHC.js";
7
- import "./chunk-SG4UBJ47.js";
8
- import "./chunk-LLWK6H77.js";
7
+ import "./chunk-3QW5NFZJ.js";
8
+ import "./chunk-BKDJN76G.js";
9
9
  import "./chunk-NUQCEOKA.js";
10
10
  import "./chunk-3IGNIP6R.js";
11
11
  import "./chunk-GNPVYOPB.js";
@@ -13,4 +13,4 @@ import "./chunk-EZG76F7R.js";
13
13
  export {
14
14
  resolveMetaTarget
15
15
  };
16
- //# sourceMappingURL=env-target-POGJMD6Q.js.map
16
+ //# sourceMappingURL=env-target-WA3BH5YU.js.map
@@ -10,25 +10,25 @@ import {
10
10
  clearEnvironment,
11
11
  getEnvironment,
12
12
  readEphemeralState
13
- } from "./chunk-WJYB7DSI.js";
13
+ } from "./chunk-MDXR5E5Q.js";
14
14
  import {
15
15
  openBrowser
16
16
  } from "./chunk-W5NOKYEG.js";
17
17
  import {
18
18
  confirm
19
- } from "./chunk-PGBK64U5.js";
19
+ } from "./chunk-4PTSTDIG.js";
20
20
  import {
21
21
  resolveOutputTarget
22
- } from "./chunk-AAFBSOSD.js";
23
- import "./chunk-OR43PDCW.js";
22
+ } from "./chunk-JQJPFUZI.js";
23
+ import "./chunk-3EYUR3TX.js";
24
24
  import {
25
25
  printMicroserviceSection,
26
26
  readMicroservices
27
27
  } from "./chunk-NDZFBZHC.js";
28
28
  import {
29
29
  getAccessToken
30
- } from "./chunk-SG4UBJ47.js";
31
- import "./chunk-LLWK6H77.js";
30
+ } from "./chunk-3QW5NFZJ.js";
31
+ import "./chunk-BKDJN76G.js";
32
32
  import {
33
33
  exportWorkspaceBundle
34
34
  } from "./chunk-QTNO2WD6.js";
@@ -41,7 +41,7 @@ import {
41
41
  import "./chunk-3IGNIP6R.js";
42
42
  import {
43
43
  unknownSubcommand
44
- } from "./chunk-IVP6TS26.js";
44
+ } from "./chunk-JQLR64UC.js";
45
45
  import "./chunk-GNPVYOPB.js";
46
46
  import {
47
47
  detail,
@@ -53,7 +53,7 @@ import {
53
53
  success,
54
54
  warn
55
55
  } from "./chunk-EZG76F7R.js";
56
- import "./chunk-F5T45NAM.js";
56
+ import "./chunk-OKNSR7MT.js";
57
57
 
58
58
  // src/emit/ephemeral-command.ts
59
59
  import { writeFileSync } from "fs";
@@ -90,7 +90,7 @@ async function runEphemeralCommand(args) {
90
90
  case "impersonate":
91
91
  return runImpersonate(args);
92
92
  case "codegen": {
93
- const { runCodegenCommand } = await import("./codegen-command-BLOS3GR3.js");
93
+ const { runCodegenCommand } = await import("./codegen-command-DYH4H4TD.js");
94
94
  return runCodegenCommand(args, { kind: "ephemeral" });
95
95
  }
96
96
  default:
@@ -239,4 +239,4 @@ export {
239
239
  resolveLive,
240
240
  runEphemeralCommand
241
241
  };
242
- //# sourceMappingURL=ephemeral-command-46SL27GJ.js.map
242
+ //# sourceMappingURL=ephemeral-command-SD2KLX4P.js.map