@creeperhost/modlens-mcp 1.6.6 → 1.6.7
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/dist/cache.d.ts +14 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +15 -1
- package/dist/cache.js.map +1 -1
- package/package.json +1 -1
package/dist/cache.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Root of the on-disk cache (decompiled source, downloaded tools/JARs, indexes).
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. MODLENS_CACHE_ROOT — explicit override. The Docker image sets this to a
|
|
6
|
+
* path on the persistent /data volume.
|
|
7
|
+
* 2. ~/.modlens-cache — default for local CLI / npx installs.
|
|
8
|
+
*
|
|
9
|
+
* Why the override matters in containers: os.homedir() resolves to "/" (or
|
|
10
|
+
* another unwritable path) when the process runs as a non-root uid with no HOME,
|
|
11
|
+
* which makes Vineflower fail with "Failed to save directory". Pointing the cache
|
|
12
|
+
* at the mounted data volume fixes the permission error and lets expensive
|
|
13
|
+
* decompiled output survive container restarts.
|
|
14
|
+
*/
|
|
1
15
|
export declare const CACHE_ROOT: string;
|
|
2
16
|
export declare const paths: {
|
|
3
17
|
jars: (key: string) => string;
|
package/dist/cache.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,QACwD,CAAC;AAEhF,eAAO,MAAM,KAAK;gBACF,MAAM;wBACE,MAAM,WAAW,MAAM;oBAE3B,MAAM,WAAW,MAAM;qBAEtB,MAAM;;;;;;;CAQ1B,CAAC;AAOF,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D;AAED,wBAAsB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D"}
|
package/dist/cache.js
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { homedir } from "os";
|
|
2
2
|
import { join } from "path";
|
|
3
3
|
import { mkdir, access } from "fs/promises";
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Root of the on-disk cache (decompiled source, downloaded tools/JARs, indexes).
|
|
6
|
+
*
|
|
7
|
+
* Resolution order:
|
|
8
|
+
* 1. MODLENS_CACHE_ROOT — explicit override. The Docker image sets this to a
|
|
9
|
+
* path on the persistent /data volume.
|
|
10
|
+
* 2. ~/.modlens-cache — default for local CLI / npx installs.
|
|
11
|
+
*
|
|
12
|
+
* Why the override matters in containers: os.homedir() resolves to "/" (or
|
|
13
|
+
* another unwritable path) when the process runs as a non-root uid with no HOME,
|
|
14
|
+
* which makes Vineflower fail with "Failed to save directory". Pointing the cache
|
|
15
|
+
* at the mounted data volume fixes the permission error and lets expensive
|
|
16
|
+
* decompiled output survive container restarts.
|
|
17
|
+
*/
|
|
18
|
+
export const CACHE_ROOT = process.env.MODLENS_CACHE_ROOT?.trim() || join(homedir(), ".modlens-cache");
|
|
5
19
|
export const paths = {
|
|
6
20
|
jars: (key) => join(CACHE_ROOT, "jars", key),
|
|
7
21
|
decompiled: (modId, version) => join(CACHE_ROOT, "decompiled", modId, version),
|
package/dist/cache.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,C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