chore(twenty-server): remove eslint warn + add maxWarning 0 (#10103)
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Module } from '@nestjs/core/injector/module';
|
||||
|
||||
import { isDefined } from 'twenty-shared';
|
||||
|
||||
import { WorkspaceQueryHookInstance } from 'src/engine/api/graphql/workspace-query-runner/workspace-query-hook/interfaces/workspace-query-hook.interface';
|
||||
import { WorkspaceResolverBuilderMethodNames } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
@ -48,9 +50,13 @@ export class WorkspaceQueryHookStorage {
|
||||
throw new Error(`Can't split workspace query hook key: ${key}`);
|
||||
}
|
||||
|
||||
// Retrive wildcard pre-hook instances
|
||||
if (this.preHookInstances.has(`*.${methodName}`)) {
|
||||
wildcardInstances = this.preHookInstances.get(`*.${methodName}`)!;
|
||||
// Retrieve wildcard pre-hook instances
|
||||
const wildcardPrehooksInstance = this.preHookInstances.get(
|
||||
`*.${methodName}`,
|
||||
);
|
||||
|
||||
if (isDefined(wildcardPrehooksInstance)) {
|
||||
wildcardInstances = wildcardPrehooksInstance;
|
||||
}
|
||||
|
||||
return [...wildcardInstances, ...(this.preHookInstances.get(key) ?? [])];
|
||||
@ -80,9 +86,13 @@ export class WorkspaceQueryHookStorage {
|
||||
throw new Error(`Can't split workspace query hook key: ${key}`);
|
||||
}
|
||||
|
||||
// Retrive wildcard post-hook instances
|
||||
if (this.postHookInstances.has(`*.${methodName}`)) {
|
||||
wildcardInstances = this.postHookInstances.get(`*.${methodName}`)!;
|
||||
// Retrieve wildcard post-hook instances
|
||||
const wildcardPosthooksInstance = this.postHookInstances.get(
|
||||
`*.${methodName}`,
|
||||
);
|
||||
|
||||
if (isDefined(wildcardPosthooksInstance)) {
|
||||
wildcardInstances = wildcardPosthooksInstance;
|
||||
}
|
||||
|
||||
return [...wildcardInstances, ...(this.postHookInstances.get(key) ?? [])];
|
||||
|
||||
@ -48,6 +48,7 @@ export class WorkspaceSchemaFactory {
|
||||
);
|
||||
|
||||
if (isNewRelationEnabled) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
chalk.yellow('🚧 New relation schema generation is enabled 🚧'),
|
||||
);
|
||||
@ -84,6 +85,7 @@ export class WorkspaceSchemaFactory {
|
||||
(isNewRelationEnabled !== cachedIsNewRelationEnabled &&
|
||||
cachedIsNewRelationEnabled !== undefined)
|
||||
) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
chalk.yellow('Recomputing due to new relation feature flag'),
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user