@e2e-dev/desktop 0.0.1-nightly-20261124030219 → 0.0.1
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/dist/.build.json +1 -1
- package/dist/engine.d.ts +3 -3
- package/dist/engine.js +1 -0
- package/dist/launch-arguments.d.ts +2 -0
- package/dist/launch-arguments.js +5 -0
- package/dist/surface.js +3 -2
- package/package.json +5 -5
package/dist/.build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.0.1
|
|
1
|
+
{"version":"0.0.1"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* package imports the contract from `@e2e-dev/core/engine` and contributes the
|
|
6
6
|
* `desktop` fixture the way the browser engine contributes `browser`.
|
|
7
7
|
*/
|
|
8
|
-
import { type EngineHandle } from '@e2e-dev/core/engine';
|
|
8
|
+
import { type EngineHandle, type EngineIsolation } from '@e2e-dev/core/engine';
|
|
9
9
|
import type { DesktopFixtures } from './fixtures.ts';
|
|
10
10
|
import { type DesktopOptions } from './options.ts';
|
|
11
11
|
/**
|
|
@@ -13,7 +13,7 @@ import { type DesktopOptions } from './options.ts';
|
|
|
13
13
|
* names this package: a project sees `@e2e-dev/core` only through its
|
|
14
14
|
* dependencies, and TypeScript cannot write that path in a declaration.
|
|
15
15
|
*/
|
|
16
|
-
export interface DesktopEngine extends EngineHandle<DesktopFixtures> {
|
|
16
|
+
export interface DesktopEngine<Platform extends string = string, Isolation extends EngineIsolation = EngineIsolation> extends EngineHandle<DesktopFixtures, Platform, Isolation> {
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Creates one desktop engine: it drives the target's macOS app on this
|
|
@@ -22,4 +22,4 @@ export interface DesktopEngine extends EngineHandle<DesktopFixtures> {
|
|
|
22
22
|
* and its other targets run elsewhere when `--target` picks them; a run that
|
|
23
23
|
* includes this target stops before any test starts on any OS but macOS.
|
|
24
24
|
*/
|
|
25
|
-
export declare function desktop(options?: DesktopOptions): DesktopEngine
|
|
25
|
+
export declare function desktop(options?: DesktopOptions): DesktopEngine<'macos', 'attempt'>;
|
package/dist/engine.js
CHANGED
package/dist/surface.js
CHANGED
|
@@ -16,6 +16,7 @@ import { ConfigurationError, EngineError, OBSERVED_NAME_LIMIT, OBSERVED_TEXT_LIM
|
|
|
16
16
|
import { AGENT_DESKTOP_VERSION, installPinned, pinnedExecutable, pinnedInstalled, resolveExecutable } from './binary.js';
|
|
17
17
|
import { AgentDesktopCli, AgentDesktopFailure, translate } from './cli.js';
|
|
18
18
|
import { toCombo } from './keys.js';
|
|
19
|
+
import { launchArgumentList } from './launch-arguments.js';
|
|
19
20
|
import { ROOT_ID, projectSnapshot } from './nodes.js';
|
|
20
21
|
import { encodePng, windowImage } from './png.js';
|
|
21
22
|
const execFileAsync = promisify(execFile);
|
|
@@ -414,7 +415,7 @@ export class DesktopSurface {
|
|
|
414
415
|
const { target, token } = launch;
|
|
415
416
|
// In the background unless `headed` or the run's `--headed`: otherwise the app never takes the keyboard from whoever is at the Mac.
|
|
416
417
|
const args = ['launch', target, '--no-attach', ...(this.foreground ? ['--activate'] : []), '--timeout', String(this.toolBudget(operation)), `--env=${LAUNCH_TOKEN}=${token}`];
|
|
417
|
-
for (const argument of [...FRESH_STATE_ARGUMENTS, ...(this.app
|
|
418
|
+
for (const argument of [...FRESH_STATE_ARGUMENTS, ...launchArgumentList(this.app)])
|
|
418
419
|
args.push(`--arg=${argument}`);
|
|
419
420
|
let launched;
|
|
420
421
|
try {
|
|
@@ -455,7 +456,7 @@ export class DesktopSurface {
|
|
|
455
456
|
if (operation.timeoutMs <= 0)
|
|
456
457
|
throw new EngineError('OPERATION_TIMEOUT', `opening ${bundle}: the operation's budget ran out before it was sent`, { retryable: false, cause: NOT_SENT });
|
|
457
458
|
// `-g` keeps the app in the background unless `headed` or the run's `--headed`; `open` hands the app its own environment, so it runs with the trimmed one.
|
|
458
|
-
const args = [...(this.foreground ? [] : ['-g']), '-n', '--env', `${LAUNCH_TOKEN}=${launch.token}`, bundle, '--args', ...FRESH_STATE_ARGUMENTS, ...(this.app
|
|
459
|
+
const args = [...(this.foreground ? [] : ['-g']), '-n', '--env', `${LAUNCH_TOKEN}=${launch.token}`, bundle, '--args', ...FRESH_STATE_ARGUMENTS, ...launchArgumentList(this.app)];
|
|
459
460
|
try {
|
|
460
461
|
await execFileAsync('open', args, { signal: operation.signal, timeout: operation.timeoutMs, env: this.appEnv });
|
|
461
462
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e2e-dev/desktop",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Desktop engine for e2e agentic end-to-end testing, built on agent-desktop: native apps, a prototype tested on macOS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@napi-rs/image": "1.16.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@e2e-dev/core": "0.25.0
|
|
50
|
-
"e2e": "0.25.0
|
|
49
|
+
"@e2e-dev/core": ">=0.25.0 <1",
|
|
50
|
+
"e2e": ">=0.25.0 <1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"e2e": {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@e2e-dev/core": "0.25.0
|
|
58
|
+
"@e2e-dev/core": "0.25.0",
|
|
59
59
|
"@types/node": "26.6.6",
|
|
60
|
-
"e2e": "0.25.0
|
|
60
|
+
"e2e": "0.25.0",
|
|
61
61
|
"typescript": "7.0.2",
|
|
62
62
|
"vitest": "5.1.1"
|
|
63
63
|
},
|