Skip to content

refactor(starter): download repository's pinned GitHub revision - #245

Draft
jomifepe wants to merge 16 commits into
mainfrom
jp/instant-start-github-starter
Draft

refactor(starter): download repository's pinned GitHub revision#245
jomifepe wants to merge 16 commits into
mainfrom
jp/instant-start-github-starter

Conversation

@jomifepe

Copy link
Copy Markdown
Contributor

Summary

  • read starter provenance from the Repository API and download the recorded GitHub archive revision
  • remove the Website Generator export client while preserving repository access, model, preview, and simulator setup checks
  • safely strip GitHub archive roots, patch Prismic configuration, and cover null compatibility and extraction behavior

Test plan

  • npm run unit -- test/starter-download.test.ts test/repository-client.test.ts
  • npm run types

Made with Cursor

jomifepe and others added 15 commits July 20, 2026 17:45
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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread src/lib/starter.ts
...config,
repositoryName: repositoryId,
documentAPIEndpoint: `https://${repositoryId}.${host}/api/v2`,
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 31e452e. Configure here.

@jomifepe
jomifepe marked this pull request as draft July 30, 2026 12:34
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>
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.

2 participants