@backstage/plugin-user-settings-backend 0.2.24-next.1 → 0.2.24
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 +35 -0
- package/README.md +4 -36
- package/alpha/package.json +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @backstage/plugin-user-settings-backend
|
|
2
2
|
|
|
3
|
+
## 0.2.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5d1670f: Update README installation instructions
|
|
8
|
+
- 164ce3e: In preparation to stop supporting to the legacy backend system, the `createRouter` function is now deprecated and we strongly recommend you [migrate](https://backstage.io/docs/backend-system/building-backends/migrating) your backend to the new system.
|
|
9
|
+
- d425fc4: Modules, plugins, and services are now `BackendFeature`, not a function that returns a feature.
|
|
10
|
+
- 1b98099: Replaced usage of the deprecated identity service with the new HTTP auth service for the new backend system.
|
|
11
|
+
- c2b63ab: Updated dependency `supertest` to `^7.0.0`.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/backend-defaults@0.5.0
|
|
14
|
+
- @backstage/plugin-signals-node@0.1.11
|
|
15
|
+
- @backstage/backend-plugin-api@1.0.0
|
|
16
|
+
- @backstage/plugin-auth-node@0.5.2
|
|
17
|
+
- @backstage/config@1.2.0
|
|
18
|
+
- @backstage/errors@1.2.4
|
|
19
|
+
- @backstage/types@1.1.1
|
|
20
|
+
- @backstage/plugin-user-settings-common@0.0.1
|
|
21
|
+
|
|
22
|
+
## 0.2.24-next.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 5d1670f: Update README installation instructions
|
|
27
|
+
- c2b63ab: Updated dependency `supertest` to `^7.0.0`.
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- @backstage/backend-defaults@0.5.0-next.2
|
|
30
|
+
- @backstage/plugin-auth-node@0.5.2-next.2
|
|
31
|
+
- @backstage/backend-plugin-api@1.0.0-next.2
|
|
32
|
+
- @backstage/config@1.2.0
|
|
33
|
+
- @backstage/errors@1.2.4
|
|
34
|
+
- @backstage/types@1.1.1
|
|
35
|
+
- @backstage/plugin-signals-node@0.1.11-next.2
|
|
36
|
+
- @backstage/plugin-user-settings-common@0.0.1
|
|
37
|
+
|
|
3
38
|
## 0.2.24-next.1
|
|
4
39
|
|
|
5
40
|
### 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
|
|
3
|
+
"version": "0.2.24",
|
|
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
|
|
55
|
-
"@backstage/backend-plugin-api": "^0.
|
|
54
|
+
"@backstage/backend-defaults": "^0.5.0",
|
|
55
|
+
"@backstage/backend-plugin-api": "^1.0.0",
|
|
56
56
|
"@backstage/config": "^1.2.0",
|
|
57
57
|
"@backstage/errors": "^1.2.4",
|
|
58
|
-
"@backstage/plugin-auth-node": "^0.5.2
|
|
59
|
-
"@backstage/plugin-signals-node": "^0.1.11
|
|
58
|
+
"@backstage/plugin-auth-node": "^0.5.2",
|
|
59
|
+
"@backstage/plugin-signals-node": "^0.1.11",
|
|
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
|
|
70
|
-
"@backstage/backend-test-utils": "^0.
|
|
71
|
-
"@backstage/cli": "^0.27.1
|
|
69
|
+
"@backstage/backend-defaults": "^0.5.0",
|
|
70
|
+
"@backstage/backend-test-utils": "^1.0.0",
|
|
71
|
+
"@backstage/cli": "^0.27.1",
|
|
72
72
|
"@types/supertest": "^2.0.8",
|
|
73
|
-
"supertest": "^
|
|
73
|
+
"supertest": "^7.0.0"
|
|
74
74
|
}
|
|
75
75
|
}
|