fix: Use correct ProseMirror mark types (strong/em)
Outline schema uses: - "strong" not "bold" - "em" not "italic" Error was: "RangeError: There is no mark type bold in this schema" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,15 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [1.3.15] - 2026-01-31
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **ProseMirror Mark Types:** Fixed mark type names to match Outline schema
|
||||||
|
- `bold` → `strong`
|
||||||
|
- `italic` → `em`
|
||||||
|
- Error was: "RangeError: There is no mark type bold in this schema"
|
||||||
|
|
||||||
## [1.3.14] - 2026-01-31
|
## [1.3.14] - 2026-01-31
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
MCP server for direct PostgreSQL access to Outline Wiki database. Follows patterns established by `mcp-desk-crm-sql-v3`.
|
MCP server for direct PostgreSQL access to Outline Wiki database. Follows patterns established by `mcp-desk-crm-sql-v3`.
|
||||||
|
|
||||||
**Version:** 1.3.14
|
**Version:** 1.3.15
|
||||||
**Total Tools:** 164 tools across 33 modules
|
**Total Tools:** 164 tools across 33 modules
|
||||||
**Production:** hub.descomplicar.pt (via SSH tunnel)
|
**Production:** hub.descomplicar.pt (via SSH tunnel)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# MCP Outline PostgreSQL - Continuacao de Testes
|
# MCP Outline PostgreSQL - Continuacao de Testes
|
||||||
|
|
||||||
**Ultima Sessao:** 2026-01-31 (actualizado)
|
**Ultima Sessao:** 2026-01-31 (actualizado)
|
||||||
**Versao Actual:** 1.3.14
|
**Versao Actual:** 1.3.15
|
||||||
**Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO**
|
**Progresso:** ~95/164 tools testadas (58%) - **CÓDIGO VALIDADO**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mcp-outline-postgresql",
|
"name": "mcp-outline-postgresql",
|
||||||
"version": "1.3.14",
|
"version": "1.3.15",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mcp-outline-postgresql",
|
"name": "mcp-outline-postgresql",
|
||||||
"version": "1.3.14",
|
"version": "1.3.15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "^1.0.0",
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mcp-outline-postgresql",
|
"name": "mcp-outline-postgresql",
|
||||||
"version": "1.3.14",
|
"version": "1.3.15",
|
||||||
"description": "MCP Server for Outline Wiki via PostgreSQL direct access",
|
"description": "MCP Server for Outline Wiki via PostgreSQL direct access",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ async function main() {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
status: 'ok',
|
status: 'ok',
|
||||||
transport: 'streamable-http',
|
transport: 'streamable-http',
|
||||||
version: '1.3.14',
|
version: '1.3.15',
|
||||||
sessions: sessions.size,
|
sessions: sessions.size,
|
||||||
stateful: STATEFUL,
|
stateful: STATEFUL,
|
||||||
tools: allTools.length
|
tools: allTools.length
|
||||||
@@ -101,7 +101,7 @@ async function main() {
|
|||||||
// Create MCP server
|
// Create MCP server
|
||||||
const server = createMcpServer(pgClient.getPool(), {
|
const server = createMcpServer(pgClient.getPool(), {
|
||||||
name: 'mcp-outline-http',
|
name: 'mcp-outline-http',
|
||||||
version: '1.3.14'
|
version: '1.3.15'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Track session if stateful
|
// Track session if stateful
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ async function main() {
|
|||||||
// Create MCP server with shared configuration
|
// Create MCP server with shared configuration
|
||||||
const server = createMcpServer(pgClient.getPool(), {
|
const server = createMcpServer(pgClient.getPool(), {
|
||||||
name: 'mcp-outline-postgresql',
|
name: 'mcp-outline-postgresql',
|
||||||
version: '1.3.14'
|
version: '1.3.15'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Connect stdio transport
|
// Connect stdio transport
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export function createMcpServer(
|
|||||||
): Server {
|
): Server {
|
||||||
const server = new Server({
|
const server = new Server({
|
||||||
name: config.name || 'mcp-outline-postgresql',
|
name: config.name || 'mcp-outline-postgresql',
|
||||||
version: config.version || '1.3.14'
|
version: config.version || '1.3.15'
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set capabilities (required for MCP v2.2+)
|
// Set capabilities (required for MCP v2.2+)
|
||||||
|
|||||||
@@ -177,25 +177,25 @@ function parseInlineContent(text: string): ProseMirrorNode[] {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bold
|
// Bold (Outline uses "strong" not "bold")
|
||||||
const boldMatch = remaining.match(/^\*\*([^*]+)\*\*/) || remaining.match(/^__([^_]+)__/);
|
const boldMatch = remaining.match(/^\*\*([^*]+)\*\*/) || remaining.match(/^__([^_]+)__/);
|
||||||
if (boldMatch) {
|
if (boldMatch) {
|
||||||
nodes.push({
|
nodes.push({
|
||||||
type: 'text',
|
type: 'text',
|
||||||
text: boldMatch[1],
|
text: boldMatch[1],
|
||||||
marks: [{ type: 'bold' }]
|
marks: [{ type: 'strong' }]
|
||||||
});
|
});
|
||||||
remaining = remaining.slice(boldMatch[0].length);
|
remaining = remaining.slice(boldMatch[0].length);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Italic
|
// Italic (Outline uses "em" not "italic")
|
||||||
const italicMatch = remaining.match(/^\*([^*]+)\*/) || remaining.match(/^_([^_]+)_/);
|
const italicMatch = remaining.match(/^\*([^*]+)\*/) || remaining.match(/^_([^_]+)_/);
|
||||||
if (italicMatch) {
|
if (italicMatch) {
|
||||||
nodes.push({
|
nodes.push({
|
||||||
type: 'text',
|
type: 'text',
|
||||||
text: italicMatch[1],
|
text: italicMatch[1],
|
||||||
marks: [{ type: 'italic' }]
|
marks: [{ type: 'em' }]
|
||||||
});
|
});
|
||||||
remaining = remaining.slice(italicMatch[0].length);
|
remaining = remaining.slice(italicMatch[0].length);
|
||||||
continue;
|
continue;
|
||||||
@@ -289,9 +289,11 @@ function contentToMarkdown(content?: ProseMirrorNode[]): string {
|
|||||||
for (const mark of node.marks) {
|
for (const mark of node.marks) {
|
||||||
switch (mark.type) {
|
switch (mark.type) {
|
||||||
case 'bold':
|
case 'bold':
|
||||||
|
case 'strong':
|
||||||
text = `**${text}**`;
|
text = `**${text}**`;
|
||||||
break;
|
break;
|
||||||
case 'italic':
|
case 'italic':
|
||||||
|
case 'em':
|
||||||
text = `*${text}*`;
|
text = `*${text}*`;
|
||||||
break;
|
break;
|
||||||
case 'code_inline':
|
case 'code_inline':
|
||||||
|
|||||||
Reference in New Issue
Block a user