triangle-utils 1.4.167 → 1.4.168

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.
@@ -24,7 +24,10 @@ export class UtilsBrave {
24
24
  return;
25
25
  }
26
26
  const body = await response.json();
27
- const results = body.web.results;
27
+ if (verbosity > 1) {
28
+ console.log(JSON.stringify(body, undefined, 4));
29
+ }
30
+ const results = body.web?.results;
28
31
  if (!Array.isArray(results)) {
29
32
  return undefined;
30
33
  }
@@ -56,7 +59,10 @@ export class UtilsBrave {
56
59
  return;
57
60
  }
58
61
  const body = await response.json();
59
- const results = body.results;
62
+ if (verbosity > 1) {
63
+ console.log(JSON.stringify(body, undefined, 4));
64
+ }
65
+ const results = body?.results;
60
66
  if (!Array.isArray(results)) {
61
67
  return undefined;
62
68
  }
package/dist/src/f.js CHANGED
@@ -83,5 +83,5 @@ const utils = new TriangleUtils(config);
83
83
  // .then(response => console.log(response))
84
84
  // await utils.s3.get_download_url("s3://triangle-675045717295-us-east-1-an/tenant_documents/a3a9627f-a94d-4d47-a110-307a6f5563af/a146d789-da40-4e3c-a132-8b7110f3f7df.pdf", { name : "hye.pdf" })
85
85
  // .then(response => console.log(response))
86
- await utils.brave.news_search("abdul el sayed", { min_date: "2026-09-03", max_date: "2026-09-05" })
86
+ await utils.brave.web_search("press releases site:https://cohen.house.gov/", { min_date: "2026-09-03", max_date: "2026-09-05" })
87
87
  .then(console.log);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.167",
3
+ "version": "1.4.168",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -38,7 +38,8 @@
38
38
  "googleapis": "^170.0.0",
39
39
  "jsdom": "^29.0.1",
40
40
  "pg": "^8.23.0",
41
- "scrapingbee": "^1.8.2"
41
+ "scrapingbee": "^1.8.2",
42
+ "triangle-types": "^1.0.259"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@eslint/js": "^9.39.2",
package/src/UtilsBrave.ts CHANGED
@@ -31,7 +31,10 @@ export class UtilsBrave {
31
31
  return
32
32
  }
33
33
  const body : any = await response.json()
34
- const results = body.web.results
34
+ if (verbosity > 1) {
35
+ console.log(JSON.stringify(body, undefined, 4))
36
+ }
37
+ const results = body.web?.results
35
38
  if (!Array.isArray(results)) {
36
39
  return undefined
37
40
  }
@@ -67,7 +70,10 @@ export class UtilsBrave {
67
70
  return
68
71
  }
69
72
  const body : any = await response.json()
70
- const results = body.results
73
+ if (verbosity > 1) {
74
+ console.log(JSON.stringify(body, undefined, 4))
75
+ }
76
+ const results = body?.results
71
77
  if (!Array.isArray(results)) {
72
78
  return undefined
73
79
  }
package/src/f.ts CHANGED
@@ -107,5 +107,5 @@ const utils = new TriangleUtils(config)
107
107
  // .then(response => console.log(response))
108
108
 
109
109
 
110
- await utils.brave.news_search("abdul el sayed", { min_date : "2026-09-03", max_date : "2026-09-05" })
110
+ await utils.brave.web_search("press releases site:https://cohen.house.gov/", { min_date : "2026-09-03", max_date : "2026-09-05" })
111
111
  .then(console.log)