xberg 1.3.4 → 1.3.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.
@@ -1,11 +1,11 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:715ad8642ffff546e63c46773a283e4a03bcb5b87f1ccadddc688baa7e1c4d1d
2
+ # alef:hash:c27e6904867bcdf10220f00395fbf4b5c652b935305f84d03c851f2a5ed1ef8f
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
6
6
  [package]
7
7
  name = "xberg-rb"
8
- version = "1.3.4"
8
+ version = "1.3.6"
9
9
  edition = "2024"
10
10
  license = "MIT"
11
11
  description = "High-performance document intelligence library"
@@ -72,8 +72,8 @@ xml = ["xberg/xml"]
72
72
 
73
73
  [dependencies]
74
74
  async-trait = "0.1"
75
- crawlberg = { default-features = false, version = "1.8.0" }
76
- html-to-markdown-rs = { default-features = false, version = "3.16" }
75
+ crawlberg = { default-features = false, version = "1.10.2" }
76
+ html-to-markdown-rs = { default-features = false, version = "3.17.2" }
77
77
  magnus = "0.9"
78
78
  rb-sys = ">=0.9.130, <0.10"
79
79
  serde = { version = "1", features = ["derive"] }
@@ -82,13 +82,13 @@ tokio = { version = "1", features = ["rt-multi-thread"] }
82
82
  tracing = "0.1"
83
83
 
84
84
  [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]
85
- xberg = { version = "1.3.4", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
85
+ xberg = { version = "1.3.6", default-features = false, features = ["macos-intel-target", "simd-utf8"] }
86
86
 
87
87
  [target.'cfg(not(any(target_os = "windows", all(target_os = "macos", target_arch = "x86_64"))))'.dependencies]
88
- xberg = { version = "1.3.4", features = ["full", "pdf", "pdf-pdfium", "ocr", "paddle-ocr", "paddle-ocr-types", "layout-detection", "layout-types", "embeddings", "embedding-presets", "reranker", "reranker-presets", "sparse-embeddings", "sparse-embedding-presets", "late-interaction", "late-interaction-presets", "chunking", "keywords-yake", "keywords-rake", "language-detection", "html", "tree-sitter", "office", "email", "archives", "stopwords", "auto-rotate", "auto-rotate-types", "tokio-runtime", "api", "api-types", "mcp", "liter-llm", "quality", "svg", "transcription", "transcription-types", "classification", "captioning", "formula-recognition", "ner-onnx", "ner-llm", "diff", "markdown-footnotes", "redaction", "enrichment", "heuristics", "presets", "structured", "url-ingestion"] }
88
+ xberg = { version = "1.3.6", features = ["full", "pdf", "pdf-pdfium", "ocr", "paddle-ocr", "paddle-ocr-types", "layout-detection", "layout-types", "embeddings", "embedding-presets", "reranker", "reranker-presets", "sparse-embeddings", "sparse-embedding-presets", "late-interaction", "late-interaction-presets", "chunking", "keywords-yake", "keywords-rake", "language-detection", "html", "tree-sitter", "office", "email", "archives", "stopwords", "auto-rotate", "auto-rotate-types", "tokio-runtime", "api", "api-types", "mcp", "liter-llm", "quality", "svg", "transcription", "transcription-types", "classification", "captioning", "formula-recognition", "ner-onnx", "ner-llm", "diff", "markdown-footnotes", "redaction", "enrichment", "heuristics", "presets", "structured", "url-ingestion"] }
89
89
 
90
90
  [target.'cfg(target_os = "windows")'.dependencies]
91
- xberg = { version = "1.3.4", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
91
+ xberg = { version = "1.3.6", default-features = false, features = ["windows-gnu-target", "simd-utf8"] }
92
92
 
93
93
  # This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
94
94
  # PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code, and the workspace's
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:3e862eca7b1250c4aa8d40b5563353572b94bd205d31f9f57c9efc950fcd26cb
2
+ // alef:hash:3751950d58564a09b72eb0e65f2f992e39f3dcd2cd851cd4493626ba6caef9a0
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -1126,7 +1126,7 @@ impl BoundingBox {
1126
1126
  }
1127
1127
  }
1128
1128
 
1129
- #[derive(Clone, Debug, serde::Serialize)]
1129
+ #[derive(Clone, serde::Serialize)]
1130
1130
  #[serde(default)]
1131
1131
  #[magnus::wrap(class = "Xberg::BrowserConfig")]
1132
1132
  pub struct BrowserConfig {
@@ -1146,6 +1146,8 @@ pub struct BrowserConfig {
1146
1146
  robots_user_agent: Option<String>,
1147
1147
  capture_network_events: bool,
1148
1148
  session_affinity: bool,
1149
+ chrome_path: Option<String>,
1150
+ chrome_args: Vec<String>,
1149
1151
  }
1150
1152
 
1151
1153
  unsafe impl IntoValueFromNative for BrowserConfig {}
@@ -1175,6 +1177,29 @@ impl magnus::TryConvert for BrowserConfig {
1175
1177
  }
1176
1178
 
1177
1179
  unsafe impl TryConvertOwned for BrowserConfig {}
1180
+ impl std::fmt::Debug for BrowserConfig {
1181
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1182
+ let mut debug = f.debug_struct("BrowserConfig");
1183
+ debug.field("mode", &self.mode);
1184
+ debug.field("backend", &self.backend);
1185
+ debug.field("endpoint", &"<redacted>");
1186
+ debug.field("timeout", &self.timeout);
1187
+ debug.field("overall_timeout", &self.overall_timeout);
1188
+ debug.field("shutdown_timeout", &self.shutdown_timeout);
1189
+ debug.field("wait", &self.wait);
1190
+ debug.field("wait_selector", &self.wait_selector);
1191
+ debug.field("extra_wait", &self.extra_wait);
1192
+ debug.field("proxy", &self.proxy);
1193
+ debug.field("block_url_patterns", &self.block_url_patterns);
1194
+ debug.field("eval_script", &"<redacted>");
1195
+ debug.field("robots_user_agent", &self.robots_user_agent);
1196
+ debug.field("capture_network_events", &self.capture_network_events);
1197
+ debug.field("session_affinity", &self.session_affinity);
1198
+ debug.field("chrome_path", &self.chrome_path);
1199
+ debug.field("chrome_args", &"<redacted>");
1200
+ debug.finish()
1201
+ }
1202
+ }
1178
1203
  impl<'de> serde::Deserialize<'de> for BrowserConfig {
1179
1204
  fn deserialize<D>(deserializer: D) -> ::core::result::Result<Self, D::Error>
1180
1205
  where
@@ -1332,6 +1357,24 @@ impl BrowserConfig {
1332
1357
  })?,
1333
1358
  None => true,
1334
1359
  },
