@signaliz/cli 1.0.80 → 1.0.81

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 (2) hide show
  1. package/dist/bin.js +3 -2
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -238,8 +238,8 @@ function firstValidSignalValue(values, normalize) {
238
238
  }
239
239
  function publicSignalSummary(value, title) {
240
240
  if (!value) return "";
241
- const severePageChrome = /\[share\]\(mailto:|\blast modified on\b|\bprefer the guardian on google\b/i.test(value);
242
- let cleaned = value.replace(/\[(?:share|email)\]\((?:mailto:|https?:\/\/)[^)]+\)/gi, " ").replace(/\bskip to content\b[\s\S]*$/i, " ").replace(/\b(?:explore stocks|trading disclosure)\b[\s\S]*$/i, " ").replace(/\bimage by:\s*([A-Z][A-Za-z0-9.&'-]*)\s+\1\b/gi, "$1").replace(/\bimage by:\s*[^.!?]{1,80}(?=[.!?]|$)/gi, " ").replace(/[^.!?]{0,100}\b(?:logo|image|photo)\b[^.!?]{0,100}[.!?]\s*\((?:Reuters|AP)\)\s*/gi, " ").replace(/(?:(?:read\s*post|read\s*more|keep\s*reading|learn\s*more)\s*)+/gi, " ").replace(/\b(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\s+\d{1,2},\s+\d{4}\b/gi, " ").replace(/\s*\.{3,}\s*/g, " ").replace(/\s+/g, " ").replace(/\s+([,.!?])/g, "$1").trim();
241
+ const severePageChrome = /\[share\]\(mailto:|\blast modified on\b|\bprefer the guardian on google\b|\b(?:business wire|globe newswire)\s*$/i.test(value);
242
+ let cleaned = value.replace(/^#\s*/, "").replace(/^[A-Z][A-Z .'-]+--\((?:BUSINESS WIRE|GLOBE NEWSWIRE)\)--\s*/i, "").replace(/\[(?:share|email)\]\((?:mailto:|https?:\/\/)[^)]+\)/gi, " ").replace(/\bskip to content\b[\s\S]*$/i, " ").replace(/\b(?:explore stocks|trading disclosure)\b[\s\S]*$/i, " ").replace(/\bimage by:\s*([A-Z][A-Za-z0-9.&'-]*)\s+\1\b/gi, "$1").replace(/\bimage by:\s*[^.!?]{1,80}(?=[.!?]|$)/gi, " ").replace(/[^.!?]{0,100}\b(?:logo|image|photo)\b[^.!?]{0,100}[.!?]\s*\((?:Reuters|AP)\)\s*/gi, " ").replace(/(?:(?:read\s*post|read\s*more|keep\s*reading|learn\s*more)\s*)+/gi, " ").replace(/\b(?:jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|jun(?:e)?|jul(?:y)?|aug(?:ust)?|sep(?:t(?:ember)?)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)\s+\d{1,2},\s+\d{4}\b/gi, " ").replace(/\s*\.{3,}\s*/g, " ").replace(/\s+/g, " ").replace(/\s+([,.!?])/g, "$1").trim();
243
243
  const sentenceEnds = Array.from(cleaned.matchAll(/[.!?](?=\s+[A-Z]|$)/g));
244
244
  const lastSentenceEnd = sentenceEnds[sentenceEnds.length - 1]?.index ?? -1;
245
245
  if (cleaned.length > 240 && lastSentenceEnd >= 100 && cleaned.length - lastSentenceEnd > 20) {
@@ -250,6 +250,7 @@ function publicSignalSummary(value, title) {
250
250
  const remainder = cleaned.slice(title.length).replace(/^\s*(?:[:|\-–—]\s*)?/, "");
251
251
  if (/^(?:[A-Z]|news\b)/.test(remainder)) cleaned = remainder;
252
252
  }
253
+ cleaned = cleaned.replace(/^By\s+\[[^\]]+\]\(https?:\/\/[^)]+\)\s*-\s*/i, "").replace(/^\[[^\]]+\]\(https?:\/\/[^)]*\/(?:wp-content|images?)\/[^)]+\)\s*/i, "").trim();
253
254
  const key = (text) => text.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim();
254
255
  const cleanedKey = key(cleaned);
255
256
  const titleKey = key(title);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaliz/cli",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "description": "Signaliz CLI for Company Signal Enrichment, Signals First, Signal Awareness, Signal to Copy AI, and Signaliz Flow.",
5
5
  "bin": {
6
6
  "signaliz": "dist/bin.js"