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
@@ -14,8 +14,8 @@
* limitations under the License.
*/
import { createApiRef } from '@backstage/core';
import { Project, Operation } from './types';
import { createApiRef } from '@backstage/core-plugin-api';
export const gcpApiRef = createApiRef<GcpApi>({
id: 'plugin.gcpprojects.service',
+1 -1
View File
@@ -14,9 +14,9 @@
* limitations under the License.
*/
import { OAuthApi } from '@backstage/core';
import { GcpApi } from './GcpApi';
import { Operation, Project } from './types';
import { OAuthApi } from '@backstage/core-plugin-api';
const BASE_URL =
'https://content-cloudresourcemanager.googleapis.com/v1/projects';
@@ -14,6 +14,8 @@
* limitations under the License.
*/
import { Button, Grid, TextField } from '@material-ui/core';
import React, { useState } from 'react';
import {
Content,
ContentHeader,
@@ -25,9 +27,7 @@ import {
SimpleStepperStep,
StructuredMetadataTable,
SupportButton,
} from '@backstage/core';
import { Button, Grid, TextField } from '@material-ui/core';
import React, { useState } from 'react';
} from '@backstage/core-components';
export const Project = () => {
const [projectName, setProjectName] = useState('');
@@ -13,16 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
Content,
ContentHeader,
Header,
HeaderLabel,
Page,
SupportButton,
useApi,
WarningPanel,
} from '@backstage/core';
import {
Button,
ButtonGroup,
@@ -40,6 +30,18 @@ import React from 'react';
import { useAsync } from 'react-use';
import { gcpApiRef } from '../../api';
import {
Content,
ContentHeader,
Header,
HeaderLabel,
Page,
SupportButton,
WarningPanel,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
const useStyles = makeStyles<Theme>(theme => ({
root: {
maxWidth: 720,
@@ -15,17 +15,6 @@
*/
// NEEDS WORK
import {
Content,
ContentHeader,
Header,
HeaderLabel,
Link,
Page,
SupportButton,
useApi,
WarningPanel,
} from '@backstage/core';
import {
Button,
LinearProgress,
@@ -42,6 +31,19 @@ import React from 'react';
import { useAsync } from 'react-use';
import { gcpApiRef, Project } from '../../api';
import {
Content,
ContentHeader,
Header,
HeaderLabel,
Link,
Page,
SupportButton,
WarningPanel,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
const LongText = ({ text, max }: { text: string; max: number }) => {
if (text.length < max) {
return <span>{text}</span>;
+3 -3
View File
@@ -14,14 +14,14 @@
* limitations under the License.
*/
import { gcpApiRef, GcpClient } from './api';
import { rootRouteRef } from './routes';
import {
createApiFactory,
createPlugin,
createRoutableExtension,
googleAuthApiRef,
} from '@backstage/core';
import { gcpApiRef, GcpClient } from './api';
import { rootRouteRef } from './routes';
} from '@backstage/core-plugin-api';
export const gcpProjectsPlugin = createPlugin({
id: 'gcp-projects',
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { createRouteRef } from '@backstage/core';
import { createRouteRef } from '@backstage/core-plugin-api';
export const rootRouteRef = createRouteRef({
path: '/gcp-projects',