@backstage/plugin-catalog-backend-module-gitlab-org 0.0.0-nightly-20240423021331
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 +13 -0
- package/README.md +8 -0
- package/dist/index.cjs.js +36 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/package.json +47 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @backstage/plugin-catalog-backend-module-gitlab-org
|
|
2
|
+
|
|
3
|
+
## 0.0.0-nightly-20240423021331
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a70377d: Added a new `catalog-backend-module-gitlab-org` module which adds the `GitlabOrgDiscoveryEntityProvider` to the catalog's providers using the new backend system.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-catalog-backend-module-gitlab@0.0.0-nightly-20240423021331
|
|
10
|
+
- @backstage/backend-common@0.0.0-nightly-20240423021331
|
|
11
|
+
- @backstage/backend-plugin-api@0.0.0-nightly-20240423021331
|
|
12
|
+
- @backstage/plugin-catalog-node@0.0.0-nightly-20240423021331
|
|
13
|
+
- @backstage/plugin-events-node@0.0.0-nightly-20240423021331
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Catalog Backend Module for GitLab Organizational Data
|
|
2
|
+
|
|
3
|
+
This is an extension module to the plugin-catalog-backend plugin that provides group and user entities by scrapping or receiving events from a GitLab instance.
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
See [Backstage documentation](https://backstage.io/docs/integrations/gitlab/org) for details on how to install
|
|
8
|
+
and configure the plugin.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var backendCommon = require('@backstage/backend-common');
|
|
6
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
7
|
+
var pluginCatalogBackendModuleGitlab = require('@backstage/plugin-catalog-backend-module-gitlab');
|
|
8
|
+
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
9
|
+
var pluginEventsNode = require('@backstage/plugin-events-node');
|
|
10
|
+
|
|
11
|
+
const catalogModuleGitlabOrgDiscoveryEntityProvider = backendPluginApi.createBackendModule({
|
|
12
|
+
pluginId: "catalog",
|
|
13
|
+
moduleId: "gitlabOrgDiscoveryEntityProvider",
|
|
14
|
+
register(env) {
|
|
15
|
+
env.registerInit({
|
|
16
|
+
deps: {
|
|
17
|
+
config: backendPluginApi.coreServices.rootConfig,
|
|
18
|
+
catalog: alpha.catalogProcessingExtensionPoint,
|
|
19
|
+
logger: backendPluginApi.coreServices.logger,
|
|
20
|
+
scheduler: backendPluginApi.coreServices.scheduler,
|
|
21
|
+
events: pluginEventsNode.eventsServiceRef
|
|
22
|
+
},
|
|
23
|
+
async init({ config, catalog, logger, scheduler, events }) {
|
|
24
|
+
const gitlabOrgDiscoveryEntityProvider = pluginCatalogBackendModuleGitlab.GitlabOrgDiscoveryEntityProvider.fromConfig(config, {
|
|
25
|
+
logger: backendCommon.loggerToWinstonLogger(logger),
|
|
26
|
+
events,
|
|
27
|
+
scheduler
|
|
28
|
+
});
|
|
29
|
+
catalog.addEntityProvider(gitlabOrgDiscoveryEntityProvider);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
exports.default = catalogModuleGitlabOrgDiscoveryEntityProvider;
|
|
36
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/catalogModuleGitlabOrgDiscoveryEntityProvider.ts"],"sourcesContent":["/*\n * Copyright 2022 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 */\n\nimport { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { GitlabOrgDiscoveryEntityProvider } from '@backstage/plugin-catalog-backend-module-gitlab';\nimport { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';\nimport { eventsServiceRef } from '@backstage/plugin-events-node';\n\n/**\n * Registers the GitlabOrgDiscoveryEntityProvider with the catalog processing extension point.\n *\n * @public\n */\nexport const catalogModuleGitlabOrgDiscoveryEntityProvider =\n createBackendModule({\n pluginId: 'catalog',\n moduleId: 'gitlabOrgDiscoveryEntityProvider',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n catalog: catalogProcessingExtensionPoint,\n logger: coreServices.logger,\n scheduler: coreServices.scheduler,\n events: eventsServiceRef,\n },\n async init({ config, catalog, logger, scheduler, events }) {\n const gitlabOrgDiscoveryEntityProvider =\n GitlabOrgDiscoveryEntityProvider.fromConfig(config, {\n logger: loggerToWinstonLogger(logger),\n events,\n scheduler,\n });\n catalog.addEntityProvider(gitlabOrgDiscoveryEntityProvider);\n },\n });\n },\n });\n"],"names":["createBackendModule","coreServices","catalogProcessingExtensionPoint","eventsServiceRef","GitlabOrgDiscoveryEntityProvider","loggerToWinstonLogger"],"mappings":";;;;;;;;;;AA8BO,MAAM,gDACXA,oCAAoB,CAAA;AAAA,EAClB,QAAU,EAAA,SAAA;AAAA,EACV,QAAU,EAAA,kCAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,UAAA;AAAA,QACrB,OAAS,EAAAC,qCAAA;AAAA,QACT,QAAQD,6BAAa,CAAA,MAAA;AAAA,QACrB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,MAAQ,EAAAE,iCAAA;AAAA,OACV;AAAA,MACA,MAAM,KAAK,EAAE,MAAA,EAAQ,SAAS,MAAQ,EAAA,SAAA,EAAW,QAAU,EAAA;AACzD,QAAM,MAAA,gCAAA,GACJC,iEAAiC,CAAA,UAAA,CAAW,MAAQ,EAAA;AAAA,UAClD,MAAA,EAAQC,oCAAsB,MAAM,CAAA;AAAA,UACpC,MAAA;AAAA,UACA,SAAA;AAAA,SACD,CAAA,CAAA;AACH,QAAA,OAAA,CAAQ,kBAAkB,gCAAgC,CAAA,CAAA;AAAA,OAC5D;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Registers the GitlabOrgDiscoveryEntityProvider with the catalog processing extension point.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
declare const catalogModuleGitlabOrgDiscoveryEntityProvider: () => _backstage_backend_plugin_api.BackendFeature;
|
|
9
|
+
|
|
10
|
+
export { catalogModuleGitlabOrgDiscoveryEntityProvider as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@backstage/plugin-catalog-backend-module-gitlab-org",
|
|
3
|
+
"version": "0.0.0-nightly-20240423021331",
|
|
4
|
+
"description": "The gitlab-org backend module for the catalog plugin.",
|
|
5
|
+
"backstage": {
|
|
6
|
+
"role": "backend-plugin-module"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"main": "dist/index.cjs.js",
|
|
11
|
+
"types": "dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/backstage/backstage",
|
|
16
|
+
"directory": "plugins/catalog-backend-module-gitlab-org"
|
|
17
|
+
},
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"main": "dist/index.cjs.js",
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "backstage-cli package build",
|
|
26
|
+
"clean": "backstage-cli package clean",
|
|
27
|
+
"lint": "backstage-cli package lint",
|
|
28
|
+
"prepack": "backstage-cli package prepack",
|
|
29
|
+
"postpack": "backstage-cli package postpack",
|
|
30
|
+
"start": "backstage-cli package start",
|
|
31
|
+
"test": "backstage-cli package test"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@backstage/backend-common": "^0.0.0-nightly-20240423021331",
|
|
35
|
+
"@backstage/backend-plugin-api": "^0.0.0-nightly-20240423021331",
|
|
36
|
+
"@backstage/plugin-catalog-backend-module-gitlab": "^0.0.0-nightly-20240423021331",
|
|
37
|
+
"@backstage/plugin-catalog-node": "^0.0.0-nightly-20240423021331",
|
|
38
|
+
"@backstage/plugin-events-node": "^0.0.0-nightly-20240423021331"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@backstage/backend-tasks": "^0.0.0-nightly-20240423021331",
|
|
42
|
+
"@backstage/backend-test-utils": "^0.0.0-nightly-20240423021331",
|
|
43
|
+
"@backstage/cli": "^0.0.0-nightly-20240423021331",
|
|
44
|
+
"@backstage/plugin-events-backend-test-utils": "^0.0.0-nightly-20240423021331",
|
|
45
|
+
"luxon": "^3.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|