Skip to content

fix: preserve docs.json as cloud init source#335

Merged
Kinfe123 merged 2 commits into
mainfrom
fix/cloud-init-docs-json-source
Jul 1, 2026
Merged

fix: preserve docs.json as cloud init source#335
Kinfe123 merged 2 commits into
mainfrom
fix/cloud-init-docs-json-source

Conversation

@Kinfe123

@Kinfe123 Kinfe123 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Treat an existing docs.json without docs.config.* as the source of truth for docs cloud init.
  • Preserve frameworkless docs.mode, runtime root, content roots, existing cloud feature choices, and existing docs-cloud extensions.
  • Add Cloud init defaults directly to docs.json without creating a native docs.config.ts sidecar.
  • Keep repeated docs cloud init runs idempotent for docs-json-only projects, even when Fumadocs dependencies/config files are present.

Validation

  • pnpm --filter @farming-labs/docs exec vitest run src/cli/cloud.test.ts
  • pnpm --filter @farming-labs/docs typecheck
  • pnpm exec oxlint packages/docs/src/cli/cloud.ts packages/docs/src/cli/cloud.test.ts
  • pnpm exec oxfmt --check packages/docs/src/cli/cloud.ts packages/docs/src/cli/cloud.test.ts && git diff --check
  • pnpm --filter @farming-labs/docs build
  • Built-CLI smoke matrix for: native docs.config.tsx, frameworkless docs.json, framework-backed docs.json without config, fresh Fumadocs connect, fresh framework config creation, and docs.json with Fumadocs signals.

Summary by cubic

Use an existing docs.json as the source of truth for docs cloud init when no docs.config.* exists. Preserves frameworkless settings, writes cloud defaults to docs.json (no docs.config.ts), and keeps repeat runs idempotent.

  • Bug Fixes
    • Uses docs.json as init input and writes defaults (apiKey env, deploy enabled, analytics) back to it.
    • Keeps existing docs.mode, runtime/root, and content roots unchanged; subsequent runs are a no-op.

Written for commit 96671cb. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jul 1, 2026 11:52pm
farming-labs-docs-docs-cloud Building Building Preview, Comment Jul 1, 2026 11:52pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@farming-labs/astro

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro@335

@farming-labs/astro-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro-theme@335

@farming-labs/docs

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/docs@335

@farming-labs/theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/theme@335

@farming-labs/next

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/next@335

@farming-labs/nuxt

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt@335

@farming-labs/nuxt-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt-theme@335

@farming-labs/svelte

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte@335

@farming-labs/svelte-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte-theme@335

@farming-labs/tanstack-start

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/tanstack-start@335

commit: 8077765

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/docs/src/cli/cloud.ts
@Kinfe123 Kinfe123 merged commit ef0e3ac into main Jul 1, 2026
8 of 10 checks passed
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.

1 participant