You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ No issues found! Your code is sparkling clean! ✨
🗒️ View all ignored comments in this repo
The constraint 'TokenStoreType extends string' is too restrictive. It should likely be 'TokenStoreType extends string | object' to match the condition check in line 113 where TokenStoreType is checked against {}
Return type mismatch - the interface declares useUsers() returning ServerUser[] but the Team interface that this extends declares useUsers() returning TeamUser[]
There is a syntax error in the super constructor call due to the ellipsis operator used incorrectly. Objects aren't being merged correctly. This syntax usage can lead to runtime errors when trying to pass the merged object to 'super()'. Verify that the intended alterations to the object occur before or outside of the super() call if needed.
Throwing an error when no active span is found is too aggressive. The log function should gracefully fallback to console.log or another logging mechanism when there's no active span, since not all execution contexts will have an active span. This makes the code less resilient and could break functionality in non-traced environments.
Function sets backendContext with a new configuration but doesn't pass 'defaultProjectKeys'. Since defaultProjectKeys is required in the type definition and cannot be updated (throws error if tried to set), this will cause a type error.
The schema is using array syntax for pick() which is incorrect for Yup schemas. The pick() method in Yup expects individual arguments, not an array. Should be changed to: emailConfigSchema.pick('type', 'host', 'port', 'username', 'sender_name', 'sender_email')
Creating a refresh token with current timestamp as expiration means it expires immediately. Should set a future date for token expiration.
The 'tools' object is initialized as an empty object, even though 'tools' is presumably expected to contain tool definitions. This could cause the server capabilities to lack necessary tool configurations, thus potentially impacting functionalities that depend on certain tool setups.
'STACK_SECRET_SERVER_KEY' is potentially being included in every request header without checking its existence again here. Although it's checked during initialization, this could lead to security issues as it's exposed in all communications where the header is logged or captured.
When adding 'use client' directive at the beginning, it doesn't check if file.text already contains the 'use client' directive. This could lead to duplicate 'use client' directives if the file already has one.
This file needs to be updated to better reflect the different types of Stack apps and their initialization:
a. Update the code example at the bottom to include StackClientApp and StackAdminApp examples.
b. Expand the last paragraph discussing StackAdminApp. It currently states that it's "rarely used", but the code shows it's an integral part of project scaffolding and app creation.
c. Add explanation of StackAdminApp capabilities:
Project configuration management
API key creation and management
Project scaffolding and setup
User management with elevated permissions
d. Note that StackAdminApp requires a super secret admin key and should only be used in secure environments for administrative tasks.
Internal Implementation Changes (No Documentation Updates Required)
The following changes do not require documentation updates as they affect internal implementation details not documented in the public API:
a. Changes in packages/template/src/lib/auth.ts:
Modifications to the OAuth redirect URL construction process
Affected functions: signInWithOAuth, addNewOAuthProviderOrScope, and callOAuthCallback
The constructRedirectUrl function now requires an additional parameter
b. Changes in server-app-impl.ts:
Reordering of imports
Modified implementation of sendVerificationEmail and inviteUser methods
Removed error checks for callback URLs
Removed duplicate imports for ProjectPermissionDefinitionsCrud and ProjectPermissionsCrud
Please ensure these changes are reflected in the relevant documentation files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Add basic client library tests and refactor URL construction for improved error handling.
app.test.tsto test project scaffolding, user sign-up, and server user creation.general.test.tsas its functionality is now covered inapp.test.ts.createApp()injs-helpers.tsto initializeStackAdminApp,StackClientApp, andStackServerApp.constructRedirectUrl()inurl.tsto includecallbackUrlNameparameter for better error messages.signInWithOAuth(),addNewOAuthProviderOrScope(), andcallOAuthCallback()inauth.tsto use updatedconstructRedirectUrl()._StackClientAppImplIncompleteinclient-app-impl.tsto useconstructRedirectUrl()withcallbackUrlNamein various methods._StackServerAppImplIncompleteinserver-app-impl.tsto useconstructRedirectUrl()withcallbackUrlNamein various methods.This description was created by
for 2b24a64. It will automatically update as commits are pushed.