refactor: migrate all 7 CLIs onto @deniffer/cli-kit + pin argc - #2
Merged
Conversation
…output, breaking schema.test)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates all 7 product CLIs onto the extracted @deniffer/cli-kit base, and pins
argcto 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.ts→cli-kit/errors; the per-provider HTTP-status/code classification is kept as a*ErrorMapperplugged into the cli-kit normalizer seam (behavior preserved exactly).output.ts→cli-kit/output(gsc / google-ads / sitemap keep their legacy pretty-mode line format via thehumanoverride; JSON output + normalization run on cli-kit).services.ts→cli-kit/serviceslazy container +defineClientAdapter(each provider injected as the adapter); thegetXClient()accessor is preserved so handlers/command-support stay untouched.vitest.config.tsinlining@deniffer/cli-kit(it ships bun-native.tsthat 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/argcwas 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 0test:once→ 113 tests pass (5+4+4+13+32+28+27), counts unchanged from baseline#v0.1.2Dogfooding this surfaced one upstream fix in cli-kit (error envelopes → stderr, shipped as v0.1.1).