refactor(starter): download repository's pinned GitHub revision - #245
refactor(starter): download repository's pinned GitHub revision#245jomifepe wants to merge 16 commits into
Conversation
Provide a single CLI flow to provision or export an Instant Start repository, download the starter, and set up local development. Co-authored-by: Cursor <cursoragent@cursor.com>
Inline the command handler, use synchronous ZIP extraction, and drop the mock-heavy orchestration test while keeping focused API and filesystem coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: José Pereira <jomifepe@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the standalone init command and move the paired starter handoff into a dedicated starter download namespace with repository validation, pinned GitHub download, local preview setup, and post-extract documents cleanup. Co-authored-by: Cursor <cursoragent@cursor.com>
Check for an existing localhost preview before adding one so rerunning the command does not create duplicate preview configs. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep starter download independent from Website Generator while incorporating the latest CLI improvements. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the GitHub archive URL from persisted starter provenance instead of a hardcoded commit, and reject repositories without recorded revision metadata. Co-authored-by: Cursor <cursoragent@cursor.com>
Build the GitHub archive URL directly from repository metadata and only reject repositories without starter provenance. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 31e452e. Configure here.
| ...config, | ||
| repositoryName: repositoryId, | ||
| documentAPIEndpoint: `https://${repositoryId}.${host}/api/v2`, | ||
| }, |
There was a problem hiding this comment.
Document API endpoint missing cdn
High Severity
patchStarterConfig sets documentAPIEndpoint to https://${repositoryId}.${host}/api/v2, but Prismic’s Content API uses the cdn subdomain (for example https://my-repo.cdn.prismic.io/api/v2). The downloaded starter’s config is overwritten with a host that matches the builder URL pattern, not the Document API, so the project may fail to fetch content after download.
Reviewed by Cursor Bugbot for commit 31e452e. Configure here.
Mark the Instant Start onboarding step complete only after the starter has been downloaded and configured locally, without failing setup if tracking fails. Co-authored-by: Cursor <cursoragent@cursor.com>


Summary
Test plan
npm run unit -- test/starter-download.test.ts test/repository-client.test.tsnpm run typesMade with Cursor