@olib-ai/owl-browser-sdk 2.0.4 → 2.0.6

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.
Files changed (113) hide show
  1. package/README.md +107 -0
  2. package/dist/extraction/content-cleaner.d.ts +40 -0
  3. package/dist/extraction/content-cleaner.d.ts.map +1 -0
  4. package/dist/extraction/content-cleaner.js +393 -0
  5. package/dist/extraction/content-cleaner.js.map +1 -0
  6. package/dist/extraction/extractor.d.ts +139 -0
  7. package/dist/extraction/extractor.d.ts.map +1 -0
  8. package/dist/extraction/extractor.js +212 -0
  9. package/dist/extraction/extractor.js.map +1 -0
  10. package/dist/extraction/html-processor.d.ts +75 -0
  11. package/dist/extraction/html-processor.d.ts.map +1 -0
  12. package/dist/extraction/html-processor.js +192 -0
  13. package/dist/extraction/html-processor.js.map +1 -0
  14. package/dist/extraction/index.d.ts +14 -0
  15. package/dist/extraction/index.d.ts.map +1 -0
  16. package/dist/extraction/index.js +19 -0
  17. package/dist/extraction/index.js.map +1 -0
  18. package/dist/extraction/list-extractor.d.ts +24 -0
  19. package/dist/extraction/list-extractor.d.ts.map +1 -0
  20. package/dist/extraction/list-extractor.js +303 -0
  21. package/dist/extraction/list-extractor.js.map +1 -0
  22. package/dist/extraction/meta-extractor.d.ts +40 -0
  23. package/dist/extraction/meta-extractor.d.ts.map +1 -0
  24. package/dist/extraction/meta-extractor.js +216 -0
  25. package/dist/extraction/meta-extractor.js.map +1 -0
  26. package/dist/extraction/pagination.d.ts +29 -0
  27. package/dist/extraction/pagination.d.ts.map +1 -0
  28. package/dist/extraction/pagination.js +323 -0
  29. package/dist/extraction/pagination.js.map +1 -0
  30. package/dist/extraction/pattern-detector.d.ts +16 -0
  31. package/dist/extraction/pattern-detector.d.ts.map +1 -0
  32. package/dist/extraction/pattern-detector.js +390 -0
  33. package/dist/extraction/pattern-detector.js.map +1 -0
  34. package/dist/extraction/scrape-session.d.ts +23 -0
  35. package/dist/extraction/scrape-session.d.ts.map +1 -0
  36. package/dist/extraction/scrape-session.js +192 -0
  37. package/dist/extraction/scrape-session.js.map +1 -0
  38. package/dist/extraction/selector-engine.d.ts +23 -0
  39. package/dist/extraction/selector-engine.d.ts.map +1 -0
  40. package/dist/extraction/selector-engine.js +127 -0
  41. package/dist/extraction/selector-engine.js.map +1 -0
  42. package/dist/extraction/table-extractor.d.ts +29 -0
  43. package/dist/extraction/table-extractor.d.ts.map +1 -0
  44. package/dist/extraction/table-extractor.js +282 -0
  45. package/dist/extraction/table-extractor.js.map +1 -0
  46. package/dist/extraction/transforms.d.ts +47 -0
  47. package/dist/extraction/transforms.d.ts.map +1 -0
  48. package/dist/extraction/transforms.js +277 -0
  49. package/dist/extraction/transforms.js.map +1 -0
  50. package/dist/extraction/types.d.ts +199 -0
  51. package/dist/extraction/types.d.ts.map +1 -0
  52. package/dist/extraction/types.js +5 -0
  53. package/dist/extraction/types.js.map +1 -0
  54. package/dist/flow/executor.js +1 -1
  55. package/dist/flow/executor.js.map +1 -1
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +2 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/playwright/browser-type.d.ts +101 -0
  61. package/dist/playwright/browser-type.d.ts.map +1 -0
  62. package/dist/playwright/browser-type.js +134 -0
  63. package/dist/playwright/browser-type.js.map +1 -0
  64. package/dist/playwright/browser.d.ts +98 -0
  65. package/dist/playwright/browser.d.ts.map +1 -0
  66. package/dist/playwright/browser.js +229 -0
  67. package/dist/playwright/browser.js.map +1 -0
  68. package/dist/playwright/context.d.ts +211 -0
  69. package/dist/playwright/context.d.ts.map +1 -0
  70. package/dist/playwright/context.js +466 -0
  71. package/dist/playwright/context.js.map +1 -0
  72. package/dist/playwright/extractor.d.ts +108 -0
  73. package/dist/playwright/extractor.d.ts.map +1 -0
  74. package/dist/playwright/extractor.js +404 -0
  75. package/dist/playwright/extractor.js.map +1 -0
  76. package/dist/playwright/frame.d.ts +147 -0
  77. package/dist/playwright/frame.d.ts.map +1 -0
  78. package/dist/playwright/frame.js +492 -0
  79. package/dist/playwright/frame.js.map +1 -0
  80. package/dist/playwright/index.d.ts +163 -0
  81. package/dist/playwright/index.d.ts.map +1 -0
  82. package/dist/playwright/index.js +313 -0
  83. package/dist/playwright/index.js.map +1 -0
  84. package/dist/playwright/keyboard.d.ts +74 -0
  85. package/dist/playwright/keyboard.d.ts.map +1 -0
  86. package/dist/playwright/keyboard.js +187 -0
  87. package/dist/playwright/keyboard.js.map +1 -0
  88. package/dist/playwright/locator.d.ts +237 -0
  89. package/dist/playwright/locator.d.ts.map +1 -0
  90. package/dist/playwright/locator.js +646 -0
  91. package/dist/playwright/locator.js.map +1 -0
  92. package/dist/playwright/mouse.d.ts +82 -0
  93. package/dist/playwright/mouse.d.ts.map +1 -0
  94. package/dist/playwright/mouse.js +137 -0
  95. package/dist/playwright/mouse.js.map +1 -0
  96. package/dist/playwright/page-helpers.d.ts +261 -0
  97. package/dist/playwright/page-helpers.d.ts.map +1 -0
  98. package/dist/playwright/page-helpers.js +423 -0
  99. package/dist/playwright/page-helpers.js.map +1 -0
  100. package/dist/playwright/page.d.ts +566 -0
  101. package/dist/playwright/page.d.ts.map +1 -0
  102. package/dist/playwright/page.js +1476 -0
  103. package/dist/playwright/page.js.map +1 -0
  104. package/dist/playwright/response.d.ts +100 -0
  105. package/dist/playwright/response.d.ts.map +1 -0
  106. package/dist/playwright/response.js +194 -0
  107. package/dist/playwright/response.js.map +1 -0
  108. package/dist/playwright/types.d.ts +354 -0
  109. package/dist/playwright/types.d.ts.map +1 -0
  110. package/dist/playwright/types.js +8 -0
  111. package/dist/playwright/types.js.map +1 -0
  112. package/openapi.json +343 -36
  113. package/package.json +10 -1
