@backstage-community/plugin-github-actions 0.6.21 → 0.6.23

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,18 @@
1
1
  # @backstage-community/plugin-github-actions
2
2
 
3
+ ## 0.6.23
4
+
5
+ ### Patch Changes
6
+
7
+ - 6fdae83: Backstage version bump to v1.32.0
8
+
9
+ ## 0.6.22
10
+
11
+ ### Patch Changes
12
+
13
+ - 45fd620: use new FE system syntax (replacing deprecated methods)
14
+ - 59b34f5: Backstage version bump to v1.30.2
15
+
3
16
  ## 0.6.21
4
17
 
5
18
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-github-actions__alpha",
3
- "version": "0.6.21",
3
+ "version": "0.6.23",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
@@ -1,14 +1,16 @@
1
- import { createApiExtension, createApiFactory, configApiRef } from '@backstage/frontend-plugin-api';
1
+ import { ApiBlueprint, createApiFactory, configApiRef } from '@backstage/frontend-plugin-api';
2
2
  import { scmAuthApiRef } from '@backstage/integration-react';
3
3
  import { githubActionsApiRef } from '../api/GithubActionsApi.esm.js';
4
4
  import { GithubActionsClient } from '../api/GithubActionsClient.esm.js';
5
5
 
6
- const githubActionsApi = createApiExtension({
7
- factory: createApiFactory({
8
- api: githubActionsApiRef,
9
- deps: { configApi: configApiRef, scmAuthApi: scmAuthApiRef },
10
- factory: ({ configApi, scmAuthApi }) => new GithubActionsClient({ configApi, scmAuthApi })
11
- })
6
+ const githubActionsApi = ApiBlueprint.make({
7
+ params: {
8
+ factory: createApiFactory({
9
+ api: githubActionsApiRef,
10
+ deps: { configApi: configApiRef, scmAuthApi: scmAuthApiRef },
11
+ factory: ({ configApi, scmAuthApi }) => new GithubActionsClient({ configApi, scmAuthApi })
12
+ })
13
+ }
12
14
  });
13
15
 
14
16
  export { githubActionsApi };
@@ -1 +1 @@
1
- {"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"sourcesContent":["import {\n configApiRef,\n createApiExtension,\n createApiFactory,\n} from '@backstage/frontend-plugin-api';\nimport { scmAuthApiRef } from '@backstage/integration-react';\nimport { githubActionsApiRef, GithubActionsClient } from '../api';\n\n/**\n * @alpha\n */\nexport const githubActionsApi = createApiExtension({\n factory: createApiFactory({\n api: githubActionsApiRef,\n deps: { configApi: configApiRef, scmAuthApi: scmAuthApiRef },\n factory: ({ configApi, scmAuthApi }) =>\n new GithubActionsClient({ configApi, scmAuthApi }),\n }),\n});\n"],"names":[],"mappings":";;;;;AAWO,MAAM,mBAAmB,kBAAmB,CAAA;AAAA,EACjD,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,mBAAA;AAAA,IACL,IAAM,EAAA,EAAE,SAAW,EAAA,YAAA,EAAc,YAAY,aAAc,EAAA;AAAA,IAC3D,OAAA,EAAS,CAAC,EAAE,SAAW,EAAA,UAAA,EACrB,KAAA,IAAI,mBAAoB,CAAA,EAAE,SAAW,EAAA,UAAA,EAAY,CAAA;AAAA,GACpD,CAAA;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"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 configApiRef,\n ApiBlueprint,\n createApiFactory,\n} from '@backstage/frontend-plugin-api';\nimport { scmAuthApiRef } from '@backstage/integration-react';\nimport { githubActionsApiRef, GithubActionsClient } from '../api';\n\n/**\n * @alpha\n */\nexport const githubActionsApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: githubActionsApiRef,\n deps: { configApi: configApiRef, scmAuthApi: scmAuthApiRef },\n factory: ({ configApi, scmAuthApi }) =>\n new GithubActionsClient({ configApi, scmAuthApi }),\n }),\n },\n});\n"],"names":[],"mappings":";;;;;AA0Ba,MAAA,gBAAA,GAAmB,aAAa,IAAK,CAAA;AAAA,EAChD,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,mBAAA;AAAA,MACL,IAAM,EAAA,EAAE,SAAW,EAAA,YAAA,EAAc,YAAY,aAAc,EAAA;AAAA,MAC3D,OAAA,EAAS,CAAC,EAAE,SAAW,EAAA,UAAA,EACrB,KAAA,IAAI,mBAAoB,CAAA,EAAE,SAAW,EAAA,UAAA,EAAY,CAAA;AAAA,KACpD,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
@@ -1,54 +1,62 @@
1
1
  import React from 'react';
2
- import { createSchemaFromZod } from '@backstage/frontend-plugin-api';
3
- import { createEntityCardExtension } from '@backstage/plugin-catalog-react/alpha';
2
+ import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
4
3
 
5
- const entityGithubActionsCard = createEntityCardExtension({
4
+ const entityGithubActionsCard = EntityCardBlueprint.make({
6
5
  name: "workflow-runs",
7
- filter: "kind:component",
8
- loader: () => import('../components/Router.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.Router, { view: "cards" }))
6
+ params: {
7
+ filter: "kind:component",
8
+ loader: () => import('../components/Router.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.Router, { view: "cards" }))
9
+ }
9
10
  });
10
- const entityLatestGithubActionRunCard = createEntityCardExtension({
11
+ const entityLatestGithubActionRunCard = EntityCardBlueprint.makeWithOverrides({
11
12
  name: "latest-workflow-run",
12
- filter: "kind:component",
13
- configSchema: createSchemaFromZod(
14
- (z) => z.object({
15
- props: z.object({
13
+ config: {
14
+ schema: {
15
+ props: (z) => z.object({
16
16
  branch: z.string().default("master")
17
- }).default({}),
18
- filter: z.string().optional()
19
- })
20
- ),
21
- loader: ({ config }) => import('../components/Cards/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.LatestWorkflowRunCard, { ...config.props }))
17
+ }).default({})
18
+ }
19
+ },
20
+ factory(originalFactory, { config }) {
21
+ return originalFactory({
22
+ filter: "kind:component",
23
+ loader: async () => import('../components/Cards/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.LatestWorkflowRunCard, { ...config.props }))
24
+ });
25
+ }
22
26
  });
23
- const entityLatestGithubActionsForBranchCard = createEntityCardExtension(
24
- {
25
- name: "latest-branch-workflow-runs",
26
- filter: "kind:component",
27
- configSchema: createSchemaFromZod(
28
- (z) => z.object({
29
- props: z.object({
30
- branch: z.string().default("master")
31
- }).default({}),
32
- filter: z.string().optional()
33
- })
34
- ),
35
- loader: ({ config }) => import('../components/Cards/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.LatestWorkflowsForBranchCard, { ...config.props }))
27
+ const entityLatestGithubActionsForBranchCard = EntityCardBlueprint.makeWithOverrides({
28
+ name: "latest-branch-workflow-runs",
29
+ config: {
30
+ schema: {
31
+ props: (z) => z.object({
32
+ branch: z.string().default("master")
33
+ }).default({})
34
+ }
35
+ },
36
+ factory(originalFactory, { config }) {
37
+ return originalFactory({
38
+ filter: "kind:component",
39
+ loader: async () => import('../components/Cards/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.LatestWorkflowsForBranchCard, { ...config.props }))
40
+ });
36
41
  }
37
- );
38
- const entityRecentGithubActionsRunsCard = createEntityCardExtension({
42
+ });
43
+ const entityRecentGithubActionsRunsCard = EntityCardBlueprint.makeWithOverrides({
39
44
  name: "recent-workflow-runs",
40
- filter: "kind:component",
41
- configSchema: createSchemaFromZod(
42
- (z) => z.object({
43
- props: z.object({
45
+ config: {
46
+ schema: {
47
+ props: (z) => z.object({
44
48
  branch: z.string().default("master"),
45
49
  dense: z.boolean().default(false),
46
50
  limit: z.number().default(5).optional()
47
- }).default({}),
48
- filter: z.string().optional()
49
- })
50
- ),
51
- loader: ({ config }) => import('../components/Cards/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.RecentWorkflowRunsCard, { ...config.props }))
51
+ }).default({})
52
+ }
53
+ },
54
+ factory(originalFactory, { config }) {
55
+ return originalFactory({
56
+ filter: "kind:component",
57
+ loader: async () => import('../components/Cards/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.RecentWorkflowRunsCard, { ...config.props }))
58
+ });
59
+ }
52
60
  });
53
61
 
54
62
  export { entityGithubActionsCard, entityLatestGithubActionRunCard, entityLatestGithubActionsForBranchCard, entityRecentGithubActionsRunsCard };
@@ -1 +1 @@
1
- {"version":3,"file":"entityCards.esm.js","sources":["../../src/alpha/entityCards.tsx"],"sourcesContent":["import React from 'react';\nimport { createSchemaFromZod } from '@backstage/frontend-plugin-api';\nimport { createEntityCardExtension } from '@backstage/plugin-catalog-react/alpha';\n\n/**\n * @alpha\n */\nexport const entityGithubActionsCard = createEntityCardExtension({\n name: 'workflow-runs',\n filter: 'kind:component',\n loader: () =>\n import('../components/Router').then(m => <m.Router view=\"cards\" />),\n});\n\n/**\n * @alpha\n */\nexport const entityLatestGithubActionRunCard = createEntityCardExtension({\n name: 'latest-workflow-run',\n filter: 'kind:component',\n configSchema: createSchemaFromZod(z =>\n z.object({\n props: z\n .object({\n branch: z.string().default('master'),\n })\n .default({}),\n filter: z.string().optional(),\n }),\n ),\n loader: ({ config }) =>\n import('../components/Cards').then(m => (\n <m.LatestWorkflowRunCard {...config.props} />\n )),\n});\n\n/**\n * @alpha\n */\nexport const entityLatestGithubActionsForBranchCard = createEntityCardExtension(\n {\n name: 'latest-branch-workflow-runs',\n filter: 'kind:component',\n configSchema: createSchemaFromZod(z =>\n z.object({\n props: z\n .object({\n branch: z.string().default('master'),\n })\n .default({}),\n filter: z.string().optional(),\n }),\n ),\n loader: ({ config }) =>\n import('../components/Cards').then(m => (\n <m.LatestWorkflowsForBranchCard {...config.props} />\n )),\n },\n);\n\n/**\n * @alpha\n */\nexport const entityRecentGithubActionsRunsCard = createEntityCardExtension({\n name: 'recent-workflow-runs',\n filter: 'kind:component',\n configSchema: createSchemaFromZod(z =>\n z.object({\n props: z\n .object({\n branch: z.string().default('master'),\n dense: z.boolean().default(false),\n limit: z.number().default(5).optional(),\n })\n .default({}),\n filter: z.string().optional(),\n }),\n ),\n loader: ({ config }) =>\n import('../components/Cards').then(m => (\n <m.RecentWorkflowRunsCard {...config.props} />\n )),\n});\n"],"names":[],"mappings":";;;;AAOO,MAAM,0BAA0B,yBAA0B,CAAA;AAAA,EAC/D,IAAM,EAAA,eAAA;AAAA,EACN,MAAQ,EAAA,gBAAA;AAAA,EACR,MAAQ,EAAA,MACN,OAAO,6BAAsB,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,MAAA,EAAF,EAAS,IAAA,EAAK,SAAQ,CAAE,CAAA;AACtE,CAAC,EAAA;AAKM,MAAM,kCAAkC,yBAA0B,CAAA;AAAA,EACvE,IAAM,EAAA,qBAAA;AAAA,EACN,MAAQ,EAAA,gBAAA;AAAA,EACR,YAAc,EAAA,mBAAA;AAAA,IAAoB,CAAA,CAAA,KAChC,EAAE,MAAO,CAAA;AAAA,MACP,KAAA,EAAO,EACJ,MAAO,CAAA;AAAA,QACN,MAAQ,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAQ,QAAQ,CAAA;AAAA,OACpC,CAAA,CACA,OAAQ,CAAA,EAAE,CAAA;AAAA,MACb,MAAQ,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAS,EAAA;AAAA,KAC7B,CAAA;AAAA,GACH;AAAA,EACA,QAAQ,CAAC,EAAE,MAAO,EAAA,KAChB,OAAO,kCAAqB,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,yCAChC,CA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MAAQ,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAS,EAAA;AAAA,KAC7B,CAAA;AAAA,GACH;AAAA,EACA,QAAQ,CAAC,EAAE,MAAO,EAAA,KAChB,OAAO,kCAAqB,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,yCAChC,CAAE,CAAA,sBAAA,EAAF,EAA0B,GAAG,MAAA,CAAO,OAAO,CAC7C,CAAA;AACL,CAAC;;;;"}
1
+ {"version":3,"file":"entityCards.esm.js","sources":["../../src/alpha/entityCards.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 React from 'react';\nimport { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';\n\n/**\n * @alpha\n */\nexport const entityGithubActionsCard = EntityCardBlueprint.make({\n name: 'workflow-runs',\n params: {\n filter: 'kind:component',\n loader: () =>\n import('../components/Router').then(m => <m.Router view=\"cards\" />),\n },\n});\n\n/**\n * @alpha\n */\nexport const entityLatestGithubActionRunCard =\n EntityCardBlueprint.makeWithOverrides({\n name: 'latest-workflow-run',\n config: {\n schema: {\n props: z =>\n z\n .object({\n branch: z.string().default('master'),\n })\n .default({}),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: 'kind:component',\n loader: async () =>\n import('../components/Cards').then(m => (\n <m.LatestWorkflowRunCard {...config.props} />\n )),\n });\n },\n });\n\n/**\n * @alpha\n */\nexport const entityLatestGithubActionsForBranchCard =\n EntityCardBlueprint.makeWithOverrides({\n name: 'latest-branch-workflow-runs',\n config: {\n schema: {\n props: z =>\n z\n .object({\n branch: z.string().default('master'),\n })\n .default({}),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: 'kind:component',\n loader: async () =>\n import('../components/Cards').then(m => (\n <m.LatestWorkflowsForBranchCard {...config.props} />\n )),\n });\n },\n });\n\n/**\n * @alpha\n */\nexport const entityRecentGithubActionsRunsCard =\n EntityCardBlueprint.makeWithOverrides({\n name: 'recent-workflow-runs',\n config: {\n schema: {\n props: z =>\n z\n .object({\n branch: z.string().default('master'),\n dense: z.boolean().default(false),\n limit: z.number().default(5).optional(),\n })\n .default({}),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: 'kind:component',\n loader: async () =>\n import('../components/Cards').then(m => (\n <m.RecentWorkflowRunsCard {...config.props} />\n )),\n });\n },\n });\n"],"names":[],"mappings":";;;AAqBa,MAAA,uBAAA,GAA0B,oBAAoB,IAAK,CAAA;AAAA,EAC9D,IAAM,EAAA,eAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,gBAAA;AAAA,IACR,MAAQ,EAAA,MACN,OAAO,6BAAsB,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,MAAA,EAAF,EAAS,IAAA,EAAK,SAAQ,CAAE,CAAA;AAAA,GACtE;AACF,CAAC,EAAA;AAKY,MAAA,+BAAA,GACX,oBAAoB,iBAAkB,CAAA;AAAA,EACpC,IAAM,EAAA,qBAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,KAAA,EAAO,CACL,CAAA,KAAA,CAAA,CACG,MAAO,CAAA;AAAA,QACN,MAAQ,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAQ,QAAQ,CAAA;AAAA,OACpC,CAAA,CACA,OAAQ,CAAA,EAAE,CAAA;AAAA,KACjB;AAAA,GACF;AAAA,EACA,OAAQ,CAAA,eAAA,EAAiB,EAAE,MAAA,EAAU,EAAA;AACnC,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AAAA,QACnC,KAAO,EAAA,CAAA,CAAE,OAAQ,EAAA,CAAE,QAAQ,KAAK,CAAA;AAAA,QAChC,OAAO,CAAE,CAAA,MAAA,GAAS,OAAQ,CAAA,CAAC,EAAE,QAAS,EAAA;AAAA,OACvC,CAAA,CACA,OAAQ,CAAA,EAAE,CAAA;AAAA,KACjB;AAAA,GACF;AAAA,EACA,OAAQ,CAAA,eAAA,EAAiB,EAAE,MAAA,EAAU,EAAA;AACnC,IAAA,OAAO,eAAgB,CAAA;AAAA,MACrB,MAAQ,EAAA,gBAAA;AAAA,MACR,MAAQ,EAAA,YACN,OAAO,kCAAqB,EAAE,IAAK,CAAA,CAAA,CAAA,qBAChC,KAAA,CAAA,aAAA,CAAA,CAAA,CAAE,sBAAF,EAAA,EAA0B,GAAG,MAAA,CAAO,OAAO,CAC7C,CAAA;AAAA,KACJ,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
2
  import { convertLegacyRouteRef } from '@backstage/core-compat-api';
3
- import { createEntityContentExtension } from '@backstage/plugin-catalog-react/alpha';
3
+ import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
4
4
  import { rootRouteRef } from '../routes.esm.js';
5
5
 
6
- const entityGithubActionsContent = createEntityContentExtension({
7
- defaultPath: "github-actions",
8
- defaultTitle: "GitHub Actions",
6
+ const entityGithubActionsContent = EntityContentBlueprint.make({
9
7
  name: "entity",
10
- filter: "kind:component",
11
- routeRef: convertLegacyRouteRef(rootRouteRef),
12
- loader: () => import('../components/Router.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.Router, { view: "table" }))
8
+ params: {
9
+ defaultPath: "github-actions",
10
+ defaultTitle: "GitHub Actions",
11
+ filter: "kind:component",
12
+ routeRef: convertLegacyRouteRef(rootRouteRef),
13
+ loader: () => import('../components/Router.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.Router, { view: "table" }))
14
+ }
13
15
  });
14
16
 
15
17
  export { entityGithubActionsContent };
@@ -1 +1 @@
1
- {"version":3,"file":"entityContent.esm.js","sources":["../../src/alpha/entityContent.tsx"],"sourcesContent":["import React from 'react';\nimport { convertLegacyRouteRef } from '@backstage/core-compat-api';\nimport { createEntityContentExtension } from '@backstage/plugin-catalog-react/alpha';\nimport { rootRouteRef } from '../routes';\n\n/**\n * @alpha\n */\nexport const entityGithubActionsContent = createEntityContentExtension({\n defaultPath: 'github-actions',\n defaultTitle: 'GitHub Actions',\n name: 'entity',\n filter: 'kind:component',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: () =>\n import('../components/Router').then(m => <m.Router view=\"table\" />),\n});\n"],"names":[],"mappings":";;;;;AAQO,MAAM,6BAA6B,4BAA6B,CAAA;AAAA,EACrE,WAAa,EAAA,gBAAA;AAAA,EACb,YAAc,EAAA,gBAAA;AAAA,EACd,IAAM,EAAA,QAAA;AAAA,EACN,MAAQ,EAAA,gBAAA;AAAA,EACR,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,EAC5C,MAAQ,EAAA,MACN,OAAO,6BAAsB,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,MAAA,EAAF,EAAS,IAAA,EAAK,SAAQ,CAAE,CAAA;AACtE,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 React from 'react';\nimport { convertLegacyRouteRef } from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { rootRouteRef } from '../routes';\n\n/**\n * @alpha\n */\nexport const entityGithubActionsContent = EntityContentBlueprint.make({\n name: 'entity',\n params: {\n defaultPath: 'github-actions',\n defaultTitle: 'GitHub Actions',\n filter: 'kind:component',\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,WAAa,EAAA,gBAAA;AAAA,IACb,YAAc,EAAA,gBAAA;AAAA,IACd,MAAQ,EAAA,gBAAA;AAAA,IACR,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,MAAQ,EAAA,MACN,OAAO,6BAAsB,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,MAAA,EAAF,EAAS,IAAA,EAAK,SAAQ,CAAE,CAAA;AAAA,GACtE;AACF,CAAC;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,10 +1,178 @@
1
+ /// <reference types="react" />
2
+ import * as _backstage_catalog_model from '@backstage/catalog-model';
3
+ import * as react from 'react';
4
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
1
5
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
2
6
 
3
7
  /**
4
8
  * @alpha
5
9
  */
6
- declare const _default: _backstage_frontend_plugin_api.BackstagePlugin<{
10
+ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
7
11
  entityContent: _backstage_frontend_plugin_api.RouteRef<undefined>;
8
- }, {}>;
12
+ }, {}, {
13
+ "api:github-actions": _backstage_frontend_plugin_api.ExtensionDefinition<{
14
+ kind: "api";
15
+ name: undefined;
16
+ config: {};
17
+ configInput: {};
18
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_core_plugin_api.AnyApiFactory, "core.api.factory", {}>;
19
+ inputs: {};
20
+ params: {
21
+ factory: _backstage_core_plugin_api.AnyApiFactory;
22
+ };
23
+ }>;
24
+ "entity-card:github-actions/workflow-runs": _backstage_frontend_plugin_api.ExtensionDefinition<{
25
+ kind: "entity-card";
26
+ name: "workflow-runs";
27
+ config: {
28
+ filter: string | undefined;
29
+ };
30
+ configInput: {
31
+ filter?: string | undefined;
32
+ };
33
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
34
+ optional: true;
35
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
36
+ optional: true;
37
+ }>;
38
+ inputs: {};
39
+ params: {
40
+ loader: () => Promise<JSX.Element>;
41
+ filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
42
+ };
43
+ }>;
44
+ "entity-card:github-actions/latest-workflow-run": _backstage_frontend_plugin_api.ExtensionDefinition<{
45
+ config: {
46
+ props: {
47
+ branch: string;
48
+ };
49
+ } & {
50
+ filter: string | undefined;
51
+ };
52
+ configInput: {
53
+ props?: {
54
+ branch?: string | undefined;
55
+ } | undefined;
56
+ } & {
57
+ filter?: string | undefined;
58
+ };
59
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
60
+ optional: true;
61
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
62
+ optional: true;
63
+ }>;
64
+ inputs: {
65
+ [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.AnyExtensionDataRef, {
66
+ optional: boolean;
67
+ singleton: boolean;
68
+ }>;
69
+ };
70
+ kind: "entity-card";
71
+ name: "latest-workflow-run";
72
+ params: {
73
+ loader: () => Promise<JSX.Element>;
74
+ filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
75
+ };
76
+ }>;
77
+ "entity-card:github-actions/latest-branch-workflow-runs": _backstage_frontend_plugin_api.ExtensionDefinition<{
78
+ config: {
79
+ props: {
80
+ branch: string;
81
+ };
82
+ } & {
83
+ filter: string | undefined;
84
+ };
85
+ configInput: {
86
+ props?: {
87
+ branch?: string | undefined;
88
+ } | undefined;
89
+ } & {
90
+ filter?: string | undefined;
91
+ };
92
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
93
+ optional: true;
94
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
95
+ optional: true;
96
+ }>;
97
+ inputs: {
98
+ [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.AnyExtensionDataRef, {
99
+ optional: boolean;
100
+ singleton: boolean;
101
+ }>;
102
+ };
103
+ kind: "entity-card";
104
+ name: "latest-branch-workflow-runs";
105
+ params: {
106
+ loader: () => Promise<JSX.Element>;
107
+ filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
108
+ };
109
+ }>;
110
+ "entity-card:github-actions/recent-workflow-runs": _backstage_frontend_plugin_api.ExtensionDefinition<{
111
+ config: {
112
+ props: {
113
+ dense: boolean;
114
+ branch: string;
115
+ limit?: number | undefined;
116
+ };
117
+ } & {
118
+ filter: string | undefined;
119
+ };
120
+ configInput: {
121
+ props?: {
122
+ dense?: boolean | undefined;
123
+ branch?: string | undefined;
124
+ limit?: number | undefined;
125
+ } | undefined;
126
+ } & {
127
+ filter?: string | undefined;
128
+ };
129
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
130
+ optional: true;
131
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
132
+ optional: true;
133
+ }>;
134
+ inputs: {
135
+ [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.AnyExtensionDataRef, {
136
+ optional: boolean;
137
+ singleton: boolean;
138
+ }>;
139
+ };
140
+ kind: "entity-card";
141
+ name: "recent-workflow-runs";
142
+ params: {
143
+ loader: () => Promise<JSX.Element>;
144
+ filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
145
+ };
146
+ }>;
147
+ "entity-content:github-actions/entity": _backstage_frontend_plugin_api.ExtensionDefinition<{
148
+ kind: "entity-content";
149
+ name: "entity";
150
+ config: {
151
+ path: string | undefined;
152
+ title: string | undefined;
153
+ filter: string | undefined;
154
+ };
155
+ configInput: {
156
+ filter?: string | undefined;
157
+ title?: string | undefined;
158
+ path?: string | undefined;
159
+ };
160
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
161
+ optional: true;
162
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
163
+ optional: true;
164
+ }> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
165
+ optional: true;
166
+ }>;
167
+ inputs: {};
168
+ params: {
169
+ loader: () => Promise<JSX.Element>;
170
+ defaultPath: string;
171
+ defaultTitle: string;
172
+ routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
173
+ filter?: string | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
174
+ };
175
+ }>;
176
+ }>;
9
177
 
10
178
  export { _default as default };
package/dist/alpha.esm.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
2
- import { createPlugin } from '@backstage/frontend-plugin-api';
2
+ import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
3
  import { githubActionsApi } from './alpha/apis.esm.js';
4
4
  import { entityGithubActionsCard, entityLatestGithubActionRunCard, entityLatestGithubActionsForBranchCard, entityRecentGithubActionsRunsCard } from './alpha/entityCards.esm.js';
5
5
  import { entityGithubActionsContent } from './alpha/entityContent.esm.js';
6
6
  import { rootRouteRef } from './routes.esm.js';
7
7
 
8
- var alpha = createPlugin({
8
+ var alpha = createFrontendPlugin({
9
9
  id: "github-actions",
10
10
  routes: convertLegacyRouteRefs({
11
11
  entityContent: rootRouteRef
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["import { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createPlugin } from '@backstage/frontend-plugin-api';\nimport {\n entityGithubActionsCard,\n entityGithubActionsContent,\n entityLatestGithubActionRunCard,\n entityLatestGithubActionsForBranchCard,\n entityRecentGithubActionsRunsCard,\n githubActionsApi,\n} from './alpha/index';\nimport { rootRouteRef } from './routes';\n\n/**\n * @alpha\n */\nexport default createPlugin({\n id: 'github-actions',\n routes: convertLegacyRouteRefs({\n entityContent: rootRouteRef,\n }),\n extensions: [\n entityGithubActionsContent,\n entityGithubActionsCard,\n entityLatestGithubActionRunCard,\n entityLatestGithubActionsForBranchCard,\n entityRecentGithubActionsRunsCard,\n githubActionsApi,\n ],\n});\n"],"names":[],"mappings":";;;;;;;AAeA,YAAe,YAAa,CAAA;AAAA,EAC1B,EAAI,EAAA,gBAAA;AAAA,EACJ,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,aAAe,EAAA,YAAA;AAAA,GAChB,CAAA;AAAA,EACD,UAAY,EAAA;AAAA,IACV,0BAAA;AAAA,IACA,uBAAA;AAAA,IACA,+BAAA;AAAA,IACA,sCAAA;AAAA,IACA,iCAAA;AAAA,IACA,gBAAA;AAAA,GACF;AACF,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"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 { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport {\n entityGithubActionsCard,\n entityGithubActionsContent,\n entityLatestGithubActionRunCard,\n entityLatestGithubActionsForBranchCard,\n entityRecentGithubActionsRunsCard,\n githubActionsApi,\n} from './alpha/index';\nimport { rootRouteRef } from './routes';\n\n/**\n * @alpha\n */\nexport default createFrontendPlugin({\n id: 'github-actions',\n routes: convertLegacyRouteRefs({\n entityContent: rootRouteRef,\n }),\n extensions: [\n entityGithubActionsContent,\n entityGithubActionsCard,\n entityLatestGithubActionRunCard,\n entityLatestGithubActionsForBranchCard,\n entityRecentGithubActionsRunsCard,\n githubActionsApi,\n ],\n});\n"],"names":[],"mappings":";;;;;;;AA8BA,YAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,gBAAA;AAAA,EACJ,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,aAAe,EAAA,YAAA;AAAA,GAChB,CAAA;AAAA,EACD,UAAY,EAAA;AAAA,IACV,0BAAA;AAAA,IACA,uBAAA;AAAA,IACA,+BAAA;AAAA,IACA,sCAAA;AAAA,IACA,iCAAA;AAAA,IACA,gBAAA;AAAA,GACF;AACF,CAAC,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-github-actions",
3
- "version": "0.6.21",
3
+ "version": "0.6.23",
4
4
  "description": "A Backstage plugin that integrates towards GitHub Actions",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -19,6 +19,7 @@
19
19
  "default": "./dist/index.esm.js"
20
20
  },
21
21
  "./alpha": {
22
+ "backstage": "@backstage/FrontendPlugin",
22
23
  "import": "./dist/alpha.esm.js",
23
24
  "types": "./dist/alpha.d.ts",
24
25
  "default": "./dist/alpha.esm.js"
@@ -54,14 +55,14 @@
54
55
  "test": "backstage-cli package test"
55
56
  },
56
57
  "dependencies": {
57
- "@backstage/catalog-model": "^1.5.0",
58
- "@backstage/core-compat-api": "^0.2.7",
59
- "@backstage/core-components": "^0.14.9",
60
- "@backstage/core-plugin-api": "^1.9.3",
61
- "@backstage/frontend-plugin-api": "^0.6.7",
62
- "@backstage/integration": "^1.13.0",
63
- "@backstage/integration-react": "^1.1.29",
64
- "@backstage/plugin-catalog-react": "^1.12.2",
58
+ "@backstage/catalog-model": "^1.7.0",
59
+ "@backstage/core-compat-api": "^0.3.1",
60
+ "@backstage/core-components": "^0.15.1",
61
+ "@backstage/core-plugin-api": "^1.10.0",
62
+ "@backstage/frontend-plugin-api": "^0.9.0",
63
+ "@backstage/integration": "^1.15.1",
64
+ "@backstage/integration-react": "^1.2.0",
65
+ "@backstage/plugin-catalog-react": "^1.14.0",
65
66
  "@material-ui/core": "^4.12.2",
66
67
  "@material-ui/icons": "^4.9.1",
67
68
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -72,11 +73,11 @@
72
73
  "react-use": "^17.2.4"
73
74
  },
74
75
  "devDependencies": {
75
- "@backstage/cli": "^0.26.11",
76
- "@backstage/core-app-api": "^1.14.0",
77
- "@backstage/dev-utils": "^1.0.35",
78
- "@backstage/frontend-test-utils": "^0.1.10",
79
- "@backstage/test-utils": "^1.5.8",
76
+ "@backstage/cli": "^0.28.0",
77
+ "@backstage/core-app-api": "^1.15.1",
78
+ "@backstage/dev-utils": "^1.1.2",
79
+ "@backstage/frontend-test-utils": "^0.2.1",
80
+ "@backstage/test-utils": "^1.7.0",
80
81
  "@testing-library/dom": "^10.0.0",
81
82
  "@testing-library/jest-dom": "^6.0.0",
82
83
  "@testing-library/react": "^15.0.0",