apply core-imports codemod to all packages and plugins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { parseLocationReference } from '@backstage/catalog-model';
|
||||
import { createApiRef, OAuthApi } from '@backstage/core';
|
||||
import { InputError } from '@backstage/errors';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { graphql } from '@octokit/graphql';
|
||||
import { createApiRef, OAuthApi } from '@backstage/core-plugin-api';
|
||||
|
||||
const getBaseUrl = (
|
||||
scmIntegrationsApi: ScmIntegrationRegistry,
|
||||
|
||||
@@ -14,15 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {
|
||||
ApiProvider,
|
||||
ApiRegistry,
|
||||
errorApiRef,
|
||||
configApiRef,
|
||||
ConfigReader,
|
||||
ConfigApi,
|
||||
OAuthApi,
|
||||
} from '@backstage/core';
|
||||
|
||||
import { fireEvent } from '@testing-library/react';
|
||||
import { msw, renderInTestApp } from '@backstage/test-utils';
|
||||
@@ -48,6 +39,18 @@ import { Entity } from '@backstage/catalog-model';
|
||||
import { GithubDeploymentsTable } from './GithubDeploymentsTable';
|
||||
import { Box } from '@material-ui/core';
|
||||
|
||||
import {
|
||||
ApiProvider,
|
||||
ApiRegistry,
|
||||
ConfigReader,
|
||||
} from '@backstage/core-app-api';
|
||||
import {
|
||||
errorApiRef,
|
||||
configApiRef,
|
||||
ConfigApi,
|
||||
OAuthApi,
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
let entity: { entity: Entity };
|
||||
|
||||
jest.mock('@backstage/plugin-catalog-react', () => ({
|
||||
|
||||
@@ -14,12 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import {
|
||||
MissingAnnotationEmptyState,
|
||||
ResponseErrorPanel,
|
||||
TableColumn,
|
||||
useApi,
|
||||
} from '@backstage/core';
|
||||
import { useAsyncRetry } from 'react-use';
|
||||
import { GithubDeployment, githubDeploymentsApiRef } from '../api';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
@@ -33,6 +27,13 @@ import {
|
||||
SOURCE_LOCATION_ANNOTATION,
|
||||
} from '@backstage/catalog-model';
|
||||
|
||||
import {
|
||||
MissingAnnotationEmptyState,
|
||||
ResponseErrorPanel,
|
||||
TableColumn,
|
||||
} from '@backstage/core-components';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
|
||||
const GithubDeploymentsComponent = ({
|
||||
projectSlug,
|
||||
last,
|
||||
|
||||
+1
-1
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Table, TableColumn } from '@backstage/core';
|
||||
import { GithubDeployment } from '../../api';
|
||||
import { Typography, makeStyles } from '@material-ui/core';
|
||||
import SyncIcon from '@material-ui/icons/Sync';
|
||||
import * as columnFactories from './columns';
|
||||
import { defaultDeploymentColumns } from './presets';
|
||||
import { Table, TableColumn } from '@backstage/core-components';
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
empty: {
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import React from 'react';
|
||||
import { GithubDeployment } from '../../api';
|
||||
import { DateTime } from 'luxon';
|
||||
import { Box, Typography } from '@material-ui/core';
|
||||
import {
|
||||
StatusPending,
|
||||
StatusRunning,
|
||||
@@ -22,10 +25,7 @@ import {
|
||||
StatusAborted,
|
||||
StatusError,
|
||||
Link,
|
||||
} from '@backstage/core';
|
||||
import { GithubDeployment } from '../../api';
|
||||
import { DateTime } from 'luxon';
|
||||
import { Box, Typography } from '@material-ui/core';
|
||||
} from '@backstage/core-components';
|
||||
|
||||
export const GithubStateIndicator = ({ state }: { state: string }) => {
|
||||
switch (state) {
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TableColumn } from '@backstage/core';
|
||||
import { GithubDeployment } from '../../api';
|
||||
import {
|
||||
createEnvironmentColumn,
|
||||
@@ -22,6 +21,7 @@ import {
|
||||
createLastUpdatedColumn,
|
||||
createCreatorColumn,
|
||||
} from './columns';
|
||||
import { TableColumn } from '@backstage/core-components';
|
||||
|
||||
export const defaultDeploymentColumns: TableColumn<GithubDeployment>[] = [
|
||||
createEnvironmentColumn(),
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { scmIntegrationsApiRef } from '@backstage/integration-react';
|
||||
import { githubDeploymentsApiRef, GithubDeploymentsApiClient } from './api';
|
||||
import {
|
||||
createApiFactory,
|
||||
createComponentExtension,
|
||||
createPlugin,
|
||||
githubAuthApiRef,
|
||||
} from '@backstage/core';
|
||||
import { scmIntegrationsApiRef } from '@backstage/integration-react';
|
||||
import { githubDeploymentsApiRef, GithubDeploymentsApiClient } from './api';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
export const githubDeploymentsPlugin = createPlugin({
|
||||
id: 'github-deployments',
|
||||
|
||||
Reference in New Issue
Block a user