@@ -0,0 +1,423 @@
1
+ /**
2
+ * Helper classes for the Playwright Page API.
3
+ *
4
+ * Contains Route, Dialog, ConsoleMessage, Download, and Video classes
5
+ * that support the Page event and interception APIs. Split from page.ts
6
+ * to keep each file under 1000 lines.
7
+ */
8
+ // ==================== Route ====================
9
+ /**
10
+ * Route represents an intercepted network request.
11
+ *
12
+ * Created by page.route() or context.route(). Provides methods to
13
+ * fulfill, abort, or continue the intercepted request.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * await page.route('**\/api/**', async route => {
18
+ * await route.fulfill({ status: 200, body: '{"mock": true}' });
19
+ * });
20
+ * ```
21
+ */
22
+ export class Route {
23
+ _client;
24
+ _contextId;
25
+ _ruleId;
26
+ _urlPattern;
27
+ _request;
28
+ constructor(client, contextId, ruleId, urlPattern) {
29
+ this._client = client;
30
+ this._contextId = contextId;
31
+ this._ruleId = ruleId;
32
+ this._urlPattern = urlPattern;
33
+ this._request = new RouteRequest(urlPattern);
34
+ }
35
+ /** The associated Request object. */
36
+ request() {
37
+ return this._request;
38
+ }
39
+ /**
40
+ * Fulfill the route with a custom response.
41
+ *
42
+ * Replaces the actual server response with the provided data.
43
+ *
44
+ * @param options - Response data (status, headers, body, contentType)
45
+ */
46
+ async fulfill(options) {
47
+ // Remove existing rule and add a mock rule with the response
48
+ try {
49
+ await this._client.execute('browser_remove_network_rule', {
50
+ context_id: this._contextId,
51
+ rule_id: this._ruleId,
52
+ });
53
+ }
54
+ catch {
55
+ // Rule may not exist yet
56
+ }
57
+ const params = {
58
+ context_id: this._contextId,
59
+ url_pattern: this._urlPattern,
60
+ action: 'mock',
61
+ };
62
+ if (options?.status !== undefined) {
63
+ params['mock_status'] = String(options.status);
64
+ }
65
+ if (options?.body !== undefined) {
66
+ params['mock_body'] = typeof options.body === 'string'
67
+ ? options.body
68
+ : options.body.toString('utf-8');
69
+ }
70
+ if (options?.contentType !== undefined) {
71
+ params['mock_content_type'] = options.contentType;
72
+ }
73
+ await this._client.execute('browser_add_network_rule', params);
74
+ }
75
+ /**
76
+ * Abort the route, preventing the request from completing.
77
+ *
78
+ * @param errorCode - Optional error code (default: 'failed')
79
+ */
80
+ async abort(errorCode) {
81
+ void errorCode;
82
+ try {
83
+ await this._client.execute('browser_remove_network_rule', {
84
+ context_id: this._contextId,
85
+ rule_id: this._ruleId,
86
+ });
87
+ }
88
+ catch {
89
+ // Ignore
90
+ }
91
+ await this._client.execute('browser_add_network_rule', {
92
+ context_id: this._contextId,
93
+ url_pattern: this._urlPattern,
94
+ action: 'block',
95
+ });
96
+ }
97
+ /**
98
+ * Continue the route without modification.
99
+ *
100
+ * Allows the request to proceed to the server normally.
101
+ *
102
+ * @param options - Optional overrides (url, headers, postData)
103
+ */
104
+ async continue(options) {
105
+ void options;
106
+ // In Owl Browser, removing the interception rule lets the request through
107
+ try {
108
+ await this._client.execute('browser_remove_network_rule', {
109
+ context_id: this._contextId,
110
+ rule_id: this._ruleId,
111
+ });
112
+ }
113
+ catch {
114
+ // Ignore
115
+ }
116
+ }
117
+ /**
118
+ * Fallback to the next route handler.
119
+ *
120
+ * In Owl Browser, this is equivalent to continue().
121
+ */
122
+ async fallback() {
123
+ await this.continue();
124
+ }
125
+ }
126
+ /**
127
+ * Minimal Request object for Route.request().
128
+ */
129
+ export class RouteRequest {
130
+ _url;
131
+ constructor(url) {
132
+ this._url = url;
133
+ }
134
+ /** Request URL pattern. */
135
+ url() {
136
+ return this._url;
137
+ }
138
+ /** HTTP method. */
139
+ method() {
140
+ return 'GET';
141
+ }
142
+ /** Request resource type. */
143
+ resourceType() {
144
+ return 'other';
145
+ }
146
+ /** Request headers. */
147
+ headers() {
148
+ return {};
149
+ }
150
+ /** POST body data, if any. */
151
+ postData() {
152
+ return null;
153
+ }
154
+ /** Whether this is a navigation request. */
155
+ isNavigationRequest() {
156
+ return false;
157
+ }
158
+ }
159
+ // ==================== Dialog ====================
160
+ /**
161
+ * Dialog represents a JavaScript dialog (alert, confirm, prompt, beforeunload).
162
+ *
163
+ * Created when a dialog event is intercepted. Provides methods to
164
+ * accept or dismiss the dialog programmatically.
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * page.on('dialog', async dialog => {
169
+ * console.log(dialog.message());
170
+ * await dialog.accept('input text');
171
+ * });
172
+ * ```
173
+ */
174
+ export class Dialog {
175
+ _client;
176
+ _type;
177
+ _message;
178
+ _defaultValue;
179
+ _dialogId;
180
+ constructor(client, type, message, defaultValue, dialogId) {
181
+ this._client = client;
182
+ this._type = type;
183
+ this._message = message;
184
+ this._defaultValue = defaultValue;
185
+ this._dialogId = dialogId;
186
+ }
187
+ /** Dialog type: 'alert', 'confirm', 'prompt', or 'beforeunload'. */
188
+ type() {
189
+ return this._type;
190
+ }
191
+ /** Dialog message text. */
192
+ message() {
193
+ return this._message;
194
+ }
195
+ /** Default value for prompt dialogs. */
196
+ defaultValue() {
197
+ return this._defaultValue;
198
+ }
199
+ /**
200
+ * Accept the dialog (click OK / Yes).
201
+ *
202
+ * @param promptText - Text to enter for prompt dialogs
203
+ */
204
+ async accept(promptText) {
205
+ const params = {
206
+ dialog_id: this._dialogId,
207
+ accept: true,
208
+ };
209
+ if (promptText !== undefined) {
210
+ params['response_text'] = promptText;
211
+ }
212
+ await this._client.execute('browser_handle_dialog', params);
213
+ }
214
+ /**
215
+ * Dismiss the dialog (click Cancel / No).
216
+ */
217
+ async dismiss() {
218
+ await this._client.execute('browser_handle_dialog', {
219
+ dialog_id: this._dialogId,
220
+ accept: false,
221
+ });
222
+ }
223
+ }
224
+ // ==================== ConsoleMessage ====================
225
+ /**
226
+ * ConsoleMessage represents a browser console message.
227
+ *
228
+ * Created from browser_get_console_log entries.
229
+ *
230
+ * @example
231
+ * ```typescript
232
+ * page.on('console', msg => {
233
+ * console.log(`[${msg.type()}] ${msg.text()}`);
234
+ * });
235
+ * ```
236
+ */
237
+ export class ConsoleMessage {
238
+ _type;
239
+ _text;
240
+ _location;
241
+ constructor(type, text, url, line, column) {
242
+ this._type = type;
243
+ this._text = text;
244
+ this._location = {
245
+ url: url ?? '',
246
+ lineNumber: line ?? 0,
247
+ columnNumber: column ?? 0,
248
+ };
249
+ }
250
+ /** Console message type: 'log', 'warn', 'error', 'info', 'debug'. */
251
+ type() {
252
+ return this._type;
253
+ }
254
+ /** Console message text content. */
255
+ text() {
256
+ return this._text;
257
+ }
258
+ /** Source location of the console call. */
259
+ location() {
260
+ return { ...this._location };
261
+ }
262
+ /** Arguments passed to the console call (returns text as single element). */
263
+ args() {
264
+ return [this._text];
265
+ }
266
+ }
267
+ // ==================== Download ====================
268
+ /**
269
+ * Download represents a file download initiated by the browser.
270
+ *
271
+ * Provides methods to monitor download progress, wait for completion,
272
+ * and access the downloaded file.
273
+ *
274
+ * @example
275
+ * ```typescript
276
+ * const [download] = await Promise.all([
277
+ * page.waitForEvent('download'),
278
+ * page.click('#download-btn'),
279
+ * ]);
280
+ * const path = await download.path();
281
+ * ```
282
+ */
283
+ export class Download {
284
+ _client;
285
+ _contextId;
286
+ _downloadId;
287
+ _url;
288
+ _suggestedFilename;
289
+ constructor(client, contextId, downloadId, url, suggestedFilename) {
290
+ this._client = client;
291
+ this._contextId = contextId;
292
+ this._downloadId = downloadId;
293
+ this._url = url;
294
+ this._suggestedFilename = suggestedFilename;
295
+ }
296
+ /** Download URL. */
297
+ url() {
298
+ return this._url;
299
+ }
300
+ /** Suggested filename for the download. */
301
+ suggestedFilename() {
302
+ return this._suggestedFilename;
303
+ }
304
+ /**
305
+ * Wait for the download to complete and return the file path.
306
+ *
307
+ * @returns Absolute path to the downloaded file, or null on failure
308
+ */
309
+ async path() {
310
+ try {
311
+ const result = await this._client.execute('browser_wait_for_download', {
312
+ download_id: this._downloadId,
313
+ });
314
+ const res = result;
315
+ return res['path'] ?? null;
316
+ }
317
+ catch {
318
+ return null;
319
+ }
320
+ }
321
+ /**
322
+ * Save the download to a specific path.
323
+ *
324
+ * @param path - Target file path
325
+ */
326
+ async saveAs(path) {
327
+ void path;
328
+ // Download path is set via browser_set_download_path before triggering
329
+ // the download. saveAs is a convenience wrapper that waits for completion.
330
+ await this.path();
331
+ }
332
+ /**
333
+ * Cancel the download.
334
+ */
335
+ async cancel() {
336
+ await this._client.execute('browser_cancel_download', {
337
+ download_id: this._downloadId,
338
+ });
339
+ }
340
+ /**
341
+ * Delete the downloaded file.
342
+ */
343
+ async delete() {
344
+ // Owl Browser does not provide a file deletion tool.
345
+ // The file remains on disk until cleaned up externally.
346
+ }
347
+ /**
348
+ * Wait for the download to finish.
349
+ *
350
+ * @returns null on success, Error on failure
351
+ */
352
+ async failure() {
353
+ try {
354
+ await this._client.execute('browser_wait_for_download', {
355
+ download_id: this._downloadId,
356
+ });
357
+ return null;
358
+ }
359
+ catch (err) {
360
+ return err instanceof Error ? err.message : String(err);
361
+ }
362
+ }
363
+ }
364
+ // ==================== Video ====================
365
+ /**
366
+ * Video represents a video recording of a browser context.
367
+ *
368
+ * Created when context is configured with recordVideo option.
369
+ * Provides access to the recording path after the recording stops.
370
+ *
371
+ * @example
372
+ * ```typescript
373
+ * const context = await browser.newContext({ recordVideo: { dir: '/tmp/videos' } });
374
+ * const page = await context.newPage();
375
+ * // ... perform actions ...
376
+ * const videoPath = await page.video()?.path();
377
+ * await context.close();
378
+ * ```
379
+ */
380
+ export class Video {
381
+ _client;
382
+ _contextId;
383
+ _path = null;
384
+ constructor(client, contextId) {
385
+ this._client = client;
386
+ this._contextId = contextId;
387
+ }
388
+ /**
389
+ * Get the path to the video recording.
390
+ *
391
+ * The path becomes available after the recording is stopped.
392
+ *
393
+ * @returns Absolute path to the video file
394
+ */
395
+ async path() {
396
+ if (this._path)
397
+ return this._path;
398
+ const result = await this._client.execute('browser_get_video_recording_stats', {
399
+ context_id: this._contextId,
400
+ });
401
+ const res = result;
402
+ this._path = String(res['file_path'] ?? res['path'] ?? '');
403
+ return this._path;
404
+ }
405
+ /**
406
+ * Save the video to a specific path.
407
+ *
408
+ * @param path - Target file path
409
+ */
410
+ async saveAs(path) {
411
+ void path;
412
+ // Video is saved at recording location; copy would require
413
+ // filesystem access that Owl Browser does not provide.
414
+ await this.path();
415
+ }
416
+ /**
417
+ * Delete the video recording file.
418
+ */
419
+ async delete() {
420
+ // Owl Browser does not provide a file deletion tool.
421
+ }
422
+ }
423
+ //# sourceMappingURL=page-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-helpers.js","sourceRoot":"","sources":["../../src/playwright/page-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,kDAAkD;AAElD;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,KAAK;IACC,OAAO,CAAa;IACpB,UAAU,CAAS;IACnB,OAAO,CAAS;IAChB,WAAW,CAAS;IACpB,QAAQ,CAAe;IAExC,YACE,MAAkB,EAClB,SAAiB,EACjB,MAAc,EACd,UAAkB;QAElB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,qCAAqC;IACrC,OAAO;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,CAAC,OAA6B;QACzC,6DAA6D;QAC7D,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,6BAA6B,EAAE;gBACxD,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,yBAAyB;QAC3B,CAAC;QAED,MAAM,MAAM,GAA4B;YACtC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,MAAM;SACf,CAAC;QAEF,IAAI,OAAO,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAA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