@allwright.dev/core 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap.js +1 -1
- package/dist/page.js +5 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/proto/surfaces/web/v1/web.proto +3 -0
package/dist/bootstrap.js
CHANGED
|
@@ -12,7 +12,7 @@ const ALLWRIGHT_HOME_ENV_VAR = "ALLWRIGHT_HOME";
|
|
|
12
12
|
const ALLWRIGHT_REPOSITORY_ENV_VAR = "ALLWRIGHT_REPOSITORY";
|
|
13
13
|
const ALLWRIGHT_VERSION_ENV_VAR = "ALLWRIGHT_VERSION";
|
|
14
14
|
const DEFAULT_RELEASE_REPOSITORY = "allwright-dev/allwright";
|
|
15
|
-
const DEFAULT_RELEASE_VERSION = "0.1.
|
|
15
|
+
const DEFAULT_RELEASE_VERSION = "0.1.2";
|
|
16
16
|
const STARTUP_TIMEOUT_MS = 20_000;
|
|
17
17
|
const PING_TIMEOUT_MS = 1_000;
|
|
18
18
|
const PROTO_ROOT = fileURLToPath(new URL("../proto/", import.meta.url));
|
package/dist/page.js
CHANGED
|
@@ -306,6 +306,10 @@ export class PageImpl {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
async accessibilitySnapshot(options = {}) {
|
|
309
|
+
const mode = options.mode ?? "default";
|
|
310
|
+
if (!["default", "ai", "autoexpect", "codegen"].includes(mode)) {
|
|
311
|
+
throw new Error("invalid accessibility snapshot mode");
|
|
312
|
+
}
|
|
309
313
|
const format = options.format ?? "json";
|
|
310
314
|
if (format !== "json" && format !== "yaml") {
|
|
311
315
|
throw new Error("accessibility snapshot format must be 'json' or 'yaml'");
|
|
@@ -317,6 +321,7 @@ export class PageImpl {
|
|
|
317
321
|
contextSessionId: this.sessionId,
|
|
318
322
|
accessibilitySnapshot: {
|
|
319
323
|
format,
|
|
324
|
+
mode,
|
|
320
325
|
retryOptions: options.timeoutMs ? { timeoutMs: options.timeoutMs } : undefined,
|
|
321
326
|
},
|
|
322
327
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface CommandOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export interface AccessibilitySnapshotOptions extends CommandOptions {
|
|
12
12
|
format?: "json" | "yaml";
|
|
13
|
+
mode?: "default" | "ai" | "autoexpect" | "codegen";
|
|
13
14
|
}
|
|
14
15
|
export interface NavigateResult {
|
|
15
16
|
url: string;
|
|
@@ -604,6 +605,7 @@ export interface AccessibilitySnapshotRequest {
|
|
|
604
605
|
contextSessionId: string;
|
|
605
606
|
accessibilitySnapshot: {
|
|
606
607
|
format: string;
|
|
608
|
+
mode: string;
|
|
607
609
|
retryOptions?: {
|
|
608
610
|
timeoutMs?: number;
|
|
609
611
|
};
|
package/package.json
CHANGED
|
@@ -42,6 +42,9 @@ message ChromeLaunchedEvent {
|
|
|
42
42
|
|
|
43
43
|
// Empty format defaults to JSON. Accepted values are "json" and "yaml".
|
|
44
44
|
message AccessibilitySnapshotCommand {
|
|
45
|
+
// Empty mode defaults to default. AI injects queryable aria-ref attributes.
|
|
46
|
+
// Supported: default, ai, autoexpect, codegen.
|
|
47
|
+
string mode = 3;
|
|
45
48
|
string format = 1;
|
|
46
49
|
optional CommandRetryOptions retry_options = 2;
|
|
47
50
|
}
|