From ad2f17db82577e9b903fcfdc230fdd30b3f6c75b Mon Sep 17 00:00:00 2001 From: Bilal Godil Date: Tue, 26 May 2026 11:50:22 -0700 Subject: [PATCH] fix(hexclave): doctor accepts @hexclave/next StackProvider import The next.layout-provider check's import regex only matched the legacy @stackframe/stack scope. After the PR-3 source rename, fixtures (and real projects) import StackProvider from @hexclave/next, so the regex returned false, the layout check failed, and the doctor exited 1. Widen the regex to accept both scopes, mirroring the dual-scope detection in packages/stack-shared/src/config-rendering.ts and apps/dashboard/src/lib/github-config-push.ts. Fixes 9 Stack CLI - Doctor failures in apps/e2e/tests/general/cli.test.ts. --- packages/stack-cli/src/commands/doctor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/stack-cli/src/commands/doctor.ts b/packages/stack-cli/src/commands/doctor.ts index ced0c6c71..21020b05b 100644 --- a/packages/stack-cli/src/commands/doctor.ts +++ b/packages/stack-cli/src/commands/doctor.ts @@ -336,8 +336,10 @@ function layoutWrapsStackProviderCheck(): CheckSpec { } const content = fs.readFileSync(foundPath, "utf-8"); + // Accept the canonical @hexclave/next scope and the legacy @stackframe/stack + // scope (matches the dual-scope detection used elsewhere in the codebase). const importsStackProvider = - /import\s*\{[^}]*\bStackProvider\b[^}]*\}\s*from\s*["']@stackframe\/stack["']/.test(content); + /import\s*\{[^}]*\bStackProvider\b[^}]*\}\s*from\s*["'](?:@hexclave\/next|@stackframe\/stack)["']/.test(content); const wrapsJsx = /