gatsby-source-notion-churnotion 1.0.80 → 1.0.82
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 +4 -5
- package/package.json +1 -1
package/dist/api/getPages.js
CHANGED
@@ -55,7 +55,6 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
55
55
|
books: [],
|
56
56
|
};
|
57
57
|
await createNode(categoryNode);
|
58
|
-
// Find Book
|
59
58
|
const bookRelations = page.properties?.books?.relation || null;
|
60
59
|
if (bookRelations) {
|
61
60
|
bookRelations.forEach((relation) => {
|
@@ -139,11 +138,14 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
139
138
|
});
|
140
139
|
}
|
141
140
|
const bookId = page.properties?.book?.relation?.[0]?.id || null;
|
141
|
+
const bookNodeId = createNodeId(`${bookId}-book`);
|
142
|
+
const bookNode = getNode(bookNodeId);
|
142
143
|
const [imageNode, tableOfContents, updatedBlocks, rawText] = await (0, processor_1.processor)(pageData.results, actions, getCache, createNodeId, reporter, cache);
|
144
|
+
reporter.error(`[Test] ${page.properties?.description?.rich_text?.[0]?.plain_text}`);
|
143
145
|
const postNode = {
|
144
146
|
id: nodeId,
|
145
147
|
category: parentCategoryId,
|
146
|
-
book:
|
148
|
+
book: bookNode?.id,
|
147
149
|
book_index: page.properties?.bookIndex?.number || 0,
|
148
150
|
title: title,
|
149
151
|
content: updatedBlocks,
|
@@ -170,9 +172,6 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
170
172
|
rawText,
|
171
173
|
};
|
172
174
|
await createNode(postNode);
|
173
|
-
// book과 post 부모-자식 관계 설정
|
174
|
-
const bookNodeId = createNodeId(`${bookId}-book`);
|
175
|
-
const bookNode = getNode(bookNodeId);
|
176
175
|
if (bookNode) {
|
177
176
|
createParentChildLink({
|
178
177
|
parent: bookNode,
|
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.0.
|
4
|
+
"version": "1.0.82",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|