Beta.23#151
Conversation
…ame and password feat(plugins): add setAuthService method to plugin interface docs(start): update oAuth authentication section to reflect plugin system chore: update subproject commit reference feat(typedoc): add support for multiple oAuth plugins in TypeDoc configuration docs(plugins): create documentation for @studiocms/auth0, @studiocms/discord, @studiocms/github, and @studiocms/google plugins chore: add JSON metadata for new plugins in package catalog
|
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Actionable comments posted: 4
🔭 Outside diff range comments (1)
src/content/docs/en/start-here/environment-variables.mdx (1)
42-47: Removed OAuth section leaves dangling anchor referencesThe entire “Optional Environment Variables / OAuth” section has been dropped, so the in-page anchor
#oauth-authentication-environment-variablesno longer exists.
Other pages (e.g.getting-started.mdx, Line 398) still reference that anchor, which will render as a broken link at build-time.Proposed quick fix:
- [oauth-environment-variables]: /en/start-here/environment-variables/#oauth-authentication-environment-variables +# (anchor removed – delete any references or create a short stub section that links out to the new plugin docs)Please either (a) delete the reference in every page, or (b) add a stub heading here that redirects readers to the new per-plugin docs.
♻️ Duplicate comments (2)
src/content/docs/en/package-catalog/studiocms-plugins/studiocms-discord.mdx (1)
13-15: Same unused imports as in Auth0 docThe imports are not used; please drop them or add the planned interactive components before merge to avoid tree-shaking warnings.
src/content/docs/en/package-catalog/studiocms-plugins/studiocms-github.mdx (1)
13-15: Unused importsImports are present but no JSX uses them. Remove to keep MDX lean.
🧹 Nitpick comments (10)
src/content/package-catalog/studiocms-auth0.json (1)
4-9: Minor metadata polish & future-proofing
- The comma before “Provides” produces an odd sentence fragment – drop it and lowercase “provides”.
releasedis stillfalse; remember to flip this when the package is published to npm. If this file is merged as-is it will stay hidden in the catalog.- "description": "StudioCMS Auth0 plugin, Provides Auth0 Support for StudioCMS.", + "description": "StudioCMS Auth0 plugin – provides Auth0 support for StudioCMS.", - "released": false + "released": false // ← switch to true on releasesrc/content/package-catalog/studiocms-github.json (1)
4-9: Apply same wording/flag tweaks as Auth0 entryKeep descriptions consistent across plugin entries and remember to update the
releasedflag.- "description": "StudioCMS GitHub plugin, Provides GitHub Support for StudioCMS.", + "description": "StudioCMS GitHub plugin – provides GitHub OAuth support for StudioCMS.",src/content/docs/en/config-reference/features.mdx (1)
262-263: Mention external OAuth plugins or users will get lostThe line now says only
usernameAndPassword“can be configured from here”, but doesn’t hint where the other providers went.
A short note + link to the upgrade guide (or plugin catalog) would avoid confusion.src/content/docs/en/package-catalog/studiocms-plugins/studiocms-google.mdx (1)
16-18: Add a sentence clarifying optional plugin options and scopesReaders may need to know how to pass extra options (e.g. scopes, prompt).
Consider a quick bullet list or link to API reference right after this paragraph.src/content/package-catalog/studiocms-discord.json (1)
4-4: Minor wording consistency
"Provides Discord Support"→ lowercase “provides” to match other catalog entries and avoid mid-sentence capitalization.- "description": "StudioCMS Discord plugin, Provides Discord Support for StudioCMS.", + "description": "StudioCMS Discord plugin, provides Discord support for StudioCMS.",src/content/docs/en/package-catalog/studiocms-plugins/studiocms-auth0.mdx (2)
13-15: Remove currently-unused component imports
PackageManagers,Steps,Tabs,TabItem, andAsideare imported but not referenced in the document body. This adds dead code to the MDX bundle.-import { PackageManagers } from 'starlight-package-managers' -import { Steps, Tabs, TabItem, Aside } from '@astrojs/starlight/components'; +/* Imports can be re-added when interactive widgets are introduced */
32-39: Mention variable provenanceConsider adding a short note that all
CMS_*variables must be available at build time (not only runtime) because StudioCMS reads them during the config phase. This prevents a common mis-configuration pitfall.src/content/docs/en/plugins/index.mdx (2)
77-85:setAuthServicetype tweaks for accuracy
endpointPathshould acceptstring | URL, mirroringsitemapXMLEndpointPathabove.- Optional fields already include
undefined; the explicit| undefinedis redundant.- endpointPath: string; - requiredEnvVariables?: string[] | undefined; + endpointPath: string | URL; + requiredEnvVariables?: string[];
7-9: Badge wording – consider “Beta 23”Since this page reflects new hooks added in Beta 23, a more specific badge (e.g. “Beta 23”) may be clearer than a generic “Updated”.
typedoc.config.ts (1)
63-70: Reduce repetition with a small helper
The four new variable declarations work, but this section is becoming a wall of near-identical lines. Looping over an array keeps it tidy and lowers the copy-paste risk.// Instead of four explicit const lines … const providers = ['auth0', 'discord', 'github', 'google'] as const; const [tdAuth0, tdDiscord, tdGitHub, tdGoogle] = providers.map(() => createStarlightTypeDocPlugin()[0], );Purely cosmetic – feel free to ignore if the explicit style is preferred.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
astro.config.mts(1 hunks)package.json(1 hunks)src/content/docs/en/config-reference/features.mdx(1 hunks)src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-22.mdx(0 hunks)src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-23.mdx(1 hunks)src/content/docs/en/package-catalog/studiocms-plugins/studiocms-auth0.mdx(1 hunks)src/content/docs/en/package-catalog/studiocms-plugins/studiocms-discord.mdx(1 hunks)src/content/docs/en/package-catalog/studiocms-plugins/studiocms-github.mdx(1 hunks)src/content/docs/en/package-catalog/studiocms-plugins/studiocms-google.mdx(1 hunks)src/content/docs/en/plugins/index.mdx(2 hunks)src/content/docs/en/start-here/environment-variables.mdx(1 hunks)src/content/docs/en/start-here/getting-started.mdx(1 hunks)src/content/package-catalog/studiocms-auth0.json(1 hunks)src/content/package-catalog/studiocms-discord.json(1 hunks)src/content/package-catalog/studiocms-github.json(1 hunks)src/content/package-catalog/studiocms-google.json(1 hunks)studiocms(1 hunks)typedoc.config.ts(2 hunks)
💤 Files with no reviewable changes (1)
- src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-22.mdx
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: ArmandPhilippot
PR: withstudiocms/docs#140
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-19.mdx:24-24
Timestamp: 2025-07-21T12:16:32.374Z
Learning: In the withstudiocms/docs repository, documentation URLs in the package-catalog may maintain legacy path names for stability and consistency across language versions, even when the actual package names have been updated. Always verify that corresponding files exist before flagging URLs as broken.
📚 Learning: in the withstudiocms/docs repository, documentation urls in the package-catalog may maintain legacy ...
Learnt from: ArmandPhilippot
PR: withstudiocms/docs#140
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-19.mdx:24-24
Timestamp: 2025-07-21T12:16:32.374Z
Learning: In the withstudiocms/docs repository, documentation URLs in the package-catalog may maintain legacy path names for stability and consistency across language versions, even when the actual package names have been updated. Always verify that corresponding files exist before flagging URLs as broken.
Applied to files:
studiocmssrc/content/package-catalog/studiocms-auth0.jsonpackage.jsonastro.config.mtssrc/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-23.mdxsrc/content/package-catalog/studiocms-discord.jsonsrc/content/package-catalog/studiocms-google.jsonsrc/content/docs/en/package-catalog/studiocms-plugins/studiocms-github.mdxsrc/content/package-catalog/studiocms-github.json
📚 Learning: in the withstudiocms/docs repository, when reviewing french translation files, maintain consistency ...
Learnt from: ArmandPhilippot
PR: withstudiocms/docs#149
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-21.mdx:13-15
Timestamp: 2025-07-24T11:57:15.225Z
Learning: In the withstudiocms/docs repository, when reviewing French translation files, maintain consistency with the English version even if it means keeping unused imports. Structural parity between language versions is prioritized over removing unused code.
Applied to files:
studiocms
🔇 Additional comments (7)
studiocms (1)
1-1: Verify submodule SHA matches the Beta 23 merge
The submodule pointer was updated to3d01f6fe967fd06c153c357b56028f709a8efbdb. Automated diff against the previous SHA (b082d77cb063b7413980d520a0ad02d47fa4ee4a) failed due to missing history. Please manually confirm that3d01f6f…is the actual merge commit from withstudiocms/studiocms#659 (Beta 23).You can verify by:
- Fetching and inspecting the commit in the submodule:
git -C studiocms fetch origin 3d01f6fe967fd06c153c357b56028f709a8efbdb git -C studiocms show --no-patch --format="%H %s"- Or using the GitHub CLI to view PR 659’s merge commit:
gh pr view 659 --repo withstudiocms/studiocms --json mergeCommitsrc/content/package-catalog/studiocms-google.json (1)
5-5: docsLink path should omit the locale segment to stay language-agnosticEvery other catalog entry keeps the path locale-neutral (e.g.
/package-catalog/studiocms-plugins/<pkg>/).
Hard-coding an/en/(or any locale) later breaks automatic locale routing in Starlight.- "docsLink": "/package-catalog/studiocms-plugins/studiocms-google/", + "docsLink": "/package-catalog/studiocms-plugins/studiocms-google/",No functional change above; just emphasising the expected pattern.
Please double-check before merge.src/content/docs/en/config-reference/features.mdx (1)
266-279: Auth config example may be using the wrong structure
Insrc/content/docs/en/config-reference/features.mdx(lines 266–279), you’ve placedusernameAndPasswordConfiginsideproviders, but in theStudioCMSOptionstype it should be a sibling ofproviders. For example:- providers: { - usernameAndPassword: true, - usernameAndPasswordConfig: { - allowUserRegistration: true - } - } + providers: { usernameAndPassword: true }, + usernameAndPasswordConfig: { + allowUserRegistration: true + }Please verify this against your
StudioCMSOptionsdefinition and adjust the docs example to match.src/content/docs/en/package-catalog/studiocms-plugins/studiocms-google.mdx (1)
34-38: Double-check env-var names match implementation
CMS_GOOGLE_REDIRECT_URIis uncommon wording; most OAuth libs use…_CALLBACK_URL.
Please ensure these exact names are what the runtime expects; otherwise the quick-start will fail.astro.config.mts (1)
308-327: Sidebar entries added – make sure matching TypeDoc output folders really existIf
typedoc/studiocms-google(and the other three) aren’t generated bytypedoc.config.ts, Starlight will emit broken links at build time.src/content/package-catalog/studiocms-discord.json (1)
4-9: Flagreleased: falsecontradicts PR merge checklistThe PR objectives mention updating package-catalog entries “to mark packages as released.” Leaving
"released": falsewill keep the plugin hidden from the public catalog after merge.
Either set it totruenow or clearly document that a follow-up commit will flip the flag before publishing.typedoc.config.ts (1)
374-421: Verify “effect” directory names in entryPoints
It looks like these providers referencesrc/effect/..., but the packages may actually usesrc/effects/.... Please confirm the exact directory names and update the entryPoints accordingly to avoid TypeDoc resolution errors.• typedoc.config.ts (lines 374–421):
– @studiocms/auth0 → src/effect/auth0.ts
– @studiocms/discord → src/effect/discord.ts
– @studiocms/github → src/effect/github.ts
– @studiocms/google → src/effect/google.ts
needs: withstudiocms/studiocms#659
TODO before merge:
Summary by CodeRabbit
New Features
Documentation
Chores