xcodebuild-axi 0.1.6 → 0.1.8

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 +57 -0
  2. package/README.md +98 -2
  3. package/dist/src/args.d.ts +11 -0
  4. package/dist/src/args.js +30 -0
  5. package/dist/src/args.js.map +1 -1
  6. package/dist/src/cli.d.ts +8 -0
  7. package/dist/src/cli.js +53 -22
  8. package/dist/src/cli.js.map +1 -1
  9. package/dist/src/commands/analyze.d.ts +2 -0
  10. package/dist/src/commands/analyze.js +3 -1
  11. package/dist/src/commands/analyze.js.map +1 -1
  12. package/dist/src/commands/archive.d.ts +1 -0
  13. package/dist/src/commands/archive.js +6 -2
  14. package/dist/src/commands/archive.js.map +1 -1
  15. package/dist/src/commands/build.d.ts +1 -0
  16. package/dist/src/commands/build.js +2 -2
  17. package/dist/src/commands/build.js.map +1 -1
  18. package/dist/src/commands/clean.d.ts +1 -0
  19. package/dist/src/commands/clean.js +6 -2
  20. package/dist/src/commands/clean.js.map +1 -1
  21. package/dist/src/commands/coverage.d.ts +1 -0
  22. package/dist/src/commands/coverage.js +7 -2
  23. package/dist/src/commands/coverage.js.map +1 -1
  24. package/dist/src/commands/destinations.d.ts +1 -0
  25. package/dist/src/commands/destinations.js +6 -2
  26. package/dist/src/commands/destinations.js.map +1 -1
  27. package/dist/src/commands/export.d.ts +2 -0
  28. package/dist/src/commands/export.js +11 -5
  29. package/dist/src/commands/export.js.map +1 -1
  30. package/dist/src/commands/find.d.ts +1 -0
  31. package/dist/src/commands/find.js +2 -2
  32. package/dist/src/commands/find.js.map +1 -1
  33. package/dist/src/commands/info.d.ts +1 -0
  34. package/dist/src/commands/info.js +2 -2
  35. package/dist/src/commands/info.js.map +1 -1
  36. package/dist/src/commands/localize.d.ts +1 -0
  37. package/dist/src/commands/localize.js +2 -2
  38. package/dist/src/commands/localize.js.map +1 -1
  39. package/dist/src/commands/migrate.d.ts +1 -0
  40. package/dist/src/commands/migrate.js +2 -2
  41. package/dist/src/commands/migrate.js.map +1 -1
  42. package/dist/src/commands/packages.d.ts +1 -0
  43. package/dist/src/commands/packages.js +7 -2
  44. package/dist/src/commands/packages.js.map +1 -1
  45. package/dist/src/commands/platforms.d.ts +1 -0
  46. package/dist/src/commands/platforms.js +2 -2
  47. package/dist/src/commands/platforms.js.map +1 -1
  48. package/dist/src/commands/result.d.ts +1 -0
  49. package/dist/src/commands/result.js +7 -2
  50. package/dist/src/commands/result.js.map +1 -1
  51. package/dist/src/commands/schemes.d.ts +1 -0
  52. package/dist/src/commands/schemes.js +2 -1
  53. package/dist/src/commands/schemes.js.map +1 -1
  54. package/dist/src/commands/settings.d.ts +1 -0
  55. package/dist/src/commands/settings.js +2 -2
  56. package/dist/src/commands/settings.js.map +1 -1
  57. package/dist/src/commands/setup.d.ts +1 -0
  58. package/dist/src/commands/setup.js +2 -2
  59. package/dist/src/commands/setup.js.map +1 -1
  60. package/dist/src/commands/sim.d.ts +1 -0
  61. package/dist/src/commands/sim.js +2 -2
  62. package/dist/src/commands/sim.js.map +1 -1
  63. package/dist/src/commands/test.d.ts +1 -0
  64. package/dist/src/commands/test.js +2 -2
  65. package/dist/src/commands/test.js.map +1 -1
  66. package/dist/src/commands/testplans.d.ts +1 -0
  67. package/dist/src/commands/testplans.js +2 -1
  68. package/dist/src/commands/testplans.js.map +1 -1
  69. package/dist/src/commands/tests.d.ts +1 -0
  70. package/dist/src/commands/tests.js +2 -2
  71. package/dist/src/commands/tests.js.map +1 -1
  72. package/dist/src/commands/xcframework.d.ts +19 -1
  73. package/dist/src/commands/xcframework.js +116 -27
  74. package/dist/src/commands/xcframework.js.map +1 -1
  75. package/dist/src/surface.d.ts +133 -1
  76. package/dist/src/surface.js +712 -265
  77. package/dist/src/surface.js.map +1 -1
  78. package/package.json +1 -1
