apply core-imports codemod to all packages and plugins

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-06-17 17:56:24 +02:00
parent 9b9a8f3925
commit d453c05dc3
541 changed files with 1549 additions and 1321 deletions
+1 -1
View File
@@ -15,7 +15,6 @@
*/
import { Entity } from '@backstage/catalog-model';
import { Content, Header, Page } from '@backstage/core';
import { createDevApp, EntityGridItem } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';
import { Grid } from '@material-ui/core';
@@ -28,6 +27,7 @@ import {
sentryApiRef,
} from '../src';
import { SENTRY_PROJECT_SLUG_ANNOTATION } from '../src/components/useProjectSlug';
import { Content, Header, Page } from '@backstage/core-components';
const entity = (name?: string) =>
({
+1 -1
View File
@@ -16,7 +16,7 @@
import { SentryIssue } from './sentry-issue';
import { SentryApi } from './sentry-api';
import { DiscoveryApi } from '@backstage/core';
import { DiscoveryApi } from '@backstage/core-plugin-api';
export class ProductionSentryApi implements SentryApi {
constructor(
+1 -1
View File
@@ -15,7 +15,7 @@
*/
import { SentryIssue } from './sentry-issue';
import { createApiRef } from '@backstage/core';
import { createApiRef } from '@backstage/core-plugin-api';
export const sentryApiRef = createApiRef<SentryApi>({
id: 'plugin.sentry.service',
@@ -15,11 +15,11 @@
*/
import React from 'react';
import { Table, TableColumn } from '@backstage/core';
import { SentryIssue } from '../../api';
import { DateTime } from 'luxon';
import { ErrorCell } from '../ErrorCell/ErrorCell';
import { ErrorGraph } from '../ErrorGraph/ErrorGraph';
import { Table, TableColumn } from '@backstage/core-components';
const columns: TableColumn[] = [
{
@@ -15,16 +15,6 @@
*/
import { Entity } from '@backstage/catalog-model';
import {
EmptyState,
ErrorApi,
errorApiRef,
InfoCard,
InfoCardVariants,
MissingAnnotationEmptyState,
Progress,
useApi,
} from '@backstage/core';
import React, { useEffect } from 'react';
import { useAsync } from 'react-use';
import { sentryApiRef } from '../../api';
@@ -34,6 +24,16 @@ import {
useProjectSlug,
} from '../useProjectSlug';
import {
EmptyState,
InfoCard,
InfoCardVariants,
MissingAnnotationEmptyState,
Progress,
} from '@backstage/core-components';
import { ErrorApi, errorApiRef, useApi } from '@backstage/core-plugin-api';
export const SentryIssuesWidget = ({
entity,
statsFor = '24h',
+4 -4
View File
@@ -14,13 +14,13 @@
* limitations under the License.
*/
import {
createComponentExtension,
createRoutableExtension,
} from '@backstage/core';
import { useEntity } from '@backstage/plugin-catalog-react';
import React from 'react';
import { sentryPlugin, rootRouteRef } from './plugin';
import {
createComponentExtension,
createRoutableExtension,
} from '@backstage/core-plugin-api';
export const EntitySentryContent = sentryPlugin.provide(
createRoutableExtension({
+2 -2
View File
@@ -14,14 +14,14 @@
* limitations under the License.
*/
import { ProductionSentryApi, sentryApiRef } from './api';
import {
configApiRef,
createApiFactory,
createPlugin,
createRouteRef,
discoveryApiRef,
} from '@backstage/core';
import { ProductionSentryApi, sentryApiRef } from './api';
} from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/sentry',