From b0973c219f313c48feecf92ca5c55b1fdaa49532 Mon Sep 17 00:00:00 2001 From: zeshanziya Date: Mon, 16 Sep 2024 07:19:31 +0000 Subject: [PATCH 1/3] update package name from @internal to @axelerant for publishing --- plugins/platformsh-backend/package.json | 17 +++++++++++++++-- plugins/platformsh-common/package.json | 15 ++++++++++++++- plugins/platformsh/package.json | 18 +++++++++++++++--- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/plugins/platformsh-backend/package.json b/plugins/platformsh-backend/package.json index 5bb252b..3c8dae9 100644 --- a/plugins/platformsh-backend/package.json +++ b/plugins/platformsh-backend/package.json @@ -1,5 +1,5 @@ { - "name": "@internal/backstage-plugin-platformsh-backend", + "name": "@axelerant/backstage-plugin-platformsh-backend", "version": "0.1.0", "main": "src/index.ts", "types": "src/index.ts", @@ -13,6 +13,19 @@ "backstage": { "role": "backend-plugin" }, + "keywords": [ + "backstage", + "plugin", + "platformsh", + "platform.sh" + ], + "homepage": "https://github.com/axelerant/backstage-plugins", + "repository": { + "type": "git", + "url": "https://github.com/axelerant/backstage-plugins", + "directory": "plugins/platformsh-backend" + }, + "author": "zeshanziya ", "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -32,7 +45,7 @@ "@backstage/plugin-catalog-node": "^1.12.6", "@backstage/plugin-permission-common": "^0.8.1", "@backstage/plugin-permission-node": "^0.8.2", - "@internal/backstage-plugin-platformsh-common": "^0.1.0", + "@axelerant/backstage-plugin-platformsh-common": "^0.1.0", "express": "^4.17.1", "express-promise-router": "^4.1.0", "node-fetch": "^2.6.7", diff --git a/plugins/platformsh-common/package.json b/plugins/platformsh-common/package.json index cb67fc8..a8003be 100644 --- a/plugins/platformsh-common/package.json +++ b/plugins/platformsh-common/package.json @@ -1,5 +1,5 @@ { - "name": "@internal/backstage-plugin-platformsh-common", + "name": "@axelerant/backstage-plugin-platformsh-common", "description": "Common functionalities for the platformsh plugin", "version": "0.1.0", "main": "src/index.ts", @@ -15,6 +15,19 @@ "backstage": { "role": "common-library" }, + "keywords": [ + "backstage", + "plugin", + "platformsh", + "platform.sh" + ], + "homepage": "https://github.com/axelerant/backstage-plugins", + "repository": { + "type": "git", + "url": "https://github.com/axelerant/backstage-plugins", + "directory": "plugins/platformsh-common" + }, + "author": "zeshanziya ", "sideEffects": false, "scripts": { "build": "backstage-cli package build", diff --git a/plugins/platformsh/package.json b/plugins/platformsh/package.json index f5b4d2b..5a65d11 100644 --- a/plugins/platformsh/package.json +++ b/plugins/platformsh/package.json @@ -1,10 +1,9 @@ { - "name": "@internal/backstage-plugin-platformsh", + "name": "@axelerant/backstage-plugin-platformsh", "version": "0.1.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", - "private": true, "publishConfig": { "access": "public", "main": "dist/index.esm.js", @@ -13,6 +12,19 @@ "backstage": { "role": "frontend-plugin" }, + "keywords": [ + "backstage", + "plugin", + "platformsh", + "platform.sh" + ], + "homepage": "https://github.com/axelerant/backstage-plugins", + "repository": { + "type": "git", + "url": "https://github.com/axelerant/backstage-plugins", + "directory": "plugins/platformsh" + }, + "author": "zeshanziya ", "sideEffects": false, "scripts": { "start": "backstage-cli package start", @@ -30,7 +42,7 @@ "@backstage/plugin-catalog-react": "^1.12.3", "@backstage/plugin-permission-react": "^0.4.25", "@backstage/theme": "^0.5.6", - "@internal/backstage-plugin-platformsh-common": "^0.1.0", + "@axelerant/backstage-plugin-platformsh-common": "^0.1.0", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.61", From 0266d6c347b930d9610a0a0332ecf655d506e7a3 Mon Sep 17 00:00:00 2001 From: zeshanziya Date: Mon, 16 Sep 2024 07:20:10 +0000 Subject: [PATCH 2/3] refactor: update new package references --- packages/app/package.json | 2 +- packages/app/src/App.tsx | 2 +- packages/app/src/components/catalog/EntityPage.tsx | 2 +- packages/backend/package.json | 4 ++-- packages/backend/src/extensions/permissionsPolicyExtension.ts | 2 +- packages/backend/src/index.ts | 2 +- plugins/platformsh-backend/src/PlatformshHelper.ts | 2 +- plugins/platformsh-backend/src/service/router.ts | 2 +- plugins/platformsh-backend/src/utils.ts | 2 +- plugins/platformsh/src/api.ts | 2 +- .../src/components/Cards/EnvironmentsCard/ActionButtons.tsx | 2 +- .../Cards/EnvironmentsCard/EnvironmentsCard.test.tsx | 2 +- .../components/Cards/EnvironmentsCard/EnvironmentsCard.tsx | 2 +- .../Cards/ProjectDetailsCard/ProjectDetailsCard.test.tsx | 2 +- .../Cards/ProjectDetailsCard/ProjectDetailsCard.tsx | 2 +- .../components/EntityTabComponent/EntityTabComponent.test.tsx | 2 +- .../src/components/EntityTabComponent/EntityTabComponent.tsx | 2 +- .../components/ProjectsComponent/ProjectsComponent.test.tsx | 2 +- .../src/components/ProjectsComponent/ProjectsComponent.tsx | 2 +- plugins/platformsh/src/utils.ts | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index 53aae81..af6f8be 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -38,7 +38,7 @@ "@backstage/plugin-techdocs-react": "^1.2.7", "@backstage/plugin-user-settings": "^0.8.11", "@backstage/theme": "^0.5.6", - "@internal/backstage-plugin-platformsh": "^0.1.0", + "@axelerant/backstage-plugin-platformsh": "^0.1.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "history": "^5.0.0", diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index d36d5ad..d1ebb21 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -36,7 +36,7 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api'; import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; import { RequirePermission } from '@backstage/plugin-permission-react'; import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha'; -import { PlatformshPage } from '@internal/backstage-plugin-platformsh'; +import { PlatformshPage } from '@axelerant/backstage-plugin-platformsh'; const app = createApp({ apis, diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index 7f7a5ab..06cf435 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -61,7 +61,7 @@ import { import { EntityPlatformshContents, isPlatformshAvailable, -} from '@internal/backstage-plugin-platformsh'; +} from '@axelerant/backstage-plugin-platformsh'; const techdocsContent = ( diff --git a/packages/backend/package.json b/packages/backend/package.json index 2726cee..f416d82 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -43,8 +43,8 @@ "@backstage/plugin-search-backend-module-techdocs": "^0.2.0", "@backstage/plugin-search-backend-node": "^1.3.0", "@backstage/plugin-techdocs-backend": "^1.10.10", - "@internal/backstage-plugin-platformsh-backend": "^0.1.0", - "@internal/backstage-plugin-platformsh-common": "^0.1.0", + "@axelerant/backstage-plugin-platformsh-backend": "^0.1.0", + "@axelerant/backstage-plugin-platformsh-common": "^0.1.0", "app": "link:../app", "better-sqlite3": "^9.0.0", "node-gyp": "^10.0.0", diff --git a/packages/backend/src/extensions/permissionsPolicyExtension.ts b/packages/backend/src/extensions/permissionsPolicyExtension.ts index 3198ffc..fffc5c0 100644 --- a/packages/backend/src/extensions/permissionsPolicyExtension.ts +++ b/packages/backend/src/extensions/permissionsPolicyExtension.ts @@ -15,7 +15,7 @@ import { createCatalogConditionalDecision, } from '@backstage/plugin-catalog-backend/alpha'; import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha'; -import { platformshEnvironmentManagePermission } from '@internal/backstage-plugin-platformsh-common'; +import { platformshEnvironmentManagePermission } from '@axelerant/backstage-plugin-platformsh-common'; class CustomPermissionPolicy implements PermissionPolicy { async handle( diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 5cba82b..2cbeb63 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -48,5 +48,5 @@ backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha')); // kubernetes backend.add(import('@backstage/plugin-kubernetes-backend/alpha')); -backend.add(import('@internal/backstage-plugin-platformsh-backend')); +backend.add(import('@axelerant/backstage-plugin-platformsh-backend')); backend.start(); diff --git a/plugins/platformsh-backend/src/PlatformshHelper.ts b/plugins/platformsh-backend/src/PlatformshHelper.ts index bb285f4..bdd40b2 100644 --- a/plugins/platformsh-backend/src/PlatformshHelper.ts +++ b/plugins/platformsh-backend/src/PlatformshHelper.ts @@ -8,7 +8,7 @@ import Environment from 'platformsh-client/types/model/Environment'; import { EnvironmentMethods, PlatformshEnvironment, -} from '@internal/backstage-plugin-platformsh-common'; +} from '@axelerant/backstage-plugin-platformsh-common'; type PlatformshAccessToken = { access_token: string; diff --git a/plugins/platformsh-backend/src/service/router.ts b/plugins/platformsh-backend/src/service/router.ts index 04438a0..85321a2 100644 --- a/plugins/platformsh-backend/src/service/router.ts +++ b/plugins/platformsh-backend/src/service/router.ts @@ -12,7 +12,7 @@ import { PlatformshHelper } from '../PlatformshHelper'; import { EnvironmentMethods, platformshEnvironmentManagePermission, -} from '@internal/backstage-plugin-platformsh-common'; +} from '@axelerant/backstage-plugin-platformsh-common'; import { NotAllowedError } from '@backstage/errors'; import { AuthorizeResult } from '@backstage/plugin-permission-common'; import { createPermissionIntegrationRouter } from '@backstage/plugin-permission-node'; diff --git a/plugins/platformsh-backend/src/utils.ts b/plugins/platformsh-backend/src/utils.ts index 7c7eeec..07b314a 100644 --- a/plugins/platformsh-backend/src/utils.ts +++ b/plugins/platformsh-backend/src/utils.ts @@ -1,6 +1,6 @@ import { CatalogApi } from '@backstage/catalog-client'; import { ComponentEntity } from '@backstage/catalog-model'; -import { ANNOTATION_PLATFORMSH_PROJECT } from '@internal/backstage-plugin-platformsh-common'; +import { ANNOTATION_PLATFORMSH_PROJECT } from '@axelerant/backstage-plugin-platformsh-common'; export const findEntityByProjectId = async ( catalogApi: CatalogApi, diff --git a/plugins/platformsh/src/api.ts b/plugins/platformsh/src/api.ts index afce214..3e131a7 100644 --- a/plugins/platformsh/src/api.ts +++ b/plugins/platformsh/src/api.ts @@ -10,7 +10,7 @@ import { PlatformshProject, ProjectEnvironmentsResponse, ProjectInfoResponse, -} from '@internal/backstage-plugin-platformsh-common'; +} from '@axelerant/backstage-plugin-platformsh-common'; export interface PlatformshApi { listProjects(): Promise; diff --git a/plugins/platformsh/src/components/Cards/EnvironmentsCard/ActionButtons.tsx b/plugins/platformsh/src/components/Cards/EnvironmentsCard/ActionButtons.tsx index a49016f..cf5164f 100644 --- a/plugins/platformsh/src/components/Cards/EnvironmentsCard/ActionButtons.tsx +++ b/plugins/platformsh/src/components/Cards/EnvironmentsCard/ActionButtons.tsx @@ -6,7 +6,7 @@ import { MenuItem, } from '@material-ui/core'; import MoreVertIcon from '@material-ui/icons/MoreVert'; -import { PlatformshEnvironment } from '@internal/backstage-plugin-platformsh-common'; +import { PlatformshEnvironment } from '@axelerant/backstage-plugin-platformsh-common'; import useAsyncFn from 'react-use/lib/useAsyncFn'; export const ActionButtons = ({ diff --git a/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.test.tsx b/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.test.tsx index fb06212..862475a 100644 --- a/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.test.tsx +++ b/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.test.tsx @@ -12,7 +12,7 @@ import { platformshApiRef } from '../../../api'; import { ANNOTATION_PLATFORMSH_PROJECT, PlatformshEnvironment, -} from '@internal/backstage-plugin-platformsh-common'; +} from '@axelerant/backstage-plugin-platformsh-common'; import { permissionApiRef } from '@backstage/plugin-permission-react'; jest.mock('@backstage/plugin-catalog-react', () => ({ diff --git a/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.tsx b/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.tsx index a081051..efd60cd 100644 --- a/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.tsx +++ b/plugins/platformsh/src/components/Cards/EnvironmentsCard/EnvironmentsCard.tsx @@ -8,7 +8,7 @@ import { import { PlatformshEnvironment, platformshEnvironmentManagePermission, -} from '@internal/backstage-plugin-platformsh-common'; +} from '@axelerant/backstage-plugin-platformsh-common'; import { alertApiRef, useApi } from '@backstage/core-plugin-api'; import { platformshApiRef } from '../../../api'; import { ActionButtons } from './ActionButtons'; diff --git a/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.test.tsx b/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.test.tsx index 3ed1d54..c67231f 100644 --- a/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.test.tsx +++ b/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.test.tsx @@ -9,7 +9,7 @@ import { TestApiProvider, } from '@backstage/test-utils'; import { platformshApiRef } from '../../../api'; -import { PlatformshProject } from '@internal/backstage-plugin-platformsh-common'; +import { PlatformshProject } from '@axelerant/backstage-plugin-platformsh-common'; describe('ProjectDetailsCard', () => { const server = setupServer(); diff --git a/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.tsx b/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.tsx index d5333f6..703ab4c 100644 --- a/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.tsx +++ b/plugins/platformsh/src/components/Cards/ProjectDetailsCard/ProjectDetailsCard.tsx @@ -7,7 +7,7 @@ import { import { Typography, Box, makeStyles, Link } from '@material-ui/core'; import { platformshApiRef } from '../../../api'; import { useApi } from '@backstage/core-plugin-api'; -import { PlatformshProject } from '@internal/backstage-plugin-platformsh-common'; +import { PlatformshProject } from '@axelerant/backstage-plugin-platformsh-common'; import useAsync from 'react-use/lib/useAsync'; const useStyles = makeStyles(theme => ({ diff --git a/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.test.tsx b/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.test.tsx index 798eb51..72562cd 100644 --- a/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.test.tsx +++ b/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.test.tsx @@ -12,7 +12,7 @@ import { platformshApiRef } from '../../api'; import { PlatformshProject, ANNOTATION_PLATFORMSH_PROJECT, -} from '@internal/backstage-plugin-platformsh-common'; +} from '@axelerant/backstage-plugin-platformsh-common'; jest.mock('@backstage/plugin-catalog-react', () => ({ useEntity: () => { diff --git a/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.tsx b/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.tsx index 6e2c078..d4d3c33 100644 --- a/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.tsx +++ b/plugins/platformsh/src/components/EntityTabComponent/EntityTabComponent.tsx @@ -3,7 +3,7 @@ import { Grid } from '@material-ui/core'; import { ProjectDetailsCard } from '../Cards/ProjectDetailsCard'; import { useEntity } from '@backstage/plugin-catalog-react'; import { EnvironmentsCard } from '../Cards/EnvironmentsCard/EnvironmentsCard'; -import { ANNOTATION_PLATFORMSH_PROJECT } from '@internal/backstage-plugin-platformsh-common'; +import { ANNOTATION_PLATFORMSH_PROJECT } from '@axelerant/backstage-plugin-platformsh-common'; export const EntityTabComponent = () => { const { entity } = useEntity(); diff --git a/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.test.tsx b/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.test.tsx index 852f890..5e26c80 100644 --- a/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.test.tsx +++ b/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.test.tsx @@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'; import { ProjectsComponent } from './ProjectsComponent'; import { platformshApiRef } from '../../api'; import { TestApiProvider } from '@backstage/test-utils'; -import { PlatformshProject } from '@internal/backstage-plugin-platformsh-common'; +import { PlatformshProject } from '@axelerant/backstage-plugin-platformsh-common'; describe('ProjectsComponent', () => { const platformshApi: jest.Mocked = { diff --git a/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.tsx b/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.tsx index f9b98e0..65be0d5 100644 --- a/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.tsx +++ b/plugins/platformsh/src/components/ProjectsComponent/ProjectsComponent.tsx @@ -6,7 +6,7 @@ import { ResponseErrorPanel, } from '@backstage/core-components'; import useAsync from 'react-use/lib/useAsync'; -import { PlatformshProject } from '@internal/backstage-plugin-platformsh-common'; +import { PlatformshProject } from '@axelerant/backstage-plugin-platformsh-common'; import { useApi } from '@backstage/core-plugin-api'; import { platformshApiRef } from '../../api'; diff --git a/plugins/platformsh/src/utils.ts b/plugins/platformsh/src/utils.ts index 7458ce0..deb232b 100644 --- a/plugins/platformsh/src/utils.ts +++ b/plugins/platformsh/src/utils.ts @@ -1,5 +1,5 @@ import { Entity } from '@backstage/catalog-model'; -import { ANNOTATION_PLATFORMSH_PROJECT } from '@internal/backstage-plugin-platformsh-common'; +import { ANNOTATION_PLATFORMSH_PROJECT } from '@axelerant/backstage-plugin-platformsh-common'; export const isPlatformshAvailable = (entity: Entity) => Boolean(entity?.metadata.annotations?.[ANNOTATION_PLATFORMSH_PROJECT]); From 0ac9c3781626386afc8e525d79041cebf51af23c Mon Sep 17 00:00:00 2001 From: zeshanziya Date: Mon, 16 Sep 2024 07:22:40 +0000 Subject: [PATCH 3/3] add package description --- plugins/platformsh-backend/package.json | 1 + plugins/platformsh-common/package.json | 2 +- plugins/platformsh/package.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/platformsh-backend/package.json b/plugins/platformsh-backend/package.json index 3c8dae9..fe16055 100644 --- a/plugins/platformsh-backend/package.json +++ b/plugins/platformsh-backend/package.json @@ -1,6 +1,7 @@ { "name": "@axelerant/backstage-plugin-platformsh-backend", "version": "0.1.0", + "description": "Backstage backend plugin for Platform.sh integration!", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/platformsh-common/package.json b/plugins/platformsh-common/package.json index a8003be..dd11cbc 100644 --- a/plugins/platformsh-common/package.json +++ b/plugins/platformsh-common/package.json @@ -1,6 +1,6 @@ { "name": "@axelerant/backstage-plugin-platformsh-common", - "description": "Common functionalities for the platformsh plugin", + "description": "Common functionalities for the backstage platformsh plugin", "version": "0.1.0", "main": "src/index.ts", "types": "src/index.ts", diff --git a/plugins/platformsh/package.json b/plugins/platformsh/package.json index 5a65d11..cfd8e4c 100644 --- a/plugins/platformsh/package.json +++ b/plugins/platformsh/package.json @@ -1,6 +1,7 @@ { "name": "@axelerant/backstage-plugin-platformsh", "version": "0.1.0", + "description": "Backstage frontend plugin for Platform.sh integration!", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0",