gatsby-source-notion-churnotion 1.0.17 → 1.0.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/getPages.js +2 -1
- package/package.json +1 -1
package/dist/api/getPages.js
CHANGED
@@ -11,13 +11,13 @@ const imageProcessor_1 = require("../util/imageProcessor");
|
|
11
11
|
const slugify_1 = require("../util/slugify");
|
12
12
|
const connector_1 = require("./connector");
|
13
13
|
const getPages = async ({ databaseId, reporter, getCache, actions, createNode, createNodeId, createParentChildLink, getNode, }) => {
|
14
|
-
let hasMore = true;
|
15
14
|
/**
|
16
15
|
* 데이터베이스 내에 페이지들을 읽어서 재귀적으로 추가하는 서브 메서드드
|
17
16
|
* @param databaseId 데이터베이스 아이디
|
18
17
|
* @param parentCategoryId 부모 데이터베이스 아이디
|
19
18
|
*/
|
20
19
|
const processDatabase = async (databaseId, parentCategoryId = null, categoryPath = [], tagMap = {}, categoryUrl = ``) => {
|
20
|
+
let hasMore = true;
|
21
21
|
try {
|
22
22
|
while (hasMore) {
|
23
23
|
const databaseUrl = `databases/${databaseId}/query`;
|
@@ -197,6 +197,7 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
|
|
197
197
|
}
|
198
198
|
catch (error) {
|
199
199
|
reporter.error(`[ERROR] fetching page`);
|
200
|
+
hasMore = false;
|
200
201
|
}
|
201
202
|
};
|
202
203
|
await processDatabase(databaseId);
|
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.18",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|