nooon 0.8.1 → 0.8.4

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -10
  2. package/package.json +2 -2
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
- if (frontmatter) {
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.0"
31294
+ version: "0.8.4"
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"),
@@ -31381,17 +31384,17 @@ async function handleMcp(args) {
31381
31384
  const scriptPath = process.argv[1];
31382
31385
  const isLocal = args.includes("--local");
31383
31386
  const scope = isLocal ? "local" : "user";
31384
- const command = scriptPath.endsWith(".ts") ? `claude mcp add nooon --scope ${scope} -- bun run ${scriptPath} mcp` : `claude mcp add nooon --scope ${scope} -- ${execPath} mcp`;
31387
+ const command = scriptPath.endsWith(".ts") || scriptPath.endsWith(".js") ? `claude mcp add nooon --scope ${scope} -- ${execPath} run ${scriptPath} mcp` : `claude mcp add nooon --scope ${scope} -- ${execPath} mcp`;
31385
31388
  console.log(command);
31386
31389
  break;
31387
31390
  }
31388
31391
  case "config": {
31389
31392
  const execPath = process.execPath;
31390
31393
  const scriptPath = process.argv[1];
31391
- const config2 = scriptPath.endsWith(".ts") ? {
31394
+ const config2 = scriptPath.endsWith(".ts") || scriptPath.endsWith(".js") ? {
31392
31395
  mcpServers: {
31393
31396
  nooon: {
31394
- command: "bun",
31397
+ command: execPath,
31395
31398
  args: ["run", scriptPath, "mcp"]
31396
31399
  }
31397
31400
  }
@@ -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.0");
31487
+ console.log("0.8.4");
31485
31488
  return;
31486
31489
  }
31487
31490
  if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nooon",
3
- "version": "0.8.1",
3
+ "version": "0.8.4",
4
4
  "description": "Lightweight, read-only Notion MCP Server optimized for token efficiency",
5
5
  "type": "module",
6
6
  "bin": {
@@ -43,7 +43,7 @@
43
43
  "zod": "^4.3.6"
44
44
  },
45
45
  "devDependencies": {
46
- "@biomejs/biome": "2.3.13",
46
+ "@biomejs/biome": "2.3.14",
47
47
  "@types/bun": "^1.1.14",
48
48
  "typescript": "^5.7.2"
49
49
  }