mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
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.
This commit is contained in:
parent
46f5233bbb
commit
ad2f17db82
@ -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 = /<StackProvider\b/.test(content);
|
||||
|
||||
const rel = path.relative(ctx.projectDir, foundPath);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user