@backstage/plugin-events-backend-module-bitbucket-cloud 0.1.5 → 0.1.6-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 +3 -12
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/cjs/BitbucketCloudEventRouter-1cf134a1.cjs.js +16 -0
- package/dist/cjs/BitbucketCloudEventRouter-1cf134a1.cjs.js.map +1 -0
- package/dist/index.cjs.js +4 -11
- package/dist/index.cjs.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-events-backend-module-bitbucket-cloud
|
|
2
2
|
|
|
3
|
+
## 0.1.6-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-plugin-api@0.5.1-next.1
|
|
9
|
+
- @backstage/plugin-events-node@0.2.5-next.1
|
|
10
|
+
|
|
11
|
+
## 0.1.6-next.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @backstage/backend-plugin-api@0.5.1-next.0
|
|
17
|
+
- @backstage/plugin-events-node@0.2.5-next.0
|
|
18
|
+
|
|
3
19
|
## 0.1.5
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -4,17 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
6
6
|
var alpha = require('@backstage/plugin-events-node/alpha');
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
class BitbucketCloudEventRouter extends pluginEventsNode.SubTopicEventRouter {
|
|
10
|
-
constructor() {
|
|
11
|
-
super("bitbucketCloud");
|
|
12
|
-
}
|
|
13
|
-
determineSubTopic(params) {
|
|
14
|
-
var _a;
|
|
15
|
-
return (_a = params.metadata) == null ? void 0 : _a["x-event-key"];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
7
|
+
var BitbucketCloudEventRouter = require('./cjs/BitbucketCloudEventRouter-1cf134a1.cjs.js');
|
|
8
|
+
require('@backstage/plugin-events-node');
|
|
18
9
|
|
|
19
10
|
const eventsModuleBitbucketCloudEventRouter = backendPluginApi.createBackendModule({
|
|
20
11
|
pluginId: "events",
|
|
@@ -25,7 +16,7 @@ const eventsModuleBitbucketCloudEventRouter = backendPluginApi.createBackendModu
|
|
|
25
16
|
events: alpha.eventsExtensionPoint
|
|
26
17
|
},
|
|
27
18
|
async init({ events }) {
|
|
28
|
-
const eventRouter = new BitbucketCloudEventRouter();
|
|
19
|
+
const eventRouter = new BitbucketCloudEventRouter.BitbucketCloudEventRouter();
|
|
29
20
|
events.addPublishers(eventRouter);
|
|
30
21
|
events.addSubscribers(eventRouter);
|
|
31
22
|
}
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/service/eventsModuleBitbucketCloudEventRouter.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 { BitbucketCloudEventRouter } from '../router/BitbucketCloudEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for Bitbucket Cloud.\n *\n * Registers the `BitbucketCloudEventRouter`.\n *\n * @alpha\n */\nexport const eventsModuleBitbucketCloudEventRouter = createBackendModule({\n pluginId: 'events',\n moduleId: 'bitbucketCloudEventRouter',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsExtensionPoint,\n },\n async init({ events }) {\n const eventRouter = new BitbucketCloudEventRouter();\n\n events.addPublishers(eventRouter);\n events.addSubscribers(eventRouter);\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsExtensionPoint","BitbucketCloudEventRouter"],"mappings":";;;;;;;;;AA2BO,MAAM,wCAAwCA,oCAAoB,CAAA;AAAA,EACvE,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,2BAAA;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,mDAA0B,EAAA,CAAA;AAElD,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;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var pluginEventsNode = require('@backstage/plugin-events-node');
|
|
4
|
+
|
|
5
|
+
class BitbucketCloudEventRouter extends pluginEventsNode.SubTopicEventRouter {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("bitbucketCloud");
|
|
8
|
+
}
|
|
9
|
+
determineSubTopic(params) {
|
|
10
|
+
var _a;
|
|
11
|
+
return (_a = params.metadata) == null ? void 0 : _a["x-event-key"];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
exports.BitbucketCloudEventRouter = BitbucketCloudEventRouter;
|
|
16
|
+
//# sourceMappingURL=BitbucketCloudEventRouter-1cf134a1.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitbucketCloudEventRouter-1cf134a1.cjs.js","sources":["../../src/router/BitbucketCloudEventRouter.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 `bitbucketCloud` topic\n * and publishes the events under the more concrete sub-topic\n * depending on the `x-event-key` provided.\n *\n * @public\n */\nexport class BitbucketCloudEventRouter extends SubTopicEventRouter {\n constructor() {\n super('bitbucketCloud');\n }\n\n protected determineSubTopic(params: EventParams): string | undefined {\n return params.metadata?.['x-event-key'] as string | undefined;\n }\n}\n"],"names":["SubTopicEventRouter"],"mappings":";;;;AA4BO,MAAM,kCAAkCA,oCAAoB,CAAA;AAAA,EACjE,WAAc,GAAA;AACZ,IAAA,KAAA,CAAM,gBAAgB,CAAA,CAAA;AAAA,GACxB;AAAA,EAEU,kBAAkB,MAAyC,EAAA;AAjCvE,IAAA,IAAA,EAAA,CAAA;AAkCI,IAAO,OAAA,CAAA,EAAA,GAAA,MAAA,CAAO,aAAP,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,aAAA,CAAA,CAAA;AAAA,GAC3B;AACF;;;;"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2,17 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var BitbucketCloudEventRouter = require('./cjs/BitbucketCloudEventRouter-1cf134a1.cjs.js');
|
|
6
|
+
require('@backstage/plugin-events-node');
|
|
6
7
|
|
|
7
|
-
class BitbucketCloudEventRouter extends pluginEventsNode.SubTopicEventRouter {
|
|
8
|
-
constructor() {
|
|
9
|
-
super("bitbucketCloud");
|
|
10
|
-
}
|
|
11
|
-
determineSubTopic(params) {
|
|
12
|
-
var _a;
|
|
13
|
-
return (_a = params.metadata) == null ? void 0 : _a["x-event-key"];
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
|
|
10
|
+
exports.BitbucketCloudEventRouter = BitbucketCloudEventRouter.BitbucketCloudEventRouter;
|
|
18
11
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-events-backend-module-bitbucket-cloud",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6-next.1",
|
|
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.5.
|
|
37
|
-
"@backstage/plugin-events-node": "^0.2.
|
|
36
|
+
"@backstage/backend-plugin-api": "^0.5.1-next.1",
|
|
37
|
+
"@backstage/plugin-events-node": "^0.2.5-next.1",
|
|
38
38
|
"winston": "^3.2.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@backstage/backend-test-utils": "^0.1.
|
|
42
|
-
"@backstage/cli": "^0.22.
|
|
43
|
-
"@backstage/plugin-events-backend-test-utils": "^0.1.
|
|
41
|
+
"@backstage/backend-test-utils": "^0.1.36-next.1",
|
|
42
|
+
"@backstage/cli": "^0.22.6-next.1",
|
|
43
|
+
"@backstage/plugin-events-backend-test-utils": "^0.1.6-next.1",
|
|
44
44
|
"supertest": "^6.1.3"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|