Skip to main content

Interface: ResolveContext

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:10

Context provided to the resolver plugin

Properties

anchorsPath?

optional anchorsPath: string;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:23

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


initialSelector

initialSelector: string;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:18

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


metadata?

optional metadata: object;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:49

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/dist/index.d.ts:36

Optional hook to persist updated anchors after successful resolution If not provided, the plugin will prepare updatedAnchors in Resolution and leave the actual file write to the host (caller)

Parameters

path

string

Path to anchors file

anchors

object

Updated anchors data

Returns

Promise<void>


probe

probe: Probe;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:40

Probe for lightweight liveness checks


projectRoot?

optional projectRoot: string;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:45

Project root directory (for resolving relative paths)

Deprecated

Use anchorsPath instead


url

url: string;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:14

URL of the page being tested


writeBack?

optional writeBack: boolean;

Defined in: packages/uimatch-selector-spi/dist/index.d.ts:27

Whether to write back resolved selectors to anchors file