@backstage/plugin-user-settings-backend 0.2.24-next.1 → 0.2.24-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +4 -36
- package/alpha/package.json +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-user-settings-backend
|
|
2
2
|
|
|
3
|
+
## 0.2.24-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5d1670f: Update README installation instructions
|
|
8
|
+
- c2b63ab: Updated dependency `supertest` to `^7.0.0`.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/backend-defaults@0.5.0-next.2
|
|
11
|
+
- @backstage/plugin-auth-node@0.5.2-next.2
|
|
12
|
+
- @backstage/backend-plugin-api@1.0.0-next.2
|
|
13
|
+
- @backstage/config@1.2.0
|
|
14
|
+
- @backstage/errors@1.2.4
|
|
15
|
+
- @backstage/types@1.1.1
|
|
16
|
+
- @backstage/plugin-signals-node@0.1.11-next.2
|
|
17
|
+
- @backstage/plugin-user-settings-common@0.0.1
|
|
18
|
+
|
|
3
19
|
## 0.2.24-next.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -10,48 +10,16 @@ Install the backend plugin
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
# From your Backstage root directory
|
|
13
|
-
yarn --cwd packages/backend add @backstage/plugin-user-settings-backend
|
|
13
|
+
yarn --cwd packages/backend add @backstage/plugin-user-settings-backend @backstage/plugin-signals-backend
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
### New backend
|
|
17
|
-
|
|
18
16
|
Add the plugin to your backend in `packages/backend/src/index.ts`:
|
|
19
17
|
|
|
20
18
|
```ts
|
|
21
19
|
backend.add(import('@backstage/plugin-user-settings-backend/alpha'));
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
the `@backstage/plugin-signals-backend` plugin.
|
|
26
|
-
|
|
27
|
-
### Old backend
|
|
28
|
-
|
|
29
|
-
1. Configure the routes by adding a new `userSettings.ts` file in
|
|
30
|
-
`packages/backend/src/plugins/`:
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
// packages/backend/src/plugins/userSettings.ts
|
|
34
|
-
import { createRouter } from '@backstage/plugin-user-settings-backend';
|
|
35
|
-
import { PluginEnvironment } from '../types';
|
|
36
|
-
|
|
37
|
-
export default async function createPlugin(env: PluginEnvironment) {
|
|
38
|
-
return await createRouter({
|
|
39
|
-
database: env.database,
|
|
40
|
-
identity: env.identity,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
2. Add the new routes to your backend by modifying `packages/backend/src/index.ts`:
|
|
46
|
-
|
|
47
|
-
```diff
|
|
48
|
-
// packages/backend/src/index.ts
|
|
49
|
-
+import userSettings from './plugins/userSettings';
|
|
50
|
-
async function main() {
|
|
51
|
-
+ const userSettingsEnv = useHotMemoize(module, () => createEnv('user-settings'));
|
|
52
|
-
const apiRouter = Router();
|
|
53
|
-
+ apiRouter.use('/user-settings', await userSettings(userSettingsEnv));
|
|
54
|
-
}
|
|
20
|
+
// The signals backend is technically optional but enables real-time update of user
|
|
21
|
+
// settings across different sessions
|
|
22
|
+
backend.add(import('@backstage/plugin-signals-backend'));
|
|
55
23
|
```
|
|
56
24
|
|
|
57
25
|
## Setup app
|
package/alpha/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-user-settings-backend",
|
|
3
|
-
"version": "0.2.24-next.
|
|
3
|
+
"version": "0.2.24-next.2",
|
|
4
4
|
"description": "The Backstage backend plugin to manage user settings",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "backend-plugin",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"test": "backstage-cli package test"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@backstage/backend-defaults": "^0.5.0-next.
|
|
55
|
-
"@backstage/backend-plugin-api": "^0.
|
|
54
|
+
"@backstage/backend-defaults": "^0.5.0-next.2",
|
|
55
|
+
"@backstage/backend-plugin-api": "^1.0.0-next.2",
|
|
56
56
|
"@backstage/config": "^1.2.0",
|
|
57
57
|
"@backstage/errors": "^1.2.4",
|
|
58
|
-
"@backstage/plugin-auth-node": "^0.5.2-next.
|
|
59
|
-
"@backstage/plugin-signals-node": "^0.1.11-next.
|
|
58
|
+
"@backstage/plugin-auth-node": "^0.5.2-next.2",
|
|
59
|
+
"@backstage/plugin-signals-node": "^0.1.11-next.2",
|
|
60
60
|
"@backstage/plugin-user-settings-common": "^0.0.1",
|
|
61
61
|
"@backstage/types": "^1.1.1",
|
|
62
62
|
"@types/express": "^4.17.6",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"yn": "^4.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@backstage/backend-defaults": "^0.5.0-next.
|
|
70
|
-
"@backstage/backend-test-utils": "^0.
|
|
71
|
-
"@backstage/cli": "^0.27.1-next.
|
|
69
|
+
"@backstage/backend-defaults": "^0.5.0-next.2",
|
|
70
|
+
"@backstage/backend-test-utils": "^1.0.0-next.2",
|
|
71
|
+
"@backstage/cli": "^0.27.1-next.2",
|
|
72
72
|
"@types/supertest": "^2.0.8",
|
|
73
|
-
"supertest": "^
|
|
73
|
+
"supertest": "^7.0.0"
|
|
74
74
|
}
|
|
75
75
|
}
|