Constants§
Functions§
- cache_
clean - Remove all cached tarballs (store + legacy). Keeps logs.
- cache_
export - Export cache entries needed for current project (package.json + lockfile) into dir. Writes manifest.json for import. Returns number of files copied.
- cache_
import - Import tarballs from dir into cache. Expects manifest.json (from cache export) or .tgz files named pkg-version.tgz. Returns number of packages imported.
- cache_
package_ tarball Deprecated - Store a package in the cache (content-addressable + legacy path).
Prefer
registry::fill_store_from_registry(no npm subprocess). Kept for legacy callers. - cache_
prune - Prune cache: remove store tarballs not referenced by index. If keep_recent is Some(N), keep only N most recently used (by mtime).
- cache_
size_ bytes - Return (total size in bytes, count of tarballs) for the cache (store + legacy .tgz in root).
- content_
hash - SHA256 hash of file (hex)
- format_
cache_ name - get_
cache_ dir - Returns the path to the cache directory. Uses JHOL_CACHE_DIR if set; otherwise Windows: %USERPROFILE%.jhol-cache, Unix: $HOME/.jhol-cache
- get_
cached_ tarball - Returns the path to a cached tarball if present.
- init_
cache - is_
package_ cached - link_
package_ from_ store - Create node_modules/<package_name> as a symlink (Unix) or directory junction (Windows) to store path. For scoped packages, creates node_modules/@scope/ and links pkg there. Returns Err if JHOL_LINK=0 or link creation fails (caller should fall back to copy).
- list_
cached_ packages - List all cached package tarballs (pkg@version or legacy base names)
- lockfile_
content_ hash - SHA256 hash of lockfile content for CI cache key. Prefers bun.lock then package-lock.json.
- log
- log_
error - manifest_
signature - npm_
install_ timeout - Run npm install with timeout
- read_
store_ index - run_
command_ timeout - Run a command with a timeout. On timeout the process is killed and an error is returned.
- store_
unpacked_ dir - Unpacked store dir: cache_dir/store_unpacked/
/ (one dir per tarball hash). - verify_
manifest_ signature - verify_
sri - Verify file against SRI string (e.g. “sha512-
”). Returns true if match. - write_
store_ index