@dopame/acde-linux-x64 0.0.0-stage → 0.0.10
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/LICENSE +8 -0
- package/bin/acde +66 -0
- package/bin/acde.cmd +45 -0
- package/bin/acdebin-dbg +4 -0
- package/bin/app/brand/art.mjs +53 -0
- package/bin/app/brand/brand.css +39 -0
- package/bin/app/brand/lockup.mjs +17 -0
- package/bin/app/brand/mark.mjs +124 -0
- package/bin/app/dist/broker.js +1 -0
- package/bin/app/dist/web.js +1 -0
- package/bin/app/greet/index.html +177 -0
- package/bin/app/greet/package.json +16 -0
- package/bin/app/package.json +35 -0
- package/lib/acde/LICENSE +8 -0
- package/lib/acde/dist/chunk-0n69bv5q.js +1 -0
- package/lib/acde/dist/chunk-1cw92x19.js +1 -0
- package/lib/acde/dist/chunk-458e14zb.js +1 -0
- package/lib/acde/dist/chunk-88mxgp54.js +1 -0
- package/lib/acde/dist/chunk-8dv09ven.js +1 -0
- package/lib/acde/dist/chunk-8fxsj5h6.js +1 -0
- package/lib/acde/dist/chunk-8pf3kk8v.js +1 -0
- package/lib/acde/dist/chunk-8r65bz1e.js +1 -0
- package/lib/acde/dist/chunk-9hpnkmxn.js +1 -0
- package/lib/acde/dist/chunk-a7w41xr9.js +1 -0
- package/lib/acde/dist/chunk-db7qqt8a.js +1 -0
- package/lib/acde/dist/chunk-e3rzr5fj.js +1 -0
- package/lib/acde/dist/chunk-ehms6xjp.js +1 -0
- package/lib/acde/dist/chunk-ggykhab6.js +1 -0
- package/lib/acde/dist/chunk-gt70e8h2.js +1 -0
- package/lib/acde/dist/chunk-hcf0xd5c.js +1 -0
- package/lib/acde/dist/chunk-hdrvz9sa.js +1 -0
- package/lib/acde/dist/chunk-jjq2mn94.js +1 -0
- package/lib/acde/dist/chunk-k8f4m94e.js +7 -0
- package/lib/acde/dist/chunk-mtgy1bm0.js +1 -0
- package/lib/acde/dist/chunk-mtw6p7kv.js +1 -0
- package/lib/acde/dist/chunk-nwkq7cpp.js +1 -0
- package/lib/acde/dist/chunk-nyr54266.js +1 -0
- package/lib/acde/dist/chunk-p0h5kspx.js +1 -0
- package/lib/acde/dist/chunk-pdj3h86e.js +1 -0
- package/lib/acde/dist/chunk-q9dbzac5.js +1 -0
- package/lib/acde/dist/chunk-qrhbrjzk.js +1 -0
- package/lib/acde/dist/chunk-s8p0y5ap.js +1 -0
- package/lib/acde/dist/chunk-t0xqxe00.js +1 -0
- package/lib/acde/dist/chunk-tgn5c2mw.js +1 -0
- package/lib/acde/dist/chunk-wmj6zwvn.js +1 -0
- package/lib/acde/dist/chunk-wnk81fkc.js +1 -0
- package/lib/acde/dist/chunk-x208z38w.js +1 -0
- package/lib/acde/dist/chunk-xq76vbg6.js +1 -0
- package/lib/acde/dist/chunk-xr9gh5x2.js +1 -0
- package/lib/acde/dist/chunk-yytnhz6e.js +1 -0
- package/lib/acde/dist/chunk-z0ts25s1.js +1 -0
- package/lib/acde/dist/chunk-zdyw1ckt.js +1 -0
- package/lib/acde/dist/cli.js +1 -0
- package/lib/acde/dist/driver/index.js +1 -0
- package/lib/acde/dist/e2e/index.js +1 -0
- package/lib/acde/dist/types/configs.d.ts +1 -0
- package/lib/acde/dist/types/driver/acde.d.ts +106 -0
- package/lib/acde/dist/types/driver/clock.d.ts +32 -0
- package/lib/acde/dist/types/driver/expect.d.ts +60 -0
- package/lib/acde/dist/types/driver/format.d.ts +16 -0
- package/lib/acde/dist/types/driver/index.d.ts +13 -0
- package/lib/acde/dist/types/driver/input.d.ts +75 -0
- package/lib/acde/dist/types/driver/locator.d.ts +151 -0
- package/lib/acde/dist/types/driver/logs.d.ts +26 -0
- package/lib/acde/dist/types/driver/png.d.ts +31 -0
- package/lib/acde/dist/types/driver/poll.d.ts +4 -0
- package/lib/acde/dist/types/driver/screenshot.d.ts +37 -0
- package/lib/acde/dist/types/driver/trace.d.ts +26 -0
- package/lib/acde/dist/types/driver/types.d.ts +213 -0
- package/lib/acde/dist/types/driver/video.d.ts +14 -0
- package/lib/acde/dist/types/driver/window.d.ts +77 -0
- package/lib/acde/dist/types/e2e/index.d.ts +78 -0
- package/lib/acde/dist/types/e2e/settings.d.ts +39 -0
- package/lib/acde/dist/types/ipc.d.ts +24 -0
- package/lib/acde/dist/types/paths.d.ts +5 -0
- package/lib/acde/dist/types/pm.d.ts +20 -0
- package/lib/acde/dist/types/runtime.d.ts +49 -0
- package/lib/acde/dist/types/sessions.d.ts +80 -0
- package/lib/acde/dist/types/sockets.d.ts +4 -0
- package/lib/acde/launcher.d.mts +25 -0
- package/lib/acde/launcher.mjs +1 -0
- package/lib/acde/package.json +31 -0
- package/lib/acde/skills/acde/SKILL.md +114 -0
- package/lib/acde/skills/acde/references/guide/agents.md +50 -0
- package/lib/acde/skills/acde/references/guide/assets.md +40 -0
- package/lib/acde/skills/acde/references/guide/backend.md +94 -0
- package/lib/acde/skills/acde/references/guide/capabilities.md +157 -0
- package/lib/acde/skills/acde/references/guide/config.md +73 -0
- package/lib/acde/skills/acde/references/guide/desktop.md +165 -0
- package/lib/acde/skills/acde/references/guide/dev.md +66 -0
- package/lib/acde/skills/acde/references/guide/doctor.md +144 -0
- package/lib/acde/skills/acde/references/guide/files.md +181 -0
- package/lib/acde/skills/acde/references/guide/frameworks.md +74 -0
- package/lib/acde/skills/acde/references/guide/install.md +34 -0
- package/lib/acde/skills/acde/references/guide/mcp.md +64 -0
- package/lib/acde/skills/acde/references/guide/open.md +107 -0
- package/lib/acde/skills/acde/references/guide/services.md +147 -0
- package/lib/acde/skills/acde/references/guide/testing.md +378 -0
- package/lib/acde/skills/acde/references/guide/tools.md +291 -0
- package/lib/acde/skills/acde/references/guide/window.md +167 -0
- package/lib/acde/skills/acde/references/reference/cli.md +221 -0
- package/lib/acde/skills/acde/references/reference/config.md +51 -0
- package/lib/acde/skills/acde/references/reference/env.md +44 -0
- package/lib/acde/skills/acde/references/reference/manifest.md +92 -0
- package/lib/acde/skills/acde/references/reference/modules.md +586 -0
- package/lib/acde/skills/acde/references/reference/platforms.md +23 -0
- package/lib/acde/skills/acde/references/reference/service.md +47 -0
- package/lib/acde/skills/acde/references/reference/testing.md +265 -0
- package/lib/acde/skills/acde/references/reference/web.md +94 -0
- package/lib/acde/skills/acde/references/start/first-app.md +87 -0
- package/lib/acde/skills/acde/references/start/install.md +232 -0
- package/lib/acde/skills/acde/references/start/project.md +77 -0
- package/lib/acde/templates/app/acde.config.jsonc +27 -0
- package/lib/acde/templates/app/gitignore +2 -0
- package/lib/acde/templates/app/index.html +22 -0
- package/lib/acde/templates/app/package.json +5 -0
- package/lib/acde/templates/app/src/i18n.js +26 -0
- package/lib/acde/templates/app/src/locales/en.js +4 -0
- package/lib/acde/templates/app/src/locales/zh.js +4 -0
- package/lib/acde/templates/app/src/main.js +5 -0
- package/lib/acde/templates/backend/server.ts +7 -0
- package/lib/acde/templates/backend/src/main.js +6 -0
- package/lib/acde/templates/desktop/acde.config.jsonc +17 -0
- package/lib/acde/templates/desktop/gitignore +2 -0
- package/lib/acde/templates/desktop/index.html +19 -0
- package/lib/acde/templates/desktop/package.json +5 -0
- package/lib/acde/templates/desktop/src/desktop.js +16 -0
- package/lib/acde/templates/desktop/src/i18n.js +26 -0
- package/lib/acde/templates/desktop/src/locales/en.js +4 -0
- package/lib/acde/templates/desktop/src/locales/zh.js +4 -0
- package/lib/acde/templates/framework/acde.config.jsonc +26 -0
- package/lib/acde-api/LICENSE +5 -0
- package/lib/acde-api/config.schema.json +563 -0
- package/lib/acde-api/package.json +51 -0
- package/lib/acde-api/src/app.d.ts +36 -0
- package/lib/acde-api/src/frame.d.ts +15 -0
- package/lib/acde-api/src/frame.js +1 -0
- package/lib/acde-api/src/index.d.ts +11 -0
- package/lib/acde-api/src/index.js +1 -0
- package/lib/acde-api/src/modules/app-modules.d.ts +81 -0
- package/lib/acde-api/src/modules/modules.d.ts +113 -0
- package/lib/acde-api/src/modules/shell-modules.d.ts +32 -0
- package/lib/acde-api/src/runtime/level.d.ts +1 -0
- package/lib/acde-api/src/runtime/level.js +1 -0
- package/lib/acde-api/src/runtime/load.d.ts +8 -0
- package/lib/acde-api/src/runtime/load.js +1 -0
- package/lib/acde-api/src/runtime/places.d.ts +3 -0
- package/lib/acde-api/src/runtime/places.js +1 -0
- package/lib/acde-api/src/runtime/platforms.d.ts +5 -0
- package/lib/acde-api/src/runtime/platforms.js +1 -0
- package/lib/acde-api/src/shell.d.ts +14 -0
- package/lib/acde-api/src/types/capabilities.d.ts +34 -0
- package/lib/acde-api/src/types/config.d.ts +55 -0
- package/lib/acde-api/src/types/events.d.ts +151 -0
- package/lib/acde-api/src/types/manifest.d.ts +83 -0
- package/lib/acde-api/src/types/office.d.ts +118 -0
- package/lib/acde-api/src/types/page.d.ts +1090 -0
- package/lib/acde-api/src/types/permissions.d.ts +50 -0
- package/lib/acde-api/src/types/service.d.ts +35 -0
- package/lib/acde-api/src/validate.d.ts +64 -0
- package/lib/acde-api/src/validate.js +1 -0
- package/lib/acde-api/src/vite.d.ts +3 -0
- package/lib/acde-api/src/vite.js +9 -0
- package/package.json +11 -4
- package/README.md +0 -3
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Acde } from './acde.ts';
|
|
2
|
+
import { Locator, type TextMatch, type Timeout } from './locator.ts';
|
|
3
|
+
import { type Image } from './png.ts';
|
|
4
|
+
import { type Capturable } from './screenshot.ts';
|
|
5
|
+
import type { AppWindow } from './window.ts';
|
|
6
|
+
export interface ScreenshotAssertion extends Timeout {
|
|
7
|
+
readonly maxDiffPixels?: number;
|
|
8
|
+
readonly maxDiffPixelRatio?: number;
|
|
9
|
+
readonly threshold?: number;
|
|
10
|
+
readonly mask?: readonly Capturable[];
|
|
11
|
+
}
|
|
12
|
+
interface Check {
|
|
13
|
+
readonly pass: boolean | null;
|
|
14
|
+
readonly saw: string;
|
|
15
|
+
}
|
|
16
|
+
export declare class AssertionError extends Error {
|
|
17
|
+
constructor(message: string);
|
|
18
|
+
}
|
|
19
|
+
export declare class LocatorAssertions {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(locator: Locator, negated?: boolean);
|
|
22
|
+
get not(): LocatorAssertions;
|
|
23
|
+
toBeVisible(options?: Timeout): Promise<void>;
|
|
24
|
+
toBeHidden(options?: Timeout): Promise<void>;
|
|
25
|
+
toHaveCount(count: number, options?: Timeout): Promise<void>;
|
|
26
|
+
toHaveText(expected: TextMatch, options?: Timeout & {
|
|
27
|
+
readonly exact?: boolean;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
toContainText(expected: TextMatch, options?: Timeout): Promise<void>;
|
|
30
|
+
toHaveValue(expected: TextMatch, options?: Timeout): Promise<void>;
|
|
31
|
+
toHaveState(state: string, options?: Timeout): Promise<void>;
|
|
32
|
+
toBeChecked(options?: Timeout): Promise<void>;
|
|
33
|
+
toBeDisabled(options?: Timeout): Promise<void>;
|
|
34
|
+
toBeEnabled(options?: Timeout): Promise<void>;
|
|
35
|
+
toBeFocused(options?: Timeout): Promise<void>;
|
|
36
|
+
toHaveAttribute(name: string, expected?: TextMatch, options?: Timeout): Promise<void>;
|
|
37
|
+
toHaveClass(expected: TextMatch, options?: Timeout): Promise<void>;
|
|
38
|
+
toHaveCSS(name: string, expected: TextMatch, options?: Timeout): Promise<void>;
|
|
39
|
+
toHaveJSProperty(name: string, expected: unknown, options?: Timeout): Promise<void>;
|
|
40
|
+
toBeEmpty(options?: Timeout): Promise<void>;
|
|
41
|
+
toBeEditable(options?: Timeout): Promise<void>;
|
|
42
|
+
toBeInViewport(options?: Timeout & {
|
|
43
|
+
readonly ratio?: number;
|
|
44
|
+
}): Promise<void>;
|
|
45
|
+
toHaveScreenshot(name?: string | ScreenshotAssertion, options?: ScreenshotAssertion): Promise<void>;
|
|
46
|
+
static screenshot(acde: Acde, target: string, name: string | undefined, options: ScreenshotAssertion, take: () => Promise<Image>): Promise<void>;
|
|
47
|
+
static poll(what: string, timeout: number, negated: boolean, attempt: () => Promise<Check>): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
export declare class WindowAssertions {
|
|
50
|
+
#private;
|
|
51
|
+
constructor(window: AppWindow, negated?: boolean);
|
|
52
|
+
get not(): WindowAssertions;
|
|
53
|
+
toBeOpen(options?: Timeout): Promise<void>;
|
|
54
|
+
toHaveTitle(expected: TextMatch, options?: Timeout): Promise<void>;
|
|
55
|
+
toHaveScreenshot(name?: string | ScreenshotAssertion, options?: ScreenshotAssertion): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
export declare function expect(target: Locator): LocatorAssertions;
|
|
58
|
+
export declare function expect(target: AppWindow): WindowAssertions;
|
|
59
|
+
export declare function expect(target: Locator | AppWindow): LocatorAssertions | WindowAssertions;
|
|
60
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { InspectNode } from '@dopame/acde-api';
|
|
2
|
+
import type { PermissionDecision, PermissionPrompt } from './acde.ts';
|
|
3
|
+
import type { ConsoleEntry, Permissions, QueryResult, RequestEntry, Snapshot, Web } from './acde.ts';
|
|
4
|
+
export declare class Format {
|
|
5
|
+
static console(e: ConsoleEntry): string;
|
|
6
|
+
static request(e: RequestEntry): string;
|
|
7
|
+
static matches(found: QueryResult, selector: string): string;
|
|
8
|
+
static prompt(prompt: PermissionPrompt): string;
|
|
9
|
+
static decision(decision: PermissionDecision): string;
|
|
10
|
+
static permissions(permissions: Permissions): string;
|
|
11
|
+
static answered(prompt: PermissionPrompt, allow: boolean): string;
|
|
12
|
+
static waiting(prompt: PermissionPrompt, how: string): string;
|
|
13
|
+
static webs(webs: readonly Web[]): string;
|
|
14
|
+
static node(n: InspectNode): string;
|
|
15
|
+
static found(snapshot: Snapshot, text: string): string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { ACTIONS, Acde, ActError, type ActResult, type AttachOptions, type ConsoleEntry, type ConsoleLevel, type ConsoleOptions, type DevPage, type Dialog, type DialogAnswer, type DialogType, type DropOptions, type Dropped, type Emulation, LaunchError, type LaunchOptions, type LaunchPhase, type NetworkOptions, type PermissionDecision, type PermissionPrompt, type Permissions, type PromptMatch, type QueryOptions, type QueryResult, type RequestEntry, type RouteOptions, type RouteResponse, type Shot, type Snapshot, type SnapshotOptions, type Step, type UrlMatch, type WaitConsoleOptions, type WaitRequestOptions, type Web, } from './acde.ts';
|
|
2
|
+
export { Clock, type ClockDuration, type ClockState, type ClockTime } from './clock.ts';
|
|
3
|
+
export { Format } from './format.ts';
|
|
4
|
+
export { Keyboard, Modifiers, Mouse, type InputEvent, type Modifier, type MouseButton } from './input.ts';
|
|
5
|
+
export { AssertionError, expect, LocatorAssertions, WindowAssertions, type ScreenshotAssertion } from './expect.ts';
|
|
6
|
+
export { Locator, type FilterOptions, type Query, type RoleOptions, type Source, type TextMatch, type TextOptions, type Timeout } from './locator.ts';
|
|
7
|
+
export { Logs, type LogLine, type LogSlice } from './logs.ts';
|
|
8
|
+
export { Png, type Diff, type DiffOptions, type Image } from './png.ts';
|
|
9
|
+
export { Screenshots, type Capturable, type Capture, type ScreenshotContext, type ScreenshotOptions } from './screenshot.ts';
|
|
10
|
+
export { Trace, type TraceStep } from './trace.ts';
|
|
11
|
+
export { Video } from './video.ts';
|
|
12
|
+
export { AppWindow, type WindowMatch } from './window.ts';
|
|
13
|
+
export type { InspectAction, InspectArg, InspectMatch, InspectNode, InspectWindow } from '@dopame/acde-api';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type Acde, type ActResult } from './acde.ts';
|
|
2
|
+
export type Modifier = 'Shift' | 'Control' | 'Alt' | 'Meta' | 'ControlOrMeta';
|
|
3
|
+
export type MouseButton = 'left' | 'right' | 'middle';
|
|
4
|
+
export type InputEvent = {
|
|
5
|
+
readonly type: 'move';
|
|
6
|
+
readonly x: number;
|
|
7
|
+
readonly y: number;
|
|
8
|
+
} | {
|
|
9
|
+
readonly type: 'down' | 'up';
|
|
10
|
+
readonly x: number;
|
|
11
|
+
readonly y: number;
|
|
12
|
+
readonly button?: MouseButton;
|
|
13
|
+
} | {
|
|
14
|
+
readonly type: 'wheel';
|
|
15
|
+
readonly x: number;
|
|
16
|
+
readonly y: number;
|
|
17
|
+
readonly dx?: number;
|
|
18
|
+
readonly dy?: number;
|
|
19
|
+
} | {
|
|
20
|
+
readonly type: 'keydown' | 'keyup';
|
|
21
|
+
readonly key: string;
|
|
22
|
+
} | {
|
|
23
|
+
readonly type: 'text';
|
|
24
|
+
readonly text: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly type: 'wait';
|
|
27
|
+
readonly ms: number;
|
|
28
|
+
};
|
|
29
|
+
export interface InputTarget {
|
|
30
|
+
readonly acde: Acde;
|
|
31
|
+
describe(): string;
|
|
32
|
+
web(): Promise<string>;
|
|
33
|
+
}
|
|
34
|
+
export declare const Modifiers: {
|
|
35
|
+
chord(modifiers: readonly Modifier[] | undefined): string | null;
|
|
36
|
+
};
|
|
37
|
+
interface ClickOptions {
|
|
38
|
+
readonly button?: MouseButton;
|
|
39
|
+
readonly clickCount?: number;
|
|
40
|
+
readonly modifiers?: readonly Modifier[];
|
|
41
|
+
}
|
|
42
|
+
export declare class Mouse {
|
|
43
|
+
#private;
|
|
44
|
+
constructor(target: InputTarget);
|
|
45
|
+
get position(): {
|
|
46
|
+
readonly x: number;
|
|
47
|
+
readonly y: number;
|
|
48
|
+
};
|
|
49
|
+
move(x: number, y: number, options?: {
|
|
50
|
+
readonly steps?: number;
|
|
51
|
+
}): Promise<ActResult>;
|
|
52
|
+
down(options?: {
|
|
53
|
+
readonly button?: MouseButton;
|
|
54
|
+
}): Promise<ActResult>;
|
|
55
|
+
up(options?: {
|
|
56
|
+
readonly button?: MouseButton;
|
|
57
|
+
}): Promise<ActResult>;
|
|
58
|
+
click(x: number, y: number, options?: ClickOptions): Promise<ActResult>;
|
|
59
|
+
dblclick(x: number, y: number, options?: {
|
|
60
|
+
readonly button?: MouseButton;
|
|
61
|
+
readonly modifiers?: readonly Modifier[];
|
|
62
|
+
}): Promise<ActResult>;
|
|
63
|
+
wheel(deltaX: number, deltaY: number): Promise<ActResult>;
|
|
64
|
+
}
|
|
65
|
+
export declare class Keyboard {
|
|
66
|
+
#private;
|
|
67
|
+
constructor(target: InputTarget);
|
|
68
|
+
static keys(modifiers: readonly Modifier[] | undefined): string[];
|
|
69
|
+
down(key: string): Promise<ActResult>;
|
|
70
|
+
up(key: string): Promise<ActResult>;
|
|
71
|
+
press(keys: string): Promise<ActResult>;
|
|
72
|
+
type(text: string): Promise<ActResult>;
|
|
73
|
+
insertText(text: string): Promise<ActResult>;
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { InspectMatch, InspectNode, InspectWindow } from '@dopame/acde-api';
|
|
2
|
+
import { type Acde, type ActResult, type Shot } from './acde.ts';
|
|
3
|
+
import { type Modifier } from './input.ts';
|
|
4
|
+
import { type Capture, type ScreenshotOptions } from './screenshot.ts';
|
|
5
|
+
export type TextMatch = string | RegExp;
|
|
6
|
+
export interface RoleOptions {
|
|
7
|
+
readonly name?: TextMatch;
|
|
8
|
+
readonly exact?: boolean;
|
|
9
|
+
readonly checked?: boolean;
|
|
10
|
+
readonly disabled?: boolean;
|
|
11
|
+
readonly selected?: boolean;
|
|
12
|
+
readonly expanded?: boolean;
|
|
13
|
+
readonly pressed?: boolean;
|
|
14
|
+
readonly focused?: boolean;
|
|
15
|
+
readonly level?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TextOptions {
|
|
18
|
+
readonly exact?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface FilterOptions {
|
|
21
|
+
readonly hasText?: TextMatch;
|
|
22
|
+
readonly hasNotText?: TextMatch;
|
|
23
|
+
readonly has?: Locator;
|
|
24
|
+
readonly hasNot?: Locator;
|
|
25
|
+
}
|
|
26
|
+
export interface Timeout {
|
|
27
|
+
readonly timeout?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface Source {
|
|
30
|
+
readonly nodes: readonly InspectNode[];
|
|
31
|
+
children(node: InspectNode): Promise<readonly InspectNode[]>;
|
|
32
|
+
query(selector: string, within: InspectNode | null, attributes?: readonly string[]): Promise<readonly InspectMatch[]>;
|
|
33
|
+
}
|
|
34
|
+
export interface Tree {
|
|
35
|
+
readonly window: InspectWindow | null;
|
|
36
|
+
readonly source: Source;
|
|
37
|
+
}
|
|
38
|
+
export interface Scope {
|
|
39
|
+
readonly acde: Acde;
|
|
40
|
+
tree(): Promise<Tree>;
|
|
41
|
+
capture(): Promise<Capture>;
|
|
42
|
+
describe(): string;
|
|
43
|
+
}
|
|
44
|
+
export type Query = {
|
|
45
|
+
readonly kind: 'role';
|
|
46
|
+
readonly role: string;
|
|
47
|
+
readonly options: RoleOptions;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: 'text';
|
|
50
|
+
readonly text: TextMatch;
|
|
51
|
+
readonly options: TextOptions;
|
|
52
|
+
} | {
|
|
53
|
+
readonly kind: 'css';
|
|
54
|
+
readonly selector: string;
|
|
55
|
+
} | {
|
|
56
|
+
readonly kind: 'label';
|
|
57
|
+
readonly text: TextMatch;
|
|
58
|
+
readonly options: TextOptions;
|
|
59
|
+
} | {
|
|
60
|
+
readonly kind: 'attr';
|
|
61
|
+
readonly name: 'placeholder' | 'title' | 'alt';
|
|
62
|
+
readonly text: TextMatch;
|
|
63
|
+
readonly options: TextOptions;
|
|
64
|
+
} | {
|
|
65
|
+
readonly kind: 'filter';
|
|
66
|
+
readonly options: FilterOptions;
|
|
67
|
+
} | {
|
|
68
|
+
readonly kind: 'nth';
|
|
69
|
+
readonly index: number;
|
|
70
|
+
} | {
|
|
71
|
+
readonly kind: 'or';
|
|
72
|
+
readonly alternatives: readonly (readonly Query[])[];
|
|
73
|
+
} | {
|
|
74
|
+
readonly kind: 'and';
|
|
75
|
+
readonly queries: readonly Query[];
|
|
76
|
+
};
|
|
77
|
+
export interface Resolved {
|
|
78
|
+
readonly window: InspectWindow | null;
|
|
79
|
+
readonly nodes: readonly InspectNode[];
|
|
80
|
+
readonly source: Source;
|
|
81
|
+
}
|
|
82
|
+
export declare class Locator {
|
|
83
|
+
#private;
|
|
84
|
+
readonly scope: Scope;
|
|
85
|
+
constructor(scope: Scope, queries: readonly Query[]);
|
|
86
|
+
getByRole(role: string, options?: RoleOptions): Locator;
|
|
87
|
+
getByText(text: TextMatch, options?: TextOptions): Locator;
|
|
88
|
+
locator(selector: string): Locator;
|
|
89
|
+
getByTestId(id: string): Locator;
|
|
90
|
+
getByLabel(text: TextMatch, options?: TextOptions): Locator;
|
|
91
|
+
getByPlaceholder(text: TextMatch, options?: TextOptions): Locator;
|
|
92
|
+
getByTitle(text: TextMatch, options?: TextOptions): Locator;
|
|
93
|
+
getByAltText(text: TextMatch, options?: TextOptions): Locator;
|
|
94
|
+
filter(options: FilterOptions): Locator;
|
|
95
|
+
or(other: Locator): Locator;
|
|
96
|
+
and(other: Locator): Locator;
|
|
97
|
+
get queries(): readonly Query[];
|
|
98
|
+
nth(index: number): Locator;
|
|
99
|
+
first(): Locator;
|
|
100
|
+
last(): Locator;
|
|
101
|
+
describe(): string;
|
|
102
|
+
toString(): string;
|
|
103
|
+
resolve(): Promise<Resolved>;
|
|
104
|
+
text(options?: Timeout): Promise<string>;
|
|
105
|
+
textContent(options?: Timeout): Promise<string>;
|
|
106
|
+
static content(source: Source, node: InspectNode): Promise<string>;
|
|
107
|
+
static text(source: Source, node: InspectNode): Promise<string>;
|
|
108
|
+
count(): Promise<number>;
|
|
109
|
+
isVisible(): Promise<boolean>;
|
|
110
|
+
static visible(node: InspectNode): boolean;
|
|
111
|
+
all(): Promise<Locator[]>;
|
|
112
|
+
node(options?: Timeout): Promise<InspectNode>;
|
|
113
|
+
ref(options?: Timeout): Promise<string>;
|
|
114
|
+
name(options?: Timeout): Promise<string>;
|
|
115
|
+
value(options?: Timeout): Promise<string | null>;
|
|
116
|
+
states(options?: Timeout): Promise<readonly string[]>;
|
|
117
|
+
waitFor(options?: Timeout & {
|
|
118
|
+
readonly state?: 'visible' | 'hidden';
|
|
119
|
+
}): Promise<void>;
|
|
120
|
+
click(options?: Timeout & {
|
|
121
|
+
readonly button?: 'left' | 'right';
|
|
122
|
+
readonly clickCount?: 1 | 2;
|
|
123
|
+
readonly modifiers?: readonly Modifier[];
|
|
124
|
+
}): Promise<ActResult>;
|
|
125
|
+
dblclick(options?: Timeout & {
|
|
126
|
+
readonly modifiers?: readonly Modifier[];
|
|
127
|
+
}): Promise<ActResult>;
|
|
128
|
+
hover(options?: Timeout & {
|
|
129
|
+
readonly modifiers?: readonly Modifier[];
|
|
130
|
+
}): Promise<ActResult>;
|
|
131
|
+
fill(text: string, options?: Timeout): Promise<ActResult>;
|
|
132
|
+
clear(options?: Timeout): Promise<ActResult>;
|
|
133
|
+
type(text: string, options?: Timeout): Promise<ActResult>;
|
|
134
|
+
press(keys: string, options?: Timeout): Promise<ActResult>;
|
|
135
|
+
focus(options?: Timeout): Promise<ActResult>;
|
|
136
|
+
scroll(dy?: number, options?: Timeout): Promise<ActResult>;
|
|
137
|
+
selectOption(values: string | readonly string[], options?: Timeout): Promise<ActResult>;
|
|
138
|
+
check(options?: Timeout): Promise<void>;
|
|
139
|
+
uncheck(options?: Timeout): Promise<void>;
|
|
140
|
+
setChecked(checked: boolean, options?: Timeout): Promise<void>;
|
|
141
|
+
dragTo(target: Locator, options?: Timeout): Promise<ActResult>;
|
|
142
|
+
screenshot(options?: ScreenshotOptions & Timeout): Promise<Shot>;
|
|
143
|
+
capture(): Promise<Capture>;
|
|
144
|
+
rects(): Promise<readonly (readonly [number, number, number, number])[]>;
|
|
145
|
+
static match(source: Source, queries: readonly Query[]): Promise<InspectNode[]>;
|
|
146
|
+
evaluate<T = unknown, A = unknown>(fn: string | ((element: any, arg: A) => T | Promise<T>), arg?: A, options?: Timeout): Promise<Awaited<T>>;
|
|
147
|
+
static testId(id: string): string;
|
|
148
|
+
static normalize(text: string): string;
|
|
149
|
+
static matches(actual: string | undefined, expected: TextMatch, exact?: boolean): boolean;
|
|
150
|
+
static line(node: InspectNode, hidden?: boolean): string;
|
|
151
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface LogLine {
|
|
2
|
+
readonly seq: number;
|
|
3
|
+
readonly stream: 'stdout' | 'stderr';
|
|
4
|
+
readonly text: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LogSlice {
|
|
7
|
+
readonly lines: readonly LogLine[];
|
|
8
|
+
readonly text: string;
|
|
9
|
+
readonly next: number;
|
|
10
|
+
readonly dropped: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class Logs {
|
|
13
|
+
#private;
|
|
14
|
+
static readonly KEEP = 5000;
|
|
15
|
+
follow(stream: AsyncIterable<Uint8Array | string>, name: LogLine['stream']): void;
|
|
16
|
+
drained(ms: number): Promise<boolean>;
|
|
17
|
+
push(stream: LogLine['stream'], text: string): void;
|
|
18
|
+
get next(): number;
|
|
19
|
+
since(seq: number, options?: {
|
|
20
|
+
readonly grep?: RegExp;
|
|
21
|
+
readonly limit?: number;
|
|
22
|
+
}): LogSlice;
|
|
23
|
+
tail(count: number, options?: {
|
|
24
|
+
readonly grep?: RegExp;
|
|
25
|
+
}): LogSlice;
|
|
26
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface Image {
|
|
2
|
+
readonly width: number;
|
|
3
|
+
readonly height: number;
|
|
4
|
+
readonly data: Uint8Array;
|
|
5
|
+
}
|
|
6
|
+
export interface DiffOptions {
|
|
7
|
+
readonly threshold?: number;
|
|
8
|
+
readonly antialiasing?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface Diff {
|
|
11
|
+
readonly pixels: number;
|
|
12
|
+
readonly image: Image;
|
|
13
|
+
}
|
|
14
|
+
export declare class Png {
|
|
15
|
+
#private;
|
|
16
|
+
static readonly DIFF_THRESHOLD = 0.2;
|
|
17
|
+
static decode(png: Uint8Array): Image;
|
|
18
|
+
static encode(image: Image): Buffer;
|
|
19
|
+
static crop(image: Image, x: number, y: number, width: number, height: number): Image;
|
|
20
|
+
static fill(image: Image, x: number, y: number, width: number, height: number, rgba: readonly [number, number, number, number]): Image;
|
|
21
|
+
static same(a: Image, b: Image): boolean;
|
|
22
|
+
static diff(actual: Image, expected: Image, options?: DiffOptions): Diff;
|
|
23
|
+
static chunks(png: Uint8Array): {
|
|
24
|
+
type: string;
|
|
25
|
+
data: Buffer;
|
|
26
|
+
}[];
|
|
27
|
+
static animate(frames: readonly {
|
|
28
|
+
readonly png: Uint8Array;
|
|
29
|
+
readonly ms: number;
|
|
30
|
+
}[]): Buffer;
|
|
31
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { InspectNode, InspectWindow } from '@dopame/acde-api';
|
|
2
|
+
import { type Image } from './png.ts';
|
|
3
|
+
export interface Capture {
|
|
4
|
+
readonly image: Image;
|
|
5
|
+
readonly window: InspectWindow;
|
|
6
|
+
readonly scale: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Capturable {
|
|
9
|
+
capture(): Promise<Capture>;
|
|
10
|
+
rects(): Promise<readonly (readonly [number, number, number, number])[]>;
|
|
11
|
+
describe(): string;
|
|
12
|
+
}
|
|
13
|
+
export interface ScreenshotOptions {
|
|
14
|
+
readonly path?: string;
|
|
15
|
+
readonly mask?: readonly Capturable[];
|
|
16
|
+
}
|
|
17
|
+
export interface ScreenshotContext {
|
|
18
|
+
readonly dir: string;
|
|
19
|
+
readonly results: string | null;
|
|
20
|
+
readonly update: boolean;
|
|
21
|
+
readonly ci: boolean;
|
|
22
|
+
readonly test: string;
|
|
23
|
+
}
|
|
24
|
+
export declare class Screenshots {
|
|
25
|
+
#private;
|
|
26
|
+
static readonly MASK: readonly [number, number, number, number];
|
|
27
|
+
static context: ScreenshotContext | null;
|
|
28
|
+
static window(capture: Capture, mask?: readonly Capturable[]): Promise<Image>;
|
|
29
|
+
static element(capture: Capture, node: InspectNode, mask?: readonly Capturable[]): Promise<Image>;
|
|
30
|
+
static save(image: Image, path: string | undefined): Buffer;
|
|
31
|
+
static baseline(name: string | undefined): {
|
|
32
|
+
path: string;
|
|
33
|
+
label: string;
|
|
34
|
+
};
|
|
35
|
+
static read(path: string): Image | null;
|
|
36
|
+
static slug(text: string): string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface TraceStep {
|
|
2
|
+
readonly index: number;
|
|
3
|
+
readonly title: string;
|
|
4
|
+
readonly at: number;
|
|
5
|
+
readonly ms: number;
|
|
6
|
+
readonly ok: boolean;
|
|
7
|
+
readonly text: string;
|
|
8
|
+
readonly screen: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface TraceShooter {
|
|
11
|
+
readonly closed: boolean;
|
|
12
|
+
screen(): Promise<{
|
|
13
|
+
readonly png: Buffer;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
export declare class Trace {
|
|
17
|
+
#private;
|
|
18
|
+
static readonly TEXT_MAX = 4000;
|
|
19
|
+
screenshots: boolean;
|
|
20
|
+
constructor(shooter: TraceShooter);
|
|
21
|
+
get steps(): readonly TraceStep[];
|
|
22
|
+
step<T>(title: string, run: () => Promise<T>, said?: (value: T) => string): Promise<T>;
|
|
23
|
+
text(): string;
|
|
24
|
+
write(dir: string, title: string): string[];
|
|
25
|
+
static html(title: string, steps: readonly TraceStep[], started: number): string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import type { InspectAction, InspectArg, InspectMatch, InspectNode, InspectWindow } from '@dopame/acde-api';
|
|
2
|
+
import type { Logs } from './logs.ts';
|
|
3
|
+
export interface Web {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly app: string | null;
|
|
6
|
+
readonly kind: string;
|
|
7
|
+
readonly window: number;
|
|
8
|
+
readonly title: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface Shot {
|
|
11
|
+
readonly png: Buffer;
|
|
12
|
+
readonly width: number;
|
|
13
|
+
readonly height: number;
|
|
14
|
+
readonly path: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface SnapshotOptions {
|
|
17
|
+
readonly window?: string;
|
|
18
|
+
readonly ref?: string;
|
|
19
|
+
readonly all?: boolean;
|
|
20
|
+
readonly diff?: boolean;
|
|
21
|
+
readonly limit?: number;
|
|
22
|
+
readonly find?: string;
|
|
23
|
+
readonly tree?: boolean;
|
|
24
|
+
readonly offscreen?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface QueryOptions {
|
|
27
|
+
readonly selector: string;
|
|
28
|
+
readonly window?: string;
|
|
29
|
+
readonly ref?: string;
|
|
30
|
+
readonly limit?: number;
|
|
31
|
+
readonly attributes?: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
export interface QueryResult {
|
|
34
|
+
readonly window: string;
|
|
35
|
+
readonly count: number;
|
|
36
|
+
readonly nodes: readonly InspectMatch[];
|
|
37
|
+
}
|
|
38
|
+
export type ConsoleLevel = 'log' | 'info' | 'warn' | 'error' | 'debug';
|
|
39
|
+
export interface ConsoleEntry {
|
|
40
|
+
readonly seq: number;
|
|
41
|
+
readonly time: number;
|
|
42
|
+
readonly web: string;
|
|
43
|
+
readonly app: string | null;
|
|
44
|
+
readonly kind: 'console' | 'error' | 'rejection' | 'dialog';
|
|
45
|
+
readonly level: ConsoleLevel;
|
|
46
|
+
readonly text: string;
|
|
47
|
+
readonly dialog?: Dialog;
|
|
48
|
+
}
|
|
49
|
+
export type DialogType = 'alert' | 'confirm' | 'prompt';
|
|
50
|
+
export interface Dialog {
|
|
51
|
+
readonly type: DialogType;
|
|
52
|
+
readonly message: string;
|
|
53
|
+
readonly defaultValue: string | null;
|
|
54
|
+
readonly answered: boolean;
|
|
55
|
+
readonly accept: boolean;
|
|
56
|
+
readonly text: string | null;
|
|
57
|
+
}
|
|
58
|
+
export interface DialogAnswer {
|
|
59
|
+
readonly accept?: boolean;
|
|
60
|
+
readonly text?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface RequestEntry {
|
|
63
|
+
readonly seq: number;
|
|
64
|
+
readonly time: number;
|
|
65
|
+
readonly web: string;
|
|
66
|
+
readonly app: string | null;
|
|
67
|
+
readonly id: number;
|
|
68
|
+
readonly kind: 'fetch' | 'xhr' | 'websocket' | 'eventsource' | 'image' | 'stylesheet' | 'font';
|
|
69
|
+
readonly method: string;
|
|
70
|
+
readonly url: string;
|
|
71
|
+
readonly requestBytes: number;
|
|
72
|
+
readonly status: number | null;
|
|
73
|
+
readonly statusText: string | null;
|
|
74
|
+
readonly responseBytes: number | null;
|
|
75
|
+
readonly ms: number | null;
|
|
76
|
+
readonly error: string | null;
|
|
77
|
+
readonly done: boolean;
|
|
78
|
+
readonly mocked?: true;
|
|
79
|
+
}
|
|
80
|
+
export interface DevPage<T> {
|
|
81
|
+
readonly entries: readonly T[];
|
|
82
|
+
readonly next: number;
|
|
83
|
+
readonly dropped: number;
|
|
84
|
+
}
|
|
85
|
+
export interface ConsoleOptions {
|
|
86
|
+
readonly web?: string;
|
|
87
|
+
readonly since?: number;
|
|
88
|
+
readonly limit?: number;
|
|
89
|
+
readonly level?: ConsoleLevel | 'errors';
|
|
90
|
+
}
|
|
91
|
+
export interface NetworkOptions {
|
|
92
|
+
readonly web?: string;
|
|
93
|
+
readonly since?: number;
|
|
94
|
+
readonly limit?: number;
|
|
95
|
+
readonly failed?: boolean;
|
|
96
|
+
}
|
|
97
|
+
export interface Emulation {
|
|
98
|
+
readonly colorScheme?: 'light' | 'dark' | null;
|
|
99
|
+
}
|
|
100
|
+
export interface Snapshot {
|
|
101
|
+
readonly text: string;
|
|
102
|
+
readonly windows: readonly InspectWindow[];
|
|
103
|
+
readonly trees: Readonly<Record<string, readonly InspectNode[]>>;
|
|
104
|
+
}
|
|
105
|
+
export interface ActResult {
|
|
106
|
+
readonly ok: boolean;
|
|
107
|
+
readonly text: string;
|
|
108
|
+
readonly ended?: true;
|
|
109
|
+
}
|
|
110
|
+
export declare const ACTIONS: readonly InspectAction[];
|
|
111
|
+
export interface Step {
|
|
112
|
+
readonly ref: string;
|
|
113
|
+
readonly action: InspectAction;
|
|
114
|
+
readonly arg?: InspectArg;
|
|
115
|
+
}
|
|
116
|
+
export type UrlMatch = string | RegExp;
|
|
117
|
+
export type RouteResponse = {
|
|
118
|
+
readonly status?: number;
|
|
119
|
+
readonly statusText?: string;
|
|
120
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
121
|
+
readonly contentType?: string;
|
|
122
|
+
readonly body?: string | Uint8Array;
|
|
123
|
+
readonly json?: unknown;
|
|
124
|
+
} | {
|
|
125
|
+
readonly abort: true | string;
|
|
126
|
+
};
|
|
127
|
+
export interface RouteOptions {
|
|
128
|
+
readonly method?: string;
|
|
129
|
+
readonly web?: string;
|
|
130
|
+
readonly times?: number;
|
|
131
|
+
}
|
|
132
|
+
export interface WaitRequestOptions {
|
|
133
|
+
readonly method?: string;
|
|
134
|
+
readonly web?: string;
|
|
135
|
+
readonly timeout?: number;
|
|
136
|
+
}
|
|
137
|
+
export interface WaitConsoleOptions {
|
|
138
|
+
readonly level?: ConsoleLevel | 'errors';
|
|
139
|
+
readonly web?: string;
|
|
140
|
+
readonly timeout?: number;
|
|
141
|
+
}
|
|
142
|
+
export interface AttachOptions {
|
|
143
|
+
readonly session?: number;
|
|
144
|
+
readonly cwd?: string;
|
|
145
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
146
|
+
readonly timeout?: number;
|
|
147
|
+
readonly say?: (line: string) => void;
|
|
148
|
+
}
|
|
149
|
+
export interface LaunchOptions {
|
|
150
|
+
readonly dirs?: readonly string[];
|
|
151
|
+
readonly desktop?: string;
|
|
152
|
+
readonly app?: string;
|
|
153
|
+
readonly out?: string;
|
|
154
|
+
readonly cwd?: string;
|
|
155
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
156
|
+
readonly headless?: boolean;
|
|
157
|
+
readonly timeout?: number;
|
|
158
|
+
readonly startTimeout?: number;
|
|
159
|
+
readonly force?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface PermissionPrompt {
|
|
162
|
+
readonly id: number;
|
|
163
|
+
readonly app: string;
|
|
164
|
+
readonly label: string;
|
|
165
|
+
readonly capability: string;
|
|
166
|
+
readonly reason: string;
|
|
167
|
+
}
|
|
168
|
+
export interface PermissionDecision {
|
|
169
|
+
readonly app: string;
|
|
170
|
+
readonly label: string | null;
|
|
171
|
+
readonly capability: string;
|
|
172
|
+
readonly decision: 'granted' | 'denied';
|
|
173
|
+
readonly folder?: {
|
|
174
|
+
readonly label: string;
|
|
175
|
+
readonly exists: boolean;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
export interface Permissions {
|
|
179
|
+
readonly pending: readonly PermissionPrompt[];
|
|
180
|
+
readonly decisions: readonly PermissionDecision[];
|
|
181
|
+
}
|
|
182
|
+
export interface PromptMatch {
|
|
183
|
+
readonly app?: string;
|
|
184
|
+
readonly capability?: string;
|
|
185
|
+
readonly timeout?: number;
|
|
186
|
+
}
|
|
187
|
+
export interface DropOptions {
|
|
188
|
+
readonly web?: string;
|
|
189
|
+
readonly x?: number;
|
|
190
|
+
readonly y?: number;
|
|
191
|
+
}
|
|
192
|
+
export interface Dropped {
|
|
193
|
+
readonly web: string;
|
|
194
|
+
readonly window: number;
|
|
195
|
+
readonly files: readonly string[];
|
|
196
|
+
}
|
|
197
|
+
export declare class ActError extends Error {
|
|
198
|
+
readonly result: ActResult;
|
|
199
|
+
constructor(what: string, result: ActResult);
|
|
200
|
+
}
|
|
201
|
+
export type LaunchPhase = 'session' | 'window' | 'exited' | 'failed';
|
|
202
|
+
export declare class LaunchError extends Error {
|
|
203
|
+
#private;
|
|
204
|
+
static readonly TAIL = 40;
|
|
205
|
+
constructor(phase: LaunchPhase, said: string, logs: Logs, options?: {
|
|
206
|
+
code?: number;
|
|
207
|
+
cause?: unknown;
|
|
208
|
+
});
|
|
209
|
+
get phase(): LaunchPhase;
|
|
210
|
+
get logs(): Logs;
|
|
211
|
+
get code(): number | null;
|
|
212
|
+
static stalled(phase: 'session' | 'window' | 'exited', head: string, logs: Logs, code?: number): LaunchError;
|
|
213
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Acde } from './acde.ts';
|
|
2
|
+
export declare class Video {
|
|
3
|
+
#private;
|
|
4
|
+
static readonly FPS = 4;
|
|
5
|
+
static readonly MAX_FRAMES = 600;
|
|
6
|
+
private constructor();
|
|
7
|
+
static start(acde: Acde, fps?: number): Video;
|
|
8
|
+
get frames(): number;
|
|
9
|
+
stop(): Promise<void>;
|
|
10
|
+
write(path: string): {
|
|
11
|
+
readonly frames: number;
|
|
12
|
+
readonly dropped: number;
|
|
13
|
+
} | null;
|
|
14
|
+
}
|