effect-browser 0.2.0-beta.9 → 0.3.0-beta.11
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 +861 -1161
- package/dist/Browser-B4qncxe7.mjs +628 -0
- package/dist/Browser-B4qncxe7.mjs.map +1 -0
- package/dist/Browser.d.mts +129 -3
- package/dist/Browser.mjs +2 -22
- package/dist/BrowserError-Coy7EW1N.d.mts +140 -0
- package/dist/BrowserError.d.mts +2 -0
- package/dist/BrowserError.mjs +211 -0
- package/dist/BrowserError.mjs.map +1 -0
- package/dist/BrowserEvent-BRu2juEz.d.mts +279 -0
- package/dist/BrowserEvent.d.mts +2 -0
- package/dist/BrowserEvent.mjs +297 -0
- package/dist/BrowserEvent.mjs.map +1 -0
- package/dist/Cdp.d.mts +32 -0
- package/dist/Cdp.mjs +61 -0
- package/dist/Cdp.mjs.map +1 -0
- package/dist/Change-DNvztNLu.mjs +138 -0
- package/dist/Change-DNvztNLu.mjs.map +1 -0
- package/dist/Change-iMlcuzVD.d.mts +71 -0
- package/dist/Change.d.mts +2 -0
- package/dist/Change.mjs +2 -0
- package/dist/Chromium.d.mts +29 -81
- package/dist/Chromium.mjs +57 -392
- package/dist/Chromium.mjs.map +1 -1
- package/dist/Expect.d.mts +62 -0
- package/dist/Expect.mjs +114 -0
- package/dist/Expect.mjs.map +1 -0
- package/dist/Frame-Di2PxyF7.d.mts +119 -0
- package/dist/Frame.d.mts +2 -0
- package/dist/Frame.mjs +125 -0
- package/dist/Frame.mjs.map +1 -0
- package/dist/Moment.d.mts +2 -0
- package/dist/Moment.mjs +288 -0
- package/dist/Moment.mjs.map +1 -0
- package/dist/Motion.d.mts +40 -0
- package/dist/Motion.mjs +122 -0
- package/dist/Motion.mjs.map +1 -0
- package/dist/Page-B5cjaUp5.mjs +618 -0
- package/dist/Page-B5cjaUp5.mjs.map +1 -0
- package/dist/Page-B7X6DQUn.d.mts +595 -0
- package/dist/Page.d.mts +2 -0
- package/dist/Page.mjs +2 -0
- package/dist/Plan-Akcac63g.d.mts +209 -0
- package/dist/Plan-D1wrJVs8.mjs +508 -0
- package/dist/Plan-D1wrJVs8.mjs.map +1 -0
- package/dist/Plan.d.mts +2 -3
- package/dist/Plan.mjs +2 -2
- package/dist/Policy.d.mts +76 -0
- package/dist/Policy.mjs +237 -0
- package/dist/Policy.mjs.map +1 -0
- package/dist/Presentation.d.mts +48 -0
- package/dist/Presentation.mjs +117 -0
- package/dist/Presentation.mjs.map +1 -0
- package/dist/Snapshot-B34hZ4Jl.d.mts +68 -0
- package/dist/Snapshot.d.mts +2 -0
- package/dist/Snapshot.mjs +79 -0
- package/dist/Snapshot.mjs.map +1 -0
- package/dist/Stage.d.mts +64 -0
- package/dist/Stage.mjs +237 -0
- package/dist/Stage.mjs.map +1 -0
- package/dist/Supervisor-CYWFK3vM.d.mts +280 -0
- package/dist/Supervisor-TNKNOVzu.mjs +599 -0
- package/dist/Supervisor-TNKNOVzu.mjs.map +1 -0
- package/dist/Supervisor.d.mts +2 -0
- package/dist/Supervisor.mjs +2 -0
- package/dist/context-B6xr8nVi.mjs +261 -0
- package/dist/context-B6xr8nVi.mjs.map +1 -0
- package/dist/index.d.mts +17 -14
- package/dist/index.mjs +18 -13
- package/dist/match.inpage-xOe9LNO0.mjs +48 -0
- package/dist/match.inpage-xOe9LNO0.mjs.map +1 -0
- package/dist/page-BAf__WKX.mjs +5075 -0
- package/dist/page-BAf__WKX.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/url-Cd04Okid.mjs +264 -0
- package/dist/url-Cd04Okid.mjs.map +1 -0
- package/package.json +96 -61
- package/src/Browser.ts +672 -0
- package/src/BrowserError.ts +234 -0
- package/src/BrowserEvent.ts +296 -0
- package/src/Cdp.ts +101 -0
- package/src/Change.ts +88 -0
- package/src/Chromium.ts +102 -0
- package/src/Expect.ts +180 -0
- package/src/Frame.ts +132 -0
- package/src/Moment.ts +479 -0
- package/src/Motion.ts +166 -0
- package/src/Page.ts +522 -0
- package/src/Plan.ts +663 -0
- package/src/Policy.ts +325 -0
- package/src/Presentation.ts +195 -0
- package/src/Snapshot.ts +89 -0
- package/src/Stage.ts +467 -0
- package/src/Supervisor.ts +599 -0
- package/src/index.ts +20 -0
- package/src/internal/input/actions.ts +610 -0
- package/src/internal/input/dispatch.ts +161 -0
- package/src/internal/input/edit.inpage.ts +162 -0
- package/src/internal/input/evidence.inpage.ts +164 -0
- package/src/internal/input/gate.ts +224 -0
- package/src/internal/input/guard.inpage.ts +605 -0
- package/src/internal/input/guard.ts +184 -0
- package/src/internal/input/keyboard.ts +112 -0
- package/src/internal/input/keys.ts +127 -0
- package/src/internal/input/perform.ts +376 -0
- package/src/internal/input/pointer.ts +153 -0
- package/src/internal/input/replies.ts +195 -0
- package/src/internal/input/settle.ts +50 -0
- package/src/internal/input/style.ts +186 -0
- package/src/internal/input/targets.inpage.ts +293 -0
- package/src/internal/input/targets.ts +148 -0
- package/src/internal/page/bridge.ts +391 -0
- package/src/internal/page/context.ts +314 -0
- package/src/internal/page/identity.ts +35 -0
- package/src/internal/page/lane.ts +311 -0
- package/src/internal/page/navigation.ts +183 -0
- package/src/internal/page/openings.ts +87 -0
- package/src/internal/page/page.ts +165 -0
- package/src/internal/page/url.ts +100 -0
- package/src/internal/page/viewport.ts +43 -0
- package/src/internal/pictures/capture.ts +776 -0
- package/src/internal/pictures/clock.ts +141 -0
- package/src/internal/pictures/counts.ts +92 -0
- package/src/internal/pictures/pictures.ts +521 -0
- package/src/internal/pictures/transport.ts +243 -0
- package/src/internal/reading/choose.ts +100 -0
- package/src/internal/reading/context.inpage.ts +201 -0
- package/src/internal/reading/controls.inpage.ts +158 -0
- package/src/internal/reading/expect.inpage.ts +70 -0
- package/src/internal/reading/match.inpage.ts +92 -0
- package/src/internal/reading/names.inpage.ts +306 -0
- package/src/internal/reading/outline.inpage.ts +260 -0
- package/src/internal/reading/reading.ts +223 -0
- package/src/internal/reading/ready.inpage.ts +164 -0
- package/src/internal/reading/ready.ts +111 -0
- package/src/internal/reading/subjects.inpage.ts +188 -0
- package/src/internal/reading/text.inpage.ts +135 -0
- package/src/internal/reading/walk.inpage.ts +220 -0
- package/src/internal/supervisor/lifecycle.ts +416 -0
- package/src/internal/timeline/changes.inpage.ts +216 -0
- package/src/internal/timeline/changes.ts +100 -0
- package/src/internal/timeline/events.ts +94 -0
- package/src/internal/timeline/fold.inpage.ts +123 -0
- package/src/internal/timeline/history.inpage.ts +229 -0
- package/src/internal/timeline/marks.inpage.ts +207 -0
- package/src/internal/timeline/record.inpage.ts +133 -0
- package/src/internal/timeline/sight.inpage.ts +122 -0
- package/src/internal/timeline/window.ts +96 -0
- package/src/internal/timeline/words.ts +65 -0
- package/dist/Bootstrap-B9UUXsvF.d.mts +0 -183
- package/dist/Bootstrap-CeQOWBy6.mjs +0 -189
- package/dist/Bootstrap-CeQOWBy6.mjs.map +0 -1
- package/dist/Bootstrap.d.mts +0 -3
- package/dist/Bootstrap.mjs +0 -2
- package/dist/Browser-BF9_sORP.d.mts +0 -388
- package/dist/Browser.mjs.map +0 -1
- package/dist/BrowserData-CPIIIHol.d.mts +0 -585
- package/dist/BrowserData.d.mts +0 -3
- package/dist/BrowserData.mjs +0 -695
- package/dist/BrowserData.mjs.map +0 -1
- package/dist/BrowserRuntime-B6nT1G4X.d.mts +0 -148
- package/dist/BrowserRuntime-C1r2aSRK.mjs +0 -6820
- package/dist/BrowserRuntime-C1r2aSRK.mjs.map +0 -1
- package/dist/BrowserRuntime.d.mts +0 -3
- package/dist/BrowserRuntime.mjs +0 -3
- package/dist/Capture.d.mts +0 -56
- package/dist/Capture.mjs +0 -678
- package/dist/Capture.mjs.map +0 -1
- package/dist/CaptureData-CYriZHX1.mjs +0 -201
- package/dist/CaptureData-CYriZHX1.mjs.map +0 -1
- package/dist/CaptureData.d.mts +0 -219
- package/dist/CaptureData.mjs +0 -2
- package/dist/Errors.d.mts +0 -158
- package/dist/Errors.mjs +0 -207
- package/dist/Errors.mjs.map +0 -1
- package/dist/Images-yCG9BmRU.mjs +0 -76
- package/dist/Images-yCG9BmRU.mjs.map +0 -1
- package/dist/OperationOptions-DAeRS6O9.mjs +0 -55
- package/dist/OperationOptions-DAeRS6O9.mjs.map +0 -1
- package/dist/PageControl.d.mts +0 -15
- package/dist/PageControl.mjs +0 -34
- package/dist/PageControl.mjs.map +0 -1
- package/dist/PageRegistry-B3q9DS3g.mjs +0 -164
- package/dist/PageRegistry-B3q9DS3g.mjs.map +0 -1
- package/dist/Plan-Dyxu2q8C.mjs +0 -543
- package/dist/Plan-Dyxu2q8C.mjs.map +0 -1
- package/dist/PlanData-B668RxbQ.d.mts +0 -4831
- package/dist/PlanData.d.mts +0 -3
- package/dist/PlanData.mjs +0 -268
- package/dist/PlanData.mjs.map +0 -1
- package/dist/PlanInput-BJcPPncs.mjs +0 -75
- package/dist/PlanInput-BJcPPncs.mjs.map +0 -1
- package/dist/PublicSession-DCSMMqOj.mjs +0 -5602
- package/dist/PublicSession-DCSMMqOj.mjs.map +0 -1
- package/dist/Testing.d.mts +0 -479
- package/dist/Testing.mjs +0 -2147
- package/dist/Testing.mjs.map +0 -1
- package/dist/Timeline-fV22Xk-S.d.mts +0 -29
- package/dist/Timeline.d.mts +0 -4
- package/dist/Timeline.mjs +0 -20
- package/dist/Timeline.mjs.map +0 -1
- package/dist/TimelineData-BsOn-YGZ.d.mts +0 -3818
- package/dist/TimelineData.d.mts +0 -3
- package/dist/TimelineData.mjs +0 -482
- package/dist/TimelineData.mjs.map +0 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { t as BrowserError } from "./BrowserError-Coy7EW1N.mjs";
|
|
2
|
+
import { b as Subject, i as BrowserEvent } from "./BrowserEvent-BRu2juEz.mjs";
|
|
3
|
+
import { m as ReadyOptions, o as Found, u as Page } from "./Page-B7X6DQUn.mjs";
|
|
4
|
+
import { Duration, Effect, Schema } from "effect";
|
|
5
|
+
//#region src/internal/reading/choose.d.ts
|
|
6
|
+
declare const Missing_base: Schema.Class<Missing, Schema.TaggedStruct<"Missing", {}>, import("effect/Cause").YieldableError>;
|
|
7
|
+
/** Nothing on the page has the step's role and name. */
|
|
8
|
+
declare class Missing extends Missing_base {
|
|
9
|
+
get message(): string;
|
|
10
|
+
}
|
|
11
|
+
declare const Ambiguous_base: Schema.Class<Ambiguous, Schema.TaggedStruct<"Ambiguous", {
|
|
12
|
+
readonly count: Schema.Int;
|
|
13
|
+
}>, import("effect/Cause").YieldableError>;
|
|
14
|
+
/** Several elements match the step's subject equally well, and nothing tells them apart. */
|
|
15
|
+
declare class Ambiguous extends Ambiguous_base {
|
|
16
|
+
get message(): string;
|
|
17
|
+
}
|
|
18
|
+
declare const Drifted_base: Schema.Class<Drifted, Schema.TaggedStruct<"Drifted", {
|
|
19
|
+
readonly detail: Schema.String;
|
|
20
|
+
}>, import("effect/Cause").YieldableError>;
|
|
21
|
+
/** The page is not where the recording was: another site, or no element with its context. */
|
|
22
|
+
declare class Drifted extends Drifted_base {
|
|
23
|
+
get message(): string;
|
|
24
|
+
}
|
|
25
|
+
declare namespace Plan_d_exports {
|
|
26
|
+
export { Ambiguous, Drifted, Expected, Missing, Plan, Receipt, ReplayError, ReplayOptions, Step, StepAction, Stopped, TakeOptions, Uncertain, fromEvents, locate, repeatable, replay, restore, take };
|
|
27
|
+
}
|
|
28
|
+
declare const StepAction: Schema.Literals<readonly ["navigate", "back", "reload", "click", "hover", "drag", "type", "press", "scroll", "select"]>;
|
|
29
|
+
type StepAction = typeof StepAction.Type;
|
|
30
|
+
/**
|
|
31
|
+
* What a step leaves. `durable` asserts an author-chosen, lasting read-back of this operation,
|
|
32
|
+
* such as its uniquely named saved receipt. A toast or an intermediate address is not durable.
|
|
33
|
+
* Even a durable check's absence never authorizes repeating unknown consequential input.
|
|
34
|
+
*/
|
|
35
|
+
declare const Expected: Schema.Union<readonly [Schema.TaggedStruct<"Checked", {
|
|
36
|
+
readonly checked: Schema.Boolean;
|
|
37
|
+
}>, Schema.TaggedStruct<"Appeared", {
|
|
38
|
+
readonly query: Schema.Struct<{
|
|
39
|
+
readonly role: Schema.optional<Schema.String>;
|
|
40
|
+
readonly name: Schema.optional<Schema.String>;
|
|
41
|
+
readonly text: Schema.optional<Schema.String>;
|
|
42
|
+
}>;
|
|
43
|
+
readonly durable: Schema.optional<Schema.Literal<true>>;
|
|
44
|
+
}>, Schema.TaggedStruct<"Gone", {
|
|
45
|
+
readonly query: Schema.Struct<{
|
|
46
|
+
readonly role: Schema.optional<Schema.String>;
|
|
47
|
+
readonly name: Schema.optional<Schema.String>;
|
|
48
|
+
readonly text: Schema.optional<Schema.String>;
|
|
49
|
+
}>;
|
|
50
|
+
readonly durable: Schema.optional<Schema.Literal<true>>;
|
|
51
|
+
}>, Schema.TaggedStruct<"Navigated", {
|
|
52
|
+
readonly url: Schema.optional<Schema.String>;
|
|
53
|
+
readonly durable: Schema.optional<Schema.Literal<true>>;
|
|
54
|
+
}>]>;
|
|
55
|
+
type Expected = typeof Expected.Type;
|
|
56
|
+
declare const Step_base: Schema.Class<Step, Schema.Struct<{
|
|
57
|
+
readonly action: Schema.Literals<readonly ["navigate", "back", "reload", "click", "hover", "drag", "type", "press", "scroll", "select"]>;
|
|
58
|
+
/**
|
|
59
|
+
* The ending address, or a later recorded navigation before the next action began. Empty when
|
|
60
|
+
* unknown; a delayed navigation can be stronger arrival evidence than the action's ending URL.
|
|
61
|
+
*/
|
|
62
|
+
readonly url: Schema.String;
|
|
63
|
+
/** A navigation's requested address, or the keys a press pressed. */
|
|
64
|
+
readonly target: Schema.optional<Schema.String>;
|
|
65
|
+
readonly subject: Schema.optional<typeof Subject>;
|
|
66
|
+
/** Where a drag ended. */
|
|
67
|
+
readonly to: Schema.optional<typeof Subject>;
|
|
68
|
+
/** The viewport point a step aimed at, when it aimed at a point, and a drag's end point. */
|
|
69
|
+
readonly point: Schema.optional<Schema.Struct<{
|
|
70
|
+
readonly x: Schema.Finite;
|
|
71
|
+
readonly y: Schema.Finite;
|
|
72
|
+
}>>;
|
|
73
|
+
readonly toPoint: Schema.optional<Schema.Struct<{
|
|
74
|
+
readonly x: Schema.Finite;
|
|
75
|
+
readonly y: Schema.Finite;
|
|
76
|
+
}>>;
|
|
77
|
+
/** The box of what a step aimed at by point found there, so replay aims at the same place in it. */
|
|
78
|
+
readonly box: Schema.optional<Schema.Struct<{
|
|
79
|
+
readonly x: Schema.Finite;
|
|
80
|
+
readonly y: Schema.Finite;
|
|
81
|
+
readonly width: Schema.Finite;
|
|
82
|
+
readonly height: Schema.Finite;
|
|
83
|
+
}>>;
|
|
84
|
+
/**
|
|
85
|
+
* The input slot whose text a `type` step types, or whose address a `navigate` step goes to, as
|
|
86
|
+
* its recorded address had a credential withheld.
|
|
87
|
+
*/
|
|
88
|
+
readonly input: Schema.optional<Schema.String>;
|
|
89
|
+
/** The slot's text went into a secret field, so replay types it into nothing else. */
|
|
90
|
+
readonly secret: Schema.optional<Schema.Literal<true>>;
|
|
91
|
+
readonly options: Schema.optional<Schema.Struct<{
|
|
92
|
+
readonly button: Schema.optional<Schema.Literals<readonly ["left", "right", "middle"]>>;
|
|
93
|
+
readonly clickCount: Schema.optional<Schema.Finite>;
|
|
94
|
+
readonly holdMillis: Schema.optional<Schema.Finite>;
|
|
95
|
+
readonly replace: Schema.optional<Schema.Boolean>;
|
|
96
|
+
readonly submit: Schema.optional<Schema.Boolean>;
|
|
97
|
+
readonly times: Schema.optional<Schema.Finite>;
|
|
98
|
+
readonly dx: Schema.optional<Schema.Finite>;
|
|
99
|
+
readonly dy: Schema.optional<Schema.Finite>;
|
|
100
|
+
readonly values: Schema.optional<Schema.$Array<Schema.String>>;
|
|
101
|
+
}>>;
|
|
102
|
+
readonly expect: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"Checked", {
|
|
103
|
+
readonly checked: Schema.Boolean;
|
|
104
|
+
}>, Schema.TaggedStruct<"Appeared", {
|
|
105
|
+
readonly query: Schema.Struct<{
|
|
106
|
+
readonly role: Schema.optional<Schema.String>;
|
|
107
|
+
readonly name: Schema.optional<Schema.String>;
|
|
108
|
+
readonly text: Schema.optional<Schema.String>;
|
|
109
|
+
}>;
|
|
110
|
+
readonly durable: Schema.optional<Schema.Literal<true>>;
|
|
111
|
+
}>, Schema.TaggedStruct<"Gone", {
|
|
112
|
+
readonly query: Schema.Struct<{
|
|
113
|
+
readonly role: Schema.optional<Schema.String>;
|
|
114
|
+
readonly name: Schema.optional<Schema.String>;
|
|
115
|
+
readonly text: Schema.optional<Schema.String>;
|
|
116
|
+
}>;
|
|
117
|
+
readonly durable: Schema.optional<Schema.Literal<true>>;
|
|
118
|
+
}>, Schema.TaggedStruct<"Navigated", {
|
|
119
|
+
readonly url: Schema.optional<Schema.String>;
|
|
120
|
+
readonly durable: Schema.optional<Schema.Literal<true>>;
|
|
121
|
+
}>]>>;
|
|
122
|
+
}>, {}>;
|
|
123
|
+
/** One recorded step: the action, what it acted on, and what else it was asked. */
|
|
124
|
+
declare class Step extends Step_base {}
|
|
125
|
+
declare const Plan_base: Schema.Class<Plan, Schema.Struct<{
|
|
126
|
+
readonly version: Schema.Literals<readonly [1, 2]>;
|
|
127
|
+
readonly steps: Schema.$Array<typeof Step>;
|
|
128
|
+
}>, {}>;
|
|
129
|
+
declare class Plan extends Plan_base {
|
|
130
|
+
/** Choose the encoding version from the steps; simple recordings remain version 1. */
|
|
131
|
+
static new(steps: ReadonlyArray<Step>): Plan;
|
|
132
|
+
/** The input slots its steps type, in order; replay needs text for each. */
|
|
133
|
+
get inputs(): ReadonlyArray<string>;
|
|
134
|
+
}
|
|
135
|
+
declare const Receipt_base: Schema.Class<Receipt, Schema.Struct<{
|
|
136
|
+
readonly step: Schema.Int;
|
|
137
|
+
readonly outcome: Schema.Literals<readonly ["taken", "verified", "skipped"]>;
|
|
138
|
+
readonly startedAt: Schema.Finite;
|
|
139
|
+
readonly at: Schema.Finite;
|
|
140
|
+
}>, {}>;
|
|
141
|
+
/** One completed step, on the page's host clock. `verified` means its expected effect was seen. */
|
|
142
|
+
declare class Receipt extends Receipt_base {}
|
|
143
|
+
declare const Stopped_base: Schema.Class<Stopped, Schema.Struct<{
|
|
144
|
+
readonly step: Schema.Int;
|
|
145
|
+
readonly input: Schema.Literals<readonly ["unsent", "unknown"]>;
|
|
146
|
+
}>, {}>;
|
|
147
|
+
/** Durable stopping data. A begun step without a receipt must be restored as `unknown`. */
|
|
148
|
+
declare class Stopped extends Stopped_base {}
|
|
149
|
+
declare const Uncertain_base: Schema.Class<Uncertain, Schema.TaggedStruct<"Uncertain", {
|
|
150
|
+
readonly detail: Schema.String;
|
|
151
|
+
}>, import("effect/Cause").YieldableError>;
|
|
152
|
+
/** Repeating this step could repeat an unresolved effect; the consumer must reconcile it. */
|
|
153
|
+
declare class Uncertain extends Uncertain_base {
|
|
154
|
+
get message(): string;
|
|
155
|
+
}
|
|
156
|
+
declare const ReplayError_base: Schema.Class<ReplayError, Schema.TaggedStruct<"ReplayError", {
|
|
157
|
+
readonly step: Schema.Int;
|
|
158
|
+
readonly reason: Schema.Union<readonly [typeof Missing, typeof Ambiguous, typeof Drifted, typeof BrowserError, typeof Uncertain]>;
|
|
159
|
+
readonly input: Schema.Literals<readonly ["unsent", "unknown"]>;
|
|
160
|
+
readonly receipts: Schema.$Array<typeof Receipt>;
|
|
161
|
+
}>, import("effect/Cause").YieldableError>;
|
|
162
|
+
/** Where replay stopped, counting steps from 0, why, and the steps that completed before it. */
|
|
163
|
+
declare class ReplayError extends ReplayError_base {
|
|
164
|
+
get stopped(): Stopped;
|
|
165
|
+
get message(): string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The walk one page's events record: the completed actions of the page that acted first, in
|
|
169
|
+
* order. `page.recentEvents` gives them, or `browser.events()` read until the walk ends.
|
|
170
|
+
*/
|
|
171
|
+
declare const fromEvents: (events: Iterable<BrowserEvent>) => Plan;
|
|
172
|
+
/**
|
|
173
|
+
* The one element on the page that a subject names, by role, name and context (see `Plan`),
|
|
174
|
+
* looking again for two seconds while the page may still be drawing it.
|
|
175
|
+
*/
|
|
176
|
+
declare const locate: (page: Page, subject: Subject) => Effect.Effect<Found, Ambiguous | BrowserError | Drifted | Missing, never>;
|
|
177
|
+
interface TakeOptions {
|
|
178
|
+
/** How each step waits for the page first, or false not to wait. */
|
|
179
|
+
readonly settle?: ReadyOptions | false | undefined;
|
|
180
|
+
readonly inputs?: Readonly<Record<string, string>> | undefined;
|
|
181
|
+
/**
|
|
182
|
+
* Bound for recorded arrival and expected effect, each. Defaults to 5 seconds. Zero makes one
|
|
183
|
+
* read without polling; that read retains the page operation's timeout.
|
|
184
|
+
*/
|
|
185
|
+
readonly arrival?: Duration.Input | undefined;
|
|
186
|
+
}
|
|
187
|
+
interface ReplayOptions extends TakeOptions {
|
|
188
|
+
readonly from?: number | Stopped | undefined;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Input that can be repeated without repeating a commitment. `take` also validates a Checked
|
|
192
|
+
* target's boolean state before input. Back/reload can resubmit a form.
|
|
193
|
+
*/
|
|
194
|
+
declare const repeatable: (step: Step) => boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Take one step. Unknown non-repeatable input is never resent: only positive durable read-back
|
|
197
|
+
* can skip it. An interrupted call remains interrupted; persist begun-before-call in the consumer
|
|
198
|
+
* and treat a missing receipt as Stopped{input: "unknown"}, including after process restart.
|
|
199
|
+
*/
|
|
200
|
+
declare const take: (page: Page, plan: Plan, at: number | Stopped, options?: TakeOptions | undefined) => Effect.Effect<Receipt, ReplayError, never>;
|
|
201
|
+
/** Take a plan's steps from a fresh index or durable stopping point, returning completed receipts. */
|
|
202
|
+
declare const replay: (page: Page, plan: Plan, options?: ReplayOptions) => Effect.Effect<Receipt[], ReplayError, never>;
|
|
203
|
+
/** Restore prior steps on a fresh page; unresolved commitments require positive durable evidence. */
|
|
204
|
+
declare const restore: (page: Page, plan: Plan, options?: TakeOptions & {
|
|
205
|
+
readonly upTo?: number | undefined;
|
|
206
|
+
}) => Effect.Effect<Receipt[], ReplayError, never>;
|
|
207
|
+
//#endregion
|
|
208
|
+
export { take as _, ReplayError as a, Missing as b, StepAction as c, Uncertain as d, fromEvents as f, restore as g, replay as h, Receipt as i, Stopped as l, repeatable as m, Plan as n, ReplayOptions as o, locate as p, Plan_d_exports as r, Step as s, Expected as t, TakeOptions as u, Ambiguous as v, Drifted as y };
|
|
209
|
+
//# sourceMappingURL=Plan-Akcac63g.d.mts.map
|