
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@sdairs/tinybird-markdoc-ext
Advanced tools
A specialized Markdoc parser for Tinybird files that adds support for custom nodes like queries and tables.
npm install @sdairs/tinybird-markdoc-ext
import { TinybirdParser } from '@sdairs/tinybird-markdoc-ext'
// Create a parser instance
const parser = new TinybirdParser()
// Parse a file
const content = `
---
type: query
name: my_query
---
This is a query that selects data.
{% query name="my_query" %}
SELECT * FROM my_table
{% /query %}
`
// Get both frontmatter and content
const { frontmatter, content } = parser.parseFile(content)
// Or just render to HTML
const html = parser.renderHtml(content)
The query node allows you to define SQL queries in your Tinybird files:
{% query name="my_query" %}
SELECT * FROM my_table
{% /query %}
The table node allows you to define table schemas:
{% datasource name="my_table" delimiter="|" %}
id|UUID|$.id|User ID
name|String|$.name|Person's full name
age|UInt8|$.age|Person's age
{% /datasource %}
You can add your own custom nodes when creating a parser instance:
const parser = new TinybirdParser({
nodes: {
myCustomNode: {
render: 'CustomNode',
attributes: {
name: { type: String, required: true }
},
transform(node, config) {
// Custom transform logic
}
}
}
})
TinybirdParserThe main parser class with the following methods:
parse(content: string): Parse content and return ASTtransform(ast: any): Transform AST into renderable treerenderHtml(content: string): Render content to HTMLgetFrontmatter(content: string): Get just the frontmatterparseFile(content: string): Get both frontmatter and contentThe package also exports a default instance with standard configuration:
import tinybirdParser from '@tinylabs/tinybird-file-parser'
const html = tinybirdParser.renderHtml(content)
FAQs
Extended Markdoc parser for Tinybird files
We found that @sdairs/tinybird-markdoc-ext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.