import { type BasePlaceResolver, type DeployTarget, type WatchOption, type WatchRegistry } from '@quenty/nevermore-deploy'; /** One place `--watch` should consider registering. */ export interface WatchCandidate { /** * Deploy target the place belongs to. A selector (`integration.places.hub`) * is accepted and narrowed to its target, since the dispatch selector is * rebuilt from the target and the place — appending to a selector that * already names a place would produce `integration.places.hub.places.hub`, * which nothing can re-resolve. */ targetName: string; /** npm package name, used to keep watch names unique across a batch. */ packageName: string; /** Package directory, used to read the base place version out of the lock. */ packagePath: string; place: DeployTarget; } export interface RegisterWatchesOptions { option: WatchOption; /** * Lease key within the repository. Every watch this invocation is * responsible for goes under this one name, and re-registering replaces the * whole list — so the candidates must be the complete set, not just what * deployed. */ monitorName: string; candidates: WatchCandidate[]; /** * Open Cloud key to share, so the service can read private base places, see * `"saved"` versions, and report versions in the same vocabulary as the lock. */ robloxApiKey?: string; /** Reads base place versions out of the lock, for baselines. */ resolver: BasePlaceResolver; /** Let the GitHub CLI supply the token when no env var does. */ useGhAuth?: boolean; /** * Force a dispatch immediately after registering, ignoring drift. * * Registering only proves the service accepted the config. Firing proves the * workflow actually receives the selector, which is the half that has * historically broken — so a dryrun asks for it. */ triggerAfterRegister?: boolean; /** Injected in tests; defaults to the HTTP registry. */ createRegistry?: (registerUrl: string) => WatchRegistry; } export interface RegisterWatchesResult { /** Watches in the registered monitor. Zero means nothing was sent. */ registered: number; /** True when the service reported the config differing from what it held. */ changed?: boolean; /** Watches that dispatched, when a trigger was requested. */ triggered?: number; } /** * Register every watch this invocation owns, in one call. * * One call is not just an efficiency: the service replaces a monitor's entire * watch list on re-apply, so splitting a run across several registrations under * one name would leave only the last one standing. The caller decides what the * complete set is; this turns it into a request. * * Runs after the deploy so the monitor only exists once the build it is meant * to keep fresh has actually shipped. */ export declare function registerWatchesAsync(options: RegisterWatchesOptions): Promise; //# sourceMappingURL=register-watches.d.ts.map