kinde-oss / kinde-auth-nextjs

Kinde NextJS SDK - authentication for server rendered apps
https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/
MIT License
157 stars 24 forks source link

chore: linting and build #199

Closed peterphanouvong closed 3 months ago

peterphanouvong commented 3 months ago

Explain your changes

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

coderabbitai[bot] commented 3 months ago

Walkthrough

The recent updates primarily involve cosmetic changes across various configuration files, components, and utility scripts. These adjustments aim to enhance code readability and consistency, such as modifying quotation marks, formatting import statements, and improving the structure of conditional expressions. Additionally, several Rollup configurations were updated to include new external dependencies, optimizing the build process without altering the core functionality of the application.

Changes

Files Change Summary
CHANGELOG.md Minor formatting updates for clarity and consistency.
clientConfig/rollup.config.js Added 'jwt-decode' and '@kinde-oss/kinde-typescript-sdk' to external dependencies.
componentConfig/rollup.config.js Introduced external property for react and @kinde-oss/kinde-typescript-sdk.
middlewareConfig/rollup.config.js Added external property for jwt-decode, @kinde-oss/kinde-typescript-sdk, and next/server.
playground/src/app/api/auth/[...kindeAuth]/route.ts Changed import quotation marks from double to single quotes, no functional changes.
playground/src/app/api/protected/route.ts Minor formatting changes, no functional changes.
playground/src/app/api/public/route.ts Altered import statement formatting, maintaining functionality.
playground/src/app/globals.css Changed quotation marks for --g-font-family, no impact on rendering.
playground/src/app/layout.tsx Adjusted string quotation marks, improved spacing, no functional changes.
playground/src/app/page.module.css Reformatted CSS transitions for improved readability.
playground/src/app/page.tsx Changed import quotation marks from double to single quotes.
serverConfig/rollup.config.js Added external dependencies: next/server, next/navigation, etc.
src/components/LoginLink.js Restructured variable assignments for clarity, no functionality changes.
src/components/LogoutLink.js Minor formatting adjustments in JSX, no functionality changes.
src/frontend/AuthProvider.jsx Reformatted imports and corrected semicolons for better readability.
src/frontend/KindeBrowserClient.js Adjusted formatting in setState calls for readability.
src/handlers/auth.js Updated import statement for NextRequest in JSDoc comment.
src/handlers/health.js Improved consistency in import statements and formatting.
src/handlers/logout.js Minor formatting adjustments, improved readability of postLogoutRedirectURL assignment.
src/middleware/index.js Standardized quotation marks in the export statement.
src/routerClients/AppRouterClient.js Removed direct import of NextRequest, using inline import in JSDoc instead.
src/utils/appRouter/setVerifierCookie.js Reformatted import statement for GLOBAL_COOKIE_OPTIONS, no functional changes.
src/utils/generateAuthUrl.js Added semicolon for login_hint assignment, no logic changes.
src/utils/pageRouter/setVerifierCookie.js Minor formatting changes, improved consistency.
src/utils/randomString.js Changed string quotations and adjusted indentation for consistency.
src/utils/sanitizeRedirect.js Enhanced formatting and consistency, no functionality changes.
src/utils/version.js Added semicolon at the end of export statement, no functional changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AuthProvider
    participant KindeSDK

    User->>AuthProvider: Request Authentication
    AuthProvider->>KindeSDK: Handle Authentication
    KindeSDK->>AuthProvider: Return Auth Response
    AuthProvider-->>User: Provide Auth Status

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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `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 generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@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 as 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 resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.