gatsby-source-notion-database
Advanced tools
Comparing version 0.6.4 to 0.6.5
{ | ||
"name": "gatsby-source-notion-database", | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"description": "Load data from Notion's database", | ||
@@ -22,2 +22,3 @@ "main": "index.js", | ||
"notabase": "^0.7.0", | ||
"p-limit": "^2.2.1", | ||
"puppeteer": "^1.19.0" | ||
@@ -24,0 +25,0 @@ }, |
const getPageHtml = require('./getPageHtml') | ||
const fs = require("fs") | ||
const mkdirp = require("mkdirp") | ||
const pLimit = require('p-limit'); | ||
const limit = pLimit(5); | ||
const cachePathName = 'public/.notion' | ||
@@ -47,3 +48,3 @@ | ||
let props = collection.props.filter(i => !(i === '_raw')) | ||
await Promise.all(collection.rows.filter(i => i).map(async (itemData) => { | ||
await Promise.all(collection.rows.filter(i => i).map(itemData => limit(async () => { | ||
let data = { | ||
@@ -106,3 +107,3 @@ id: itemData.id, | ||
} | ||
})) | ||
}))) | ||
} | ||
@@ -109,0 +110,0 @@ |
12356
227
3
+ Addedp-limit@^2.2.1
+ Addedp-limit@2.3.0(transitive)
+ Addedp-try@2.2.0(transitive)