diff options
Diffstat (limited to 'skills/vercel-optimize/scripts')
| -rwxr-xr-x | skills/vercel-optimize/scripts/collect-signals.mjs | 2 | ||||
| -rwxr-xr-x | skills/vercel-optimize/scripts/deep-dive.mjs | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/skills/vercel-optimize/scripts/collect-signals.mjs b/skills/vercel-optimize/scripts/collect-signals.mjs index 433b1b6..f5ae245 100755 --- a/skills/vercel-optimize/scripts/collect-signals.mjs +++ b/skills/vercel-optimize/scripts/collect-signals.mjs @@ -76,7 +76,7 @@ async function main() { log(`project link resolved (source=${project.source}; teamScope=${project.orgId ? 'yes' : 'no'})`); if (!project.orgId) { - throw new Error('PROJECT_SCOPE_UNRESOLVED: the project was resolved without an org/team owner. Ask the user which Vercel team or personal scope owns the project, then rerun from a linked app directory or set VERCEL_PROJECT_ID with VERCEL_ORG_ID for that scope.'); + throw new Error('PROJECT_SCOPE_UNRESOLVED: the project was resolved without an owner account. Ask the user which Vercel team or personal scope owns the project, then rerun from a linked app directory or set VERCEL_PROJECT_ID with VERCEL_ORG_ID for that scope.'); } log('checking framework support…'); diff --git a/skills/vercel-optimize/scripts/deep-dive.mjs b/skills/vercel-optimize/scripts/deep-dive.mjs index 6363fc3..497d32a 100755 --- a/skills/vercel-optimize/scripts/deep-dive.mjs +++ b/skills/vercel-optimize/scripts/deep-dive.mjs @@ -73,6 +73,12 @@ async function main() { console.error(' Re-run collect-signals.mjs with the current skill so deep-dive queries use the same team as the broad pass.'); process.exit(2); } + const commandAccountId = commandScope.teamId ?? commandScope.userId ?? null; + if (commandAccountId && link.orgId && link.orgId !== commandAccountId) { + console.error('[deep-dive] FATAL: cwd .vercel/ links the project to a different Vercel scope than commandScope.'); + console.error(' Re-run with --cwd <dir-linked-to-the-collected-project>, or rerun collect-signals.mjs from the intended app directory.'); + process.exit(2); + } const scope = commandScope.cliScope || undefined; log(`command scope resolved (source=${commandScope.source}; scoped=${scope ? 'yes' : 'no'})`); |
