@ontrails/commander 1.0.0-beta.32 → 1.0.0-beta.39

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 CHANGED
@@ -1,5 +1,33 @@
1
1
  # @ontrails/commander
2
2
 
3
+ ## 1.0.0-beta.39
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f42ca6e`](https://github.com/outfitter-dev/trails/commit/f42ca6e40b29155acec446e5bf44e52e014466bd): Hard cutover: the CLI consumes `cli` bindings from the app-authored surfaces overlay. Scalar bindings behave identically to the removed cliAliases (parity-tested) — the binding name splits on `.` into a transparent synonym command path for exactly one trail. List bindings arrive as command groups: each expanded member trail gets a group-prefixed route that dispatches the member trail with its identity preserved, and a singleton list stays a group. Expansion is fail-fast boundary validation: a scalar binding resolving to zero or multiple trails, or a group with an empty member union, is a `ValidationError` naming the binding. `DeriveTopoGraphOptions.cliAliases`, the `cliAliases`/`trailsCliAliases` app-module export convention, and the per-kind compile lift are deleted; `deriveCliCommands`/`createProgram` take `overlays` instead of `aliases`, and both topo-graph derivation pipelines expand the same bindings through one shared helper so runtime CLI routes and lock routes come from one semantic. A leftover legacy export is now a Warden error (`no-legacy-cli-alias-export`) naming the `surfaceOverlay({ cli: { ... } })` rewrite.
8
+
9
+ This is a breaking API removal shipped under the lockstep beta patch convention (pre-1.0 hard-cutover posture, zero external adoption); the removed options have no deprecation window by design.
10
+
11
+ ## 1.0.0-beta.38
12
+
13
+ ## 1.0.0-beta.37
14
+
15
+ ## 1.0.0-beta.36
16
+
17
+ ## 1.0.0-beta.35
18
+
19
+ ## 1.0.0-beta.34
20
+
21
+ ## 1.0.0-beta.33
22
+
23
+ ### Patch Changes
24
+
25
+ - [`945cb4b`](https://github.com/outfitter-dev/trails/commit/945cb4b0bef40ddb098c2a3816f9adad6f135410): Honor explicit structured input values over CLI flag defaults when commands merge
26
+ `--input-json` or `--input` payloads.
27
+
28
+ Commander now forwards user-supplied flag metadata so explicit flag values that
29
+ match a default still keep normal CLI precedence over structured input.
30
+
3
31
  ## 1.0.0-beta.32
4
32
 
5
33
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ontrails/commander",
3
- "version": "1.0.0-beta.32",
3
+ "version": "1.0.0-beta.39",
4
4
  "files": [
5
5
  "src/**/*.ts",
6
6
  "!src/**/__tests__/**",
@@ -22,8 +22,8 @@
22
22
  "clean": "rm -rf dist *.tsbuildinfo"
23
23
  },
24
24
  "dependencies": {
25
- "@ontrails/cli": "^1.0.0-beta.32",
26
- "@ontrails/core": "^1.0.0-beta.32",
25
+ "@ontrails/cli": "^1.0.0-beta.39",
26
+ "@ontrails/core": "^1.0.0-beta.39",
27
27
  "commander": "^14.0.3"
28
28
  },
29
29
  "peerDependencies": {
package/src/surface.ts CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  import type {
6
6
  BaseSurfaceOptions,
7
- CliCommandAliasInput,
8
7
  Layer,
8
+ OverlayEnvelopeLike,
9
9
  ResourceOverrideMap,
10
10
  Topo,
11
11
  TrailContextInit,
@@ -28,9 +28,6 @@ import { toCommander } from './to-commander.js';
28
28
  * Options for creating Commander CLI surfaces from a Trails topo.
29
29
  */
30
30
  export interface CreateProgramOptions extends BaseSurfaceOptions {
31
- readonly aliases?:
32
- | Readonly<Record<string, readonly CliCommandAliasInput[]>>
33
- | undefined;
34
31
  readonly createContext?:
35
32
  | (() => TrailContextInit | Promise<TrailContextInit>)
36
33
  | undefined;
@@ -38,6 +35,12 @@ export interface CreateProgramOptions extends BaseSurfaceOptions {
38
35
  readonly layers?: readonly Layer[] | undefined;
39
36
  readonly name?: string | undefined;
40
37
  readonly onResult?: ((ctx: ActionResultContext) => Promise<void>) | undefined;
38
+ /**
39
+ * App-authored overlay envelopes (conventionally the app module's
40
+ * `trailsOverlays` export); the `surfaces` envelope's `cli` bindings
41
+ * project synonym and command-group routes onto the program.
42
+ */
43
+ readonly overlays?: readonly OverlayEnvelopeLike[] | undefined;
41
44
  readonly presets?: CliFlag[][] | undefined;
42
45
  readonly resources?: ResourceOverrideMap | undefined;
43
46
  readonly resolveInput?: InputResolver | undefined;
@@ -93,7 +96,6 @@ export const createProgram = (
93
96
  options: CreateProgramOptions = {}
94
97
  ) => {
95
98
  const commandsResult = deriveCliCommands(graph, {
96
- aliases: options.aliases,
97
99
  configValues: options.configValues,
98
100
  createContext: options.createContext,
99
101
  exclude: options.exclude,
@@ -101,6 +103,7 @@ export const createProgram = (
101
103
  intent: options.intent,
102
104
  layers: options.layers,
103
105
  onResult: options.onResult ?? defaultOnResult,
106
+ overlays: options.overlays,
104
107
  presets: options.presets,
105
108
  resolveInput: options.resolveInput,
106
109
  resolvePermitFromToken: options.resolvePermitFromToken,
@@ -581,7 +581,12 @@ const wireAction = (
581
581
  action.parsedFlags,
582
582
  action.userSuppliedFlagKeys
583
583
  );
584
- await action.command.execute(action.parsedArgs, parsedFlags);
584
+ await action.command.execute(action.parsedArgs, parsedFlags, undefined, {
585
+ userSuppliedFlagKeys: getCanonicalUserSuppliedFlagKeys(
586
+ action.command.flags,
587
+ action.userSuppliedFlagKeys
588
+ ),
589
+ });
585
590
  } catch (error: unknown) {
586
591
  handleError(
587
592
  error,