Skip to content

Comments

chore(deps): update Astro#306

Merged
marcosmartini merged 2 commits intomainfrom
update-astro-5
Dec 21, 2024
Merged

chore(deps): update Astro#306
marcosmartini merged 2 commits intomainfrom
update-astro-5

Conversation

@marcosmartini
Copy link
Contributor

@marcosmartini marcosmartini commented Dec 21, 2024

  • Update Astro deps
  • Adjust code to conform to how content collections work now

Summary by CodeRabbit

  • New Features

    • Enhanced security with updated Content-Security-Policy headers.
    • Integrated loaders for docs and i18n collections to improve data processing.
  • Dependency Updates

    • Upgraded multiple packages to their latest versions, including @astrojs/mdx, @astrojs/starlight, and astro.
  • Bug Fixes

    • Adjusted slug generation method for static paths to improve API route structure.
    • Updated linking strategy for related articles in the footer component to ensure consistency with new data structure.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 21, 2024

Deploying kinde-docs-previews with  Cloudflare Pages  Cloudflare Pages

Latest commit: 488cb9d
Status: ✅  Deploy successful!
Preview URL: https://f5c7ac8f.kinde-docs-previews.pages.dev
Branch Preview URL: https://update-astro-5.kinde-docs-previews.pages.dev

View logs

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 21, 2024

Walkthrough

This pull request encompasses updates across multiple files, focusing on dependency version upgrades, content configuration modifications, and Content Security Policy (CSP) header adjustments. The changes include updating Astro-related package versions in package.json, enhancing content collection configurations in src/content.config.ts, modifying the static path generation in og-image.png.ts, and refining CSP headers in customHttp.yml. These updates aim to improve the project's dependency management, content processing, and security configuration.

Changes

File Change Summary
customHttp.yml Reordered and reformatted Content-Security-Policy headers, added sha256 hashes to script-src, updated connect-src and img-src directives
package.json Upgraded Astro-related dependencies:
- @astrojs/mdx: ^3.1.9^4.0.3
- @astrojs/starlight: ^0.29.3^0.30.3
- @astrojs/starlight-tailwind: ^2.0.3^3.0.0
- @astrojs/tailwind: ^5.1.2^5.1.4
- astro: ^4.16.16^5.1.1
src/content.config.ts Added loader properties to docs and i18n collections
- Removed type property from i18n collection
src/pages/[...slug]/og-image.png.ts Updated getStaticPaths to use post.id instead of post.slug for path generation
src/starlight-overrides/Footer.astro Updated related articles to use entry.id instead of entry.slug for linking

Possibly related PRs

  • feat: Add API docs (stage 1) #251: The changes in customHttp.yml regarding Content-Security-Policy headers are directly related to the modifications made in the same file in this PR, which also involves updates to CSP headers.
  • feat: add Inkeep for search #304: This PR also modifies customHttp.yml to update Content-Security-Policy headers, specifically adding new connect-src URLs and a new SHA-256 hash, which aligns with the changes made in the main PR.

Suggested labels

sdk

Suggested reviewers

  • clairekinde11

Poem

🐰 Hop, hop, through code so bright,
Dependencies dancing with delight!
CSP headers, sharp and clean,
Astro's magic, a developer's dream.
Configs tweaked with bunny might! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

❌ Link Validation Failed

Invalid Links:
Link: /undefined/, Found In: /authenticate/about-auth/about-authentication.mdx
Link: /undefined/, Found In: /authenticate/about-auth/authentication-methods.mdx
Link: /undefined/, Found In: /authenticate/about-auth/identity-and-verification.mdx
Link: /undefined/, Found In: /authenticate/about-auth/user-communication.mdx
Link: /undefined/, Found In: /authenticate/auth-guides/mixed-b2b-b2c.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/email-authentication.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/email-deliverability.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/password-authentication.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/passwordless-authentication.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/phone-authentication.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/set-up-user-authentication.mdx
Link: /undefined/, Found In: /authenticate/authentication-methods/username-authentication.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/advanced-organization.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/authentication-experience.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/custom-authentication-pages.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/disable-sign-up.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/prepopulate-identity-sign-in.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/proxy-your-kinde-auth-pages-through-cloudflare.mdx
Link: /undefined/, Found In: /authenticate/custom-configurations/redirect-users.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/about-enterprise-connections.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/azure.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/cloudflare-saml.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/custom-saml.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/custom-saml-google-workspace.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/enterprise-connections-b2b.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/home-realm-discovery.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/mapping-users-enterprise.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/okta-saml-connection.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/provision-users-enterprise.mdx
Link: /undefined/, Found In: /authenticate/enterprise-connections/refresh-saml-certificate.mdx
Link: /undefined/, Found In: /authenticate/manage-authentication/manage-authentication-applications.mdx
Link: /undefined/, Found In: /authenticate/manage-authentication/navigate-between-organizations.mdx
Link: /undefined/, Found In: /authenticate/manage-authentication/organization-auth-experience.mdx
Link: /undefined/, Found In: /authenticate/manage-authentication/sync-with-kinde.mdx
Link: /undefined/, Found In: /authenticate/manage-authentication/user-auth-applications.mdx
Link: /undefined/, Found In: /authenticate/multi-factor-auth/about-multi-factor-authentication.mdx
Link: /undefined/, Found In: /authenticate/multi-factor-auth/enable-multi-factor-authentication.mdx
Link: /undefined/, Found In: /authenticate/multi-factor-auth/mfa-per-org.mdx
Link: /undefined/, Found In: /authenticate/social-sign-in/bitbucket-sso.mdx
Link: /undefined/, Found In: /authenticate/social-sign-in/xero-sso.mdx
Link: /undefined/, Found In: /build/applications/about-applications.mdx
Link: /undefined/, Found In: /build/applications/add-and-manage-applications.mdx
Link: /undefined/, Found In: /build/applications/default-login-routes.mdx
Link: /undefined/, Found In: /build/applications/rotate-client-secret.mdx
Link: /undefined/, Found In: /build/domains/organization-custom-domain.mdx
Link: /undefined/, Found In: /build/domains/pointing-your-domain.mdx
Link: /undefined/, Found In: /build/domains/subdomains-for-callbacks.mdx
Link: /undefined/, Found In: /build/env-variables/add-manage-env-variables.mdx
Link: /undefined/, Found In: /build/env-variables/store-environment-variables.mdx
Link: /undefined/, Found In: /build/environments/production-to-live.mdx
Link: /undefined/, Found In: /build/organizations/add-and-manage-organizations.mdx
Link: /undefined/, Found In: /build/organizations/allow-org-create-on-signup.mdx
Link: /undefined/, Found In: /build/organizations/allow-user-signup-org.mdx
Link: /undefined/, Found In: /build/organizations/delete-organization.mdx
Link: /undefined/, Found In: /build/organizations/import-organizations.mdx
Link: /undefined/, Found In: /build/organizations/multi-tenancy-using-organizations.mdx
Link: /undefined/, Found In: /build/organizations/orgs-for-developers.mdx
Link: /undefined/, Found In: /build/set-up-options/access-policies.mdx
Link: /undefined/, Found In: /build/set-up-options/attack-protection.mdx
Link: /undefined/, Found In: /build/set-up-options/kinde-business-model.mdx
Link: /undefined/, Found In: /build/set-up-options/manage-access-requests.mdx
Link: /undefined/, Found In: /build/set-up-options/run-multiple-businesses.mdx
Link: /undefined/, Found In: /build/tokens/about-access-tokens.mdx
Link: /undefined/, Found In: /build/tokens/about-id-tokens.mdx
Link: /undefined/, Found In: /build/tokens/configure-tokens.mdx
Link: /undefined/, Found In: /build/tokens/oath-scopes.mdx
Link: /undefined/, Found In: /build/tokens/refresh-tokens.mdx
Link: /undefined/, Found In: /build/tokens/token-customization.mdx
Link: /undefined/, Found In: /build/tokens/token-validation-errors.mdx
Link: /undefined/, Found In: /build/tokens/verifying-json-web-tokens.mdx
Link: /undefined/, Found In: /design/brand/apply-branding-for-an-organization.mdx
Link: /undefined/, Found In: /design/brand/remove-kinde-branding.mdx
Link: /undefined/, Found In: /design/emails/email-notifications.mdx
Link: /undefined/, Found In: /design/forms/set-up-subscription-form.mdx
Link: /undefined/, Found In: /design/pages/design-your-welcome-pages.mdx
Link: /undefined/, Found In: /design/pages/internationalization.mdx
Link: /undefined/, Found In: /design/pages/link-to-homepage.mdx
Link: /undefined/, Found In: /design/pages/marketing-consent.mdx
Link: /undefined/, Found In: /design/pages/set-up-the-request-access-page.mdx
Link: /undefined/, Found In: /developer-tools/about/using-kinde-without-an-sdk.mdx
Link: /undefined/, Found In: /developer-tools/guides/dotnet-open-id-connect.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/about-m2m-scopes.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/access-token-for-api.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/api-example-node.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/api-rate-limits.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/connect-to-kinde-api.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/kinde-api-test-token.mdx
Link: /undefined/, Found In: /developer-tools/kinde-api/troubleshoot-kinde-api.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/apollo-graphql.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/dotnet-sdk.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/java-sdk.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/java-sdk-v1.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/nextjs-prev-sdk.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/nextjs-prev-sdkv1.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/nextjs-sdk.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/nextjs-sdkv1.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/node-express-graphql.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/nuxt-module.mdx
Link: /undefined/, Found In: /developer-tools/sdks/backend/php-sdk.mdx
Link: /undefined/, Found In: /developer-tools/sdks/native/expo-react-native.mdx
Link: /undefined/, Found In: /developer-tools/sdks/native/flutter-sdk.mdx
Link: /undefined/, Found In: /developer-tools/sdks/native/react-native-sdk.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/access-to-your-api.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/api-scopes-m2m-applications.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/custom-api-scopes.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/dotnet-based-apis.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/protect-your-api.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/register-manage-apis.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/test-token-from-kinde.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/test-your-api-m2m-token.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/test-your-api-user-token.mdx
Link: /undefined/, Found In: /developer-tools/your-apis/user-api-scopes.mdx
Link: /undefined/, Found In: /get-started/apis-and-sdks/about-kinde-apis.mdx
Link: /undefined/, Found In: /get-started/connect/callback-urls.mdx
Link: /undefined/, Found In: /get-started/connect/customize-email-sender.mdx
Link: /undefined/, Found In: /get-started/connect/getting-app-keys.mdx
Link: /undefined/, Found In: /get-started/guides/byo-code.mdx
Link: /undefined/, Found In: /get-started/guides/first-things-first.mdx
Link: /undefined/, Found In: /get-started/guides/set-up-tasks.mdx
Link: /undefined/, Found In: /get-started/guides/start-with-starter-kit.mdx
Link: /undefined/, Found In: /get-started/learn-about-kinde/kinde-product-security.mdx
Link: /undefined/, Found In: /get-started/learn-about-kinde/kinde-supported-browsers.mdx
Link: /undefined/, Found In: /get-started/learn-about-kinde/supported-data-regions.mdx
Link: /undefined/, Found In: /get-started/learn-about-kinde/what-does-kinde-do.mdx
Link: /undefined/, Found In: /get-started/switch-to-kinde/auth0-to-kinde.mdx
Link: /undefined/, Found In: /get-started/switch-to-kinde/switch-to-kinde-for-user-authentication.mdx
Link: /undefined/, Found In: /get-started/team-and-account/enterprise-access-to-kinde.mdx
Link: /undefined/, Found In: /get-started/team-and-account/mfa-for-kinde-access.mdx
Link: /undefined/, Found In: /integrate/connected-apps/add-connected-apps.mdx
Link: /undefined/, Found In: /integrate/connected-apps/discord-connected-app.mdx
Link: /undefined/, Found In: /integrate/connected-apps/github-connected-app.mdx
Link: /undefined/, Found In: /integrate/connected-apps/gitlab-connected-app.mdx
Link: /undefined/, Found In: /integrate/connected-apps/google-drive-connected-app.mdx
Link: /undefined/, Found In: /integrate/connected-apps/patreon-connected-app.mdx
Link: /undefined/, Found In: /integrate/third-party-tools/cloudflare-zero-trust.mdx
Link: /undefined/, Found In: /integrate/third-party-tools/kinde-edge-workers.mdx
Link: /undefined/, Found In: /integrate/third-party-tools/kinde-wordpress.mdx
Link: /undefined/, Found In: /integrate/third-party-tools/marketing-campaign-tracking.mdx
Link: /undefined/, Found In: /integrate/third-party-tools/shopify-multipass.mdx
Link: /undefined/, Found In: /integrate/webhooks/about-webhooks.mdx
Link: /undefined/, Found In: /integrate/webhooks/add-manage-webhooks.mdx
Link: /undefined/, Found In: /integrate/webhooks/webhooks-nextjs.mdx
Link: /undefined/, Found In: /integrate/webhooks/zapier-event-hooks.mdx
Link: /undefined/, Found In: /manage-users/about.mdx
Link: /undefined/, Found In: /manage-users/about/manage-users-across-organizations.mdx
Link: /undefined/, Found In: /manage-users/access-control/accept-policies-signup.mdx
Link: /undefined/, Found In: /manage-users/access-control/delete-or-suspend-users.mdx
Link: /undefined/, Found In: /manage-users/access-control/reset-multi-factor-authentication-for-a-user.mdx
Link: /undefined/, Found In: /manage-users/access-control/reset-user-password.mdx
Link: /undefined/, Found In: /manage-users/access-control/set-temporary-password.mdx
Link: /undefined/, Found In: /manage-users/add-and-edit/add-and-edit-users.mdx
Link: /undefined/, Found In: /manage-users/add-and-edit/add-manage-user-identities.mdx
Link: /undefined/, Found In: /manage-users/add-and-edit/import-users-in-bulk.mdx
Link: /undefined/, Found In: /manage-users/add-and-edit/manage-subscribers.mdx
Link: /undefined/, Found In: /manage-users/add-and-edit/troubleshoot-user-import-errors.mdx
Link: /undefined/, Found In: /manage-users/roles-and-permissions/apply-roles-and-permissions-to-users.mdx
Link: /undefined/, Found In: /manage-users/roles-and-permissions/default-user-roles.mdx
Link: /undefined/, Found In: /manage-users/roles-and-permissions/user-permissions.mdx
Link: /undefined/, Found In: /manage-users/roles-and-permissions/user-roles.mdx
Link: /undefined/, Found In: /manage-users/view-activity/hotjar.mdx
Link: /undefined/, Found In: /manage-users/view-activity/track-user-sign-in-with-google-analytics.mdx
Link: /undefined/, Found In: /manage-users/view-activity/view-audit-log.mdx
Link: /undefined/, Found In: /manage-users/view-activity/view-user-activity.mdx
Link: /undefined/, Found In: /manage-your-account/business-information/change-your-business-time-zone.mdx
Link: /undefined/, Found In: /manage-your-account/business-information/policies-terms.mdx
Link: /undefined/, Found In: /manage-your-account/business-information/update-your-details.mdx
Link: /undefined/, Found In: /manage-your-account/profile-and-plan/change-kinde-plan.mdx
Link: /undefined/, Found In: /manage-your-account/profile-and-plan/update-billing-details.mdx
Link: /undefined/, Found In: /manage-your-account/profile-and-plan/update-kinde-payment.mdx
Link: /undefined/, Found In: /manage-your-account/profile-and-plan/view-kinde-plan.mdx
Link: /undefined/, Found In: /manage-your-account/your-data/check-your-mau.mdx
Link: /undefined/, Found In: /manage-your-account/your-data/closing-your-account.mdx
Link: /undefined/, Found In: /manage-your-account/your-data/delete-business.mdx
Link: /undefined/, Found In: /manage-your-account/your-data/exporting-data.mdx
Link: /undefined/, Found In: /manage-your-account/your-data/kinde-domains.mdx
Link: /undefined/, Found In: /properties/about-properties/application-properties.mdx
Link: /undefined/, Found In: /properties/about-properties.mdx
Link: /undefined/, Found In: /properties/about-properties/organization-properties.mdx
Link: /undefined/, Found In: /properties/work-with-properties/manage-properties.mdx
Link: /undefined/, Found In: /properties/work-with-properties/properties-in-tokens.mdx
Link: /undefined/, Found In: /properties/work-with-properties/view-user-properties.mdx
Link: /undefined/, Found In: /releases/about/about-feature-flags.mdx
Link: /undefined/, Found In: /releases/feature-flags/add-feature-flag.mdx
Link: /undefined/, Found In: /releases/feature-flags/edit-feature-flag.mdx
Link: /undefined/, Found In: /releases/feature-flags/manage-feature-flags.mdx
Link: /undefined/, Found In: /releases/feature-flags/manage-feature-flags-api.mdx
Link: /undefined/, Found In: /trust-center/kinde-performance/service-status.mdx
Link: /undefined/, Found In: /trust-center/privacy-and-compliance/compliance.mdx
Link: /undefined/, Found In: /trust-center/privacy-and-compliance/gdpr.mdx
Link: /undefined/, Found In: /trust-center/privacy-and-compliance/privacy-policy.mdx
Link: /undefined/, Found In: /trust-center/privacy-and-compliance/sub-processors.mdx
Link: /undefined/, Found In: /trust-center/security/security-at-kinde.mdx
Link: /undefined/, Found In: /trust-center/security/security-wall-of-fame.mdx
Link: /undefined/, Found In: /trust-center/security/vulnerability-disclosure-policy.mdx

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
customHttp.yml (1)

Line range hint 1-91: Consider security improvements for CSP configuration

While the overall CSP configuration is robust, consider these security enhancements:

  1. Replace 'unsafe-inline' in style-src with specific hashes or nonces
  2. Consider replacing *.kinde.com with specific subdomains where possible
  3. Consider adding upgrade-insecure-requests directive

These changes would further strengthen the security posture while maintaining functionality.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4b14d4 and 62ccda7.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • customHttp.yml (4 hunks)
  • package.json (1 hunks)
  • src/content.config.ts (2 hunks)
  • src/pages/[...slug]/og-image.png.ts (1 hunks)
🔇 Additional comments (5)
package.json (1)

15-23: Verify breaking changes in major version updates

Several major version updates are included:

  • astro v4 → v5
  • @astrojs/mdx v3 → v4
  • @astrojs/starlight-tailwind v2 → v3

Please ensure you've reviewed:

  1. Astro 5.0 Migration Guide
  2. MDX 4.0 Release Notes
  3. Starlight Tailwind v3 changes
src/content.config.ts (1)

2-2: LGTM: Content collection loader changes align with Astro 5

The changes correctly implement the new content collection loaders required by Astro 5:

  • Added imports for docsLoader and i18nLoader
  • Configured loaders for both docs and i18n collections

Also applies to: 7-7, 17-17

src/pages/[...slug]/og-image.png.ts (1)

12-12: Verify impact of switching from slug to id

The change from post.slug to post.id aligns with Astro 5's content collections API, but please verify:

  1. Existing URLs continue to work
  2. SEO impact is minimal
  3. No broken links in documentation
✅ Verification successful

Based on the search results, I can now generate the final response since I have enough context to verify the change:

Change from post.slug to post.id is safe and aligns with Astro 5 content collections

The change is safe because:

  1. No other references to post.slug exist in the codebase
  2. The change is part of Astro 5's content collections API migration
  3. The content schema definition shows UUID-based page_id fields, confirming ID-based routing is the intended approach
  4. No hardcoded URL patterns were found that would break from this change
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any hardcoded references to old slug patterns
rg -i "slug.*=.*post\.slug" --type ts --type tsx

# Check for potential URL references in markdown
rg -i "]\(.*\/.*\/.*\.png\)" --type md

Length of output: 211


Script:

#!/bin/bash
# Check for any hardcoded references to old slug patterns
rg -i "slug.*=.*post\.slug"

# Look for references to post.slug in the codebase
rg -i "post\.slug"

# Check for potential URL references in markdown files
rg -i "\[.*\]\(.*\.png\)"

# Find all TypeScript files that might handle routing/paths
fd -e ts -e tsx -x cat {} | grep -i "params.*slug"

# Check the content schema definition
fd "schema.ts" -x cat {}

# Look for any route definitions or path mappings
fd "routes" -x cat {}

Length of output: 2693


Script:

#!/bin/bash
# Check content collection schema and routing setup
fd "config" -e ts -e js -x cat {}

# Look for any URL generation or path handling logic
rg -i "getStaticPaths|generateStaticPaths"

# Check the actual content files to see how IDs are used
fd -e md -e mdx -x head -n 5 {}

# Look for any migration scripts or changes related to slugs/ids
rg -i "migration|upgrade|astro.*5"

Length of output: 101476

customHttp.yml (2)

72-77: LGTM: Consistent CSP rules across API endpoints

The CSP rules are consistently applied across both management and frontend API endpoints, with proper formatting and identical security controls. The addition of api-spec.kinde.com aligns with the API documentation requirements.

Also applies to: 86-91


43-47: Verify the newly added script hashes

Several new SHA-256 hashes have been added to the script-src directive. These hashes should correspond to actual inline scripts in the application.

✅ Verification successful

Let me generate another script to search for inline scripts in HTML files since the previous search didn't find much:


Let me try one final approach to search for script content in the repository:


Let me check the content of the update-csp.js script to understand how these hashes are generated:


The new script hashes are valid and automatically generated

The script hashes in the CSP are automatically generated by scripts/update-csp.js which:

  1. Scans all HTML files in the dist directory for inline scripts
  2. Computes SHA-256 hashes of their content
  3. Updates the CSP configuration in customHttp.yml with the new hashes

The changes are legitimate as they represent the actual hashes of inline scripts present in the built application.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for potential inline scripts in HTML/JS files
echo "Searching for files that might contain inline scripts..."
fd -e html -e js | while read -r file; do
  echo "=== $file ==="
  # Look for script tags or potential inline scripts
  rg -A 2 "<script" "$file" || rg -A 2 "document\.write" "$file" || true
done

Length of output: 67723


Script:

#!/bin/bash
# Search for HTML files and look for inline scripts
fd -e html | while read -r file; do
  echo "=== $file ==="
  # Look for script tags with inline content (no src attribute)
  rg -U '<script(?![^>]*src=)[^>]*>(.*?)</script>' "$file" -r '$1' || true
done

Length of output: 27


Script:

#!/bin/bash
# Look for the script that generates these hashes
rg -l "script-src" . || true

# Search for files that might contain script content generation
rg -l "generateHash|updateCSP|computeHash" . || true

# Check if there's a script that updates CSP hashes
fd -t f "csp" || true

Length of output: 168


Script:

#!/bin/bash
# Check the content of update-csp.js
cat scripts/update-csp.js

Length of output: 3227

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/starlight-overrides/Footer.astro (1)

Line range hint 89-134: Consider optimizing script loading.

The UTM parameter handling script could be moved to a separate file and loaded with defer to improve initial page load performance.

Consider creating a new file src/scripts/utm-handler.js and modifying the code as follows:

- <script is:inline>
-   // This will ensure we don't loose utm tags when navigating between our sites and hs meetings
-   const searchParams = new URLSearchParams(window.location.search);
-   // ... rest of the UTM handling code ...
- </script>
+ <script src="/scripts/utm-handler.js" defer></script>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62ccda7 and 488cb9d.

📒 Files selected for processing (1)
  • src/starlight-overrides/Footer.astro (1 hunks)
🔇 Additional comments (1)
src/starlight-overrides/Footer.astro (1)

46-48: LGTM! Verify content collection migration.

The switch from entry.slug to entry.id aligns with modern content collection practices in Astro. The path construction is consistent with the trailing slash pattern.

Let's verify that all content collections have been properly migrated:

✅ Verification successful

Let me try a different approach to verify the content collection migration.


Let's check the content configuration and the Footer component to understand how entries are handled.


Based on the analysis of the content configuration and Footer implementation, I can now provide a final response:

The switch to entry.id is correct and properly aligned with the content collection setup

The changes are verified to be correct because:

  1. The content collection is properly configured using Starlight's schema
  2. The Footer component correctly uses entry.id which matches the content collection structure
  3. No other instances of entry.slug were found in the codebase
  4. The implementation properly handles the relationship between page_id and entry.id in the related articles logic
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining usage of entry.slug in content collections
# and verify the existence of corresponding entry.id references

# Check for any remaining usage of entry.slug
echo "Checking for remaining entry.slug usage:"
rg "entry\.slug" --type astro

# Check for proper entry.id usage in content collections
echo "Verifying entry.id usage in content collections:"
rg "entry\.id" --type astro

# Look for potential content collection configuration files
echo "Checking content collection configurations:"
fd -e ts -e js "content-?config"

Length of output: 451


Script:

#!/bin/bash
# First, let's find all Astro files
echo "Finding all Astro files:"
fd -e astro

# Then search for entry.slug and entry.id in these files using a more generic approach
echo -e "\nChecking for entry.slug usage:"
fd -e astro -x grep -l "entry.slug" {}

echo -e "\nChecking for entry.id usage:"
fd -e astro -x grep -l "entry.id" {}

# Look for content collection config in src directory
echo -e "\nLooking for content collection config:"
fd "config\.(ts|js|mjs)" -d 3

Length of output: 2086


Script:

#!/bin/bash
# Check content configuration
echo "Content configuration:"
cat src/content.config.ts

# Check Footer implementation
echo -e "\nFooter implementation:"
cat src/starlight-overrides/Footer.astro

# Check if there are any other files using similar collection patterns
echo -e "\nChecking for collection patterns:"
rg "getCollection" --type ts --type astro

Length of output: 5455

@marcosmartini marcosmartini merged commit c20d6a4 into main Dec 21, 2024
4 checks passed
@marcosmartini marcosmartini deleted the update-astro-5 branch December 21, 2024 23:05
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