Merge pull request #14312 from backstage/freben/circ
get rid of circular imports
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
import { AuthenticationError } from '@backstage/errors';
|
||||
import {
|
||||
@@ -24,12 +25,12 @@ import {
|
||||
jwtVerify,
|
||||
} from 'jose';
|
||||
import { GetKeyFunction } from 'jose/dist/types/types';
|
||||
|
||||
import {
|
||||
BackstageIdentityResponse,
|
||||
IdentityApiGetIdentityRequest,
|
||||
} from './types';
|
||||
import { getBearerTokenFromAuthorizationHeader, IdentityApi } from '.';
|
||||
import { getBearerTokenFromAuthorizationHeader } from './getBearerTokenFromAuthorizationHeader';
|
||||
import { IdentityApi } from './IdentityApi';
|
||||
|
||||
const CLOCK_MARGIN_S = 10;
|
||||
|
||||
|
||||
+1
-1
@@ -30,8 +30,8 @@ import {
|
||||
import { setupServer } from 'msw/node';
|
||||
import { DateTime } from 'luxon';
|
||||
import { siteMock } from '../../mocks/mocks';
|
||||
import { azureSiteApiRef } from '../..';
|
||||
import { AzureSitesOverviewTable } from './AzureSitesOverviewTable';
|
||||
import { azureSiteApiRef } from '../../api';
|
||||
|
||||
const errorApiMock = { post: jest.fn(), error$: jest.fn() };
|
||||
const identityApiMock = (getCredentials: any) => ({
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
|
||||
import React from 'react';
|
||||
import { googleAuthApiRef, storageApiRef } from '@backstage/core-plugin-api';
|
||||
import {
|
||||
MockStorageApi,
|
||||
TestApiProvider,
|
||||
renderInTestApp,
|
||||
} from '@backstage/test-utils';
|
||||
|
||||
import { HomePageCalendar } from '.';
|
||||
import { gcalendarApiRef, gcalendarPlugin } from '../..';
|
||||
import { HomePageCalendar } from './HomePageCalendar';
|
||||
import { gcalendarApiRef } from '../../api';
|
||||
import { gcalendarPlugin } from '../../plugin';
|
||||
|
||||
describe('<HomePageCalendar />', () => {
|
||||
const primaryCalendar = {
|
||||
|
||||
@@ -13,13 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { Box, Button, styled } from '@material-ui/core';
|
||||
|
||||
import { CalendarEvent } from './CalendarEvent';
|
||||
import { eventsMock } from './signInEventMock';
|
||||
import { GCalendarEvent } from '../..';
|
||||
import { GCalendarEvent } from '../../api';
|
||||
|
||||
type Props = {
|
||||
handleAuthClick: React.MouseEventHandler<HTMLElement>;
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import {
|
||||
Link,
|
||||
} from '@backstage/core-components';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { periskopApiRef } from '../..';
|
||||
import { periskopApiRef } from '../../plugin';
|
||||
import { AggregatedError, NotFoundInInstance } from '../../types';
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
*/
|
||||
|
||||
import { JsonPrimitive } from '@backstage/types';
|
||||
import { ResourcePermission } from '.';
|
||||
import { Permission } from './permission';
|
||||
import { Permission, ResourcePermission } from './permission';
|
||||
|
||||
/**
|
||||
* A request with a UUID identifier, so that batched responses can be matched up with the original
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import {
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { PassThrough } from 'stream';
|
||||
import { TemplateAction } from '../..';
|
||||
import { TemplateAction } from '../../types';
|
||||
|
||||
const mockOctokit = {
|
||||
rest: {
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import {
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import { PassThrough } from 'stream';
|
||||
import { TemplateAction } from '../..';
|
||||
import { TemplateAction } from '../../types';
|
||||
|
||||
const mockOctokit = {
|
||||
rest: {
|
||||
|
||||
@@ -13,20 +13,21 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { JsonObject, Observable } from '@backstage/types';
|
||||
import ObservableImpl from 'zen-observable';
|
||||
|
||||
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
||||
import { JsonObject, Observable } from '@backstage/types';
|
||||
import { Logger } from 'winston';
|
||||
import ObservableImpl from 'zen-observable';
|
||||
import {
|
||||
SerializedTask,
|
||||
SerializedTaskEvent,
|
||||
TaskBroker,
|
||||
TaskBrokerDispatchOptions,
|
||||
TaskCompletionState,
|
||||
TaskContext,
|
||||
TaskSecrets,
|
||||
TaskStore,
|
||||
TaskBroker,
|
||||
SerializedTaskEvent,
|
||||
SerializedTask,
|
||||
} from './types';
|
||||
import { TaskBrokerDispatchOptions } from '.';
|
||||
|
||||
/**
|
||||
* TaskManager
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
import express from 'express';
|
||||
import request from 'supertest';
|
||||
import { createCacheMiddleware, TechDocsCache } from '.';
|
||||
import { createCacheMiddleware } from './cacheMiddleware';
|
||||
import { TechDocsCache } from './TechDocsCache';
|
||||
|
||||
/**
|
||||
* Mocks cached HTTP response.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { Transformer } from './index';
|
||||
import type { Transformer } from './transformer';
|
||||
import {
|
||||
replaceGithubUrlType,
|
||||
ScmIntegrationRegistry,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { Transformer } from './index';
|
||||
import type { Transformer } from './transformer';
|
||||
import MenuIcon from '@material-ui/icons/Menu';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { scrollIntoNavigation } from '.';
|
||||
import { scrollIntoNavigation } from './scrollIntoNavigation';
|
||||
import { createTestShadowDom, FIXTURES } from '../../test-utils';
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { formatDuration } from '.';
|
||||
import { formatDuration } from './format';
|
||||
import { BuildCount, BuildTime } from '../api';
|
||||
|
||||
export const getErrorRatios = (buildCounts?: BuildCount[]) => {
|
||||
|
||||
Reference in New Issue
Block a user