gatsby-source-notion-churnotion 1.0.31 → 1.0.32
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/getBooks.js +2 -1
- package/dist/api/getPages.js +1 -1
- package/package.json +1 -1
package/dist/api/getBooks.js
CHANGED
@@ -18,6 +18,7 @@ const getBooks = async ({ bookDatabaseId, reporter, createNode, createNodeId, })
|
|
18
18
|
reporter.info(`[CHECK] BOOK page: ${page.id}`);
|
19
19
|
const nodeId = createNodeId(`${page.id}-book`);
|
20
20
|
const slug = page.properties?.slug?.rich_text?.[0]?.plain_text || `unnamed-slug`;
|
21
|
+
const bookCategoryId = page.properties?.category?.relation?.[0]?.id || null;
|
21
22
|
const bookNode = {
|
22
23
|
id: nodeId,
|
23
24
|
book_name: page.properties?.[`이름`]?.title?.[0]?.plain_text || `Unnamed`,
|
@@ -34,7 +35,7 @@ const getBooks = async ({ bookDatabaseId, reporter, createNode, createNodeId, })
|
|
34
35
|
create_date: page.created_time,
|
35
36
|
update_date: page.last_edited_time,
|
36
37
|
url: `${constants_1.COMMON_URI}/${constants_1.BOOK_URI}/${slug}`,
|
37
|
-
book_category:
|
38
|
+
book_category: bookCategoryId,
|
38
39
|
};
|
39
40
|
reporter.info(`[DEBUG] Book ${bookNode.book_name} has book_category: ${bookNode.book_category}`);
|
40
41
|
createNode(bookNode);
|
package/dist/api/getPages.js
CHANGED
@@ -54,7 +54,7 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
54
54
|
.digest(`hex`),
|
55
55
|
},
|
56
56
|
url: `${constants_1.COMMON_URI}/${constants_1.CATEGORY_URI}${categoryUrl}`,
|
57
|
-
books:
|
57
|
+
books: [],
|
58
58
|
};
|
59
59
|
await createNode(categoryNode);
|
60
60
|
// Find Book
|
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.32",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|