@backstage/plugin-events-backend-module-gerrit 0.1.19-next.2 → 0.1.19
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 +10 -0
- package/README.md +8 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -0
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @backstage/plugin-events-backend-module-gerrit
|
|
2
2
|
|
|
3
|
+
## 0.1.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- af76a95: Add default exports for the new backend system and documentation.
|
|
8
|
+
- 4016f21: Remove some unused dependencies
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/backend-plugin-api@0.6.9
|
|
11
|
+
- @backstage/plugin-events-node@0.2.18
|
|
12
|
+
|
|
3
13
|
## 0.1.19-next.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -30,6 +30,14 @@ Install this module:
|
|
|
30
30
|
yarn add --cwd packages/backend @backstage/plugin-events-backend-module-gerrit
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
### Add to backend
|
|
34
|
+
|
|
35
|
+
```ts title="packages/backend/src/index.ts"
|
|
36
|
+
backend.add(import('@backstage/plugin-events-backend-module-gerrit/alpha'));
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Add to backend (old)
|
|
40
|
+
|
|
33
41
|
Add the event router to the `EventsBackend` instance in `packages/backend/src/plugins/events.ts`:
|
|
34
42
|
|
|
35
43
|
```diff
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/service/eventsModuleGerritEventRouter.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 { createBackendModule } from '@backstage/backend-plugin-api';\nimport { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';\nimport { GerritEventRouter } from '../router/GerritEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for Gerrit.\n *\n * Registers the `GerritEventRouter`.\n *\n * @alpha\n */\nexport const eventsModuleGerritEventRouter = createBackendModule({\n pluginId: 'events',\n moduleId: 'gerrit-event-router',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsExtensionPoint,\n },\n async init({ events }) {\n const eventRouter = new GerritEventRouter();\n\n events.addPublishers(eventRouter);\n events.addSubscribers(eventRouter);\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsExtensionPoint","GerritEventRouter"],"mappings":";;;;;;;;;AA2BO,MAAM,gCAAgCA,oCAAoB,CAAA;AAAA,EAC/D,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,qBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,MAAQ,EAAAC,0BAAA;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAU,EAAA;AACrB,QAAM,MAAA,WAAA,GAAc,IAAIC,mCAAkB,EAAA,CAAA;AAE1C,QAAA,MAAA,CAAO,cAAc,WAAW,CAAA,CAAA;AAChC,QAAA,MAAA,CAAO,eAAe,WAAW,CAAA,CAAA;AAAA,OACnC;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/service/eventsModuleGerritEventRouter.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 { createBackendModule } from '@backstage/backend-plugin-api';\nimport { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';\nimport { GerritEventRouter } from '../router/GerritEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for Gerrit.\n *\n * Registers the `GerritEventRouter`.\n *\n * @alpha\n */\nexport const eventsModuleGerritEventRouter = createBackendModule({\n pluginId: 'events',\n moduleId: 'gerrit-event-router',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsExtensionPoint,\n },\n async init({ events }) {\n const eventRouter = new GerritEventRouter();\n\n events.addPublishers(eventRouter);\n events.addSubscribers(eventRouter);\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsExtensionPoint","GerritEventRouter"],"mappings":";;;;;;;;;AA2BO,MAAM,gCAAgCA,oCAAoB,CAAA;AAAA,EAC/D,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,qBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,MAAQ,EAAAC,0BAAA;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAU,EAAA;AACrB,QAAM,MAAA,WAAA,GAAc,IAAIC,mCAAkB,EAAA,CAAA;AAE1C,QAAA,MAAA,CAAO,cAAc,WAAW,CAAA,CAAA;AAChC,QAAA,MAAA,CAAO,eAAe,WAAW,CAAA,CAAA;AAAA,OACnC;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const eventsModuleGerritEventRouter: () => _backstage_backend_plugin_api.BackendFeature;
|
|
11
11
|
|
|
12
|
-
export { eventsModuleGerritEventRouter };
|
|
12
|
+
export { eventsModuleGerritEventRouter as default, eventsModuleGerritEventRouter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-events-backend-module-gerrit",
|
|
3
|
-
"version": "0.1.19
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"postpack": "backstage-cli package postpack"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@backstage/backend-plugin-api": "^0.6.9
|
|
43
|
-
"@backstage/plugin-events-node": "^0.2.18
|
|
42
|
+
"@backstage/backend-plugin-api": "^0.6.9",
|
|
43
|
+
"@backstage/plugin-events-node": "^0.2.18",
|
|
44
44
|
"winston": "^3.2.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@backstage/backend-test-utils": "^0.2.10
|
|
48
|
-
"@backstage/cli": "^0.25.1
|
|
49
|
-
"@backstage/plugin-events-backend-test-utils": "^0.1.19
|
|
47
|
+
"@backstage/backend-test-utils": "^0.2.10",
|
|
48
|
+
"@backstage/cli": "^0.25.1",
|
|
49
|
+
"@backstage/plugin-events-backend-test-utils": "^0.1.19"
|
|
50
50
|
},
|
|
51
51
|
"files": [
|
|
52
52
|
"dist",
|