Skip to content
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

Feature/fe examples #323

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Feature/fe examples #323

merged 2 commits into from
Jul 8, 2024

Conversation

nikcio
Copy link
Owner

@nikcio nikcio commented Jul 8, 2024

No description provided.

Copy link

gitguardian bot commented Jul 8, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
8962760 Triggered Username Password 9c3ec1d src/Examples/appsettings.Development.json View secret
8962761 Triggered Generic Password 9c3ec1d src/Examples/appsettings.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

Change in average Code Health of affected files: -0.08 (10.00 -> 9.92)

  • Declining Code Health: 3 findings(s) 🚩

View detailed results in CodeScene

@@ -0,0 +1,252 @@
import { graphql } from '@/gql';

Choose a reason for hiding this comment

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

❌ New issue: Complex Method
Home has a cyclomatic complexity of 10, threshold = 10

Suppress

Comment on lines +52 to +67
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
fragmentNode: TypedDocumentNode<TFrag>,
data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined
): data is FragmentType<typeof fragmentNode> {
const deferredFields = (queryNode as { __meta__?: { deferredFields: Record<string, (keyof TFrag)[]> } }).__meta__
?.deferredFields;

if (!deferredFields) return true;

const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined;
const fragName = fragDef?.name?.value;

const fields = (fragName && deferredFields[fragName]) || [];
return fields.length > 0 && fields.every(field => data && field in data);
}

Choose a reason for hiding this comment

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

❌ New issue: Complex Method
isFragmentReady has a cyclomatic complexity of 9, threshold = 9

Suppress

Comment on lines +45 to +73
const createToken = async (scope: UHeadlessScopes[]) => {
const tokenKey = scope.join(',');
if (tokenMap.has(tokenKey)) {
const token = tokenMap.get(tokenKey);

if (!token){
throw new Error('Failed to create token. API responed with no data');
}

if (!isTokenExpired(token)) {
return token;
}
}

const { data, error } = await tokenClient.mutation(createTokenQuery, { scope });

if (error) {
console.error(error);
throw new Error('Failed to create token. API responed with:', error);
}

if (!data) {
throw new Error('Failed to create token. API responed with no data');
}

tokenMap.set(tokenKey, data);

return data;
};

Choose a reason for hiding this comment

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

❌ New issue: Complex Method
createToken has a cyclomatic complexity of 9, threshold = 9

Suppress

Copy link

sonarcloud bot commented Jul 8, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
36.8% Duplication on New Code (required ≤ 5%)

See analysis details on SonarCloud

@nikcio nikcio merged commit 246947d into contrib Jul 8, 2024
7 checks passed
@nikcio nikcio deleted the feature/fe-examples branch July 8, 2024 19:16
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