nooon 0.8.1 → 0.8.2
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/index.js +10 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30558,6 +30558,11 @@ function blocksToMarkdown(blocks) {
|
|
|
30558
30558
|
}
|
|
30559
30559
|
return parts.join("");
|
|
30560
30560
|
}
|
|
30561
|
+
function trimExcessiveBlankLines(text) {
|
|
30562
|
+
return text.replace(/\n{3,}/g, `
|
|
30563
|
+
|
|
30564
|
+
`);
|
|
30565
|
+
}
|
|
30561
30566
|
function propertyValueToYaml(value, indent = "") {
|
|
30562
30567
|
if (value === null)
|
|
30563
30568
|
return "null";
|
|
@@ -30608,16 +30613,14 @@ var markdownFormatter = {
|
|
|
30608
30613
|
const frontmatter = propertiesToFrontmatter(data.page.properties);
|
|
30609
30614
|
const title = `# ${data.page.title}`;
|
|
30610
30615
|
const content = blocksToMarkdown(data.blocks);
|
|
30611
|
-
|
|
30612
|
-
return `${frontmatter}
|
|
30616
|
+
const result = frontmatter ? `${frontmatter}
|
|
30613
30617
|
|
|
30614
30618
|
${title}
|
|
30615
30619
|
|
|
30616
|
-
${content}
|
|
30617
|
-
}
|
|
30618
|
-
return `${title}
|
|
30620
|
+
${content}` : `${title}
|
|
30619
30621
|
|
|
30620
30622
|
${content}`;
|
|
30623
|
+
return trimExcessiveBlankLines(result);
|
|
30621
30624
|
}
|
|
30622
30625
|
};
|
|
30623
30626
|
// src/formatters/toon.ts
|
|
@@ -31288,7 +31291,7 @@ function parseSorts(json2) {
|
|
|
31288
31291
|
// src/mcp.ts
|
|
31289
31292
|
var server = new McpServer({
|
|
31290
31293
|
name: "nooon",
|
|
31291
|
-
version: "0.8.
|
|
31294
|
+
version: "0.8.2"
|
|
31292
31295
|
});
|
|
31293
31296
|
server.tool("nooon_search", "Search Notion pages and databases by keyword. Returns a list of matching items with their IDs and titles. For data_source objects, use nooon_data_source or nooon_query.", {
|
|
31294
31297
|
query: exports_external.string().describe("Search keyword"),
|
|
@@ -31481,7 +31484,7 @@ EXAMPLES:
|
|
|
31481
31484
|
async function main() {
|
|
31482
31485
|
const args = process.argv.slice(2);
|
|
31483
31486
|
if (args.includes("--version") || args.includes("-v")) {
|
|
31484
|
-
console.log("0.8.
|
|
31487
|
+
console.log("0.8.2");
|
|
31485
31488
|
return;
|
|
31486
31489
|
}
|
|
31487
31490
|
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
|