@backstage/plugin-events-backend-module-gerrit 0.1.5-next.2 → 0.1.6-next.0

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,23 @@
1
1
  # @backstage/plugin-events-backend-module-gerrit
2
2
 
3
+ ## 0.1.6-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/backend-plugin-api@0.5.1-next.0
9
+ - @backstage/plugin-events-node@0.2.5-next.0
10
+
11
+ ## 0.1.5
12
+
13
+ ### Patch Changes
14
+
15
+ - a5de745ac17: Renamed `gerritEventRouterEventsModule` to `eventsModuleGerritEventRouter` to match the [recommended naming patterns](https://backstage.io/docs/backend-system/architecture/naming-patterns).
16
+ - 928a12a9b3e: Internal refactor of `/alpha` exports.
17
+ - Updated dependencies
18
+ - @backstage/backend-plugin-api@0.5.0
19
+ - @backstage/plugin-events-node@0.2.4
20
+
3
21
  ## 0.1.5-next.2
4
22
 
5
23
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-module-gerrit",
3
- "version": "0.1.5-next.2",
3
+ "version": "0.1.6-next.0",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -19,7 +19,7 @@ class GerritEventRouter extends pluginEventsNode.SubTopicEventRouter {
19
19
  }
20
20
  }
21
21
 
22
- const gerritEventRouterEventsModule = backendPluginApi.createBackendModule({
22
+ const eventsModuleGerritEventRouter = backendPluginApi.createBackendModule({
23
23
  pluginId: "events",
24
24
  moduleId: "gerritEventRouter",
25
25
  register(env) {
@@ -36,5 +36,5 @@ const gerritEventRouterEventsModule = backendPluginApi.createBackendModule({
36
36
  }
37
37
  });
38
38
 
39
- exports.gerritEventRouterEventsModule = gerritEventRouterEventsModule;
39
+ exports.eventsModuleGerritEventRouter = eventsModuleGerritEventRouter;
40
40
  //# sourceMappingURL=alpha.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":["../src/router/GerritEventRouter.ts","../src/service/GerritEventRouterEventsModule.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 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() {\n super('gerrit');\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","/*\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 gerritEventRouterEventsModule = createBackendModule({\n pluginId: 'events',\n moduleId: 'gerritEventRouter',\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":["SubTopicEventRouter","createBackendModule","eventsExtensionPoint"],"mappings":";;;;;;;;AA4BO,MAAM,0BAA0BA,oCAAoB,CAAA;AAAA,EACzD,WAAc,GAAA;AACZ,IAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAAA,GAChB;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;;ACdO,MAAM,gCAAgCC,oCAAoB,CAAA;AAAA,EAC/D,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,mBAAA;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,IAAI,iBAAkB,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/router/GerritEventRouter.ts","../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 {\n EventParams,\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() {\n super('gerrit');\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","/*\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: 'gerritEventRouter',\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":["SubTopicEventRouter","createBackendModule","eventsExtensionPoint"],"mappings":";;;;;;;;AA4BO,MAAM,0BAA0BA,oCAAoB,CAAA;AAAA,EACzD,WAAc,GAAA;AACZ,IAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAAA,GAChB;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;;ACdO,MAAM,gCAAgCC,oCAAoB,CAAA;AAAA,EAC/D,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,mBAAA;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,IAAI,iBAAkB,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
@@ -7,6 +7,6 @@ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
7
7
  *
8
8
  * @alpha
9
9
  */
10
- declare const gerritEventRouterEventsModule: () => _backstage_backend_plugin_api.BackendFeature;
10
+ declare const eventsModuleGerritEventRouter: () => _backstage_backend_plugin_api.BackendFeature;
11
11
 
12
- export { gerritEventRouterEventsModule };
12
+ export { eventsModuleGerritEventRouter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-module-gerrit",
3
- "version": "0.1.5-next.2",
3
+ "version": "0.1.6-next.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -33,14 +33,14 @@
33
33
  "postpack": "backstage-cli package postpack"
34
34
  },
35
35
  "dependencies": {
36
- "@backstage/backend-plugin-api": "^0.4.1-next.2",
37
- "@backstage/plugin-events-node": "^0.2.4-next.2",
36
+ "@backstage/backend-plugin-api": "^0.5.1-next.0",
37
+ "@backstage/plugin-events-node": "^0.2.5-next.0",
38
38
  "winston": "^3.2.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@backstage/backend-test-utils": "^0.1.35-next.2",
42
- "@backstage/cli": "^0.22.4-next.1",
43
- "@backstage/plugin-events-backend-test-utils": "^0.1.5-next.2",
41
+ "@backstage/backend-test-utils": "^0.1.36-next.0",
42
+ "@backstage/cli": "^0.22.6-next.0",
43
+ "@backstage/plugin-events-backend-test-utils": "^0.1.6-next.0",
44
44
  "supertest": "^6.1.3"
45
45
  },
46
46
  "files": [