You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gatsby-source-notion-api

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-notion-api - npm Package Compare versions

Comparing version

to
0.7.0

2

package.json
{
"name": "gatsby-source-notion-api",
"version": "0.6.0",
"version": "0.7.0",
"description": "Gatsby source plugin for official Notion.so API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,2 +10,7 @@ const { pipeExtend } = require("or-pipets")

const annotateEquation = ifTrue(
pick("equation"),
({ content }) => ({ content: `$${content}$` }),
id,
)
const annotateBold = ifTrue(pick("bold"), ({ content }) => ({ content: `**${content}**` }), id)

@@ -42,2 +47,3 @@ const annotateItalic = ifTrue(pick("italic"), ({ content }) => ({ content: `_${content}_` }), id)

.pipeExtend(annotateLink)
.pipeExtend(annotateEquation)

@@ -51,2 +57,7 @@ exports.blockToString = (textBlocks) =>

if (textBlock.type == "equation") {
data.content = textBlock.equation.expression
data.equation = true
}
if (textBlock.type == "mention") {

@@ -53,0 +64,0 @@ if (textBlock.mention.type == "user") {

const fetch = require("node-fetch")
const { errorMessage } = require("../error-message")
exports.getBlocks = async ({ id, block, notionVersion, token }, reporter) => {
exports.getBlocks = async ({ id, notionVersion, token }, reporter) => {
let hasMore = true

@@ -28,3 +28,3 @@ let blockContent = []

childBlock.children = await this.getBlocks(
{ id: childBlock.id, block: childBlock, notionVersion, token },
{ id: childBlock.id, notionVersion, token },
reporter,

@@ -31,0 +31,0 @@ )

@@ -20,3 +20,3 @@ const fetch = require("node-fetch")

for (let page of db.results) {
page.children = await getBlocks({ id: page.id, block: page, token, notionVersion }, reporter)
page.children = await getBlocks({ id: page.id, token, notionVersion }, reporter)
}

@@ -23,0 +23,0 @@

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.