@@ -6,6 +6,20 @@
6
6
  * rather than inferred: every option `xcodebuild -help` prints is classified,
7
7
  * and `npm run coverage -- --check` fails if a new Xcode adds one this file
8
8
  * has never heard of.
9
+ *
10
+ * "Covered" is asked along four axes, because for a long time it was only
11
+ * asked along the first and the misses all landed on the other three:
12
+ *
13
+ * 1. **Options** — does any command reach this option at all.
14
+ * 2. **Reach** — does every command xcodebuild accepts it on reach it. An
15
+ * option exposed on `build` and missing from `settings` is not covered for
16
+ * anyone asking `settings`, and nothing used to say so.
17
+ * 3. **Forms and sub-surfaces** — the options behind an option: the keys of
18
+ * `-exportOptionsPlist`, the arguments of `-create-xcframework`, the second
19
+ * modes that `-help` documents only inside a usage line.
20
+ * 4. **Companion tools** — `xcresulttool`, `xccov`, `simctl`. Not xcodebuild,
21
+ * so not in its headline number, but this tool wraps them and an agent that
22
+ * has to shell out to one directly has dropped back down.
9
23
  */
10
24
  /**
11
25
  * The Xcode whose `xcodebuild -help` this map was written against.
@@ -18,11 +32,29 @@
18
32
  * mismatch here and merely reports one elsewhere.
19
33
  */
20
34
  export declare const AUTHORED_AGAINST = "27.0";
35
+ /** One command that reaches a thing, and the words that reach it. */
36
+ export interface Exposure {
37
+ /** The `xcodebuild-axi` command. */
38
+ command: string;
39
+ /** How it is reached, e.g. `settings --for-index`. */
40
+ via: string;
41
+ }
42
+ /** A command that could reach a thing and does not. */
43
+ export interface Gap {
44
+ command: string;
45
+ why: string;
46
+ }
21
47
  export type OptionCoverage =
22
48
  /** Reachable through an xcodebuild-axi flag or command. */
23
49
  {
24
50
  status: "exposed";
25
- via: string;
51
+ on: readonly Exposure[];
52
+ /** The command set this option applies to, when it is more than `on`. */
53
+ surface?: SurfaceName;
54
+ /** Commands in that set it will never reach, and why not. */
55
+ declined?: readonly Gap[];
56
+ /** Commands in that set it should reach and does not, yet. */
57
+ missing?: readonly Gap[];
26
58
  }
27
59
  /** The tool always sets it, so there is nothing for a caller to pass. */
28
60
  | {
@@ -34,22 +66,122 @@ export type OptionCoverage =
34
66
  status: "superseded";
35
67
  why: string;
36
68
  }
69
+ /**
70
+ * Not wrapped yet. A gap being paid down, not a boundary — `from` names the
71
+ * command that will grow it, so the open list reads as a work plan.
72
+ */
73
+ | {
74
+ status: "missing";
75
+ why: string;
76
+ from?: string;
77
+ }
37
78
  /** Deliberately not wrapped, for the stated reason. */
38
79
  | {
39
80
  status: "n/a";
40
81
  why: string;
41
82
  };
83
+ /**
84
+ * The commands an option can apply to, by kind.
85
+ *
86
+ * xcodebuild's own usage lines are the authority: `-target` and `-alltargets`
87
+ * sit on the same line as `-showBuildSettings`, so `settings` is expected to
88
+ * take them; `-showdestinations` appears only on the `-scheme` lines, so
89
+ * `destinations` is not expected to take a target.
90
+ */
91
+ export declare const BUILD_FAMILY: readonly ["build", "test", "tests", "analyze", "archive"];
92
+ export declare const SURFACES: {
93
+ /** Shapes compilation, so only the commands that compile something. */
94
+ readonly build: readonly ["build", "test", "tests", "analyze", "archive"];
95
+ /** Applies to any action word, `clean` included. */
96
+ readonly action: readonly ["build", "test", "tests", "analyze", "archive", "clean"];
97
+ /** Changes what the project resolves to, which `settings` reports on. */
98
+ readonly resolution: readonly ["build", "test", "tests", "analyze", "archive", "clean", "settings"];
99
+ /** Package resolution, which `packages` drives on its own. */
100
+ readonly package: readonly ["build", "test", "tests", "analyze", "archive", "packages"];
101
+ /** Selects a scheme to act on. */
102
+ readonly scheme: readonly ["build", "test", "tests", "analyze", "archive", "clean", "settings", "destinations", "testplans", "packages", "localize"];
103
+ /** Constrains which tests are run, and so which tests are enumerated. */
104
+ readonly testing: readonly ["test", "tests"];
105
+ };
106
+ export type SurfaceName = keyof typeof SURFACES;
107
+ /** `"settings --for-index"` -> `{ command: "settings", via: "settings --for-index" }`. */
108
+ export declare function at(via: string): Exposure;
42
109
  export declare const OPTION_COVERAGE: Record<string, OptionCoverage>;
