crawlberg 1.0.4 → 1.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.
- checksums.yaml +4 -4
- data/ext/crawlberg_rb/native/Cargo.lock +110 -99
- data/ext/crawlberg_rb/native/Cargo.toml +2 -2
- data/ext/crawlberg_rb/native/extconf.rb +0 -3
- data/ext/crawlberg_rb/src/lib.rs +73 -64
- data/lib/crawlberg/native.rb +0 -41
- data/lib/crawlberg/version.rb +2 -2
- data/lib/crawlberg.rb +0 -8
- data/lib/crawlberg_rb.so +0 -0
- data/sig/types.rbs +1 -1
- metadata +2 -2
data/lib/crawlberg/native.rb
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:e0600612767fdd3d51e9128afdb0ffcd1fb490e9942f3839a5120ab7a4e3b658
|
|
3
|
-
# To regenerate: alef generate
|
|
4
|
-
# To verify freshness: alef verify --exit-code
|
|
5
2
|
# frozen_string_literal: true
|
|
6
3
|
|
|
7
4
|
require "json"
|
|
@@ -9,14 +6,12 @@ require "sorbet-runtime"
|
|
|
9
6
|
require "crawlberg_rb"
|
|
10
7
|
|
|
11
8
|
module Crawlberg
|
|
12
|
-
# Authentication configuration.
|
|
13
9
|
module AuthConfig
|
|
14
10
|
extend T::Helpers
|
|
15
11
|
extend T::Sig
|
|
16
12
|
|
|
17
13
|
interface!
|
|
18
14
|
|
|
19
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
20
15
|
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
21
16
|
# @return [variant_class] an instance of the appropriate variant
|
|
22
17
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
@@ -39,11 +34,9 @@ module Crawlberg
|
|
|
39
34
|
include AuthConfig
|
|
40
35
|
extend T::Sig
|
|
41
36
|
|
|
42
|
-
# Username sent in the `Authorization: Basic` header.
|
|
43
37
|
sig { returns(String) }
|
|
44
38
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
45
39
|
def username = super
|
|
46
|
-
# Password sent in the `Authorization: Basic` header.
|
|
47
40
|
sig { returns(String) }
|
|
48
41
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
49
42
|
def password = super
|
|
@@ -65,7 +58,6 @@ module Crawlberg
|
|
|
65
58
|
include AuthConfig
|
|
66
59
|
extend T::Sig
|
|
67
60
|
|
|
68
|
-
# Token sent in the `Authorization: Bearer` header.
|
|
69
61
|
sig { returns(String) }
|
|
70
62
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
71
63
|
def token = super
|
|
@@ -87,11 +79,9 @@ module Crawlberg
|
|
|
87
79
|
include AuthConfig
|
|
88
80
|
extend T::Sig
|
|
89
81
|
|
|
90
|
-
# HTTP header name to set on each request.
|
|
91
82
|
sig { returns(String) }
|
|
92
83
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
93
84
|
def name = super
|
|
94
|
-
# HTTP header value to send.
|
|
95
85
|
sig { returns(String) }
|
|
96
86
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
97
87
|
def value = super
|
|
@@ -111,19 +101,12 @@ module Crawlberg
|
|
|
111
101
|
end
|
|
112
102
|
|
|
113
103
|
module Crawlberg
|
|
114
|
-
# An event emitted during a streaming crawl operation.
|
|
115
|
-
#
|
|
116
|
-
# Not available on `wasm32` targets — streaming requires native concurrency
|
|
117
|
-
# primitives (tokio channels, `JoinSet`) that are not supported on wasm32.
|
|
118
|
-
#
|
|
119
|
-
# Delivered to bindings through each target's native streaming idiom.
|
|
120
104
|
module CrawlEvent
|
|
121
105
|
extend T::Helpers
|
|
122
106
|
extend T::Sig
|
|
123
107
|
|
|
124
108
|
interface!
|
|
125
109
|
|
|
126
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
127
110
|
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
128
111
|
# @return [variant_class] an instance of the appropriate variant
|
|
129
112
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
@@ -146,7 +129,6 @@ module Crawlberg
|
|
|
146
129
|
include CrawlEvent
|
|
147
130
|
extend T::Sig
|
|
148
131
|
|
|
149
|
-
# The crawled page result.
|
|
150
132
|
sig { returns(CrawlPageResult) }
|
|
151
133
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
152
134
|
def result = super
|
|
@@ -168,11 +150,9 @@ module Crawlberg
|
|
|
168
150
|
include CrawlEvent
|
|
169
151
|
extend T::Sig
|
|
170
152
|
|
|
171
|
-
# The URL that failed.
|
|
172
153
|
sig { returns(String) }
|
|
173
154
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
174
155
|
def url = super
|
|
175
|
-
# The error message.
|
|
176
156
|
sig { returns(String) }
|
|
177
157
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
178
158
|
def error = super
|
|
@@ -194,7 +174,6 @@ module Crawlberg
|
|
|
194
174
|
include CrawlEvent
|
|
195
175
|
extend T::Sig
|
|
196
176
|
|
|
197
|
-
# Total number of pages crawled.
|
|
198
177
|
sig { returns(Integer) }
|
|
199
178
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
200
179
|
def pages_crawled = super
|
|
@@ -214,17 +193,12 @@ module Crawlberg
|
|
|
214
193
|
end
|
|
215
194
|
|
|
216
195
|
module Crawlberg
|
|
217
|
-
# A single page interaction action.
|
|
218
|
-
#
|
|
219
|
-
# Actions are serialized with a `type` tag using camelCase naming,
|
|
220
|
-
# except `ExecuteJs` which is explicitly renamed to `"executeJs"`.
|
|
221
196
|
module PageAction
|
|
222
197
|
extend T::Helpers
|
|
223
198
|
extend T::Sig
|
|
224
199
|
|
|
225
200
|
interface!
|
|
226
201
|
|
|
227
|
-
# Dispatch from a Hash to the appropriate variant constructor.
|
|
228
202
|
# @param hash [Hash] with discriminator field and variant-specific fields
|
|
229
203
|
# @return [variant_class] an instance of the appropriate variant
|
|
230
204
|
sig { params(hash: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
|
@@ -257,7 +231,6 @@ module Crawlberg
|
|
|
257
231
|
include PageAction
|
|
258
232
|
extend T::Sig
|
|
259
233
|
|
|
260
|
-
# CSS selector for the element to click.
|
|
261
234
|
sig { returns(String) }
|
|
262
235
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
263
236
|
def selector = super
|
|
@@ -289,11 +262,9 @@ module Crawlberg
|
|
|
289
262
|
include PageAction
|
|
290
263
|
extend T::Sig
|
|
291
264
|
|
|
292
|
-
# CSS selector for the input element.
|
|
293
265
|
sig { returns(String) }
|
|
294
266
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
295
267
|
def selector = super
|
|
296
|
-
# Text to type into the element.
|
|
297
268
|
sig { returns(String) }
|
|
298
269
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
299
270
|
def text = super
|
|
@@ -325,7 +296,6 @@ module Crawlberg
|
|
|
325
296
|
include PageAction
|
|
326
297
|
extend T::Sig
|
|
327
298
|
|
|
328
|
-
# Key name to press.
|
|
329
299
|
sig { returns(String) }
|
|
330
300
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
331
301
|
def key = super
|
|
@@ -357,15 +327,12 @@ module Crawlberg
|
|
|
357
327
|
include PageAction
|
|
358
328
|
extend T::Sig
|
|
359
329
|
|
|
360
|
-
# Direction to scroll.
|
|
361
330
|
sig { returns(ScrollDirection) }
|
|
362
331
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
363
332
|
def direction = super
|
|
364
|
-
# Optional CSS selector for a scrollable element. Scrolls the page if absent.
|
|
365
333
|
sig { returns(T.nilable(String)) }
|
|
366
334
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
367
335
|
def selector = super
|
|
368
|
-
# Optional pixel amount to scroll. Uses a default if absent.
|
|
369
336
|
sig { returns(T.nilable(Integer)) }
|
|
370
337
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
371
338
|
def amount = super
|
|
@@ -401,11 +368,9 @@ module Crawlberg
|
|
|
401
368
|
include PageAction
|
|
402
369
|
extend T::Sig
|
|
403
370
|
|
|
404
|
-
# Milliseconds to wait. Ignored if `selector` is provided.
|
|
405
371
|
sig { returns(T.nilable(Integer)) }
|
|
406
372
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
407
373
|
def milliseconds = super
|
|
408
|
-
# CSS selector to wait for.
|
|
409
374
|
sig { returns(T.nilable(String)) }
|
|
410
375
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
411
376
|
def selector = super
|
|
@@ -437,11 +402,6 @@ module Crawlberg
|
|
|
437
402
|
include PageAction
|
|
438
403
|
extend T::Sig
|
|
439
404
|
|
|
440
|
-
# Whether to capture the full scrollable page. Defaults to viewport only.
|
|
441
|
-
#
|
|
442
|
-
# Accepts both the canonical `fullPage` (camelCase) form and the
|
|
443
|
-
# `full_page` (snake_case) alias so language bindings and fixtures can
|
|
444
|
-
# use either convention without error.
|
|
445
405
|
sig { returns(T.nilable(T::Boolean)) }
|
|
446
406
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
447
407
|
def full_page = super
|
|
@@ -478,7 +438,6 @@ module Crawlberg
|
|
|
478
438
|
include PageAction
|
|
479
439
|
extend T::Sig
|
|
480
440
|
|
|
481
|
-
# JavaScript source code to execute. Max 1 MB.
|
|
482
441
|
sig { returns(String) }
|
|
483
442
|
# rubocop:disable Lint/UselessMethodDefinition
|
|
484
443
|
def script = super
|
data/lib/crawlberg/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:92a180744c0d0e145d6003de8523add09cce0f06ebcd24bc488f462d22913444
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module Crawlberg
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.0.
|
|
9
|
+
VERSION = "1.0.6"
|
|
10
10
|
end
|
data/lib/crawlberg.rb
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:e0600612767fdd3d51e9128afdb0ffcd1fb490e9942f3839a5120ab7a4e3b658
|
|
3
|
-
# To regenerate: alef generate
|
|
4
|
-
# To verify freshness: alef verify --exit-code
|
|
5
2
|
# frozen_string_literal: true
|
|
6
3
|
|
|
7
4
|
require_relative "crawlberg/version"
|
|
@@ -14,13 +11,8 @@ require_relative "crawlberg/native"
|
|
|
14
11
|
# {file:README.md} for usage examples and the upstream documentation
|
|
15
12
|
# for the full API reference.
|
|
16
13
|
module Crawlberg
|
|
17
|
-
# Re-export all types and functions from native extension
|
|
18
14
|
end
|
|
19
15
|
|
|
20
|
-
# Bring top-level Crawlberg classes into the global namespace so callers
|
|
21
|
-
# (and the generated e2e suite) can reference them unqualified. The native
|
|
22
|
-
# extension has already been required above, so every type constant is defined
|
|
23
|
-
# under Crawlberg by this point.
|
|
24
16
|
Crawlberg.constants.each do |const_name|
|
|
25
17
|
value = Crawlberg.const_get(const_name)
|
|
26
18
|
::Object.const_set(const_name, value) if value.is_a?(Module) && !::Object.const_defined?(const_name)
|
data/lib/crawlberg_rb.so
CHANGED
|
Binary file
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:ed6753aa35e27ad4764a749b35d849473835fb530fcba666ac607635b1333c06
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: crawlberg
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Xberg Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|