gatsby-source-notion-churnotion 1.1.20 → 1.1.22
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/api/getPages.js +1 -1
- package/dist/util/processor.js +3 -3
- package/package.json +1 -2
package/dist/api/getPages.js
CHANGED
@@ -166,7 +166,7 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
166
166
|
update_date: (0, formatDate_1.useFormatDate)(page.last_edited_time),
|
167
167
|
version: page.properties?.version?.number || null,
|
168
168
|
description: page.properties?.description?.rich_text?.[0]?.plain_text ||
|
169
|
-
rawText,
|
169
|
+
rawText.substring(0, 200),
|
170
170
|
slug: slug,
|
171
171
|
category_list: categoryPath,
|
172
172
|
children: [],
|
package/dist/util/processor.js
CHANGED
@@ -9,7 +9,6 @@ const metadataProcessor_1 = require("./metadataProcessor");
|
|
9
9
|
const tableOfContent_1 = require("./tableOfContent");
|
10
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
11
11
|
const path_1 = __importDefault(require("path"));
|
12
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
13
12
|
const processor = async (blocks, actions, getCache, createNodeId, reporter, cache) => {
|
14
13
|
const { thumbnail, tableOfContents, updatedBlocks, rawText } = await processBlocksForContent(blocks, actions, getCache, createNodeId, reporter, cache);
|
15
14
|
await (0, metadataProcessor_1.processMetadata)(blocks, actions, createNodeId, reporter, cache);
|
@@ -99,11 +98,12 @@ const processImageBlock = async (block, actions, getCache, createNodeId, reporte
|
|
99
98
|
if (!fs_extra_1.default.existsSync(gifFilePath)) {
|
100
99
|
try {
|
101
100
|
reporter.info(`[GIF PROCESSING] Downloading GIF: ${imageUrl}`);
|
102
|
-
const response = await (
|
101
|
+
const response = await fetch(imageUrl);
|
103
102
|
if (!response.ok) {
|
104
103
|
throw new Error(`Failed to download GIF: ${response.statusText}`);
|
105
104
|
}
|
106
|
-
const
|
105
|
+
const arrayBuffer = await response.arrayBuffer();
|
106
|
+
const buffer = Buffer.from(arrayBuffer);
|
107
107
|
await fs_extra_1.default.ensureDir(staticDir); // static 디렉토리 생성
|
108
108
|
await fs_extra_1.default.writeFile(gifFilePath, buffer); // GIF 파일 저장
|
109
109
|
reporter.info(`[GIF SUCCESS] Saved GIF to static: ${gifFilePath}`);
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "gatsby-source-notion-churnotion",
|
3
3
|
"description": "Gatsby plugin that can connect with One Notion Database RECURSIVELY using official API",
|
4
|
-
"version": "1.1.
|
4
|
+
"version": "1.1.22",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|
@@ -49,7 +49,6 @@
|
|
49
49
|
"metascraper-title": "^5.45.25",
|
50
50
|
"metascraper-url": "^5.45.25",
|
51
51
|
"natural": "^8.0.1",
|
52
|
-
"node-fetch": "^3.3.2",
|
53
52
|
"notion-to-md": "^3.1.1",
|
54
53
|
"notion-types": "^7.1.5",
|
55
54
|
"typescript": "^5.7.2"
|