43
110
  /** The build actions, classified the same way. */
44
111
  export declare const ACTION_COVERAGE: Record<string, OptionCoverage>;
112
+ /**
113
+ * The second forms of an option, which `-help` documents only inside a usage
114
+ * line or a sentence. Nothing enumerates these, so they are the easiest kind
115
+ * of gap to ship: `-runFirstLaunch -checkForNewerComponents` is a flag on a
116
+ * flag, mentioned once, in prose.
117
+ */
118
+ export declare const FORM_COVERAGE: Record<string, OptionCoverage>;
119
+ /**
120
+ * `-exportOptionsPlist` keys.
121
+ *
122
+ * The plist is the whole configuration surface of `-exportArchive`, and
123
+ * authoring one by hand is exactly the side quest `--method` exists to remove
124
+ * — so a key with no flag is a key that sends the agent back to writing XML.
125
+ */
126
+ export declare const EXPORT_OPTION_COVERAGE: Record<string, OptionCoverage>;
127
+ /** `-create-xcframework`'s own options, which only its `-help` prints. */
128
+ export declare const XCFRAMEWORK_COVERAGE: Record<string, OptionCoverage>;
129
+ /**
130
+ * `xcresulttool`, which owns every answer about a run that already happened.
131
+ *
132
+ * The result bundle is this tool's source of truth (see AGENTS.md), so a leaf
133
+ * missing here is an answer the bundle holds and the tool cannot read out —
134
+ * `test --diagnostics` collecting a report nothing can open, for instance.
135
+ */
136
+ export declare const XCRESULT_COVERAGE: Record<string, OptionCoverage>;
137
+ /** `xccov`, which owns coverage. */
138
+ export declare const XCCOV_COVERAGE: Record<string, OptionCoverage>;
139
+ /**
140
+ * `simctl`, which owns simulators.
141
+ *
142
+ * `sim` exists to put a destination into the state a build or test run needs,
143
+ * and stops there. The rest is classified so the boundary is a decision on
144
+ * the record rather than an omission.
145
+ */
146
+ export declare const SIMCTL_COVERAGE: Record<string, OptionCoverage>;
147
+ /** Every non-xcodebuild surface this tool wraps, for one combined number. */
148
+ export declare const COMPANION_SURFACES: Record<string, Record<string, OptionCoverage>>;
45
149
  export interface CoverageTally {
46
150
  total: number;
47
151
  exposed: number;
48
152
  always: number;
49
153
  superseded: number;
154
+ missing: number;
50
155
  na: number;
51
156
  /** Reachable, handled for you, or answered better — what the README quotes. */
52
157
  covered: number;
53
158
  percent: number;
54
159
  }
55
160
  export declare function tally(map: Record<string, OptionCoverage>): CoverageTally;
161
+ export declare function percent(part: number, whole: number): number;
162
+ /** Every command an option applies to, whether or not it reaches it. */
163
+ export declare function applicable(entry: OptionCoverage): string[];
164
+ export interface ReachTally {
165
+ /** Command-and-option pairs that could exist. */
166
+ pairs: number;
167
+ reached: number;
168
+ declined: number;
169
+ missing: number;
170
+ percent: number;
171
+ }
172
+ /**
173
+ * Coverage counted per command rather than per option.
174
+ *
175
+ * The headline number asks whether an option is reachable at all; this one
176
+ * asks whether it is reachable from where you are standing, which is the
177
+ * question an agent that just got `unknown flag --target` was asking.
178
+ */
179
+ export declare function reach(map: Record<string, OptionCoverage>): ReachTally;
180
+ /** Every gap in a map, as `option` -> the commands that should reach it. */
181
+ export declare function gaps(map: Record<string, OptionCoverage>): Array<{
182
+ option: string;
183
+ command: string;
184
+ why: string;
185
+ }>;
186
+ /** The README's one-line answer to "how do I reach this?". */
187
+ export declare function describe(entry: OptionCoverage): string;