@backstage/plugin-events-backend-module-gitlab 0.2.18 → 0.3.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,19 @@
1
1
  # @backstage/plugin-events-backend-module-gitlab
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 317ceb7: **BREAKING ALPHA**: Modules from `events-backend-module-github` and `events-backend-module-gitlab` are now exported as `default` instead of being a named export. In addition, they have been moved from `aplha` to `public`.
8
+
9
+ ### Patch Changes
10
+
11
+ - 735fe12: Don't hard fail for not configuring `webhookSecret` for the GitHub and GitLab events backend. Instead, we don't add the ingress.
12
+ - Updated dependencies
13
+ - @backstage/backend-plugin-api@1.3.0
14
+ - @backstage/config@1.3.2
15
+ - @backstage/plugin-events-node@0.4.10
16
+
3
17
  ## 0.2.18
4
18
 
5
19
  ### Patch Changes
package/config.d.ts CHANGED
@@ -27,6 +27,8 @@ export interface Config {
27
27
  * See https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#validate-payloads-by-using-a-secret-token
28
28
  * for more details.
29
29
  *
30
+ * Webhook listener will only be enabled if this is set.
31
+ *
30
32
  * @visibility secret
31
33
  */
32
34
  webhookSecret?: string;
@@ -1,7 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  function createGitlabTokenValidator(config) {
4
- const secret = config.getString("events.modules.gitlab.webhookSecret");
4
+ const secret = config.getOptionalString(
5
+ "events.modules.gitlab.webhookSecret"
6
+ );
7
+ if (!secret) {
8
+ return void 0;
9
+ }
5
10
  return async (request, context) => {
6
11
  const token = request.headers["x-gitlab-token"];
7
12
  if (secret !== token) {
@@ -1 +1 @@
1
- {"version":3,"file":"createGitlabTokenValidator.cjs.js","sources":["../../src/http/createGitlabTokenValidator.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 { Config } from '@backstage/config';\nimport {\n RequestDetails,\n RequestValidationContext,\n RequestValidator,\n} from '@backstage/plugin-events-node';\n\n/**\n * Validates a configured secret token against the token received with the `x-gitlab-token` header.\n *\n * See https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#validate-payloads-by-using-a-secret-token\n * for more details.\n *\n * @param config - root config\n * @public\n */\nexport function createGitlabTokenValidator(config: Config): RequestValidator {\n const secret = config.getString('events.modules.gitlab.webhookSecret');\n\n return async (\n request: RequestDetails,\n context: RequestValidationContext,\n ): Promise<void> => {\n const token = request.headers['x-gitlab-token'] as string | undefined;\n\n if (secret !== token) {\n context.reject({\n status: 403,\n payload: { message: 'invalid token' },\n });\n }\n };\n}\n"],"names":[],"mappings":";;AAgCO,SAAS,2BAA2B,MAAkC,EAAA;AAC3E,EAAM,MAAA,MAAA,GAAS,MAAO,CAAA,SAAA,CAAU,qCAAqC,CAAA;AAErE,EAAO,OAAA,OACL,SACA,OACkB,KAAA;AAClB,IAAM,MAAA,KAAA,GAAQ,OAAQ,CAAA,OAAA,CAAQ,gBAAgB,CAAA;AAE9C,IAAA,IAAI,WAAW,KAAO,EAAA;AACpB,MAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,QACb,MAAQ,EAAA,GAAA;AAAA,QACR,OAAA,EAAS,EAAE,OAAA,EAAS,eAAgB;AAAA,OACrC,CAAA;AAAA;AACH,GACF;AACF;;;;"}
1
+ {"version":3,"file":"createGitlabTokenValidator.cjs.js","sources":["../../src/http/createGitlabTokenValidator.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 { Config } from '@backstage/config';\nimport {\n RequestDetails,\n RequestValidationContext,\n RequestValidator,\n} from '@backstage/plugin-events-node';\n\n/**\n * Validates a configured secret token against the token received with the `x-gitlab-token` header.\n *\n * See https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#validate-payloads-by-using-a-secret-token\n * for more details.\n *\n * @param config - root config\n * @public\n */\nexport function createGitlabTokenValidator(\n config: Config,\n): RequestValidator | undefined {\n const secret = config.getOptionalString(\n 'events.modules.gitlab.webhookSecret',\n );\n\n if (!secret) {\n return undefined;\n }\n\n return async (\n request: RequestDetails,\n context: RequestValidationContext,\n ): Promise<void> => {\n const token = request.headers['x-gitlab-token'] as string | undefined;\n\n if (secret !== token) {\n context.reject({\n status: 403,\n payload: { message: 'invalid token' },\n });\n }\n };\n}\n"],"names":[],"mappings":";;AAgCO,SAAS,2BACd,MAC8B,EAAA;AAC9B,EAAA,MAAM,SAAS,MAAO,CAAA,iBAAA;AAAA,IACpB;AAAA,GACF;AAEA,EAAA,IAAI,CAAC,MAAQ,EAAA;AACX,IAAO,OAAA,KAAA,CAAA;AAAA;AAGT,EAAO,OAAA,OACL,SACA,OACkB,KAAA;AAClB,IAAM,MAAA,KAAA,GAAQ,OAAQ,CAAA,OAAA,CAAQ,gBAAgB,CAAA;AAE9C,IAAA,IAAI,WAAW,KAAO,EAAA;AACpB,MAAA,OAAA,CAAQ,MAAO,CAAA;AAAA,QACb,MAAQ,EAAA,GAAA;AAAA,QACR,OAAA,EAAS,EAAE,OAAA,EAAS,eAAgB;AAAA,OACrC,CAAA;AAAA;AACH,GACF;AACF;;;;"}
package/dist/index.cjs.js CHANGED
@@ -1,10 +1,21 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var backendPluginApi = require('@backstage/backend-plugin-api');
3
6
  var createGitlabTokenValidator = require('./http/createGitlabTokenValidator.cjs.js');
4
7
  var GitlabEventRouter = require('./router/GitlabEventRouter.cjs.js');
5
8
 
6
-
9
+ var index = backendPluginApi.createBackendFeatureLoader({
10
+ loader() {
11
+ return [
12
+ import('./service/eventsModuleGitlabEventRouter.cjs.js'),
13
+ import('./service/eventsModuleGitlabWebhook.cjs.js')
14
+ ];
15
+ }
16
+ });
7
17
 
8
18
  exports.createGitlabTokenValidator = createGitlabTokenValidator.createGitlabTokenValidator;
9
19
  exports.GitlabEventRouter = GitlabEventRouter.GitlabEventRouter;
20
+ exports.default = index;
10
21
  //# 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":["../src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 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\n/**\n * The module \"gitlab\" for the Backstage backend plugin \"events-backend\"\n * adding an event router and token validator for GitLab.\n *\n * @packageDocumentation\n */\n\nimport { createBackendFeatureLoader } from '@backstage/backend-plugin-api';\n\nexport default createBackendFeatureLoader({\n loader() {\n return [\n import('./service/eventsModuleGitlabEventRouter'),\n import('./service/eventsModuleGitlabWebhook'),\n ];\n },\n});\n\nexport { createGitlabTokenValidator } from './http/createGitlabTokenValidator';\nexport { GitlabEventRouter } from './router/GitlabEventRouter';\n"],"names":["createBackendFeatureLoader"],"mappings":";;;;;;;;AAyBA,YAAeA,2CAA2B,CAAA;AAAA,EACxC,MAAS,GAAA;AACP,IAAO,OAAA;AAAA,MACL,OAAO,gDAAyC,CAAA;AAAA,MAChD,OAAO,4CAAqC;AAAA,KAC9C;AAAA;AAEJ,CAAC,CAAA;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
1
2
  import { Config } from '@backstage/config';
2
3
  import { RequestValidator, SubTopicEventRouter, EventsService, EventParams } from '@backstage/plugin-events-node';
3
4
 
@@ -10,7 +11,7 @@ import { RequestValidator, SubTopicEventRouter, EventsService, EventParams } fro
10
11
  * @param config - root config
11
12
  * @public
12
13
  */
13
- declare function createGitlabTokenValidator(config: Config): RequestValidator;
14
+ declare function createGitlabTokenValidator(config: Config): RequestValidator | undefined;
14
15
 
15
16
  /**
16
17
  * Subscribes to the generic `gitlab` topic
@@ -27,4 +28,6 @@ declare class GitlabEventRouter extends SubTopicEventRouter {
27
28
  protected determineSubTopic(params: EventParams): string | undefined;
28
29
  }
29
30
 
30
- export { GitlabEventRouter, createGitlabTokenValidator };
31
+ declare const _default: _backstage_backend_plugin_api.BackendFeature;
32
+
33
+ export { GitlabEventRouter, createGitlabTokenValidator, _default as default };
@@ -1,10 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var backendPluginApi = require('@backstage/backend-plugin-api');
4
6
  var pluginEventsNode = require('@backstage/plugin-events-node');
5
7
  var GitlabEventRouter = require('../router/GitlabEventRouter.cjs.js');
6
8
 
7
- const eventsModuleGitlabEventRouter = backendPluginApi.createBackendModule({
9
+ var eventsModuleGitlabEventRouter = backendPluginApi.createBackendModule({
8
10
  pluginId: "events",
9
11
  moduleId: "gitlab-event-router",
10
12
  register(env) {
@@ -20,5 +22,5 @@ const eventsModuleGitlabEventRouter = backendPluginApi.createBackendModule({
20
22
  }
21
23
  });
22
24
 
23
- exports.eventsModuleGitlabEventRouter = eventsModuleGitlabEventRouter;
25
+ exports.default = eventsModuleGitlabEventRouter;
24
26
  //# sourceMappingURL=eventsModuleGitlabEventRouter.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventsModuleGitlabEventRouter.cjs.js","sources":["../../src/service/eventsModuleGitlabEventRouter.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 { GitlabEventRouter } from '../router/GitlabEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for GitLab.\n *\n * Registers the `GitlabEventRouter`.\n *\n * @alpha\n */\nexport const eventsModuleGitlabEventRouter = createBackendModule({\n pluginId: 'events',\n moduleId: 'gitlab-event-router',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsServiceRef,\n },\n async init({ events }) {\n const eventRouter = new GitlabEventRouter({ events: events });\n await eventRouter.subscribe();\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsServiceRef","GitlabEventRouter"],"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;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAU,EAAA;AACrB,QAAA,MAAM,WAAc,GAAA,IAAIC,mCAAkB,CAAA,EAAE,QAAgB,CAAA;AAC5D,QAAA,MAAM,YAAY,SAAU,EAAA;AAAA;AAC9B,KACD,CAAA;AAAA;AAEL,CAAC;;;;"}
1
+ {"version":3,"file":"eventsModuleGitlabEventRouter.cjs.js","sources":["../../src/service/eventsModuleGitlabEventRouter.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 { GitlabEventRouter } from '../router/GitlabEventRouter';\n\n/**\n * Module for the events-backend plugin, adding an event router for GitLab.\n *\n * Registers the `GitlabEventRouter`.\n *\n * @public\n */\nexport default createBackendModule({\n pluginId: 'events',\n moduleId: 'gitlab-event-router',\n register(env) {\n env.registerInit({\n deps: {\n events: eventsServiceRef,\n },\n async init({ events }) {\n const eventRouter = new GitlabEventRouter({ events: events });\n await eventRouter.subscribe();\n },\n });\n },\n});\n"],"names":["createBackendModule","eventsServiceRef","GitlabEventRouter"],"mappings":";;;;;;;;AA2BA,oCAAeA,oCAAoB,CAAA;AAAA,EACjC,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;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAU,EAAA;AACrB,QAAA,MAAM,WAAc,GAAA,IAAIC,mCAAkB,CAAA,EAAE,QAAgB,CAAA;AAC5D,QAAA,MAAM,YAAY,SAAU,EAAA;AAAA;AAC9B,KACD,CAAA;AAAA;AAEL,CAAC,CAAA;;;;"}
@@ -1,10 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var backendPluginApi = require('@backstage/backend-plugin-api');
4
6
  var alpha = require('@backstage/plugin-events-node/alpha');
5
7
  var createGitlabTokenValidator = require('../http/createGitlabTokenValidator.cjs.js');
6
8
 
7
- const eventsModuleGitlabWebhook = backendPluginApi.createBackendModule({
9
+ var eventsModuleGitlabWebhook = backendPluginApi.createBackendModule({
8
10
  pluginId: "events",
9
11
  moduleId: "gitlab-webhook",
10
12
  register(env) {
@@ -14,14 +16,17 @@ const eventsModuleGitlabWebhook = backendPluginApi.createBackendModule({
14
16
  events: alpha.eventsExtensionPoint
15
17
  },
16
18
  async init({ config, events }) {
17
- events.addHttpPostIngress({
18
- topic: "gitlab",
19
- validator: createGitlabTokenValidator.createGitlabTokenValidator(config)
20
- });
19
+ const validator = createGitlabTokenValidator.createGitlabTokenValidator(config);
20
+ if (validator) {
21
+ events.addHttpPostIngress({
22
+ topic: "gitlab",
23
+ validator: createGitlabTokenValidator.createGitlabTokenValidator(config)
24
+ });
25
+ }
21
26
  }
22
27
  });
23
28
  }
24
29
  });
25
30
 
26
- exports.eventsModuleGitlabWebhook = eventsModuleGitlabWebhook;
31
+ exports.default = eventsModuleGitlabWebhook;
27
32
  //# sourceMappingURL=eventsModuleGitlabWebhook.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventsModuleGitlabWebhook.cjs.js","sources":["../../src/service/eventsModuleGitlabWebhook.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 coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';\nimport { createGitlabTokenValidator } from '../http/createGitlabTokenValidator';\n\n/**\n * Module for the events-backend plugin,\n * registering an HTTP POST ingress with request validator\n * which verifies the webhook token based on a secret.\n *\n * Registers the `GitlabEventRouter`.\n *\n * @alpha\n */\nexport const eventsModuleGitlabWebhook = createBackendModule({\n pluginId: 'events',\n moduleId: 'gitlab-webhook',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n events: eventsExtensionPoint,\n },\n async init({ config, events }) {\n events.addHttpPostIngress({\n topic: 'gitlab',\n validator: createGitlabTokenValidator(config),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","coreServices","eventsExtensionPoint","createGitlabTokenValidator"],"mappings":";;;;;;AAgCO,MAAM,4BAA4BA,oCAAoB,CAAA;AAAA,EAC3D,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,gBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,UAAA;AAAA,QACrB,MAAQ,EAAAC;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,QAAU,EAAA;AAC7B,QAAA,MAAA,CAAO,kBAAmB,CAAA;AAAA,UACxB,KAAO,EAAA,QAAA;AAAA,UACP,SAAA,EAAWC,sDAA2B,MAAM;AAAA,SAC7C,CAAA;AAAA;AACH,KACD,CAAA;AAAA;AAEL,CAAC;;;;"}
1
+ {"version":3,"file":"eventsModuleGitlabWebhook.cjs.js","sources":["../../src/service/eventsModuleGitlabWebhook.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 coreServices,\n createBackendModule,\n} from '@backstage/backend-plugin-api';\nimport { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';\nimport { createGitlabTokenValidator } from '../http/createGitlabTokenValidator';\n\n/**\n * Module for the events-backend plugin,\n * registering an HTTP POST ingress with request validator\n * which verifies the webhook token based on a secret.\n *\n * Registers the `GitlabEventRouter`.\n *\n * @public\n */\nexport default createBackendModule({\n pluginId: 'events',\n moduleId: 'gitlab-webhook',\n register(env) {\n env.registerInit({\n deps: {\n config: coreServices.rootConfig,\n events: eventsExtensionPoint,\n },\n async init({ config, events }) {\n const validator = createGitlabTokenValidator(config);\n if (validator) {\n events.addHttpPostIngress({\n topic: 'gitlab',\n validator: createGitlabTokenValidator(config),\n });\n }\n },\n });\n },\n});\n"],"names":["createBackendModule","coreServices","eventsExtensionPoint","createGitlabTokenValidator"],"mappings":";;;;;;;;AAgCA,gCAAeA,oCAAoB,CAAA;AAAA,EACjC,QAAU,EAAA,QAAA;AAAA,EACV,QAAU,EAAA,gBAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,QAAQC,6BAAa,CAAA,UAAA;AAAA,QACrB,MAAQ,EAAAC;AAAA,OACV;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,QAAU,EAAA;AAC7B,QAAM,MAAA,SAAA,GAAYC,sDAA2B,MAAM,CAAA;AACnD,QAAA,IAAI,SAAW,EAAA;AACb,UAAA,MAAA,CAAO,kBAAmB,CAAA;AAAA,YACxB,KAAO,EAAA,QAAA;AAAA,YACP,SAAA,EAAWA,sDAA2B,MAAM;AAAA,WAC7C,CAAA;AAAA;AACH;AACF,KACD,CAAA;AAAA;AAEL,CAAC,CAAA;;;;"}
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@backstage/plugin-events-backend-module-gitlab",
3
- "version": "0.2.18",
3
+ "version": "0.3.0",
4
4
  "backstage": {
5
5
  "role": "backend-plugin-module",
6
6
  "pluginId": "events",
7
- "pluginPackage": "@backstage/plugin-events-backend"
7
+ "pluginPackage": "@backstage/plugin-events-backend",
8
+ "features": {
9
+ ".": "@backstage/BackendFeature"
10
+ }
8
11
  },
9
12
  "publishConfig": {
10
13
  "access": "public"
@@ -18,26 +21,19 @@
18
21
  "license": "Apache-2.0",
19
22
  "exports": {
20
23
  ".": {
24
+ "backstage": "@backstage/BackendFeature",
21
25
  "require": "./dist/index.cjs.js",
22
26
  "types": "./dist/index.d.ts",
23
27
  "default": "./dist/index.cjs.js"
24
28
  },
25
- "./alpha": {
26
- "require": "./dist/alpha.cjs.js",
27
- "types": "./dist/alpha.d.ts",
28
- "default": "./dist/alpha.cjs.js"
29
- },
30
29
  "./package.json": "./package.json"
31
30
  },
32
31
  "main": "./dist/index.cjs.js",
33
32
  "types": "./dist/index.d.ts",
34
33
  "typesVersions": {
35
34
  "*": {
36
- "*": [
37
- "dist/index.d.ts"
38
- ],
39
- "alpha": [
40
- "dist/alpha.d.ts"
35
+ "package.json": [
36
+ "package.json"
41
37
  ]
42
38
  }
43
39
  },
@@ -55,14 +51,14 @@
55
51
  "test": "backstage-cli package test"
56
52
  },
57
53
  "dependencies": {
58
- "@backstage/backend-plugin-api": "^1.2.1",
54
+ "@backstage/backend-plugin-api": "^1.3.0",
59
55
  "@backstage/config": "^1.3.2",
60
- "@backstage/plugin-events-node": "^0.4.9"
56
+ "@backstage/plugin-events-node": "^0.4.10"
61
57
  },
62
58
  "devDependencies": {
63
- "@backstage/backend-test-utils": "^1.3.1",
64
- "@backstage/cli": "^0.31.0",
65
- "@backstage/plugin-events-backend-test-utils": "^0.1.42"
59
+ "@backstage/backend-test-utils": "^1.4.0",
60
+ "@backstage/cli": "^0.32.0",
61
+ "@backstage/plugin-events-backend-test-utils": "^0.1.43"
66
62
  },
67
63
  "configSchema": "config.d.ts"
68
64
  }
package/dist/alpha.cjs.js DELETED
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- var eventsModuleGitlabEventRouter = require('./service/eventsModuleGitlabEventRouter.cjs.js');
4
- var eventsModuleGitlabWebhook = require('./service/eventsModuleGitlabWebhook.cjs.js');
5
-
6
-
7
-
8
- exports.eventsModuleGitlabEventRouter = eventsModuleGitlabEventRouter.eventsModuleGitlabEventRouter;
9
- exports.eventsModuleGitlabWebhook = eventsModuleGitlabWebhook.eventsModuleGitlabWebhook;
10
- //# sourceMappingURL=alpha.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alpha.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/dist/alpha.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
-
3
- /**
4
- * Module for the events-backend plugin, adding an event router for GitLab.
5
- *
6
- * Registers the `GitlabEventRouter`.
7
- *
8
- * @alpha
9
- */
10
- declare const eventsModuleGitlabEventRouter: _backstage_backend_plugin_api.BackendFeature;
11
-
12
- /**
13
- * Module for the events-backend plugin,
14
- * registering an HTTP POST ingress with request validator
15
- * which verifies the webhook token based on a secret.
16
- *
17
- * Registers the `GitlabEventRouter`.
18
- *
19
- * @alpha
20
- */
21
- declare const eventsModuleGitlabWebhook: _backstage_backend_plugin_api.BackendFeature;
22
-
23
- export { eventsModuleGitlabEventRouter, eventsModuleGitlabWebhook };