@hienlh/ppm 0.13.14 → 0.13.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.13.15] - 2026-04-24
4
+
5
+ ### Fixed
6
+ - **File compare with absolute paths**: Comparing files outside the project (e.g. `/tmp/`) no longer fails with "Path traversal not allowed" — absolute paths now use `readSystemFile` instead of project-scoped read
7
+
3
8
  ## [0.13.14] - 2026-04-24
4
9
 
5
10
  ### Fixed
@@ -71,4 +71,4 @@ This skill covers the `ppm` CLI, its HTTP API, and its config DB. It does **not*
71
71
  - Third-party extensions (inspect via `ppm ext list`).
72
72
  - The Claude Agent SDK internals (separate skill).
73
73
 
74
- <!-- Generated for PPM v0.13.14 at build time. Re-run `ppm export skill --install` to refresh. -->
74
+ <!-- Generated for PPM v0.13.15 at build time. Re-run `ppm export skill --install` to refresh. -->
@@ -201,4 +201,4 @@ _Base URL: `http://localhost:8080` (default; override via `ppm config set port <
201
201
  - `ws://<host>/ws/terminal` — PTY terminal multiplexer
202
202
  - `ws://<host>/ws/extensions` — extension host channel
203
203
 
204
- <!-- Generated from src/server/routes/ for PPM v0.13.14 -->
204
+ <!-- Generated from src/server/routes/ for PPM v0.13.15 -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.13.14",
3
+ "version": "0.13.15",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -1,7 +1,8 @@
1
1
  import { Hono } from "hono";
2
- import { resolve } from "node:path";
2
+ import { resolve, isAbsolute } from "node:path";
3
3
  import { existsSync, mkdirSync } from "node:fs";
4
4
  import { fileService, SecurityError, NotFoundError, ValidationError } from "../../services/file.service.ts";
5
+ import { readSystemFile } from "../../services/fs-browse.service.ts";
5
6
  import { ok, err } from "../../types/api.ts";
6
7
  import { errorStatus } from "../helpers/error-status.ts";
7
8
 
@@ -196,9 +197,12 @@ fileRoutes.get("/compare", (c) => {
196
197
  if (!file1 || !file2) {
197
198
  return c.json(err("Missing query parameters: file1, file2"), 400);
198
199
  }
199
- const original = fileService.readFile(projectPath, file1);
200
- const modified = fileService.readFile(projectPath, file2);
201
- return c.json(ok({ original: original.content, modified: modified.content }));
200
+ // Support absolute paths (files outside project, e.g. /tmp/)
201
+ const readSide = (p: string) =>
202
+ isAbsolute(p) ? readSystemFile(p).content : fileService.readFile(projectPath, p).content;
203
+ const original = readSide(file1);
204
+ const modified = readSide(file2);
205
+ return c.json(ok({ original, modified }));
202
206
  } catch (e) {
203
207
  return c.json(err((e as Error).message), errorStatus(e));
204
208
  }