1360
+ chrome_path: match kwargs.get(ruby.to_symbol("chrome_path")).filter(|v| !v.is_nil()) {
1361
+ Some(v) => Some(String::try_convert(v).map_err(|e| {
1362
+ magnus::Error::new(
1363
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1364
+ format!("invalid value for `chrome_path`: {}", e),
1365
+ )
1366
+ })?),
1367
+ None => None,
1368
+ },
1369
+ chrome_args: match kwargs.get(ruby.to_symbol("chrome_args")) {
1370
+ Some(v) => <Vec<String>>::try_convert(v).map_err(|e| {
1371
+ magnus::Error::new(
1372
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1373
+ format!("invalid value for `chrome_args`: {}", e),
1374
+ )
1375
+ })?,
1376
+ None => Default::default(),
1377
+ },
1335
1378
  })
1336
1379
  }
1337
1380
 
@@ -1394,6 +1437,14 @@ impl BrowserConfig {
1394
1437
  fn session_affinity(&self) -> bool {
1395
1438
  self.session_affinity
1396
1439
  }
1440
+
1441
+ fn chrome_path(&self) -> Option<String> {
1442
+ self.chrome_path.clone()
1443
+ }
1444
+
1445
+ fn chrome_args(&self) -> Vec<String> {
1446
+ self.chrome_args.clone()
1447
+ }
1397
1448
  }
1398
1449
 
1399
1450
  #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
@@ -4090,6 +4141,7 @@ pub struct ConversionOptions {
4090
4141
  include_document_structure: bool,
4091
4142
  extract_images: bool,
4092
4143
  max_image_size: u64,
4144
+ max_input_size: Option<u64>,
4093
4145
  capture_svg: bool,
4094
4146
  infer_dimensions: bool,
4095
4147
  max_depth: Option<usize>,
@@ -4490,6 +4542,15 @@ impl ConversionOptions {
4490
4542
  })?,
4491
4543
  None => 5242880,
4492
4544
  },
4545
+ max_input_size: match kwargs.get(ruby.to_symbol("max_input_size")).filter(|v| !v.is_nil()) {
4546
+ Some(v) => Some(u64::try_convert(v).map_err(|e| {
4547
+ magnus::Error::new(
4548
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
4549
+ format!("invalid value for `max_input_size`: {}", e),
4550
+ )
4551
+ })?),
4552
+ None => None,
4553
+ },
4493
4554
  capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")) {
4494
4555
  Some(v) => bool::try_convert(v).map_err(|e| {
4495
4556
  magnus::Error::new(
@@ -4703,6 +4764,10 @@ impl ConversionOptions {
4703
4764
  self.max_image_size
4704
4765
  }
4705
4766
 
4767
+ fn max_input_size(&self) -> Option<u64> {
4768
+ self.max_input_size
4769
+ }
4770
+
4706
4771
  fn capture_svg(&self) -> bool {
4707
4772
  self.capture_svg
4708
4773
  }
@@ -4995,7 +5060,7 @@ impl CoreProperties {
4995
5060
  }
4996
5061
  }
4997
5062
 
4998
- #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
5063
+ #[derive(Clone, serde::Serialize, serde::Deserialize)]
4999
5064
  #[serde(default)]
5000
5065
  #[magnus::wrap(class = "Xberg::CrawlConfig")]
5001
5066
  pub struct CrawlConfig {
@@ -5015,6 +5080,7 @@ pub struct CrawlConfig {
5015
5080
  include_paths: Vec<String>,
5016
5081
  exclude_paths: Vec<String>,
5017
5082
  path_patterns_match_query: bool,
5083
+ path_patterns_match_url: bool,
5018
5084
  dedup_include_query: bool,
5019
5085
  strip_tracking_params: bool,
5020
5086
  tracking_params: Vec<String>,
@@ -5083,6 +5149,67 @@ impl magnus::TryConvert for CrawlConfig {
5083
5149
  }
5084
5150
 
5085
5151
  unsafe impl TryConvertOwned for CrawlConfig {}
5152
+ impl std::fmt::Debug for CrawlConfig {
5153
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5154
+ let mut debug = f.debug_struct("CrawlConfig");
5155
+ debug.field("max_depth", &self.max_depth);
5156
+ debug.field("max_pages", &self.max_pages);
5157
+ debug.field("max_links_per_page", &self.max_links_per_page);
5158
+ debug.field("max_concurrent", &self.max_concurrent);
5159
+ debug.field("crawl_strategy", &self.crawl_strategy);
5160
+ debug.field("content_filter", &self.content_filter);
5161
+ debug.field("bm25_query", &self.bm25_query);
5162
+ debug.field("bm25_threshold", &self.bm25_threshold);
5163
+ debug.field("respect_robots_txt", &self.respect_robots_txt);
5164
+ debug.field("soft_http_errors", &self.soft_http_errors);
5165
+ debug.field("user_agent", &self.user_agent);
5166
+ debug.field("stay_on_domain", &self.stay_on_domain);
5167
+ debug.field("allow_subdomains", &self.allow_subdomains);
5168
+ debug.field("include_paths", &self.include_paths);
5169
+ debug.field("exclude_paths", &self.exclude_paths);
5170
+ debug.field("path_patterns_match_query", &self.path_patterns_match_query);
5171
+ debug.field("path_patterns_match_url", &self.path_patterns_match_url);
5172
+ debug.field("dedup_include_query", &self.dedup_include_query);
5173
+ debug.field("strip_tracking_params", &self.strip_tracking_params);
5174
+ debug.field("tracking_params", &self.tracking_params);
5175
+ debug.field("custom_headers", &"<redacted>");
5176
+ debug.field("request_timeout", &self.request_timeout);
5177
+ debug.field("rate_limit_ms", &self.rate_limit_ms);
5178
+ debug.field("max_redirects", &self.max_redirects);
5179
+ debug.field("retry_count", &self.retry_count);
5180
+ debug.field("retry_codes", &self.retry_codes);
5181
+ debug.field("retry_initial_delay_ms", &self.retry_initial_delay_ms);
5182
+ debug.field("retry_max_delay_ms", &self.retry_max_delay_ms);
5183
+ debug.field("rate_limit_jitter_ratio", &self.rate_limit_jitter_ratio);
5184
+ debug.field("cookies_enabled", &self.cookies_enabled);
5185
+ debug.field("auth", &self.auth);
5186
+ debug.field("max_body_size", &self.max_body_size);
5187
+ debug.field("remove_tags", &self.remove_tags);
5188
+ debug.field("content", &self.content);
5189
+ debug.field("map_limit", &self.map_limit);
5190
+ debug.field("map_search", &self.map_search);
5191
+ debug.field("download_assets", &self.download_assets);
5192
+ debug.field("asset_types", &self.asset_types);
5193
+ debug.field("max_asset_size", &self.max_asset_size);
5194
+ debug.field("browser", &self.browser);
5195
+ debug.field("proxy", &self.proxy);
5196
+ debug.field("user_agents", &self.user_agents);
5197
+ debug.field("capture_screenshot", &self.capture_screenshot);
5198
+ debug.field("follow_document_urls", &self.follow_document_urls);
5199
+ debug.field("document_url_depth", &self.document_url_depth);
5200
+ debug.field("download_documents", &self.download_documents);
5201
+ debug.field("document_max_size", &self.document_max_size);
5202
+ debug.field("document_mime_types", &self.document_mime_types);
5203
+ debug.field("document_output_dir", &self.document_output_dir);
5204
+ debug.field("document_content_encoding", &self.document_content_encoding);
5205
+ debug.field("warc_output", &self.warc_output);
5206
+ debug.field("browser_profile", &self.browser_profile);
5207
+ debug.field("save_browser_profile", &self.save_browser_profile);
5208
+ debug.field("ssrf", &self.ssrf);
5209
+ debug.field("ssrf_deny_private_explicit", &self.ssrf_deny_private_explicit);
5210
+ debug.finish()
5211
+ }
5212
+ }
5086
5213
 
5087
5214
  impl Default for CrawlConfig {
5088
5215
  fn default() -> Self {
@@ -5241,6 +5368,15 @@ impl CrawlConfig {
5241
5368
  })?,
5242
5369
  None => false,
5243
5370
  },
5371
+ path_patterns_match_url: match kwargs.get(ruby.to_symbol("path_patterns_match_url")) {
5372
+ Some(v) => bool::try_convert(v).map_err(|e| {
5373
+ magnus::Error::new(
5374
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
5375
+ format!("invalid value for `path_patterns_match_url`: {}", e),
5376
+ )
5377
+ })?,
5378
+ None => false,
5379
+ },
5244
5380
  dedup_include_query: match kwargs.get(ruby.to_symbol("dedup_include_query")) {
5245
5381
  Some(v) => bool::try_convert(v).map_err(|e| {
5246
5382
  magnus::Error::new(
@@ -5664,6 +5800,10 @@ impl CrawlConfig {
5664
5800
  self.path_patterns_match_query
5665
5801
  }
5666
5802
 
5803
+ fn path_patterns_match_url(&self) -> bool {
5804
+ self.path_patterns_match_url
5805
+ }
5806
+
5667
5807
  fn dedup_include_query(&self) -> bool {
5668
5808
  self.dedup_include_query
5669
5809
  }
@@ -29315,7 +29455,7 @@ impl PropertyChange {
29315
29455
  }
29316
29456
  }
29317
29457
 
29318
- #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
29458
+ #[derive(Clone, serde::Serialize, serde::Deserialize)]
29319
29459
  #[serde(default)]
29320
29460
  #[magnus::wrap(class = "Xberg::ProxyConfig")]
29321
29461
  pub struct ProxyConfig {
@@ -29351,6 +29491,15 @@ impl magnus::TryConvert for ProxyConfig {
29351
29491
  }
29352
29492
 
29353
29493
  unsafe impl TryConvertOwned for ProxyConfig {}
29494
+ impl std::fmt::Debug for ProxyConfig {
29495
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29496
+ let mut debug = f.debug_struct("ProxyConfig");
29497
+ debug.field("url", &"<redacted>");
29498
+ debug.field("username", &self.username);
29499
+ debug.field("password", &"<redacted>");
29500
+ debug.finish()
29501
+ }
29502
+ }
29354
29503
 
29355
29504
  impl Default for ProxyConfig {
29356
29505
  fn default() -> Self {
@@ -32038,6 +32187,7 @@ impl SparseEmbeddingPreset {
32038
32187
  pub struct SsrfPolicy {
32039
32188
  deny_private: bool,
32040
32189
  allowlist: Vec<HostMatcher>,
32190
+ denylist: Vec<HostMatcher>,
32041
32191
  max_redirects: u8,
32042
32192
  scheme_allowlist: Vec<String>,
32043
32193
  }
@@ -32109,6 +32259,15 @@ impl SsrfPolicy {
32109
32259
  })?,
32110
32260
  None => Default::default(),
32111
32261
  },
32262
+ denylist: match kwargs.get(ruby.to_symbol("denylist")) {
32263
+ Some(v) => <Vec<HostMatcher>>::try_convert(v).map_err(|e| {
32264
+ magnus::Error::new(
32265
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
32266
+ format!("invalid value for `denylist`: {}", e),
32267
+ )
32268
+ })?,
32269
+ None => Default::default(),
32270
+ },
32112
32271
  max_redirects: match kwargs.get(ruby.to_symbol("max_redirects")) {
32113
32272
  Some(v) => u8::try_convert(v).map_err(|e| {
32114
32273
  magnus::Error::new(
@@ -32138,6 +32297,10 @@ impl SsrfPolicy {
32138
32297
  self.allowlist.clone()
32139
32298
  }
32140
32299
 
32300
+ fn denylist(&self) -> Vec<HostMatcher> {
32301
+ self.denylist.clone()
32302
+ }
32303
+
32141
32304
  fn max_redirects(&self) -> u8 {
32142
32305
  self.max_redirects
32143
32306
  }
@@ -36266,7 +36429,7 @@ impl magnus::TryConvert for AssetCategory {
36266
36429
  unsafe impl IntoValueFromNative for AssetCategory {}
36267
36430
  unsafe impl TryConvertOwned for AssetCategory {}
36268
36431
 
36269
- #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
36432
+ #[derive(Clone, serde::Serialize, serde::Deserialize)]
36270
36433
  #[serde(tag = "type")]
36271
36434
  pub enum AuthConfig {
36272
36435
  #[serde(rename = "basic")]
@@ -36332,6 +36495,11 @@ unsafe impl IntoValueFromNative for AuthConfig {}
36332
36495
  unsafe impl TryConvertOwned for AuthConfig {}
36333
36496
 
36334
36497
  impl AuthConfig {}
36498
+ impl std::fmt::Debug for AuthConfig {
36499
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
36500
+ f.write_str("AuthConfig(<redacted>)")
36501
+ }
36502
+ }
36335
36503
 
36336
36504
  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
36337
36505
  #[serde(rename_all = "snake_case")]
@@ -48325,6 +48493,8 @@ impl From<BrowserConfig> for crawlberg::BrowserConfig {
48325
48493
  robots_user_agent: val.robots_user_agent,
48326
48494
  capture_network_events: val.capture_network_events,
48327
48495
  session_affinity: val.session_affinity,
48496
+ chrome_path: val.chrome_path.map(Into::into),
48497
+ chrome_args: val.chrome_args.into_iter().collect(),
48328
48498
  ..Default::default()
48329
48499
  }
48330
48500
  }
@@ -48349,6 +48519,8 @@ impl From<crawlberg::BrowserConfig> for BrowserConfig {
48349
48519
  robots_user_agent: val.robots_user_agent.map(|v| v.to_string()),
48350
48520
  capture_network_events: val.capture_network_events,
48351
48521
  session_affinity: val.session_affinity,
48522
+ chrome_path: val.chrome_path.map(|p| p.to_string_lossy().to_string()),
48523
+ chrome_args: val.chrome_args.into_iter().collect(),
48352
48524
  }
48353
48525
  }
48354
48526
  }
@@ -48918,6 +49090,7 @@ impl From<ConversionOptions> for html_to_markdown_rs::ConversionOptions {
48918
49090
  include_document_structure: val.include_document_structure,
48919
49091
  extract_images: val.extract_images,
48920
49092
  max_image_size: val.max_image_size,
49093
+ max_input_size: val.max_input_size,
48921
49094
  capture_svg: val.capture_svg,
48922
49095
  infer_dimensions: val.infer_dimensions,
48923
49096
  max_depth: val.max_depth,
@@ -48972,6 +49145,7 @@ impl From<html_to_markdown_rs::ConversionOptions> for ConversionOptions {
48972
49145
  include_document_structure: val.include_document_structure,
48973
49146
  extract_images: val.extract_images,
48974
49147
  max_image_size: val.max_image_size,
49148
+ max_input_size: val.max_input_size,
48975
49149
  capture_svg: val.capture_svg,
48976
49150
  infer_dimensions: val.infer_dimensions,
48977
49151
  max_depth: val.max_depth,
@@ -49052,6 +49226,7 @@ impl From<CrawlConfig> for crawlberg::CrawlConfig {
49052
49226
  include_paths: val.include_paths.into_iter().collect(),
49053
49227
  exclude_paths: val.exclude_paths.into_iter().collect(),
49054
49228
  path_patterns_match_query: val.path_patterns_match_query,
49229
+ path_patterns_match_url: val.path_patterns_match_url,
49055
49230
  dedup_include_query: val.dedup_include_query,
49056
49231
  strip_tracking_params: val.strip_tracking_params,
49057
49232
  tracking_params: val.tracking_params.into_iter().collect(),
@@ -49119,6 +49294,7 @@ impl From<crawlberg::CrawlConfig> for CrawlConfig {
49119
49294
  include_paths: val.include_paths.into_iter().collect(),
49120
49295
  exclude_paths: val.exclude_paths.into_iter().collect(),
49121
49296
  path_patterns_match_query: val.path_patterns_match_query,
49297
+ path_patterns_match_url: val.path_patterns_match_url,
49122
49298
  dedup_include_query: val.dedup_include_query,
49123
49299
  strip_tracking_params: val.strip_tracking_params,
49124
49300
  tracking_params: val.tracking_params.into_iter().collect(),
@@ -53939,6 +54115,7 @@ impl From<SsrfPolicy> for crawlberg::SsrfPolicy {
53939
54115
  Self {
53940
54116
  deny_private: val.deny_private,
53941
54117
  allowlist: val.allowlist.into_iter().map(Into::into).collect(),
54118
+ denylist: val.denylist.into_iter().map(Into::into).collect(),
53942
54119
  max_redirects: val.max_redirects,
53943
54120
  scheme_allowlist: val.scheme_allowlist.into_iter().collect(),
53944
54121
  ..Default::default()
@@ -53952,6 +54129,7 @@ impl From<crawlberg::SsrfPolicy> for SsrfPolicy {
53952
54129
  Self {
53953
54130
  deny_private: val.deny_private,
53954
54131
  allowlist: val.allowlist.into_iter().map(Into::into).collect(),
54132
+ denylist: val.denylist.into_iter().map(Into::into).collect(),
53955
54133
  max_redirects: val.max_redirects,
53956
54134
  scheme_allowlist: val.scheme_allowlist.into_iter().collect(),
53957
54135
  }
@@ -57397,30 +57575,30 @@ impl From<html_to_markdown_rs::WhitespaceMode> for WhitespaceMode {
57397
57575
  }
57398
57576
  }
57399
57577
 
57400
- /// Convert a `xberg::heuristics::error::HeuristicsError` error to a Magnus runtime error.
57578
+ /// Convert a `xberg::HeuristicsError` error to a Magnus runtime error.
57401
57579
  #[allow(dead_code)]
57402
- fn heuristics_error_to_magnus_err(e: xberg::heuristics::error::HeuristicsError) -> magnus::Error {
57580
+ fn heuristics_error_to_magnus_err(e: xberg::HeuristicsError) -> magnus::Error {
57403
57581
  let msg = e.to_string();
57404
57582
  magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
57405
57583
  }
57406
57584
 
57407
- /// Convert a `xberg::presets::loader::LoadError` error to a Magnus runtime error.
57585
+ /// Convert a `xberg::LoadError` error to a Magnus runtime error.
57408
57586
  #[allow(dead_code)]
57409
- fn load_error_to_magnus_err(e: xberg::presets::loader::LoadError) -> magnus::Error {
57587
+ fn load_error_to_magnus_err(e: xberg::LoadError) -> magnus::Error {
57410
57588
  let msg = e.to_string();
57411
57589
  magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
57412
57590
  }
57413
57591
 
57414
- /// Convert a `xberg::presets::resolve::ResolveError` error to a Magnus runtime error.
57592
+ /// Convert a `xberg::ResolveError` error to a Magnus runtime error.
57415
57593
  #[allow(dead_code)]
57416
- fn resolve_error_to_magnus_err(e: xberg::presets::resolve::ResolveError) -> magnus::Error {
57594
+ fn resolve_error_to_magnus_err(e: xberg::ResolveError) -> magnus::Error {
57417
57595
  let msg = e.to_string();
57418
57596
  magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
57419
57597
  }
57420
57598
 
57421
- /// Convert a `xberg::error::XbergError` error to a Magnus runtime error.
57599
+ /// Convert a `xberg::XbergError` error to a Magnus runtime error.
57422
57600
  #[allow(dead_code)]
57423
- fn xberg_error_to_magnus_err(e: xberg::error::XbergError) -> magnus::Error {
57601
+ fn xberg_error_to_magnus_err(e: xberg::XbergError) -> magnus::Error {
57424
57602
  let msg = e.to_string();
57425
57603
  magnus::Error::new(unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(), msg)
57426
57604
  }
@@ -57591,6 +57769,10 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
57591
57769
 
57592
57770
  class.define_method("session_affinity", method!(BrowserConfig::session_affinity, 0))?;
57593
57771
 
57772
+ class.define_method("chrome_path", method!(BrowserConfig::chrome_path, 0))?;
57773
+
57774
+ class.define_method("chrome_args", method!(BrowserConfig::chrome_args, 0))?;
57775
+
57594
57776
  let class = module.define_class("CacheStats", ruby.class_object())?;
57595
57777
 
57596
57778
  class.define_singleton_method("new", function!(CacheStats::new, -1))?;
@@ -58027,6 +58209,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
58027
58209
 
58028
58210
  class.define_method("max_image_size", method!(ConversionOptions::max_image_size, 0))?;
58029
58211
 
58212
+ class.define_method("max_input_size", method!(ConversionOptions::max_input_size, 0))?;
58213
+
58030
58214
  class.define_method("capture_svg", method!(ConversionOptions::capture_svg, 0))?;
58031
58215
 
58032
58216
  class.define_method("infer_dimensions", method!(ConversionOptions::infer_dimensions, 0))?;
@@ -58128,6 +58312,11 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
58128
58312
  method!(CrawlConfig::path_patterns_match_query, 0),
58129
58313
  )?;
58130
58314
 
58315
+ class.define_method(
58316
+ "path_patterns_match_url",
58317
+ method!(CrawlConfig::path_patterns_match_url, 0),
58318
+ )?;
58319
+
58131
58320
  class.define_method("dedup_include_query", method!(CrawlConfig::dedup_include_query, 0))?;
58132
58321
 
58133
58322
  class.define_method("strip_tracking_params", method!(CrawlConfig::strip_tracking_params, 0))?;
@@ -61805,6 +61994,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
61805
61994
 
61806
61995
  class.define_method("allowlist", method!(SsrfPolicy::allowlist, 0))?;
61807
61996
 
61997
+ class.define_method("denylist", method!(SsrfPolicy::denylist, 0))?;
61998
+
61808
61999
  class.define_method("max_redirects", method!(SsrfPolicy::max_redirects, 0))?;
61809
62000
 
61810
62001
  class.define_method("scheme_allowlist", method!(SsrfPolicy::scheme_allowlist, 0))?;
data/lib/xberg/version.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:a73b2b7b23be41b809d7a63c6e84f6b22dc213b4d2d018e2004ef2a2f0e9410e
2
+ # alef:hash:988034bb9172ee9a4ecaa49221da1ceed7f562d9d0ef1192f4a91b54dfed0ed1
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module Xberg
8
8
  ## The version string for this package.
9
- VERSION = "1.3.4"
9
+ VERSION = "1.3.6"
10
10
  end
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:4d6e82c5b0834d91c2575ca21fe65ed7dc5bb424ab80623cb550f60e8cd268ad
2
+ # alef:hash:d01bd27d5fa9368a18dda14ba966abab79e6f319668303eaa72b202e75e41946
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -107,8 +107,10 @@ def initialize: (?entry_count: Integer, ?citation_keys: Array[String], ?authors:
107
107
  attr_reader robots_user_agent: String?
108
108
  attr_reader capture_network_events: bool
109
109
  attr_reader session_affinity: bool
110
+ attr_reader chrome_path: String?
111
+ attr_reader chrome_args: Array[String]
110
112
 
111
- def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoint: String, ?timeout: Integer, ?overall_timeout: Integer, ?shutdown_timeout: Integer, ?wait: enum_BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool) -> void
113
+ def initialize: (?mode: enum_BrowserMode, ?backend: enum_BrowserBackend, ?endpoint: String, ?timeout: Integer, ?overall_timeout: Integer, ?shutdown_timeout: Integer, ?wait: enum_BrowserWait, ?wait_selector: String, ?extra_wait: Integer, ?proxy: ProxyConfig, ?block_url_patterns: Array[String], ?eval_script: String, ?robots_user_agent: String, ?capture_network_events: bool, ?session_affinity: bool, ?chrome_path: String, ?chrome_args: Array[String]) -> void
112
114
  end
113
115
 
114
116
  class CacheStats
@@ -362,6 +364,7 @@ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_
362
364
  attr_reader include_document_structure: bool
363
365
  attr_reader extract_images: bool
364
366
  attr_reader max_image_size: Integer
367
+ attr_reader max_input_size: Integer?
365
368
  attr_reader capture_svg: bool
366
369
  attr_reader infer_dimensions: bool
367
370
  attr_reader max_depth: Integer?
@@ -369,7 +372,7 @@ def initialize: (?output_format: String, ?preprocessing_preset: String, ?remove_
369
372
  attr_reader tier_strategy: enum_TierStrategy
370
373
  attr_reader base_url: String?
371
374
 
372
- def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_HtmlToMarkdownRsOutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String) -> void
375
+ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_HtmlToMarkdownRsOutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?max_input_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String) -> void
373
376
  end
374
377
 
375
378
  class CoreProperties
@@ -409,6 +412,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
409
412
  attr_reader include_paths: Array[String]
410
413
  attr_reader exclude_paths: Array[String]
411
414
  attr_reader path_patterns_match_query: bool
415
+ attr_reader path_patterns_match_url: bool
412
416
  attr_reader dedup_include_query: bool
413
417
  attr_reader strip_tracking_params: bool
414
418
  attr_reader tracking_params: Array[String]
@@ -448,7 +452,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
448
452
  attr_reader ssrf: SsrfPolicy
449
453
  attr_reader ssrf_deny_private_explicit: bool?
450
454
 
451
- def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: enum_CrawlStrategyKind, ?content_filter: enum_ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?path_patterns_match_query: bool, ?dedup_include_query: bool, ?strip_tracking_params: bool, ?tracking_params: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?retry_initial_delay_ms: Integer, ?retry_max_delay_ms: Integer, ?rate_limit_jitter_ratio: Float, ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[enum_AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: enum_DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool) -> void
455
+ def initialize: (?max_depth: Integer, ?max_pages: Integer, ?max_links_per_page: Integer, ?max_concurrent: Integer, ?crawl_strategy: enum_CrawlStrategyKind, ?content_filter: enum_ContentFilterKind, ?bm25_query: String, ?bm25_threshold: Float, ?respect_robots_txt: bool, ?soft_http_errors: bool, ?user_agent: String, ?stay_on_domain: bool, ?allow_subdomains: bool, ?include_paths: Array[String], ?exclude_paths: Array[String], ?path_patterns_match_query: bool, ?path_patterns_match_url: bool, ?dedup_include_query: bool, ?strip_tracking_params: bool, ?tracking_params: Array[String], ?custom_headers: Hash[String, String], ?request_timeout: Integer, ?rate_limit_ms: Integer, ?max_redirects: Integer, ?retry_count: Integer, ?retry_codes: Array[Integer], ?retry_initial_delay_ms: Integer, ?retry_max_delay_ms: Integer, ?rate_limit_jitter_ratio: Float, ?cookies_enabled: bool, ?auth: AuthConfig, ?max_body_size: Integer, ?remove_tags: Array[String], ?content: ContentConfig, ?map_limit: Integer, ?map_search: String, ?download_assets: bool, ?asset_types: Array[enum_AssetCategory], ?max_asset_size: Integer, ?browser: BrowserConfig, ?proxy: ProxyConfig, ?user_agents: Array[String], ?capture_screenshot: bool, ?follow_document_urls: bool, ?document_url_depth: Integer, ?download_documents: bool, ?document_max_size: Integer, ?document_mime_types: Array[String], ?document_output_dir: String, ?document_content_encoding: enum_DocumentContentEncoding, ?warc_output: String, ?browser_profile: String, ?save_browser_profile: bool, ?ssrf: SsrfPolicy, ?ssrf_deny_private_explicit: bool) -> void
452
456
  end
453
457
 
454
458
  class CsvConfig
@@ -2444,10 +2448,11 @@ def initialize: (name: String, model_repo: String, model_file: String, additiona
2444
2448
  class SsrfPolicy
2445
2449
  attr_reader deny_private: bool
2446
2450
  attr_reader allowlist: Array[HostMatcher]
2451
+ attr_reader denylist: Array[HostMatcher]
2447
2452
  attr_reader max_redirects: Integer
2448
2453
  attr_reader scheme_allowlist: Array[String]
2449
2454
 
2450
- def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?max_redirects: Integer, ?scheme_allowlist: Array[String]) -> void
2455
+ def initialize: (?deny_private: bool, ?allowlist: Array[HostMatcher], ?denylist: Array[HostMatcher], ?max_redirects: Integer, ?scheme_allowlist: Array[String]) -> void
2451
2456
  end
2452
2457
 
2453
2458
  class StructuredData
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xberg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld <naaman@xberg.io>
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-05 00:00:00.000000000 Z
11
+ date: 2026-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys