Skip to content

refactor(cli): use compute SDK app detection - #126

Draft
AmanVarshney01 wants to merge 2 commits into
mainfrom
aman/use-compute-sdk-app-detection
Draft

refactor(cli): use compute SDK app detection#126
AmanVarshney01 wants to merge 2 commits into
mainfrom
aman/use-compute-sdk-app-detection

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Jul 31, 2026

Copy link
Copy Markdown
Member

Context

Prisma CLI currently owns a second framework detector in packages/cli/src/controllers/app.ts. That implementation separately reads package metadata and framework config files, so its answers can drift from Console and other Compute entry points.

The canonical detector is being added to @prisma/compute-sdk in https://github.com/prisma/project-compute/pull/116. This follow-up removes the CLI copy and delegates local-directory inspection to the SDK adapter. The CLI keeps only presentation-specific mapping for its existing framework annotation. The matching Console/PDP consumer follow-up is https://github.com/prisma/pdp-control-plane/pull/4787.

Changes

  • replace the CLI framework/config/package scan with detectComputeAppFromDirectory
  • remove the duplicate dependency and config-file detection helpers
  • preserve the existing Next.js standalone annotation and user-facing result shape
  • align the existing artifact-staging test with the SDK's current invariant: safe in-tree store symlinks are preserved while out-of-tree fallback targets are materialized

The artifact expectation is a test-only compatibility update for the SDK version that will contain project-compute #116; it does not add CLI runtime behavior.

Dependency / draft status

This PR is intentionally draft and stacked on project-compute #116. The new SDK export is not published yet, so the package version and lockfile update must be added after that PR merges and the next @prisma/compute-sdk version is available. CI against the currently pinned SDK is expected to remain blocked until then. No git dependency or guessed package version is committed.

Verification

Validated in a clean temporary checkout against the packed npm artifact from project-compute #116:

  • Node ESM import smoke test for @prisma/compute-sdk/config and @prisma/compute-sdk/config/directory
  • pnpm --recursive exec tsc --noEmit
  • pnpm --filter @prisma/cli build
  • pnpm --filter @prisma/cli test — 673 passing tests
  • pnpm lint — existing warnings only

Follow-up before ready

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cc935a1a-35a5-4750-8268-fa60a0cf7525

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

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