import * as Duration from "effect/Duration"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; /** * Make a lock key safe to use as a file name on every platform. * * Keys are derived from user-controlled values (profile names), which * have shown up in production containing shell placeholders like * `${ALCHEMY_PROFILE:-default}` — `:`/`{`/`$` are invalid in Windows * file names and mkdir fails with EINVAL. Collapse anything outside a * conservative allow-list to `_`. * * @internal exported for unit testing. */ export declare const sanitizeLockKey: (key: string) => string; /** * Serialise execution of `effect` for the same `key`, both within this * process (a semaphore) and across processes on the same machine (an atomic * lock directory whose mtime is refreshed while held so another process can * recover it after a crash). * * Failure to create or acquire the lock is fatal. Authentication writes its * profile state beneath the same root, so continuing without a writable lock * cannot produce a valid deployment and would permit concurrent corruption. */ export declare const withLock: (key: string, effect: Effect.Effect, options?: { readonly timeout?: Duration.Input; }) => Effect.Effect>; //# sourceMappingURL=Lock.d.ts.map