@applitools/nlp-web-runner 5.11.1 → 5.13.0

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.
@@ -1 +1 @@
1
- var __defProp=Object['defineProperty'],__exportAll=(z,y)=>{let d={};for(var K in z)__defProp(d,K,{'get':z[K],'enumerable':!![]});if(!y)__defProp(d,Symbol['toStringTag'],{'value':'Module'});return d;};export{__exportAll as t};
1
+ var __defProp=Object['defineProperty'],__exportAll=(q,G)=>{let v={};for(var y in q)__defProp(v,y,{'get':q[y],'enumerable':!![]});if(!G)__defProp(v,Symbol['toStringTag'],{'value':'Module'});return v;};export{__exportAll as t};
@@ -187,6 +187,11 @@ type NavigateToUrlAction = {
187
187
  type: 'navigate';
188
188
  url: StringExpression;
189
189
  relative?: boolean;
190
+ headers?: {
191
+ name: StringExpression;
192
+ value: StringExpression;
193
+ secret: boolean;
194
+ }[];
190
195
  statuses?: number[] | '*';
191
196
  };
192
197
  type NavigateThroughHistoryAction = {
@@ -250,6 +255,13 @@ type Reference<TType> = {
250
255
  })[];
251
256
  type?: PrimitiveName<TType>;
252
257
  scope?: 'public' | 'internal';
258
+ /**
259
+ * The reference resolves through a binding the instruction itself provides for a nested scope -
260
+ * currently the per-entry bindings of an iteration condition (`{product}`, `{it}`, `{index}`,
261
+ * `{key}`). Such a reference is neither a variable the instruction sets nor a value the caller
262
+ * has to supply, so it never surfaces in `meta.parameters`.
263
+ */
264
+ binding?: boolean;
253
265
  };
254
266
  type JSExpressionReference<TType> = {
255
267
  isJSExpressionRef: true;
@@ -318,9 +330,9 @@ type Condition = {
318
330
  operation: ConditionOperation;
319
331
  };
320
332
  type Operation = ConditionOperation | ExpressionOperation;
321
- type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation | ExtractOperation;
333
+ type ExpressionOperation = SizeOperation | KeysOperation | ValuesOperation | EntriesOperation | NumberOperation | ExtractOperation | MapOperation | EveryOperation | SomeOperation;
322
334
  type NumberOperation = AddOperation | SubOperation | MulOperation | DivOperation;
323
- type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation;
335
+ type ConditionOperation = ParensOperation | IgnoreCaseOperation | MatchCaseOperation | NotOperation | OrOperation | AndOperation | ComparisonOperation | ValidateOperation | MatchOperation | IncludesOnlyOperation | IncludesOperation | StartsWithOperation | EndsWithOperation | VisibleOperation | ClickableOperation | EnabledOperation | HoveredOperation | CheckedOperation | PopulatedOperation | EveryOperation | SomeOperation;
324
336
  type Operand = {
325
337
  isOperand: true;
326
338
  value: AnyExpression | ElementDescriptor | DialogDescriptor | ExpressionOperation;
@@ -357,6 +369,20 @@ type EntriesOperation = {
357
369
  operator: 'entries';
358
370
  operands: [Operand];
359
371
  };
372
+ type MapOperation = {
373
+ operator: 'map';
374
+ operands: [Operand, AnyExpression | Operation];
375
+ bindings?: string[];
376
+ };
377
+ type EveryOperation = {
378
+ operator: 'every';
379
+ operands: [Operand];
380
+ };
381
+ type SomeOperation = {
382
+ operator: 'some';
383
+ operands: [Operand];
384
+ min?: NumberExpression;
385
+ };
360
386
  type AddOperation = {
361
387
  operator: 'add';
362
388
  operands: [Operand, Operand];
@@ -780,7 +806,7 @@ declare class Rectangle {
780
806
  //#region src/patterns.d.ts
781
807
  type Match = (text: string) => string | null;
782
808
  //#endregion
783
- //#region dist/_inline/_chunks/script-DchVAZrJ.d.ts
809
+ //#region dist/_inline/_chunks/script-CPIwyrcJ.d.ts
784
810
  //#region src/port.d.ts
785
811
  interface PortMessageEvent<TName extends string = string, TPayload = unknown> extends Event {
786
812
  readonly name: TName;
@@ -867,10 +893,7 @@ declare class Mouse {
867
893
  constructor({
868
894
  target
869
895
  }: MouseOptions);
870
- get position(): Readonly<{
871
- x: number;
872
- y: number;
873
- }>;
896
+ get position(): Readonly<Point>;
874
897
  move(path: PointLike | PointLike[], {
875
898
  signal
876
899
  }: {
@@ -1205,18 +1228,8 @@ declare class WebNode<TNode extends globalThis.Node = Element | Text> implements
1205
1228
  acceptFormValue?: boolean;
1206
1229
  }): Promise<string | number | boolean | null>;
1207
1230
  getText(): Promise<string | null>;
1208
- getScreenBox(): Promise<{
1209
- x: number;
1210
- y: number;
1211
- width: number;
1212
- height: number;
1213
- }>;
1214
- getBox(): Promise<{
1215
- x: number;
1216
- y: number;
1217
- width: number;
1218
- height: number;
1219
- }>;
1231
+ getScreenBox(): Promise<Rectangle>;
1232
+ getBox(): Promise<Rectangle>;
1220
1233
  getMetrics(): Promise<{
1221
1234
  scrollX: number;
1222
1235
  scrollY: number;
@@ -1735,9 +1748,11 @@ declare class Target extends EventTargetNode<TargetEventMap> {
1735
1748
  intercept(patterns: InterceptionPattern | InterceptionPattern[], handler: InterceptionHandler): Promise<() => void>;
1736
1749
  navigateThroughHistory(offset: number): Promise<void>;
1737
1750
  navigate(url: string, {
1738
- timeout
1751
+ timeout,
1752
+ headers
1739
1753
  }?: {
1740
1754
  timeout?: number;
1755
+ headers?: Record<string, string>;
1741
1756
  }): Promise<{
1742
1757
  url: string;
1743
1758
  status: number;
@@ -9254,7 +9269,7 @@ type ResolvedChromeTabDescriptor = {
9254
9269
  declare function activateBrowserTab(automator: Browser, descriptor: ResolvedChromeTabDescriptor): Promise<void>;
9255
9270
  //#endregion
9256
9271
  //#region src/utils/evaluate-expression.d.ts
9257
- type EvaluatedExpression<TValue> = TValue extends ExtractOperation ? Any : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation ? Any[] : TValue extends Condition ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeTabDescriptor ? ResolvedChromeTabDescriptor : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor ? ResolvedElementDescriptor : TValue;
9272
+ type EvaluatedExpression<TValue> = TValue extends ExtractOperation ? Any : TValue extends NumberExpression ? number : TValue extends SizeOperation ? number : TValue extends KeysOperation ? string[] : TValue extends ValuesOperation | EntriesOperation | MapOperation ? Any[] : TValue extends Condition | EveryOperation | SomeOperation ? boolean : TValue extends OTP ? string : TValue extends RandomValue<string> ? string | string[] : TValue extends RandomValue<number> ? number : TValue extends Reference<infer TType extends Any> ? TType : TValue extends JSExpressionReference<infer TType extends Any> ? TType : TValue extends InterpolatedString ? string : TValue extends JSExpression ? string : TValue extends Structure ? Record<string, any> | any[] : TValue extends FileHandle ? string : TValue extends Pattern ? RegExp | Match : TValue extends ChromeTabDescriptor ? ResolvedChromeTabDescriptor : TValue extends ChromeElementDescriptor ? ChromeElementDescriptor : TValue extends ElementDescriptor ? ResolvedElementDescriptor : TValue;
9258
9273
  //#endregion
9259
9274
  //#region src/handler.d.ts
9260
9275
  type HandlerOptions<TAutomator extends Automator, TInstruction extends Instruction> = {