Skip to content

refactor: migrate all 7 CLIs onto @deniffer/cli-kit + pin argc - #2

Merged
Deniffer001 merged 3 commits into
mainfrom
chore/backlink-cli-on-cli-kit
Jun 14, 2026
Merged

refactor: migrate all 7 CLIs onto @deniffer/cli-kit + pin argc#2
Deniffer001 merged 3 commits into
mainfrom
chore/backlink-cli-on-cli-kit

Conversation

@Deniffer001

@Deniffer001 Deniffer001 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Migrates all 7 product CLIs onto the extracted @deniffer/cli-kit base, and pins argc to stop github-main drift.

CLIs migrated

backlink · gsc · google-ads · page-extract · posthog · serp-snapshot · sitemap-watch

Each now builds its admin-CLI runtime on cli-kit instead of a local copy:

  • lib/errors.tscli-kit/errors; the per-provider HTTP-status/code classification is kept as a *ErrorMapper plugged into the cli-kit normalizer seam (behavior preserved exactly).
  • output.tscli-kit/output (gsc / google-ads / sitemap keep their legacy pretty-mode line format via the human override; JSON output + normalization run on cli-kit).
  • services.tscli-kit/services lazy container + defineClientAdapter (each provider injected as the adapter); the getXClient() accessor is preserved so handlers/command-support stay untouched.
  • adds vitest.config.ts inlining @deniffer/cli-kit (it ships bun-native .ts that vite does not transpile in node_modules by default).

Untouched in every package: provider/client, context, index.ts, handlers/, lib/command-support.ts, schema.ts, lib/input-validation.ts, all test files.

argc pinned

github:ethan-huo/argc was unpinned everywhere, so any install silently drifted main (it bit this work mid-PR). Pinned to #b18dad5 (current latest, verified green) across all 7 packages + the workspace catalog.

Verification

  • check-types → all 7 exit 0
  • test:once → 113 tests pass (5+4+4+13+32+28+27), counts unchanged from baseline
  • cli-kit consumed at #v0.1.2

Dogfooding this surfaced one upstream fix in cli-kit (error envelopes → stderr, shipped as v0.1.1).

@Deniffer001 Deniffer001 changed the title refactor(backlink-cli): build on @deniffer/cli-kit refactor: migrate all 7 CLIs onto @deniffer/cli-kit + pin argc Jun 14, 2026
@Deniffer001
Deniffer001 merged commit 95b0a5a into main Jun 14, 2026
1 check passed
@Deniffer001
Deniffer001 deleted the chore/backlink-cli-on-cli-kit branch June 14, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant