Skip to content

@pumpkin-plugins/static-hermes-runtime API / hermes/build / withHermesBuildLock

Function: withHermesBuildLock() ​

withHermesBuildLock<T>(cacheRoot, operation, options?): Promise<T>

Defined in: hermes/build.ts:534

Run a cache operation while holding exclusive locks for the cache root and mutable Hermes directories.

Type Parameters ​

T ​

T

Result returned by the locked operation

Parameters ​

cacheRoot ​

string

Shared cache root that contains the build-state record.

operation ​

() => T | Promise<T>

Source, patch, and build work that must be serialized.

options? ​

HermesBuildLockOptions = {}

Optional mutable resource paths, filesystem, and lock-wait controls.

Returns ​

Promise<T>

The result of the locked operation.

Throws ​

If the lock cannot be acquired or the operation fails.

pumpkin-plugins documentation