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

fix: prettier #2765

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export type AdminObjectGrantInfo = AdminObjectGrantInfoFragment;

@injectable()
export class PermissionsResource extends CachedMapResource<string, PermissionInfo> {
constructor(private readonly graphQLService: GraphQLService, sessionDataResource: SessionDataResource) {
constructor(
private readonly graphQLService: GraphQLService,
sessionDataResource: SessionDataResource,
) {
super();

this.sync(
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-authentication/src/AppAuthService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export class AppAuthService extends Bootstrap {

readonly auth: IExecutor<boolean>;

constructor(private readonly serverConfigResource: ServerConfigResource, private readonly userInfoResource: UserInfoResource) {
constructor(
private readonly serverConfigResource: ServerConfigResource,
private readonly userInfoResource: UserInfoResource,
) {
super();
this.auth = new Executor();
this.userInfoResource.onDataUpdate.addHandler(this.authUser.bind(this));
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-authentication/src/AuthRolesResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { GraphQLService } from '@cloudbeaver/core-sdk';

@injectable()
export class AuthRolesResource extends CachedDataResource<string[]> {
constructor(private readonly graphQLService: GraphQLService, sessionPermissionsResource: SessionPermissionsResource) {
constructor(
private readonly graphQLService: GraphQLService,
sessionPermissionsResource: SessionPermissionsResource,
) {
super(() => []);

sessionPermissionsResource.require(this, EAdminPermission.admin).outdateResource(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export class PasswordPolicyService {
};
}

constructor(private readonly serverConfigResource: ServerConfigResource, private readonly localizationService: LocalizationService) {
constructor(
private readonly serverConfigResource: ServerConfigResource,
private readonly localizationService: LocalizationService,
) {
makeObservable(this, {
config: computed,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export type TeamMetaParameter = ObjectPropertyInfo;

@injectable()
export class TeamMetaParametersResource extends CachedDataResource<TeamMetaParameter[]> {
constructor(private readonly graphQLService: GraphQLService, sessionResource: SessionResource) {
constructor(
private readonly graphQLService: GraphQLService,
sessionResource: SessionResource,
) {
super(() => []);

this.sync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export interface IUserMetaParameterOptions {

@injectable()
export class UserMetaParametersResource extends CachedDataResource<UserMetaParameter[]> {
constructor(private readonly graphQLService: GraphQLService, sessionResource: SessionResource, userInfoResource: UserInfoResource) {
constructor(
private readonly graphQLService: GraphQLService,
sessionResource: SessionResource,
userInfoResource: UserInfoResource,
) {
super(() => []);

this.sync(
Expand Down
4 changes: 1 addition & 3 deletions webapp/packages/core-blocks/src/useExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,5 @@
executor.removeBefore(before);
}
};
}, [
executor, props.handlers?.length, props.postHandlers?.length, before, next,
]);
}, [executor, props.handlers?.length, props.postHandlers?.length, before, next]);

Check warning on line 77 in webapp/packages/core-blocks/src/useExecutor.ts

View check run for this annotation

Jenkins-CI-integration / CheckStyle TypeScript Report

webapp/packages/core-blocks/src/useExecutor.ts#L77

React Hook useEffect has missing dependencies: props.handlers and props.postHandlers. Either include them or remove the dependency array. (react-hooks/exhaustive-deps)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export type DatabaseAuthModel = DatabaseAuthModelBase;

@injectable()
export class DatabaseAuthModelsResource extends CachedMapResource<string, DatabaseAuthModel> {
constructor(private readonly graphQLService: GraphQLService, serverConfigResource: ServerConfigResource) {
constructor(
private readonly graphQLService: GraphQLService,
serverConfigResource: ServerConfigResource,
) {
super();
this.sync(
serverConfigResource,
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-executor/src/ExecutionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export class ExecutionContext<TData> implements IExecutionContext<TData> {
readonly contexts: Map<IContextLoader<any, TData>, any>;
readonly contextCreators: Map<IContextLoader<any, TData>, IContextLoader<any, TData>>;

constructor(private readonly data: TData, context?: IExecutionContext<any>) {
constructor(
private readonly data: TData,
context?: IExecutionContext<any>,
) {
this.contexts = context?.contexts || new Map();
this.contextCreators = context?.contextCreators ?? new Map();
}
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-executor/src/Executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export class Executor<T = void> extends ExecutorHandlersCollection<T> implements

private readonly scheduler: TaskScheduler<T>;

constructor(private readonly defaultData: T | null = null, isBlocked: BlockedExecution<T> | null = null) {
constructor(
private readonly defaultData: T | null = null,
isBlocked: BlockedExecution<T> | null = null,
) {
super();
this.scheduler = new TaskScheduler(isBlocked);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { GraphQLService } from '@cloudbeaver/core-sdk';

@injectable()
export class ProjectPermissionsResource extends CachedDataResource<PermissionInfo[]> {
constructor(private readonly graphQLService: GraphQLService, permissionsResource: SessionPermissionsResource) {
constructor(
private readonly graphQLService: GraphQLService,
permissionsResource: SessionPermissionsResource,
) {
super(() => []);

permissionsResource.require(this, EAdminPermission.admin).outdateResource(this);
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-root/src/FeaturesResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export type ApplicationFeature = WebFeatureSet;
@injectable()
export class FeaturesResource extends CachedDataResource<ApplicationFeature[]> {
private baseFeatures: string[];
constructor(private readonly graphQLService: GraphQLService, permissionsResource: SessionPermissionsResource) {
constructor(
private readonly graphQLService: GraphQLService,
permissionsResource: SessionPermissionsResource,
) {
super(() => []);

this.baseFeatures = [];
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-root/src/ServerNodeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import { ServerEventId, SessionEventSource } from './SessionEventSource';
export class ServerNodeService extends Dependency {
private applicationRunId: string | null;
onApplicationRunIdChange: IExecutor;
constructor(private readonly graphQLService: GraphQLService, private readonly sessionEventSource: SessionEventSource) {
constructor(
private readonly graphQLService: GraphQLService,
private readonly sessionEventSource: SessionEventSource,
) {
super();
this.onApplicationRunIdChange = new Executor();
this.applicationRunId = null;
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-root/src/SessionExpireEventService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { SessionExpireService } from './SessionExpireService';

@injectable()
export class SessionExpireEventService extends Dependency {
constructor(private readonly sessionEventSource: SessionEventSource, private readonly sessionExpireService: SessionExpireService) {
constructor(
private readonly sessionEventSource: SessionEventSource,
private readonly sessionExpireService: SessionExpireService,
) {
super();
this.sessionEventSource.onEvent<WsSessionExpiredEvent>(ServerEventId.CbSessionExpired, () => {
this.onSessionExpireEvent();
Expand Down
6 changes: 5 additions & 1 deletion webapp/packages/core-utils/src/LoadingError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
*/

export class LoadingError extends Error {
constructor(private readonly onRefresh: () => void, message?: string, options?: ErrorOptions) {
constructor(
private readonly onRefresh: () => void,
message?: string,
options?: ErrorOptions,
) {
super(message, options);
this.name = 'Loading Error';
this.refresh = this.refresh.bind(this);
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/core-utils/src/TempMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export class TempMap<TKey, TValue> implements Map<TKey, TValue> {
private readonly valuesTemp: ICachedValueObject<TValue[]>;
private readonly entriesTemp: ICachedValueObject<[TKey, TValue][]>;

constructor(private readonly target: Map<TKey, TValue>, private readonly onSync?: () => void) {
constructor(
private readonly target: Map<TKey, TValue>,
private readonly onSync?: () => void,
) {
this.temp = new Map();
this.flushTask = null;
this.deleted = new Map();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ export class TemplateConnectionsService {
// );
return [];
}
constructor(private readonly templateConnectionsResource: TemplateConnectionsResource, private readonly projectsService: ProjectsService) {}
constructor(
private readonly templateConnectionsResource: TemplateConnectionsResource,
private readonly projectsService: ProjectsService,
) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export interface ExportProcess {
export class DataExportProcessService {
readonly exportProcesses = new OrderedMap<string, ExportProcess>(value => value.taskId);

constructor(private readonly graphQLService: GraphQLService, private readonly notificationService: NotificationService) {}
constructor(
private readonly graphQLService: GraphQLService,
private readonly notificationService: NotificationService,
) {}

async cancel(exportId: string): Promise<void> {
const process = this.exportProcesses.get(exportId);
Expand Down
5 changes: 4 additions & 1 deletion webapp/packages/plugin-data-export/src/DataExportService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ import type { IExportContext } from './IExportContext';

@injectable()
export class DataExportService {
constructor(private readonly notificationService: NotificationService, private readonly dataExportProcessService: DataExportProcessService) {}
constructor(
private readonly notificationService: NotificationService,
private readonly dataExportProcessService: DataExportProcessService,
) {}

async cancel(exportId: string): Promise<void> {
await this.dataExportProcessService.cancel(exportId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { DataTransferProcessorInfo, GraphQLService } from '@cloudbeaver/core-sdk

@injectable()
export class DataTransferProcessorsResource extends CachedMapResource<string, DataTransferProcessorInfo> {
constructor(private readonly graphQLService: GraphQLService, serverConfigResource: ServerConfigResource) {
constructor(
private readonly graphQLService: GraphQLService,
serverConfigResource: ServerConfigResource,
) {
super(() => new Map());
this.sync(
serverConfigResource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export class ExportFromContainerProcess extends Deferred<string> {
private timeout?: CancellablePromise<void>;
private isCancelConfirmed = false; // true when server successfully executed cancelQueryAsync

constructor(private readonly graphQLService: GraphQLService, private readonly notificationService: NotificationService) {
constructor(
private readonly graphQLService: GraphQLService,
private readonly notificationService: NotificationService,
) {
super();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export class ExportFromResultsProcess extends Deferred<string> {
private timeout?: CancellablePromise<void>;
private isCancelConfirmed = false; // true when server successfully executed cancelQueryAsync

constructor(private readonly graphQLService: GraphQLService, private readonly notificationService: NotificationService) {
constructor(
private readonly graphQLService: GraphQLService,
private readonly notificationService: NotificationService,
) {
super();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export const DEFAULT_GROUPING_QUERY_OPERATION = 'COUNT(*)';
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
export const DEFAULT_GROUPING_QUERY_OPERATION = 'COUNT(*)';
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export class ResourceManagerService {
return !!this.serverConfigResource.data?.resourceManagerEnabled && !!this.authInfoService.userInfo;
}

constructor(private readonly authInfoService: AuthInfoService, private readonly serverConfigResource: ServerConfigResource) {
constructor(
private readonly authInfoService: AuthInfoService,
private readonly serverConfigResource: ServerConfigResource,
) {
makeObservable(this, {
enabled: computed,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import type { AdministrationItemDrawerProps } from '@cloudbeaver/core-administration';
import { Translate } from '@cloudbeaver/core-blocks';
import { TabIcon, Tab, TabTitle } from '@cloudbeaver/core-ui';
import { Tab, TabIcon, TabTitle } from '@cloudbeaver/core-ui';

export const SettingsDrawerItem: React.FC<AdministrationItemDrawerProps> = function SettingsDrawerItem({ item, onSelect, disabled }) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { ResourceSqlDataSource } from './ResourceSqlDataSource';

@injectable()
export class SqlEditorTabResourceService {
constructor(private readonly sqlEditorTabService: SqlEditorTabService, private readonly sqlDataSourceService: SqlDataSourceService) {}
constructor(
private readonly sqlEditorTabService: SqlEditorTabService,
private readonly sqlDataSourceService: SqlDataSourceService,
) {}

getResourceTab(key: string) {
const dataSource = this.sqlDataSourceService.dataSources.find(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import type { SqlDialectInfo } from '@cloudbeaver/core-sdk';

@injectable()
export class SqlDialectInfoService {
constructor(private readonly connectionDialectResource: ConnectionDialectResource, private readonly notificationService: NotificationService) {}
constructor(
private readonly connectionDialectResource: ConnectionDialectResource,
private readonly notificationService: NotificationService,
) {}

async formatScript(context: IConnectionExecutionContextInfo, query: string): Promise<string> {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { ITaskDescriptor, TaskManagerService } from '@cloudbeaver/core-task-mana
@injectable()
export class TaskManagerPluginBootstrap extends Bootstrap {
private notification: IProcessNotificationContainer<ProcessSnackbarProps> | null;
constructor(private readonly taskManagerService: TaskManagerService, private readonly notificationService: NotificationService) {
constructor(
private readonly taskManagerService: TaskManagerService,
private readonly notificationService: NotificationService,
) {
super();
this.notification = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const VersionUpdateDrawerItem = importLazyComponent(() => import('./VersionUpdat

@injectable()
export class PluginBootstrap extends Bootstrap {
constructor(private readonly administrationItemService: AdministrationItemService, private readonly versionUpdateService: VersionUpdateService) {
constructor(
private readonly administrationItemService: AdministrationItemService,
private readonly versionUpdateService: VersionUpdateService,
) {
super();
}

Expand Down
Loading