@backstage-community/plugin-npm-common 1.16.0 → 1.18.0
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 +12 -0
- package/README.md +65 -33
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @backstage-community/plugin-npm-common
|
|
2
2
|
|
|
3
|
+
## 1.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3f67411: Backstage version bump to v1.48.1
|
|
8
|
+
|
|
9
|
+
## 1.17.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c235037: Backstage version bump to v1.47.2
|
|
14
|
+
|
|
3
15
|
## 1.16.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -91,6 +91,70 @@ you must install also the backend plugin and [configure it](./registries.md).
|
|
|
91
91
|
|
|
92
92
|
### Frontend plugin
|
|
93
93
|
|
|
94
|
+
### Load plugin via the new frontend system (alpha)
|
|
95
|
+
|
|
96
|
+
For early adaopters of the new frontend system.
|
|
97
|
+
|
|
98
|
+
Your Backstage frontend app must use that new frontend system which isn't the default at the moment.
|
|
99
|
+
|
|
100
|
+
1. Install the frontend dependency:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
yarn workspace app-next add @backstage-community/plugin-npm
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
2. Add the package to your `packages/app-next/src/App.tsx`.
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
import npmPlugin from '@backstage-community/plugin-npm/alpha';
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
And extend your createApp:
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
export const app = createApp({
|
|
116
|
+
features: [
|
|
117
|
+
// ...other plugins
|
|
118
|
+
npmPlugin,
|
|
119
|
+
],
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
3. Optional enable translation via the `TranslationBlueprint` extension:
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import { TranslationBlueprint } from '@backstage/plugin-app-react';
|
|
127
|
+
|
|
128
|
+
import npmPlugin, {
|
|
129
|
+
npmTranslations,
|
|
130
|
+
} from '@backstage-community/plugin-npm/alpha';
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```tsx
|
|
134
|
+
const npmTranslation = TranslationBlueprint.make({
|
|
135
|
+
name: 'npmTranslation',
|
|
136
|
+
params: {
|
|
137
|
+
resource: npmTranslations,
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export default createApp({
|
|
142
|
+
features: [
|
|
143
|
+
createFrontendModule({
|
|
144
|
+
pluginId: 'app',
|
|
145
|
+
extensions: [
|
|
146
|
+
// ...other extensions
|
|
147
|
+
npmTranslation,
|
|
148
|
+
],
|
|
149
|
+
}),
|
|
150
|
+
// ...other plugins
|
|
151
|
+
npmPlugin,
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Manual wiring the frontend plugin ("Old Frontend System")
|
|
157
|
+
|
|
94
158
|
1. Install the frontend dependency:
|
|
95
159
|
|
|
96
160
|
```sh
|
|
@@ -140,44 +204,12 @@ you must install also the backend plugin and [configure it](./registries.md).
|
|
|
140
204
|
</EntityLayout.Route>
|
|
141
205
|
```
|
|
142
206
|
|
|
143
|
-
### Alternative: Use the new frontend system (alpha)
|
|
144
|
-
|
|
145
|
-
For early adaopters of the new frontend system.
|
|
146
|
-
|
|
147
|
-
Your Backstage frontend app must use that new frontend system which isn't the default at the moment.
|
|
148
|
-
|
|
149
|
-
1. Install the frontend dependency:
|
|
150
|
-
|
|
151
|
-
```sh
|
|
152
|
-
yarn workspace app-next add @backstage-community/plugin-npm
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
2. Add the package to your `packages/app[-next]/src/App.tsx`.
|
|
156
|
-
|
|
157
|
-
```tsx
|
|
158
|
-
import npmPlugin from '@backstage-community/plugin-npm/alpha';
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
And extend your createApp:
|
|
162
|
-
|
|
163
|
-
```tsx
|
|
164
|
-
export const app = createApp({
|
|
165
|
-
features: [
|
|
166
|
-
catalogPlugin,
|
|
167
|
-
catalogImportPlugin,
|
|
168
|
-
userSettingsPlugin,
|
|
169
|
-
npmPlugin,
|
|
170
|
-
// ...
|
|
171
|
-
],
|
|
172
|
-
});
|
|
173
|
-
```
|
|
174
|
-
|
|
175
207
|
### Optional: Backend plugin (req. for private packages or alternative registries)
|
|
176
208
|
|
|
177
209
|
1. Install the backend plugin:
|
|
178
210
|
|
|
179
211
|
```sh
|
|
180
|
-
yarn workspace backend add @backstage-community/plugin-npm
|
|
212
|
+
yarn workspace backend add @backstage-community/plugin-npm-backend
|
|
181
213
|
```
|
|
182
214
|
|
|
183
215
|
2. Add it to `packages/backend/src/index.ts`:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-npm-common",
|
|
3
3
|
"description": "Common functionalities for the npm plugin",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.18.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@backstage/errors": "^1.2.7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@backstage/cli": "^0.35.
|
|
42
|
+
"@backstage/cli": "^0.35.4"
|
|
43
43
|
},
|
|
44
44
|
"files": [
|
|
45
45
|
"dist"
|