@backstage-community/plugin-tech-insights-backend 1.2.0 → 1.2.1

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @backstage-community/plugin-tech-insights-backend
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6a4787a: Add auth token logic to the fact retriever example in the README.
8
+ This makes it possible to copy it directly as a baseline for new fact retrievers.
9
+
3
10
  ## 1.2.0
4
11
 
5
12
  ### Minor Changes
package/README.md CHANGED
@@ -142,7 +142,13 @@ export const myFactRetriever: FactRetriever = {
142
142
  },
143
143
  handler: async ctx => {
144
144
  // Handler function that retrieves the fact
145
- const { discovery, config, logger } = ctx;
145
+ const { discovery, config, logger, auth } = ctx;
146
+
147
+ const { token } = await auth.getPluginRequestToken({
148
+ onBehalfOf: await auth.getOwnServiceCredentials(),
149
+ targetPluginId: 'catalog',
150
+ });
151
+
146
152
  const catalogClient = new CatalogClient({
147
153
  discoveryApi: discovery,
148
154
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-tech-insights-backend",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "backstage": {
5
5
  "role": "backend-plugin",
6
6
  "pluginId": "tech-insights",