@heripo/research-radar 3.3.10 β 4.0.0
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.
- package/README.md +1 -1
- package/dist/index.cjs +8 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -17
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -144,7 +144,7 @@ Uses the **Provider-Service pattern** from `@llm-newsletter-kit/core`. See [core
|
|
|
144
144
|
|
|
145
145
|
**Parsers** (`src/parsers/`): Custom extractors per organization
|
|
146
146
|
|
|
147
|
-
**Templates** (`src/templates/`): `newsletter-html.ts` (responsive email with light/dark mode), `welcome-html.ts` (`generateWelcomeHTML()`), `shared.ts` (shared HTML components)
|
|
147
|
+
**Templates** (`src/templates/`): `newsletter-html.ts` (responsive email with light/dark mode), `welcome-html.ts` (`generateWelcomeHTML()` async), `shared.ts` (shared HTML components)
|
|
148
148
|
|
|
149
149
|
## Development commands
|
|
150
150
|
|
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,6 @@ var TurndownService = require('turndown');
|
|
|
9
9
|
var jsdom = require('jsdom');
|
|
10
10
|
var safeMarkdown2Html = require('safe-markdown2html');
|
|
11
11
|
var DOMPurify = require('dompurify');
|
|
12
|
-
var juice = require('juice');
|
|
13
12
|
|
|
14
13
|
function _interopNamespaceDefault(e) {
|
|
15
14
|
var n = Object.create(null);
|
|
@@ -1978,23 +1977,21 @@ const poweredByFooterHtml = () => `
|
|
|
1978
1977
|
* - Light/dark mode support
|
|
1979
1978
|
* - Mobile-friendly design
|
|
1980
1979
|
* - Brand-specific styling
|
|
1981
|
-
* -
|
|
1980
|
+
* - Link to crawling sources page
|
|
1982
1981
|
* - Publication policy information
|
|
1983
1982
|
* - Platform introduction
|
|
1984
1983
|
*
|
|
1985
|
-
* @param targets - Array of crawling targets to be listed in the newsletter footer
|
|
1986
1984
|
* @param options - Optional template customization options
|
|
1987
1985
|
* @returns Complete HTML string for the newsletter email
|
|
1988
1986
|
*
|
|
1989
1987
|
* @example
|
|
1990
1988
|
* ```typescript
|
|
1991
1989
|
* const html = createNewsletterHtmlTemplate(
|
|
1992
|
-
* [{ id: '1', name: 'Source 1', url: 'https://example.com', ... }],
|
|
1993
1990
|
* { isKrasNewsletter: true, krasNewsMarkdown: '## News...' },
|
|
1994
1991
|
* );
|
|
1995
1992
|
* ```
|
|
1996
1993
|
*/
|
|
1997
|
-
const createNewsletterHtmlTemplate = (
|
|
1994
|
+
const createNewsletterHtmlTemplate = (options) => `<!DOCTYPE html>
|
|
1998
1995
|
<html lang="ko" style="color-scheme: light dark; supported-color-schemes: light dark;">
|
|
1999
1996
|
<head>
|
|
2000
1997
|
<meta charset="UTF-8">
|
|
@@ -2470,14 +2467,7 @@ ${options.heripolabNewsMarkdown}
|
|
|
2470
2467
|
: ''}
|
|
2471
2468
|
|
|
2472
2469
|
<h2 style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: bold; line-height: 1.3; color: #D2691E; margin: 0 0 16px 0; letter-spacing: -0.2px; border-left: 5px solid #D2691E; padding-left: 12px; background: none;">π λ΄μ€λ ν° μΆμ²</h2>
|
|
2473
|
-
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0;">λͺ¨λ
|
|
2474
|
-
<ul style="padding-left: 24px; margin: 0 0 18px 0;">
|
|
2475
|
-
${targets
|
|
2476
|
-
.map((target) => `
|
|
2477
|
-
<li style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0; margin-bottom: 8px;"><a href="${target.url}" target="_blank">${target.name}</a></li>
|
|
2478
|
-
`)
|
|
2479
|
-
.join('\n')}
|
|
2480
|
-
</ul>
|
|
2470
|
+
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0;">λͺ¨λ μμμ μΆμ²λ <a href="https://heripo.app/research-radar/sources" target="_blank">μ΄κ³³μμ</a> νμΈν μ μμ΅λλ€.</p>
|
|
2481
2471
|
<hr style="border: 0; border-top: 2px solid #D2691E; margin: 32px 0;">
|
|
2482
2472
|
<h2 style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: bold; line-height: 1.3; color: #D2691E; margin: 0 0 16px 0; letter-spacing: -0.2px; border-left: 5px solid #D2691E; padding-left: 12px; background: none;">π
λ°ν μ μ±
</h2>
|
|
2483
2473
|
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0;"><strong>${options?.isKrasNewsletter ? 'νκ΅κ³ κ³ νν λ΄μ€λ ν°' : 'heripo 리μμΉ λ μ΄λ'}</strong>λ λ§€μΌ λ°νμ μμΉμΌλ‘ νλ, λ
μλΆλ€κ» μλ―Έ μλ μ 보λ₯Ό μ 곡νκΈ° μν΄ λ€μκ³Ό κ°μ λ°ν κΈ°μ€μ μ μ©ν©λλ€:</p>
|
|
@@ -2540,7 +2530,7 @@ class ContentGenerateProvider {
|
|
|
2540
2530
|
this.model = model;
|
|
2541
2531
|
this.newsletterBrandName = brandName ?? newsletterConfig.brandName;
|
|
2542
2532
|
this.htmlTemplate = {
|
|
2543
|
-
html: createNewsletterHtmlTemplate(
|
|
2533
|
+
html: createNewsletterHtmlTemplate(templateOptions),
|
|
2544
2534
|
markers: {
|
|
2545
2535
|
title: 'NEWSLETTER_TITLE',
|
|
2546
2536
|
content: 'NEWSLETTER_CONTENT',
|
|
@@ -2864,19 +2854,20 @@ async function generateNewsletter(dependencies) {
|
|
|
2864
2854
|
* @example
|
|
2865
2855
|
* ```typescript
|
|
2866
2856
|
* // Default heripo branding (same as original heripo-web usage):
|
|
2867
|
-
* const html = generateWelcomeHTML('subscriber-123', 'νκΈΈλ');
|
|
2857
|
+
* const html = await generateWelcomeHTML('subscriber-123', 'νκΈΈλ');
|
|
2868
2858
|
*
|
|
2869
2859
|
* // KRAS mode:
|
|
2870
|
-
* const krasHtml = generateWelcomeHTML('subscriber-123', 'νκΈΈλ', {
|
|
2860
|
+
* const krasHtml = await generateWelcomeHTML('subscriber-123', 'νκΈΈλ', {
|
|
2871
2861
|
* isKrasNewsletter: true,
|
|
2872
2862
|
* });
|
|
2873
2863
|
* ```
|
|
2874
2864
|
*/
|
|
2875
|
-
function generateWelcomeHTML(id, name, options) {
|
|
2865
|
+
async function generateWelcomeHTML(id, name, options) {
|
|
2876
2866
|
const isKras = options?.isKrasNewsletter ?? false;
|
|
2877
2867
|
const siteUrl = options?.siteUrl ?? 'https://heripo.app';
|
|
2878
2868
|
const safeName = sanitizeText(name);
|
|
2879
2869
|
const unsubscribeUrl = `${siteUrl}/research-radar/unsubscribe?id=${id}`;
|
|
2870
|
+
const { default: juice } = await import('juice');
|
|
2880
2871
|
return juice(createWelcomeHtmlRaw(safeName, isKras, siteUrl, unsubscribeUrl));
|
|
2881
2872
|
}
|
|
2882
2873
|
function createWelcomeHtmlRaw(name, isKras, siteUrl, unsubscribeUrl) {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -264,15 +264,15 @@ declare function generateNewsletter(dependencies: NewsletterGeneratorDependencie
|
|
|
264
264
|
* @example
|
|
265
265
|
* ```typescript
|
|
266
266
|
* // Default heripo branding (same as original heripo-web usage):
|
|
267
|
-
* const html = generateWelcomeHTML('subscriber-123', 'νκΈΈλ');
|
|
267
|
+
* const html = await generateWelcomeHTML('subscriber-123', 'νκΈΈλ');
|
|
268
268
|
*
|
|
269
269
|
* // KRAS mode:
|
|
270
|
-
* const krasHtml = generateWelcomeHTML('subscriber-123', 'νκΈΈλ', {
|
|
270
|
+
* const krasHtml = await generateWelcomeHTML('subscriber-123', 'νκΈΈλ', {
|
|
271
271
|
* isKrasNewsletter: true,
|
|
272
272
|
* });
|
|
273
273
|
* ```
|
|
274
274
|
*/
|
|
275
|
-
declare function generateWelcomeHTML(id: string, name: string, options?: WelcomeTemplateOptions): string
|
|
275
|
+
declare function generateWelcomeHTML(id: string, name: string, options?: WelcomeTemplateOptions): Promise<string>;
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
* Date service implementation
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,6 @@ import TurndownService from 'turndown';
|
|
|
7
7
|
import { JSDOM } from 'jsdom';
|
|
8
8
|
import safeMarkdown2Html from 'safe-markdown2html';
|
|
9
9
|
import DOMPurify from 'dompurify';
|
|
10
|
-
import juice from 'juice';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Formats a date string by replacing dots with dashes.
|
|
@@ -1957,23 +1956,21 @@ const poweredByFooterHtml = () => `
|
|
|
1957
1956
|
* - Light/dark mode support
|
|
1958
1957
|
* - Mobile-friendly design
|
|
1959
1958
|
* - Brand-specific styling
|
|
1960
|
-
* -
|
|
1959
|
+
* - Link to crawling sources page
|
|
1961
1960
|
* - Publication policy information
|
|
1962
1961
|
* - Platform introduction
|
|
1963
1962
|
*
|
|
1964
|
-
* @param targets - Array of crawling targets to be listed in the newsletter footer
|
|
1965
1963
|
* @param options - Optional template customization options
|
|
1966
1964
|
* @returns Complete HTML string for the newsletter email
|
|
1967
1965
|
*
|
|
1968
1966
|
* @example
|
|
1969
1967
|
* ```typescript
|
|
1970
1968
|
* const html = createNewsletterHtmlTemplate(
|
|
1971
|
-
* [{ id: '1', name: 'Source 1', url: 'https://example.com', ... }],
|
|
1972
1969
|
* { isKrasNewsletter: true, krasNewsMarkdown: '## News...' },
|
|
1973
1970
|
* );
|
|
1974
1971
|
* ```
|
|
1975
1972
|
*/
|
|
1976
|
-
const createNewsletterHtmlTemplate = (
|
|
1973
|
+
const createNewsletterHtmlTemplate = (options) => `<!DOCTYPE html>
|
|
1977
1974
|
<html lang="ko" style="color-scheme: light dark; supported-color-schemes: light dark;">
|
|
1978
1975
|
<head>
|
|
1979
1976
|
<meta charset="UTF-8">
|
|
@@ -2449,14 +2446,7 @@ ${options.heripolabNewsMarkdown}
|
|
|
2449
2446
|
: ''}
|
|
2450
2447
|
|
|
2451
2448
|
<h2 style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: bold; line-height: 1.3; color: #D2691E; margin: 0 0 16px 0; letter-spacing: -0.2px; border-left: 5px solid #D2691E; padding-left: 12px; background: none;">π λ΄μ€λ ν° μΆμ²</h2>
|
|
2452
|
-
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0;">λͺ¨λ
|
|
2453
|
-
<ul style="padding-left: 24px; margin: 0 0 18px 0;">
|
|
2454
|
-
${targets
|
|
2455
|
-
.map((target) => `
|
|
2456
|
-
<li style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0; margin-bottom: 8px;"><a href="${target.url}" target="_blank">${target.name}</a></li>
|
|
2457
|
-
`)
|
|
2458
|
-
.join('\n')}
|
|
2459
|
-
</ul>
|
|
2449
|
+
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0;">λͺ¨λ μμμ μΆμ²λ <a href="https://heripo.app/research-radar/sources" target="_blank">μ΄κ³³μμ</a> νμΈν μ μμ΅λλ€.</p>
|
|
2460
2450
|
<hr style="border: 0; border-top: 2px solid #D2691E; margin: 32px 0;">
|
|
2461
2451
|
<h2 style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: bold; line-height: 1.3; color: #D2691E; margin: 0 0 16px 0; letter-spacing: -0.2px; border-left: 5px solid #D2691E; padding-left: 12px; background: none;">π
λ°ν μ μ±
</h2>
|
|
2462
2452
|
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.7; color: #444444; margin: 0 0 18px 0;"><strong>${options?.isKrasNewsletter ? 'νκ΅κ³ κ³ νν λ΄μ€λ ν°' : 'heripo 리μμΉ λ μ΄λ'}</strong>λ λ§€μΌ λ°νμ μμΉμΌλ‘ νλ, λ
μλΆλ€κ» μλ―Έ μλ μ 보λ₯Ό μ 곡νκΈ° μν΄ λ€μκ³Ό κ°μ λ°ν κΈ°μ€μ μ μ©ν©λλ€:</p>
|
|
@@ -2519,7 +2509,7 @@ class ContentGenerateProvider {
|
|
|
2519
2509
|
this.model = model;
|
|
2520
2510
|
this.newsletterBrandName = brandName ?? newsletterConfig.brandName;
|
|
2521
2511
|
this.htmlTemplate = {
|
|
2522
|
-
html: createNewsletterHtmlTemplate(
|
|
2512
|
+
html: createNewsletterHtmlTemplate(templateOptions),
|
|
2523
2513
|
markers: {
|
|
2524
2514
|
title: 'NEWSLETTER_TITLE',
|
|
2525
2515
|
content: 'NEWSLETTER_CONTENT',
|
|
@@ -2843,19 +2833,20 @@ async function generateNewsletter(dependencies) {
|
|
|
2843
2833
|
* @example
|
|
2844
2834
|
* ```typescript
|
|
2845
2835
|
* // Default heripo branding (same as original heripo-web usage):
|
|
2846
|
-
* const html = generateWelcomeHTML('subscriber-123', 'νκΈΈλ');
|
|
2836
|
+
* const html = await generateWelcomeHTML('subscriber-123', 'νκΈΈλ');
|
|
2847
2837
|
*
|
|
2848
2838
|
* // KRAS mode:
|
|
2849
|
-
* const krasHtml = generateWelcomeHTML('subscriber-123', 'νκΈΈλ', {
|
|
2839
|
+
* const krasHtml = await generateWelcomeHTML('subscriber-123', 'νκΈΈλ', {
|
|
2850
2840
|
* isKrasNewsletter: true,
|
|
2851
2841
|
* });
|
|
2852
2842
|
* ```
|
|
2853
2843
|
*/
|
|
2854
|
-
function generateWelcomeHTML(id, name, options) {
|
|
2844
|
+
async function generateWelcomeHTML(id, name, options) {
|
|
2855
2845
|
const isKras = options?.isKrasNewsletter ?? false;
|
|
2856
2846
|
const siteUrl = options?.siteUrl ?? 'https://heripo.app';
|
|
2857
2847
|
const safeName = sanitizeText(name);
|
|
2858
2848
|
const unsubscribeUrl = `${siteUrl}/research-radar/unsubscribe?id=${id}`;
|
|
2849
|
+
const { default: juice } = await import('juice');
|
|
2859
2850
|
return juice(createWelcomeHtmlRaw(safeName, isKras, siteUrl, unsubscribeUrl));
|
|
2860
2851
|
}
|
|
2861
2852
|
function createWelcomeHtmlRaw(name, isKras, siteUrl, unsubscribeUrl) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@heripo/research-radar",
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "4.0.0",
|
|
6
6
|
"description": "AI-driven intelligence for Korean cultural heritage. This package serves as both a ready-to-use newsletter service and a practical implementation example for the LLM-Newsletter-Kit.",
|
|
7
7
|
"main": "dist/index.cjs",
|
|
8
8
|
"module": "dist/index.js",
|
|
@@ -48,35 +48,35 @@
|
|
|
48
48
|
"author": "kimhongyeon",
|
|
49
49
|
"license": "Apache-2.0",
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
52
|
-
"@ai-sdk/google": "^3.0.
|
|
53
|
-
"@ai-sdk/openai": "^3.0.
|
|
51
|
+
"@ai-sdk/anthropic": "^3.0.81",
|
|
52
|
+
"@ai-sdk/google": "^3.0.80",
|
|
53
|
+
"@ai-sdk/openai": "^3.0.68",
|
|
54
54
|
"cheerio": "^1.2.0",
|
|
55
|
-
"dompurify": "^3.4.
|
|
55
|
+
"dompurify": "^3.4.8",
|
|
56
56
|
"jsdom": "^29.1.1",
|
|
57
|
-
"juice": "^
|
|
58
|
-
"safe-markdown2html": "^1.0.
|
|
57
|
+
"juice": "^12.1.0",
|
|
58
|
+
"safe-markdown2html": "^1.0.6",
|
|
59
59
|
"turndown": "^7.2.4"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@eslint/js": "^10.0.1",
|
|
63
|
-
"@llm-newsletter-kit/core": "^2.0.
|
|
63
|
+
"@llm-newsletter-kit/core": "^2.0.5",
|
|
64
64
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
65
65
|
"@types/express": "^5.0.6",
|
|
66
66
|
"@types/jsdom": "^28.0.3",
|
|
67
|
-
"@types/node": "^25.9.
|
|
67
|
+
"@types/node": "^25.9.2",
|
|
68
68
|
"@types/turndown": "^5.0.6",
|
|
69
|
-
"eslint": "^10.4.
|
|
69
|
+
"eslint": "^10.4.1",
|
|
70
70
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
71
71
|
"express": "^5.2.1",
|
|
72
72
|
"prettier": "^3.8.3",
|
|
73
73
|
"rimraf": "^6.1.3",
|
|
74
|
-
"rollup": "^4.
|
|
74
|
+
"rollup": "^4.61.1",
|
|
75
75
|
"rollup-plugin-dts": "^6.4.1",
|
|
76
76
|
"rollup-plugin-typescript2": "^0.37.0",
|
|
77
|
-
"tsx": "^4.22.
|
|
77
|
+
"tsx": "^4.22.4",
|
|
78
78
|
"typescript": "^6.0.3",
|
|
79
|
-
"typescript-eslint": "^8.
|
|
79
|
+
"typescript-eslint": "^8.60.1"
|
|
80
80
|
},
|
|
81
81
|
"repository": {
|
|
82
82
|
"type": "git",
|