import { Hook } from '@oclif/core'; /** * Check if post run hook has completed. * * @returns Whether post run hook has completed. */ export declare function postRunHookHasCompleted(): boolean; /** * Wait for the postrun hook to finish (so auto-upgrade has a chance to run) and then * tree-kill the current process tree before exiting. * * Long-running interactive commands like `app dev` need this when the user terminates * the command via `q` or Ctrl+C. The dev sub-processes such as servers and watchers keep * the event loop alive, so even after oclif's postrun hook completes the node process * won't exit on its own and we have to `treeKill` the process tree. We must not do that * before the postrun hook has actually finished running auto-upgrade, otherwise we would * kill the upgrade mid-way while `npm install` is still running. * * The flag `postRunHookCompleted` is flipped at the very end of the hook after * `autoUpgradeIfNeeded` resolves, so polling it here is safe. */ export declare function waitForPostRunHookAndExit(): void; export declare const hook: Hook.Postrun; /** * Auto-upgrades the CLI after a command completes, if a newer version is available. * The entire flow is rate-limited to once per day unless forced via SHOPIFY_CLI_FORCE_AUTO_UPGRADE. * * @returns Resolves when the upgrade attempt (or fallback warning) is complete. */ export declare function autoUpgradeIfNeeded(): Promise;