unity-mcp-cli 0.70.0 → 0.71.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/README.md +14 -1
- package/dist/commands/open.d.ts +13 -0
- package/dist/commands/open.js +55 -0
- package/dist/commands/open.js.map +1 -1
- package/dist/lib/open.d.ts +48 -1
- package/dist/lib/open.js +158 -0
- package/dist/lib/open.js.map +1 -1
- package/dist/lib/types.d.ts +54 -2
- package/dist/utils/launch-error-dismiss.d.ts +159 -0
- package/dist/utils/launch-error-dismiss.js +440 -0
- package/dist/utils/launch-error-dismiss.js.map +1 -0
- package/dist/utils/unity-editor.js +33 -6
- package/dist/utils/unity-editor.js.map +1 -1
- package/dist/utils/unity-hub.js +20 -4
- package/dist/utils/unity-hub.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -255,8 +255,21 @@ cd ./MyGame && unity-mcp-cli open
|
|
|
255
255
|
| `--tools <names>` | `UNITY_MCP_TOOLS` | No | Comma-separated list of tools to enable |
|
|
256
256
|
| `--transport <method>` | `UNITY_MCP_TRANSPORT` | No | Transport method: `streamableHttp` or `stdio` |
|
|
257
257
|
| `--start-server <value>` | `UNITY_MCP_START_SERVER` | No | Set to `true` or `false` to control MCP server auto-start |
|
|
258
|
+
| `--no-auto-dismiss-launch-errors` | — | No | Disable auto-dismissal of the Unity Editor "compile errors at launch" dialog (default: enabled) |
|
|
259
|
+
| `--launch-dismiss-timeout-ms <ms>` | — | No | Overall timeout (milliseconds) for the launch-errors auto-dismiss polling loop (default: `30000`) |
|
|
260
|
+
| `--launch-dismiss-poll-interval-ms <ms>` | — | No | Polling tick interval (milliseconds) for the launch-errors auto-dismiss loop (default: `1500`) |
|
|
258
261
|
|
|
259
|
-
The editor process is spawned in detached mode — the
|
|
262
|
+
The editor process is spawned in detached mode. By default, after spawning the editor, `open` polls for Unity's "compile errors at launch" dialog (`"Enter Safe Mode?"` on Unity 2020.2+, `"Hold On" / "Compiler Errors"` on older releases) and clicks `Ignore` so the editor finishes initialising — without this, any in-Editor automation that needs to run after a state where Unity itself can't compile (e.g. the NuGet dependency resolver) cannot self-heal. The dialog is surfaced after Unity has booted, connected to Package Manager, and started compiling — empirically ~6s on a fast machine and longer on a slow one — so the polling loop has a grace window after which it exits early if no dialog has been seen. The grace window has to cover Unity's full startup phase or the loop bails out before the dialog ever appears (issue #737); it never runs the full `--launch-dismiss-timeout-ms` in the no-dialog case. If the dialog is observed (and successfully dismissed), polling continues until the overall timeout so a re-appearing dialog (resolver fixes one error → dialog re-surfaces with the next) is dismissed again. Library-mode callers can supply an `AbortSignal` (`launchDismissAbortSignal` on `OpenProjectOptions`) to abort the loop the instant their own readiness signal fires.
|
|
263
|
+
|
|
264
|
+
### Auto-dismiss platform requirements
|
|
265
|
+
|
|
266
|
+
| Platform | Requirement | Notes |
|
|
267
|
+
|---|---|---|
|
|
268
|
+
| **Windows** | Built-in (Win32 API) | Uses `EnumWindows` / `EnumChildWindows` / `SendMessageW(BM_CLICK)` driven from PowerShell. No extra setup required. |
|
|
269
|
+
| **macOS** | **Accessibility permission** must be granted to the terminal (or `unity-mcp-cli` binary). System Settings → Privacy & Security → Accessibility. | Implemented via AppleScript / `osascript`. Without this permission, `osascript` reports an error every poll tick and the dialog cannot be dismissed. |
|
|
270
|
+
| **Linux/X11** | `xdotool` on `PATH` (e.g. `sudo apt-get install xdotool`). | Wayland is **not** supported in the first cut — track upstream issues for Wayland support. |
|
|
271
|
+
|
|
272
|
+
To opt out entirely, pass `--no-auto-dismiss-launch-errors`.
|
|
260
273
|
|
|
261
274
|
**Example — open with MCP connection:**
|
|
262
275
|
|
package/dist/commands/open.d.ts
CHANGED
|
@@ -16,4 +16,17 @@ export interface ResolveProjectPathResult {
|
|
|
16
16
|
export declare function resolveOpenProjectPath(positionalPath: string | undefined, optionPath: string | undefined, cwd: string): ResolveProjectPathResult;
|
|
17
17
|
/** Re-export for backward compatibility with existing tests. */
|
|
18
18
|
export declare const isUnityProjectDir: typeof libIsUnityProjectDir;
|
|
19
|
+
/**
|
|
20
|
+
* Parse a `--xxx <ms>` style commander option as a positive integer.
|
|
21
|
+
* Commander stores the raw string (including the literal default
|
|
22
|
+
* supplied to `.option()`), so a parse-and-validate step is required
|
|
23
|
+
* before the value can flow into the library. Exits with code 1 on
|
|
24
|
+
* a non-numeric / non-positive value — matches the CLI's existing
|
|
25
|
+
* error-handling pattern for malformed flag values (`--auth`,
|
|
26
|
+
* `--transport`, `--start-server`).
|
|
27
|
+
*
|
|
28
|
+
* Exported for unit tests; the CLI wrapper is the only production
|
|
29
|
+
* caller.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parsePositiveIntFlag(raw: string | undefined, flagName: string, fallback: number): number;
|
|
19
32
|
export declare const openCommand: Command;
|
package/dist/commands/open.js
CHANGED
|
@@ -14,6 +14,38 @@ export function resolveOpenProjectPath(positionalPath, optionPath, cwd) {
|
|
|
14
14
|
}
|
|
15
15
|
/** Re-export for backward compatibility with existing tests. */
|
|
16
16
|
export const isUnityProjectDir = libIsUnityProjectDir;
|
|
17
|
+
/**
|
|
18
|
+
* Parse a `--xxx <ms>` style commander option as a positive integer.
|
|
19
|
+
* Commander stores the raw string (including the literal default
|
|
20
|
+
* supplied to `.option()`), so a parse-and-validate step is required
|
|
21
|
+
* before the value can flow into the library. Exits with code 1 on
|
|
22
|
+
* a non-numeric / non-positive value — matches the CLI's existing
|
|
23
|
+
* error-handling pattern for malformed flag values (`--auth`,
|
|
24
|
+
* `--transport`, `--start-server`).
|
|
25
|
+
*
|
|
26
|
+
* Exported for unit tests; the CLI wrapper is the only production
|
|
27
|
+
* caller.
|
|
28
|
+
*/
|
|
29
|
+
export function parsePositiveIntFlag(raw, flagName, fallback) {
|
|
30
|
+
if (raw === undefined)
|
|
31
|
+
return fallback;
|
|
32
|
+
const trimmed = String(raw).trim();
|
|
33
|
+
if (trimmed === '')
|
|
34
|
+
return fallback;
|
|
35
|
+
// Reject scientific notation, fractions, and explicit signs — the
|
|
36
|
+
// ms value MUST be a positive whole number for the polling loop's
|
|
37
|
+
// bookkeeping to be sane.
|
|
38
|
+
if (!/^\d+$/.test(trimmed)) {
|
|
39
|
+
ui.error(`${flagName} must be a positive integer (got: "${raw}")`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
const parsed = parseInt(trimmed, 10);
|
|
43
|
+
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
44
|
+
ui.error(`${flagName} must be a positive integer (got: "${raw}")`);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
return parsed;
|
|
48
|
+
}
|
|
17
49
|
/**
|
|
18
50
|
* Print actionable help when a required Unity Editor version is not found.
|
|
19
51
|
* Lists installed editors and suggests install or override commands. Lives
|
|
@@ -63,6 +95,9 @@ export const openCommand = new Command('open')
|
|
|
63
95
|
.option('--keep-connected', 'Force keep connected (sets UNITY_MCP_KEEP_CONNECTED=true)')
|
|
64
96
|
.option('--transport <method>', 'Transport method: streamableHttp or stdio (sets UNITY_MCP_TRANSPORT)')
|
|
65
97
|
.option('--start-server <value>', 'Set to true/false to control server auto-start (sets UNITY_MCP_START_SERVER)', undefined)
|
|
98
|
+
.option('--no-auto-dismiss-launch-errors', 'Disable auto-dismissal of the Unity Editor "compile errors at launch" dialog (default: enabled). On macOS, requires Accessibility permission for the terminal / unity-mcp-cli binary. On Linux/X11, requires `xdotool` on PATH (Wayland not supported).')
|
|
99
|
+
.option('--launch-dismiss-timeout-ms <ms>', 'Overall timeout (milliseconds) for the launch-errors auto-dismiss polling loop (default: 30000)', '30000')
|
|
100
|
+
.option('--launch-dismiss-poll-interval-ms <ms>', 'Polling tick interval (milliseconds) for the launch-errors auto-dismiss loop (default: 1500)', '1500')
|
|
66
101
|
.action(async (positionalPath, options) => {
|
|
67
102
|
// Resolve the path the same way the library does, but also
|
|
68
103
|
// validate the existence + Unity-project shape up front so we
|
|
@@ -111,6 +146,16 @@ export const openCommand = new Command('open')
|
|
|
111
146
|
}
|
|
112
147
|
startServerBool = val === 'true';
|
|
113
148
|
}
|
|
149
|
+
// --launch-dismiss-timeout-ms / --launch-dismiss-poll-interval-ms
|
|
150
|
+
// are commander string options with numeric defaults. Parse and
|
|
151
|
+
// validate here so the failure mode is a clear CLI error rather
|
|
152
|
+
// than a silent NaN that disables the polling loop.
|
|
153
|
+
const launchDismissTimeoutMs = parsePositiveIntFlag(options.launchDismissTimeoutMs, '--launch-dismiss-timeout-ms', 30000);
|
|
154
|
+
const launchDismissPollIntervalMs = parsePositiveIntFlag(options.launchDismissPollIntervalMs, '--launch-dismiss-poll-interval-ms', 1500);
|
|
155
|
+
// Commander's `--no-auto-dismiss-launch-errors` produces
|
|
156
|
+
// `autoDismissLaunchErrors: false`; the absence of the flag
|
|
157
|
+
// produces `undefined` (which `openProject` treats as the default
|
|
158
|
+
// `true`). No additional parsing needed.
|
|
114
159
|
// Pre-flight already-running check so we don't flash the
|
|
115
160
|
// "Locating Unity Editor..." spinner when Unity is already open
|
|
116
161
|
// for this project. The lib does its own check too (single
|
|
@@ -132,6 +177,9 @@ export const openCommand = new Command('open')
|
|
|
132
177
|
keepConnected: options.keepConnected,
|
|
133
178
|
transport: options.transport,
|
|
134
179
|
startServer: startServerBool,
|
|
180
|
+
autoDismissLaunchErrors: options.autoDismissLaunchErrors !== false,
|
|
181
|
+
launchDismissTimeoutMs,
|
|
182
|
+
launchDismissPollIntervalMs,
|
|
135
183
|
onProgress: (event) => {
|
|
136
184
|
switch (event.phase) {
|
|
137
185
|
case 'detecting-editor-version': {
|
|
@@ -184,6 +232,13 @@ export const openCommand = new Command('open')
|
|
|
184
232
|
ui.success(`Launched Unity Editor (PID: ${event.pid ?? 'unknown'})`);
|
|
185
233
|
break;
|
|
186
234
|
}
|
|
235
|
+
case 'launch-errors-dismissed': {
|
|
236
|
+
// Single info-level log line on dismissal — exact format
|
|
237
|
+
// is part of the issue's acceptance contract. Keep in
|
|
238
|
+
// sync with `launch-error-dismiss.ts` if changed.
|
|
239
|
+
ui.info(`[open] dismissed Unity launch-errors dialog (button=${event.button}, platform=${event.platform})`);
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
187
242
|
default:
|
|
188
243
|
break;
|
|
189
244
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open.js","sourceRoot":"","sources":["../../src/commands/open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,WAAW,EACX,kBAAkB,IAAI,qBAAqB,EAC3C,iBAAiB,IAAI,oBAAoB,GAC1C,MAAM,gBAAgB,CAAC;AAiBxB,MAAM,UAAU,sBAAsB,CACpC,cAAkC,EAClC,UAA8B,EAC9B,GAAW;IAEX,qEAAqE;IACrE,oEAAoE;IACpE,kDAAkD;IAClD,MAAM,QAAQ,GAAG,cAAc,IAAI,UAAU,CAAC;IAC9C,OAAO,qBAAqB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD;;;;;;GAMG;AACH,SAAS,uBAAuB,CAAC,gBAAoC,EAAE,WAAmB;IACxF,IAAI,gBAAgB,EAAE,CAAC;QACrB,EAAE,CAAC,KAAK,CAAC,gBAAgB,gBAAgB,oBAAoB,CAAC,CAAC;IACjE,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACrC,CAAC;IAED,EAAE,CAAC,OAAO,CAAC,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,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,6DAA6D;IAC7D,8DAA8D;IAC9D,oBAAoB;IACpB,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;QAC1B,EAAE,CAAC,OAAO,CAAC,oDAAoD,MAAM,CAAC,SAAS,IAAI,SAAS,GAAG,CAAC,CAAC;QACjG,EAAE,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;QACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,6DAA6D;IAC7D,0CAA0C;IAC1C,OAAO,CAAC,0BAA0B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC,CAAC"}
|
package/dist/lib/open.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { tryDismissLaunchErrorsDialog, type DismissPlatform } from '../utils/launch-error-dismiss.js';
|
|
2
|
+
import type { OpenEnvInputs, OpenProjectOptions, OpenProjectResult, ProgressCallback } from './types.js';
|
|
2
3
|
/**
|
|
3
4
|
* Resolve the project path from an explicit option or fall back to
|
|
4
5
|
* the supplied cwd. Always returns an absolute, resolved path plus a
|
|
@@ -48,3 +49,49 @@ export declare function buildOpenEnv(options: OpenEnvInputs): Record<string, str
|
|
|
48
49
|
* to access `errorMessage` / `error`.
|
|
49
50
|
*/
|
|
50
51
|
export declare function openProject(options: OpenProjectOptions): Promise<OpenProjectResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Options for `pollAndDismissLaunchErrors`. The `_` prefix marks the
|
|
54
|
+
* test-only export; production code never imports this directly —
|
|
55
|
+
* `openProject` is the only caller.
|
|
56
|
+
*/
|
|
57
|
+
export interface _PollAndDismissOptionsForTests {
|
|
58
|
+
timeoutMs: number;
|
|
59
|
+
intervalMs: number;
|
|
60
|
+
onProgress: ProgressCallback | undefined;
|
|
61
|
+
warnings: string[];
|
|
62
|
+
platform?: DismissPlatform;
|
|
63
|
+
probe?: typeof tryDismissLaunchErrorsDialog;
|
|
64
|
+
abortSignal?: AbortSignal;
|
|
65
|
+
/**
|
|
66
|
+
* Grace window (ms) after polling starts: if no dialog has been
|
|
67
|
+
* observed within this window, exit early. Test override only —
|
|
68
|
+
* production callers do not configure this.
|
|
69
|
+
*
|
|
70
|
+
* @see PollAndDismissOptions.noDialogGraceMs for the production
|
|
71
|
+
* default and rationale.
|
|
72
|
+
*/
|
|
73
|
+
noDialogGraceMs?: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Poll the OS desktop for the Unity "compile errors at launch"
|
|
77
|
+
* dialog and click `Ignore` (or the platform-equivalent) every time
|
|
78
|
+
* the probe reports it as found. Returns once the abort signal has
|
|
79
|
+
* fired, the no-dialog grace window has elapsed, the overall timeout
|
|
80
|
+
* has elapsed, or a permanent platform error has been observed.
|
|
81
|
+
*
|
|
82
|
+
* Re-entrant dismissals are supported: when the dialog re-appears
|
|
83
|
+
* after a successful click (the resolver-fix → dialog-reappears
|
|
84
|
+
* cycle described in the issue), each subsequent dismissal emits its
|
|
85
|
+
* own `launch-errors-dismissed` progress event so the user sees the
|
|
86
|
+
* recurrence in the log.
|
|
87
|
+
*
|
|
88
|
+
* Library-safe: never throws. Transient platform errors (e.g. a
|
|
89
|
+
* missing `xdotool` on Linux, or a momentary syscall failure on
|
|
90
|
+
* Windows) are recorded once as a warning on the supplied
|
|
91
|
+
* `warnings` array; subsequent identical errors are silently
|
|
92
|
+
* suppressed so the warnings array does not balloon over the polling
|
|
93
|
+
* window. Permanent errors (e.g. xdotool truly absent) bail out of
|
|
94
|
+
* the loop after the first occurrence so the helper does not spawn
|
|
95
|
+
* 60 doomed tool invocations on a 30s budget.
|
|
96
|
+
*/
|
|
97
|
+
export declare function _pollAndDismissLaunchErrorsForTests(opts: _PollAndDismissOptionsForTests): Promise<void>;
|
package/dist/lib/open.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
+
import { platform as nodePlatform } from 'os';
|
|
3
4
|
import { findEditorPath, getProjectEditorVersion, launchEditor, } from '../utils/unity-editor.js';
|
|
4
5
|
import { findUnityProcess } from '../utils/unity-process.js';
|
|
5
6
|
import { readConfig, isCloudMode, writeConfig } from '../utils/config.js';
|
|
7
|
+
import { tryDismissLaunchErrorsDialog, LINUX_XDOTOOL_MISSING_PREFIX, UNSUPPORTED_PLATFORM_PREFIX, } from '../utils/launch-error-dismiss.js';
|
|
6
8
|
import { emitProgress } from './progress.js';
|
|
7
9
|
/**
|
|
8
10
|
* Resolve the project path from an explicit option or fall back to
|
|
@@ -247,6 +249,26 @@ export async function openProject(options) {
|
|
|
247
249
|
// child is already detached + unref'd, so this does NOT block
|
|
248
250
|
// process exit.
|
|
249
251
|
const pid = await waitForSpawn(child);
|
|
252
|
+
// Auto-dismiss the Unity "compile errors at launch" dialog if it
|
|
253
|
+
// appears. The polling loop runs synchronously inside this call
|
|
254
|
+
// (so the CLI's event loop stays alive until it completes) but
|
|
255
|
+
// never throws — a transient platform error is logged via the
|
|
256
|
+
// progress callback as a warning and the loop continues until
|
|
257
|
+
// either the dialog is dismissed and stays dismissed, the abort
|
|
258
|
+
// signal fires, the no-dialog grace window elapses, or the
|
|
259
|
+
// overall timeout elapses.
|
|
260
|
+
//
|
|
261
|
+
// When `autoDismissLaunchErrors === false` the loop is skipped
|
|
262
|
+
// entirely; behaviour is identical to the pre-feature baseline.
|
|
263
|
+
if (options.autoDismissLaunchErrors !== false) {
|
|
264
|
+
await pollAndDismissLaunchErrors({
|
|
265
|
+
timeoutMs: options.launchDismissTimeoutMs ?? 30000,
|
|
266
|
+
intervalMs: options.launchDismissPollIntervalMs ?? 1500,
|
|
267
|
+
onProgress: options.onProgress,
|
|
268
|
+
warnings,
|
|
269
|
+
abortSignal: options.launchDismissAbortSignal,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
250
272
|
emitProgress(options.onProgress, {
|
|
251
273
|
phase: 'done',
|
|
252
274
|
message: 'Editor launched.',
|
|
@@ -275,6 +297,142 @@ export async function openProject(options) {
|
|
|
275
297
|
};
|
|
276
298
|
}
|
|
277
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* Poll the OS desktop for the Unity "compile errors at launch"
|
|
302
|
+
* dialog and click `Ignore` (or the platform-equivalent) every time
|
|
303
|
+
* the probe reports it as found. Returns once the abort signal has
|
|
304
|
+
* fired, the no-dialog grace window has elapsed, the overall timeout
|
|
305
|
+
* has elapsed, or a permanent platform error has been observed.
|
|
306
|
+
*
|
|
307
|
+
* Re-entrant dismissals are supported: when the dialog re-appears
|
|
308
|
+
* after a successful click (the resolver-fix → dialog-reappears
|
|
309
|
+
* cycle described in the issue), each subsequent dismissal emits its
|
|
310
|
+
* own `launch-errors-dismissed` progress event so the user sees the
|
|
311
|
+
* recurrence in the log.
|
|
312
|
+
*
|
|
313
|
+
* Library-safe: never throws. Transient platform errors (e.g. a
|
|
314
|
+
* missing `xdotool` on Linux, or a momentary syscall failure on
|
|
315
|
+
* Windows) are recorded once as a warning on the supplied
|
|
316
|
+
* `warnings` array; subsequent identical errors are silently
|
|
317
|
+
* suppressed so the warnings array does not balloon over the polling
|
|
318
|
+
* window. Permanent errors (e.g. xdotool truly absent) bail out of
|
|
319
|
+
* the loop after the first occurrence so the helper does not spawn
|
|
320
|
+
* 60 doomed tool invocations on a 30s budget.
|
|
321
|
+
*/
|
|
322
|
+
export async function _pollAndDismissLaunchErrorsForTests(opts) {
|
|
323
|
+
return pollAndDismissLaunchErrors(opts);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Substring markers that identify a `kind: 'error'` outcome as
|
|
327
|
+
* permanent for this run. When seen, the polling loop bails out
|
|
328
|
+
* after recording the warning once; ticking again would just respawn
|
|
329
|
+
* the same doomed tool. Keep this list narrow — only conditions that
|
|
330
|
+
* cannot self-heal mid-launch belong here.
|
|
331
|
+
*
|
|
332
|
+
* The entries reference the producer-side constants in
|
|
333
|
+
* `launch-error-dismiss.ts` so a re-word at the producer site stays
|
|
334
|
+
* in sync with the bailout matcher (and the test in
|
|
335
|
+
* `launch-error-dismiss.test.ts` locks the constants down).
|
|
336
|
+
*/
|
|
337
|
+
const PERMANENT_DISMISS_ERROR_MARKERS = [
|
|
338
|
+
LINUX_XDOTOOL_MISSING_PREFIX,
|
|
339
|
+
UNSUPPORTED_PLATFORM_PREFIX,
|
|
340
|
+
];
|
|
341
|
+
function isPermanentDismissError(message) {
|
|
342
|
+
return PERMANENT_DISMISS_ERROR_MARKERS.some((m) => message.includes(m));
|
|
343
|
+
}
|
|
344
|
+
async function pollAndDismissLaunchErrors(opts) {
|
|
345
|
+
const platform = (opts.platform ?? nodePlatform());
|
|
346
|
+
const probe = opts.probe ?? tryDismissLaunchErrorsDialog;
|
|
347
|
+
const start = Date.now();
|
|
348
|
+
const deadline = start + Math.max(0, opts.timeoutMs);
|
|
349
|
+
const interval = Math.max(50, opts.intervalMs);
|
|
350
|
+
const graceMs = Math.max(0, opts.noDialogGraceMs ?? 15000);
|
|
351
|
+
const seenErrorMessages = new Set();
|
|
352
|
+
let dismissedAtLeastOnce = false;
|
|
353
|
+
let aborted = opts.abortSignal?.aborted ?? false;
|
|
354
|
+
const onAbort = () => { aborted = true; };
|
|
355
|
+
opts.abortSignal?.addEventListener('abort', onAbort, { once: true });
|
|
356
|
+
try {
|
|
357
|
+
while (Date.now() < deadline && !aborted) {
|
|
358
|
+
const outcome = await probe(platform);
|
|
359
|
+
// Re-check the exit conditions BEFORE applying the outcome:
|
|
360
|
+
// if abort fired (or the deadline lapsed) while `probe` was
|
|
361
|
+
// in flight, the in-flight result is stale and applying it
|
|
362
|
+
// would emit a misleading progress event or warning.
|
|
363
|
+
if (aborted || Date.now() >= deadline)
|
|
364
|
+
break;
|
|
365
|
+
if (outcome.kind === 'dismissed') {
|
|
366
|
+
dismissedAtLeastOnce = true;
|
|
367
|
+
emitProgress(opts.onProgress, {
|
|
368
|
+
phase: 'launch-errors-dismissed',
|
|
369
|
+
message: `[open] dismissed Unity launch-errors dialog (button=${outcome.button}, platform=${platform})`,
|
|
370
|
+
button: outcome.button,
|
|
371
|
+
platform,
|
|
372
|
+
});
|
|
373
|
+
// Keep polling — the dialog may re-appear after the resolver
|
|
374
|
+
// fixes one error and surfaces the next.
|
|
375
|
+
}
|
|
376
|
+
else if (outcome.kind === 'error') {
|
|
377
|
+
if (!seenErrorMessages.has(outcome.message)) {
|
|
378
|
+
seenErrorMessages.add(outcome.message);
|
|
379
|
+
opts.warnings.push(`launch-errors auto-dismiss: ${outcome.message}`);
|
|
380
|
+
}
|
|
381
|
+
if (isPermanentDismissError(outcome.message)) {
|
|
382
|
+
// No point ticking another 59 times — bail out.
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
else if (
|
|
387
|
+
// outcome.kind === 'not-found'
|
|
388
|
+
!dismissedAtLeastOnce &&
|
|
389
|
+
opts.abortSignal === undefined &&
|
|
390
|
+
Date.now() - start >= graceMs) {
|
|
391
|
+
// No dialog within the grace window AND no caller-supplied
|
|
392
|
+
// abort signal to wait on. Exit early — the README's "no
|
|
393
|
+
// extra delay" claim depends on this.
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
const remaining = deadline - Date.now();
|
|
397
|
+
if (remaining <= 0 || aborted)
|
|
398
|
+
break;
|
|
399
|
+
await sleep(Math.min(interval, remaining), opts.abortSignal);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
finally {
|
|
403
|
+
opts.abortSignal?.removeEventListener('abort', onAbort);
|
|
404
|
+
}
|
|
405
|
+
// Surface a timeout warning ONLY when the deadline was actually
|
|
406
|
+
// reached (not the abort path) AND a platform error was observed.
|
|
407
|
+
// The grace-window exit returns silently above; the abort path is
|
|
408
|
+
// a caller-driven cancellation, not a timeout.
|
|
409
|
+
if (Date.now() >= deadline &&
|
|
410
|
+
!aborted &&
|
|
411
|
+
seenErrorMessages.size > 0 &&
|
|
412
|
+
!dismissedAtLeastOnce) {
|
|
413
|
+
opts.warnings.push(`launch-errors auto-dismiss timed out after ${opts.timeoutMs}ms — continuing with wait-for-ready`);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
function sleep(ms, signal) {
|
|
417
|
+
return new Promise((resolve) => {
|
|
418
|
+
if (signal?.aborted) {
|
|
419
|
+
resolve();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
const t = setTimeout(() => {
|
|
423
|
+
signal?.removeEventListener('abort', onAbort);
|
|
424
|
+
resolve();
|
|
425
|
+
}, ms);
|
|
426
|
+
const onAbort = () => {
|
|
427
|
+
clearTimeout(t);
|
|
428
|
+
resolve();
|
|
429
|
+
};
|
|
430
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
431
|
+
// Do NOT unref() — the polling timer is the reason `openProject`
|
|
432
|
+
// is awaiting in the first place, and unref'ing would let Node
|
|
433
|
+
// exit before the loop completes.
|
|
434
|
+
});
|
|
435
|
+
}
|
|
278
436
|
/**
|
|
279
437
|
* Resolve to the spawned PID once the child process emits its
|
|
280
438
|
* `spawn` event, or to `undefined` if a short timeout elapses or
|
package/dist/lib/open.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open.js","sourceRoot":"","sources":["../../src/lib/open.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CA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KAAK,EAAE,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ export type ProgressEvent = {
|
|
|
42
42
|
phase: 'editor-launched';
|
|
43
43
|
message: string;
|
|
44
44
|
pid?: number;
|
|
45
|
+
} | {
|
|
46
|
+
phase: 'launch-errors-dismissed';
|
|
47
|
+
message: string;
|
|
48
|
+
/** Button label that was clicked (e.g. `Ignore`). */
|
|
49
|
+
button: string;
|
|
50
|
+
/** Platform on which the dismiss was performed (`win32` | `darwin` | `linux`). */
|
|
51
|
+
platform: string;
|
|
45
52
|
} | {
|
|
46
53
|
phase: 'done';
|
|
47
54
|
message: string;
|
|
@@ -251,11 +258,56 @@ export interface OpenProjectOptions {
|
|
|
251
258
|
* avoid the CLI's stringly-typed `"true"`/`"false"` parse step.
|
|
252
259
|
*/
|
|
253
260
|
startServer?: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* If `true` (the default), poll for the Unity Editor's
|
|
263
|
+
* "compile errors at launch" dialog after the editor process has
|
|
264
|
+
* been spawned and click `Ignore` (or the platform-equivalent
|
|
265
|
+
* button) so the editor finishes initialising. Set to `false` to
|
|
266
|
+
* disable the polling loop entirely — corresponds to the CLI's
|
|
267
|
+
* `--no-auto-dismiss-launch-errors` flag.
|
|
268
|
+
*
|
|
269
|
+
* The polling loop runs concurrently with the existing wait-for-
|
|
270
|
+
* ready logic (which is the authoritative ready signal); when no
|
|
271
|
+
* dialog appears, behaviour is unchanged from the pre-feature
|
|
272
|
+
* baseline (no spurious clicks, no extra delay).
|
|
273
|
+
*/
|
|
274
|
+
autoDismissLaunchErrors?: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Overall timeout (milliseconds) for the launch-errors dismissal
|
|
277
|
+
* polling loop. The loop ticks every
|
|
278
|
+
* `launchDismissPollIntervalMs` until either the dialog is
|
|
279
|
+
* dismissed, this timeout elapses, or `openProject` returns. Default
|
|
280
|
+
* `30000` (30 s).
|
|
281
|
+
*/
|
|
282
|
+
launchDismissTimeoutMs?: number;
|
|
283
|
+
/**
|
|
284
|
+
* Polling tick interval (milliseconds) for the launch-errors
|
|
285
|
+
* dismissal loop. Default `1500`.
|
|
286
|
+
*/
|
|
287
|
+
launchDismissPollIntervalMs?: number;
|
|
288
|
+
/**
|
|
289
|
+
* Optional abort signal that, when fired, stops the launch-errors
|
|
290
|
+
* dismissal polling loop early. Intended for callers that have an
|
|
291
|
+
* authoritative "Unity is ready" signal in scope (e.g. a parallel
|
|
292
|
+
* `wait-for-ready` poll) so the dismissal loop does not keep
|
|
293
|
+
* ticking after Unity has finished initialising.
|
|
294
|
+
*
|
|
295
|
+
* When omitted, the loop falls back to a grace window after the
|
|
296
|
+
* editor process is spawned: if no dialog has been observed within
|
|
297
|
+
* ~15s of polling, the loop exits early on the assumption that the
|
|
298
|
+
* dialog is not going to appear for this launch. The grace window
|
|
299
|
+
* has to cover Unity's full startup phase (process spawn → Package
|
|
300
|
+
* Manager connect → first compile pass) because the launch-errors
|
|
301
|
+
* dialog (`"Enter Safe Mode?"` on Unity 2020.2+) appears at the end
|
|
302
|
+
* of that phase, not the start of it (issue #737).
|
|
303
|
+
*/
|
|
304
|
+
launchDismissAbortSignal?: AbortSignal;
|
|
254
305
|
/**
|
|
255
306
|
* Optional progress callback — fires for `start`,
|
|
256
307
|
* `detecting-editor-version`, `editors-located`, `editor-resolved`,
|
|
257
|
-
* `connection-details`, `launching-editor`, `editor-launched`,
|
|
258
|
-
* `
|
|
308
|
+
* `connection-details`, `launching-editor`, `editor-launched`,
|
|
309
|
+
* `launch-errors-dismissed` (only when a dialog was actually
|
|
310
|
+
* dismissed), and `done`.
|
|
259
311
|
*/
|
|
260
312
|
onProgress?: ProgressCallback;
|
|
261
313
|
}
|