@backstage/plugin-events-backend-module-azure 0.2.12-next.0 → 0.2.12

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,22 @@
1
1
  # @backstage/plugin-events-backend-module-azure
2
2
 
3
+ ## 0.2.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 3109c24: The export for the new backend system at the `/alpha` export is now also available via the main entry point, which means that you can remove the `/alpha` suffix from the import.
8
+ - Updated dependencies
9
+ - @backstage/plugin-events-node@0.4.1
10
+ - @backstage/backend-plugin-api@1.0.1
11
+
12
+ ## 0.2.12-next.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+ - @backstage/backend-plugin-api@1.0.1-next.1
18
+ - @backstage/plugin-events-node@0.4.1-next.1
19
+
3
20
  ## 0.2.12-next.0
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -29,7 +29,7 @@ yarn --cwd packages/backend add @backstage/plugin-events-backend-module-azure
29
29
 
30
30
  ```ts
31
31
  // packages/backend/src/index.ts
32
- backend.add(import('@backstage/plugin-events-backend-module-azure/alpha'));
32
+ backend.add(import('@backstage/plugin-events-backend-module-azure'));
33
33
  ```
34
34
 
35
35
  ### Legacy Backend System
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-module-azure__alpha",
3
- "version": "0.2.12-next.0",
3
+ "version": "0.2.12",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
package/dist/alpha.cjs.js CHANGED
@@ -2,28 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var backendPluginApi = require('@backstage/backend-plugin-api');
6
- var pluginEventsNode = require('@backstage/plugin-events-node');
7
- var AzureDevOpsEventRouter = require('./cjs/AzureDevOpsEventRouter-D4L8uMw8.cjs.js');
5
+ var eventsModuleAzureDevOpsEventRouter$1 = require('./service/eventsModuleAzureDevOpsEventRouter.cjs.js');
8
6
 
9
- const eventsModuleAzureDevOpsEventRouter = backendPluginApi.createBackendModule({
10
- pluginId: "events",
11
- moduleId: "azure-dev-ops-event-router",
12
- register(env) {
13
- env.registerInit({
14
- deps: {
15
- events: pluginEventsNode.eventsServiceRef
16
- },
17
- async init({ events }) {
18
- const eventRouter = new AzureDevOpsEventRouter.AzureDevOpsEventRouter({
19
- events
20
- });
21
- await eventRouter.subscribe();
22
- }
23
- });
24
- }
25
- });
7
+ const _feature = eventsModuleAzureDevOpsEventRouter$1.eventsModuleAzureDevOpsEventRouter;
8
+ const eventsModuleAzureDevOpsEventRouter = _feature;
26
9
 
27
- exports.default = eventsModuleAzureDevOpsEventRouter;
10
+ exports.default = _feature;
28
11
  exports.eventsModuleAzureDevOpsEventRouter = eventsModuleAzureDevOpsEventRouter;
29
12
  //# sourceMappingURL=alpha.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":["../src/service/eventsModuleAzureDevOpsEventRouter.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 { AzureDevOpsEventRouter } from '../router/AzureDevOpsEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for Azure DevOps.\n *\n * Registers the `AzureDevOpsEventRouter`.\n *\n * @alpha\n */\nexport const eventsModuleAzureDevOpsEventRouter = createBackendModule({\n pluginId: 'events',\n moduleId: 'azure-dev-ops-event-router',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsServiceRef,\n },\n async init({ events }) {\n const eventRouter = new AzureDevOpsEventRouter({\n events,\n });\n await eventRouter.subscribe();\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsServiceRef","AzureDevOpsEventRouter"],"mappings":";;;;;;;;AA2BO,MAAM,qCAAqCA,oCAAoB,CAAA;AAAA,EACpE,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,4BAAA;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,QAAM,MAAA,WAAA,GAAc,IAAIC,6CAAuB,CAAA;AAAA,UAC7C,MAAA;AAAA,SACD,CAAA,CAAA;AACD,QAAA,MAAM,YAAY,SAAU,EAAA,CAAA;AAAA,OAC9B;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;;"}
1
+ {"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2023 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 { eventsModuleAzureDevOpsEventRouter as feature } from './service/eventsModuleAzureDevOpsEventRouter';\n\n/** @alpha */\nconst _feature = feature;\nexport default _feature;\n/** @alpha */\nexport const eventsModuleAzureDevOpsEventRouter = _feature;\n"],"names":["feature"],"mappings":";;;;;;AAmBA,MAAM,QAAW,GAAAA,wEAAA;AAGV,MAAM,kCAAqC,GAAA;;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,12 +1,9 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
 
3
- /**
4
- * Module for the events-backend plugin, adding an event router for Azure DevOps.
5
- *
6
- * Registers the `AzureDevOpsEventRouter`.
7
- *
8
- * @alpha
9
- */
3
+ /** @alpha */
4
+ declare const _feature: _backstage_backend_plugin_api.BackendFeature;
5
+
6
+ /** @alpha */
10
7
  declare const eventsModuleAzureDevOpsEventRouter: _backstage_backend_plugin_api.BackendFeature;
11
8
 
12
- export { eventsModuleAzureDevOpsEventRouter as default, eventsModuleAzureDevOpsEventRouter };
9
+ export { _feature as default, eventsModuleAzureDevOpsEventRouter };
package/dist/index.cjs.js CHANGED
@@ -1,9 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var AzureDevOpsEventRouter = require('./cjs/AzureDevOpsEventRouter-D4L8uMw8.cjs.js');
4
- require('@backstage/plugin-events-node');
3
+ Object.defineProperty(exports, '__esModule', { value: true });
5
4
 
5
+ var eventsModuleAzureDevOpsEventRouter = require('./service/eventsModuleAzureDevOpsEventRouter.cjs.js');
6
+ var AzureDevOpsEventRouter = require('./router/AzureDevOpsEventRouter.cjs.js');
6
7
 
7
8
 
9
+
10
+ exports.default = eventsModuleAzureDevOpsEventRouter.eventsModuleAzureDevOpsEventRouter;
8
11
  exports.AzureDevOpsEventRouter = AzureDevOpsEventRouter.AzureDevOpsEventRouter;
9
12
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,15 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
1
2
  import { SubTopicEventRouter, EventsService, EventParams } from '@backstage/plugin-events-node';
2
3
 
4
+ /**
5
+ * Module for the events-backend plugin, adding an event router for Azure DevOps.
6
+ *
7
+ * Registers the `AzureDevOpsEventRouter`.
8
+ *
9
+ * @public
10
+ */
11
+ declare const eventsModuleAzureDevOpsEventRouter: _backstage_backend_plugin_api.BackendFeature;
12
+
3
13
  /**
4
14
  * Subscribes to the generic `azureDevOps` topic
5
15
  * and publishes the events under the more concrete sub-topic
@@ -15,4 +25,4 @@ declare class AzureDevOpsEventRouter extends SubTopicEventRouter {
15
25
  protected determineSubTopic(params: EventParams): string | undefined;
16
26
  }
17
27
 
18
- export { AzureDevOpsEventRouter };
28
+ export { AzureDevOpsEventRouter, eventsModuleAzureDevOpsEventRouter as default };
@@ -22,4 +22,4 @@ class AzureDevOpsEventRouter extends pluginEventsNode.SubTopicEventRouter {
22
22
  }
23
23
 
24
24
  exports.AzureDevOpsEventRouter = AzureDevOpsEventRouter;
25
- //# sourceMappingURL=AzureDevOpsEventRouter-D4L8uMw8.cjs.js.map
25
+ //# sourceMappingURL=AzureDevOpsEventRouter.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AzureDevOpsEventRouter.cjs.js","sources":["../../src/router/AzureDevOpsEventRouter.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 `azureDevOps` topic\n * and publishes the events under the more concrete sub-topic\n * depending on the `$.eventType` provided.\n *\n * @public\n */\nexport class AzureDevOpsEventRouter extends SubTopicEventRouter {\n constructor(options: { events: EventsService }) {\n super({\n events: options.events,\n topic: 'azureDevOps',\n });\n }\n\n protected getSubscriberId(): string {\n return 'AzureDevOpsEventRouter';\n }\n\n protected determineSubTopic(params: EventParams): string | undefined {\n if ('eventType' in (params.eventPayload as object)) {\n const payload = params.eventPayload as { eventType: string };\n return payload.eventType;\n }\n\n return undefined;\n }\n}\n"],"names":["SubTopicEventRouter"],"mappings":";;;;AA6BO,MAAM,+BAA+BA,oCAAoB,CAAA;AAAA,EAC9D,YAAY,OAAoC,EAAA;AAC9C,IAAM,KAAA,CAAA;AAAA,MACJ,QAAQ,OAAQ,CAAA,MAAA;AAAA,MAChB,KAAO,EAAA,aAAA;AAAA,KACR,CAAA,CAAA;AAAA,GACH;AAAA,EAEU,eAA0B,GAAA;AAClC,IAAO,OAAA,wBAAA,CAAA;AAAA,GACT;AAAA,EAEU,kBAAkB,MAAyC,EAAA;AACnE,IAAI,IAAA,WAAA,IAAgB,OAAO,YAAyB,EAAA;AAClD,MAAA,MAAM,UAAU,MAAO,CAAA,YAAA,CAAA;AACvB,MAAA,OAAO,OAAQ,CAAA,SAAA,CAAA;AAAA,KACjB;AAEA,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AACF;;;;"}
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var backendPluginApi = require('@backstage/backend-plugin-api');
4
+ var pluginEventsNode = require('@backstage/plugin-events-node');
5
+ var AzureDevOpsEventRouter = require('../router/AzureDevOpsEventRouter.cjs.js');
6
+
7
+ const eventsModuleAzureDevOpsEventRouter = backendPluginApi.createBackendModule({
8
+ pluginId: "events",
9
+ moduleId: "azure-dev-ops-event-router",
10
+ register(env) {
11
+ env.registerInit({
12
+ deps: {
13
+ events: pluginEventsNode.eventsServiceRef
14
+ },
15
+ async init({ events }) {
16
+ const eventRouter = new AzureDevOpsEventRouter.AzureDevOpsEventRouter({
17
+ events
18
+ });
19
+ await eventRouter.subscribe();
20
+ }
21
+ });
22
+ }
23
+ });
24
+
25
+ exports.eventsModuleAzureDevOpsEventRouter = eventsModuleAzureDevOpsEventRouter;
26
+ //# sourceMappingURL=eventsModuleAzureDevOpsEventRouter.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eventsModuleAzureDevOpsEventRouter.cjs.js","sources":["../../src/service/eventsModuleAzureDevOpsEventRouter.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 { AzureDevOpsEventRouter } from '../router/AzureDevOpsEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for Azure DevOps.\n *\n * Registers the `AzureDevOpsEventRouter`.\n *\n * @public\n */\nexport const eventsModuleAzureDevOpsEventRouter = createBackendModule({\n pluginId: 'events',\n moduleId: 'azure-dev-ops-event-router',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsServiceRef,\n },\n async init({ events }) {\n const eventRouter = new AzureDevOpsEventRouter({\n events,\n });\n await eventRouter.subscribe();\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsServiceRef","AzureDevOpsEventRouter"],"mappings":";;;;;;AA2BO,MAAM,qCAAqCA,oCAAoB,CAAA;AAAA,EACpE,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,4BAAA;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,QAAM,MAAA,WAAA,GAAc,IAAIC,6CAAuB,CAAA;AAAA,UAC7C,MAAA;AAAA,SACD,CAAA,CAAA;AACD,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-azure",
3
- "version": "0.2.12-next.0",
3
+ "version": "0.2.12",
4
4
  "backstage": {
5
5
  "role": "backend-plugin-module",
6
6
  "pluginId": "events",
@@ -18,6 +18,7 @@
18
18
  "license": "Apache-2.0",
19
19
  "exports": {
20
20
  ".": {
21
+ "backstage": "@backstage/BackendFeature",
21
22
  "require": "./dist/index.cjs.js",
22
23
  "types": "./dist/index.d.ts",
23
24
  "default": "./dist/index.cjs.js"
@@ -46,12 +47,12 @@
46
47
  "test": "backstage-cli package test"
47
48
  },
48
49
  "dependencies": {
49
- "@backstage/backend-plugin-api": "^1.0.1-next.0",
50
- "@backstage/plugin-events-node": "^0.4.1-next.0"
50
+ "@backstage/backend-plugin-api": "^1.0.1",
51
+ "@backstage/plugin-events-node": "^0.4.1"
51
52
  },
52
53
  "devDependencies": {
53
- "@backstage/backend-test-utils": "^1.0.1-next.0",
54
- "@backstage/cli": "^0.28.0-next.0",
55
- "@backstage/plugin-events-backend-test-utils": "^0.1.36-next.0"
54
+ "@backstage/backend-test-utils": "^1.0.1",
55
+ "@backstage/cli": "^0.28.0",
56
+ "@backstage/plugin-events-backend-test-utils": "^0.1.36"
56
57
  }
57
58
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"AzureDevOpsEventRouter-D4L8uMw8.cjs.js","sources":["../../src/router/AzureDevOpsEventRouter.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 `azureDevOps` topic\n * and publishes the events under the more concrete sub-topic\n * depending on the `$.eventType` provided.\n *\n * @public\n */\nexport class AzureDevOpsEventRouter extends SubTopicEventRouter {\n constructor(options: { events: EventsService }) {\n super({\n events: options.events,\n topic: 'azureDevOps',\n });\n }\n\n protected getSubscriberId(): string {\n return 'AzureDevOpsEventRouter';\n }\n\n protected determineSubTopic(params: EventParams): string | undefined {\n if ('eventType' in (params.eventPayload as object)) {\n const payload = params.eventPayload as { eventType: string };\n return payload.eventType;\n }\n\n return undefined;\n }\n}\n"],"names":["SubTopicEventRouter"],"mappings":";;;;AA6BO,MAAM,+BAA+BA,oCAAoB,CAAA;AAAA,EAC9D,YAAY,OAAoC,EAAA;AAC9C,IAAM,KAAA,CAAA;AAAA,MACJ,QAAQ,OAAQ,CAAA,MAAA;AAAA,MAChB,KAAO,EAAA,aAAA;AAAA,KACR,CAAA,CAAA;AAAA,GACH;AAAA,EAEU,eAA0B,GAAA;AAClC,IAAO,OAAA,wBAAA,CAAA;AAAA,GACT;AAAA,EAEU,kBAAkB,MAAyC,EAAA;AACnE,IAAI,IAAA,WAAA,IAAgB,OAAO,YAAyB,EAAA;AAClD,MAAA,MAAM,UAAU,MAAO,CAAA,YAAA,CAAA;AACvB,MAAA,OAAO,OAAQ,CAAA,SAAA,CAAA;AAAA,KACjB;AAEA,IAAO,OAAA,KAAA,CAAA,CAAA;AAAA,GACT;AACF;;;;"}