docs: clarify loadEnv files option is required#506
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces documentation for the new @harperfast/nextjs plugin, including a dedicated guide, updates to the components overview, static files documentation, and sidebar configuration. It also adds configuration tables to the environment variables documentation. Feedback on the changes includes correcting the GitHub repository URLs for the Apollo and Astro extensions in the overview, and adding a missing getDog function definition to the Next.js actions example to ensure the code snippets are complete.
| - [`@harperdb/apollo`](https://github.com/HarperFast/apollo) — Serve an Apollo GraphQL server backed by Harper | ||
| - [`@harperdb/astro`](https://github.com/HarperFast/astro) — Run an Astro application on Harper |
There was a problem hiding this comment.
The GitHub repository URLs for @harperdb/apollo and @harperdb/astro have been incorrectly changed to use the HarperFast organization. Since these packages are under the @harperdb scope, their repositories should remain under the HarperDB GitHub organization.
| - [`@harperdb/apollo`](https://github.com/HarperFast/apollo) — Serve an Apollo GraphQL server backed by Harper | |
| - [`@harperdb/astro`](https://github.com/HarperFast/astro) — Run an Astro application on Harper | |
| - [\`@harperdb/apollo\`](https://github.com/HarperDB/apollo) — Serve an Apollo GraphQL server backed by Harper | |
| - [\`@harperdb/astro\`](https://github.com/HarperDB/astro) — Run an Astro application on Harper |
| export async function listDogs() { | ||
| const dogs = []; | ||
| for await (const dog of tables.Dog.search()) { | ||
| dogs.push({ id: dog.id, name: dog.name }); | ||
| } | ||
| return dogs; | ||
| } |
There was a problem hiding this comment.
The example code in app/actions.js is missing the definition for getDog, which is imported and used in the subsequent app/dogs/[id]/page.jsx example. Adding getDog to app/actions.js makes the documentation complete and copy-pasteable.
| export async function listDogs() { | |
| const dogs = []; | |
| for await (const dog of tables.Dog.search()) { | |
| dogs.push({ id: dog.id, name: dog.name }); | |
| } | |
| return dogs; | |
| } | |
| export async function listDogs() { | |
| const dogs = []; | |
| for await (const dog of tables.Dog.search()) { | |
| dogs.push({ id: dog.id, name: dog.name }); | |
| } | |
| return dogs; | |
| } | |
| export async function getDog(id) { | |
| return tables.Dog.get(id); | |
| } |
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-506 This preview will update automatically when you push new commits. |
Add a Configuration table to the loadEnv reference page (current and v4 versioned) that explicitly marks `files` as a required option, preventing the incorrect `loadEnv: true` usage pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6b1b557 to
1202015
Compare
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-506 This preview will update automatically when you push new commits. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-506 This preview will update automatically when you push new commits. |
Summary
loadEnvreference page (current and v4 versioned docs) that explicitly marksfilesas a required optionoverrideflag in one placeMotivation
The previous docs only showed
filesin examples without indicating it was mandatory, making it easy to incorrectly useloadEnv: true.Test plan
filesis visually marked as required🤖 Generated with Claude Code