@jacklika/dsh-tool-memory-filesystem 0.1.3-alpha.10 → 0.1.3-alpha.11

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/lib/index.js +3 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -71,7 +71,7 @@ export function containedPath(root, candidate) {
71
71
  const absolute = resolve(absoluteRoot, candidate);
72
72
  const remainder = relative(absoluteRoot, absolute);
73
73
  if (remainder === '..' || remainder.startsWith(`..${sep}`) || isAbsolute(remainder)) {
74
- throw new Error(`tool-memory-filesystem: path ${candidate} is outside vault root ${root}`);
74
+ throw new Error(`tool-memory-filesystem: path ${JSON.stringify(candidate)} is outside the vault root`);
75
75
  }
76
76
  return absolute;
77
77
  }
@@ -92,7 +92,7 @@ export async function containedPathReal(root, candidate) {
92
92
  const canonicalAncestor = await realpath(ancestor);
93
93
  const remainder = relative(canonicalRoot, canonicalAncestor);
94
94
  if (remainder === '..' || remainder.startsWith(`..${sep}`) || isAbsolute(remainder)) {
95
- throw new Error(`tool-memory-filesystem: path ${candidate} resolves outside vault root ${root}`);
95
+ throw new Error(`tool-memory-filesystem: path ${JSON.stringify(candidate)} resolves outside the vault root`);
96
96
  }
97
97
  return absolute;
98
98
  }
@@ -613,7 +613,7 @@ async function resolveSymlinkWriteTarget(root, absolutePath, id) {
613
613
  const canonicalRoot = await realpath(resolve(root));
614
614
  const remainder = relative(canonicalRoot, canonical);
615
615
  if (remainder === '..' || remainder.startsWith(`..${sep}`) || isAbsolute(remainder)) {
616
- throw new Error(`tool-memory-filesystem: path ${id} resolves outside vault root ${root}`);
616
+ throw new Error(`tool-memory-filesystem: path ${JSON.stringify(id)} resolves outside the vault root`);
617
617
  }
618
618
  return canonical;
619
619
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jacklika/dsh-tool-memory-filesystem",
3
3
  "description": "Model-facing wiki/memory tools over a local Markdown vault: read, search, and write notes with Obsidian-style links and YAML frontmatter.",
4
- "version": "0.1.3-alpha.10",
4
+ "version": "0.1.3-alpha.11",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },