Skip to content

Commit

Permalink
feat(notifications): make notifications NPM packages public (#1061)
Browse files Browse the repository at this point in the history
* chore: rename plugins/notifications-frontend to plugins/notifications

* feat(notifications): make notifications NPM packages public
  • Loading branch information
mareklibra authored Jan 15, 2024
1 parent 7e7a9ae commit ecec1db
Show file tree
Hide file tree
Showing 50 changed files with 12 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ yarn.lock @janus-idp/maintainers-plugins
/plugins/tekton/ @janus-idp/maintainers-plugins @debsmita1 @divyanshiGupta
/plugins/rbac-backend/ @janus-idp/maintainers-plugins @gorkem @AndrienkoAleksandr @PatAKnight
/plugins/rbac-common/ @janus-idp/maintainers-plugins @gorkem @AndrienkoAleksandr @PatAKnight
/plugins/notifications-frontend @janus-idp/maintainers-plugins @mareklibra
/plugins/notifications @janus-idp/maintainers-plugins @mareklibra
/plugins/notifications-backend @janus-idp/maintainers-plugins @mareklibra @ydayagi

1 change: 0 additions & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"@backstage/plugin-catalog-import": "^0.10.1",
"@backstage/plugin-catalog-react": "^1.8.5",
"@backstage/plugin-github-actions": "^0.6.6",
"@backstage/plugin-notifications-frontend": "0.1.0",
"@backstage/plugin-org": "^0.6.15",
"@backstage/plugin-permission-react": "^0.4.16",
"@backstage/plugin-scaffolder": "^1.15.1",
Expand Down
1 change: 0 additions & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@backstage/plugin-auth-backend": "^0.19.3",
"@backstage/plugin-auth-node": "^0.4.0",
"@backstage/plugin-catalog-backend": "^1.14.0",
"@backstage/plugin-notifications-backend": "^0.1.0",
"@backstage/plugin-permission-backend": "^0.5.29",
"@backstage/plugin-permission-common": "^0.7.9",
"@backstage/plugin-permission-node": "^0.7.17",
Expand Down
2 changes: 1 addition & 1 deletion plugins/notifications-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ It is up to particular deployment to provide corresponding permission policies b

#### Service-to-service and External Calls

The notification-backend is expected to be called by FE plugins (including the notifications-frontend), other backend plugins or external services.
The notification-backend is expected to be called by FE plugins (including the Notifications frontend-end plugin), other backend plugins or external services.

To configure those two flows, refer

Expand Down
1 change: 0 additions & 1 deletion plugins/notifications-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Have `@backstage/plugin-notifications-backend` installed and running.

```
cd packages/app
yarn add @backstage/plugin-notifications-frontend
yarn add @backstage/plugin-notifications
```

### Add left-side menu item

In the `packages/app/src/components/Root/Root.tsx`:

```
import { NotificationsSidebarItem } from '@backstage/plugin-notifications-frontend';
import { NotificationsSidebarItem } from '@backstage/plugin-notifications';
...
export const Root = ({ children }: PropsWithChildren<{}>) => (
Expand All @@ -48,7 +48,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
In the `packages/app/src/App.tsx`:

```
import { NOTIFICATIONS_ROUTE, NotificationsPage } from '@backstage/plugin-notifications-frontend';
import { NOTIFICATIONS_ROUTE, NotificationsPage } from '@backstage/plugin-notifications';
...
export const AppBase = () => {
Expand All @@ -60,7 +60,7 @@ export const AppBase = () => {
## How to use the NotificationApi

```
import { notificationsApiRef, Notification } from '@backstage/plugin-notifications-frontend';
import { notificationsApiRef, Notification } from '@backstage/plugin-notifications';
...
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "@backstage/plugin-notifications-frontend",
"name": "@backstage/plugin-notifications",
"description": "Frontend part of the notifications providing the Notifications API, Notifications page, left-side menu item and other REACT components.",
"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",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ The content of this folder is generated, do not update it manually.
Generated by:

```
cd plugins/notifications-frontend
cd plugins/notifications
yarn openapi:generate
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"include": ["src", "dev", "migrations"],
"exclude": ["node_modules"],
"compilerOptions": {
"outDir": "../../dist-types/plugins/notifications-frontend",
"outDir": "../../dist-types/plugins/notifications",
"rootDir": "."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": ["//"],
"pipeline": {
"tsc": {
"outputs": ["../../dist-types/plugins/notifications-frontend/**"],
"outputs": ["../../dist-types/plugins/notifications/**"],
"dependsOn": ["^tsc"]
}
}
Expand Down

0 comments on commit ecec1db

Please sign in to comment.