Skip to main content

Interface: ResolveContext

Defined in: packages/uimatch-selector-spi/src/index.ts:13

Context provided to the resolver plugin

Properties​

anchorsPath?​

optional anchorsPath: string;

Defined in: packages/uimatch-selector-spi/src/index.ts:28

Path to anchors JSON file (if provided) Contains AST/snippet-based selector hints


initialSelector​

initialSelector: string;

Defined in: packages/uimatch-selector-spi/src/index.ts:22

Initial selector provided by the user (e.g., 'button.submit', '.my-component')


metadata?​

optional metadata: object;

Defined in: packages/uimatch-selector-spi/src/index.ts:59

Additional context that may be useful for resolution

Index Signature​

[key: string]: unknown

Any other contextual hints

componentId?​

optional componentId: string;

Component identifier or name (if known)


postWrite()?​

optional postWrite: (path, anchors) => Promise<void>;

Defined in: packages/uimatch-selector-spi/src/index.ts:43

Optional hook to persist updated anchors after successful resolution If not provided, plugins that support write-back are responsible for validating and persisting their own data.

Parameters​

path​

string

Path to anchors file

anchors​

object

Updated anchors data

Returns​

Promise<void>


probe​

probe: Probe;

Defined in: packages/uimatch-selector-spi/src/index.ts:48

Probe for lightweight liveness checks


projectRoot?​

optional projectRoot: string;

Defined in: packages/uimatch-selector-spi/src/index.ts:54

Canonical project root directory used to constrain file access. Hosts should resolve symlinks before passing this boundary.


url​

url: string;

Defined in: packages/uimatch-selector-spi/src/index.ts:17

URL of the page being tested


writeBack?​

optional writeBack: boolean;

Defined in: packages/uimatch-selector-spi/src/index.ts:33

Whether to write back resolved selectors to anchors file