@sparkelf/dsh-patch-better-sidebar-media-path 0.2.1-rc.2 → 0.2.1-rc.2.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.
package/package.json CHANGED
@@ -1,37 +1,37 @@
1
1
  {
2
- "name": "@sparkelf/dsh-patch-better-sidebar-media-path",
3
2
  "description": "Data-only patch resolving a workspace-relative media path against the session cwd in dsh-better-sidebar",
4
- "version": "0.2.1-rc.2",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "type": "module",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git",
12
- "directory": "patches/npm/better-sidebar-media-path"
13
- },
14
- "exports": {
15
- "./package.json": "./package.json",
16
- "./patches/better-sidebar-media-path.patch": "./patches/better-sidebar-media-path.patch"
17
- },
18
- "files": [
19
- "patches/*.patch"
20
- ],
21
- "license": "MIT",
22
3
  "dshPatch": {
23
4
  "formatVersion": 1,
24
5
  "variants": [
25
6
  {
26
- "id": "better-sidebar-media-path",
27
7
  "dsh": ">=0.2.0-rc.2",
8
+ "file": "./patches/better-sidebar-media-path.patch",
9
+ "id": "better-sidebar-media-path",
28
10
  "target": {
29
11
  "kind": "npm",
30
12
  "name": "dsh-better-sidebar",
31
- "range": ">=0.25.0 <0.26.0"
32
- },
33
- "file": "./patches/better-sidebar-media-path.patch"
13
+ "range": ">=0.28.0 <0.29.0"
14
+ }
34
15
  }
35
16
  ]
36
- }
37
- }
17
+ },
18
+ "exports": {
19
+ "./package.json": "./package.json",
20
+ "./patches/better-sidebar-media-path.patch": "./patches/better-sidebar-media-path.patch"
21
+ },
22
+ "files": [
23
+ "patches/*.patch"
24
+ ],
25
+ "license": "MIT",
26
+ "name": "@sparkelf/dsh-patch-better-sidebar-media-path",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "repository": {
31
+ "directory": "patches/npm/better-sidebar-media-path",
32
+ "type": "git",
33
+ "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
34
+ },
35
+ "type": "module",
36
+ "version": "0.2.1-rc.2.1"
37
+ }
@@ -1,8 +1,8 @@
1
1
  diff --git a/lib/index.js b/lib/index.js
2
- index 7ce4ed1..1236d42 100644
2
+ index a87bddb..a0368d2 100644
3
3
  --- a/lib/index.js
4
4
  +++ b/lib/index.js
5
- @@ -7001,7 +7001,12 @@ function apply(ctx, config) {
5
+ @@ -9169,7 +9169,12 @@ function apply(ctx, config) {
6
6
  const sessionId = url.searchParams.get("sessionId");
7
7
  const raw = url.searchParams.get("path");
8
8
  if (sessionId === null || raw === null) throw new SidebarError("bad-request", "sessionId and path are required");
@@ -13,6 +13,6 @@ index 7ce4ed1..1236d42 100644
13
13
  + const mediaCwd = await activeWorktreeRootOf(ctx, sessionId, await sessionCwdOf(ctx, sessionId, url.searchParams.get("cwd") ?? void 0));
14
14
  + const requested = isAbsolute(raw) ? raw : join(mediaCwd, raw);
15
15
  + const path = await ensureWorkspacePath(mediaCwd, requested);
16
- const info = await stat(path);
17
- if (!info.isFile() || info.size > resolved.mediaLimit) throw new SidebarError("fs-error", "not a file or too large", 400);
16
+ const info = await statFileForRoute(path);
17
+ if (!info.isFile()) throw new SidebarError("fs-error", "not a file", 400);
18
18
  const type = mediaTypeForPath(path);