-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed ts issues #339
fixed ts issues #339
Conversation
Reviewer's Guide by SourceryThis PR addresses TypeScript issues by making several syntax fixes and schema updates. The changes primarily involve adding missing commas in object literals and updating field names in GraphQL queries. ER diagram for updated GraphQL schemaerDiagram
QUERY {
String name
CursorPaginationIn pagination
SearchClusterMSv search
}
QUERY ||--o{ lastUpdatedBy : "has"
lastUpdatedBy {
String userEmail
String userId
}
note for QUERY "Removed 'kind' field from queries."
note for QUERY "Updated 'containerPort' to 'devicePort' in portMappings."
Class diagram for updated GraphQL queriesclassDiagram
class cliQueries {
+cli_createGlobalVPNDevice()
+cli_getDNSHostSuffix()
+cli_getMresOutputKeyValues()
+cli_getGlobalVpnDevice()
+cli_coreCheckNameAvailability()
+cli_getMresKeys()
+cli_listMreses()
+cli_getMresConfigsValues()
+cli_infraCheckNameAvailability()
+cli_getConfigSecretMap()
+cli_intercepExternalApp()
+cli_interceptApp()
+cli_removeDeviceIntercepts()
+cli_getEnvironment()
+cli_updateEnvironment()
+cli_cloneEnvironment()
+cli_getSecret()
+cli_getConfig()
+cli_listServices()
+cli_listServiceBindings()
+cli_createServiceIntercept()
+cli_deleteServiceIntercept()
+cli_listApps()
+cli_listConfigs()
+cli_listSecrets()
+cli_listEnvironments()
+cli_getKubeConfig()
+cli_listClusters()
+cli_listVPNDevices()
+cli_listAccounts()
+cli_getCurrentUser()
+cli_createRemoteLogin()
+cli_getRemoteLogin()
+cli_listAccountClusters()
+cli_getBYOKCluster()
+cli_createClusterReference()
+cli_deleteClusterReference()
+cli_clusterReferenceInstructions()
+cli_listImportedManagedResources()
}
note for cliQueries "Updated to fix TypeScript syntax issues by adding missing commas."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @tulsiojha - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
const instructions = JSON.parse( | ||
data.infrat_getBYOKClusterSetupInstructions[0].command | ||
data.infrat_getBYOKClusterSetupInstructions[0].command, | ||
); | ||
return instructions; |
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.
suggestion (code-quality): Inline variable that is immediately returned (inline-immediately-returned-variable
)
const instructions = JSON.parse( | |
data.infrat_getBYOKClusterSetupInstructions[0].command | |
data.infrat_getBYOKClusterSetupInstructions[0].command, | |
); | |
return instructions; | |
return JSON.parse( | |
data.infrat_getBYOKClusterSetupInstructions[0].command, | |
); | |
Explanation
Something that we often see in people's code is assigning to a result variableand then immediately returning it.
Returning the result directly shortens the code and removes an unnecessary
variable, reducing the mental load of reading the function.
Where intermediate variables can be useful is if they then get used as a
parameter or a condition, and the name can act like a comment on what the
variable represents. In the case where you're returning it from a function, the
function name is there to tell you what the result is, so the variable name
is unnecessary.
Summary by Sourcery
Fix TypeScript issues by adding missing commas in the cliQueries function definitions and remove the 'kind' field from several GraphQL queries related to cluster managed services.
Bug Fixes:
Enhancements: