mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
chore: prettier project (#1800)
This commit is contained in:
@@ -9,7 +9,14 @@ import { action, makeObservable, observable } from 'mobx';
|
||||
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { ExecutorInterrupter } from '@cloudbeaver/core-executor';
|
||||
import { CachedDataResource, CachedResource, GraphQLService, NavigatorSettingsInput, ServerConfig as SDKServerConfig, ServerConfigInput } from '@cloudbeaver/core-sdk';
|
||||
import {
|
||||
CachedDataResource,
|
||||
CachedResource,
|
||||
GraphQLService,
|
||||
NavigatorSettingsInput,
|
||||
ServerConfig as SDKServerConfig,
|
||||
ServerConfigInput,
|
||||
} from '@cloudbeaver/core-sdk';
|
||||
import { isArraysEqual } from '@cloudbeaver/core-utils';
|
||||
|
||||
import { isNavigatorViewSettingsEqual } from './ConnectionNavigatorViewSettings';
|
||||
@@ -69,7 +76,7 @@ export class ServerConfigResource extends CachedDataResource<ServerConfig | null
|
||||
}
|
||||
|
||||
requirePublic<T>(resource: CachedResource<any, any, T, any, any>, map?: (param: void) => T): this {
|
||||
resource.preloadResource(this, () => { }).before(ExecutorInterrupter.interrupter(() => this.publicDisabled));
|
||||
resource.preloadResource(this, () => {}).before(ExecutorInterrupter.interrupter(() => this.publicDisabled));
|
||||
|
||||
this.outdateResource<T>(resource, map as any);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
import axios, { AxiosProgressEvent, AxiosResponse, isAxiosError } from 'axios';
|
||||
import { ClientError, GraphQLClient, resolveRequestDocument, RequestDocument, RequestOptions, Variables } from 'graphql-request';
|
||||
import { ClientError, GraphQLClient, RequestDocument, RequestOptions, resolveRequestDocument, Variables } from 'graphql-request';
|
||||
|
||||
import { GQLError } from './GQLError';
|
||||
import type { IResponseInterceptor } from './IResponseInterceptor';
|
||||
@@ -211,4 +211,4 @@ function parseRequestArgs<V extends Variables = Variables>(
|
||||
requestHeaders,
|
||||
signal: undefined,
|
||||
} as unknown as RequestOptions<V>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,5 +7,8 @@
|
||||
*/
|
||||
|
||||
export function createPath(...names: Array<string | undefined>): string {
|
||||
return names.filter(Boolean).map((name, i) => i === 0 ? name!.replace(/\/$/, '') : name!.replace(/^\/|\/$/g, '')).join('/');
|
||||
return names
|
||||
.filter(Boolean)
|
||||
.map((name, i) => (i === 0 ? name!.replace(/\/$/, '') : name!.replace(/^\/|\/$/g, '')))
|
||||
.join('/');
|
||||
}
|
||||
|
||||
@@ -3,7 +3,19 @@ import { pluginD3js } from './manifest';
|
||||
export default pluginD3js;
|
||||
|
||||
export {
|
||||
select, line, curveBundle, zoom, zoomTransform, zoomIdentity, drag, format,
|
||||
scaleBand, max, scaleLinear, interpolateRound, axisBottom, axisLeft
|
||||
select,
|
||||
line,
|
||||
curveBundle,
|
||||
zoom,
|
||||
zoomTransform,
|
||||
zoomIdentity,
|
||||
drag,
|
||||
format,
|
||||
scaleBand,
|
||||
max,
|
||||
scaleLinear,
|
||||
interpolateRound,
|
||||
axisBottom,
|
||||
axisLeft,
|
||||
} from 'd3';
|
||||
export type { Selection, ZoomBehavior, Line, DragBehavior, SubjectPosition } from 'd3';
|
||||
export type { Selection, ZoomBehavior, Line, DragBehavior, SubjectPosition } from 'd3';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { navigationTreeRMPlugin } from './manifest';
|
||||
|
||||
export * from './NavNodes/getResourceKeyFromNodeId';
|
||||
export * from './NavNodes/getResourceNodeId';
|
||||
export * from './NavNodes/getRmProjectNodeId';
|
||||
|
||||
@@ -8,16 +8,11 @@
|
||||
import type { PluginManifest } from '@cloudbeaver/core-di';
|
||||
|
||||
import { LocaleService } from './LocaleService';
|
||||
import { NavTreeRMContextMenuService } from './NavTreeRMContextMenuService';
|
||||
import { ResourceFoldersBootstrap } from './NavNodes/ResourceFoldersBootstrap';
|
||||
import { NavResourceNodeService } from './NavResourceNodeService';
|
||||
import { NavTreeRMContextMenuService } from './NavTreeRMContextMenuService';
|
||||
|
||||
export const navigationTreeRMPlugin: PluginManifest = {
|
||||
info: { name: 'Navigation Tree RM plugin' },
|
||||
providers: [
|
||||
LocaleService,
|
||||
NavResourceNodeService,
|
||||
ResourceFoldersBootstrap,
|
||||
NavTreeRMContextMenuService
|
||||
],
|
||||
providers: [LocaleService, NavResourceNodeService, ResourceFoldersBootstrap, NavTreeRMContextMenuService],
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ export const FolderDialog: DialogComponent<FolderDialogPayload, IFolderDialogRes
|
||||
state.setMessage(message);
|
||||
}
|
||||
});
|
||||
} catch { }
|
||||
} catch {}
|
||||
|
||||
if (state.folder === folder && state.value === value && state.projectId === projectId) {
|
||||
state.valid = valid ?? true;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { createAction } from '@cloudbeaver/core-view';
|
||||
|
||||
export const ACTION_SAVE_AS_SCRIPT = createAction('save-as-script', {
|
||||
|
||||
+2
-1
@@ -27,6 +27,7 @@ import { SqlEditorTabService } from '@cloudbeaver/plugin-sql-editor-navigation-t
|
||||
import type { IResourceSqlDataSourceState } from './IResourceSqlDataSourceState';
|
||||
import { ResourceSqlDataSource } from './ResourceSqlDataSource';
|
||||
import { SqlEditorTabResourceService } from './SqlEditorTabResourceService';
|
||||
|
||||
const RESOURCE_TAB_STATE = 'sql_editor_resource_tab_state';
|
||||
const SYNC_DELAY = 5 * 60 * 1000;
|
||||
|
||||
@@ -170,7 +171,7 @@ export class ResourceSqlDataSourceBootstrap extends Bootstrap {
|
||||
});
|
||||
}
|
||||
|
||||
load(): void | Promise<void> { }
|
||||
load(): void | Promise<void> {}
|
||||
|
||||
private createState(editorId: string, resourceKey?: string): IResourceSqlDataSourceState {
|
||||
let state = this.dataSourceStateState.get(editorId);
|
||||
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
import { injectable } from '@cloudbeaver/core-di';
|
||||
import { NotificationService } from '@cloudbeaver/core-events';
|
||||
import { ISyncExecutor, SyncExecutor } from '@cloudbeaver/core-executor';
|
||||
import { CachedMapAllKey, GraphQLService, SqlCompletionProposal, SqlScriptInfoFragment } from '@cloudbeaver/core-sdk';
|
||||
import { FEATURE_GIT_ID, ServerConfigResource } from '@cloudbeaver/core-root';
|
||||
import { CachedMapAllKey, GraphQLService, SqlCompletionProposal, SqlScriptInfoFragment } from '@cloudbeaver/core-sdk';
|
||||
|
||||
import { getSqlEditorName } from './getSqlEditorName';
|
||||
import type { ISqlEditorTabState } from './ISqlEditorTabState';
|
||||
|
||||
Reference in New Issue
Block a user