import type { JsonObj } from '../result.js'; import { BaseCommand } from '../index.js'; export default class Pull extends BaseCommand { static description: string; static examples: string[]; static flags: { dir: import("@oclif/core/lib/interfaces/parser.js").OptionFlag; rebase: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag; workspace: import("@oclif/core/lib/interfaces/parser.js").OptionFlag; }; run(): Promise; /** * Local-only backfill of the `workspace` pin in `quonfig.json`. * * - Missing pin → write it from the token response's `workspaceSlug`. * - Pin already set and matches → no-op. * - Pin already set and disagrees → log a warning showing both values * and LEAVE IT ALONE. Overwriting someone's explicit pin is a Guard 2 * concern, not a pull concern — the next `qfg push` is where the * identity-check dispatches a hard abort. * * This never throws — a broken `quonfig.json` shouldn't fail `qfg pull`. */ private backfillWorkspacePin; /** * Commit the freshly-written pin if `dir` is a git repo. Only commits * when `quonfig.json` is the only thing dirty in the working tree — * we don't want to sweep up the user's unrelated work-in-progress * (untracked files are fine; tracked modifications are not). * * Skips silently when not in a git repo, when other tracked files are * dirty, or when git itself errors. Pull already succeeded; this is * cleanup that the next push can also do (qfg-0fn). */ private commitPinIfRepo; private looksLike401; private maybeWriteQuonfigDir; /** * Wraps `readWorkspaceSlug` so a legacy bare-slug value (`"workspace": * "foo"` instead of `"workspace": "org/foo"`) reads as `undefined` * rather than throwing. The caller then takes the "no pin set" branch * and overwrites with the canonical form, completing the migration. * * Any other parse error still resolves to `undefined` here (and is * verbose-logged) — backfill is non-fatal; the next push surfaces the * real diagnosis. */ private readPinTolerant; private refreshAndGetUrl; private resolveTokenEntry; }