Remove all dot-folder imports everywhere
We aren't supposed to import from '.' or '../..' etc; point to the actual node being imported instead. I did allow e.g. '../../bigfolder' however. Going all the way to the individual file could be done too, but is a matter of taste perhaps. Also ran Organize Imports on all the touched files :) No changeset since there are no functional changes at all - only the imports changed Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClusterDetails, KubernetesClustersSupplier } from '..';
|
||||
import { Config } from '@backstage/config';
|
||||
import { ClusterDetails, KubernetesClustersSupplier } from '../types/types';
|
||||
|
||||
export class ConfigClusterLocator implements KubernetesClustersSupplier {
|
||||
private readonly clusterDetails: ClusterDetails[];
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClusterDetails, KubernetesClustersSupplier } from '..';
|
||||
import { Config } from '@backstage/config';
|
||||
import * as container from '@google-cloud/container';
|
||||
import { ClusterDetails, KubernetesClustersSupplier } from '../types/types';
|
||||
|
||||
export class GkeClusterLocator implements KubernetesClustersSupplier {
|
||||
private readonly projectId: string;
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClusterDetails } from '..';
|
||||
import { Config } from '@backstage/config';
|
||||
import { ClusterDetails } from '../types/types';
|
||||
import { ConfigClusterLocator } from './ConfigClusterLocator';
|
||||
import { GkeClusterLocator } from './GkeClusterLocator';
|
||||
|
||||
|
||||
+3
-3
@@ -13,10 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { sign } from 'aws4';
|
||||
import { KubernetesAuthTranslator } from './types';
|
||||
import { ClusterDetails } from '..';
|
||||
import AWS, { Credentials } from 'aws-sdk';
|
||||
import { sign } from 'aws4';
|
||||
import { ClusterDetails } from '../types/types';
|
||||
import { KubernetesAuthTranslator } from './types';
|
||||
|
||||
const base64 = (str: string) =>
|
||||
Buffer.from(str.toString(), 'binary').toString('base64');
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClusterDetails, KubernetesServiceLocator } from '..';
|
||||
import { ClusterDetails, KubernetesServiceLocator } from '../types/types';
|
||||
|
||||
// This locator assumes that every service is located on every cluster
|
||||
// Therefore it will always return all clusters provided
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClusterDetails } from '..';
|
||||
import {
|
||||
AppsV1Api,
|
||||
AutoscalingV1Api,
|
||||
@@ -22,6 +21,7 @@ import {
|
||||
KubeConfig,
|
||||
NetworkingV1beta1Api,
|
||||
} from '@kubernetes/client-node';
|
||||
import { ClusterDetails } from '../types/types';
|
||||
|
||||
export class KubernetesClientProvider {
|
||||
// visible for testing
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { ObjectFetchParams } from '..';
|
||||
import { ObjectFetchParams } from '../types/types';
|
||||
import { KubernetesFanOutHandler } from './KubernetesFanOutHandler';
|
||||
|
||||
const fetchObjectsForService = jest.fn();
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { ObjectFetchParams } from '../types/types';
|
||||
import { KubernetesClientBasedFetcher } from './KubernetesFetcher';
|
||||
import { ObjectFetchParams } from '..';
|
||||
|
||||
describe('KubernetesClientProvider', () => {
|
||||
let clientMock: any;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import http from 'http';
|
||||
import {
|
||||
AppsV1Api,
|
||||
AutoscalingV1Api,
|
||||
@@ -27,20 +26,21 @@ import {
|
||||
V1Pod,
|
||||
V1ReplicaSet,
|
||||
} from '@kubernetes/client-node';
|
||||
import { KubernetesClientProvider } from './KubernetesClientProvider';
|
||||
import { V1Service } from '@kubernetes/client-node/dist/gen/model/v1Service';
|
||||
import http from 'http';
|
||||
import lodash, { Dictionary } from 'lodash';
|
||||
import { Logger } from 'winston';
|
||||
import {
|
||||
KubernetesFetcher,
|
||||
ClusterDetails,
|
||||
KubernetesObjectTypes,
|
||||
FetchResponse,
|
||||
FetchResponseWrapper,
|
||||
KubernetesFetchError,
|
||||
KubernetesErrorTypes,
|
||||
KubernetesFetcher,
|
||||
KubernetesFetchError,
|
||||
KubernetesObjectTypes,
|
||||
ObjectFetchParams,
|
||||
} from '..';
|
||||
import lodash, { Dictionary } from 'lodash';
|
||||
} from '../types/types';
|
||||
import { KubernetesClientProvider } from './KubernetesClientProvider';
|
||||
|
||||
export interface Clients {
|
||||
core: CoreV1Api;
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Config } from '@backstage/config';
|
||||
import express from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import { Logger } from 'winston';
|
||||
import { Config } from '@backstage/config';
|
||||
import { getCombinedClusterDetails } from '../cluster-locator';
|
||||
import { MultiTenantServiceLocator } from '../service-locator/MultiTenantServiceLocator';
|
||||
import { KubernetesClientBasedFetcher } from './KubernetesFetcher';
|
||||
import { KubernetesClientProvider } from './KubernetesClientProvider';
|
||||
import {
|
||||
ClusterDetails,
|
||||
KubernetesClustersSupplier,
|
||||
KubernetesRequestBody,
|
||||
KubernetesServiceLocator,
|
||||
ServiceLocatorMethod,
|
||||
ClusterDetails,
|
||||
KubernetesClustersSupplier,
|
||||
} from '..';
|
||||
import { getCombinedClusterDetails } from '../cluster-locator';
|
||||
} from '../types/types';
|
||||
import { KubernetesClientProvider } from './KubernetesClientProvider';
|
||||
import { KubernetesFanOutHandler } from './KubernetesFanOutHandler';
|
||||
import { KubernetesClientBasedFetcher } from './KubernetesFetcher';
|
||||
|
||||
export interface RouterOptions {
|
||||
logger: Logger;
|
||||
|
||||
Reference in New Issue
Block a user