@backstage/plugin-events-backend-module-gerrit 0.2.11 → 0.2.12-next.1
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 +16 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +4 -20
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/index.cjs.js +1 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/{cjs/GerritEventRouter-c3WlLA-X.cjs.js → router/GerritEventRouter.cjs.js} +1 -1
- package/dist/router/GerritEventRouter.cjs.js.map +1 -0
- package/dist/service/eventsModuleGerritEventRouter.cjs.js +24 -0
- package/dist/service/eventsModuleGerritEventRouter.cjs.js.map +1 -0
- package/package.json +7 -6
- package/dist/cjs/GerritEventRouter-c3WlLA-X.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-events-backend-module-gerrit
|
|
2
2
|
|
|
3
|
+
## 0.2.12-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-plugin-api@1.0.1-next.1
|
|
9
|
+
- @backstage/plugin-events-node@0.4.1-next.1
|
|
10
|
+
|
|
11
|
+
## 0.2.12-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/plugin-events-node@0.4.1-next.0
|
|
17
|
+
- @backstage/backend-plugin-api@1.0.1-next.0
|
|
18
|
+
|
|
3
19
|
## 0.2.11
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -2,26 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var pluginEventsNode = require('@backstage/plugin-events-node');
|
|
7
|
-
var GerritEventRouter = require('./cjs/GerritEventRouter-c3WlLA-X.cjs.js');
|
|
5
|
+
var eventsModuleGerritEventRouter = require('./service/eventsModuleGerritEventRouter.cjs.js');
|
|
8
6
|
|
|
9
|
-
const eventsModuleGerritEventRouter = backendPluginApi.createBackendModule({
|
|
10
|
-
pluginId: "events",
|
|
11
|
-
moduleId: "gerrit-event-router",
|
|
12
|
-
register(env) {
|
|
13
|
-
env.registerInit({
|
|
14
|
-
deps: {
|
|
15
|
-
events: pluginEventsNode.eventsServiceRef
|
|
16
|
-
},
|
|
17
|
-
async init({ events }) {
|
|
18
|
-
const eventRouter = new GerritEventRouter.GerritEventRouter({ events });
|
|
19
|
-
await eventRouter.subscribe();
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
7
|
|
|
25
|
-
|
|
26
|
-
exports.
|
|
8
|
+
|
|
9
|
+
exports.default = eventsModuleGerritEventRouter.eventsModuleGerritEventRouter;
|
|
10
|
+
exports.eventsModuleGerritEventRouter = eventsModuleGerritEventRouter.eventsModuleGerritEventRouter;
|
|
27
11
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":[
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/dist/index.cjs.js
CHANGED
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GerritEventRouter.cjs.js","sources":["../../src/router/GerritEventRouter.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 {\n EventParams,\n EventsService,\n SubTopicEventRouter,\n} from '@backstage/plugin-events-node';\n\n/**\n * Subscribes to the generic `gerrit` topic\n * and publishes the events under the more concrete sub-topic\n * depending on the `$.type` field provided.\n *\n * @public\n */\nexport class GerritEventRouter extends SubTopicEventRouter {\n constructor(options: { events: EventsService }) {\n super({\n events: options.events,\n topic: 'gerrit',\n });\n }\n\n protected getSubscriberId(): string {\n return 'GerritEventRouter';\n }\n\n protected determineSubTopic(params: EventParams): string | undefined {\n if ('type' in (params.eventPayload as object)) {\n const payload = params.eventPayload as { type: string };\n return payload.type;\n }\n\n return undefined;\n }\n}\n"],"names":["SubTopicEventRouter"],"mappings":";;;;AA6BO,MAAM,0BAA0BA,oCAAoB,CAAA;AAAA,EACzD,YAAY,OAAoC,EAAA;AAC9C,IAAM,KAAA,CAAA;AAAA,MACJ,QAAQ,OAAQ,CAAA,MAAA;AAAA,MAChB,KAAO,EAAA,QAAA;AAAA,KACR,CAAA,CAAA;AAAA,GACH;AAAA,EAEU,eAA0B,GAAA;AAClC,IAAO,OAAA,mBAAA,CAAA;AAAA,GACT;AAAA,EAEU,kBAAkB,MAAyC,EAAA;AACnE,IAAI,IAAA,MAAA,IAAW,OAAO,YAAyB,EAAA;AAC7C,MAAA,MAAM,UAAU,MAAO,CAAA,YAAA,CAAA;AACvB,MAAA,OAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,KACjB;AAEA,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AACF;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
var pluginEventsNode = require('@backstage/plugin-events-node');
|
|
5
|
+
var GerritEventRouter = require('../router/GerritEventRouter.cjs.js');
|
|
6
|
+
|
|
7
|
+
const eventsModuleGerritEventRouter = backendPluginApi.createBackendModule({
|
|
8
|
+
pluginId: "events",
|
|
9
|
+
moduleId: "gerrit-event-router",
|
|
10
|
+
register(env) {
|
|
11
|
+
env.registerInit({
|
|
12
|
+
deps: {
|
|
13
|
+
events: pluginEventsNode.eventsServiceRef
|
|
14
|
+
},
|
|
15
|
+
async init({ events }) {
|
|
16
|
+
const eventRouter = new GerritEventRouter.GerritEventRouter({ events });
|
|
17
|
+
await eventRouter.subscribe();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
exports.eventsModuleGerritEventRouter = eventsModuleGerritEventRouter;
|
|
24
|
+
//# sourceMappingURL=eventsModuleGerritEventRouter.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventsModuleGerritEventRouter.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 { eventsServiceRef } from '@backstage/plugin-events-node';\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: eventsServiceRef,\n },\n async init({ events }) {\n const eventRouter = new GerritEventRouter({ events });\n await eventRouter.subscribe();\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsServiceRef","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,iCAAA;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAU,EAAA;AACrB,QAAA,MAAM,WAAc,GAAA,IAAIC,mCAAkB,CAAA,EAAE,QAAQ,CAAA,CAAA;AACpD,QAAA,MAAM,YAAY,SAAU,EAAA,CAAA;AAAA,OAC9B;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-events-backend-module-gerrit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12-next.1",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "backend-plugin-module",
|
|
6
6
|
"pluginId": "events",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"default": "./dist/index.cjs.js"
|
|
24
24
|
},
|
|
25
25
|
"./alpha": {
|
|
26
|
+
"backstage": "@backstage/BackendFeature",
|
|
26
27
|
"require": "./dist/alpha.cjs.js",
|
|
27
28
|
"types": "./dist/alpha.d.ts",
|
|
28
29
|
"default": "./dist/alpha.cjs.js"
|
|
@@ -45,12 +46,12 @@
|
|
|
45
46
|
"test": "backstage-cli package test"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@backstage/backend-plugin-api": "
|
|
49
|
-
"@backstage/plugin-events-node": "
|
|
49
|
+
"@backstage/backend-plugin-api": "1.0.1-next.1",
|
|
50
|
+
"@backstage/plugin-events-node": "0.4.1-next.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@backstage/backend-test-utils": "
|
|
53
|
-
"@backstage/cli": "
|
|
54
|
-
"@backstage/plugin-events-backend-test-utils": "
|
|
53
|
+
"@backstage/backend-test-utils": "1.0.1-next.2",
|
|
54
|
+
"@backstage/cli": "0.28.0-next.2",
|
|
55
|
+
"@backstage/plugin-events-backend-test-utils": "0.1.36-next.1"
|
|
55
56
|
}
|
|
56
57
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GerritEventRouter-c3WlLA-X.cjs.js","sources":["../../src/router/GerritEventRouter.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 {\n EventParams,\n EventsService,\n SubTopicEventRouter,\n} from '@backstage/plugin-events-node';\n\n/**\n * Subscribes to the generic `gerrit` topic\n * and publishes the events under the more concrete sub-topic\n * depending on the `$.type` field provided.\n *\n * @public\n */\nexport class GerritEventRouter extends SubTopicEventRouter {\n constructor(options: { events: EventsService }) {\n super({\n events: options.events,\n topic: 'gerrit',\n });\n }\n\n protected getSubscriberId(): string {\n return 'GerritEventRouter';\n }\n\n protected determineSubTopic(params: EventParams): string | undefined {\n if ('type' in (params.eventPayload as object)) {\n const payload = params.eventPayload as { type: string };\n return payload.type;\n }\n\n return undefined;\n }\n}\n"],"names":["SubTopicEventRouter"],"mappings":";;;;AA6BO,MAAM,0BAA0BA,oCAAoB,CAAA;AAAA,EACzD,YAAY,OAAoC,EAAA;AAC9C,IAAM,KAAA,CAAA;AAAA,MACJ,QAAQ,OAAQ,CAAA,MAAA;AAAA,MAChB,KAAO,EAAA,QAAA;AAAA,KACR,CAAA,CAAA;AAAA,GACH;AAAA,EAEU,eAA0B,GAAA;AAClC,IAAO,OAAA,mBAAA,CAAA;AAAA,GACT;AAAA,EAEU,kBAAkB,MAAyC,EAAA;AACnE,IAAI,IAAA,MAAA,IAAW,OAAO,YAAyB,EAAA;AAC7C,MAAA,MAAM,UAAU,MAAO,CAAA,YAAA,CAAA;AACvB,MAAA,OAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,KACjB;AAEA,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AACF;;;;"}
|