@kevlns/u-cli-mod 0.2.4 → 0.3.0
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/AGENTS.md +4 -3
- package/dist/runIdPatch.d.ts +8 -0
- package/dist/runIdPatch.js +591 -0
- package/dist/transform.js +13 -0
- package/package.json +1 -1
- package/routes/2022.3.59f1c1.json +1 -1
- package/routes/2022.3.62f3c1.json +1 -1
- package/routes/expected-tree/2022.3.59f1c1.json +4 -4
- package/routes/expected-tree/2022.3.62f3c1.json +4 -4
- package/v-cli.plugin.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -28,6 +28,7 @@ Pipeline 命令全集见文末「Pipeline 工具清单」(适配版 `com.unity
|
|
|
28
28
|
6. `exec` 每次调用前都会重新校验 CLI 哈希(防篡改),属正常行为;校验失败按提示跑 `u-cli-mod cli install --force` 修复即可。
|
|
29
29
|
7. **读取 Editor 当前 Console 首选 `command read_console`**,`get_console_logs` 是兼容别名;`command console` 读取回调捕获流,适合 `since`/cursor 跟随,但不能代替原生 Console 快照。工具必须经 `command <名>` 调用。若实际 schema 中缺少 `read_console`,先检查 `doctor` 的 `patchVersion`/`installedPatchVersion` 和 `state`,不要将其误认成 `console` 的别名。
|
|
30
30
|
8. **全量测试必须走 `--async_tests`**:Unity CLI 对同步命令有 30 秒硬性等待上限(`--timeout` 无法延长),同步 `run_tests` 全量必然超时且不入 `test_status` 跟踪。用法:`run_tests --mode EditMode --async_tests`(立即返回)→ 轮询 `test_status` 至 `completed` 拿完整 Summary;小范围用 `--filter` 缩到单命名空间/类,可直接同步等待拿 Summary。
|
|
31
|
+
9. **任务身份(patchVersion 3)**:`run_tests --async_tests` 的响应含 `RunId`;`test_status --run_id <id>` 只返回该次运行的记录(不存在/被顶替时返回 `unknown_run`,**绝不回退最近一次**);`cancel_tests --run_id <id>` 定向取消(不匹配或无活动运行返回 `unknown_run`/`no_active_run` 且零副作用)。`recompile` 响应含 `runId`,`recompile_status --run_id <id>` 同语义(引擎自发编译的终态 `runId` 为 null,按 id 查询即 `unknown_run`)。连续两次 `run_tests` 会顶替旧运行的追踪槽位——旧 id 的查询会得到 `unknown_run` 而不是新运行的报告。已知限制:`recompile` 连发时后发 runId 会覆盖 pending id,前一编译批次的引擎事件终态记在后发 id 名下(旧 id 查询 `unknown_run` 正确拒绝);legacy 无参 `cancel_tests` 保持原行为(会覆写最近一次状态记录)。
|
|
31
32
|
|
|
32
33
|
## 典型流程
|
|
33
34
|
|
|
@@ -113,7 +114,7 @@ u-cli-mod exec <project> -- command read_console --types error,warning --count 1
|
|
|
113
114
|
- `get_serialized_fields` — Read serialized fields of a component/asset. Returns each top-level field's name, type and value (object references are returned as re-usable handles). Pass 'field' to read a single SerializedProperty path.
|
|
114
115
|
- `hotreload_status` — Show current hot reload registry status and statistics
|
|
115
116
|
- `recompile` — Force a script recompile (works while unfocused/minimized). Poll recompile_status for completion.
|
|
116
|
-
- `recompile_status` — Get the status of the last recompile: idle | triggered | compiling | completed | up_to_date.
|
|
117
|
+
- `recompile_status` — Get the status of the last recompile: idle | triggered | compiling | completed | up_to_date (optional run_id for correlated query).
|
|
117
118
|
- `reload_file` — Compile and apply in-place [HotReload] edits from a source file
|
|
118
119
|
- `reload_file_override` — Compile and apply hot reload file changes immediately
|
|
119
120
|
- `set_serialized_field` — Set a serialized field on a component/asset. Supports primitives, enums, Vector/Color/Rect/Bounds, object references (value = an ObjectRef: asset by guid/fileId/path or scene object by instanceId/hierarchyPath), and array elements via 'name.Array.data[i]' (or 'name.Array.size' to resize).
|
|
@@ -153,10 +154,10 @@ u-cli-mod exec <project> -- command read_console --types error,warning --count 1
|
|
|
153
154
|
- `package_status` — Status of the last async package operation (add/remove/resolve): idle | in_progress | completed | failed, with the added package, manifest, and any error.
|
|
154
155
|
|
|
155
156
|
### 测试
|
|
156
|
-
- `cancel_tests` — Cancel running test execution
|
|
157
|
+
- `cancel_tests` — Cancel running test execution (optional run_id for directed cancel; mismatch = no side effects)
|
|
157
158
|
- `list_tests` — List all available tests (EditMode and/or PlayMode) without running them
|
|
158
159
|
- `run_tests` — Execute Unity tests with filtering options
|
|
159
|
-
- `test_status` — Get status of running async test execution
|
|
160
|
+
- `test_status` — Get status of running async test execution (optional run_id for correlated query; unknown_run otherwise)
|
|
160
161
|
|
|
161
162
|
### 烘焙(光照 / NavMesh / 遮挡)
|
|
162
163
|
- `bake_lighting` — Trigger an async lightmap bake of the open scene(s) via Lightmapping.BakeAsync(). Returns immediately; poll lighting_bake_status until completed.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const testCommandsPatches: Array<[string, string]>;
|
|
2
|
+
export declare function patchTestCommands(bytes: Buffer): Buffer;
|
|
3
|
+
export declare const pipelineTestRunnerPatches: Array<[string, string]>;
|
|
4
|
+
export declare function patchPipelineTestRunner(bytes: Buffer): Buffer;
|
|
5
|
+
export declare const recompileCommandPatches: Array<[string, string]>;
|
|
6
|
+
export declare function patchRecompileCommand(bytes: Buffer): Buffer;
|
|
7
|
+
export declare const testExecutionResponsePatches: Array<[string, string]>;
|
|
8
|
+
export declare function patchTestExecutionResponse(bytes: Buffer): Buffer;
|
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
import { CliError } from './errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* runId protocol patch (patchVersion 3): cross-domain-reload task identity for
|
|
4
|
+
* the test pipeline and recompile status, consumed by v-cli execution handles.
|
|
5
|
+
*
|
|
6
|
+
* Semantics (design of record: v-cli .vant/docs/spec/phase-a-identity-matrix.md §3):
|
|
7
|
+
* - run_tests --async_tests assigns a runId (GUID "N"), persisted in the request
|
|
8
|
+
* file and echoed in the response (TestExecutionResponse.RunId); every status
|
|
9
|
+
* payload written for that run (completed/error/cancelled) carries the runId.
|
|
10
|
+
* - test_status --run_id <id>: correlated read. Request file with matching id ->
|
|
11
|
+
* running; status file with matching id -> its content; anything else ->
|
|
12
|
+
* {"status":"unknown_run"} — NEVER another run's record, never the latest run.
|
|
13
|
+
* - cancel_tests --run_id <id>: directed cancel. Mismatched or no active run ->
|
|
14
|
+
* {"status":"unknown_run"|"no_active_run"} with ZERO side effects (the status
|
|
15
|
+
* file of another run is never overwritten). Matching id -> current cancel
|
|
16
|
+
* behaviour, with runId recorded in the cancelled payload.
|
|
17
|
+
* - recompile assigns a runId; engine compilation events propagate it to the
|
|
18
|
+
* terminal payload. Engine-spontaneous compiles (no pending command id) write
|
|
19
|
+
* runId:null. recompile_status --run_id mirrors the correlated-read semantics.
|
|
20
|
+
*
|
|
21
|
+
* All patches are exact-anchor string replacements over the pinned upstream
|
|
22
|
+
* bytes; a missing anchor is a hard error (the upstream revision moved), never
|
|
23
|
+
* a silent skip. Output is LF-normalized like the other patches.
|
|
24
|
+
*/
|
|
25
|
+
function applyPatches(source, name, sentinel, pairs) {
|
|
26
|
+
let s = source.toString('utf8');
|
|
27
|
+
if (s.includes(sentinel)) {
|
|
28
|
+
// Already patched: idempotent no-op (normalized passthrough).
|
|
29
|
+
return Buffer.from(s.replace(/\r\n/g, '\n'), 'utf8');
|
|
30
|
+
}
|
|
31
|
+
for (const [anchor, replacement] of pairs) {
|
|
32
|
+
if (!s.includes(anchor)) {
|
|
33
|
+
throw new CliError(`${name} 缺少锚点(上游修订已变化?): ${JSON.stringify(anchor.slice(0, 80))}…`);
|
|
34
|
+
}
|
|
35
|
+
s = s.replace(anchor, replacement);
|
|
36
|
+
}
|
|
37
|
+
return Buffer.from(s.replace(/\r\n/g, '\n'), 'utf8');
|
|
38
|
+
}
|
|
39
|
+
export const testCommandsPatches = [
|
|
40
|
+
[
|
|
41
|
+
` [CliCommand("test_status", "Get status of running async test execution", MainThreadRequired = false, Tags = new[] { "tests" })]
|
|
42
|
+
public static string GetTestStatus()
|
|
43
|
+
{
|
|
44
|
+
var status = PipelineTestRunner.GetTestStatus();
|
|
45
|
+
return status ?? "{\\"status\\":\\"no_tests\\",\\"message\\":\\"No test run in progress\\"}";
|
|
46
|
+
}`,
|
|
47
|
+
` [CliCommand("test_status", "Get status of running async test execution; optional run_id for correlated query", MainThreadRequired = false, Tags = new[] { "tests" })]
|
|
48
|
+
public static string GetTestStatus(
|
|
49
|
+
[CliArg("run_id", "Optional run id from run_tests --async_tests: return only that run's record; unknown_run otherwise (never another run's record)")] string runId = null)
|
|
50
|
+
{
|
|
51
|
+
var status = PipelineTestRunner.GetTestStatus(string.IsNullOrEmpty(runId) ? null : runId.Trim());
|
|
52
|
+
return status ?? "{\\"status\\":\\"no_tests\\",\\"message\\":\\"No test run in progress\\"}";
|
|
53
|
+
}`,
|
|
54
|
+
],
|
|
55
|
+
[
|
|
56
|
+
` [CliCommand("cancel_tests", "Cancel running test execution", MainThreadRequired = true, Tags = new[] { "tests" })]
|
|
57
|
+
public static object CancelTests()
|
|
58
|
+
{
|
|
59
|
+
return PipelineTestRunner.CancelTests();
|
|
60
|
+
}`,
|
|
61
|
+
` [CliCommand("cancel_tests", "Cancel running test execution; optional run_id for directed cancel (mismatch has no side effects)", MainThreadRequired = true, Tags = new[] { "tests" })]
|
|
62
|
+
public static object CancelTests(
|
|
63
|
+
[CliArg("run_id", "Optional run id to cancel; unknown_run/no_active_run when it is not the active run, leaving everything untouched")] string runId = null)
|
|
64
|
+
{
|
|
65
|
+
return PipelineTestRunner.CancelTests(string.IsNullOrEmpty(runId) ? null : runId.Trim());
|
|
66
|
+
}`,
|
|
67
|
+
],
|
|
68
|
+
];
|
|
69
|
+
export function patchTestCommands(bytes) {
|
|
70
|
+
return applyPatches(bytes, 'TestCommands.cs', 'CliArg("run_id"', testCommandsPatches);
|
|
71
|
+
}
|
|
72
|
+
export const pipelineTestRunnerPatches = [
|
|
73
|
+
// 1) request model carries the run id
|
|
74
|
+
[
|
|
75
|
+
` public bool includeExplicit;
|
|
76
|
+
public bool isSync;
|
|
77
|
+
}`,
|
|
78
|
+
` public bool includeExplicit;
|
|
79
|
+
public bool isSync;
|
|
80
|
+
public string runId;
|
|
81
|
+
}`,
|
|
82
|
+
],
|
|
83
|
+
// 2) async start: assign run id, persist it, echo it, thread it through
|
|
84
|
+
[
|
|
85
|
+
` // Save request to disk (survives domain reloads for PlayMode)
|
|
86
|
+
var request = new TestRequest
|
|
87
|
+
{
|
|
88
|
+
filter = filter,
|
|
89
|
+
filterType = filterType,
|
|
90
|
+
mode = testMode.ToString(),
|
|
91
|
+
includeExplicit = includeExplicit,
|
|
92
|
+
isSync = false
|
|
93
|
+
};
|
|
94
|
+
File.WriteAllText(TestRequestFile, JsonConvert.SerializeObject(request));`,
|
|
95
|
+
` // Save request to disk (survives domain reloads for PlayMode)
|
|
96
|
+
var runId = Guid.NewGuid().ToString("N");
|
|
97
|
+
var request = new TestRequest
|
|
98
|
+
{
|
|
99
|
+
filter = filter,
|
|
100
|
+
filterType = filterType,
|
|
101
|
+
mode = testMode.ToString(),
|
|
102
|
+
includeExplicit = includeExplicit,
|
|
103
|
+
isSync = false,
|
|
104
|
+
runId = runId
|
|
105
|
+
};
|
|
106
|
+
File.WriteAllText(TestRequestFile, JsonConvert.SerializeObject(request));`,
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
` StartAsyncTestExecution(testMode, filter, filterType, includeExplicit);`,
|
|
110
|
+
` StartAsyncTestExecution(testMode, filter, filterType, includeExplicit, runId);`,
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
` Result = "running",
|
|
114
|
+
StatusPath = TestStatusFile,
|
|
115
|
+
Mode = testMode.ToString(),`,
|
|
116
|
+
` Result = "running",
|
|
117
|
+
RunId = runId,
|
|
118
|
+
StatusPath = TestStatusFile,
|
|
119
|
+
Mode = testMode.ToString(),`,
|
|
120
|
+
],
|
|
121
|
+
// 3) async execution thread: run id into every status write
|
|
122
|
+
[
|
|
123
|
+
` private static void StartAsyncTestExecution(TestMode testMode, string filter, string filterType, bool includeExplicit)
|
|
124
|
+
{`,
|
|
125
|
+
` private static void StartAsyncTestExecution(TestMode testMode, string filter, string filterType, bool includeExplicit, string runId)
|
|
126
|
+
{`,
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
` // Async completion: write results for pollers. Set once, never overwritten.
|
|
130
|
+
collector.OnRunFinished = () =>
|
|
131
|
+
{
|
|
132
|
+
WriteCompletedResults(collector);
|
|
133
|
+
RestoreLiveServerIfDisrupted(); // B2: self-heal if a test broke the live server.
|
|
134
|
+
CleanupRequestFile();
|
|
135
|
+
UnregisterCollector(api, collector);
|
|
136
|
+
};`,
|
|
137
|
+
` // Async completion: write results for pollers. Set once, never overwritten.
|
|
138
|
+
collector.OnRunFinished = () =>
|
|
139
|
+
{
|
|
140
|
+
WriteCompletedResults(collector, runId);
|
|
141
|
+
RestoreLiveServerIfDisrupted(); // B2: self-heal if a test broke the live server.
|
|
142
|
+
CleanupRequestFile();
|
|
143
|
+
UnregisterCollector(api, collector);
|
|
144
|
+
};`,
|
|
145
|
+
],
|
|
146
|
+
[
|
|
147
|
+
` if (testNames.Count == 0)
|
|
148
|
+
{
|
|
149
|
+
WriteStatusFile(new
|
|
150
|
+
{
|
|
151
|
+
status = "completed",
|
|
152
|
+
duration = 0.0,
|
|
153
|
+
summary = new { total = 0, passed = 0, failed = 0, skipped = 0, inconclusive = 0 },
|
|
154
|
+
results = new object[0]
|
|
155
|
+
});`,
|
|
156
|
+
` if (testNames.Count == 0)
|
|
157
|
+
{
|
|
158
|
+
WriteStatusFile(new
|
|
159
|
+
{
|
|
160
|
+
status = "completed",
|
|
161
|
+
runId = runId,
|
|
162
|
+
duration = 0.0,
|
|
163
|
+
summary = new { total = 0, passed = 0, failed = 0, skipped = 0, inconclusive = 0 },
|
|
164
|
+
results = new object[0]
|
|
165
|
+
});`,
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
` Debug.LogError($"[PipelineTestRunner] Async run setup error: {ex.Message}");
|
|
169
|
+
WriteStatusFile(new { status = "error", message = ex.Message });`,
|
|
170
|
+
` Debug.LogError($"[PipelineTestRunner] Async run setup error: {ex.Message}");
|
|
171
|
+
WriteStatusFile(new { status = "error", runId = runId, message = ex.Message });`,
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
` Debug.LogError($"[PipelineTestRunner] Async execution error: {ex.Message}");
|
|
175
|
+
WriteStatusFile(new { status = "error", message = ex.Message });`,
|
|
176
|
+
` Debug.LogError($"[PipelineTestRunner] Async execution error: {ex.Message}");
|
|
177
|
+
WriteStatusFile(new { status = "error", runId = runId, message = ex.Message });`,
|
|
178
|
+
],
|
|
179
|
+
// 4) post-reload reattach: recover the run id from the request file
|
|
180
|
+
[
|
|
181
|
+
` private static void ReattachResultCollector()
|
|
182
|
+
{`,
|
|
183
|
+
` private static void ReattachResultCollector(string runId)
|
|
184
|
+
{`,
|
|
185
|
+
],
|
|
186
|
+
[
|
|
187
|
+
` collector.OnRunFinished = () =>
|
|
188
|
+
{
|
|
189
|
+
WriteCompletedResults(collector);
|
|
190
|
+
RestoreLiveServerIfDisrupted();
|
|
191
|
+
CleanupRequestFile();
|
|
192
|
+
UnregisterCollector(api, collector);
|
|
193
|
+
};`,
|
|
194
|
+
` collector.OnRunFinished = () =>
|
|
195
|
+
{
|
|
196
|
+
WriteCompletedResults(collector, runId);
|
|
197
|
+
RestoreLiveServerIfDisrupted();
|
|
198
|
+
CleanupRequestFile();
|
|
199
|
+
UnregisterCollector(api, collector);
|
|
200
|
+
};`,
|
|
201
|
+
],
|
|
202
|
+
[
|
|
203
|
+
` // We only need to re-register a collector — our previous one did not survive the
|
|
204
|
+
// reload — to capture the resumed run's completion. Runs on the main thread because
|
|
205
|
+
// CheckForPendingTests is invoked via EditorApplication.delayCall.
|
|
206
|
+
ReattachResultCollector();`,
|
|
207
|
+
` // We only need to re-register a collector — our previous one did not survive the
|
|
208
|
+
// reload — to capture the resumed run's completion. Runs on the main thread because
|
|
209
|
+
// CheckForPendingTests is invoked via EditorApplication.delayCall.
|
|
210
|
+
ReattachResultCollector(request.runId);`,
|
|
211
|
+
],
|
|
212
|
+
// 5) terminal report carries the run id
|
|
213
|
+
[
|
|
214
|
+
` private static void WriteCompletedResults(TestResultCollector collector)
|
|
215
|
+
{`,
|
|
216
|
+
` private static void WriteCompletedResults(TestResultCollector collector, string runId)
|
|
217
|
+
{`,
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
` var result = new
|
|
221
|
+
{
|
|
222
|
+
status = "completed",
|
|
223
|
+
duration = Math.Round(root.Duration, 2),`,
|
|
224
|
+
` var result = new
|
|
225
|
+
{
|
|
226
|
+
status = "completed",
|
|
227
|
+
runId = runId,
|
|
228
|
+
duration = Math.Round(root.Duration, 2),`,
|
|
229
|
+
],
|
|
230
|
+
// 6) correlated status read + helpers
|
|
231
|
+
[
|
|
232
|
+
` /// <summary>
|
|
233
|
+
/// Get current test status (for async mode polling)
|
|
234
|
+
/// </summary>
|
|
235
|
+
public static string GetTestStatus()
|
|
236
|
+
{
|
|
237
|
+
if (File.Exists(TestStatusFile))
|
|
238
|
+
return File.ReadAllText(TestStatusFile);
|
|
239
|
+
if (File.Exists(TestRequestFile))
|
|
240
|
+
return JsonConvert.SerializeObject(new { status = "running" });
|
|
241
|
+
return null;
|
|
242
|
+
}`,
|
|
243
|
+
` private class RunIdEnvelope
|
|
244
|
+
{
|
|
245
|
+
public string runId { get; set; }
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
private static string RequestRunId()
|
|
249
|
+
{
|
|
250
|
+
try
|
|
251
|
+
{
|
|
252
|
+
if (!File.Exists(TestRequestFile)) return null;
|
|
253
|
+
var request = JsonConvert.DeserializeObject<TestRequest>(File.ReadAllText(TestRequestFile));
|
|
254
|
+
return string.IsNullOrEmpty(request?.runId) ? null : request.runId;
|
|
255
|
+
}
|
|
256
|
+
catch
|
|
257
|
+
{
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
private static string StatusRunId()
|
|
263
|
+
{
|
|
264
|
+
try
|
|
265
|
+
{
|
|
266
|
+
if (!File.Exists(TestStatusFile)) return null;
|
|
267
|
+
var envelope = JsonConvert.DeserializeObject<RunIdEnvelope>(File.ReadAllText(TestStatusFile));
|
|
268
|
+
return string.IsNullOrEmpty(envelope?.runId) ? null : envelope.runId;
|
|
269
|
+
}
|
|
270
|
+
catch
|
|
271
|
+
{
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/// <summary>
|
|
277
|
+
/// Get current test status (for async mode polling). With runId: correlated
|
|
278
|
+
/// read — only the requested run's record is returned; unknown_run otherwise.
|
|
279
|
+
/// </summary>
|
|
280
|
+
public static string GetTestStatus(string runId = null)
|
|
281
|
+
{
|
|
282
|
+
if (runId == null)
|
|
283
|
+
{
|
|
284
|
+
if (File.Exists(TestStatusFile))
|
|
285
|
+
return File.ReadAllText(TestStatusFile);
|
|
286
|
+
if (File.Exists(TestRequestFile))
|
|
287
|
+
return JsonConvert.SerializeObject(new { status = "running" });
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if (File.Exists(TestRequestFile) && RequestRunId() == runId)
|
|
292
|
+
return JsonConvert.SerializeObject(new { status = "running", runId = runId });
|
|
293
|
+
|
|
294
|
+
if (File.Exists(TestStatusFile))
|
|
295
|
+
{
|
|
296
|
+
if (StatusRunId() == runId)
|
|
297
|
+
return File.ReadAllText(TestStatusFile);
|
|
298
|
+
return JsonConvert.SerializeObject(new
|
|
299
|
+
{
|
|
300
|
+
status = "unknown_run",
|
|
301
|
+
requestedRunId = runId,
|
|
302
|
+
message = "Requested run is not the tracked run; refusing to return another run's record."
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
return JsonConvert.SerializeObject(new
|
|
307
|
+
{
|
|
308
|
+
status = "unknown_run",
|
|
309
|
+
requestedRunId = runId,
|
|
310
|
+
message = "No record for the requested run id."
|
|
311
|
+
});
|
|
312
|
+
}`,
|
|
313
|
+
],
|
|
314
|
+
// 7) error terminal payloads carry the run id (spec: ALL status payloads of a run carry runId)
|
|
315
|
+
[
|
|
316
|
+
` if (!collector.IsComplete)
|
|
317
|
+
{
|
|
318
|
+
WriteStatusFile(new { status = "error", message = "Tests did not complete" });
|
|
319
|
+
return;
|
|
320
|
+
}`,
|
|
321
|
+
` if (!collector.IsComplete)
|
|
322
|
+
{
|
|
323
|
+
WriteStatusFile(new { status = "error", runId = runId, message = "Tests did not complete" });
|
|
324
|
+
return;
|
|
325
|
+
}`,
|
|
326
|
+
],
|
|
327
|
+
[
|
|
328
|
+
` catch (Exception ex)
|
|
329
|
+
{
|
|
330
|
+
Debug.LogError($"[PipelineTestRunner] Failed to write results: {ex.Message}");
|
|
331
|
+
WriteStatusFile(new { status = "error", message = ex.Message });
|
|
332
|
+
}`,
|
|
333
|
+
` catch (Exception ex)
|
|
334
|
+
{
|
|
335
|
+
Debug.LogError($"[PipelineTestRunner] Failed to write results: {ex.Message}");
|
|
336
|
+
WriteStatusFile(new { status = "error", runId = runId, message = ex.Message });
|
|
337
|
+
}`,
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
` catch (Exception ex)
|
|
341
|
+
{
|
|
342
|
+
Debug.LogError($"[PipelineTestRunner] Failed to reattach result collector: {ex.Message}");
|
|
343
|
+
WriteStatusFile(new { status = "error", message = ex.Message });
|
|
344
|
+
CleanupRequestFile();
|
|
345
|
+
UnregisterCollector(api, collector);
|
|
346
|
+
}`,
|
|
347
|
+
` catch (Exception ex)
|
|
348
|
+
{
|
|
349
|
+
Debug.LogError($"[PipelineTestRunner] Failed to reattach result collector: {ex.Message}");
|
|
350
|
+
WriteStatusFile(new { status = "error", runId = runId, message = ex.Message });
|
|
351
|
+
CleanupRequestFile();
|
|
352
|
+
UnregisterCollector(api, collector);
|
|
353
|
+
}`,
|
|
354
|
+
],
|
|
355
|
+
// 7) directed cancel: mismatch has zero side effects
|
|
356
|
+
[
|
|
357
|
+
` public static object CancelTests()
|
|
358
|
+
{
|
|
359
|
+
if (m_ActiveCollector == null && !File.Exists(TestRequestFile) && !File.Exists(TestStatusFile))
|
|
360
|
+
return new { status = "no_tests", message = "No test run in progress." };
|
|
361
|
+
|
|
362
|
+
bool wasPlayMode = false;
|
|
363
|
+
try
|
|
364
|
+
{
|
|
365
|
+
if (File.Exists(TestRequestFile))
|
|
366
|
+
{
|
|
367
|
+
var json = File.ReadAllText(TestRequestFile);
|
|
368
|
+
wasPlayMode = json.Contains("PlayMode");
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
catch { }
|
|
372
|
+
|
|
373
|
+
InvalidatePreviousRun();
|
|
374
|
+
WriteStatusFile(new { status = "cancelled", message = "Test run cancelled." });`,
|
|
375
|
+
` public static object CancelTests(string runId = null)
|
|
376
|
+
{
|
|
377
|
+
var hasActiveRun = File.Exists(TestRequestFile);
|
|
378
|
+
// Read the request file ONCE: the guard and the cancelled payload must agree even if the
|
|
379
|
+
// run completes (and deletes the request file) between the two reads.
|
|
380
|
+
var activeRunId = hasActiveRun ? RequestRunId() : null;
|
|
381
|
+
if (runId != null)
|
|
382
|
+
{
|
|
383
|
+
if (!hasActiveRun)
|
|
384
|
+
return new
|
|
385
|
+
{
|
|
386
|
+
status = "no_active_run",
|
|
387
|
+
requestedRunId = runId,
|
|
388
|
+
message = "No test run in progress; nothing was touched."
|
|
389
|
+
};
|
|
390
|
+
if (activeRunId != runId)
|
|
391
|
+
return new
|
|
392
|
+
{
|
|
393
|
+
status = "unknown_run",
|
|
394
|
+
requestedRunId = runId,
|
|
395
|
+
message = "Requested run is not the active run; no cancellation was performed."
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (m_ActiveCollector == null && !File.Exists(TestRequestFile) && !File.Exists(TestStatusFile))
|
|
400
|
+
return new { status = "no_tests", message = "No test run in progress." };
|
|
401
|
+
|
|
402
|
+
bool wasPlayMode = false;
|
|
403
|
+
var cancelledRunId = activeRunId;
|
|
404
|
+
try
|
|
405
|
+
{
|
|
406
|
+
if (File.Exists(TestRequestFile))
|
|
407
|
+
{
|
|
408
|
+
var json = File.ReadAllText(TestRequestFile);
|
|
409
|
+
wasPlayMode = json.Contains("PlayMode");
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
catch { }
|
|
413
|
+
|
|
414
|
+
InvalidatePreviousRun();
|
|
415
|
+
WriteStatusFile(new { status = "cancelled", runId = cancelledRunId, message = "Test run cancelled." });`,
|
|
416
|
+
],
|
|
417
|
+
];
|
|
418
|
+
export function patchPipelineTestRunner(bytes) {
|
|
419
|
+
return applyPatches(bytes, 'PipelineTestRunner.cs', 'requestedRunId', pipelineTestRunnerPatches);
|
|
420
|
+
}
|
|
421
|
+
export const recompileCommandPatches = [
|
|
422
|
+
// pending command run id survives the trigger->engine-event handoff in-process
|
|
423
|
+
[
|
|
424
|
+
` static readonly List<string> s_Errors = new List<string>();`,
|
|
425
|
+
` static readonly List<string> s_Errors = new List<string>();
|
|
426
|
+
|
|
427
|
+
// Run id assigned by the recompile command (patchVersion 3). Engine events
|
|
428
|
+
// propagate it into the terminal payload; engine-spontaneous compiles
|
|
429
|
+
// (no pending id) write runId:null. Never persists across domain reloads —
|
|
430
|
+
// by design: the triggering request cannot survive the reload anyway.
|
|
431
|
+
static string s_PendingRunId;`,
|
|
432
|
+
],
|
|
433
|
+
[
|
|
434
|
+
` if (focus)
|
|
435
|
+
s_FocusAction();
|
|
436
|
+
|
|
437
|
+
WriteStatus("triggered", false, null);
|
|
438
|
+
|
|
439
|
+
// Trigger asset import + compilation.
|
|
440
|
+
AssetDatabase.Refresh();
|
|
441
|
+
|
|
442
|
+
if (EditorApplication.isCompiling)
|
|
443
|
+
{
|
|
444
|
+
// compilationStarted has written "compiling"; a domain reload will follow on success.
|
|
445
|
+
return new { status = "compiling", message = "Recompilation started. Poll recompile_status until completed." };
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// Nothing needed recompilation.
|
|
449
|
+
WriteStatus("up_to_date", false, null);
|
|
450
|
+
return new { status = "up_to_date", message = "No scripts needed recompilation." };`,
|
|
451
|
+
` if (focus)
|
|
452
|
+
s_FocusAction();
|
|
453
|
+
|
|
454
|
+
var runId = Guid.NewGuid().ToString("N");
|
|
455
|
+
s_PendingRunId = runId;
|
|
456
|
+
WriteStatus("triggered", runId, false, null);
|
|
457
|
+
|
|
458
|
+
// Trigger asset import + compilation.
|
|
459
|
+
AssetDatabase.Refresh();
|
|
460
|
+
|
|
461
|
+
if (EditorApplication.isCompiling)
|
|
462
|
+
{
|
|
463
|
+
// compilationStarted has written "compiling"; a domain reload will follow on success.
|
|
464
|
+
return new { status = "compiling", runId = runId, message = "Recompilation started. Poll recompile_status until completed." };
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// Nothing needed recompilation. Terminal state reached without engine events:
|
|
468
|
+
// clear the pending id so a later engine-spontaneous compile is NOT attributed to this run.
|
|
469
|
+
WriteStatus("up_to_date", runId, false, null);
|
|
470
|
+
s_PendingRunId = null;
|
|
471
|
+
return new { status = "up_to_date", runId = runId, message = "No scripts needed recompilation." };`,
|
|
472
|
+
],
|
|
473
|
+
[
|
|
474
|
+
` [CliCommand("recompile_status", "Get the status of the last recompile: idle | triggered | compiling | completed | up_to_date.", MainThreadRequired = false, Tags = new[] { "scripts/compile" })]
|
|
475
|
+
public static string RecompileStatus()
|
|
476
|
+
{
|
|
477
|
+
if (File.Exists(StatusFile))
|
|
478
|
+
return File.ReadAllText(StatusFile);
|
|
479
|
+
return "{\\"status\\":\\"idle\\"}";
|
|
480
|
+
}`,
|
|
481
|
+
` private class StatusEnvelope
|
|
482
|
+
{
|
|
483
|
+
public string runId { get; set; }
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
[CliCommand("recompile_status", "Get the status of the last recompile: idle | triggered | compiling | completed | up_to_date; optional run_id for correlated query", MainThreadRequired = false, Tags = new[] { "scripts/compile" })]
|
|
487
|
+
public static string RecompileStatus(
|
|
488
|
+
[CliArg("run_id", "Optional run id from the recompile response: return only that run's terminal payload; unknown_run otherwise (null runId = engine-spontaneous compile)")] string runId = null)
|
|
489
|
+
{
|
|
490
|
+
var requested = string.IsNullOrEmpty(runId) ? null : runId.Trim();
|
|
491
|
+
if (requested == null)
|
|
492
|
+
{
|
|
493
|
+
if (File.Exists(StatusFile))
|
|
494
|
+
return File.ReadAllText(StatusFile);
|
|
495
|
+
return "{\\"status\\":\\"idle\\"}";
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
if (File.Exists(StatusFile))
|
|
499
|
+
{
|
|
500
|
+
string recorded;
|
|
501
|
+
try
|
|
502
|
+
{
|
|
503
|
+
recorded = JsonConvert.DeserializeObject<StatusEnvelope>(File.ReadAllText(StatusFile))?.runId;
|
|
504
|
+
}
|
|
505
|
+
catch
|
|
506
|
+
{
|
|
507
|
+
recorded = null;
|
|
508
|
+
}
|
|
509
|
+
if (recorded == requested)
|
|
510
|
+
return File.ReadAllText(StatusFile);
|
|
511
|
+
return JsonConvert.SerializeObject(new
|
|
512
|
+
{
|
|
513
|
+
status = "unknown_run",
|
|
514
|
+
requestedRunId = requested,
|
|
515
|
+
message = "Recorded compile status belongs to another run (runId mismatch or engine-spontaneous compile); refusing to return it."
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
return JsonConvert.SerializeObject(new
|
|
520
|
+
{
|
|
521
|
+
status = "unknown_run",
|
|
522
|
+
requestedRunId = requested,
|
|
523
|
+
message = "No compile status record for the requested run id."
|
|
524
|
+
});
|
|
525
|
+
}`,
|
|
526
|
+
],
|
|
527
|
+
[
|
|
528
|
+
` static void OnCompilationStarted(object _)
|
|
529
|
+
{
|
|
530
|
+
s_Errors.Clear();
|
|
531
|
+
WriteStatus("compiling", false, null);
|
|
532
|
+
}`,
|
|
533
|
+
` static void OnCompilationStarted(object _)
|
|
534
|
+
{
|
|
535
|
+
s_Errors.Clear();
|
|
536
|
+
WriteStatus("compiling", s_PendingRunId, false, null);
|
|
537
|
+
}`,
|
|
538
|
+
],
|
|
539
|
+
[
|
|
540
|
+
` static void OnCompilationFinished(object _)
|
|
541
|
+
{
|
|
542
|
+
// Written before the domain reload, so it persists for pollers after the reload.
|
|
543
|
+
WriteStatus("completed", s_Errors.Count > 0, s_Errors.ToArray());
|
|
544
|
+
}`,
|
|
545
|
+
` static void OnCompilationFinished(object _)
|
|
546
|
+
{
|
|
547
|
+
// Written before the domain reload, so it persists for pollers after the reload.
|
|
548
|
+
WriteStatus("completed", s_PendingRunId, s_Errors.Count > 0, s_Errors.ToArray());
|
|
549
|
+
s_PendingRunId = null;
|
|
550
|
+
}`,
|
|
551
|
+
],
|
|
552
|
+
[
|
|
553
|
+
` static void WriteStatus(string status, bool failed, string[] errors)
|
|
554
|
+
{
|
|
555
|
+
try
|
|
556
|
+
{
|
|
557
|
+
var payload = new { status, failed, errors = errors ?? Array.Empty<string>() };
|
|
558
|
+
File.WriteAllText(StatusFile, JsonConvert.SerializeObject(payload));
|
|
559
|
+
}
|
|
560
|
+
catch (Exception ex)
|
|
561
|
+
{
|
|
562
|
+
Debug.LogError($"[Recompile] Failed to write status file: {ex.Message}");
|
|
563
|
+
}
|
|
564
|
+
}`,
|
|
565
|
+
` static void WriteStatus(string status, string runId, bool failed, string[] errors)
|
|
566
|
+
{
|
|
567
|
+
try
|
|
568
|
+
{
|
|
569
|
+
var payload = new { status, runId, failed, errors = errors ?? Array.Empty<string>() };
|
|
570
|
+
File.WriteAllText(StatusFile, JsonConvert.SerializeObject(payload));
|
|
571
|
+
}
|
|
572
|
+
catch (Exception ex)
|
|
573
|
+
{
|
|
574
|
+
Debug.LogError($"[Recompile] Failed to write status file: {ex.Message}");
|
|
575
|
+
}
|
|
576
|
+
}`,
|
|
577
|
+
],
|
|
578
|
+
];
|
|
579
|
+
export function patchRecompileCommand(bytes) {
|
|
580
|
+
return applyPatches(bytes, 'RecompileCommand.cs', 's_PendingRunId', recompileCommandPatches);
|
|
581
|
+
}
|
|
582
|
+
export const testExecutionResponsePatches = [
|
|
583
|
+
[
|
|
584
|
+
` public string StatusPath { get; set; } // For async mode`,
|
|
585
|
+
` public string StatusPath { get; set; } // For async mode
|
|
586
|
+
public string RunId { get; set; } // Async run correlation id (run_tests --async_tests; patchVersion 3)`,
|
|
587
|
+
],
|
|
588
|
+
];
|
|
589
|
+
export function patchTestExecutionResponse(bytes) {
|
|
590
|
+
return applyPatches(bytes, 'TestExecutionResponse.cs', 'RunId { get; set; }', testExecutionResponsePatches);
|
|
591
|
+
}
|
package/dist/transform.js
CHANGED
|
@@ -3,6 +3,7 @@ import { dirname, join, relative, sep } from 'node:path';
|
|
|
3
3
|
import { CliError } from './errors.js';
|
|
4
4
|
import { sha256Buffer, compareTree } from './integrity.js';
|
|
5
5
|
import { patchConsoleCommands } from './consolePatch.js';
|
|
6
|
+
import { patchPipelineTestRunner, patchRecompileCommand, patchTestCommands, patchTestExecutionResponse, } from './runIdPatch.js';
|
|
6
7
|
/** Files/dirs present upstream that must NOT ship in the adapted package. */
|
|
7
8
|
const REMOVE_EXACT = new Set([
|
|
8
9
|
'.attestation.p7m',
|
|
@@ -143,6 +144,18 @@ export async function transformPackage(input) {
|
|
|
143
144
|
else if (rel === 'Editor/Commands/Observability/ConsoleCommands.cs') {
|
|
144
145
|
out = patchConsoleCommands(bytes);
|
|
145
146
|
}
|
|
147
|
+
else if (rel === 'Editor/Commands/TestCommands.cs') {
|
|
148
|
+
out = patchTestCommands(bytes);
|
|
149
|
+
}
|
|
150
|
+
else if (rel === 'Editor/Testing/PipelineTestRunner.cs') {
|
|
151
|
+
out = patchPipelineTestRunner(bytes);
|
|
152
|
+
}
|
|
153
|
+
else if (rel === 'Editor/Commands/RecompileCommand.cs') {
|
|
154
|
+
out = patchRecompileCommand(bytes);
|
|
155
|
+
}
|
|
156
|
+
else if (rel === 'Runtime/Models/TestExecutionResponse.cs') {
|
|
157
|
+
out = patchTestExecutionResponse(bytes);
|
|
158
|
+
}
|
|
146
159
|
else if (DLL_META_NAMES.includes(rel.split('/').pop())) {
|
|
147
160
|
const { guid } = metaBody(bytes);
|
|
148
161
|
out = Buffer.from(`fileFormatVersion: 2\nguid: ${guid}\n${dllImporterBody}`, 'utf8');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevlns/u-cli-mod",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "u-cli-mod: pin exact Unity Editor version routes and install the adapted com.unity.pipeline package for Unity 2022 (Windows-first). Downloads Unity assets at runtime into the user cache; the package itself contains no Unity binaries or package source. Not an official Unity project.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"expectedTree": "expected-tree/2022.3.59f1c1.json",
|
|
22
22
|
"templates": "2022.3.59f1c1",
|
|
23
23
|
"targetUnityVersion": "2022.3",
|
|
24
|
-
"patchVersion":
|
|
24
|
+
"patchVersion": 3
|
|
25
25
|
},
|
|
26
26
|
"status": "unofficial-unity-2022-port",
|
|
27
27
|
"verifiedBy": "local integration run, 2022.3.62f3c1 (1623fc0bbb97); patchVersion 2 read_console + reload/restart/dual-project E2E re-verified on 2022.3.59f1c1 (6f0f5d6fe989)"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"expectedTree": "expected-tree/2022.3.62f3c1.json",
|
|
22
22
|
"templates": "2022.3.62f3c1",
|
|
23
23
|
"targetUnityVersion": "2022.3",
|
|
24
|
-
"patchVersion":
|
|
24
|
+
"patchVersion": 3
|
|
25
25
|
},
|
|
26
26
|
"status": "unofficial-unity-2022-port",
|
|
27
27
|
"verifiedBy": "patchVersion 2 read_console + compile/reload/restart/dual-project E2E, 2022.3.62f3c1 (1623fc0bbb97)"
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"Editor/Commands/ProjectSettings/TagsLayersCommands.cs.meta": "eef560a6e622042304ca873b404d79f68ea551f7cab491ec698016f8d8a51665",
|
|
176
176
|
"Editor/Commands/ProjectSettings/TimeSettingsCommands.cs": "6f68946f5d5b346ce2ef9797c73315d6cd0cf324b656c3e68ff805ec10d5e15f",
|
|
177
177
|
"Editor/Commands/ProjectSettings/TimeSettingsCommands.cs.meta": "b06b10750d6947b84f1b466721f5d8462b0539b2d387bc866748d409c207fbdf",
|
|
178
|
-
"Editor/Commands/RecompileCommand.cs": "
|
|
178
|
+
"Editor/Commands/RecompileCommand.cs": "3a87f3bf3427cc92a11e6f80bbcf141573464b59883dca847fa0497c54d36295",
|
|
179
179
|
"Editor/Commands/RecompileCommand.cs.meta": "32ab288b5f782fc815174eef282dcdde5f12293bb3cf2af28f61fa5001ba13af",
|
|
180
180
|
"Editor/Commands/Scenes.meta": "ced3ecd39d94538d3eb060f4250c152ffbec3ebc931245dd5a8ae9042f12e52b",
|
|
181
181
|
"Editor/Commands/Scenes/SceneCommands.cs": "3f0abceb468d6f2f97c914a341d00e1bf3154bd05c341b057c61b191b2c503d6",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"Editor/Commands/Scripts/SerializedFieldCommands.cs.meta": "cbaa1805f36da34fd6cf338c2858fcfa5372d2a812c58b6d3965df4683de7aac",
|
|
196
196
|
"Editor/Commands/Scripts/SerializedPropertyConverter.cs": "b6858675080c0ec0f43c9a6bc3e25d8cedcaaf4cfbb77bf3f082f0a492601644",
|
|
197
197
|
"Editor/Commands/Scripts/SerializedPropertyConverter.cs.meta": "e18983336196c592427f2eb4f028efd00e4d728fda87a77646daa9409937bdad",
|
|
198
|
-
"Editor/Commands/TestCommands.cs": "
|
|
198
|
+
"Editor/Commands/TestCommands.cs": "650223ca1e2781a4de635029c3fd9c1179f2f637fc2faeccf5819e503ffa99d5",
|
|
199
199
|
"Editor/Commands/TestCommands.cs.meta": "5e32a4c4b68289441ef042a28f07c55d038a3b5a414d6711865e06c1f435cf26",
|
|
200
200
|
"Editor/Console.meta": "1ee017d638ba81c3092743c5fd8dea6d483fe83dd94438dad5c4aaa4fe35739e",
|
|
201
201
|
"Editor/Console/EditorConsoleCaptureBootstrap.cs": "ae90a080281ae27f687ee52feb346d4b575b7eccfbdc80c7e045b93b8c245250",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"Editor/PipelineTransactionLog.cs": "4ed4984852f0310e53345152e1a43d7c8bd720c77ebba96c72c2f29e062bf999",
|
|
214
214
|
"Editor/PipelineTransactionLog.cs.meta": "180ce0fcb4df11c241702362f01a0033d71d52312aeff267d8db2601f0667ef6",
|
|
215
215
|
"Editor/Testing.meta": "d9c0a5fc52394bcbbca86b6111a8ec350a107cc1782a6a63d87774bb0f4874db",
|
|
216
|
-
"Editor/Testing/PipelineTestRunner.cs": "
|
|
216
|
+
"Editor/Testing/PipelineTestRunner.cs": "388b7004da8cb7b0799ab5cb316a6230acc176450a9f130e600caac3213d7f4d",
|
|
217
217
|
"Editor/Testing/PipelineTestRunner.cs.meta": "6614faa20901d4aa609af03d16a051e8f620835713ac9b5c7adb5c3097caa72d",
|
|
218
218
|
"Editor/Testing/TestResultCollector.cs": "992980f40155b7a2689445f2198a7a458d802844ae64f86e29ee9e7d7999db83",
|
|
219
219
|
"Editor/Testing/TestResultCollector.cs.meta": "bdf92a1aad6bf167474a1c37aac2dc769b6aee5029d6545b6732745400de122b",
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"Runtime/Models/RuntimeInstanceDescriptor.cs.meta": "9e9081ccf9c95d2da60d50b68a3d412c566a2b013a879613ab5b808cc52c20d4",
|
|
331
331
|
"Runtime/Models/StatusResponse.cs": "7fa44f6c2d0bd4a224f41e9d106d31b8c9bd0bb4fb6b255d972d6684605c0153",
|
|
332
332
|
"Runtime/Models/StatusResponse.cs.meta": "f4c3ec0119f65fa2ec1d4c1371f703d5ef460a43225830c36ca284a4183a988b",
|
|
333
|
-
"Runtime/Models/TestExecutionResponse.cs": "
|
|
333
|
+
"Runtime/Models/TestExecutionResponse.cs": "f67e17ce557d3f2a754b0e3500732fb9b6631bd2e38d9c35184ed377ae5ce96b",
|
|
334
334
|
"Runtime/Models/TestExecutionResponse.cs.meta": "06e885e3dc0c564b1d697f5276b992044916c87067ad286c903ec64746906d77",
|
|
335
335
|
"Runtime/Models/TestResult.cs": "c8f2fb061d09901653f4ecd4bfec41decfb6d2968004f9f18959259fdb5b1056",
|
|
336
336
|
"Runtime/Models/TestResult.cs.meta": "f9ab286cd237565a89ece638923c947cf9cb0f1cc9447b9e8a64da1f8a733ae8",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"Editor/Commands/ProjectSettings/TagsLayersCommands.cs.meta": "eef560a6e622042304ca873b404d79f68ea551f7cab491ec698016f8d8a51665",
|
|
176
176
|
"Editor/Commands/ProjectSettings/TimeSettingsCommands.cs": "6f68946f5d5b346ce2ef9797c73315d6cd0cf324b656c3e68ff805ec10d5e15f",
|
|
177
177
|
"Editor/Commands/ProjectSettings/TimeSettingsCommands.cs.meta": "b06b10750d6947b84f1b466721f5d8462b0539b2d387bc866748d409c207fbdf",
|
|
178
|
-
"Editor/Commands/RecompileCommand.cs": "
|
|
178
|
+
"Editor/Commands/RecompileCommand.cs": "3a87f3bf3427cc92a11e6f80bbcf141573464b59883dca847fa0497c54d36295",
|
|
179
179
|
"Editor/Commands/RecompileCommand.cs.meta": "32ab288b5f782fc815174eef282dcdde5f12293bb3cf2af28f61fa5001ba13af",
|
|
180
180
|
"Editor/Commands/Scenes.meta": "ced3ecd39d94538d3eb060f4250c152ffbec3ebc931245dd5a8ae9042f12e52b",
|
|
181
181
|
"Editor/Commands/Scenes/SceneCommands.cs": "3f0abceb468d6f2f97c914a341d00e1bf3154bd05c341b057c61b191b2c503d6",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"Editor/Commands/Scripts/SerializedFieldCommands.cs.meta": "cbaa1805f36da34fd6cf338c2858fcfa5372d2a812c58b6d3965df4683de7aac",
|
|
196
196
|
"Editor/Commands/Scripts/SerializedPropertyConverter.cs": "b6858675080c0ec0f43c9a6bc3e25d8cedcaaf4cfbb77bf3f082f0a492601644",
|
|
197
197
|
"Editor/Commands/Scripts/SerializedPropertyConverter.cs.meta": "e18983336196c592427f2eb4f028efd00e4d728fda87a77646daa9409937bdad",
|
|
198
|
-
"Editor/Commands/TestCommands.cs": "
|
|
198
|
+
"Editor/Commands/TestCommands.cs": "650223ca1e2781a4de635029c3fd9c1179f2f637fc2faeccf5819e503ffa99d5",
|
|
199
199
|
"Editor/Commands/TestCommands.cs.meta": "5e32a4c4b68289441ef042a28f07c55d038a3b5a414d6711865e06c1f435cf26",
|
|
200
200
|
"Editor/Console.meta": "1ee017d638ba81c3092743c5fd8dea6d483fe83dd94438dad5c4aaa4fe35739e",
|
|
201
201
|
"Editor/Console/EditorConsoleCaptureBootstrap.cs": "ae90a080281ae27f687ee52feb346d4b575b7eccfbdc80c7e045b93b8c245250",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"Editor/PipelineTransactionLog.cs": "4ed4984852f0310e53345152e1a43d7c8bd720c77ebba96c72c2f29e062bf999",
|
|
214
214
|
"Editor/PipelineTransactionLog.cs.meta": "180ce0fcb4df11c241702362f01a0033d71d52312aeff267d8db2601f0667ef6",
|
|
215
215
|
"Editor/Testing.meta": "d9c0a5fc52394bcbbca86b6111a8ec350a107cc1782a6a63d87774bb0f4874db",
|
|
216
|
-
"Editor/Testing/PipelineTestRunner.cs": "
|
|
216
|
+
"Editor/Testing/PipelineTestRunner.cs": "388b7004da8cb7b0799ab5cb316a6230acc176450a9f130e600caac3213d7f4d",
|
|
217
217
|
"Editor/Testing/PipelineTestRunner.cs.meta": "6614faa20901d4aa609af03d16a051e8f620835713ac9b5c7adb5c3097caa72d",
|
|
218
218
|
"Editor/Testing/TestResultCollector.cs": "992980f40155b7a2689445f2198a7a458d802844ae64f86e29ee9e7d7999db83",
|
|
219
219
|
"Editor/Testing/TestResultCollector.cs.meta": "bdf92a1aad6bf167474a1c37aac2dc769b6aee5029d6545b6732745400de122b",
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"Runtime/Models/RuntimeInstanceDescriptor.cs.meta": "9e9081ccf9c95d2da60d50b68a3d412c566a2b013a879613ab5b808cc52c20d4",
|
|
331
331
|
"Runtime/Models/StatusResponse.cs": "7fa44f6c2d0bd4a224f41e9d106d31b8c9bd0bb4fb6b255d972d6684605c0153",
|
|
332
332
|
"Runtime/Models/StatusResponse.cs.meta": "f4c3ec0119f65fa2ec1d4c1371f703d5ef460a43225830c36ca284a4183a988b",
|
|
333
|
-
"Runtime/Models/TestExecutionResponse.cs": "
|
|
333
|
+
"Runtime/Models/TestExecutionResponse.cs": "f67e17ce557d3f2a754b0e3500732fb9b6631bd2e38d9c35184ed377ae5ce96b",
|
|
334
334
|
"Runtime/Models/TestExecutionResponse.cs.meta": "06e885e3dc0c564b1d697f5276b992044916c87067ad286c903ec64746906d77",
|
|
335
335
|
"Runtime/Models/TestResult.cs": "c8f2fb061d09901653f4ecd4bfec41decfb6d2968004f9f18959259fdb5b1056",
|
|
336
336
|
"Runtime/Models/TestResult.cs.meta": "f9ab286cd237565a89ece638923c947cf9cb0f1cc9447b9e8a64da1f8a733ae8",
|
package/v-cli.plugin.json
CHANGED
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
"get_serialized_fields": "Read serialized fields of a component/asset. Returns each top-level field's name, type and value (object references are returned as re-usable handles). Pass 'field' to read a single SerializedProperty path.",
|
|
350
350
|
"hotreload_status": "Show current hot reload registry status and statistics",
|
|
351
351
|
"recompile": "Force a script recompile (works while unfocused/minimized). Poll recompile_status for completion.",
|
|
352
|
-
"recompile_status": "Get the status of the last recompile: idle | triggered | compiling | completed | up_to_date.",
|
|
352
|
+
"recompile_status": "Get the status of the last recompile: idle | triggered | compiling | completed | up_to_date (optional run_id for correlated query).",
|
|
353
353
|
"reload_file": "Compile and apply in-place [HotReload] edits from a source file",
|
|
354
354
|
"reload_file_override": "Compile and apply hot reload file changes immediately",
|
|
355
355
|
"set_serialized_field": "Set a serialized field on a component/asset. Supports primitives, enums, Vector/Color/Rect/Bounds, object references (value = an ObjectRef: asset by guid/fileId/path or scene object by instanceId/hierarchyPath), and array elements via 'name.Array.data[i]' (or 'name.Array.size' to resize)."
|
|
@@ -401,10 +401,10 @@
|
|
|
401
401
|
{
|
|
402
402
|
"group": "测试",
|
|
403
403
|
"tools": {
|
|
404
|
-
"cancel_tests": "Cancel running test execution",
|
|
404
|
+
"cancel_tests": "Cancel running test execution (optional run_id for directed cancel; mismatch = no side effects)",
|
|
405
405
|
"list_tests": "List all available tests (EditMode and/or PlayMode) without running them",
|
|
406
406
|
"run_tests": "Execute Unity tests with filtering options",
|
|
407
|
-
"test_status": "Get status of running async test execution"
|
|
407
|
+
"test_status": "Get status of running async test execution (optional run_id for correlated query; unknown_run otherwise)"
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
{
|