@heripo/research-radar 6.4.0 → 6.4.1
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/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2484,6 +2484,27 @@ const isRecord$1 = (value) => typeof value === 'object' && value !== null;
|
|
|
2484
2484
|
const isKrasApiPost = (value) => isRecord$1(value) &&
|
|
2485
2485
|
(typeof value.id === 'string' || typeof value.id === 'number') &&
|
|
2486
2486
|
typeof value.board_slug === 'string';
|
|
2487
|
+
/**
|
|
2488
|
+
* 회원이 쓴 비밀글은 목록에는 `is_secret: 1`과 가려진 제목(`🔒 비밀글입니다.`)
|
|
2489
|
+
* 으로 나오지만, 상세 API는 401과 `비밀글입니다. 작성자 본인만 열람할 수
|
|
2490
|
+
* 있습니다.`를 돌려준다. 게시판의 `allow_secret`은 이를 막지 못한다 —
|
|
2491
|
+
* `alert` 게시판은 `allow_secret: 0`인데도 비밀글이 올라와 있다.
|
|
2492
|
+
*
|
|
2493
|
+
* 코어는 4xx를 재시도 불가 오류로 보고 `crawl.detail.fetch.failed`를 error로
|
|
2494
|
+
* 남기므로, 상세를 요청하기 전에 목록에서 걸러 파서 장애처럼 보이지 않게 한다.
|
|
2495
|
+
* 비밀글이 나중에 공개되면 저장된 적이 없으므로 그날 정상적으로 수집된다.
|
|
2496
|
+
*/
|
|
2497
|
+
const isSecretKrasPost = (post) => {
|
|
2498
|
+
const value = post.is_secret;
|
|
2499
|
+
if (value == null)
|
|
2500
|
+
return false;
|
|
2501
|
+
if (typeof value === 'boolean')
|
|
2502
|
+
return value;
|
|
2503
|
+
if (typeof value === 'number')
|
|
2504
|
+
return value !== 0;
|
|
2505
|
+
const normalized = value.trim().toLowerCase();
|
|
2506
|
+
return normalized !== '' && normalized !== '0' && normalized !== 'false';
|
|
2507
|
+
};
|
|
2487
2508
|
const parseJson = (html) => {
|
|
2488
2509
|
try {
|
|
2489
2510
|
return JSON.parse(html);
|
|
@@ -2508,7 +2529,10 @@ const parseKrasApiList = (html) => {
|
|
|
2508
2529
|
if (!isRecord$1(data) || !Array.isArray(data.items)) {
|
|
2509
2530
|
return undefined;
|
|
2510
2531
|
}
|
|
2511
|
-
return data.items
|
|
2532
|
+
return data.items
|
|
2533
|
+
.filter(isKrasApiPost)
|
|
2534
|
+
.filter((post) => !isSecretKrasPost(post))
|
|
2535
|
+
.map(toKrasListItem);
|
|
2512
2536
|
};
|
|
2513
2537
|
const parseKrasApiDetail = (html) => {
|
|
2514
2538
|
const data = parseJson(html);
|
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": "6.4.
|
|
5
|
+
"version": "6.4.1",
|
|
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.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|