-
Notifications
You must be signed in to change notification settings - Fork 303
chore: switch docs specs source to @appwrite.io/specs#2751
chore: switch docs specs source to @appwrite.io/specs #2751ChiragAgg5k merged 1 commit intomain from
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis pull request updates the source of API specifications from the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/routes/docs/references/[version]/[platform]/[service]/specs.ts (1)
399-411:⚠️ Potential issue | 🔴 CriticalCritical:
specsglob andgetApistill reference the removed@appwrite.io/repopackage.
@appwrite.io/repois not a dependency inpackage.json, but lines 399–411 still resolve JSON spec files from it:const specs = import.meta.glob( '/node_modules/@appwrite.io/repo/app/config/specs/open-api3*.json', { exhaustive: true } ); // ... const target = `/node_modules/@appwrite.io/repo/app/config/specs/open-api3-${version}-...json`; return specs[target]() as unknown as OpenAPIV3.Document;This will cause the glob to resolve to
{}at build time, breaking every call togetApi()at runtime. Update the paths to use@appwrite.io/specs/specsinstead:Expected fix
const specs = import.meta.glob( '/node_modules/@appwrite.io/specs/specs/open-api3*.json', { exhaustive: true } ); export async function getApi(version: string, platform: string): Promise<OpenAPIV3.Document> { const isClient = platform.startsWith('client-'); const isServer = platform.startsWith('server-'); const target = `/node_modules/@appwrite.io/specs/specs/open-api3-${version}-${ isServer ? 'server' : isClient ? 'client' : 'console' }.json`; return specs[target]() as unknown as OpenAPIV3.Document; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/routes/docs/references/`[version]/[platform]/[service]/specs.ts around lines 399 - 411, Update the import glob path and the computed target in the specs loader: change the import.meta.glob call referenced by the const specs and the constructed target string inside getApi(version, platform) to point to '/node_modules/@appwrite.io/specs/specs/open-api3*.json' (and the corresponding open-api3-{version}-{server|client|console}.json) instead of the removed '@appwrite.io/repo' package so that specs[target]() resolves correctly; modify the glob pattern and target construction where the symbols specs, getApi, and target are used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 35: The release workflow is broken because package.json pins
`@appwrite.io/specs` to a specific commit hash
(`#63057a4df2f206c29e98c6de7263264b9d0d6b1c`) so the RELEASE.md step that runs
"bun update `@appwrite.io/specs`" won't move it; either change the dependency in
package.json to reference the branch (e.g., "#main") so bun update advances it,
or keep the commit-pin but update RELEASE.md to explicitly replace the commit
hash during the release and run "bun install" to refresh bun.lock; update
package.json (the `@appwrite.io/specs` entry) and RELEASE.md (the bun update step)
accordingly to match the chosen approach.
In `@RELEASE.md`:
- Around line 57-58: Update the top-level checklist item that still reads "Bump
appwrite repo so latest main commit is used" to match the updated script
comment; change that header to "Bump appwrite/specs repo so latest main commit
is used" so it aligns with the updated command line "bun update
`@appwrite.io/specs`" in the diff.
---
Outside diff comments:
In `@src/routes/docs/references/`[version]/[platform]/[service]/specs.ts:
- Around line 399-411: Update the import glob path and the computed target in
the specs loader: change the import.meta.glob call referenced by the const specs
and the constructed target string inside getApi(version, platform) to point to
'/node_modules/@appwrite.io/specs/specs/open-api3*.json' (and the corresponding
open-api3-{version}-{server|client|console}.json) instead of the removed
'@appwrite.io/repo' package so that specs[target]() resolves correctly; modify
the glob pattern and target construction where the symbols specs, getApi, and
target are used.
14efe3f to
89d7a99
Compare
89d7a99 to
3644990
Compare
Uh oh!
There was an error while loading. Please reload this page.
Related
Summary
@appwrite.io/repoto@appwrite.io/specsspecs.tsto load from@appwrite.io/specsType of Change
Testing
Risk
Summary by CodeRabbit