feat(cli): separate cnc and pgpm CLIs - hard separation #500
+3,057
−7,736
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.
feat(cli): separate cnc and pgpm CLIs - hard separation
Summary
This PR implements a hard separation between
cnc(Constructive CLI) andpgpm(PostgreSQL Package Manager) to eliminate branding confusion.Before:
cncincluded all 22+ pgpm commands plus GraphQL commandsAfter:
cnconly has 4 GraphQL-focused commands:server,explorer,codegen,get-graphql-schemaKey changes:
pgpmfor database operationspackages/clitopgpm/cli- complete test infrastructure separationpgpm/cli/test-utilswith fixtures, CLI helpers, and TestDatabasepackages/cli/test-utilsto only support cnc GraphQL commandsUpdates since last revision
packages/cli/__tests__topgpm/cli/__tests__pgpm/cli/test-utils/with CLIDeployTestFixture, fixtures, cli helpers, and init-argv utilitiespackages/cli(CLIDeployTestFixture, TestDatabase, init-argv)packages/cli/__tests__now only contains GraphQL tests:codegen.test.ts,get-graphql-schema.test.ts,cli.test.ts../../../pgpm/cli/src/commands) in test codecreatePgpmCommandMap()and PGPM command delegationReview & Testing Checklist for Human
This is a breaking change that affects all users who were using
cncfor database operations.cnc server,cnc explorer,cnc codegen, andcnc get-graphql-schemato confirm they still functioncnc deploy,cnc init, etc. now shows "Unknown command" errorpnpm testin bothpackages/cliandpgpm/clito ensure test separation is correct~/.constructive/. Verify the version comparison logic and file-based caching work correctlyRecommended test plan:
cd packages/cli && pnpm link --globalcnc --helpand verify only 4 commands are showncnc serverin a workspace with a database to verify GraphQL server workscnc deployand verify it fails with "Unknown command: deploy"cd pgpm/cli && pnpm testto verify pgpm tests passcd packages/cli && pnpm testto verify cnc tests passNotes
@constructive-io/cliandpgpmfor the complete workflowcnc --helpshows only 4 commands,cnc deploycorrectly fails with "Unknown command"@pgpmjs/loggerand@pgpmjs/typesremain as dependencies in packages/cli - these are legitimately used by the GraphQL commands (server, explorer)Link to Devin run: https://app.devin.ai/sessions/e847fee58b144d5fa6a7c390d5d9b760
Requested by: Dan Lynch (@pyramation)