@velvetmonkey/flywheel-crank 0.3.0 → 0.3.1

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 +9 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -119,9 +119,14 @@ function insertInSection(content, section, newContent, position) {
119
119
  if (lastContentLineIdx >= section.contentStartLine && isEmptyPlaceholder(lines[lastContentLineIdx])) {
120
120
  lines[lastContentLineIdx] = formattedContent;
121
121
  } else {
122
- let insertLine = section.endLine + 1;
123
- if (section.contentStartLine <= section.endLine) {
124
- insertLine = section.endLine + 1;
122
+ let insertLine;
123
+ if (lastContentLineIdx >= section.contentStartLine) {
124
+ for (let i = section.endLine; i > lastContentLineIdx; i--) {
125
+ if (lines[i].trim() === "") {
126
+ lines.splice(i, 1);
127
+ }
128
+ }
129
+ insertLine = lastContentLineIdx + 1;
125
130
  } else {
126
131
  insertLine = section.contentStartLine;
127
132
  }
@@ -1309,7 +1314,7 @@ function findVaultRoot(startPath) {
1309
1314
  // src/index.ts
1310
1315
  var server = new McpServer({
1311
1316
  name: "flywheel-crank",
1312
- version: "0.1.0"
1317
+ version: "0.3.0"
1313
1318
  });
1314
1319
  var vaultPath = process.env.PROJECT_PATH || findVaultRoot();
1315
1320
  console.error(`[Crank] Starting Flywheel Crank MCP server`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velvetmonkey/flywheel-crank",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Deterministic vault mutations for Obsidian via MCP",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",