xcodebuild-axi 0.1.1 → 0.1.2
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
|
@@ -6,6 +6,23 @@ Notable changes to `xcodebuild-axi`. Versions follow
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.2] - 2026-09-21
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- The no-argument home view reported a **build** as a passing test run. Found
|
|
14
|
+
by installing 0.1.1 globally and pointing it at a real workspace, where the
|
|
15
|
+
last run rendered as `Test - MyApp on unknown — 0 passed`.
|
|
16
|
+
|
|
17
|
+
`xcresulttool` answers the test-shaped query for any bundle, so a build comes
|
|
18
|
+
back as `{title: "Test - X", totalTestCount: 0, result: "unknown"}` rather
|
|
19
|
+
than as nothing, and the guard tested for `undefined` when the count is `0`.
|
|
20
|
+
Since this line is what a session-start hook puts in front of an agent, it
|
|
21
|
+
was the one thing in the tool most likely to be believed and least likely to
|
|
22
|
+
be checked. The bundle's own name records which command wrote it, so that is
|
|
23
|
+
now the signal; a run that recorded no tests says so instead of showing a
|
|
24
|
+
zero verdict.
|
|
25
|
+
|
|
9
26
|
## [0.1.1] - 2026-09-21
|
|
10
27
|
|
|
11
28
|
No code changes. The published files are byte-identical to 0.1.0.
|
|
@@ -43,6 +60,7 @@ First release.
|
|
|
43
60
|
- 100% of the 117 options `xcodebuild -help` lists are covered, declared in
|
|
44
61
|
`src/surface.ts` and checked against the installed Xcode in CI.
|
|
45
62
|
|
|
46
|
-
[unreleased]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.
|
|
63
|
+
[unreleased]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.2...HEAD
|
|
64
|
+
[0.1.2]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.1...v0.1.2
|
|
47
65
|
[0.1.1]: https://github.com/alexrrouse/xcodebuild-axi/compare/v0.1.0...v0.1.1
|
|
48
66
|
[0.1.0]: https://github.com/alexrrouse/xcodebuild-axi/releases/tag/v0.1.0
|
|
@@ -7,3 +7,8 @@
|
|
|
7
7
|
* that takes more than a moment — `-list -json` and one result bundle read.
|
|
8
8
|
*/
|
|
9
9
|
export declare function homeCommand(): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Which command wrote a bundle, from the name `runLabel` gave it:
|
|
12
|
+
* `<scheme>[-<device>]-<command>.xcresult`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function runKind(path: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readdirSync, statSync } from "node:fs";
|
|
2
|
-
import { join } from "node:path";
|
|
2
|
+
import { basename, join } from "node:path";
|
|
3
3
|
import { resolveProject } from "../context.js";
|
|
4
4
|
import { listSchemes } from "../scheme.js";
|
|
5
5
|
import { artifactDir } from "../xcodebuild.js";
|
|
@@ -84,8 +84,22 @@ async function describeLastRun(project) {
|
|
|
84
84
|
return undefined;
|
|
85
85
|
const summary = await readTestSummary(newest.path).catch(() => undefined);
|
|
86
86
|
const when = relativeTime(newest.mtime / 1000);
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
const where = `see \`xcodebuild-axi result ${tildePath(newest.path)}\``;
|
|
88
|
+
const kind = runKind(newest.path);
|
|
89
|
+
// `xcresulttool` answers the test-shaped query for *any* bundle, so a build
|
|
90
|
+
// comes back as `{title: "Test - X", totalTestCount: 0, result: "unknown"}`
|
|
91
|
+
// rather than as nothing. Reading that as a verdict rendered a build as
|
|
92
|
+
// "Test - X on unknown — 0 passed", which is the shape of a clean pass and
|
|
93
|
+
// was observed on a real build bundle. The old guard did not catch it
|
|
94
|
+
// because it tested for `undefined` and the count is `0`.
|
|
95
|
+
//
|
|
96
|
+
// Which command wrote the bundle is not a guess: `runLabel` names it
|
|
97
|
+
// `<scheme>[-<device>]-<command>`, so the suffix is authoritative.
|
|
98
|
+
if (kind !== "test") {
|
|
99
|
+
return `${when} — ${kind} — ${where}`;
|
|
100
|
+
}
|
|
101
|
+
if (!summary || !summary.totalTestCount) {
|
|
102
|
+
return `${when} — test recorded no tests — ${where}`;
|
|
89
103
|
}
|
|
90
104
|
const failed = summary.failedTests ?? 0;
|
|
91
105
|
const device = describeDevice(summary.devicesAndConfigurations?.[0]?.device);
|
|
@@ -94,4 +108,16 @@ async function describeLastRun(project) {
|
|
|
94
108
|
: `${summary.passedTests ?? 0} passed`;
|
|
95
109
|
return `${summary.title ?? "test"} on ${device} — ${verdict} (${when})`;
|
|
96
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Which command wrote a bundle, from the name `runLabel` gave it:
|
|
113
|
+
* `<scheme>[-<device>]-<command>.xcresult`.
|
|
114
|
+
*/
|
|
115
|
+
export function runKind(path) {
|
|
116
|
+
const stem = basename(path, ".xcresult");
|
|
117
|
+
const tail = stem.split("-").pop();
|
|
118
|
+
// `basename` leaves the extension alone when stripping it would leave
|
|
119
|
+
// nothing, so a degenerate ".xcresult" comes back whole. A command name
|
|
120
|
+
// always starts with a letter, which is enough to tell the two apart.
|
|
121
|
+
return tail && /^[A-Za-z]/.test(tail) ? tail : "run";
|
|
122
|
+
}
|
|
97
123
|
//# sourceMappingURL=home.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/commands/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../src/commands/home.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAuB,MAAM,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