@backstage-community/plugin-github-actions 0.16.0 → 0.17.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @backstage-community/plugin-github-actions
2
2
 
3
+ ## 0.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5724534: Added a config for the entity content extension to change component layout between table and cards.
8
+
9
+ **Breaking** Changed the name of the entity content extension from `entity-content:github-actions/github-actions-entity-content` to `entity-content:github-actions`.
10
+
3
11
  ## 0.16.0
4
12
 
5
13
  ### Minor Changes
@@ -1,17 +1,25 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { convertLegacyRouteRef } from '@backstage/core-compat-api';
2
+ import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
3
3
  import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
4
4
  import { isGithubActionsAvailable } from '../components/Router.esm.js';
5
5
  import { rootRouteRef } from '../routes.esm.js';
6
6
 
7
- const entityGithubActionsContent = EntityContentBlueprint.make({
8
- name: "entity",
9
- params: {
10
- path: "github-actions",
11
- title: "GitHub Actions",
12
- filter: isGithubActionsAvailable,
13
- routeRef: convertLegacyRouteRef(rootRouteRef),
14
- loader: () => import('../components/Router.esm.js').then((m) => /* @__PURE__ */ jsx(m.Router, { view: "table" }))
7
+ const entityGithubActionsContent = EntityContentBlueprint.makeWithOverrides({
8
+ config: {
9
+ schema: {
10
+ layout: (z) => z.enum(["table", "cards"]).default("table")
11
+ }
12
+ },
13
+ factory(originalFactory, { config }) {
14
+ return originalFactory({
15
+ path: "github-actions",
16
+ title: "GitHub Actions",
17
+ filter: isGithubActionsAvailable,
18
+ routeRef: convertLegacyRouteRef(rootRouteRef),
19
+ loader: () => import('../components/Router.esm.js').then(
20
+ (m) => compatWrapper(/* @__PURE__ */ jsx(m.Router, { view: config.layout }))
21
+ )
22
+ });
15
23
  }
16
24
  });
17
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"entityContent.esm.js","sources":["../../src/alpha/entityContent.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { convertLegacyRouteRef } from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { isGithubActionsAvailable } from '../components/Router';\nimport { rootRouteRef } from '../routes';\n\n/**\n * @alpha\n */\nexport const entityGithubActionsContent = EntityContentBlueprint.make({\n name: 'entity',\n params: {\n path: 'github-actions',\n title: 'GitHub Actions',\n filter: isGithubActionsAvailable,\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/Router').then(m => <m.Router view=\"table\" />),\n },\n});\n"],"names":[],"mappings":";;;;;;AAuBa,MAAA,0BAAA,GAA6B,uBAAuB,IAAK,CAAA;AAAA,EACpE,IAAM,EAAA,QAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,gBAAA;AAAA,IACN,KAAO,EAAA,gBAAA;AAAA,IACP,MAAQ,EAAA,wBAAA;AAAA,IACR,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,6BAAsB,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,qBAAA,GAAA,CAAC,CAAE,CAAA,MAAA,EAAF,EAAS,IAAA,EAAK,SAAQ,CAAE;AAAA;AAExE,CAAC;;;;"}
1
+ {"version":3,"file":"entityContent.esm.js","sources":["../../src/alpha/entityContent.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { isGithubActionsAvailable } from '../components/Router';\nimport { rootRouteRef } from '../routes';\n\n/**\n * @alpha\n */\nexport const entityGithubActionsContent =\n EntityContentBlueprint.makeWithOverrides({\n config: {\n schema: {\n layout: z => z.enum(['table', 'cards']).default('table'),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n path: 'github-actions',\n title: 'GitHub Actions',\n filter: isGithubActionsAvailable,\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/Router').then(m =>\n compatWrapper(<m.Router view={config.layout} />),\n ),\n });\n },\n });\n"],"names":[],"mappings":";;;;;;AA0Ba,MAAA,0BAAA,GACX,uBAAuB,iBAAkB,CAAA;AAAA,EACvC,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,MAAA,EAAQ,CAAK,CAAA,KAAA,CAAA,CAAE,IAAK,CAAA,CAAC,SAAS,OAAO,CAAC,CAAE,CAAA,OAAA,CAAQ,OAAO;AAAA;AACzD,GACF;AAAA,EACA,OAAQ,CAAA,eAAA,EAAiB,EAAE,MAAA,EAAU,EAAA;AACnC,IAAA,OAAO,eAAgB,CAAA;AAAA,MACrB,IAAM,EAAA,gBAAA;AAAA,MACN,KAAO,EAAA,gBAAA;AAAA,MACP,MAAQ,EAAA,wBAAA;AAAA,MACR,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,MAC5C,MAAQ,EAAA,MACN,OAAO,6BAAsB,CAAE,CAAA,IAAA;AAAA,QAAK,CAAA,CAAA,KAClC,8BAAe,GAAA,CAAA,CAAA,CAAE,QAAF,EAAS,IAAA,EAAM,MAAO,CAAA,MAAA,EAAQ,CAAE;AAAA;AACjD,KACH,CAAA;AAAA;AAEL,CAAC;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -146,16 +146,18 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
146
146
  type?: _backstage_plugin_catalog_react_alpha.EntityCardType | undefined;
147
147
  };
148
148
  }>;
149
- "entity-content:github-actions/entity": _backstage_frontend_plugin_api.ExtensionDefinition<{
150
- kind: "entity-content";
151
- name: "entity";
149
+ "entity-content:github-actions": _backstage_frontend_plugin_api.ExtensionDefinition<{
152
150
  config: {
151
+ layout: "table" | "cards";
152
+ } & {
153
153
  path: string | undefined;
154
154
  title: string | undefined;
155
155
  filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
156
156
  group: string | false | undefined;
157
157
  };
158
158
  configInput: {
159
+ layout?: "table" | "cards" | undefined;
160
+ } & {
159
161
  filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
160
162
  title?: string | undefined;
161
163
  path?: string | undefined;
@@ -170,7 +172,16 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
170
172
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-group", {
171
173
  optional: true;
172
174
  }>;
173
- inputs: {};
175
+ inputs: {
176
+ [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ExtensionDataRef<unknown, string, {
177
+ optional?: true | undefined;
178
+ }>, {
179
+ optional: boolean;
180
+ singleton: boolean;
181
+ }>;
182
+ };
183
+ kind: "entity-content";
184
+ name: undefined;
174
185
  params: {
175
186
  defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
176
187
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-github-actions",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "A Backstage plugin that integrates towards GitHub Actions",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",