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
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import { Observable } from '@backstage/core';
import ObservableImpl from 'zen-observable';
import { ResponseError } from '@backstage/errors';
import { Schema } from 'jsonschema';
import { ConfigSchemaApi, ConfigSchemaResult } from './types';
import { Observable } from '@backstage/core-plugin-api';
const DEFAULT_URL = 'config-schema.json';
+1 -1
View File
@@ -14,8 +14,8 @@
* limitations under the License.
*/
import { createApiRef, Observable } from '@backstage/core';
import { Schema } from 'jsonschema';
import { createApiRef, Observable } from '@backstage/core-plugin-api';
export interface ConfigSchemaResult {
schema?: Schema;
@@ -14,12 +14,14 @@
* limitations under the License.
*/
import React, { useMemo } from 'react';
import { Header, Page, Content, useApi, Progress } from '@backstage/core';
import { useObservable } from 'react-use';
import { configSchemaApiRef } from '../../api';
import { SchemaViewer } from '../SchemaViewer';
import { Typography } from '@material-ui/core';
import { Header, Page, Content, Progress } from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
export const ConfigSchemaPage = () => {
const configSchemaApi = useApi(configSchemaApiRef);
const schemaResult = useObservable(
+5 -2
View File
@@ -13,10 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createPlugin, createRoutableExtension } from '@backstage/core';
import { rootRouteRef } from './routes';
import {
createPlugin,
createRoutableExtension,
} from '@backstage/core-plugin-api';
export const configSchemaPlugin = createPlugin({
id: 'config-schema',
routes: {
+1 -1
View File
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createRouteRef } from '@backstage/core';
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
title: 'config-schema',