Skip to content

Commit

Permalink
RHIDP-2339: Switch to upstream GitLab catalog providers with event su…
Browse files Browse the repository at this point in the history
…pport
  • Loading branch information
jesuino committed Jun 28, 2024
1 parent e8bf79b commit ce636d3
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"types": "dist/index.d.ts"
},
"backstage": {
"role": "backend-plugin-module"
"role": "backend-plugin-module",
"supported-versions": "1.26.5"
},
"exports": {
".": {
Expand All @@ -22,6 +23,7 @@
},
"scripts": {},
"dependencies": {
"@gitbeaker/rest": "^40.0.3",
"lodash": "^4.17.21",
"node-fetch": "^2.6.7",
"uuid": "^9.0.0"
Expand All @@ -30,15 +32,32 @@
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/janus-idp/backstage-showcase",
"directory": "dynamic-plugins/wrappers/backstage-plugin-catalog-backend-module-gitlab-org-dynamic"
},
"maintainers": [
"@janus-idp/maintainers-showcase"
],
"author": "Red Hat",
"homepage": "https://red.ht/rhdh",
"bugs": "https://issues.redhat.com/browse/RHIDP",
"keywords": [
"support:tech-preview",
"lifecycle:active"
],
"bundleDependencies": true,
"peerDependencies": {
"@backstage/backend-common": "0.21.7",
"@backstage/backend-plugin-api": "0.6.17",
"@backstage/plugin-catalog-node": "1.11.1",
"@backstage/backend-tasks": "^0.5.22",
"@backstage/catalog-model": "^1.4.5",
"@backstage/backend-common": "^0.22.0",
"@backstage/backend-plugin-api": "^0.6.18",
"@backstage/backend-tasks": "^0.5.23",
"@backstage/catalog-model": "^1.5.0",
"@backstage/config": "^1.2.0",
"@backstage/integration": "^1.10.0"
"@backstage/integration": "^1.11.0",
"@backstage/plugin-catalog-common": "^1.0.23",
"@backstage/plugin-catalog-node": "^1.12.0",
"@backstage/plugin-events-node": "^0.3.4"
},
"overrides": {
"@aws-sdk/util-utf8-browser": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,33 @@
"@smithy/util-buffer-from" "^2.2.0"
tslib "^2.6.2"

"@gitbeaker/core@^40.0.3":
version "40.0.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/core/-/core-40.0.3.tgz#27ce6a9778a98673c03d77cd5c79c63727898bd7"
integrity sha512-MzeY4oCtoa9zmPIkQIdC2KU8cGmHIXwnAi0L6jjjouqjy6kcA4BydZf8W5Xsj27Rw5iiyhfj8YC1/O3CgrzvCQ==
dependencies:
"@gitbeaker/requester-utils" "^40.0.3"
qs "^6.11.2"
xcase "^2.0.1"

"@gitbeaker/requester-utils@^40.0.3":
version "40.0.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/requester-utils/-/requester-utils-40.0.3.tgz#e30f84d3e1cdb2e21b6f92431cd9d6822de7e545"
integrity sha512-L8JpuMIsvXTHfu/2wXzkc5QyfQJSWg4XyEPStHq1ig5SAcbxxqbBoe8ed27eUXLah+PcGrPInMK4cCMxhQm41g==
dependencies:
picomatch-browser "^2.2.6"
qs "^6.11.2"
rate-limiter-flexible "^4.0.0"
xcase "^2.0.1"

"@gitbeaker/rest@^40.0.3":
version "40.0.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/rest/-/rest-40.0.3.tgz#12ced15b57bf2774c3349efdcdc78b65f1a4f762"
integrity sha512-ihaA0GX3yCo4oUWbISkcjFMIw+WxDAC9L+bEYq2irz4wpv/0EpAU/0jKjggPzY4cGWL9VAyPhew77VeACv4YWw==
dependencies:
"@gitbeaker/core" "^40.0.3"
"@gitbeaker/requester-utils" "^40.0.3"

"@smithy/is-array-buffer@^2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz#f84f0d9f9a36601a9ca9381688bd1b726fd39111"
Expand All @@ -25,6 +52,85 @@
"@smithy/is-array-buffer" "^2.2.0"
tslib "^2.6.2"

call-bind@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"
integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==
dependencies:
es-define-property "^1.0.0"
es-errors "^1.3.0"
function-bind "^1.1.2"
get-intrinsic "^1.2.4"
set-function-length "^1.2.1"

define-data-property@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e"
integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
dependencies:
es-define-property "^1.0.0"
es-errors "^1.3.0"
gopd "^1.0.1"

es-define-property@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845"
integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==
dependencies:
get-intrinsic "^1.2.4"

es-errors@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==

function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==

get-intrinsic@^1.1.3, get-intrinsic@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd"
integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
dependencies:
es-errors "^1.3.0"
function-bind "^1.1.2"
has-proto "^1.0.1"
has-symbols "^1.0.3"
hasown "^2.0.0"

gopd@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
dependencies:
get-intrinsic "^1.1.3"

has-property-descriptors@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
dependencies:
es-define-property "^1.0.0"

has-proto@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd"
integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==

has-symbols@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==

hasown@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
dependencies:
function-bind "^1.1.2"

lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
Expand All @@ -37,6 +143,50 @@ node-fetch@^2.6.7:
dependencies:
whatwg-url "^5.0.0"

object-inspect@^1.13.1:
version "1.13.2"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff"
integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==

picomatch-browser@^2.2.6:
version "2.2.6"
resolved "https://registry.yarnpkg.com/picomatch-browser/-/picomatch-browser-2.2.6.tgz#e0626204575eb49f019f2f2feac24fc3b53e7a8a"
integrity sha512-0ypsOQt9D4e3hziV8O4elD9uN0z/jtUEfxVRtNaAAtXIyUx9m/SzlO020i8YNL2aL/E6blOvvHQcin6HZlFy/w==

qs@^6.11.2:
version "6.12.1"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.1.tgz#39422111ca7cbdb70425541cba20c7d7b216599a"
integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==
dependencies:
side-channel "^1.0.6"

rate-limiter-flexible@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/rate-limiter-flexible/-/rate-limiter-flexible-4.0.1.tgz#79b0ce111abe9c5da41d6fddf7cca93cedd3a8fc"
integrity sha512-2/dGHpDFpeA0+755oUkW+EKyklqLS9lu0go9pDsbhqQjZcxfRyJ6LA4JI0+HAdZ2bemD/oOjUeZQB2lCZqXQfQ==

set-function-length@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
dependencies:
define-data-property "^1.1.4"
es-errors "^1.3.0"
function-bind "^1.1.2"
get-intrinsic "^1.2.4"
gopd "^1.0.1"
has-property-descriptors "^1.0.2"

side-channel@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==
dependencies:
call-bind "^1.0.7"
es-errors "^1.3.0"
get-intrinsic "^1.2.4"
object-inspect "^1.13.1"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
Expand Down Expand Up @@ -64,3 +214,8 @@ whatwg-url@^5.0.0:
dependencies:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"

xcase@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/xcase/-/xcase-2.0.1.tgz#c7fa72caa0f440db78fd5673432038ac984450b9"
integrity sha512-UmFXIPU+9Eg3E9m/728Bii0lAIuoc+6nbrNUKaRPJOFp91ih44qqGlWtxMB6kXFrRD6po+86ksHM5XHCfk6iPw==
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
"export-dynamic": "janus-cli package export-dynamic-plugin --embed-package @backstage/plugin-catalog-backend-module-gitlab --override-interop default --no-embed-as-dependencies"
},
"dependencies": {
"@backstage/backend-common": "0.21.7",
"@backstage/backend-plugin-api": "0.6.17",
"@backstage/plugin-catalog-backend-module-gitlab": "0.3.15",
"@backstage/plugin-catalog-node": "1.11.1"
"@backstage/backend-common": "^0.22.0",
"@backstage/plugin-catalog-backend-module-gitlab": "0.3.16"
},
"devDependencies": {
"@backstage/cli": "0.26.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import {
coreServices,
createBackendModule,
} from '@backstage/backend-plugin-api';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node';
import { GitlabOrgDiscoveryEntityProvider } from '@backstage/plugin-catalog-backend-module-gitlab';
import { eventsServiceRef } from '@backstage/plugin-events-node';

export const catalogModuleGitlabOrgDiscoveryEntityProvider =
createBackendModule({
Expand All @@ -26,12 +27,14 @@ export const catalogModuleGitlabOrgDiscoveryEntityProvider =
catalog: catalogProcessingExtensionPoint,
logger: coreServices.logger,
scheduler: coreServices.scheduler,
events: eventsServiceRef,
},
async init({ config, catalog, logger, scheduler }) {
async init({ config, catalog, logger, scheduler, events }) {
catalog.addEntityProvider(
GitlabOrgDiscoveryEntityProvider.fromConfig(config, {
logger: loggerToWinstonLogger(logger),
scheduler,
events: events,
}),
);
},
Expand Down
74 changes: 60 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5621,6 +5621,25 @@
node-fetch "^2.6.7"
uuid "^9.0.0"

"@backstage/[email protected]":
version "0.3.16"
resolved "https://registry.yarnpkg.com/@backstage/plugin-catalog-backend-module-gitlab/-/plugin-catalog-backend-module-gitlab-0.3.16.tgz#edb201282898eee0f122ec046c0ea7730241cd8d"
integrity sha512-FVh5kllpTkOoQdMtWo9dBKQoBvg4QvDpQ9WQf58kYKgeCJC+R+okI78Avs0g3SHDoN67nyX0M2qF7LiBXggq6A==
dependencies:
"@backstage/backend-common" "^0.22.0"
"@backstage/backend-plugin-api" "^0.6.18"
"@backstage/backend-tasks" "^0.5.23"
"@backstage/catalog-model" "^1.5.0"
"@backstage/config" "^1.2.0"
"@backstage/integration" "^1.11.0"
"@backstage/plugin-catalog-common" "^1.0.23"
"@backstage/plugin-catalog-node" "^1.12.0"
"@backstage/plugin-events-node" "^0.3.4"
"@gitbeaker/rest" "^40.0.3"
lodash "^4.17.21"
node-fetch "^2.6.7"
uuid "^9.0.0"

"@backstage/[email protected]":
version "0.1.35"
resolved "https://registry.yarnpkg.com/@backstage/plugin-catalog-backend-module-openapi/-/plugin-catalog-backend-module-openapi-0.1.35.tgz#9c3cd6cf514f85db842f27d36b410cda3cfeabe2"
Expand Down Expand Up @@ -5847,20 +5866,6 @@
react-use "^17.2.4"
yaml "^2.0.0"

"@backstage/[email protected]", "@backstage/plugin-catalog-node@^1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@backstage/plugin-catalog-node/-/plugin-catalog-node-1.11.1.tgz#ca848175ca4310106899e5ebe357e753df5922d4"
integrity sha512-9VlPc6wgCN+5phN6Yc0mAzHGfRrNQKZd+AyMH4Tt2ggiSt1qgasoQyLqgJrlqsrA8aOPJmFjq5ROiJSB+bmkVg==
dependencies:
"@backstage/backend-plugin-api" "^0.6.17"
"@backstage/catalog-client" "^1.6.4"
"@backstage/catalog-model" "^1.4.5"
"@backstage/errors" "^1.2.4"
"@backstage/plugin-catalog-common" "^1.0.22"
"@backstage/plugin-permission-common" "^0.7.13"
"@backstage/plugin-permission-node" "^0.7.28"
"@backstage/types" "^1.1.1"

"@backstage/plugin-catalog-node@^1.11.0":
version "1.11.0"
resolved "https://registry.yarnpkg.com/@backstage/plugin-catalog-node/-/plugin-catalog-node-1.11.0.tgz#02c458f18da1fda9e4863e0ed450a6560c7401ea"
Expand All @@ -5875,6 +5880,20 @@
"@backstage/plugin-permission-node" "^0.7.27"
"@backstage/types" "^1.1.1"

"@backstage/plugin-catalog-node@^1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@backstage/plugin-catalog-node/-/plugin-catalog-node-1.11.1.tgz#ca848175ca4310106899e5ebe357e753df5922d4"
integrity sha512-9VlPc6wgCN+5phN6Yc0mAzHGfRrNQKZd+AyMH4Tt2ggiSt1qgasoQyLqgJrlqsrA8aOPJmFjq5ROiJSB+bmkVg==
dependencies:
"@backstage/backend-plugin-api" "^0.6.17"
"@backstage/catalog-client" "^1.6.4"
"@backstage/catalog-model" "^1.4.5"
"@backstage/errors" "^1.2.4"
"@backstage/plugin-catalog-common" "^1.0.22"
"@backstage/plugin-permission-common" "^0.7.13"
"@backstage/plugin-permission-node" "^0.7.28"
"@backstage/types" "^1.1.1"

"@backstage/plugin-catalog-node@^1.12.0":
version "1.12.0"
resolved "https://registry.yarnpkg.com/@backstage/plugin-catalog-node/-/plugin-catalog-node-1.12.0.tgz#513bd374d48c605c664aa77c7350c8585eb9e56e"
Expand Down Expand Up @@ -8138,6 +8157,15 @@
qs "^6.11.2"
xcase "^2.0.1"

"@gitbeaker/core@^40.0.3":
version "40.0.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/core/-/core-40.0.3.tgz#27ce6a9778a98673c03d77cd5c79c63727898bd7"
integrity sha512-MzeY4oCtoa9zmPIkQIdC2KU8cGmHIXwnAi0L6jjjouqjy6kcA4BydZf8W5Xsj27Rw5iiyhfj8YC1/O3CgrzvCQ==
dependencies:
"@gitbeaker/requester-utils" "^40.0.3"
qs "^6.11.2"
xcase "^2.0.1"

"@gitbeaker/node@^35.8.0":
version "35.8.1"
resolved "https://registry.yarnpkg.com/@gitbeaker/node/-/node-35.8.1.tgz#d67885c827f2d7405afd7e39538a230721756e5c"
Expand Down Expand Up @@ -8168,6 +8196,16 @@
rate-limiter-flexible "^4.0.0"
xcase "^2.0.1"

"@gitbeaker/requester-utils@^40.0.3":
version "40.0.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/requester-utils/-/requester-utils-40.0.3.tgz#e30f84d3e1cdb2e21b6f92431cd9d6822de7e545"
integrity sha512-L8JpuMIsvXTHfu/2wXzkc5QyfQJSWg4XyEPStHq1ig5SAcbxxqbBoe8ed27eUXLah+PcGrPInMK4cCMxhQm41g==
dependencies:
picomatch-browser "^2.2.6"
qs "^6.11.2"
rate-limiter-flexible "^4.0.0"
xcase "^2.0.1"

"@gitbeaker/rest@^39.25.0":
version "39.34.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/rest/-/rest-39.34.3.tgz#3e3582766e45d5591353e8c4445e345460665ea1"
Expand All @@ -8176,6 +8214,14 @@
"@gitbeaker/core" "^39.34.3"
"@gitbeaker/requester-utils" "^39.34.3"

"@gitbeaker/rest@^40.0.3":
version "40.0.3"
resolved "https://registry.yarnpkg.com/@gitbeaker/rest/-/rest-40.0.3.tgz#12ced15b57bf2774c3349efdcdc78b65f1a4f762"
integrity sha512-ihaA0GX3yCo4oUWbISkcjFMIw+WxDAC9L+bEYq2irz4wpv/0EpAU/0jKjggPzY4cGWL9VAyPhew77VeACv4YWw==
dependencies:
"@gitbeaker/core" "^40.0.3"
"@gitbeaker/requester-utils" "^40.0.3"

"@google-cloud/container@^5.0.0":
version "5.8.0"
resolved "https://registry.yarnpkg.com/@google-cloud/container/-/container-5.8.0.tgz#26cea2c9be460ed2a914829834c2e97aa2c0f536"
Expand Down

0 comments on commit ce636d3

Please sign in to comment.