@cbxss/eoka 0.1.0-beta.5 → 0.1.0-beta.7
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 +4 -18
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +8 -10
- package/dist/cloudflare.d.ts +2 -35
- package/dist/cloudflare.js +9 -144
- package/dist/generated/protocol.d.ts +955 -22
- package/dist/generated/protocol.js +2 -2
- package/dist/generated/schema-bundle.json +5074 -258
- package/dist/page.d.ts +19 -9
- package/dist/page.js +31 -40
- package/dist/release-manifest.json +29 -29
- package/dist/release.js +1 -1
- package/examples/explicit-paths.mjs +1 -1
- package/examples/offline.mjs +1 -1
- package/package.json +6 -6
package/dist/page.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import type { CallOptions, InvokeClient } from './client.js';
|
|
3
|
-
import type { Action, ActionOptions, ActionReceipt, AgentAction, AgentMode, AgentObservation, AgentStepResult, BrowserState, Expectation, LocatorSpec, MethodName, MethodParams, MethodResults, OperationRecord } from './generated/protocol.js';
|
|
3
|
+
import type { Action, ActionOptions, ActionReceipt, AgentAction, AgentMode, AgentObservation, AgentStepResult, BrowserState, Expectation, LocatorSpec, MethodName, MethodParams, MethodResults, OperationRecord, InputMode, Destination } from './generated/protocol.js';
|
|
4
4
|
import { Operation } from './operations.js';
|
|
5
5
|
import { Recording } from './recording.js';
|
|
6
6
|
export type LocatorInput = string | LocatorSpec;
|
|
@@ -14,10 +14,14 @@ export interface PageWaitOptions extends CallOptions {
|
|
|
14
14
|
waitTimeoutMs?: number;
|
|
15
15
|
}
|
|
16
16
|
export interface AgentObserveOptions extends CallOptions {
|
|
17
|
+
cursor?: string;
|
|
18
|
+
role?: string;
|
|
19
|
+
name?: string;
|
|
17
20
|
observationTimeoutMs?: number;
|
|
18
21
|
maxControls?: number;
|
|
19
22
|
}
|
|
20
23
|
export interface AgentStepOptions extends AgentObserveOptions {
|
|
24
|
+
destination?: Destination;
|
|
21
25
|
expect?: Expectation;
|
|
22
26
|
mode?: AgentMode;
|
|
23
27
|
actionTimeoutMs?: number;
|
|
@@ -42,11 +46,15 @@ export declare class Page implements InvokeClient {
|
|
|
42
46
|
perform(action: Action, options?: PerformOptions): Promise<Operation>;
|
|
43
47
|
private verified;
|
|
44
48
|
goto(url: string, options?: PerformOptions): Promise<ActionReceipt>;
|
|
45
|
-
fill(target: LocatorInput, value: string, options?: PerformOptions
|
|
49
|
+
fill(target: LocatorInput, value: string, options?: PerformOptions & {
|
|
50
|
+
inputMode?: InputMode;
|
|
51
|
+
}): Promise<ActionReceipt>;
|
|
46
52
|
select(target: LocatorInput, value: string | string[], options?: PerformOptions): Promise<ActionReceipt>;
|
|
47
53
|
hover(target: LocatorInput, options?: PerformOptions): Promise<ActionReceipt>;
|
|
48
54
|
click(target: LocatorInput, options?: PerformOptions): Promise<ActionReceipt>;
|
|
49
|
-
type(target: LocatorInput, text: string, options?: PerformOptions
|
|
55
|
+
type(target: LocatorInput, text: string, options?: PerformOptions & {
|
|
56
|
+
inputMode?: InputMode;
|
|
57
|
+
}): Promise<ActionReceipt>;
|
|
50
58
|
pressKey(key: string, options?: PerformOptions): Promise<ActionReceipt>;
|
|
51
59
|
submit(target: LocatorInput, options?: PerformOptions): Promise<ActionReceipt>;
|
|
52
60
|
drag(target: LocatorInput, dx: number, dy: number, options?: PerformOptions): Promise<ActionReceipt>;
|
|
@@ -60,8 +68,10 @@ export declare class Page implements InvokeClient {
|
|
|
60
68
|
waitFor(selector: string, options?: PageWaitOptions): Promise<void>;
|
|
61
69
|
waitForVisible(selector: string, options?: PageWaitOptions): Promise<void>;
|
|
62
70
|
waitForText(text: string, options?: PageWaitOptions): Promise<void>;
|
|
63
|
-
evaluate(
|
|
64
|
-
|
|
71
|
+
evaluate(fn: string, args?: unknown[], options?: CallOptions): Promise<unknown>;
|
|
72
|
+
evaluateRaw(js: string, options?: CallOptions): Promise<unknown>;
|
|
73
|
+
execute(fn: string, args?: unknown[], options?: CallOptions): Promise<void>;
|
|
74
|
+
executeRaw(js: string, options?: CallOptions): Promise<void>;
|
|
65
75
|
/** List every frame in the page, including cross-origin OOPIFs. */
|
|
66
76
|
frames(options?: CallOptions): Promise<MethodResults['page.frames']>;
|
|
67
77
|
/**
|
|
@@ -75,13 +85,13 @@ export declare class Page implements InvokeClient {
|
|
|
75
85
|
resolveTimeoutMs?: number;
|
|
76
86
|
} & CallOptions): Promise<MethodResults['page.click_shadow']>;
|
|
77
87
|
/**
|
|
78
|
-
* Best-effort helper for interactive Cloudflare challenge pages:
|
|
79
|
-
*
|
|
80
|
-
*
|
|
88
|
+
* Best-effort helper for interactive Cloudflare challenge pages: the server
|
|
89
|
+
* clicks the Turnstile checkbox through its closed shadow root until the page
|
|
90
|
+
* leaves the challenge. Resolves with zero clicks on a normal page.
|
|
81
91
|
*/
|
|
82
92
|
solveTurnstile(options?: {
|
|
83
93
|
timeoutMs?: number;
|
|
84
|
-
} & CallOptions): Promise<
|
|
94
|
+
} & CallOptions): Promise<MethodResults['page.solve_turnstile']>;
|
|
85
95
|
captureState(options?: CallOptions): Promise<BrowserState>;
|
|
86
96
|
restoreState(state: BrowserState, options?: CallOptions): Promise<void>;
|
|
87
97
|
fetch(url: string, fetchOptions?: FetchOptions, options?: CallOptions): Promise<MethodResults['page.fetch']>;
|
package/dist/page.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
-
import { ProtocolError } from './errors.js';
|
|
5
4
|
import { Operation, OperationError, operationFailure, validateOperationRecord } from './operations.js';
|
|
6
5
|
import { Recording, RecordingError, recordingFailure, requireCaptureCapability, validateRecordingRecord } from './recording.js';
|
|
7
6
|
const recordingIdPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -68,15 +67,15 @@ export class Page {
|
|
|
68
67
|
throw new OperationError('DeadlineExceeded', 'The local action deadline elapsed; recover the operation by ID to learn its outcome.', operation.id, record, { requestState: 'acknowledged' });
|
|
69
68
|
}
|
|
70
69
|
if (record.state !== 'finished' || record.outcome !== 'verified_complete' || record.receipt?.outcome !== 'verified_complete' || record.error_code != null) {
|
|
71
|
-
throw new OperationError(record.error_code ?? (record.state === 'running' ? 'OperationRunning' : record.outcome), `Operation ${operation.id} is ${record.state} with outcome ${record.outcome}; verified completion was not established.`, operation.id, record, { requestState: 'acknowledged' });
|
|
70
|
+
throw new OperationError(record.error_code ?? (record.state === 'running' ? 'OperationRunning' : record.outcome), record.error?.message ?? `Operation ${operation.id} is ${record.state} with outcome ${record.outcome}; verified completion was not established.`, operation.id, record, { requestState: 'acknowledged' });
|
|
72
71
|
}
|
|
73
72
|
return record.receipt;
|
|
74
73
|
}
|
|
75
74
|
goto(url, options) {
|
|
76
75
|
return this.verified({ kind: 'navigate', url }, options);
|
|
77
76
|
}
|
|
78
|
-
fill(target, value, options) {
|
|
79
|
-
return this.verified({ kind: 'fill', target: locator(target), value }, options);
|
|
77
|
+
fill(target, value, options = {}) {
|
|
78
|
+
return this.verified({ kind: 'fill', target: locator(target), value, input_mode: options.inputMode ?? 'sequential' }, options);
|
|
80
79
|
}
|
|
81
80
|
select(target, value, options) {
|
|
82
81
|
return this.verified({ kind: 'select', target: locator(target), values: typeof value === 'string' ? [value] : value }, options);
|
|
@@ -87,8 +86,8 @@ export class Page {
|
|
|
87
86
|
click(target, options) {
|
|
88
87
|
return this.verified({ kind: 'click', target: locator(target) }, options);
|
|
89
88
|
}
|
|
90
|
-
type(target, text, options) {
|
|
91
|
-
return this.verified({ kind: 'type', target: locator(target), text }, options);
|
|
89
|
+
type(target, text, options = {}) {
|
|
90
|
+
return this.verified({ kind: 'type', target: locator(target), text, input_mode: options.inputMode ?? 'sequential' }, options);
|
|
92
91
|
}
|
|
93
92
|
pressKey(key, options) {
|
|
94
93
|
return this.verified({ kind: 'press_key', key }, options);
|
|
@@ -132,11 +131,17 @@ export class Page {
|
|
|
132
131
|
const { waitTimeoutMs = 30_000, ...localOptions } = options;
|
|
133
132
|
await this.invoke('page.wait_for_text', { pageId: this.id, text, timeoutMs: waitTimeoutMs }, localOptions);
|
|
134
133
|
}
|
|
135
|
-
async evaluate(
|
|
136
|
-
return (await this.invoke('page.evaluate', { pageId: this.id,
|
|
134
|
+
async evaluate(fn, args = [], options) {
|
|
135
|
+
return (await this.invoke('page.evaluate', { pageId: this.id, function: fn, arguments: args }, options)).result;
|
|
137
136
|
}
|
|
138
|
-
async
|
|
139
|
-
await this.invoke('page.
|
|
137
|
+
async evaluateRaw(js, options) {
|
|
138
|
+
return (await this.invoke('page.evaluate_raw', { pageId: this.id, js }, options)).result;
|
|
139
|
+
}
|
|
140
|
+
async execute(fn, args = [], options) {
|
|
141
|
+
await this.invoke('page.execute', { pageId: this.id, function: fn, arguments: args }, options);
|
|
142
|
+
}
|
|
143
|
+
async executeRaw(js, options) {
|
|
144
|
+
await this.invoke('page.execute_raw', { pageId: this.id, js }, options);
|
|
140
145
|
}
|
|
141
146
|
/** List every frame in the page, including cross-origin OOPIFs. */
|
|
142
147
|
async frames(options) {
|
|
@@ -164,36 +169,14 @@ export class Page {
|
|
|
164
169
|
}, callOptions);
|
|
165
170
|
}
|
|
166
171
|
/**
|
|
167
|
-
* Best-effort helper for interactive Cloudflare challenge pages:
|
|
168
|
-
*
|
|
169
|
-
*
|
|
172
|
+
* Best-effort helper for interactive Cloudflare challenge pages: the server
|
|
173
|
+
* clicks the Turnstile checkbox through its closed shadow root until the page
|
|
174
|
+
* leaves the challenge. Resolves with zero clicks on a normal page.
|
|
170
175
|
*/
|
|
171
|
-
|
|
176
|
+
solveTurnstile(options = {}) {
|
|
172
177
|
const { timeoutMs = 30_000, ...callOptions } = options;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const frames = await this.frames(callOptions);
|
|
176
|
-
const challenge = frames.find(frame => frame.url.includes('challenges.cloudflare.com'));
|
|
177
|
-
if (challenge !== undefined) {
|
|
178
|
-
const remaining = Math.max(1, Math.floor(deadline - performance.now()));
|
|
179
|
-
try {
|
|
180
|
-
await this.clickShadow('input[type="checkbox"]', {
|
|
181
|
-
...callOptions,
|
|
182
|
-
frameId: challenge.id,
|
|
183
|
-
resolveTimeoutMs: Math.min(remaining, 2_000),
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
catch (error) {
|
|
187
|
-
if (performance.now() >= deadline)
|
|
188
|
-
throw error;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
else if (!(await this.title(callOptions)).includes('moment')) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
await new Promise(resolve => setTimeout(resolve, 500));
|
|
195
|
-
}
|
|
196
|
-
throw new ProtocolError('Turnstile challenge did not resolve before the deadline');
|
|
178
|
+
// The local deadline outlasts the server's solve deadline so its error wins.
|
|
179
|
+
return this.invoke('page.solve_turnstile', { pageId: this.id, timeoutMs }, { ...callOptions, timeoutMs: timeoutMs + 10_000 });
|
|
197
180
|
}
|
|
198
181
|
async captureState(options) {
|
|
199
182
|
return (await this.invoke('page.capture_state', { pageId: this.id }, options)).state;
|
|
@@ -266,8 +249,14 @@ export class Page {
|
|
|
266
249
|
await this.invoke('page.reset_viewport', { pageId: this.id }, options);
|
|
267
250
|
}
|
|
268
251
|
observe(options = {}) {
|
|
269
|
-
const { observationTimeoutMs, maxControls, ...localOptions } = options;
|
|
252
|
+
const { observationTimeoutMs, maxControls, cursor, role, name, ...localOptions } = options;
|
|
270
253
|
const params = { pageId: this.id };
|
|
254
|
+
if (cursor !== undefined)
|
|
255
|
+
params.cursor = cursor;
|
|
256
|
+
if (role !== undefined)
|
|
257
|
+
params.role = role;
|
|
258
|
+
if (name !== undefined)
|
|
259
|
+
params.name = name;
|
|
271
260
|
if (observationTimeoutMs !== undefined)
|
|
272
261
|
params.timeout_ms = observationTimeoutMs;
|
|
273
262
|
if (maxControls !== undefined)
|
|
@@ -275,13 +264,15 @@ export class Page {
|
|
|
275
264
|
return this.invoke('agent.observe', params, localOptions);
|
|
276
265
|
}
|
|
277
266
|
async step(action, options = {}) {
|
|
278
|
-
const { operationId = randomUUID(), observationTimeoutMs, maxControls, actionTimeoutMs, expect, mode, ...localOptions } = options;
|
|
267
|
+
const { operationId = randomUUID(), observationTimeoutMs, maxControls, actionTimeoutMs, expect, mode, destination, ...localOptions } = options;
|
|
279
268
|
try {
|
|
280
269
|
const params = { pageId: this.id, action, operation_id: operationId };
|
|
281
270
|
if (expect !== undefined)
|
|
282
271
|
params.expect = expect;
|
|
283
272
|
if (mode !== undefined)
|
|
284
273
|
params.mode = mode;
|
|
274
|
+
if (destination !== undefined)
|
|
275
|
+
params.destination = destination;
|
|
285
276
|
if (actionTimeoutMs !== undefined)
|
|
286
277
|
params.action_timeout_ms = actionTimeoutMs;
|
|
287
278
|
if (observationTimeoutMs !== undefined)
|
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sdkVersion": "0.1.0-beta.
|
|
3
|
+
"sdkVersion": "0.1.0-beta.7",
|
|
4
4
|
"installerVersion": "3.2.4",
|
|
5
5
|
"server": {
|
|
6
|
-
"version": "0.
|
|
7
|
-
"protocolVersion": "
|
|
6
|
+
"version": "0.8.0",
|
|
7
|
+
"protocolVersion": "2.0",
|
|
8
8
|
"platforms": {
|
|
9
9
|
"linux-x64-gnu": {
|
|
10
10
|
"packageName": "@cbxss/eoka-server-linux-x64-gnu",
|
|
11
|
-
"packageVersion": "0.1.0-beta.
|
|
11
|
+
"packageVersion": "0.1.0-beta.7",
|
|
12
12
|
"target": "x86_64-unknown-linux-gnu",
|
|
13
13
|
"asset": "eoka-server-linux-amd64",
|
|
14
14
|
"executablePath": "bin/eoka-server",
|
|
15
|
-
"sha256": "
|
|
16
|
-
"size":
|
|
15
|
+
"sha256": "3b22e9545bc0a69aa4084183d8834b1176c2e624c9a0e46a35317d977b318f52",
|
|
16
|
+
"size": 18567616,
|
|
17
17
|
"minimumGlibc": "2.35",
|
|
18
18
|
"development": false
|
|
19
19
|
},
|
|
20
20
|
"linux-arm64-gnu": {
|
|
21
21
|
"packageName": "@cbxss/eoka-server-linux-arm64-gnu",
|
|
22
|
-
"packageVersion": "0.1.0-beta.
|
|
22
|
+
"packageVersion": "0.1.0-beta.7",
|
|
23
23
|
"target": "aarch64-unknown-linux-gnu",
|
|
24
24
|
"asset": "eoka-server-linux-arm64",
|
|
25
25
|
"executablePath": "bin/eoka-server",
|
|
26
|
-
"sha256": "
|
|
27
|
-
"size":
|
|
26
|
+
"sha256": "3bd64a4acb95e0fb0c3513b190919d3174151f61958b8cb08a80fa4072cda7ac",
|
|
27
|
+
"size": 17745136,
|
|
28
28
|
"minimumGlibc": "2.35",
|
|
29
29
|
"development": false
|
|
30
30
|
},
|
|
31
31
|
"darwin-x64": {
|
|
32
32
|
"packageName": "@cbxss/eoka-server-darwin-x64",
|
|
33
|
-
"packageVersion": "0.1.0-beta.
|
|
33
|
+
"packageVersion": "0.1.0-beta.7",
|
|
34
34
|
"target": "x86_64-apple-darwin",
|
|
35
35
|
"asset": "eoka-server-darwin-amd64",
|
|
36
36
|
"executablePath": "bin/eoka-server",
|
|
37
|
-
"sha256": "
|
|
38
|
-
"size":
|
|
37
|
+
"sha256": "063bd76c7716ab8e3590b3ae8afe8e99342a1e7764100b352e1d9bda21e2bc28",
|
|
38
|
+
"size": 16479344,
|
|
39
39
|
"minimumGlibc": null,
|
|
40
40
|
"development": false
|
|
41
41
|
},
|
|
42
42
|
"darwin-arm64": {
|
|
43
43
|
"packageName": "@cbxss/eoka-server-darwin-arm64",
|
|
44
|
-
"packageVersion": "0.1.0-beta.
|
|
44
|
+
"packageVersion": "0.1.0-beta.7",
|
|
45
45
|
"target": "aarch64-apple-darwin",
|
|
46
46
|
"asset": "eoka-server-darwin-arm64",
|
|
47
47
|
"executablePath": "bin/eoka-server",
|
|
48
|
-
"sha256": "
|
|
49
|
-
"size":
|
|
48
|
+
"sha256": "32329988931f84e6bceb25d6ac29c526f442a4e8dec1b0d1f46c94f37fcf25da",
|
|
49
|
+
"size": 15942528,
|
|
50
50
|
"minimumGlibc": null,
|
|
51
51
|
"development": false
|
|
52
52
|
},
|
|
53
53
|
"win32-x64": {
|
|
54
54
|
"packageName": "@cbxss/eoka-server-win32-x64",
|
|
55
|
-
"packageVersion": "0.1.0-beta.
|
|
55
|
+
"packageVersion": "0.1.0-beta.7",
|
|
56
56
|
"target": "x86_64-pc-windows-msvc",
|
|
57
57
|
"asset": "eoka-server-windows-amd64.exe",
|
|
58
58
|
"executablePath": "bin/eoka-server.exe",
|
|
59
|
-
"sha256": "
|
|
60
|
-
"size":
|
|
59
|
+
"sha256": "3033e73ae25453b925b6e255db02b3a832253f977f0fcdb3f7fea9ede787c667",
|
|
60
|
+
"size": 15731200,
|
|
61
61
|
"minimumGlibc": null,
|
|
62
62
|
"development": false
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"chrome": {
|
|
67
|
-
"buildId": "
|
|
67
|
+
"buildId": "156.0.8078.80",
|
|
68
68
|
"platforms": {
|
|
69
69
|
"linux-x64-gnu": {
|
|
70
70
|
"platform": "linux",
|
|
71
|
-
"url": "https://storage.googleapis.com/chrome-for-testing-public/
|
|
72
|
-
"sha256": "
|
|
71
|
+
"url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/linux64/chrome-linux64.zip",
|
|
72
|
+
"sha256": "b711c720f774be355197f32edf37e0651418ba036d92446ee2da19ac017540a7",
|
|
73
73
|
"executablePath": "chrome-linux64/chrome"
|
|
74
74
|
},
|
|
75
75
|
"linux-arm64-gnu": {
|
|
76
76
|
"platform": "linux_arm",
|
|
77
|
-
"url": "https://storage.googleapis.com/chrome-for-testing-public/
|
|
78
|
-
"sha256": "
|
|
77
|
+
"url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/linux-arm64/chrome-linux-arm64.zip",
|
|
78
|
+
"sha256": "1f496a826c9ba4d6a5f5bf2de686145fe718528c2cc3dbeb96b5893b89653724",
|
|
79
79
|
"executablePath": "chrome-linux-arm64/chrome"
|
|
80
80
|
},
|
|
81
81
|
"darwin-x64": {
|
|
82
82
|
"platform": "mac",
|
|
83
|
-
"url": "https://storage.googleapis.com/chrome-for-testing-public/
|
|
84
|
-
"sha256": "
|
|
83
|
+
"url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/mac-x64/chrome-mac-x64.zip",
|
|
84
|
+
"sha256": "672b79dc79fdf28bb2ec9787b7fa33810c2b3cfd946a0fb4d3b72775f4e6fd9a",
|
|
85
85
|
"executablePath": "chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
|
|
86
86
|
},
|
|
87
87
|
"darwin-arm64": {
|
|
88
88
|
"platform": "mac_arm",
|
|
89
|
-
"url": "https://storage.googleapis.com/chrome-for-testing-public/
|
|
90
|
-
"sha256": "
|
|
89
|
+
"url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/mac-arm64/chrome-mac-arm64.zip",
|
|
90
|
+
"sha256": "8bc590d1b1acac042a000234c768f31830f25a3983a83ed5e067114c87c4cad1",
|
|
91
91
|
"executablePath": "chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
|
|
92
92
|
},
|
|
93
93
|
"win32-x64": {
|
|
94
94
|
"platform": "win64",
|
|
95
|
-
"url": "https://storage.googleapis.com/chrome-for-testing-public/
|
|
96
|
-
"sha256": "
|
|
95
|
+
"url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/win64/chrome-win64.zip",
|
|
96
|
+
"sha256": "16edb57d6107bf1c48a7c149b8d78b155fe614410093796dd72441fd6640540f",
|
|
97
97
|
"executablePath": "chrome-win64/chrome.exe"
|
|
98
98
|
}
|
|
99
99
|
}
|
package/dist/release.js
CHANGED
|
@@ -29,7 +29,7 @@ export function validateReleaseManifest(value) {
|
|
|
29
29
|
const chrome = object(manifest.chrome);
|
|
30
30
|
const servers = object(server.platforms);
|
|
31
31
|
const browsers = object(chrome.platforms);
|
|
32
|
-
if (manifest.schemaVersion !== 1 || !exactNpmVersion(manifest.sdkVersion) || manifest.installerVersion !== '3.2.4' || server.version !== '0.
|
|
32
|
+
if (manifest.schemaVersion !== 1 || !exactNpmVersion(manifest.sdkVersion) || manifest.installerVersion !== '3.2.4' || server.version !== '0.8.0' || server.protocolVersion !== `${protocolVersion.major}.${protocolVersion.minor}` || chrome.buildId !== '156.0.8078.80')
|
|
33
33
|
throw new Error('Incompatible release versions');
|
|
34
34
|
if (Object.keys(servers).length !== platformIds.length || Object.keys(browsers).length !== platformIds.length)
|
|
35
35
|
throw new Error('Incomplete platform mapping');
|
|
@@ -24,7 +24,7 @@ try {
|
|
|
24
24
|
actionOptions: { expect: { kind: "value", target, value: "Ada" }, timeout_ms: 5000 },
|
|
25
25
|
});
|
|
26
26
|
console.log(JSON.stringify({ ownership: browser.ownership, browserVersion: browser.browserVersion, operationId, receipt }, null, 2));
|
|
27
|
-
console.log(JSON.stringify(await page.invoke("page.evaluate", { pageId: page.id,
|
|
27
|
+
console.log(JSON.stringify(await page.invoke("page.evaluate", { pageId: page.id, function: '()=>({name: document.querySelector("#name").value})' })));
|
|
28
28
|
} catch (error) {
|
|
29
29
|
const primary = error instanceof AggregateError ? error.cause : error;
|
|
30
30
|
if (primary instanceof EokaError && primary.operationId) {
|
package/examples/offline.mjs
CHANGED
|
@@ -9,7 +9,7 @@ const browser = await Browser.launch({
|
|
|
9
9
|
});
|
|
10
10
|
try {
|
|
11
11
|
const page = await browser.newPage("data:text/html,%3Ctitle%3Eeoka%20offline%3C/title%3E");
|
|
12
|
-
const result = await page.invoke("page.evaluate", { pageId: page.id,
|
|
12
|
+
const result = await page.invoke("page.evaluate", { pageId: page.id, function: "()=>document.title" });
|
|
13
13
|
console.log(JSON.stringify({
|
|
14
14
|
title: result.result,
|
|
15
15
|
ownership: browser.ownership,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cbxss/eoka",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Node.js SDK with pinned Chrome installation and verified eoka sidecar resolution",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"typescript": "5.9.3"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@cbxss/eoka-server-linux-x64-gnu": "0.1.0-beta.
|
|
62
|
-
"@cbxss/eoka-server-linux-arm64-gnu": "0.1.0-beta.
|
|
63
|
-
"@cbxss/eoka-server-darwin-x64": "0.1.0-beta.
|
|
64
|
-
"@cbxss/eoka-server-darwin-arm64": "0.1.0-beta.
|
|
65
|
-
"@cbxss/eoka-server-win32-x64": "0.1.0-beta.
|
|
61
|
+
"@cbxss/eoka-server-linux-x64-gnu": "0.1.0-beta.7",
|
|
62
|
+
"@cbxss/eoka-server-linux-arm64-gnu": "0.1.0-beta.7",
|
|
63
|
+
"@cbxss/eoka-server-darwin-x64": "0.1.0-beta.7",
|
|
64
|
+
"@cbxss/eoka-server-darwin-arm64": "0.1.0-beta.7",
|
|
65
|
+
"@cbxss/eoka-server-win32-x64": "0.1.0-beta.7"
|
|
66
66
|
},
|
|
67
67
|
"repository": {
|
|
68
68
|
"type": "git",
|