diff --git a/plugins/catalog-backend-module-bitbucket/.eslintrc.js b/plugins/catalog-backend-module-bitbucket/.eslintrc.js deleted file mode 100644 index e2a53a6ad2..0000000000 --- a/plugins/catalog-backend-module-bitbucket/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md deleted file mode 100644 index 8a54e85f13..0000000000 --- a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md +++ /dev/null @@ -1,1184 +0,0 @@ -# @backstage/plugin-catalog-backend-module-bitbucket - -## 0.2.25-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.21.0-next.2 - - @backstage/plugin-catalog-node@1.6.2-next.2 - - @backstage/config@1.1.1 - - @backstage/integration@1.9.0-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.1 - -## 0.2.25-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.21.0-next.1 - - @backstage/integration@1.9.0-next.0 - - @backstage/config@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.1 - - @backstage/plugin-catalog-node@1.6.2-next.1 - -## 0.2.25-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.21.0-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.0 - - @backstage/plugin-catalog-node@1.6.2-next.0 - - @backstage/config@1.1.1 - - @backstage/integration@1.8.0 - -## 0.2.24 - -### Patch Changes - -- 4016f21: Remove some unused dependencies -- Updated dependencies - - @backstage/backend-common@0.20.1 - - @backstage/plugin-catalog-node@1.6.1 - - @backstage/config@1.1.1 - - @backstage/integration@1.8.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.15 - -## 0.2.24-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.20.1-next.2 - - @backstage/plugin-catalog-node@1.6.1-next.2 - -## 0.2.24-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.20.1-next.1 - - @backstage/integration@1.8.0 - - @backstage/config@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.15 - - @backstage/plugin-catalog-node@1.6.1-next.1 - -## 0.2.24-next.0 - -### Patch Changes - -- 4016f21: Remove some unused dependencies -- Updated dependencies - - @backstage/backend-common@0.20.1-next.0 - - @backstage/plugin-catalog-node@1.6.1-next.0 - - @backstage/config@1.1.1 - - @backstage/integration@1.8.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.15 - -## 0.2.23 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.20.0 - - @backstage/plugin-catalog-node@1.6.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.15 - - @backstage/integration@1.8.0 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/types@1.1.1 - -## 0.2.23-next.3 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.20.0-next.3 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/integration@1.8.0-next.1 - - @backstage/types@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.15-next.1 - - @backstage/plugin-catalog-node@1.6.0-next.3 - -## 0.2.23-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-node@1.6.0-next.2 - - @backstage/backend-common@0.20.0-next.2 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/integration@1.8.0-next.1 - - @backstage/types@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.15-next.1 - -## 0.2.23-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/integration@1.8.0-next.1 - - @backstage/backend-common@0.20.0-next.1 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/types@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.15-next.1 - - @backstage/plugin-catalog-node@1.5.1-next.1 - -## 0.2.23-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.20.0-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.15-next.0 - - @backstage/integration@1.8.0-next.0 - - @backstage/plugin-catalog-node@1.5.1-next.0 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/types@1.1.1 - -## 0.2.22 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-node@1.5.0 - - @backstage/integration@1.7.2 - - @backstage/backend-common@0.19.9 - - @backstage/plugin-bitbucket-cloud-common@0.2.14 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/types@1.1.1 - -## 0.2.22-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.9-next.2 - - @backstage/plugin-catalog-node@1.5.0-next.2 - -## 0.2.22-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-node@1.5.0-next.1 - - @backstage/integration@1.7.2-next.0 - - @backstage/backend-common@0.19.9-next.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.14-next.0 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/types@1.1.1 - -## 0.2.22-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.9-next.0 - - @backstage/integration@1.7.1 - - @backstage/catalog-model@1.4.3 - - @backstage/config@1.1.1 - - @backstage/errors@1.2.3 - - @backstage/types@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.13 - - @backstage/plugin-catalog-node@1.4.8-next.0 - -## 0.2.21 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.8 - - @backstage/integration@1.7.1 - - @backstage/plugin-catalog-node@1.4.7 - - @backstage/catalog-model@1.4.3 - - @backstage/errors@1.2.3 - - @backstage/plugin-bitbucket-cloud-common@0.2.13 - - @backstage/config@1.1.1 - - @backstage/types@1.1.1 - -## 0.2.21-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.8-next.2 - - @backstage/catalog-model@1.4.3-next.0 - - @backstage/integration@1.7.1-next.1 - - @backstage/errors@1.2.3-next.0 - - @backstage/plugin-catalog-node@1.4.7-next.2 - - @backstage/config@1.1.1-next.0 - - @backstage/types@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.13-next.1 - -## 0.2.20-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-node@1.4.6-next.1 - - @backstage/backend-common@0.19.7-next.1 - - @backstage/config@1.1.0 - - @backstage/catalog-model@1.4.2 - - @backstage/errors@1.2.2 - - @backstage/integration@1.7.1-next.0 - - @backstage/types@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.13-next.0 - -## 0.2.20-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/integration@1.7.1-next.0 - - @backstage/backend-common@0.19.7-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.13-next.0 - - @backstage/config@1.1.0 - - @backstage/catalog-model@1.4.2 - - @backstage/errors@1.2.2 - - @backstage/types@1.1.1 - - @backstage/plugin-catalog-node@1.4.6-next.0 - -## 0.2.18 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.5 - - @backstage/config@1.1.0 - - @backstage/catalog-model@1.4.2 - - @backstage/errors@1.2.2 - - @backstage/integration@1.7.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.12 - - @backstage/types@1.1.1 - - @backstage/plugin-catalog-node@1.4.4 - -## 0.2.18-next.3 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.4.2-next.2 - - @backstage/config@1.1.0-next.2 - - @backstage/errors@1.2.2-next.0 - - @backstage/integration@1.7.0-next.3 - - @backstage/plugin-bitbucket-cloud-common@0.2.12-next.3 - - @backstage/types@1.1.1-next.0 - - @backstage/backend-common@0.19.5-next.3 - - @backstage/plugin-catalog-node@1.4.4-next.3 - -## 0.2.18-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/config@1.1.0-next.1 - - @backstage/backend-common@0.19.5-next.2 - - @backstage/plugin-catalog-node@1.4.4-next.2 - - @backstage/integration@1.7.0-next.2 - - @backstage/catalog-model@1.4.2-next.1 - - @backstage/errors@1.2.1 - - @backstage/types@1.1.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.12-next.2 - -## 0.2.18-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/config@1.1.0-next.0 - - @backstage/integration@1.7.0-next.1 - - @backstage/backend-common@0.19.5-next.1 - - @backstage/catalog-model@1.4.2-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.12-next.1 - - @backstage/plugin-catalog-node@1.4.4-next.1 - - @backstage/errors@1.2.1 - - @backstage/types@1.1.0 - -## 0.2.17-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.4-next.0 - - @backstage/integration@1.7.0-next.0 - - @backstage/catalog-model@1.4.1 - - @backstage/config@1.0.8 - - @backstage/errors@1.2.1 - - @backstage/types@1.1.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.11-next.0 - - @backstage/plugin-catalog-node@1.4.3-next.0 - -## 0.2.15 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.9 - - @backstage/plugin-catalog-node@1.4.1 - - @backstage/integration@1.6.0 - - @backstage/catalog-model@1.4.1 - - @backstage/config@1.0.8 - - @backstage/errors@1.2.1 - - @backstage/types@1.1.0 - -## 0.2.15-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.2-next.2 - - @backstage/plugin-catalog-node@1.4.1-next.2 - -## 0.2.15-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.2-next.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.9-next.0 - - @backstage/plugin-catalog-node@1.4.1-next.1 - - @backstage/integration@1.5.1 - - @backstage/catalog-model@1.4.1 - - @backstage/config@1.0.8 - - @backstage/errors@1.2.1 - - @backstage/types@1.1.0 - -## 0.2.15-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.2-next.0 - - @backstage/catalog-model@1.4.1 - - @backstage/config@1.0.8 - - @backstage/errors@1.2.1 - - @backstage/integration@1.5.1 - - @backstage/types@1.1.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.8 - - @backstage/plugin-catalog-node@1.4.1-next.0 - -## 0.2.14 - -### Patch Changes - -- Updated dependencies - - @backstage/errors@1.2.1 - - @backstage/backend-common@0.19.1 - - @backstage/plugin-catalog-node@1.4.0 - - @backstage/catalog-model@1.4.1 - - @backstage/config@1.0.8 - - @backstage/integration@1.5.1 - - @backstage/types@1.1.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.8 - -## 0.2.14-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/errors@1.2.1-next.0 - - @backstage/backend-common@0.19.1-next.0 - - @backstage/plugin-catalog-node@1.4.0-next.0 - - @backstage/catalog-model@1.4.1-next.0 - - @backstage/config@1.0.8 - - @backstage/integration@1.5.1-next.0 - - @backstage/types@1.1.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.8-next.0 - -## 0.2.13 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.0 - - @backstage/types@1.1.0 - - @backstage/integration@1.5.0 - - @backstage/catalog-model@1.4.0 - - @backstage/errors@1.2.0 - - @backstage/plugin-catalog-node@1.3.7 - - @backstage/config@1.0.8 - - @backstage/plugin-bitbucket-cloud-common@0.2.7 - -## 0.2.13-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.0-next.2 - - @backstage/catalog-model@1.4.0-next.1 - - @backstage/config@1.0.7 - - @backstage/errors@1.2.0-next.0 - - @backstage/integration@1.5.0-next.0 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.7-next.0 - - @backstage/plugin-catalog-node@1.3.7-next.2 - -## 0.2.13-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.19.0-next.1 - - @backstage/integration@1.5.0-next.0 - - @backstage/errors@1.2.0-next.0 - - @backstage/catalog-model@1.4.0-next.0 - - @backstage/plugin-catalog-node@1.3.7-next.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.7-next.0 - - @backstage/config@1.0.7 - - @backstage/types@1.0.2 - -## 0.2.13-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-node@1.3.7-next.0 - - @backstage/backend-common@0.18.6-next.0 - - @backstage/integration@1.4.5 - - @backstage/config@1.0.7 - - @backstage/catalog-model@1.3.0 - - @backstage/errors@1.1.5 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.6 - -## 0.2.12 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.5 - - @backstage/integration@1.4.5 - - @backstage/plugin-catalog-node@1.3.6 - - @backstage/catalog-model@1.3.0 - - @backstage/config@1.0.7 - - @backstage/errors@1.1.5 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.6 - -## 0.2.12-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.5-next.1 - - @backstage/plugin-catalog-node@1.3.6-next.1 - - @backstage/config@1.0.7 - -## 0.2.12-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.5-next.0 - - @backstage/integration@1.4.5-next.0 - - @backstage/plugin-catalog-node@1.3.6-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.6-next.0 - - @backstage/catalog-model@1.3.0 - - @backstage/config@1.0.7 - - @backstage/errors@1.1.5 - - @backstage/types@1.0.2 - -## 0.2.11 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.4 - - @backstage/catalog-model@1.3.0 - - @backstage/integration@1.4.4 - - @backstage/plugin-catalog-node@1.3.5 - - @backstage/config@1.0.7 - - @backstage/errors@1.1.5 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.5 - -## 0.2.11-next.3 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.3.0-next.0 - - @backstage/backend-common@0.18.4-next.2 - - @backstage/config@1.0.7 - - @backstage/errors@1.1.5 - - @backstage/integration@1.4.4-next.0 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.5-next.0 - - @backstage/plugin-catalog-node@1.3.5-next.3 - -## 0.2.11-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.4-next.2 - - @backstage/catalog-model@1.2.1 - - @backstage/config@1.0.7 - - @backstage/errors@1.1.5 - - @backstage/integration@1.4.4-next.0 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.5-next.0 - - @backstage/plugin-catalog-node@1.3.5-next.2 - -## 0.2.11-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/integration@1.4.4-next.0 - - @backstage/backend-common@0.18.4-next.1 - - @backstage/catalog-model@1.2.1 - - @backstage/config@1.0.7 - - @backstage/errors@1.1.5 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.5-next.0 - - @backstage/plugin-catalog-node@1.3.5-next.1 - -## 0.2.11-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.4-next.0 - - @backstage/config@1.0.7 - - @backstage/integration@1.4.3 - - @backstage/catalog-model@1.2.1 - - @backstage/errors@1.1.5 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.4 - - @backstage/plugin-catalog-node@1.3.5-next.0 - -## 0.2.10 - -### Patch Changes - -- e675f902980: Make sure to not use deprecated exports from `@backstage/plugin-catalog-backend` -- 52b0022dab7: Updated dependency `msw` to `^1.0.0`. -- Updated dependencies - - @backstage/backend-common@0.18.3 - - @backstage/errors@1.1.5 - - @backstage/plugin-catalog-node@1.3.4 - - @backstage/catalog-model@1.2.1 - - @backstage/integration@1.4.3 - - @backstage/plugin-bitbucket-cloud-common@0.2.4 - - @backstage/config@1.0.7 - - @backstage/types@1.0.2 - -## 0.2.10-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.3-next.2 - - @backstage/plugin-catalog-backend@1.8.0-next.2 - - @backstage/config@1.0.7-next.0 - - @backstage/integration@1.4.3-next.0 - -## 0.2.10-next.1 - -### Patch Changes - -- 52b0022dab7: Updated dependency `msw` to `^1.0.0`. -- Updated dependencies - - @backstage/errors@1.1.5-next.0 - - @backstage/backend-common@0.18.3-next.1 - - @backstage/integration@1.4.3-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.4-next.0 - - @backstage/plugin-catalog-backend@1.8.0-next.1 - - @backstage/config@1.0.7-next.0 - - @backstage/catalog-model@1.2.1-next.1 - - @backstage/types@1.0.2 - -## 0.2.10-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-backend@1.8.0-next.0 - - @backstage/backend-common@0.18.3-next.0 - - @backstage/catalog-model@1.2.1-next.0 - - @backstage/config@1.0.6 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.3 - -## 0.2.9 - -### Patch Changes - -- 85b04f659a: Internal refactor to not use deprecated `substr` -- Updated dependencies - - @backstage/plugin-catalog-backend@1.7.2 - - @backstage/backend-common@0.18.2 - - @backstage/catalog-model@1.2.0 - - @backstage/config@1.0.6 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.3 - -## 0.2.9-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.2-next.2 - - @backstage/plugin-catalog-backend@1.7.2-next.2 - - @backstage/catalog-model@1.2.0-next.1 - - @backstage/config@1.0.6 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.3 - -## 0.2.9-next.1 - -### Patch Changes - -- 85b04f659a: Internal refactor to not use deprecated `substr` -- Updated dependencies - - @backstage/plugin-catalog-backend@1.7.2-next.1 - - @backstage/backend-common@0.18.2-next.1 - - @backstage/catalog-model@1.1.6-next.0 - - @backstage/config@1.0.6 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.3 - -## 0.2.9-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.1.6-next.0 - - @backstage/backend-common@0.18.2-next.0 - - @backstage/plugin-catalog-backend@1.7.2-next.0 - -## 0.2.7 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.0 - - @backstage/catalog-model@1.1.5 - - @backstage/plugin-catalog-backend@1.7.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.3 - - @backstage/config@1.0.6 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2 - - @backstage/types@1.0.2 - -## 0.2.7-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.0-next.1 - - @backstage/plugin-catalog-backend@1.7.0-next.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.3-next.1 - - @backstage/catalog-model@1.1.5-next.1 - - @backstage/config@1.0.6-next.0 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2-next.0 - - @backstage/types@1.0.2 - -## 0.2.7-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.18.0-next.0 - - @backstage/config@1.0.6-next.0 - - @backstage/plugin-catalog-backend@1.7.0-next.1 - - @backstage/catalog-model@1.1.5-next.1 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.2-next.0 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.3-next.0 - -## 0.2.7-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.1.5-next.0 - - @backstage/plugin-catalog-backend@1.7.0-next.0 - - @backstage/backend-common@0.17.0 - - @backstage/config@1.0.5 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.1 - - @backstage/types@1.0.2 - - @backstage/plugin-bitbucket-cloud-common@0.2.2 - -## 0.2.6 - -### Patch Changes - -- 3280711113: Updated dependency `msw` to `^0.49.0`. -- Updated dependencies - - @backstage/plugin-catalog-backend@1.6.0 - - @backstage/backend-common@0.17.0 - - @backstage/errors@1.1.4 - - @backstage/integration@1.4.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.2 - - @backstage/types@1.0.2 - - @backstage/catalog-model@1.1.4 - - @backstage/config@1.0.5 - -## 0.2.6-next.3 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-backend@1.6.0-next.3 - - @backstage/backend-common@0.17.0-next.3 - - @backstage/catalog-model@1.1.4-next.1 - - @backstage/config@1.0.5-next.1 - - @backstage/errors@1.1.4-next.1 - - @backstage/integration@1.4.1-next.1 - - @backstage/types@1.0.2-next.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.2-next.1 - -## 0.2.6-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-backend@1.6.0-next.2 - - @backstage/backend-common@0.17.0-next.2 - - @backstage/catalog-model@1.1.4-next.1 - - @backstage/config@1.0.5-next.1 - - @backstage/errors@1.1.4-next.1 - - @backstage/integration@1.4.1-next.1 - - @backstage/types@1.0.2-next.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.2-next.1 - -## 0.2.6-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.17.0-next.1 - - @backstage/plugin-catalog-backend@1.6.0-next.1 - - @backstage/types@1.0.2-next.1 - - @backstage/config@1.0.5-next.1 - - @backstage/integration@1.4.1-next.1 - - @backstage/catalog-model@1.1.4-next.1 - - @backstage/errors@1.1.4-next.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.2-next.1 - -## 0.2.6-next.0 - -### Patch Changes - -- 3280711113: Updated dependency `msw` to `^0.49.0`. -- Updated dependencies - - @backstage/plugin-catalog-backend@1.6.0-next.0 - - @backstage/backend-common@0.16.1-next.0 - - @backstage/integration@1.4.1-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.2-next.0 - - @backstage/types@1.0.2-next.0 - - @backstage/catalog-model@1.1.4-next.0 - - @backstage/config@1.0.5-next.0 - - @backstage/errors@1.1.4-next.0 - -## 0.2.5 - -### Patch Changes - -- 4c9f7847e4: Updated dependency `msw` to `^0.48.0` while moving it to be a dev dependency. -- Updated dependencies - - @backstage/backend-common@0.16.0 - - @backstage/plugin-catalog-backend@1.5.1 - - @backstage/integration@1.4.0 - - @backstage/catalog-model@1.1.3 - - @backstage/types@1.0.1 - - @backstage/plugin-bitbucket-cloud-common@0.2.1 - - @backstage/config@1.0.4 - - @backstage/errors@1.1.3 - -## 0.2.5-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.16.0-next.1 - - @backstage/plugin-catalog-backend@1.5.1-next.1 - - @backstage/catalog-model@1.1.3-next.0 - - @backstage/config@1.0.4-next.0 - - @backstage/errors@1.1.3-next.0 - - @backstage/integration@1.4.0-next.0 - - @backstage/types@1.0.1-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.1-next.0 - -## 0.2.5-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.16.0-next.0 - - @backstage/plugin-catalog-backend@1.5.1-next.0 - - @backstage/integration@1.4.0-next.0 - - @backstage/catalog-model@1.1.3-next.0 - - @backstage/types@1.0.1-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.1-next.0 - - @backstage/config@1.0.4-next.0 - - @backstage/errors@1.1.3-next.0 - -## 0.2.4 - -### Patch Changes - -- 23f9199a0f: Deprecate `@backstage/plugin-catalog-backend-module-bitbucket`. - - Please migrate to `@backstage/plugin-catalog-backend-module-bitbucket-cloud` - or `@backstage/plugin-catalog-backend-module-bitbucket-server` instead. - -- Updated dependencies - - @backstage/catalog-model@1.1.2 - - @backstage/backend-common@0.15.2 - - @backstage/plugin-catalog-backend@1.5.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.0 - - @backstage/config@1.0.3 - - @backstage/errors@1.1.2 - - @backstage/integration@1.3.2 - - @backstage/types@1.0.0 - -## 0.2.4-next.2 - -### Patch Changes - -- 23f9199a0f: Deprecate `@backstage/plugin-catalog-backend-module-bitbucket`. - - Please migrate to `@backstage/plugin-catalog-backend-module-bitbucket-cloud` - or `@backstage/plugin-catalog-backend-module-bitbucket-server` instead. - -- Updated dependencies - - @backstage/plugin-catalog-backend@1.5.0-next.2 - - @backstage/backend-common@0.15.2-next.2 - - @backstage/catalog-model@1.1.2-next.2 - - @backstage/config@1.0.3-next.2 - - @backstage/errors@1.1.2-next.2 - - @backstage/integration@1.3.2-next.2 - - @backstage/types@1.0.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.2 - -## 0.2.4-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.15.2-next.1 - - @backstage/catalog-model@1.1.2-next.1 - - @backstage/config@1.0.3-next.1 - - @backstage/errors@1.1.2-next.1 - - @backstage/integration@1.3.2-next.1 - - @backstage/types@1.0.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.1 - - @backstage/plugin-catalog-backend@1.4.1-next.1 - -## 0.2.4-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.1.2-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.0 - - @backstage/plugin-catalog-backend@1.4.1-next.0 - - @backstage/backend-common@0.15.2-next.0 - - @backstage/config@1.0.3-next.0 - - @backstage/errors@1.1.2-next.0 - - @backstage/integration@1.3.2-next.0 - - @backstage/types@1.0.0 - -## 0.2.3 - -### Patch Changes - -- 667d917488: Updated dependency `msw` to `^0.47.0`. -- 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`. -- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. -- Updated dependencies - - @backstage/backend-common@0.15.1 - - @backstage/integration@1.3.1 - - @backstage/plugin-catalog-backend@1.4.0 - - @backstage/catalog-model@1.1.1 - - @backstage/config@1.0.2 - - @backstage/errors@1.1.1 - - @backstage/plugin-bitbucket-cloud-common@0.1.3 - -## 0.2.3-next.3 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.1.1-next.0 - - @backstage/config@1.0.2-next.0 - - @backstage/errors@1.1.1-next.0 - - @backstage/integration@1.3.1-next.2 - - @backstage/plugin-catalog-backend@1.4.0-next.3 - - @backstage/backend-common@0.15.1-next.3 - -## 0.2.3-next.2 - -### Patch Changes - -- 667d917488: Updated dependency `msw` to `^0.47.0`. -- 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`. -- Updated dependencies - - @backstage/backend-common@0.15.1-next.2 - - @backstage/integration@1.3.1-next.1 - - @backstage/plugin-catalog-backend@1.4.0-next.2 - - @backstage/plugin-bitbucket-cloud-common@0.1.3-next.1 - -## 0.2.3-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.15.1-next.1 - - @backstage/plugin-catalog-backend@1.4.0-next.1 - -## 0.2.3-next.0 - -### Patch Changes - -- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. -- Updated dependencies - - @backstage/backend-common@0.15.1-next.0 - - @backstage/plugin-catalog-backend@1.3.2-next.0 - - @backstage/integration@1.3.1-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 - -## 0.2.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.15.0 - - @backstage/integration@1.3.0 - - @backstage/plugin-catalog-backend@1.3.1 - - @backstage/plugin-bitbucket-cloud-common@0.1.2 - -## 0.2.2-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.15.0-next.0 - - @backstage/integration@1.3.0-next.0 - - @backstage/plugin-catalog-backend@1.3.1-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.1.2-next.0 - -## 0.2.1 - -### Patch Changes - -- a70869e775: Updated dependency `msw` to `^0.43.0`. -- 8006d0f9bf: Updated dependency `msw` to `^0.44.0`. -- Updated dependencies - - @backstage/plugin-catalog-backend@1.3.0 - - @backstage/backend-common@0.14.1 - - @backstage/catalog-model@1.1.0 - - @backstage/integration@1.2.2 - - @backstage/plugin-bitbucket-cloud-common@0.1.1 - - @backstage/errors@1.1.0 - -## 0.2.1-next.2 - -### Patch Changes - -- a70869e775: Updated dependency `msw` to `^0.43.0`. -- Updated dependencies - - @backstage/plugin-catalog-backend@1.3.0-next.3 - - @backstage/backend-common@0.14.1-next.3 - - @backstage/integration@1.2.2-next.3 - - @backstage/plugin-bitbucket-cloud-common@0.1.1-next.1 - - @backstage/catalog-model@1.1.0-next.3 - -## 0.2.1-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/catalog-model@1.1.0-next.1 - - @backstage/backend-common@0.14.1-next.1 - - @backstage/errors@1.1.0-next.0 - - @backstage/plugin-catalog-backend@1.2.1-next.1 - - @backstage/integration@1.2.2-next.1 - -## 0.2.1-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.14.1-next.0 - - @backstage/catalog-model@1.1.0-next.0 - - @backstage/integration@1.2.2-next.0 - - @backstage/plugin-catalog-backend@1.2.1-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.1.1-next.0 - -## 0.2.0 - -### Minor Changes - -- 1c01c0fd14: Integrate `@backstage/plugin-bitbucket-cloud-common` as replacement for the `BitbucketCloudClient`. - -### Patch Changes - -- 8f7b1835df: Updated dependency `msw` to `^0.41.0`. -- Updated dependencies - - @backstage/plugin-catalog-backend@1.2.0 - - @backstage/backend-common@0.14.0 - - @backstage/integration@1.2.1 - - @backstage/plugin-bitbucket-cloud-common@0.1.0 - - @backstage/catalog-model@1.0.3 - -## 0.2.0-next.2 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.14.0-next.2 - - @backstage/integration@1.2.1-next.2 - - @backstage/plugin-catalog-backend@1.2.0-next.2 - -## 0.2.0-next.1 - -### Minor Changes - -- 1c01c0fd14: Integrate `@backstage/plugin-bitbucket-cloud-common` as replacement for the `BitbucketCloudClient`. - -### Patch Changes - -- 8f7b1835df: Updated dependency `msw` to `^0.41.0`. -- Updated dependencies - - @backstage/backend-common@0.13.6-next.1 - - @backstage/integration@1.2.1-next.1 - - @backstage/plugin-catalog-backend@1.2.0-next.1 - - @backstage/catalog-model@1.0.3-next.0 - - @backstage/plugin-bitbucket-cloud-common@0.1.0-next.0 - -## 0.1.4-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.13.6-next.0 - - @backstage/integration@1.2.1-next.0 - - @backstage/plugin-catalog-backend@1.2.0-next.0 - -## 0.1.3 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.13.3 - - @backstage/plugin-catalog-backend@1.1.2 - - @backstage/integration@1.2.0 - - @backstage/config@1.0.1 - - @backstage/catalog-model@1.0.2 - -## 0.1.3-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.13.3-next.2 - - @backstage/plugin-catalog-backend@1.1.2-next.2 - - @backstage/config@1.0.1-next.0 - - @backstage/catalog-model@1.0.2-next.0 - - @backstage/integration@1.2.0-next.1 - -## 0.1.3-next.0 - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.13.3-next.0 - - @backstage/integration@1.2.0-next.0 - - @backstage/plugin-catalog-backend@1.1.2-next.0 - -## 0.1.2 - -### Patch Changes - -- c47509e1a0: Implemented changes suggested by Deepsource.io including multiple double non-null assertion operators and unexpected awaits for non-promise values. -- 9fed130139: split BitbucketClient into BitbucketCloudClient, BitbucketServerClient -- Updated dependencies - - @backstage/plugin-catalog-backend@1.1.0 - - @backstage/integration@1.1.0 - - @backstage/catalog-model@1.0.1 - - @backstage/backend-common@0.13.2 - -## 0.1.2-next.2 - -### Patch Changes - -- 9fed130139: split BitbucketClient into BitbucketCloudClient, BitbucketServerClient -- Updated dependencies - - @backstage/plugin-catalog-backend@1.1.0-next.2 - - @backstage/catalog-model@1.0.1-next.1 - -## 0.1.2-next.1 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-backend@1.1.0-next.1 - - @backstage/integration@1.1.0-next.1 - - @backstage/backend-common@0.13.2-next.1 - -## 0.1.2-next.0 - -### Patch Changes - -- c47509e1a0: Implemented changes suggested by Deepsource.io including multiple double non-null assertion operators and unexpected awaits for non-promise values. -- Updated dependencies - - @backstage/catalog-model@1.0.1-next.0 - - @backstage/plugin-catalog-backend@1.0.1-next.0 - - @backstage/backend-common@0.13.2-next.0 - - @backstage/integration@1.0.1-next.0 - -## 0.1.1 - -### Patch Changes - -- Updated dependencies - - @backstage/plugin-catalog-backend@1.0.0 - - @backstage/backend-common@0.13.1 - - @backstage/catalog-model@1.0.0 - - @backstage/integration@1.0.0 - - @backstage/config@1.0.0 - - @backstage/errors@1.0.0 - - @backstage/types@1.0.0 - -## 0.1.0 - -### Minor Changes - -- 47a5ae5dd2: Added package, moving out Bitbucket specific functionality from the catalog-backend - -### Patch Changes - -- Updated dependencies - - @backstage/backend-common@0.13.0 - - @backstage/plugin-catalog-backend@0.24.0 - - @backstage/catalog-model@0.13.0 diff --git a/plugins/catalog-backend-module-bitbucket/README.md b/plugins/catalog-backend-module-bitbucket/README.md deleted file mode 100644 index ae22c7a427..0000000000 --- a/plugins/catalog-backend-module-bitbucket/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Catalog Backend Module for Bitbucket - -This is an extension module to the plugin-catalog-backend plugin, providing extensions targeted at Bitbucket offerings. - -## Getting started - -See [Backstage documentation](https://backstage.io/docs/integrations/bitbucket/discovery) for details on how to install -and configure the plugin. diff --git a/plugins/catalog-backend-module-bitbucket/api-report.md b/plugins/catalog-backend-module-bitbucket/api-report.md deleted file mode 100644 index 30b2a89826..0000000000 --- a/plugins/catalog-backend-module-bitbucket/api-report.md +++ /dev/null @@ -1,47 +0,0 @@ -## API Report File for "@backstage/plugin-catalog-backend-module-bitbucket" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts -import { BitbucketIntegration } from '@backstage/integration'; -import { CatalogProcessor } from '@backstage/plugin-catalog-node'; -import { CatalogProcessorEmit } from '@backstage/plugin-catalog-node'; -import { CatalogProcessorResult } from '@backstage/plugin-catalog-node'; -import { Config } from '@backstage/config'; -import { LocationSpec } from '@backstage/plugin-catalog-node'; -import { Logger } from 'winston'; -import { ScmIntegrationRegistry } from '@backstage/integration'; - -// @public @deprecated (undocumented) -export class BitbucketDiscoveryProcessor implements CatalogProcessor { - constructor(options: { - integrations: ScmIntegrationRegistry; - parser?: BitbucketRepositoryParser; - logger: Logger; - }); - // (undocumented) - static fromConfig( - config: Config, - options: { - parser?: BitbucketRepositoryParser; - logger: Logger; - }, - ): BitbucketDiscoveryProcessor; - // (undocumented) - getProcessorName(): string; - // (undocumented) - readLocation( - location: LocationSpec, - _optional: boolean, - emit: CatalogProcessorEmit, - ): Promise; -} - -// @public @deprecated -export type BitbucketRepositoryParser = (options: { - integration: BitbucketIntegration; - target: string; - presence?: 'optional' | 'required'; - logger: Logger; -}) => AsyncIterable; -``` diff --git a/plugins/catalog-backend-module-bitbucket/catalog-info.yaml b/plugins/catalog-backend-module-bitbucket/catalog-info.yaml deleted file mode 100644 index a384181766..0000000000 --- a/plugins/catalog-backend-module-bitbucket/catalog-info.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: backstage-plugin-catalog-backend-module-bitbucket - title: '@backstage/plugin-catalog-backend-module-bitbucket' - description: A Backstage catalog backend module that helps integrate towards Bitbucket -spec: - lifecycle: experimental - type: backstage-backend-plugin-module - owner: catalog-maintainers diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json deleted file mode 100644 index 19dd046280..0000000000 --- a/plugins/catalog-backend-module-bitbucket/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@backstage/plugin-catalog-backend-module-bitbucket", - "description": "A Backstage catalog backend module that helps integrate towards Bitbucket", - "version": "0.2.25-next.2", - "deprecated": true, - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", - "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" - }, - "backstage": { - "role": "backend-plugin-module" - }, - "homepage": "https://backstage.io", - "repository": { - "type": "git", - "url": "https://github.com/backstage/backstage", - "directory": "plugins/catalog-backend-module-bitbucket" - }, - "keywords": [ - "backstage" - ], - "scripts": { - "build": "backstage-cli package build", - "lint": "backstage-cli package lint", - "test": "backstage-cli package test", - "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack", - "clean": "backstage-cli package clean", - "start": "backstage-cli package start" - }, - "dependencies": { - "@backstage/backend-common": "workspace:^", - "@backstage/config": "workspace:^", - "@backstage/integration": "workspace:^", - "@backstage/plugin-bitbucket-cloud-common": "workspace:^", - "@backstage/plugin-catalog-node": "workspace:^", - "node-fetch": "^2.6.7", - "winston": "^3.2.1" - }, - "devDependencies": { - "@backstage/backend-test-utils": "workspace:^", - "@backstage/cli": "workspace:^", - "msw": "^1.0.0" - }, - "files": [ - "dist" - ] -} diff --git a/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts b/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts deleted file mode 100644 index 262fb4e6c4..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.test.ts +++ /dev/null @@ -1,1176 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { getVoidLogger } from '@backstage/backend-common'; -import { setupRequestMockHandlers } from '@backstage/backend-test-utils'; -import { ConfigReader } from '@backstage/config'; -import { Models } from '@backstage/plugin-bitbucket-cloud-common'; -import { LocationSpec, processingResult } from '@backstage/plugin-catalog-node'; -import { RequestHandler, rest } from 'msw'; -import { setupServer } from 'msw/node'; -import { BitbucketDiscoveryProcessor } from './BitbucketDiscoveryProcessor'; -import { PagedResponse } from './lib'; - -const server = setupServer(); - -function setupStubs( - projects: any[], - bitbucketBaseUrl = `https://bitbucket.mycompany.com`, -) { - function pagedResponse(values: any): PagedResponse { - return { - values: values, - isLastPage: true, - } as PagedResponse; - } - - function stubbedProject( - project: string, - repos: string[], - ): RequestHandler { - return rest.get( - `${bitbucketBaseUrl}/api/rest/1.0/projects/${project}/repos`, - (_, res, ctx) => { - const response = []; - for (const repo of repos) { - response.push({ - slug: repo, - links: { - self: [ - { - href: `${bitbucketBaseUrl}/projects/${project}/repos/${repo}/browse`, - }, - ], - }, - }); - } - return res(ctx.json(pagedResponse(response))); - }, - ); - } - - server.use( - rest.get(`${bitbucketBaseUrl}/api/rest/1.0/projects`, (_, res, ctx) => { - return res( - ctx.json( - pagedResponse( - projects.map(p => { - return { key: p.key }; - }), - ), - ), - ); - }), - ); - - for (const project of projects) { - server.use(stubbedProject(project.key, project.repos)); - } -} - -function setupBitbucketCloudStubs( - workspace: string, - repositories: Pick[], -) { - const stubCallerFn = jest.fn(); - function pagedResponse(values: any): Models.PaginatedRepositories { - return { - values: values, - page: 1, - } as Models.PaginatedRepositories; - } - - server.use( - rest.get( - `https://api.bitbucket.org/2.0/repositories/${workspace}`, - (req, res, ctx) => { - stubCallerFn(req); - return res( - ctx.json( - pagedResponse( - repositories.map(r => ({ - ...r, - links: { - html: { - href: `https://bitbucket.org/${workspace}/${r.slug}`, - }, - }, - })), - ), - ), - ); - }, - ), - ); - return stubCallerFn; -} - -function setupBitbucketCloudSearchStubs( - workspace: string, - repositories: Pick[], - catalogPath: string, -) { - const stubCallerFn = jest.fn(); - function pagedResponse(values: any): Models.PaginatedRepositories { - return { - values: values, - page: 1, - } as Models.PaginatedRepositories; - } - - server.use( - rest.get( - `https://api.bitbucket.org/2.0/workspaces/${workspace}/search/code`, - (req, res, ctx) => { - stubCallerFn(req); - return res( - ctx.json( - pagedResponse( - repositories.map(r => ({ - type: 'code_search_result', - content_match_count: 0, - content_matches: [], - path_matches: [ - catalogPath - .split('/') - .flatMap(seg => [{ text: '/' }, { text: seg, match: true }]) - .slice(1), - ], - file: { - commit: { - repository: { - ...r, - links: { - html: { - href: `https://bitbucket.org/${workspace}/${r.slug}`, - }, - }, - }, - }, - path: catalogPath, - }, - })), - ), - ), - ); - }, - ), - ); - return stubCallerFn; -} - -describe('BitbucketDiscoveryProcessor', () => { - setupRequestMockHandlers(server); - - afterEach(() => jest.resetAllMocks()); - - describe('reject unrelated entries', () => { - it('rejects unknown types', async () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [{ host: 'bitbucket.mycompany.com', token: 'blob' }], - }, - }), - { logger: getVoidLogger() }, - ); - const location: LocationSpec = { - type: 'not-bitbucket-discovery', - target: 'https://bitbucket.mycompany.com', - }; - await expect( - processor.readLocation(location, false, () => {}), - ).resolves.toBeFalsy(); - }); - - it('rejects unknown targets', async () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [ - { host: 'bitbucket.org', token: 'blob' }, - { host: 'bitbucket.mycompany.com', token: 'blob' }, - ], - }, - }), - { logger: getVoidLogger() }, - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: 'https://not.bitbucket.mycompany.com/foobar', - }; - await expect( - processor.readLocation(location, false, () => {}), - ).rejects.toThrow( - /There is no Bitbucket integration that matches https:\/\/not.bitbucket.mycompany.com\/foobar/, - ); - }); - }); - - describe('handles organisation repositories', () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [ - { - host: 'bitbucket.mycompany.com', - token: 'blob', - apiBaseUrl: 'https://bitbucket.mycompany.com/api/rest/1.0', - }, - ], - }, - }), - { logger: getVoidLogger() }, - ); - - it('output all repositories', async () => { - setupStubs([ - { key: 'backstage', repos: ['backstage'] }, - { key: 'demo', repos: ['demo'] }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/projects/*/repos/*/catalog.yaml', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/backstage/browse/catalog.yaml', - presence: 'optional', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/projects/demo/repos/demo/browse/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('output repositories with wildcards', async () => { - setupStubs([ - { key: 'backstage', repos: ['backstage', 'techdocs-cli'] }, - { key: 'demo', repos: ['demo'] }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/techdocs-*/catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/techdocs-cli/browse/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('output repositories by target search ref', async () => { - setupStubs([{ key: 'demo', repos: ['demo'] }]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/projects/demo/repos/demo/catalog.yaml?ref=branch-name', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/projects/demo/repos/demo/browse/catalog.yaml?ref=branch-name', - presence: 'optional', - }, - }); - }); - - it('filter unrelated repositories', async () => { - setupStubs([{ key: 'backstage', repos: ['test', 'abctest', 'testxyz'] }]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/test/catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/test/browse/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it.each` - target - ${'https://bitbucket.mycompany.com/projects/backstage/repos/*'} - ${'https://bitbucket.mycompany.com/projects/backstage/repos/*/'} - ${'https://bitbucket.mycompany.com/projects/backstage/repos/techdocs-*/'} - `("target '$target' adds default path to catalog", async ({ target }) => { - setupStubs([{ key: 'backstage', repos: ['techdocs-cli'] }]); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: target, - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/techdocs-cli/browse/catalog-info.yaml', - presence: 'optional', - }, - }); - }); - }); - - describe('handles organisation repositories with a custom baseURL', () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [ - { - host: 'bitbucket.mycompany.com', - token: 'blob', - apiBaseUrl: - 'https://bitbucket.mycompany.com/custom-path/api/rest/1.0', - }, - ], - }, - }), - { logger: getVoidLogger() }, - ); - - it('output all repositories', async () => { - setupStubs( - [ - { key: 'backstage', repos: ['backstage'] }, - { key: 'demo', repos: ['demo'] }, - ], - 'https://bitbucket.mycompany.com/custom-path', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/*/repos/*/catalog.yaml', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/backstage/browse/catalog.yaml', - presence: 'optional', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/demo/repos/demo/browse/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('output repositories with wildcards', async () => { - setupStubs( - [ - { key: 'backstage', repos: ['backstage', 'techdocs-cli'] }, - { key: 'demo', repos: ['demo'] }, - ], - 'https://bitbucket.mycompany.com/custom-path', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/techdocs-*/catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/techdocs-cli/browse/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('output repositories by target search ref', async () => { - setupStubs( - [{ key: 'demo', repos: ['demo'] }], - 'https://bitbucket.mycompany.com/custom-path', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/demo/repos/demo/catalog.yaml?ref=branch-name', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/demo/repos/demo/browse/catalog.yaml?ref=branch-name', - presence: 'optional', - }, - }); - }); - - it('filter unrelated repositories', async () => { - setupStubs( - [{ key: 'backstage', repos: ['test', 'abctest', 'testxyz'] }], - 'https://bitbucket.mycompany.com/custom-path', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/test/catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/test/browse/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it.each` - target - ${'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/*'} - ${'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/*/'} - ${'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/techdocs-*/'} - `("target '$target' adds default path to catalog", async ({ target }) => { - setupStubs( - [{ key: 'backstage', repos: ['techdocs-cli'] }], - 'https://bitbucket.mycompany.com/custom-path', - ); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: target, - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.mycompany.com/custom-path/projects/backstage/repos/techdocs-cli/browse/catalog-info.yaml', - presence: 'optional', - }, - }); - }); - }); - - describe('handles cloud repositories', () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [ - { - host: 'bitbucket.org', - username: 'myuser', - appPassword: 'blob', - }, - ], - }, - }), - { logger: getVoidLogger() }, - ); - - it('output all repositories by default', async () => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: 'https://bitbucket.org/workspaces/myworkspace', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(2); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog-info.yaml', - presence: 'optional', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-two/src/master/catalog-info.yaml', - presence: 'optional', - }, - }); - }); - - it('uses provided catalog path', async () => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace?catalogPath=my/nested/path/catalog.yaml', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(2); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/my/nested/path/catalog.yaml', - presence: 'optional', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-two/src/master/my/nested/path/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('output all repositories', async () => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace/projects/*/repos/*?catalogPath=catalog.yaml', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(2); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog.yaml', - presence: 'optional', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-two/src/master/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('output repositories with wildcards', async () => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/*?catalogPath=catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('filter unrelated repositories', async () => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-two', - }, - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-three', - }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/repository-three?catalogPath=catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-three/src/master/catalog.yaml', - presence: 'optional', - }, - }); - }); - - it('submits query', async () => { - const mockCall = setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - ]); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace?q=project.key ~ "prj-one"', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog-info.yaml', - presence: 'optional', - }, - }); - expect(mockCall).toHaveBeenCalledTimes(1); - // it should be possible to do this via an `expect.objectContaining` check but seems to fail with some encoding issue. - expect(mockCall.mock.calls[0][0].url).toMatchInlineSnapshot( - `"https://api.bitbucket.org/2.0/repositories/myworkspace?page=1&pagelen=100&q=project.key+%7E+%22prj-one%22"`, - ); - }); - - it.each` - target - ${'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/*'} - ${'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/*/'} - ${'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/repository-*/'} - `("target '$target' adds default path to catalog", async ({ target }) => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - ]); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: target, - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog-info.yaml', - presence: 'optional', - }, - }); - }); - - it.each` - target - ${'https://bitbucket.org/test'} - `("target '$target' is rejected", async ({ target }) => { - setupBitbucketCloudStubs('myworkspace', [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - ]); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: target, - }; - - const emitter = jest.fn(); - await expect( - processor.readLocation(location, false, emitter), - ).rejects.toThrow(/Failed to parse /); - }); - }); - - describe('handles cloud repositories using code search', () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [ - { - host: 'bitbucket.org', - username: 'myuser', - appPassword: 'blob', - }, - ], - }, - }), - { logger: getVoidLogger() }, - ); - - it('output all repositories by default', async () => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ], - 'catalog-info.yaml', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: 'https://bitbucket.org/workspaces/myworkspace?search=true', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(2); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog-info.yaml', - presence: 'required', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-two/src/master/catalog-info.yaml', - presence: 'required', - }, - }); - }); - - it('uses provided catalog path', async () => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ], - 'my/nested/path/catalog.yaml', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace?search=true&catalogPath=my/nested/path/catalog.yaml', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(2); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/my/nested/path/catalog.yaml', - presence: 'required', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-two/src/master/my/nested/path/catalog.yaml', - presence: 'required', - }, - }); - }); - - it('output all repositories', async () => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ], - 'catalog.yaml', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace/projects/*/repos/*?search=true&catalogPath=catalog.yaml', - }; - - const emitter = jest.fn(); - - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(2); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog.yaml', - presence: 'required', - }, - }); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-two/src/master/catalog.yaml', - presence: 'required', - }, - }); - }); - - it('output repositories with wildcards', async () => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-two' }, - slug: 'repository-two', - }, - ], - 'catalog.yaml', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/*?search=true&catalogPath=catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog.yaml', - presence: 'required', - }, - }); - }); - - it('filter unrelated repositories', async () => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-two', - }, - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-three', - }, - ], - 'catalog.yaml', - ); - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/repository-three?search=true&catalogPath=catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-three/src/master/catalog.yaml', - presence: 'required', - }, - }); - }); - - it.each` - target - ${'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/*?search=true'} - ${'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/*/?search=true'} - ${'https://bitbucket.org/workspaces/myworkspace/projects/prj-one/repos/repository-*/?search=true'} - `("target '$target' adds default path to catalog", async ({ target }) => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - ], - 'catalog-info.yaml', - ); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: target, - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'url', - target: - 'https://bitbucket.org/myworkspace/repository-one/src/master/catalog-info.yaml', - presence: 'required', - }, - }); - }); - - it.each` - target - ${'https://bitbucket.org/test?search=true'} - `("target '$target' is rejected", async ({ target }) => { - setupBitbucketCloudSearchStubs( - 'myworkspace', - [ - { - project: { type: 'project', key: 'prj-one' }, - slug: 'repository-one', - }, - ], - 'catalog-info.yaml', - ); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: target, - }; - - const emitter = jest.fn(); - await expect( - processor.readLocation(location, false, emitter), - ).rejects.toThrow(/Failed to parse /); - }); - }); - - describe('Custom repository parser', () => { - const processor = BitbucketDiscoveryProcessor.fromConfig( - new ConfigReader({ - integrations: { - bitbucket: [ - { - host: 'bitbucket.mycompany.com', - token: 'blob', - apiBaseUrl: 'https://bitbucket.mycompany.com/api/rest/1.0', - }, - ], - }, - }), - { - parser: async function* customRepositoryParser({}) { - yield processingResult.location({ - type: 'custom-location-type', - target: 'custom-target', - presence: 'optional', - }); - }, - logger: getVoidLogger(), - }, - ); - - it('use custom repository parser', async () => { - setupStubs([{ key: 'backstage', repos: ['test'] }]); - - const location: LocationSpec = { - type: 'bitbucket-discovery', - target: - 'https://bitbucket.mycompany.com/projects/backstage/repos/test/catalog.yaml', - }; - - const emitter = jest.fn(); - await processor.readLocation(location, false, emitter); - - expect(emitter).toHaveBeenCalledTimes(1); - expect(emitter).toHaveBeenCalledWith({ - type: 'location', - location: { - type: 'custom-location-type', - target: 'custom-target', - presence: 'optional', - }, - }); - }); - }); -}); diff --git a/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.ts b/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.ts deleted file mode 100644 index 3f25d6ed7b..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/BitbucketDiscoveryProcessor.ts +++ /dev/null @@ -1,415 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Config } from '@backstage/config'; -import { - BitbucketIntegration, - ScmIntegrationRegistry, - ScmIntegrations, -} from '@backstage/integration'; -import { - BitbucketCloudClient, - Models, -} from '@backstage/plugin-bitbucket-cloud-common'; -import { - CatalogProcessor, - CatalogProcessorEmit, - LocationSpec, -} from '@backstage/plugin-catalog-node'; -import { Logger } from 'winston'; -import { - BitbucketRepository, - BitbucketRepositoryParser, - BitbucketServerClient, - defaultRepositoryParser, - paginated, -} from './lib'; - -const DEFAULT_BRANCH = 'master'; -const DEFAULT_CATALOG_LOCATION = '/catalog-info.yaml'; - -/** - * @public - * @deprecated Please migrate to `@backstage/plugin-catalog-backend-module-bitbucket-cloud` or `@backstage/plugin-catalog-backend-module-bitbucket-server` instead. - */ -export class BitbucketDiscoveryProcessor implements CatalogProcessor { - private readonly integrations: ScmIntegrationRegistry; - private readonly parser: BitbucketRepositoryParser; - private readonly logger: Logger; - - static fromConfig( - config: Config, - options: { - parser?: BitbucketRepositoryParser; - logger: Logger; - }, - ) { - const integrations = ScmIntegrations.fromConfig(config); - - return new BitbucketDiscoveryProcessor({ - ...options, - integrations, - }); - } - - constructor(options: { - integrations: ScmIntegrationRegistry; - parser?: BitbucketRepositoryParser; - logger: Logger; - }) { - this.integrations = options.integrations; - this.parser = options.parser || defaultRepositoryParser; - this.logger = options.logger; - this.logger.warn( - 'Please migrate to `@backstage/plugin-catalog-backend-module-bitbucket-cloud` or `@backstage/plugin-catalog-backend-module-bitbucket-server` instead.', - ); - } - - getProcessorName(): string { - return 'BitbucketDiscoveryProcessor'; - } - - async readLocation( - location: LocationSpec, - _optional: boolean, - emit: CatalogProcessorEmit, - ): Promise { - if (location.type !== 'bitbucket-discovery') { - return false; - } - - const integration = this.integrations.bitbucket.byUrl(location.target); - if (!integration) { - throw new Error( - `There is no Bitbucket integration that matches ${location.target}. Please add a configuration entry for it under integrations.bitbucket`, - ); - } - - const startTimestamp = Date.now(); - this.logger.info( - `Reading ${integration.config.host} repositories from ${location.target}`, - ); - - const processOptions: ProcessOptions = { - emit, - integration, - location, - }; - - const isBitbucketCloud = integration.config.host === 'bitbucket.org'; - const { scanned, matches } = isBitbucketCloud - ? await this.processCloudRepositories(processOptions) - : await this.processOrganizationRepositories(processOptions); - - const duration = ((Date.now() - startTimestamp) / 1000).toFixed(1); - this.logger.debug( - `Read ${scanned} ${integration.config.host} repositories (${matches} matching the pattern) in ${duration} seconds`, - ); - - return true; - } - - private async processCloudRepositories( - options: ProcessOptions, - ): Promise { - const { location, integration, emit } = options; - const client = BitbucketCloudClient.fromConfig(integration.config); - - const { searchEnabled } = parseBitbucketCloudUrl(location.target); - - const result = searchEnabled - ? await searchBitbucketCloudLocations(client, location.target) - : await readBitbucketCloudLocations(client, location.target); - - for (const locationTarget of result.matches) { - for await (const entity of this.parser({ - integration, - target: locationTarget, - presence: searchEnabled ? 'required' : 'optional', - logger: this.logger, - })) { - emit(entity); - } - } - return { - matches: result.matches.length, - scanned: result.scanned, - }; - } - - private async processOrganizationRepositories( - options: ProcessOptions, - ): Promise { - const { location, integration, emit } = options; - const { catalogPath: requestedCatalogPath } = parseUrl(location.target); - const catalogPath = requestedCatalogPath - ? `/${requestedCatalogPath}` - : DEFAULT_CATALOG_LOCATION; - - const client = new BitbucketServerClient({ - config: integration.config, - }); - - const result = await readBitbucketOrg(client, location.target); - for (const repository of result.matches) { - for await (const entity of this.parser({ - integration, - target: `${repository.links.self[0].href}${catalogPath}`, - logger: this.logger, - })) { - emit(entity); - } - } - return { - matches: result.matches.length, - scanned: result.scanned, - }; - } -} - -export async function readBitbucketOrg( - client: BitbucketServerClient, - target: string, -): Promise> { - const { projectSearchPath, repoSearchPath } = parseUrl(target); - const projects = paginated(options => client.listProjects(options)); - const result: Result = { - scanned: 0, - matches: [], - }; - - for await (const project of projects) { - if (!projectSearchPath.test(project.key)) { - continue; - } - const repositories = paginated(options => - client.listRepositories(project.key, options), - ); - for await (const repository of repositories) { - result.scanned++; - if (repoSearchPath.test(repository.slug)) { - result.matches.push(repository); - } - } - } - return result; -} - -export async function searchBitbucketCloudLocations( - client: BitbucketCloudClient, - target: string, -): Promise> { - const { - workspacePath, - catalogPath: requestedCatalogPath, - projectSearchPath, - repoSearchPath, - } = parseBitbucketCloudUrl(target); - - const result: Result = { - scanned: 0, - matches: [], - }; - - const catalogPath = requestedCatalogPath - ? requestedCatalogPath - : DEFAULT_CATALOG_LOCATION; - const catalogFilename = catalogPath.substring( - catalogPath.lastIndexOf('/') + 1, - ); - - // load all fields relevant for creating refs later, but not more - const fields = [ - // exclude code/content match details - '-values.content_matches', - // include/add relevant repository details - '+values.file.commit.repository.mainbranch.name', - '+values.file.commit.repository.project.key', - '+values.file.commit.repository.slug', - // remove irrelevant links - '-values.*.links', - '-values.*.*.links', - '-values.*.*.*.links', - // ...except the one we need - '+values.file.commit.repository.links.html.href', - ].join(','); - const query = `"${catalogFilename}" path:${catalogPath}`; - const searchResults = client - .searchCode(workspacePath, query, { fields }) - .iterateResults(); - - for await (const searchResult of searchResults) { - // not a file match, but a code match - if (searchResult.path_matches!.length === 0) { - continue; - } - - const repository = searchResult.file!.commit!.repository!; - if (!matchesPostFilters(repository, projectSearchPath, repoSearchPath)) { - continue; - } - - const repoUrl = repository.links!.html!.href; - const branch = repository.mainbranch?.name ?? DEFAULT_BRANCH; - const filePath = searchResult.file!.path; - const location = `${repoUrl}/src/${branch}/${filePath}`; - - result.matches.push(location); - } - - return result; -} - -export async function readBitbucketCloudLocations( - client: BitbucketCloudClient, - target: string, -): Promise> { - const { catalogPath: requestedCatalogPath } = parseBitbucketCloudUrl(target); - const catalogPath = requestedCatalogPath - ? `/${requestedCatalogPath}` - : DEFAULT_CATALOG_LOCATION; - - return readBitbucketCloud(client, target).then(result => { - const matches = result.matches.map(repository => { - const branch = repository.mainbranch?.name ?? DEFAULT_BRANCH; - return `${repository.links!.html!.href}/src/${branch}${catalogPath}`; - }); - - return { - scanned: result.scanned, - matches, - }; - }); -} - -export async function readBitbucketCloud( - client: BitbucketCloudClient, - target: string, -): Promise> { - const { - workspacePath, - queryParam: q, - projectSearchPath, - repoSearchPath, - } = parseBitbucketCloudUrl(target); - - const repositories = client - .listRepositoriesByWorkspace(workspacePath, { q }) - .iterateResults(); - const result: Result = { - scanned: 0, - matches: [], - }; - - for await (const repository of repositories) { - result.scanned++; - if (matchesPostFilters(repository, projectSearchPath, repoSearchPath)) { - result.matches.push(repository); - } - } - return result; -} - -function matchesPostFilters( - repository: Models.Repository, - projectSearchPath: RegExp | undefined, - repoSearchPath: RegExp | undefined, -): boolean { - return ( - (!projectSearchPath || projectSearchPath.test(repository.project!.key!)) && - (!repoSearchPath || repoSearchPath.test(repository.slug!)) - ); -} - -function parseUrl(urlString: string): { - projectSearchPath: RegExp; - repoSearchPath: RegExp; - catalogPath: string; -} { - const url = new URL(urlString); - const indexOfProjectSegment = - url.pathname.toLowerCase().indexOf('/projects/') + 1; - const path = url.pathname.slice(indexOfProjectSegment).split('/'); - - // /projects/backstage/repos/techdocs-*/catalog-info.yaml - if (path.length > 3 && path[1].length && path[3].length) { - return { - projectSearchPath: escapeRegExp(decodeURIComponent(path[1])), - repoSearchPath: escapeRegExp(decodeURIComponent(path[3])), - catalogPath: decodeURIComponent(path.slice(4).join('/') + url.search), - }; - } - - throw new Error(`Failed to parse ${urlString}`); -} - -function readPathParameters(pathParts: string[]): Map { - const vals: Record = {}; - for (let i = 0; i + 1 < pathParts.length; i += 2) { - vals[pathParts[i]] = decodeURIComponent(pathParts[i + 1]); - } - return new Map(Object.entries(vals)); -} - -function parseBitbucketCloudUrl(urlString: string): { - workspacePath: string; - catalogPath?: string; - projectSearchPath?: RegExp; - repoSearchPath?: RegExp; - queryParam?: string; - searchEnabled: boolean; -} { - const url = new URL(urlString); - const pathMap = readPathParameters(url.pathname.slice(1).split('/')); - const query = url.searchParams; - - if (!pathMap.has('workspaces')) { - throw new Error(`Failed to parse workspace from ${urlString}`); - } - - return { - workspacePath: pathMap.get('workspaces')!, - projectSearchPath: pathMap.has('projects') - ? escapeRegExp(pathMap.get('projects')!) - : undefined, - repoSearchPath: pathMap.has('repos') - ? escapeRegExp(pathMap.get('repos')!) - : undefined, - catalogPath: query.get('catalogPath') || undefined, - queryParam: query.get('q') || undefined, - searchEnabled: query.get('search')?.toLowerCase() === 'true', - }; -} - -function escapeRegExp(str: string): RegExp { - return new RegExp(`^${str.replace(/\*/g, '.*')}$`); -} - -type ProcessOptions = { - integration: BitbucketIntegration; - location: LocationSpec; - emit: CatalogProcessorEmit; -}; - -type Result = { - scanned: number; - matches: T[]; -}; - -type ResultSummary = { - scanned: number; - matches: number; -}; diff --git a/plugins/catalog-backend-module-bitbucket/src/index.ts b/plugins/catalog-backend-module-bitbucket/src/index.ts deleted file mode 100644 index 5bbda25dea..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A Backstage catalog backend module that helps integrate towards Bitbucket - * - * @packageDocumentation - */ - -export { BitbucketDiscoveryProcessor } from './BitbucketDiscoveryProcessor'; -export type { BitbucketRepositoryParser } from './lib/BitbucketRepositoryParser'; diff --git a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.test.ts b/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.test.ts deleted file mode 100644 index 478ccd7c52..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.test.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { processingResult } from '@backstage/plugin-catalog-node'; -import { defaultRepositoryParser } from './BitbucketRepositoryParser'; - -describe('BitbucketRepositoryParser', () => { - describe('defaultRepositoryParser', () => { - it('emits location', async () => { - const browseUrl = - 'https://bitbucket.mycompany.com/projects/project-key/repos/repo-slug/browse'; - const path = '/catalog-info.yaml'; - const expected = [ - processingResult.location({ - type: 'url', - target: `${browseUrl}${path}`, - presence: 'optional', - }), - ]; - const actual = defaultRepositoryParser({ - target: `${browseUrl}${path}`, - }); - - let i = 0; - for await (const entity of actual) { - expect(entity).toStrictEqual(expected[i]); - i++; - } - }); - }); -}); diff --git a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts b/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts deleted file mode 100644 index aa973f87c2..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketRepositoryParser.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { BitbucketIntegration } from '@backstage/integration'; -import { - CatalogProcessorResult, - processingResult, -} from '@backstage/plugin-catalog-node'; -import { Logger } from 'winston'; - -/** - * A custom callback that reacts to finding a repository by yielding processing - * results. - * - * @public - * @deprecated Please migrate to `@backstage/plugin-catalog-backend-module-bitbucket-cloud` or `@backstage/plugin-catalog-backend-module-bitbucket-server` instead. - */ -export type BitbucketRepositoryParser = (options: { - integration: BitbucketIntegration; - target: string; - presence?: 'optional' | 'required'; - logger: Logger; -}) => AsyncIterable; - -export const defaultRepositoryParser = - async function* defaultRepositoryParser(options: { - target: string; - presence?: 'optional' | 'required'; - }) { - yield processingResult.location({ - type: 'url', - target: options.target, - // Not all locations may actually exist, since the user defined them as a wildcard pattern. - // Thus, we emit them as optional and let the downstream processor find them while not outputting - // an error if it couldn't. - presence: options.presence ?? 'optional', - }); - }; diff --git a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketServerClient.ts b/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketServerClient.ts deleted file mode 100644 index bcebb1713b..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/lib/BitbucketServerClient.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - BitbucketIntegrationConfig, - getBitbucketRequestOptions, -} from '@backstage/integration'; -import fetch from 'node-fetch'; - -export class BitbucketServerClient { - private readonly config: BitbucketIntegrationConfig; - - constructor(options: { config: BitbucketIntegrationConfig }) { - this.config = options.config; - } - - async listProjects(options?: ListOptions): Promise> { - return this.pagedRequest(`${this.config.apiBaseUrl}/projects`, options); - } - - async listRepositories( - projectKey: string, - options?: ListOptions, - ): Promise> { - return this.pagedRequest( - `${this.config.apiBaseUrl}/projects/${encodeURIComponent( - projectKey, - )}/repos`, - options, - ); - } - - private async pagedRequest( - endpoint: string, - options?: ListOptions, - ): Promise> { - const request = new URL(endpoint); - for (const key in options) { - if (options[key]) { - request.searchParams.append(key, options[key]!.toString()); - } - } - - const response = await fetch( - request.toString(), - getBitbucketRequestOptions(this.config), - ); - if (!response.ok) { - throw new Error( - `Unexpected response when fetching ${request.toString()}. Expected 200 but got ${ - response.status - } - ${response.statusText}`, - ); - } - return response.json() as Promise>; - } -} - -export type ListOptions = { - [key: string]: number | undefined; - limit?: number | undefined; - start?: number | undefined; -}; - -export type PagedResponse = { - size: number; - limit: number; - start: number; - isLastPage: boolean; - values: T[]; - nextPageStart: number; -}; - -export async function* paginated( - request: (options: ListOptions) => Promise>, - options?: ListOptions, -) { - const opts = options || { start: 0 }; - let res; - do { - res = await request(opts); - opts.start = res.nextPageStart; - for (const item of res.values) { - yield item; - } - } while (!res.isLastPage); -} diff --git a/plugins/catalog-backend-module-bitbucket/src/lib/index.ts b/plugins/catalog-backend-module-bitbucket/src/lib/index.ts deleted file mode 100644 index c93bd7afd9..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/lib/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export { defaultRepositoryParser } from './BitbucketRepositoryParser'; -export type { BitbucketRepositoryParser } from './BitbucketRepositoryParser'; -export { BitbucketServerClient, paginated } from './BitbucketServerClient'; -export type { PagedResponse } from './BitbucketServerClient'; -export type { BitbucketRepository } from './types'; diff --git a/plugins/catalog-backend-module-bitbucket/src/lib/types.ts b/plugins/catalog-backend-module-bitbucket/src/lib/types.ts deleted file mode 100644 index b1bb416363..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/lib/types.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2021 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -type BitbucketRepositoryBase = { - project: { - key: string; - }; - slug: string; -}; - -export type BitbucketRepository = BitbucketRepositoryBase & { - links: Record< - string, - { - href: string; - }[] - >; -}; diff --git a/plugins/catalog-backend-module-bitbucket/src/setupTests.ts b/plugins/catalog-backend-module-bitbucket/src/setupTests.ts deleted file mode 100644 index d3232290a7..0000000000 --- a/plugins/catalog-backend-module-bitbucket/src/setupTests.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export {}; diff --git a/yarn.lock b/yarn.lock index 5cea46e304..77803f6dd0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5419,23 +5419,6 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-backend-module-bitbucket@workspace:plugins/catalog-backend-module-bitbucket": - version: 0.0.0-use.local - resolution: "@backstage/plugin-catalog-backend-module-bitbucket@workspace:plugins/catalog-backend-module-bitbucket" - dependencies: - "@backstage/backend-common": "workspace:^" - "@backstage/backend-test-utils": "workspace:^" - "@backstage/cli": "workspace:^" - "@backstage/config": "workspace:^" - "@backstage/integration": "workspace:^" - "@backstage/plugin-bitbucket-cloud-common": "workspace:^" - "@backstage/plugin-catalog-node": "workspace:^" - msw: ^1.0.0 - node-fetch: ^2.6.7 - winston: ^3.2.1 - languageName: unknown - linkType: soft - "@backstage/plugin-catalog-backend-module-gcp@workspace:plugins/catalog-backend-module-gcp": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend-module-gcp@workspace:plugins/catalog-backend-module-gcp"