Skip to content

Commit

Permalink
Rename packages, and cleanup package jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
fokolo committed Dec 24, 2024
1 parent 284f7fd commit b8e6347
Show file tree
Hide file tree
Showing 22 changed files with 81 additions and 49 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ For more than 15 users you need to get a license from [Port](https://backstage-p
```bash
# Install backend plugin
yarn --cwd packages/backend add @port-labs/backstage-plugin-port-backend
yarn --cwd packages/backend add @port-labs/backstage-plugin-framework-backend

# Install frontend plugin
yarn --cwd packages/app add @port-labs/backstage-plugin-port-frontend
yarn --cwd packages/app add @port-labs/backstage-plugin-framework
```

Then register the backend plugin in `packages/backend/src/index.ts`:

```typescript
backend.add(import("@port-labs/backstage-plugin-port-backend"));
backend.add(import("@port-labs/backstage-plugin-framework-backend"));
```

Finally, add components as you like from the frontend plugin to your Backstage instance.
Expand Down
1 change: 1 addition & 0 deletions backstage-plugins/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ node_modules/
# Yarn files
.pnp.*
.yarn/*
**/.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
Expand Down
4 changes: 2 additions & 2 deletions backstage-plugins/packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"@internal/backstage-plugin-new-plugin": "^0.1.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@port-labs/backstage-plugin-dev-daily-plugin": "^0.1.0",
"@port-labs/backstage-plugin-port-frontend": "workspace:^",
"@port-labs/backstage-plugin-dev-daily": "^0.1.0",
"@port-labs/backstage-plugin-framework": "^0.1.0",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"react-router": "^6.3.0",
Expand Down
6 changes: 3 additions & 3 deletions backstage-plugins/packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ import { githubAuthApiRef } from '@backstage/core-plugin-api';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
import { RequirePermission } from '@backstage/plugin-permission-react';
import { DevDailyPluginPage } from '@port-labs/backstage-plugin-dev-daily-plugin';
import { NewPluginPage } from '@internal/backstage-plugin-new-plugin';
import { DevDailyPluginPage } from '@port-labs/backstage-plugin-dev-daily';
import {
ScorecardsPage,
SettingsPage,
} from '@port-labs/backstage-plugin-port-frontend';
import { NewPluginPage } from '@internal/backstage-plugin-new-plugin';
} from '@port-labs/backstage-plugin-framework';

const app = createApp({
apis,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import {
PortInformationCard,
ScorecardCard,
useEntityRoutes,
} from '@port-labs/backstage-plugin-port-frontend';
} from '@port-labs/backstage-plugin-framework';

const techdocsContent = (
<EntityTechdocsContent>
Expand Down
2 changes: 1 addition & 1 deletion backstage-plugins/packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@backstage/plugin-search-backend-module-techdocs": "^0.3.2",
"@backstage/plugin-search-backend-node": "^1.3.5",
"@backstage/plugin-techdocs-backend": "^1.11.2",
"@port-labs/backstage-plugin-port-backend": "workspace:^",
"@port-labs/backstage-plugin-framework-backend": "workspace:^",
"app": "link:../app",
"better-sqlite3": "^9.0.0",
"node-gyp": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion backstage-plugins/packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ backend.add(import('@backstage/plugin-devtools-backend'));
backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));

// port plugin
backend.add(import('@port-labs/backstage-plugin-port-backend'));
backend.add(import('@port-labs/backstage-plugin-framework-backend'));

backend.start();
4 changes: 2 additions & 2 deletions backstage-plugins/plugins/backend-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Port Backstage Backend Plugin

To use these plugins you need to get a license from [Port](https://backstage-plugin.getport.io/)
This is part of the Backstage Plugin SDK. which cuts down the time to build a plugin.

Read more about the Port Backstage Plugin in the [docs](https://port-labs.github.io/backstage-plugin/docs)
Read more about the Port Backstage Plugin in the [docs](https://backstage-plugin.getport.io/)
21 changes: 17 additions & 4 deletions backstage-plugins/plugins/backend-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@port-labs/backstage-plugin-port-backend",
"name": "@port-labs/backstage-plugin-framework-backend",
"version": "0.1.4",
"main": "src/index.ts",
"types": "src/index.ts",
Expand All @@ -9,14 +9,27 @@
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"homepage": "https://github.com/port-labs/backstage-plugin",
"homepage": "https://backstage-plugin.getport.io/",
"repository": {
"type": "git",
"url": "github:port-labs/backstage-plugin",
"directory": "backstage-plugins/plugins/backend-plugin"
},
"backstage": {
"role": "backend-plugin",
"pluginId": "port-labs-backend",
"pluginId": "framework",
"pluginPackages": [
"@port-labs/backstage-plugin-port-backend"
"@port-labs/backstage-plugin-framework",
"@port-labs/backstage-plugin-framework-backend"
]
},
"keywords": [
"backstage",
"port",
"getport",
"port-labs",
"framework"
],
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
Expand Down
14 changes: 11 additions & 3 deletions backstage-plugins/plugins/dev-daily-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{
"name": "@port-labs/backstage-plugin-dev-daily-plugin",
"name": "@port-labs/backstage-plugin-dev-daily",
"version": "0.1.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"homepage": "https://backstage-plugin.getport.io/",
"repository": {
"type": "git",
"url": "github:port-labs/backstage-plugin",
"directory": "backstage-plugins/plugins/dev-daily-plugin"
},
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "frontend-plugin",
"pluginId": "port-labs-dev-daily"
"pluginId": "dev-daily",
"pluginPackages": [
"@port-labs/backstage-plugin-dev-daily"
]
},
"sideEffects": false,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InfoCard } from '@backstage/core-components';
import { Grid, Typography } from '@material-ui/core';
import { ApiHooks } from '@port-labs/backstage-plugin-port-frontend';
import { ApiHooks } from '@port-labs/backstage-plugin-framework';
import React from 'react';
import { LoadingSkeleton } from './LoadingSkeleton';
import MyOpenTasks from './MyOpenTasks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Content, Header, HeaderLabel, Page } from '@backstage/core-components';
import { LinearProgress } from '@material-ui/core';
import { ApiHooks } from '@port-labs/backstage-plugin-port-frontend';
import { ApiHooks } from '@port-labs/backstage-plugin-framework';
import React from 'react';
import { useOutlet } from 'react-router-dom';
import Cards from '../components/Cards';
Expand Down
2 changes: 1 addition & 1 deletion backstage-plugins/plugins/dev-daily-plugin/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
createRoutableExtension,
} from '@backstage/core-plugin-api';

import { PortAPI } from '@port-labs/backstage-plugin-port-frontend';
import { PortAPI } from '@port-labs/backstage-plugin-framework';
import { rootRouteRef } from './routes';

export const portApiRef = createApiRef<PortAPI>({
Expand Down
4 changes: 2 additions & 2 deletions backstage-plugins/plugins/frontend-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Port Backstage Frontend Plugin

To use these plugins you need to get a license from [Port](https://backstage-plugin.getport.io/)
This is part of the Backstage Plugin SDK. which cuts down the time to build a plugin.

Read more about the Port Backstage Plugin in the [docs](https://port-labs.github.io/backstage-plugin/docs)
Read more about the Port Backstage Plugin in the [docs](https://backstage-plugin.getport.io/)
14 changes: 10 additions & 4 deletions backstage-plugins/plugins/frontend-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@port-labs/backstage-plugin-port-frontend",
"name": "@port-labs/backstage-plugin-framework",
"version": "0.1.4",
"main": "src/index.ts",
"types": "src/index.ts",
Expand All @@ -9,12 +9,18 @@
"main": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"homepage": "https://github.com/port-labs/backstage-plugin",
"homepage": "https://backstage-plugin.getport.io/",
"repository": {
"type": "git",
"url": "github:port-labs/backstage-plugin",
"directory": "backstage-plugins/plugins/frontend-plugin"
},
"backstage": {
"role": "frontend-plugin",
"pluginId": "port-labs-frontend",
"pluginId": "framework",
"pluginPackages": [
"@port-labs/backstage-plugin-port-frontend"
"@port-labs/backstage-plugin-framework",
"@port-labs/backstage-plugin-framework-backend"
]
},
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions backstage-plugins/plugins/frontend-plugin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4283,9 +4283,9 @@ __metadata:
languageName: node
linkType: hard

"@port-labs/backstage-plugin-port-frontend@workspace:.":
"@port-labs/backstage-plugin-framework@workspace:.":
version: 0.0.0-use.local
resolution: "@port-labs/backstage-plugin-port-frontend@workspace:."
resolution: "@port-labs/backstage-plugin-framework@workspace:."
dependencies:
"@backstage/catalog-model": "npm:^1.5.0"
"@backstage/cli": "npm:^0.26.11"
Expand Down
6 changes: 5 additions & 1 deletion backstage-plugins/plugins/new-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"types": "dist/index.d.ts"
},
"backstage": {
"role": "frontend-plugin"
"role": "frontend-plugin",
"pluginId": "new-plugin",
"pluginPackages": [
"@internal/backstage-plugin-new-plugin"
]
},
"sideEffects": false,
"scripts": {
Expand Down
18 changes: 9 additions & 9 deletions backstage-plugins/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11108,9 +11108,9 @@ __metadata:
languageName: node
linkType: hard

"@port-labs/backstage-plugin-dev-daily-plugin@npm:^0.1.0, @port-labs/backstage-plugin-dev-daily-plugin@workspace:plugins/dev-daily-plugin":
"@port-labs/backstage-plugin-dev-daily@npm:^0.1.0, @port-labs/backstage-plugin-dev-daily@workspace:plugins/dev-daily-plugin":
version: 0.0.0-use.local
resolution: "@port-labs/backstage-plugin-dev-daily-plugin@workspace:plugins/dev-daily-plugin"
resolution: "@port-labs/backstage-plugin-dev-daily@workspace:plugins/dev-daily-plugin"
dependencies:
"@backstage/cli": "npm:^0.29.0"
"@backstage/core-app-api": "npm:^1.15.2"
Expand All @@ -11133,9 +11133,9 @@ __metadata:
languageName: unknown
linkType: soft

"@port-labs/backstage-plugin-port-backend@workspace:^, @port-labs/backstage-plugin-port-backend@workspace:plugins/backend-plugin":
"@port-labs/backstage-plugin-framework-backend@workspace:^, @port-labs/backstage-plugin-framework-backend@workspace:plugins/backend-plugin":
version: 0.0.0-use.local
resolution: "@port-labs/backstage-plugin-port-backend@workspace:plugins/backend-plugin"
resolution: "@port-labs/backstage-plugin-framework-backend@workspace:plugins/backend-plugin"
dependencies:
"@backstage/backend-common": "npm:^0.24.0"
"@backstage/backend-defaults": "npm:^0.4.2"
Expand All @@ -11156,9 +11156,9 @@ __metadata:
languageName: unknown
linkType: soft

"@port-labs/backstage-plugin-port-frontend@workspace:^, @port-labs/backstage-plugin-port-frontend@workspace:plugins/frontend-plugin":
"@port-labs/backstage-plugin-framework@npm:^0.1.0, @port-labs/backstage-plugin-framework@workspace:plugins/frontend-plugin":
version: 0.0.0-use.local
resolution: "@port-labs/backstage-plugin-port-frontend@workspace:plugins/frontend-plugin"
resolution: "@port-labs/backstage-plugin-framework@workspace:plugins/frontend-plugin"
dependencies:
"@backstage/catalog-model": "npm:^1.5.0"
"@backstage/cli": "npm:^0.26.11"
Expand Down Expand Up @@ -16221,8 +16221,8 @@ __metadata:
"@material-ui/core": "npm:^4.12.2"
"@material-ui/icons": "npm:^4.9.1"
"@playwright/test": "npm:^1.32.3"
"@port-labs/backstage-plugin-dev-daily-plugin": "npm:^0.1.0"
"@port-labs/backstage-plugin-port-frontend": "workspace:^"
"@port-labs/backstage-plugin-dev-daily": "npm:^0.1.0"
"@port-labs/backstage-plugin-framework": "npm:^0.1.0"
"@testing-library/dom": "npm:^9.0.0"
"@testing-library/jest-dom": "npm:^6.0.0"
"@testing-library/react": "npm:^14.0.0"
Expand Down Expand Up @@ -16921,7 +16921,7 @@ __metadata:
"@backstage/plugin-search-backend-module-techdocs": "npm:^0.3.2"
"@backstage/plugin-search-backend-node": "npm:^1.3.5"
"@backstage/plugin-techdocs-backend": "npm:^1.11.2"
"@port-labs/backstage-plugin-port-backend": "workspace:^"
"@port-labs/backstage-plugin-framework-backend": "workspace:^"
app: "link:../app"
better-sqlite3: "npm:^9.0.0"
node-gyp: "npm:^10.0.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/site/docs/features/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ You can create your own components to display and execute actions:
import {
useActionsQuery,
useActionRun,
} from "@port-labs/backstage-plugin-port-frontend";
} from "@port-labs/backstage-plugin-framework";

const CustomActionButton = ({ blueprintId, actionId }) => {
const { data: actions } = useActionsQuery(blueprintId);
Expand Down
6 changes: 3 additions & 3 deletions docs/site/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ Install frontend and backend plugins using yarn:

```bash
# Install backend plugin
yarn --cwd packages/backend add @port-labs/backstage-plugin-port-backend
yarn --cwd packages/backend add @port-labs/backstage-plugin-framework-backend

# Install frontend plugin
yarn --cwd packages/app add @port-labs/backstage-plugin-port-frontend
yarn --cwd packages/app add @port-labs/backstage-plugin-framework
```

Then register the backend plugin in `packages/backend/src/index.ts`:

```typescript
backend.add(import("@port-labs/backstage-plugin-port-backend"));
backend.add(import("@port-labs/backstage-plugin-framework-backend"));
```

Finally, add components as you like from the frontend plugin to your Backstage instance.
Expand Down
6 changes: 3 additions & 3 deletions docs/site/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Install frontend and backend plugins using yarn:

```bash
# Install backend plugin
yarn --cwd packages/backend add @port-labs/backstage-plugin-port-backend
yarn --cwd packages/backend add @port-labs/backstage-plugin-framework-backend

# Install frontend plugin
yarn --cwd packages/app add @port-labs/backstage-plugin-port-frontend
yarn --cwd packages/app add @port-labs/backstage-plugin-framework
```

Then register the backend plugin in `packages/backend/src/index.ts`:

```typescript
backend.add(import("@port-labs/backstage-plugin-port-backend"));
backend.add(import("@port-labs/backstage-plugin-framework-backend"));
```

Finally, add components as you like from the frontend plugin to your Backstage instance.
Expand Down
2 changes: 1 addition & 1 deletion docs/site/docs/port-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const examplePortEntity: PortEntity = {
You can create your own components to display Port data in ways that match your organization's needs:

```typescript
import { useEntityQuery } from "@port-labs/backstage-plugin-port-frontend";
import { useEntityQuery } from "@port-labs/backstage-plugin-framework";

const CustomEntityCard = () => {
const { data: entity, loading } = useEntityQuery("entity-id", "blueprint-id");
Expand Down

0 comments on commit b8e6347

Please sign in to comment.