diff --git a/.changeset/beige-monkeys-add.md b/.changeset/beige-monkeys-add.md new file mode 100644 index 0000000000..ee54e4d090 --- /dev/null +++ b/.changeset/beige-monkeys-add.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-common': patch +--- + +Workaround support for `swc` instead of `sucrase` diff --git a/.changeset/beige-pumas-tap.md b/.changeset/beige-pumas-tap.md new file mode 100644 index 0000000000..8ed8aab1f4 --- /dev/null +++ b/.changeset/beige-pumas-tap.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Add the option for a homepage when using the `github:publish` action diff --git a/.changeset/clever-beans-turn.md b/.changeset/clever-beans-turn.md new file mode 100644 index 0000000000..69846a2516 --- /dev/null +++ b/.changeset/clever-beans-turn.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-kafka': patch +'@backstage/plugin-kafka-backend': patch +'@backstage/plugin-lighthouse': patch +'@backstage/plugin-proxy-backend': patch +--- + +Minor API signatures cleanup diff --git a/.changeset/cold-frogs-kiss.md b/.changeset/cold-frogs-kiss.md new file mode 100644 index 0000000000..7af9468ca1 --- /dev/null +++ b/.changeset/cold-frogs-kiss.md @@ -0,0 +1,16 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options. + +To use this new implementation you need to create the instance of `DatabaseTaskStore` using the `PluginDatabaseManager` instead of `Knex`; + +``` +import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; +import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend'; + +const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); +const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); +const databaseTaskStore = await DatabaseTaskStore.create(databaseManager); +``` diff --git a/.changeset/dry-games-end.md b/.changeset/dry-games-end.md new file mode 100644 index 0000000000..dc2f86ee10 --- /dev/null +++ b/.changeset/dry-games-end.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Fix bug with empty strings in `EntityPicker` diff --git a/.changeset/eight-spies-protect.md b/.changeset/eight-spies-protect.md new file mode 100644 index 0000000000..0011dece72 --- /dev/null +++ b/.changeset/eight-spies-protect.md @@ -0,0 +1,25 @@ +--- +'@backstage/plugin-azure-devops': patch +'@backstage/plugin-azure-devops-backend': patch +'@backstage/plugin-azure-devops-common': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-explore': patch +'@backstage/plugin-fossa': patch +'@backstage/plugin-git-release-manager': patch +'@backstage/plugin-github-actions': patch +'@backstage/plugin-jenkins': patch +'@backstage/plugin-newrelic-dashboard': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-search-backend-node': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-sonarqube': patch +'@backstage/plugin-tech-insights': patch +'@backstage/plugin-tech-insights-node': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-techdocs-module-addons-contrib': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-vault-backend': patch +--- + +Minor API signatures cleanup diff --git a/.changeset/five-carrots-pay.md b/.changeset/five-carrots-pay.md new file mode 100644 index 0000000000..60fa91c163 --- /dev/null +++ b/.changeset/five-carrots-pay.md @@ -0,0 +1,6 @@ +--- +'@backstage/backend-tasks': patch +'@backstage/plugin-catalog-backend': patch +--- + +Added support to mysql on some raw queries diff --git a/.changeset/fresh-rabbits-juggle.md b/.changeset/fresh-rabbits-juggle.md new file mode 100644 index 0000000000..804ae70853 --- /dev/null +++ b/.changeset/fresh-rabbits-juggle.md @@ -0,0 +1,9 @@ +--- +'@backstage/plugin-dynatrace': minor +--- + +New features: + +- Some visual improvements to the table that displays Problems +- Added support for viewing recent Synthetics results using +- Added some additional linking to the configured Dynatrace instance diff --git a/.changeset/funny-years-speak.md b/.changeset/funny-years-speak.md new file mode 100644 index 0000000000..b82c10a59f --- /dev/null +++ b/.changeset/funny-years-speak.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Removed the previously deprecated class `AtlassianAuthProvider`. Please use `providers.atlassian.create(...)` instead. diff --git a/.changeset/gorgeous-swans-kiss.md b/.changeset/gorgeous-swans-kiss.md new file mode 100644 index 0000000000..c33eb49d73 --- /dev/null +++ b/.changeset/gorgeous-swans-kiss.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-github': patch +--- + +New experimental alpha exports for use with the upcoming backend system. diff --git a/.changeset/happy-kiwis-look.md b/.changeset/happy-kiwis-look.md new file mode 100644 index 0000000000..ff0da8943b --- /dev/null +++ b/.changeset/happy-kiwis-look.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Fix typo in the documentation diff --git a/.changeset/hot-files-begin.md b/.changeset/hot-files-begin.md new file mode 100644 index 0000000000..e9b9076986 --- /dev/null +++ b/.changeset/hot-files-begin.md @@ -0,0 +1,71 @@ +--- +'@backstage/create-app': patch +--- + +The `packages/backend/Dockerfile` received a couple of updates, it now looks as follows: + +```Dockerfile +FROM node:16-bullseye-slim + +# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, +# in which case you should also move better-sqlite3 to "devDependencies" in package.json. +RUN apt-get update && \ + apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + yarn config set python /usr/bin/python3 + +# From here on we use the least-privileged `node` user to run the backend. +USER node +WORKDIR /app + +# This switches many Node.js dependencies to production mode. +ENV NODE_ENV production + +# Copy repo skeleton first, to avoid unnecessary docker cache invalidation. +# The skeleton contains the package.json of each package in the monorepo, +# and along with yarn.lock and the root package.json, that's enough to run yarn install. +COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ +RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz + +RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" + +# Then copy the rest of the backend bundle, along with any other files we might want. +COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ +RUN tar xzf bundle.tar.gz && rm bundle.tar.gz + +CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] +``` + +The two notable changes are that a `USER node` instruction has been added and the ordering of instructions has been changed accordingly. This means that the app will now be running using the least-privileged `node` user. In order for this to work we now need to make sure that all app files are owned by the `node` user, which we do by adding the `--chown=node:node` option to the `COPY` instructions. + +The second change is the addition of `ENV NODE_ENV production`, which ensured that all Node.js modules run in production mode. If you apply this change to an existing app, note that one of the more significant changes is that this switches the log formatting to use the default production format, JSON. Rather than your log lines looking like this: + +```log +2022-08-10T11:36:05.478Z catalog info Performing database migration type=plugin +``` + +They will now look like this: + +```log +{"level":"info","message":"Performing database migration","plugin":"catalog","service":"backstage","type":"plugin"} +``` + +If you wish to keep the existing format, you can override this change by applying the following change to `packages/backend/src/index.ts`: + +```diff + getRootLogger, ++ setRootLogger, ++ createRootLogger, ++ coloredFormat, + useHotMemoize, + ... + ServerTokenManager, + } from '@backstage/backend-common'; + + ... + + async function main() { ++ setRootLogger(createRootLogger({ format: coloredFormat })); ++ + const config = await loadBackendConfig({ +``` diff --git a/.changeset/hot-suits-glow.md b/.changeset/hot-suits-glow.md new file mode 100644 index 0000000000..e394d3b8c0 --- /dev/null +++ b/.changeset/hot-suits-glow.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +The `CostInsightsHeader`component now uses group names if available diff --git a/.changeset/hungry-dogs-agree.md b/.changeset/hungry-dogs-agree.md new file mode 100644 index 0000000000..b111b6e463 --- /dev/null +++ b/.changeset/hungry-dogs-agree.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-app-api': patch +'@backstage/core-plugin-api': patch +--- + +Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. diff --git a/.changeset/lazy-snakes-film.md b/.changeset/lazy-snakes-film.md new file mode 100644 index 0000000000..ffb9c539c8 --- /dev/null +++ b/.changeset/lazy-snakes-film.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Adds code to generate ids for headers parsed through the MarkdownContent component. diff --git a/.changeset/light-beans-share.md b/.changeset/light-beans-share.md new file mode 100644 index 0000000000..51c59ff7d0 --- /dev/null +++ b/.changeset/light-beans-share.md @@ -0,0 +1,16 @@ +--- +'@backstage/plugin-search-backend-module-pg': minor +--- + +Fixed a bug in search-backend-module-pg where it ignores the skip migration database options when using the database. + +To use this new implementation you need to create the instance of `DatabaseDocumentStore` using the `PluginDatabaseManager` instead of `Knex`; + +``` +import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; +import { DatabaseDocumentStore } from '@backstage/plugin-search-backend-module-pg'; + +const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); +const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); +const databaseDocumentStore = await DatabaseDocumentStore.create(databaseManager); +``` diff --git a/.changeset/lucky-points-wash.md b/.changeset/lucky-points-wash.md new file mode 100644 index 0000000000..961c354574 --- /dev/null +++ b/.changeset/lucky-points-wash.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-org': patch +--- + +Added an edit button to the `UserProfileCard` that is enabled when the `backstage.io/edit-url` is present, this matches how the `GroupProfileCard` works diff --git a/.changeset/metal-crabs-wash.md b/.changeset/metal-crabs-wash.md new file mode 100644 index 0000000000..6ecb50ef67 --- /dev/null +++ b/.changeset/metal-crabs-wash.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Renamed the `RedirectInfo` type to `OAuthStartResponse` diff --git a/.changeset/nervous-rivers-sneeze.md b/.changeset/nervous-rivers-sneeze.md new file mode 100644 index 0000000000..534dbb4a1a --- /dev/null +++ b/.changeset/nervous-rivers-sneeze.md @@ -0,0 +1,63 @@ +--- +'@backstage/cli': patch +--- + +Switch out `sucrase` for `swc` for transpilation. + +`sucrase` is a little more relaxed when it comes to supporting the ways of mocking in `jest`. You might have to make some changes to your tests to meet the `jest` standard and spec if your tests seems to start failing. + +Mocks that look like this are invalid, and they will throw a reference error in line with the `jest` documentation [here on example 3](https://jestjs.io/docs/es6-class-mocks#calling-jestmock-with-the-module-factory-parameter) + +```ts +const mockCommandExists = jest.fn(); +jest.mock('command-exists', () => mockCommandExists); +``` + +You might need to update these mocks to look a little like the following to defer the call to the `jest.fn()` spy until the mock is called. + +```ts +const mockCommandExists = jest.fn(); +jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), +); +``` + +Also, imports are immutable. So it means that you might get some errors when trying to use `jest.spyOn` with starred imports. You might see an error like this: + +```log +TypeError: Cannot redefine property: executeFrameHandlerStrategy + at Function.defineProperty () + + 20 | import { AuthResolverContext } from '../types'; + 21 | + > 22 | const mockFrameHandler = jest.spyOn( + | ^ + 23 | helpers, + 24 | 'executeFrameHandlerStrategy', + 25 | ) as unknown as jest.MockedFunction< +``` + +This happens when you try to do `import * as something from './something'` and then `jest.spyOn(something, 'test)`. You will need to add a `jest.mock` call to mock out the required starred import to return `jest.fn()` functions from the start. Something like this fixes the above test: + +```ts +jest.mock('../../helpers', () => ({ + executeFrameHandlerStrategy: jest.fn(), +})); +``` + +You can also remove any occurrence of `hot(App)` and any import of `react-hot-loader` if you're using the that package locally, as all this has now been replaced with [React Refresh](https://www.npmjs.com/package/react-refresh) which you will get out of the box with the new CLI. + +**Note** If you're experiencing difficulties with running tests after the migration, please reach out to us on Discord to see if we can help, or raise an issue. But in the meantime you can switch back to the existing behaviour by using the following config in your root `package.json`. + +```json +"jest": { + "transform": { + "\\.(js|jsx|ts|tsx|mjs|cjs)$": "@backstage/cli/config/jestSucraseTransform.js", + "\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$": "@backstage/cli/config/jestFileTransform.js", + "\\.(yaml)$": "jest-transform-yaml" + } +} +``` diff --git a/.changeset/old-tables-joke.md b/.changeset/old-tables-joke.md new file mode 100644 index 0000000000..d458244b3a --- /dev/null +++ b/.changeset/old-tables-joke.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-plugin-api': patch +--- + +Simplified the `ServiceFactory` type and removed `AnyServiceFactory`. diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 0000000000..a2f1d9f8e8 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,215 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "example-app": "0.2.74", + "@backstage/app-defaults": "1.0.5", + "example-backend": "0.2.74", + "@backstage/backend-app-api": "0.2.0", + "@backstage/backend-common": "0.15.0", + "@backstage/backend-defaults": "0.1.0", + "example-backend-next": "0.0.2", + "@backstage/backend-plugin-api": "0.1.1", + "@backstage/backend-tasks": "0.3.4", + "@backstage/backend-test-utils": "0.1.27", + "@backstage/catalog-client": "1.0.4", + "@backstage/catalog-model": "1.1.0", + "@backstage/cli": "0.18.1", + "@backstage/cli-common": "0.1.9", + "@backstage/codemods": "0.1.38", + "@backstage/config": "1.0.1", + "@backstage/config-loader": "1.1.3", + "@backstage/core-app-api": "1.0.5", + "@backstage/core-components": "0.11.0", + "@backstage/core-plugin-api": "1.0.5", + "@backstage/create-app": "0.4.30", + "@backstage/dev-utils": "1.0.5", + "e2e-test": "0.2.0", + "@backstage/errors": "1.1.0", + "@backstage/integration": "1.3.0", + "@backstage/integration-react": "1.1.3", + "@backstage/release-manifests": "0.0.5", + "@techdocs/cli": "1.2.0", + "techdocs-cli-embedded-app": "0.2.73", + "@backstage/test-utils": "1.1.3", + "@backstage/theme": "0.2.16", + "@backstage/types": "1.0.0", + "@backstage/version-bridge": "1.0.1", + "@backstage/plugin-adr": "0.2.0", + "@backstage/plugin-adr-backend": "0.2.0", + "@backstage/plugin-adr-common": "0.2.0", + "@backstage/plugin-airbrake": "0.3.8", + "@backstage/plugin-airbrake-backend": "0.2.8", + "@backstage/plugin-allure": "0.1.24", + "@backstage/plugin-analytics-module-ga": "0.1.19", + "@backstage/plugin-apache-airflow": "0.2.1", + "@backstage/plugin-api-docs": "0.8.8", + "@backstage/plugin-api-docs-module-protoc-gen-doc": "0.1.0", + "@backstage/plugin-apollo-explorer": "0.1.1", + "@backstage/plugin-app-backend": "0.3.35", + "@backstage/plugin-auth-backend": "0.15.1", + "@backstage/plugin-auth-node": "0.2.4", + "@backstage/plugin-azure-devops": "0.1.24", + "@backstage/plugin-azure-devops-backend": "0.3.14", + "@backstage/plugin-azure-devops-common": "0.2.4", + "@backstage/plugin-badges": "0.2.32", + "@backstage/plugin-badges-backend": "0.1.29", + "@backstage/plugin-bazaar": "0.1.23", + "@backstage/plugin-bazaar-backend": "0.1.19", + "@backstage/plugin-bitbucket-cloud-common": "0.1.2", + "@backstage/plugin-bitrise": "0.1.35", + "@backstage/plugin-catalog": "1.5.0", + "@backstage/plugin-catalog-backend": "1.3.1", + "@backstage/plugin-catalog-backend-module-aws": "0.1.8", + "@backstage/plugin-catalog-backend-module-azure": "0.1.6", + "@backstage/plugin-catalog-backend-module-bitbucket": "0.2.2", + "@backstage/plugin-catalog-backend-module-bitbucket-cloud": "0.1.2", + "@backstage/plugin-catalog-backend-module-bitbucket-server": "0.1.0", + "@backstage/plugin-catalog-backend-module-gerrit": "0.1.3", + "@backstage/plugin-catalog-backend-module-github": "0.1.6", + "@backstage/plugin-catalog-backend-module-gitlab": "0.1.6", + "@backstage/plugin-catalog-backend-module-ldap": "0.5.2", + "@backstage/plugin-catalog-backend-module-msgraph": "0.4.1", + "@backstage/plugin-catalog-backend-module-openapi": "0.1.1", + "@backstage/plugin-catalog-common": "1.0.5", + "@internal/plugin-catalog-customized": "0.0.1", + "@backstage/plugin-catalog-graph": "0.2.20", + "@backstage/plugin-catalog-graphql": "0.3.12", + "@backstage/plugin-catalog-import": "0.8.11", + "@backstage/plugin-catalog-node": "1.0.1", + "@backstage/plugin-catalog-react": "1.1.3", + "@backstage/plugin-cicd-statistics": "0.1.10", + "@backstage/plugin-cicd-statistics-module-gitlab": "0.1.4", + "@backstage/plugin-circleci": "0.3.8", + "@backstage/plugin-cloudbuild": "0.3.8", + "@backstage/plugin-code-climate": "0.1.8", + "@backstage/plugin-code-coverage": "0.2.1", + "@backstage/plugin-code-coverage-backend": "0.2.1", + "@backstage/plugin-codescene": "0.1.3", + "@backstage/plugin-config-schema": "0.1.31", + "@backstage/plugin-cost-insights": "0.11.30", + "@backstage/plugin-cost-insights-common": "0.1.1", + "@backstage/plugin-dynatrace": "0.1.2", + "@internal/plugin-todo-list": "1.0.4", + "@internal/plugin-todo-list-backend": "1.0.4", + "@internal/plugin-todo-list-common": "1.0.3", + "@backstage/plugin-explore": "0.3.39", + "@backstage/plugin-explore-react": "0.0.20", + "@backstage/plugin-firehydrant": "0.1.25", + "@backstage/plugin-fossa": "0.2.40", + "@backstage/plugin-gcalendar": "0.3.4", + "@backstage/plugin-gcp-projects": "0.3.27", + "@backstage/plugin-git-release-manager": "0.3.21", + "@backstage/plugin-github-actions": "0.5.8", + "@backstage/plugin-github-deployments": "0.1.39", + "@backstage/plugin-github-issues": "0.1.0", + "@backstage/plugin-github-pull-requests-board": "0.1.2", + "@backstage/plugin-gitops-profiles": "0.3.26", + "@backstage/plugin-gocd": "0.1.14", + "@backstage/plugin-graphiql": "0.2.40", + "@backstage/plugin-graphql-backend": "0.1.25", + "@backstage/plugin-home": "0.4.24", + "@backstage/plugin-ilert": "0.1.34", + "@backstage/plugin-jenkins": "0.7.7", + "@backstage/plugin-jenkins-backend": "0.1.25", + "@backstage/plugin-jenkins-common": "0.1.7", + "@backstage/plugin-kafka": "0.3.8", + "@backstage/plugin-kafka-backend": "0.2.28", + "@backstage/plugin-kubernetes": "0.7.1", + "@backstage/plugin-kubernetes-backend": "0.7.1", + "@backstage/plugin-kubernetes-common": "0.4.1", + "@backstage/plugin-lighthouse": "0.3.8", + "@backstage/plugin-newrelic": "0.3.26", + "@backstage/plugin-newrelic-dashboard": "0.2.1", + "@backstage/plugin-org": "0.5.8", + "@backstage/plugin-pagerduty": "0.5.1", + "@backstage/plugin-periskop": "0.1.6", + "@backstage/plugin-periskop-backend": "0.1.6", + "@backstage/plugin-permission-backend": "0.5.10", + "@backstage/plugin-permission-common": "0.6.3", + "@backstage/plugin-permission-node": "0.6.4", + "@backstage/plugin-permission-react": "0.4.4", + "@backstage/plugin-proxy-backend": "0.2.29", + "@backstage/plugin-rollbar": "0.4.8", + "@backstage/plugin-rollbar-backend": "0.1.32", + "@backstage/plugin-scaffolder": "1.5.0", + "@backstage/plugin-scaffolder-backend": "1.5.0", + "@backstage/plugin-scaffolder-backend-module-cookiecutter": "0.2.10", + "@backstage/plugin-scaffolder-backend-module-rails": "0.4.3", + "@backstage/plugin-scaffolder-backend-module-yeoman": "0.2.8", + "@backstage/plugin-scaffolder-common": "1.1.2", + "@backstage/plugin-search": "1.0.1", + "@backstage/plugin-search-backend": "1.0.1", + "@backstage/plugin-search-backend-module-elasticsearch": "1.0.1", + "@backstage/plugin-search-backend-module-pg": "0.3.6", + "@backstage/plugin-search-backend-node": "1.0.1", + "@backstage/plugin-search-common": "1.0.0", + "@backstage/plugin-search-react": "1.0.1", + "@backstage/plugin-sentry": "0.4.1", + "@backstage/plugin-shortcuts": "0.3.0", + "@backstage/plugin-sonarqube": "0.4.0", + "@backstage/plugin-sonarqube-backend": "0.1.0", + "@backstage/plugin-splunk-on-call": "0.3.32", + "@backstage/plugin-stack-overflow": "0.1.4", + "@backstage/plugin-stack-overflow-backend": "0.1.4", + "@backstage/plugin-tech-insights": "0.2.4", + "@backstage/plugin-tech-insights-backend": "0.5.1", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "0.1.19", + "@backstage/plugin-tech-insights-common": "0.2.6", + "@backstage/plugin-tech-insights-node": "0.3.3", + "@backstage/plugin-tech-radar": "0.5.15", + "@backstage/plugin-techdocs": "1.3.1", + "@backstage/plugin-techdocs-addons-test-utils": "1.0.3", + "@backstage/plugin-techdocs-backend": "1.2.1", + "@backstage/plugin-techdocs-module-addons-contrib": "1.0.3", + "@backstage/plugin-techdocs-node": "1.3.0", + "@backstage/plugin-techdocs-react": "1.0.3", + "@backstage/plugin-todo": "0.2.10", + "@backstage/plugin-todo-backend": "0.1.32", + "@backstage/plugin-user-settings": "0.4.7", + "@backstage/plugin-vault": "0.1.2", + "@backstage/plugin-vault-backend": "0.2.1", + "@backstage/plugin-xcmetrics": "0.2.28" + }, + "changesets": [ + "beige-monkeys-add", + "beige-pumas-tap", + "clever-beans-turn", + "cold-frogs-kiss", + "dry-games-end", + "eight-spies-protect", + "five-carrots-pay", + "fresh-rabbits-juggle", + "gorgeous-swans-kiss", + "happy-kiwis-look", + "hot-files-begin", + "hot-suits-glow", + "hungry-dogs-agree", + "lazy-snakes-film", + "light-beans-share", + "lucky-points-wash", + "nervous-rivers-sneeze", + "old-tables-joke", + "renovate-7d3b357", + "renovate-c98c336", + "rotten-books-crash", + "rude-books-rush", + "shaggy-chicken-behave", + "sharp-swans-suffer", + "shiny-lobsters-fix", + "silent-kings-live", + "slimy-zebras-reply", + "spicy-cherries-remember", + "strong-games-kiss", + "strong-planes-return", + "tame-papayas-protect", + "techdocs-jeans-wait", + "tiny-oranges-thank", + "tough-dolphins-smile", + "two-planets-provide", + "weak-yaks-learn", + "wild-sheep-roll", + "witty-cats-wink", + "young-trees-rescue" + ] +} diff --git a/.changeset/red-numbers-suffer.md b/.changeset/red-numbers-suffer.md new file mode 100644 index 0000000000..c1baae1e92 --- /dev/null +++ b/.changeset/red-numbers-suffer.md @@ -0,0 +1,44 @@ +--- +'@backstage/plugin-allure': patch +'@backstage/plugin-apache-airflow': patch +'@backstage/plugin-app-backend': patch +'@backstage/plugin-auth-backend': patch +'@backstage/plugin-bitrise': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-catalog-graphql': patch +'@backstage/plugin-cicd-statistics': patch +'@backstage/plugin-circleci': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-code-climate': patch +'@backstage/plugin-config-schema': patch +'@backstage/plugin-cost-insights': patch +'@backstage/plugin-dynatrace': patch +'@backstage/plugin-explore': patch +'@backstage/plugin-explore-react': patch +'@backstage/plugin-firehydrant': patch +'@backstage/plugin-gcalendar': patch +'@backstage/plugin-gcp-projects': patch +'@backstage/plugin-github-actions': patch +'@backstage/plugin-github-deployments': patch +'@backstage/plugin-github-pull-requests-board': patch +'@backstage/plugin-gitops-profiles': patch +'@backstage/plugin-graphql-backend': patch +'@backstage/plugin-home': patch +'@backstage/plugin-ilert': patch +'@backstage/plugin-jenkins-backend': patch +'@backstage/plugin-kubernetes-common': patch +'@backstage/plugin-newrelic': patch +'@backstage/plugin-newrelic-dashboard': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-rollbar': patch +'@backstage/plugin-rollbar-backend': patch +'@backstage/plugin-search-backend-module-pg': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-shortcuts': patch +'@backstage/plugin-splunk-on-call': patch +'@backstage/plugin-tech-radar': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-xcmetrics': patch +--- + +Minor API signatures cleanup diff --git a/.changeset/renovate-7d3b357.md b/.changeset/renovate-7d3b357.md new file mode 100644 index 0000000000..bdb86d12c2 --- /dev/null +++ b/.changeset/renovate-7d3b357.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Updated dependency `json-schema-library` to `^7.0.0`. diff --git a/.changeset/renovate-c98c336.md b/.changeset/renovate-c98c336.md new file mode 100644 index 0000000000..b2139cfe20 --- /dev/null +++ b/.changeset/renovate-c98c336.md @@ -0,0 +1,108 @@ +--- +'@backstage/backend-common': patch +'@backstage/backend-test-utils': patch +'@backstage/catalog-client': patch +'@backstage/cli': patch +'@backstage/config-loader': patch +'@backstage/core-app-api': patch +'@backstage/core-components': patch +'@backstage/core-plugin-api': patch +'@backstage/integration-react': patch +'@backstage/integration': patch +'@backstage/release-manifests': patch +'@backstage/test-utils': patch +'@backstage/plugin-adr-backend': patch +'@backstage/plugin-adr': patch +'@backstage/plugin-airbrake-backend': patch +'@backstage/plugin-airbrake': patch +'@backstage/plugin-allure': patch +'@backstage/plugin-analytics-module-ga': patch +'@backstage/plugin-apache-airflow': patch +'@backstage/plugin-api-docs': patch +'@backstage/plugin-apollo-explorer': patch +'@backstage/plugin-app-backend': patch +'@backstage/plugin-auth-backend': patch +'@backstage/plugin-auth-node': patch +'@backstage/plugin-azure-devops-backend': patch +'@backstage/plugin-azure-devops': patch +'@backstage/plugin-badges': patch +'@backstage/plugin-bitbucket-cloud-common': patch +'@backstage/plugin-bitrise': patch +'@backstage/plugin-catalog-backend-module-azure': patch +'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch +'@backstage/plugin-catalog-backend-module-bitbucket-server': patch +'@backstage/plugin-catalog-backend-module-bitbucket': patch +'@backstage/plugin-catalog-backend-module-gerrit': patch +'@backstage/plugin-catalog-backend-module-github': patch +'@backstage/plugin-catalog-backend-module-gitlab': patch +'@backstage/plugin-catalog-backend-module-msgraph': patch +'@backstage/plugin-catalog-backend': patch +'@backstage/plugin-catalog-graphql': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-circleci': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-code-climate': patch +'@backstage/plugin-code-coverage-backend': patch +'@backstage/plugin-code-coverage': patch +'@backstage/plugin-codescene': patch +'@backstage/plugin-config-schema': patch +'@backstage/plugin-cost-insights': patch +'@backstage/plugin-dynatrace': patch +'@backstage/plugin-explore-react': patch +'@backstage/plugin-explore': patch +'@backstage/plugin-firehydrant': patch +'@backstage/plugin-fossa': patch +'@backstage/plugin-gcalendar': patch +'@backstage/plugin-gcp-projects': patch +'@backstage/plugin-git-release-manager': patch +'@backstage/plugin-github-actions': patch +'@backstage/plugin-github-deployments': patch +'@backstage/plugin-github-issues': patch +'@backstage/plugin-github-pull-requests-board': patch +'@backstage/plugin-gitops-profiles': patch +'@backstage/plugin-gocd': patch +'@backstage/plugin-graphiql': patch +'@backstage/plugin-graphql-backend': patch +'@backstage/plugin-home': patch +'@backstage/plugin-ilert': patch +'@backstage/plugin-jenkins-backend': patch +'@backstage/plugin-jenkins': patch +'@backstage/plugin-kafka': patch +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-lighthouse': patch +'@backstage/plugin-newrelic': patch +'@backstage/plugin-org': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-periskop-backend': patch +'@backstage/plugin-periskop': patch +'@backstage/plugin-permission-backend': patch +'@backstage/plugin-permission-common': patch +'@backstage/plugin-permission-node': patch +'@backstage/plugin-proxy-backend': patch +'@backstage/plugin-rollbar-backend': patch +'@backstage/plugin-rollbar': patch +'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch +'@backstage/plugin-scaffolder-backend': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-search': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-shortcuts': patch +'@backstage/plugin-sonarqube-backend': patch +'@backstage/plugin-sonarqube': patch +'@backstage/plugin-splunk-on-call': patch +'@backstage/plugin-stack-overflow': patch +'@backstage/plugin-tech-insights': patch +'@backstage/plugin-tech-radar': patch +'@backstage/plugin-techdocs-addons-test-utils': patch +'@backstage/plugin-techdocs-backend': patch +'@backstage/plugin-techdocs-module-addons-contrib': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-todo-backend': patch +'@backstage/plugin-todo': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-vault-backend': patch +'@backstage/plugin-vault': patch +'@backstage/plugin-xcmetrics': patch +--- + +Updated dependency `msw` to `^0.45.0`. diff --git a/.changeset/rich-cooks-camp.md b/.changeset/rich-cooks-camp.md new file mode 100644 index 0000000000..04d86033f7 --- /dev/null +++ b/.changeset/rich-cooks-camp.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Cloudflare Access Provider: Add JWT to CloudflareAccessResult diff --git a/.changeset/rotten-books-crash.md b/.changeset/rotten-books-crash.md new file mode 100644 index 0000000000..b0c020a743 --- /dev/null +++ b/.changeset/rotten-books-crash.md @@ -0,0 +1,5 @@ +--- +'@backstage/dev-utils': patch +--- + +Removed the dependency and setup of `react-hot-loader`, since the `@backstage/cli` now uses `swc` with `React Refresh` instead. diff --git a/.changeset/rude-books-rush.md b/.changeset/rude-books-rush.md new file mode 100644 index 0000000000..a98e90e27e --- /dev/null +++ b/.changeset/rude-books-rush.md @@ -0,0 +1,9 @@ +--- +'@backstage/backend-tasks': patch +'@backstage/plugin-app-backend': patch +'@backstage/plugin-bazaar-backend': patch +'@backstage/plugin-code-coverage-backend': patch +'@backstage/plugin-tech-insights-backend': patch +--- + +Fixed a bug where the database option to skip migrations was ignored. diff --git a/.changeset/shaggy-chicken-behave.md b/.changeset/shaggy-chicken-behave.md new file mode 100644 index 0000000000..41445b0930 --- /dev/null +++ b/.changeset/shaggy-chicken-behave.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +'@backstage/plugin-scaffolder-common': minor +--- + +add entity metadata to the template info type diff --git a/.changeset/sharp-swans-suffer.md b/.changeset/sharp-swans-suffer.md new file mode 100644 index 0000000000..841d746634 --- /dev/null +++ b/.changeset/sharp-swans-suffer.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': minor +--- + +Added support for `async` validation for the `next` version of the plugin diff --git a/.changeset/shiny-lobsters-fix.md b/.changeset/shiny-lobsters-fix.md new file mode 100644 index 0000000000..99e255acbe --- /dev/null +++ b/.changeset/shiny-lobsters-fix.md @@ -0,0 +1,39 @@ +--- +'@backstage/plugin-azure-devops-backend': patch +--- + +`createRouter` now requires an additional reader: `UrlReader` argument + +```diff +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + return createRouter({ + logger: env.logger, + config: env.config, ++ reader: env.reader, + }); +} +``` + +Remember to check if you have already provided these settings previously. + +#### [Azure DevOps] + +```yaml +# app-config.yaml +azureDevOps: + host: dev.azure.com + token: my-token + organization: my-company +``` + +#### [Azure Integrations] + +```yaml +# app-config.yaml +integrations: + azure: + - host: dev.azure.com + token: ${AZURE_TOKEN} +``` diff --git a/.changeset/silent-kings-live.md b/.changeset/silent-kings-live.md new file mode 100644 index 0000000000..7e55f5ae78 --- /dev/null +++ b/.changeset/silent-kings-live.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +Removed the depreacated `publish:file` action, use the template editor to test templates instead. diff --git a/.changeset/slimy-zebras-reply.md b/.changeset/slimy-zebras-reply.md new file mode 100644 index 0000000000..5b309f5129 --- /dev/null +++ b/.changeset/slimy-zebras-reply.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-ldap': patch +--- + +Now the `searchStream` method in LDAP client awaits the callbacks diff --git a/.changeset/spicy-cherries-remember.md b/.changeset/spicy-cherries-remember.md new file mode 100644 index 0000000000..c742c7a1e8 --- /dev/null +++ b/.changeset/spicy-cherries-remember.md @@ -0,0 +1,7 @@ +--- +'@backstage/backend-app-api': patch +'@backstage/backend-defaults': patch +'@backstage/backend-test-utils': patch +--- + +Updated usages of `ServiceFactory`. diff --git a/.changeset/strong-games-kiss.md b/.changeset/strong-games-kiss.md new file mode 100644 index 0000000000..a5f6d5f864 --- /dev/null +++ b/.changeset/strong-games-kiss.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-catalog-backend': patch +'@backstage/plugin-catalog-node': patch +--- + +The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. diff --git a/.changeset/strong-planes-return.md b/.changeset/strong-planes-return.md new file mode 100644 index 0000000000..5b5648528a --- /dev/null +++ b/.changeset/strong-planes-return.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +'@backstage/plugin-tech-insights-node': patch +--- + +Support for timeout in FactRetrieverRegistrationOptions diff --git a/.changeset/tame-papayas-protect.md b/.changeset/tame-papayas-protect.md new file mode 100644 index 0000000000..9a0266748a --- /dev/null +++ b/.changeset/tame-papayas-protect.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-plugin-api': patch +--- + +When defining a new `ServiceRef` you can now also include a `defaultFactory`, which will be used to construct instances of the service in case there is no explicit factory defined. diff --git a/.changeset/techdocs-jeans-wait.md b/.changeset/techdocs-jeans-wait.md new file mode 100644 index 0000000000..b4d9007754 --- /dev/null +++ b/.changeset/techdocs-jeans-wait.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Always update the title and sub-title when the location changes on a `TechDocs` reader page. diff --git a/.changeset/tiny-oranges-thank.md b/.changeset/tiny-oranges-thank.md new file mode 100644 index 0000000000..179aeea1c4 --- /dev/null +++ b/.changeset/tiny-oranges-thank.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights-backend': patch +--- + +Modify Tech insight initialization to expose FactRetrieverEngine. Enables users to trigger fact retrieval manually or reschedule retrievers on runtime. diff --git a/.changeset/tough-dolphins-smile.md b/.changeset/tough-dolphins-smile.md new file mode 100644 index 0000000000..bb4f0a39a8 --- /dev/null +++ b/.changeset/tough-dolphins-smile.md @@ -0,0 +1,19 @@ +--- +'@backstage/catalog-client': patch +'@backstage/core-plugin-api': patch +'@backstage/plugin-api-docs': patch +'@backstage/plugin-apollo-explorer': patch +'@backstage/plugin-azure-devops-backend': patch +'@backstage/plugin-badges': patch +'@backstage/plugin-badges-backend': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-circleci': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-kubernetes': patch +'@backstage/plugin-scaffolder-backend': patch +'@backstage/plugin-search-backend-module-elasticsearch': patch +'@backstage/plugin-sonarqube-backend': patch +'@backstage/plugin-techdocs': patch +--- + +Minor API signatures cleanup diff --git a/.changeset/two-planets-provide.md b/.changeset/two-planets-provide.md new file mode 100644 index 0000000000..920eebc01d --- /dev/null +++ b/.changeset/two-planets-provide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': minor +--- + +Implementing review step for the scaffolder under `create/next` diff --git a/.changeset/weak-yaks-learn.md b/.changeset/weak-yaks-learn.md new file mode 100644 index 0000000000..7a94e10d68 --- /dev/null +++ b/.changeset/weak-yaks-learn.md @@ -0,0 +1,49 @@ +--- +'@backstage/plugin-azure-devops': minor +'@backstage/plugin-azure-devops-common': minor +--- + +Added README card `EntityAzureReadmeCard` for Azure Devops. + +To get the README component working you'll need to do the following two steps: + +1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + +2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + +**Notes:** + +- You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. +- The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation +- The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% diff --git a/.changeset/wild-sheep-roll.md b/.changeset/wild-sheep-roll.md new file mode 100644 index 0000000000..1551100b2a --- /dev/null +++ b/.changeset/wild-sheep-roll.md @@ -0,0 +1,8 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-adr': patch +'@backstage/plugin-apache-airflow': patch +'@backstage/plugin-api-docs': patch +--- + +Minor cleanup of the public API surface to reduce the number of warnings diff --git a/.changeset/witty-cats-wink.md b/.changeset/witty-cats-wink.md new file mode 100644 index 0000000000..82f6d3098f --- /dev/null +++ b/.changeset/witty-cats-wink.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-msgraph': patch +--- + +Fix typo diff --git a/.changeset/young-trees-rescue.md b/.changeset/young-trees-rescue.md new file mode 100644 index 0000000000..d2ea5b3aeb --- /dev/null +++ b/.changeset/young-trees-rescue.md @@ -0,0 +1,24 @@ +--- +'@backstage/create-app': patch +--- + +Added `EntityLinksCard` to the system `EntityPage`. + +For an existing installation where you want to display the links card for entity pages of kind `system` you should make the following adjustment to `packages/app/src/components/catalog/EntityPage.tsx` + +```diff +const systemPage = ( + ... + + + ++ ++ ++ +- ++ + + + ... +); +``` diff --git a/.github/vale/Vocab/Backstage/accept.txt b/.github/vale/Vocab/Backstage/accept.txt index bd3bcdfb6e..ae94912f38 100644 --- a/.github/vale/Vocab/Backstage/accept.txt +++ b/.github/vale/Vocab/Backstage/accept.txt @@ -313,6 +313,7 @@ Talkdesk tasklist techdocs Telenor +telus templated templater Templater diff --git a/ADOPTERS.md b/ADOPTERS.md index 278422693d..902952a90e 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -28,7 +28,6 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi | [Lunar](https://lunar.app) | [Jacob Valdemar](https://github.com/JacobValdemar) | Internal developer portal for service overview and insights, API documentation, technical guides, onboarding guides and RFC's. | | [Trendyol](https://trendyol.com) | [Gamze Senturk](https://github.com/gmzsenturk), [Mert Can Bilgic](https://github.com/mertcb) | The Developer Portal has been called `Pandora`. Provides an overview of Trendyol tech ecosystem. TechDocs, Catalog, Custom Plugins and Theme. | | [Peloton](https://www.onepeloton.com/) | [Matt Waldron](https://github.com/daftgopher) | Creating our first developer portal and tech-docs. Exploring Service Catalog, Tech Insights and Cost Insights as well. | -| [TELUS](https://telus.com) | [Seb Barre](https://github.com/sbarre) | The Go-to place to find answers about development and delivery at TELUS. | | [Brex](https://www.brex.com/) | [Vamsi Chitters](https://github.com/vamsikc) | A centralized UI to understand how a service fits in the whole Brex architecture and manage a team’s engineering dependencies. | | [Oriflame](https://www.oriflame.com/) | [Oriflame](https://github.com/oriflame) | Internal developer portal for services, single page apps and packages overview, API documentation, technical guides, tech-radar and more. | | [Booz Allen Hamilton](https://www.boozallen.com/) | [Jason Miller](https://github.com/JasonMiller-BAH) | Developer portal for a full-stack software development ecosystem that accelerates consistent and repeatable Modern Software Development practices for internal innovation and investments. | @@ -201,10 +200,11 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi | [Intility](https://intility.no/en/) | [@daniwk](https://github.com/daniwk) | We are creating a developer portal powered by Backstage, with software catalog, documentation, templates and integrations to our infrastructure and internal tools. | | [ImmobiliareLabs](https://labs.immobiliare.it/) | [@JellyBellyDev](https://github.com/JellyBellyDev) | Centralized portal with our internal services, infrastructures, relationships between systems, technical documentation, templates, monitoring and custom integrations with our own DX tools. | | [Skillz](https://skillz.com/) | [Peiman Jafari](https://github.com/peimanja) | Internal developers portal for technical documentations, components ownership and relationship, software templates and integrations with internal tools | -| [Telus](https://www.telus.com/en/) | [Leo Li](mailto:leo.li@telus.com), [Laurent Robichaud](mailto:laurent.robichaud@telus.com) | Simplifying the developer experience through centralized team member portals. Our current focus includes the adoption of Tech Docs, Software Catalog, Software Templates, the plethora of plugins, and contributing features back to Backstage. 🤖 | +| [Telus](https://www.telus.com/en/) | [Leo Li](mailto:leo.li@telus.com), [Laurent Robichaud](mailto:laurent.robichaud@telus.com), [Seb Barre](https://github.com/sbarre) | Simplifying the developer experience through centralized team member portals. Our current focus includes the adoption of Tech Docs, Software Catalog, Software Templates, the plethora of plugins, and contributing features back to Backstage. 🤖 | | [Fidelity Investments](https://fidelity.com) | [Ankita Upadhyay](mailto:ankita.upadhyay@fmr.com) | Getting started with the adoption for Monorepo projects | | [Verisk](https://verisk.com) | [Callen Barton](mailto:cbarton@verisk.com) | Developer portal to quickly create and deploy microservices. | | [iodigital](https://iodigital.com) | [Jan-Willem Mulder](mailto:jan-willem.mulder@iodigital.com) | Internal developer portal for discovery of applications, projects and teams. Using several plugins like the Software Catalog and Tech Insights for promoting best practices and supporting our SDLC toolchain | | [Fanatics](https://www.fanaticsinc.com/) | [Rory Scott](mailto:rscott@fanatics.com) | Internal Portal consolidating documentation, making it easier to manage applications, internal developer community platform, and self-service cloud infrastructure + pipelines. | | [Appfolio](https://appfolio.com) | [Andy Vaughn](mailto:andy.vaughn@appfolio.com) | Internal software catalog, tech radar, documentation portal to disambiguate software and domain ownership, foster exploration of available developer platform services and tools, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. | -| [isaac](https://isaac.com.br/) | [Leonardo Borges](mailto:leonardo.borges@isaac.com.br), [Ordilei Souza](mailto:ordilei.souza@isaac.com.br) | We're using Backstage as our Internal Developer Portal and main microservices catalog for mapping ownership, health and metrics for each one. +| [isaac](https://isaac.com.br/) | [Leonardo Borges](mailto:leonardo.borges@isaac.com.br), [Ordilei Souza](mailto:ordilei.souza@isaac.com.br) | We're using Backstage as our Internal Developer Portal and main microservices catalog for mapping ownership, health and metrics for each one. | +| [Paraná Banco](https://site.paranabanco.com.br/) | [Joao Antunes](mailto:joaopma@pbtech.net.br) | Internal software catalog, documentation and ownership, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. | \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index 49e26349b0..5866fff2b4 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,9 +2,7 @@ ## Supported Versions -| Version | Supported | -| ------- | ------------------ | -| 0.x | :white_check_mark: | +See our [Release & Versioning Policy](https://backstage.io/docs/overview/versioning-policy#release-versioning-policy). ## Reporting a Vulnerability diff --git a/contrib/docker/cookiecutter-with-jinja2-extensions/Dockerfile b/contrib/docker/cookiecutter-with-jinja2-extensions/Dockerfile deleted file mode 100644 index e41d324730..0000000000 --- a/contrib/docker/cookiecutter-with-jinja2-extensions/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM alpine:3.16 - -RUN apk add --update \ - git \ - python \ - python-dev \ - py-pip \ - g++ && \ - pip install cookiecutter jinja2_custom_filters_extension && \ - apk del g++ py-pip python-dev && \ - rm -rf /var/cache/apk/* diff --git a/contrib/docker/cookiecutter-with-jinja2-extensions/README.md b/contrib/docker/cookiecutter-with-jinja2-extensions/README.md index 470694513a..0b754fa4ce 100644 --- a/contrib/docker/cookiecutter-with-jinja2-extensions/README.md +++ b/contrib/docker/cookiecutter-with-jinja2-extensions/README.md @@ -51,7 +51,7 @@ steps: imageName: 'foo/custom-built-cookiecutter-image-with-extensions' ``` -See for example, the [`Dockerfile`](./Dockerfile) in this directory. +For example, you can `pip install jinja2_custom_filters_extension` as part of your cookiecutter Dockerfile. ### Instructing Cookiecutter to use the extension diff --git a/contrib/docker/kubernetes-example-backend/Dockerfile b/contrib/docker/kubernetes-example-backend/Dockerfile deleted file mode 100644 index 4f4105838d..0000000000 --- a/contrib/docker/kubernetes-example-backend/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -FROM node:14-buster - -WORKDIR /usr/src/app - -# (workaround) Install cookiecutter and mkdocs to avoid the need to run docker in docker -RUN cd /tmp && curl -O https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz && \ - tar -xvf Python-3.8.2.tar.xz && \ - cd Python-3.8.2 && \ - ./configure --enable-optimizations && \ - make -j 4 && \ - make altinstall - -RUN apt update -RUN apt install -y mkdocs - -RUN pip3.8 install mkdocs-techdocs-core - -RUN pip3.8 install cookiecutter && \ - apt remove -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev g++ python-pip python-dev && \ - rm -rf /var/cache/apt/* /tmp/Python-3.8.2 - -# Copy repo skeleton first, to avoid unnecessary docker cache invalidation. -# The skeleton contains the package.json of each package in the monorepo, -# and along with yarn.lock and the root package.json, that's enough to run yarn install. -ADD yarn.lock package.json skeleton.tar ./ - -RUN yarn install --frozen-lockfile --production - -# This will copy the contents of the dist-workspace when running the build-image command. -# Do not use this Dockerfile outside of that command, as it will copy in the source code instead. -COPY . . - -CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.development.yaml"] diff --git a/contrib/docker/kubernetes-example-backend/README.md b/contrib/docker/kubernetes-example-backend/README.md deleted file mode 100644 index d0f9d57022..0000000000 --- a/contrib/docker/kubernetes-example-backend/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Example backend Dockerfile - -This Dockerfile will build the example backend with certain additional binaries needed to workaround -the docker requirement in the scaffolder and techdocs. - -# Usage - -```bash -yarn docker-build -f --tag -``` - -> The absolute path is necessary as this directory is not copied to the build workspace when building -> the docker image. diff --git a/cypress/yarn.lock b/cypress/yarn.lock index 96e350871b..2f1e0f0775 100644 --- a/cypress/yarn.lock +++ b/cypress/yarn.lock @@ -40,14 +40,14 @@ lodash.once "^4.1.1" "@types/node@*": - version "18.6.3" - resolved "https://registry.npmjs.org/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" - integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== + version "18.7.6" + resolved "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83" + integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A== "@types/node@^14.14.31": - version "14.18.23" - resolved "https://registry.npmjs.org/@types/node/-/node-14.18.23.tgz#70f5f20b0b1b38f696848c1d3647bb95694e615e" - integrity sha512-MhbCWN18R4GhO8ewQWAFK4TGQdBpXWByukz7cWyJmXhvRuCIaM/oWytGPqVmDzgEnnaIc9ss6HbU5mUi+vyZPA== + version "14.18.24" + resolved "https://registry.npmjs.org/@types/node/-/node-14.18.24.tgz#406b220dc748947e1959d8a38a75979e87166704" + integrity sha512-aJdn8XErcSrfr7k8ZDDfU6/2OgjZcB2Fu9d+ESK8D7Oa5mtsv8Fa8GpcwTA0v60kuZBaalKPzuzun4Ov1YWO/w== "@types/sinonjs__fake-timers@8.1.1": version "8.1.1" @@ -304,9 +304,9 @@ cross-spawn@^7.0.0: which "^2.0.1" cypress@^10.0.0: - version "10.4.0" - resolved "https://registry.npmjs.org/cypress/-/cypress-10.4.0.tgz#bb5b3b6588ad49eff172fecf5778cc0da2980e4e" - integrity sha512-OM7F8MRE01SHQRVVzunid1ZK1m90XTxYnl+7uZfIrB4CYqUDCrZEeSyCXzIbsS6qcaijVCAhqDL60SxG8N6hew== + version "10.6.0" + resolved "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz#13f46867febf2c3715874ed5dce9c2e946b175fe" + integrity sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -359,9 +359,9 @@ dashdash@^1.12.0: assert-plus "^1.0.0" dayjs@^1.10.4: - version "1.11.4" - resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.4.tgz#3b3c10ca378140d8917e06ebc13a4922af4f433e" - integrity sha512-Zj/lPM5hOvQ1Bf7uAvewDaUcsJoI6JmNqmHhHl3nyumwe0XHwt8sWdOVAPACJzCebL8gQCi+K49w7iKWnGwX9g== + version "1.11.5" + resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93" + integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA== debug@^3.1.0: version "3.2.7" diff --git a/docs/assets/getting-started/add-icons-links-example.png b/docs/assets/getting-started/add-icons-links-example.png new file mode 100644 index 0000000000..dfff84b79c Binary files /dev/null and b/docs/assets/getting-started/add-icons-links-example.png differ diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index 6e0ff77228..d46aff1b06 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -58,8 +58,6 @@ Once the host build is complete, we are ready to build our image. The following ```Dockerfile FROM node:16-bullseye-slim -WORKDIR /app - # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, # in which case you should also move better-sqlite3 to "devDependencies" in package.json. RUN apt-get update && \ @@ -67,16 +65,23 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && \ yarn config set python /usr/bin/python3 +# From here on we use the least-privileged `node` user to run the backend. +USER node +WORKDIR /app + +# This switches many Node.js dependencies to production mode. +ENV NODE_ENV production + # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. # The skeleton contains the package.json of each package in the monorepo, # and along with yarn.lock and the root package.json, that's enough to run yarn install. -COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ +COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" # Then copy the rest of the backend bundle, along with any other files we might want. -COPY packages/backend/dist/bundle.tar.gz app-config.yaml ./ +COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ RUN tar xzf bundle.tar.gz && rm bundle.tar.gz CMD ["node", "packages/backend", "--config", "app-config.yaml"] @@ -177,8 +182,6 @@ RUN yarn --cwd packages/backend build # Stage 3 - Build the actual backend image and install production dependencies FROM node:16-bullseye-slim -WORKDIR /app - # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, # in which case you should also move better-sqlite3 to "devDependencies" in package.json. RUN apt-get update && \ @@ -186,18 +189,25 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && \ yarn config set python /usr/bin/python3 +# From here on we use the least-privileged `node` user to run the backend. +USER node +WORKDIR /app + +# This switches many Node.js dependencies to production mode. +ENV NODE_ENV production + # Copy the install dependencies from the build stage and context -COPY --from=build /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton.tar.gz ./ +COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton.tar.gz ./ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz RUN yarn install --frozen-lockfile --production --network-timeout 600000 && rm -rf "$(yarn cache dir)" # Copy the built packages from the build stage -COPY --from=build /app/packages/backend/dist/bundle.tar.gz . +COPY --from=build --chown=node:node /app/packages/backend/dist/bundle.tar.gz . RUN tar xzf bundle.tar.gz && rm bundle.tar.gz # Copy any other files that we need at runtime -COPY app-config.yaml ./ +COPY --chown=node:node app-config.yaml ./ CMD ["node", "packages/backend", "--config", "app-config.yaml"] ``` diff --git a/docs/getting-started/app-custom-theme.md b/docs/getting-started/app-custom-theme.md index 9ca82d01a1..25131f1c91 100644 --- a/docs/getting-started/app-custom-theme.md +++ b/docs/getting-started/app-custom-theme.md @@ -273,18 +273,22 @@ const LogoFull = () => { }; ``` -## Custom Icons +## Icons + +So far you've seen how to create your own theme and add your own logo, in the following sections you'll be shown how to override the existing icons and how to add more icons + +### Custom Icons You can also customize the Project's _default_ icons. You can change the following [icons](https://github.com/backstage/backstage/blob/master/packages/app-defaults/src/defaults/icons.tsx). -### Requirements +#### Requirements - Files in `.svg` format - React components created for the icons -### Create React Component +#### Create React Component In your front-end application, locate the `src` folder. We suggest creating the `assets/icons` directory and `CustomIcons.tsx` file. @@ -309,7 +313,7 @@ export const ExampleIcon = (props: SvgIconProps) => ( ); ``` -### Using the custom icon +#### Using the custom icon Supply your custom icon in `packages/app/src/App.tsx` @@ -338,6 +342,57 @@ const app = createApp({ [...] ``` +### Adding Icons + +You can add more icons, if the [default icons](https://github.com/backstage/backstage/blob/master/packages/app-defaults/src/defaults/icons.tsx) do not fit your needs, so that they can be used in other places like for Links in your entities. For this example we'll be using icons from[Material UI](https://v4.mui.com/components/material-icons/) and specifically the `AlarmIcon`. Here's how to do that: + +1. First you will want to open your `App.tsx` in `/packages/app/src` +2. Then you want to import your icon, add this to the rest of your imports: `import AlarmIcon from '@material-ui/icons/Alarm';` +3. Next you want to add the icon like this to your `createApp`: + + ```diff + const app = createApp({ + apis: ..., + plugins: ..., + + icons: { + + alert: AlarmIcon, + + }, + themes: ..., + components: ..., + }); + ``` + +4. Now we can reference `alert` for our icon in our entity links like this: + + ```yaml + apiVersion: backstage.io/v1alpha1 + kind: Component + metadata: + name: artist-lookup + description: Artist Lookup + links: + - url: https://example.com/alert + title: Alerts + icon: alert + ``` + + And this is the result: + + ![Example Link with Alert icon](../assets/getting-started/add-icons-links-example.png) + + Another way you can use these icons is from the `AppContext` like this: + + ```ts + import { useApp } from '@backstage/core-plugin-api'; + + const app = useApp(); + const alertIcon = app.getSystemIcon('alert'); + ``` + + You might want to use this method if you have an icon you want to use in several locations. + +Note: If the icon is not available as one of the default icons or one you've added then it will fall back to Material UI's `LanguageIcon` + ## Custom Homepage In addition to a custom theme, a custom logo, you can also customize the diff --git a/docs/integrations/google-cloud-storage/locations.md b/docs/integrations/google-cloud-storage/locations.md index e15cb6346c..1f0334ff17 100644 --- a/docs/integrations/google-cloud-storage/locations.md +++ b/docs/integrations/google-cloud-storage/locations.md @@ -36,6 +36,13 @@ Then make sure the environment variables `GCS_CLIENT_EMAIL` and Since this integration uses the Google Storage SDK, you can also choose to not provide any explicit credentials and let the SDK discover them automatically. +Please note that for this method to work you must add an empty `googleGcs` object to the `integrations` section in `app-config.yaml`. + +```yaml +integrations: + googleGcs: {} +``` + One of these discovery methods is to provide an environment variable called `GOOGLE_APPLICATION_CREDENTIALS` and set it to the file path of your JSON service account key. diff --git a/docs/overview/threat-model.md b/docs/overview/threat-model.md new file mode 100644 index 0000000000..120a0817a9 --- /dev/null +++ b/docs/overview/threat-model.md @@ -0,0 +1,89 @@ +--- +id: threat-model +title: Backstage Threat Model +description: A document describing the threat model for Backstage. +--- + +The threat model outlines key security considerations of Backstage for operators, developers and security researchers. This is a living document and will evolve and be expanded alongside the Backstage project as relevant. + +See [Security Policy and Advisories](https://github.com/backstage/backstage/security) in the Backstage GitHub repository for details on reporting security vulnerabilities and advisories on fixed security flaws. + +## Trust Model + +The Backstage trust model is divided into three groups with different trust levels. + +An **internal user** is an authenticated user that generally belongs to the organization of a particular Backstage deployment. These users are trusted to the extent that they are not expected to compromise the availability of Backstage, but they are not trusted to not compromise data confidentiality or integrity. + +An **integrator** is a user responsible for configuring and maintaining an instance of Backstage. Integrators are fully trusted, since they operate the system and database and therefore have root access to the host system. Additional measures can be taken by adopters of Backstage in order to restrict or observe the access of this group, but that falls outside of the current scope of Backstage. + +Another group of de facto integrators is internal and external code contributors. When installing Backstage plugins you should vet them just like any other package from an external source. While it’s possible to limit the impact of for example a supply chain attack by splitting the deployment into separate services with different plugins, the Backstage project itself does not aim to prevent these kinds of attacks or in any other way sandbox or limit the access of plugins. + +An **external user** is a user that does not belong to the other two groups, for example a malicious actor outside of the organization. The security model of Backstage currently assumes that this group does not have any direct access to Backstage, and it is the responsibility of each adopter of Backstage to make sure this is the case. + +## Integrator Responsibilities + +As an integrator of Backstage you yourself are responsible for protecting your Backstage installation from external and unauthorized access. The sign-in system in Backstage does not exist to limit access, only to inform the system of the identity of the user. There are some plugins that have more fine-grained access control through the permissions system, but the primary purpose of that system is to restrict access to resources for internal users rather than Backstage as a whole. A common and recommended way to protect a Backstage deployment from unauthorized access is to deploy it behind an authenticating proxy such as AWS’s ALB, GCP’s IAP, or Cloudflare Access. + +Other responsibilities include protecting the integrity of configuration files as it may otherwise be possible to introduce vulnerable configurations, as well as the confidentiality of configured secrets related to Backstage as these typically include authentication details to third party systems. + +The integrator is ultimately responsible for auditing usage of internal and external plugins as these run on the host system and have access to configuration and secrets. When installing plugins from sources like NPM, you should vet these in the same way that you would vet any other package installed from that source. + +## Common Backend Configuration + +There are many common facilities that are configured centrally and available to all Backstage backend plugins. For example there is a `DatabaseManager` that provides access to a SQL database, `TaskScheduler` for scheduling long-running tasks, `Logger` as a general logging facility, and `UrlReader` for reading content from external sources. These are all configured either directly in code, or within the `backend` block of the static configuration. The appropriate care needs to be taken to ensure that any secrets remain confidential and no malicious configuration is injected. + +In a typical Backstage setup, there is no boundary between plugins that run on the same host. Likewise, there is no boundary between plugins that share the same database access. Any plugin that is running on a host that has access to the logical database of any other plugin should be considered to have full access to that other plugin. For example, if you deploy the `auth` and `catalog` plugins on separate hosts with separate configuration and credentials, the `catalog` plugin is still considered to have full access to the `auth` plugin if the `catalog` plugin has access to the `auth` plugin's logical database. The only way to create a boundary between the two plugins is to deploy them in such a way that they do not have access to each others’ database. This applies to the database facility as well as any other shared resources, such as the cache. + +The `UrlReader` facility is of particular interest for a secure Backstage configuration. In particular the `backend.reading.allow` configuration lists the hosts that you trust the backend to be able to read content from on behalf of users. It is extremely important that this list does not, for example, allow access to instance metadata endpoints of cloud providers, or other endpoints that your Backstage instance may have access to which contain sensitive information. In general it is recommended to keep the list minimal and only allow reading from required endpoints. The same concerns apply to custom implementations of the `UrlReader` interface, if you need to implement these through code. + +## Authentication + +Backstage provides authentication of users through the `auth` plugin, which primarily acts as an authorization server for different OAuth 2.0 provider integrations. These integrations can both serve the purpose of signing users into Backstage, as well as providing delegated access to external resources, and are all subject to the common concerns of implementing secure OAuth 2.0 authorization servers. All auth provider integrations are disabled by default, and need to be enabled through configuration in order to be used. For each Backstage installation it is recommended to only enable the minimal set of providers that are in use by that instance. + +It is not within scope of the `auth` backend to protect against unauthorized access, that is something that needs to be handled at a deployment level. See the [Integrator Responsibilities](#integrator-responsibilities) section for more information. + +In order to use an auth provider to sign in users into Backstage, it needs to be configured with an [Identity resolver](https://backstage.io/docs/auth/identity-resolver), which is a custom callback implemented in code. The identity resolver is a sensitive part of configuring Backstage and it is important that it always resolves user identities correctly, based on information provided by the authentication provider. There are a number of built-in identity resolvers that can simplify configuration, and it is important that these all resolve users in a secure way, regardless of how they are used. + +As part of signing in with an identity resolver, a Backstage Token is issued containing the resolved user identity. The tokens are asymmetrically signed JSON Web Tokens, with the public keys available to any service that wishes to verify a token. The signing keys are rotated continuously and are unique to each installation of Backstage, meaning that Backstage Tokens are not shared across installations. The token contains claims for the user identity and ownership information, which can be used to determine what Backstage resources are owned by that user or group. It is important that this token can not be forged outside of the `auth` plugin, with the exception of other plugins deployed in the same backend service or sharing the same database. For a high-security deployment, the `auth` backend should therefore be deployed in a separate service with its own database. + +The token is used to prove the identity of the user within the Backstage system, and is used throughout Backstage plugins to control access. It is important that the ownership resolution logic is consistent across the entire Backstage ecosystem, with no possibility of misinterpreting the ownership information. + +For cross backend communication the Backstage Token is typically forwarded or in strict backend to backend communication without a user party the backend itself issues a service token based on a pre-shared secret which is then validated on the receiving end. There are no unique service identities tied to these tokens at this point, meaning the tokens can be used across all services in a Backstage installation, this is something that we aim to improve in the future. + +Backstage also supports authentication through a proxy where the user identity is read from the incoming request from the proxy, which has been decorated by an authenticating reverse proxy such as [AWS ALB](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/). The following proxy auth providers verify the signature of incoming requests, and are therefore safe to deploy with direct access by users: `awsAlb`, `cfAccess`, and `gcpIap`. Providers like `oauth2Proxy` does not verify the incoming request and can therefore be spoofed by a malicious internal user to supply the `auth` backend with forged identity information. It’s therefore highly recommended to restrict access to the `oauth2Proxy` endpoints, or use a different provider. + +## Catalog + +Integrators should configure `catalog.rules` and `catalog.locations[].rules` to limit the allowed entity kinds that users can define. In general it is best to restrict definition of User, Group, and Template entities so that internal users cannot register additional ones. Template entities define actions that are executed on the backend hosts, and while the goal is for these actions to be secure regardless of input, it is still a more sensitive context and it is recommended that you protect it with additional checks. It is very important to not allow registration of User and Group entities if you ingest and rely on these as organizational data in your catalog. Doing so could otherwise open up for the ability to impersonate users and confuse group membership information. You should always ingest organizational data using a statically configured catalog location or an entity provider reading from a trusted source. The entities emitted directly by an entity provider are always trusted and rules are not applied to them, but any entities produced further down the chain are still subject to the rules. + +The Catalog does not aim to protect against resource exhaustion attacks in its default setup. If you need to prevent your internal users from being able to register large amounts of entities, then it is recommended to disable entity registration and use a different approach for discovering entities. One way to mitigate any resource exhaustion attacks is to only allow the catalog to read from trusted SCM sources that have an audit trail. Catalog currently lacks limits for entity hierarchy depth and entity size, which we hope to address in the future. + +By default all internal users are allowed to create and delete entities. If this does not fit your organization's needs it is recommended to enable and configure the [permission](https://backstage.io/docs/permissions/overview) system to restrict these operations. + +## Scaffolder + +By default, Scaffolding jobs execute directly on the host machine, including any actions defined in the template. Because the Scaffolder templates are considered a more sensitive area it is recommended to control access to create and update templates to trusted parties. Template execution is intended to be secure regardless of input, but we still recommend this additional layer of protection. The string templating is executed in a [node VM sandbox](https://github.com/patriksimek/vm2) to mitigate the possibility of remote code execution attacks. + +The Scaffolder often has elevated permissions to for example create repositories in a Github organization. The integrator should therefore be cautious of Scaffolder Templates that for example delete or update existing resources as the user input is typically user defined and can therefore delete or modify resources maliciously or by mistake. + +One strategy that allows you to reduce the access that the Scaffolder service has is to rely on user credentials when executing actions. For example, a GitHub App integration could be configured with read-only permissions, with a separate user OAuth token used to create repositories. This requires that your users have access to create repositories in the first place. + +The integrator should audit installed scaffolding actions just like any other plugin package. It is also important to verify that installed actions fall in line with your own security requirements, as some actions might be intended for more relaxed environments. + +By default all internal users are allowed to execute templates in the scaffolder. If this does not fit your organization's needs it is recommended to enable and configure the [permission](https://backstage.io/docs/permissions/overview) system to restrict these operations. + +## TechDocs + +TechDocs' backend can be broadly configured in two ways. The default is when `techdocs.builder` is set to `local`, in which documentation is generated on-demand and stored locally by the TechDocs backend. When `techdocs.builder` is set to `external` instead, documentation is assumed to be generated by an external process (e.g. in a CI/CD pipeline), and merely read from a configured external storage provider. + +When documentation is generated locally, integrators are responsible for ensuring secure configuration of file system permissions in the location where generated assets are stored. When documentation is generated externally, integrators are responsible for access control and permissioning between the external process that generates the documentation, the storage provider where documentation assets are published, and the TechDocs backend. + +Regardless of backend configuration, the TechDocs frontend does not trust the generated HTML of any documentation sites and therefore applies a strict sanitization process before rendering out any content to users. + +By default, all TechDocs documentation is visible to all Backstage users. Access can be restricted to TechDocs sites by configuring view permissions for the Catalog. + +## Proxy + +The proxy backend acts as a utility for frontend plugins to access remote services that may not be set up to receive traffic directly from the Backstage frontend. Typical reasons for this would be that the upstream service does not provide the appropriate CORS headers or does not serve its content over HTTPS. + +The proxy entries are configured through static configuration. Each entry has a mount path and an upstream target, and also supports other options such as limiting the allowed methods, or injecting additional headers. It is recommended to avoid injecting authentication headers for upstream services, as this is a risky way to decorate requests with credentials. Anyone with access to your Backstage deployment will be able to make requests to the upstream service using the injected credentials. It is recommended that you instead create a backend plugin that forwards individual requests to the upstream service in a secure way. In case you do end up injecting credentials into upstream requests, be sure that you are not exposing any sensitive information or actions. You should also restrict the access as much as possible, for example using the `allowedMethods` option to limit the methods that can be used, and using tokens with the minimum required authorization scope. diff --git a/docs/releases/v1.5.0.md b/docs/releases/v1.5.0.md new file mode 100644 index 0000000000..ca4ae11185 --- /dev/null +++ b/docs/releases/v1.5.0.md @@ -0,0 +1,60 @@ +--- +id: v1.5.0 +title: v1.5.0 +description: Backstage Release v1.5.0 +--- + +These are the release notes for the v1.5.0 release of [Backstage](https://backstage.io/). + +A huge thanks to the whole team of maintainers and contributors as well as the amazing Backstage Community for the hard work in getting this release developed and done. + +## Highlights + +### GitHub Entity Provider + +Added a new `GitHubEntityProvider` ([documentation](https://backstage.io/docs/integrations/github/discovery)), which allows for automatic discovery of catalog entity definition files out of your GitHub projects. This is an improvement upon the `GithubDiscoveryProcessor` that existed before, and we recommend using entity providers rather than processors for discovery and ingestion when possible. Contributed by [@brentg-telus](https://github.com/brentg-telus) [#12822](https://github.com/backstage/backstage/pull/12822) + +### Experimental Plugin Reconfiguration + +This release adds an experimental API that allows plugin authors to define plugin wide options. These options can then be used by adopters of the plugin to reconfigure it to fit their app. Check out the [plugin customization](https://backstage.io/docs/plugins/customization) docs for more information on how to get started. Feedback is welcome on this new feature! Contributed by [@acierto](https://github.com/acierto) [#11404](https://github.com/backstage/backstage/pull/11404) + +### Experimental Backend System Evolution + +This release adds the new `@backstage/backend-defaults` package, part of the [evolution of the backend system](https://github.com/backstage/backstage/issues/11611). This package is highly experimental and we do not recommend using it for any purpose, yet. + +### New plugin: `@aws/aws-proton-plugin-for-backstage` + +Interact with AWS Proton in Backstage. Contributed by [@clareliguori](https://github.com/clareliguori) [#12193](https://github.com/backstage/backstage/pull/12193) + +### New plugin: `@backstage/plugin-github-issues` + +This new plugin can be used to display GitHub issues for your entities. Contributed by [@mrwolny](https://github.com/mrwolny) [#12875](https://github.com/backstage/backstage/pull/12875) + +### New plugin: `@backstage/plugin-sonarqube-backend` + +This new backend for `@backstage/plugin-sonarqube` replaces the Sonarqube proxy configuration; once it is installed, you can remove the `/sonarqube` proxy entry. For more information, see the plugin [README.md](https://github.com/backstage/backstage/blob/master/plugins/sonarqube-backend/README.md). Contributed by [@Neemys](https://github.com/Neemys) [#11925](https://github.com/backstage/backstage/pull/11925) + +### New module: `@backstage/plugin-catalog-backend-module-bitbucket-server` + +This new module for the catalog backend adds the `BitbucketServerEntityProvider`, which allows discovery of entities out of Bitbucket Server installations. Contributed by [@ONordander](https://github.com/ONordander) [#12835](https://github.com/backstage/backstage/pull/12835) + +## Security Fixes + +This release does not contain any security fixes. + +## Upgrade path + +We recommend that you keep your Backstage project up to date with this latest release. For more guidance on how to upgrade, check out the documentation for [keeping Backstage updated](https://backstage.io/docs/getting-started/keeping-backstage-updated). + +## Links and References + +Below you can find a list of links and references to help you learn about and start using this new release. + +- [Backstage official website](https://backstage.io/), [documentation](https://backstage.io/docs/), and [getting started guide](https://backstage.io/docs/getting-started/) +- [GitHub repository](https://github.com/backstage/backstage) +- Backstage's [versioning and support policy](https://backstage.io/docs/overview/versioning-policy) +- [Community Discord](https://discord.gg/bFESRKVt) for discussions and support +- [Changelog](https://github.com/backstage/backstage/tree/master/docs/releases/v1.5.0-changelog.md) +- Backstage [Demos](https://backstage.io/demos), [Blog](https://backstage.io/blog), [Roadmap](https://backstage.io/docs/overview/roadmap) and [Plugins](https://backstage.io/plugins) + +Sign up for our [newsletter](https://mailchi.mp/spotify/backstage-community) if you want to be informed about what is happening in the world of Backstage. diff --git a/docs/releases/v1.6.0-next.0-changelog.md b/docs/releases/v1.6.0-next.0-changelog.md new file mode 100644 index 0000000000..5ff2311b79 --- /dev/null +++ b/docs/releases/v1.6.0-next.0-changelog.md @@ -0,0 +1,1974 @@ +# Release v1.6.0-next.0 + +## @backstage/plugin-azure-devops@0.2.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-azure-devops-common@0.3.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup + +## @backstage/plugin-dynatrace@0.2.0-next.0 + +### Minor Changes + +- e44c0b3811: New features: + + - Some visual improvements to the table that displays Problems + - Added support for viewing recent Synthetics results using + - Added some additional linking to the configured Dynatrace instance + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-scaffolder@1.6.0-next.0 + +### Minor Changes + +- 3424a8075d: Added support for `async` validation for the `next` version of the plugin +- 192d856495: Implementing review step for the scaffolder under `create/next` + +### Patch Changes + +- 9ffb75616d: Fix bug with empty strings in `EntityPicker` +- 3f739be9d9: Minor API signatures cleanup +- 9097278df2: Updated dependency `json-schema-library` to `^7.0.0`. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + +## @backstage/plugin-scaffolder-backend@1.6.0-next.0 + +### Minor Changes + +- ea2eee9e6a: Add the option for a homepage when using the `github:publish` action + +- 8872cc735d: Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options. + + To use this new implementation you need to create the instance of `DatabaseTaskStore` using the `PluginDatabaseManager` instead of `Knex`; + + import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; + import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend'; + + const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); + const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); + const databaseTaskStore = await DatabaseTaskStore.create(databaseManager); + +- 1ff817b3f0: add entity metadata to the template info type + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 2df9955f4a: Removed the depreacated `publish:file` action, use the template editor to test templates instead. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + +## @backstage/plugin-scaffolder-common@1.2.0-next.0 + +### Minor Changes + +- 1ff817b3f0: add entity metadata to the template info type + +## @backstage/plugin-search-backend-module-pg@0.4.0-next.0 + +### Minor Changes + +- 8872cc735d: Fixed a bug in search-backend-module-pg where it ignores the skip migration database options when using the database. + + To use this new implementation you need to create the instance of `DatabaseDocumentStore` using the `PluginDatabaseManager` instead of `Knex`; + + import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; + import { DatabaseDocumentStore } from '@backstage/plugin-search-backend-module-pg'; + + const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); + const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); + const databaseDocumentStore = await DatabaseDocumentStore.create(databaseManager); + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/app-defaults@1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + +## @backstage/backend-app-api@0.2.1-next.0 + +### Patch Changes + +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + +## @backstage/backend-common@0.15.1-next.0 + +### Patch Changes + +- 399286d7dd: Workaround support for `swc` instead of `sucrase` +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/config-loader@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/backend-defaults@0.1.1-next.0 + +### Patch Changes + +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/backend-app-api@0.2.1-next.0 + +## @backstage/backend-plugin-api@0.1.2-next.0 + +### Patch Changes + +- eef91a2558: Simplified the `ServiceFactory` type and removed `AnyServiceFactory`. +- 68513f169a: When defining a new `ServiceRef` you can now also include a `defaultFactory`, which will be used to construct instances of the service in case there is no explicit factory defined. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/backend-tasks@0.3.5-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/backend-test-utils@0.1.28-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/backend-app-api@0.2.1-next.0 + +## @backstage/catalog-client@1.0.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup + +## @backstage/cli@0.18.2-next.0 + +### Patch Changes + +- 6ae0f6a719: Switch out `sucrase` for `swc` for transpilation. + + `sucrase` is a little more relaxed when it comes to supporting the ways of mocking in `jest`. You might have to make some changes to your tests to meet the `jest` standard and spec if your tests seems to start failing. + + Mocks that look like this are invalid, and they will throw a reference error in line with the `jest` documentation [here on example 3](https://jestjs.io/docs/es6-class-mocks#calling-jestmock-with-the-module-factory-parameter) + + ```ts + const mockCommandExists = jest.fn(); + jest.mock('command-exists', () => mockCommandExists); + ``` + + You might need to update these mocks to look a little like the following to defer the call to the `jest.fn()` spy until the mock is called. + + ```ts + const mockCommandExists = jest.fn(); + jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), + ); + ``` + + Also, imports are immutable. So it means that you might get some errors when trying to use `jest.spyOn` with starred imports. You might see an error like this: + + ```log + TypeError: Cannot redefine property: executeFrameHandlerStrategy + at Function.defineProperty () + + 20 | import { AuthResolverContext } from '../types'; + 21 | + > 22 | const mockFrameHandler = jest.spyOn( + | ^ + 23 | helpers, + 24 | 'executeFrameHandlerStrategy', + 25 | ) as unknown as jest.MockedFunction< + ``` + + This happens when you try to do `import * as something from './something'` and then `jest.spyOn(something, 'test)`. You will need to add a `jest.mock` call to mock out the required starred import to return `jest.fn()` functions from the start. Something like this fixes the above test: + + ```ts + jest.mock('../../helpers', () => ({ + executeFrameHandlerStrategy: jest.fn(), + })); + ``` + + You can also remove any occurrence of `hot(App)` and any import of `react-hot-loader` if you're using the that package locally, as all this has now been replaced with [React Refresh](https://www.npmjs.com/package/react-refresh) which you will get out of the box with the new CLI. + + **Note** If you're experiencing difficulties with running tests after the migration, please reach out to us on Discord to see if we can help, or raise an issue. But in the meantime you can switch back to the existing behaviour by using the following config in your root `package.json`. + + ```json + "jest": { + "transform": { + "\\.(js|jsx|ts|tsx|mjs|cjs)$": "@backstage/cli/config/jestSucraseTransform.js", + "\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$": "@backstage/cli/config/jestFileTransform.js", + "\\.(yaml)$": "jest-transform-yaml" + } + } + ``` + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +- Updated dependencies + - @backstage/config-loader@1.1.4-next.0 + - @backstage/release-manifests@0.0.6-next.0 + +## @backstage/config-loader@1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/core-app-api@1.0.6-next.0 + +### Patch Changes + +- 744fea158b: Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + +## @backstage/core-components@0.11.1-next.0 + +### Patch Changes + +- b29c44d895: Adds code to generate ids for headers parsed through the MarkdownContent component. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + +## @backstage/core-plugin-api@1.0.6-next.0 + +### Patch Changes + +- 744fea158b: Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup + +## @backstage/create-app@0.4.31-next.0 + +### Patch Changes + +- e83de28e36: Fix typo in the documentation + +- 208d6780c9: The `packages/backend/Dockerfile` received a couple of updates, it now looks as follows: + + ```Dockerfile + FROM node:16-bullseye-slim + + # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, + # in which case you should also move better-sqlite3 to "devDependencies" in package.json. + RUN apt-get update && \ + apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + yarn config set python /usr/bin/python3 + + # From here on we use the least-privileged `node` user to run the backend. + USER node + WORKDIR /app + + # This switches many Node.js dependencies to production mode. + ENV NODE_ENV production + + # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. + # The skeleton contains the package.json of each package in the monorepo, + # and along with yarn.lock and the root package.json, that's enough to run yarn install. + COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ + RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz + + RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" + + # Then copy the rest of the backend bundle, along with any other files we might want. + COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ + RUN tar xzf bundle.tar.gz && rm bundle.tar.gz + + CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] + ``` + + The two notable changes are that a `USER node` instruction has been added and the ordering of instructions has been changed accordingly. This means that the app will now be running using the least-privileged `node` user. In order for this to work we now need to make sure that all app files are owned by the `node` user, which we do by adding the `--chown=node:node` option to the `COPY` instructions. + + The second change is the addition of `ENV NODE_ENV production`, which ensured that all Node.js modules run in production mode. If you apply this change to an existing app, note that one of the more significant changes is that this switches the log formatting to use the default production format, JSON. Rather than your log lines looking like this: + + ```log + 2022-08-10T11:36:05.478Z catalog info Performing database migration type=plugin + ``` + + They will now look like this: + + ```log + {"level":"info","message":"Performing database migration","plugin":"catalog","service":"backstage","type":"plugin"} + ``` + + If you wish to keep the existing format, you can override this change by applying the following change to `packages/backend/src/index.ts`: + + ```diff + getRootLogger, + + setRootLogger, + + createRootLogger, + + coloredFormat, + useHotMemoize, + ... + ServerTokenManager, + } from '@backstage/backend-common'; + + ... + + async function main() { + + setRootLogger(createRootLogger({ format: coloredFormat })); + + + const config = await loadBackendConfig({ + ``` + +- c0a08fd08c: Added `EntityLinksCard` to the system `EntityPage`. + + For an existing installation where you want to display the links card for entity pages of kind `system` you should make the following adjustment to `packages/app/src/components/catalog/EntityPage.tsx` + + ```diff + const systemPage = ( + ... + + + + + + + + + + - + + + + + ... + ); + ``` + +## @backstage/dev-utils@1.0.6-next.0 + +### Patch Changes + +- 4c5e85ddf3: Removed the dependency and setup of `react-hot-loader`, since the `@backstage/cli` now uses `swc` with `React Refresh` instead. +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + +## @backstage/integration@1.3.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/integration-react@1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/release-manifests@0.0.6-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @techdocs/cli@1.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-techdocs-node@1.3.1-next.0 + +## @backstage/test-utils@1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + +## @backstage/plugin-adr@0.2.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-adr-common@0.2.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-adr-backend@0.2.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-adr-common@0.2.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-adr-common@0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-airbrake@0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/dev-utils@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-airbrake-backend@0.2.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-allure@0.1.25-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-analytics-module-ga@0.1.20-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-apache-airflow@0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-api-docs@0.8.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + +## @backstage/plugin-apollo-explorer@0.1.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-app-backend@0.3.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/config-loader@1.1.4-next.0 + +## @backstage/plugin-auth-backend@0.15.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + +## @backstage/plugin-auth-node@0.2.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-azure-devops-backend@0.3.15-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +- cb1cfc018b: `createRouter` now requires an additional reader: `UrlReader` argument + + ```diff + export default async function createPlugin( + env: PluginEnvironment, + ): Promise { + return createRouter({ + logger: env.logger, + config: env.config, + + reader: env.reader, + }); + } + ``` + + Remember to check if you have already provided these settings previously. + + #### [Azure DevOps] + + ```yaml + # app-config.yaml + azureDevOps: + host: dev.azure.com + token: my-token + organization: my-company + ``` + + #### [Azure Integrations] + + ```yaml + # app-config.yaml + integrations: + azure: + - host: dev.azure.com + token: ${AZURE_TOKEN} + ``` + +- ef9ab322de: Minor API signatures cleanup + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + +## @backstage/plugin-badges@0.2.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-badges-backend@0.1.30-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + +## @backstage/plugin-bazaar@0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + +## @backstage/plugin-bazaar-backend@0.1.20-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + +## @backstage/plugin-bitbucket-cloud-common@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-bitrise@0.1.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-catalog@1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-catalog-backend@1.3.2-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-catalog-backend-module-aws@0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-azure@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket@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 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-tasks@0.3.5-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 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-github@0.1.7-next.0 + +### Patch Changes + +- 3c4a388537: New experimental alpha exports for use with the upcoming backend system. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + +## @backstage/plugin-catalog-backend-module-gitlab@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.3-next.0 + +### Patch Changes + +- c54fcea9af: Now the `searchStream` method in LDAP client awaits the callbacks +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-msgraph@0.4.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 4c82b955fc: Fix typo +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.2-next.0 + +### Patch Changes + +- 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-catalog-node@1.0.2-next.0 + +## @backstage/plugin-catalog-common@1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-catalog-graph@0.2.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-catalog-graphql@0.3.13-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/plugin-catalog-import@0.8.12-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-catalog-node@1.0.2-next.0 + +### Patch Changes + +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + +## @backstage/plugin-catalog-react@1.1.4-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + +## @backstage/plugin-cicd-statistics@0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-cicd-statistics-module-gitlab@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-cicd-statistics@0.1.11-next.0 + +## @backstage/plugin-circleci@0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-cloudbuild@0.3.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-code-climate@0.1.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-code-coverage@0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-code-coverage-backend@0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-codescene@0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-config-schema@0.1.32-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-cost-insights@0.11.31-next.0 + +### Patch Changes + +- 9318bf15d4: The `CostInsightsHeader`component now uses group names if available +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-explore@0.3.40-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-explore-react@0.0.21-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-explore-react@0.0.21-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + +## @backstage/plugin-firehydrant@0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-fossa@0.2.41-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-gcalendar@0.3.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-gcp-projects@0.3.28-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-git-release-manager@0.3.22-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-github-actions@0.5.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-github-deployments@0.1.40-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-github-issues@0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-github-pull-requests-board@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-gitops-profiles@0.3.27-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-gocd@0.1.15-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-graphiql@0.2.41-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-graphql-backend@0.1.26-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-graphql@0.3.13-next.0 + +## @backstage/plugin-home@0.4.25-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-stack-overflow@0.1.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-ilert@0.1.35-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-jenkins@0.7.8-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-jenkins-common@0.1.8-next.0 + +## @backstage/plugin-jenkins-backend@0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-jenkins-common@0.1.8-next.0 + +## @backstage/plugin-jenkins-common@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + +## @backstage/plugin-kafka@0.3.9-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-kafka-backend@0.2.29-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-kubernetes@0.7.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-kubernetes-backend@0.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + +## @backstage/plugin-lighthouse@0.3.9-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-newrelic@0.3.27-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-newrelic-dashboard@0.2.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-org@0.5.9-next.0 + +### Patch Changes + +- ab6650ede9: Added an edit button to the `UserProfileCard` that is enabled when the `backstage.io/edit-url` is present, this matches how the `GroupProfileCard` works +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-pagerduty@0.5.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-periskop@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-periskop-backend@0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-permission-backend@0.5.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + +## @backstage/plugin-permission-common@0.6.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + +## @backstage/plugin-permission-node@0.6.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/plugin-permission-react@0.4.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/plugin-proxy-backend@0.2.30-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-rollbar@0.4.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-rollbar-backend@0.1.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.2.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + +## @backstage/plugin-search@1.0.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-backend@1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-backend-module-elasticsearch@1.0.2-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-backend-node@1.0.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-search-common@1.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + +## @backstage/plugin-search-react@1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-sentry@0.4.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-shortcuts@0.3.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-sonarqube@0.4.1-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-sonarqube-backend@0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + +## @backstage/plugin-splunk-on-call@0.3.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-stack-overflow@0.1.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-home@0.4.25-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-stack-overflow-backend@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-tech-insights@0.2.5-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-tech-insights-backend@0.5.2-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- 2e0689e536: Support for timeout in FactRetrieverRegistrationOptions +- 9e8e9f5243: Modify Tech insight initialization to expose FactRetrieverEngine. Enables users to trigger fact retrieval manually or reschedule retrievers on runtime. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/catalog-client@1.0.5-next.0 + +## @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + +## @backstage/plugin-tech-insights-node@0.3.4-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- 2e0689e536: Support for timeout in FactRetrieverRegistrationOptions +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + +## @backstage/plugin-tech-radar@0.5.16-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-techdocs@1.3.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 829f14a9b0: Always update the title and sub-title when the location changes on a `TechDocs` reader page. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + +## @backstage/plugin-techdocs-backend@1.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-techdocs-node@1.3.1-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-techdocs-module-addons-contrib@1.0.4-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + +## @backstage/plugin-techdocs-node@1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## @backstage/plugin-techdocs-react@1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-todo@0.2.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-todo-backend@0.1.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + +## @backstage/plugin-user-settings@0.4.8-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @backstage/plugin-vault@0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + +## @backstage/plugin-vault-backend@0.2.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + +## @backstage/plugin-xcmetrics@0.2.29-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## example-app@0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kafka@0.3.9-next.0 + - @backstage/plugin-lighthouse@0.3.9-next.0 + - @backstage/plugin-scaffolder@1.6.0-next.0 + - @backstage/plugin-azure-devops@0.2.0-next.0 + - @backstage/plugin-cloudbuild@0.3.9-next.0 + - @backstage/plugin-explore@0.3.40-next.0 + - @backstage/plugin-github-actions@0.5.9-next.0 + - @backstage/plugin-jenkins@0.7.8-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.2-next.0 + - @backstage/plugin-pagerduty@0.5.2-next.0 + - @backstage/plugin-sentry@0.4.2-next.0 + - @backstage/plugin-tech-insights@0.2.5-next.0 + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.4-next.0 + - @backstage/plugin-user-settings@0.4.8-next.0 + - @backstage/plugin-dynatrace@0.2.0-next.0 + - @backstage/plugin-cost-insights@0.11.31-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-org@0.5.9-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-airbrake@0.3.9-next.0 + - @backstage/plugin-apache-airflow@0.2.2-next.0 + - @backstage/plugin-api-docs@0.8.9-next.0 + - @backstage/plugin-badges@0.2.33-next.0 + - @backstage/plugin-catalog-import@0.8.12-next.0 + - @backstage/plugin-circleci@0.3.9-next.0 + - @backstage/plugin-code-coverage@0.2.2-next.0 + - @backstage/plugin-gcalendar@0.3.5-next.0 + - @backstage/plugin-gcp-projects@0.3.28-next.0 + - @backstage/plugin-gocd@0.1.15-next.0 + - @backstage/plugin-graphiql@0.2.41-next.0 + - @backstage/plugin-home@0.4.25-next.0 + - @backstage/plugin-kubernetes@0.7.2-next.0 + - @backstage/plugin-newrelic@0.3.27-next.0 + - @backstage/plugin-rollbar@0.4.9-next.0 + - @backstage/plugin-search@1.0.2-next.0 + - @backstage/plugin-shortcuts@0.3.1-next.0 + - @backstage/plugin-stack-overflow@0.1.5-next.0 + - @backstage/plugin-tech-radar@0.5.16-next.0 + - @backstage/plugin-todo@0.2.11-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + - @backstage/plugin-catalog-graph@0.2.21-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + - @internal/plugin-catalog-customized@0.0.2-next.0 + +## example-backend@0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/plugin-kafka-backend@0.2.29-next.0 + - @backstage/plugin-proxy-backend@0.2.30-next.0 + - @backstage/plugin-azure-devops-backend@0.3.15-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/plugin-search-backend-module-pg@0.4.0-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-app-backend@0.3.36-next.0 + - @backstage/plugin-auth-backend@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-code-coverage-backend@0.2.2-next.0 + - @backstage/plugin-graphql-backend@0.1.26-next.0 + - @backstage/plugin-jenkins-backend@0.1.26-next.0 + - @backstage/plugin-permission-backend@0.5.11-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-rollbar-backend@0.1.33-next.0 + - @backstage/plugin-techdocs-backend@1.2.2-next.0 + - @backstage/plugin-todo-backend@0.1.33-next.0 + - @backstage/plugin-tech-insights-backend@0.5.2-next.0 + - @backstage/plugin-badges-backend@0.1.30-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.0.2-next.0 + - @backstage/plugin-kubernetes-backend@0.7.2-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.4-next.0 + - @backstage/plugin-search-backend@1.0.2-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.20-next.0 + - example-app@0.2.75-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + +## example-backend-next@0.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-defaults@0.1.1-next.0 + +## techdocs-cli-embedded-app@0.2.74-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + +## @internal/plugin-catalog-customized@0.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + +## @internal/plugin-todo-list@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + +## @internal/plugin-todo-list-backend@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + +## @internal/plugin-todo-list-common@1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 diff --git a/microsite/data/plugins/dynatrace.yaml b/microsite/data/plugins/dynatrace.yaml index 3ab85ae1eb..f204c4105c 100644 --- a/microsite/data/plugins/dynatrace.yaml +++ b/microsite/data/plugins/dynatrace.yaml @@ -3,7 +3,7 @@ title: Dynatrace author: TELUS authorUrl: https://github.com/telus category: Monitoring -description: View monitoring info from dynatrace for services in your software catalog. +description: View monitoring info from Dynatrace for services in your software catalog. documentation: https://github.com/backstage/backstage/tree/master/plugins/dynatrace iconUrl: img/dynatrace.svg npmPackageName: '@backstage/plugin-dynatrace' diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 27ae9c8295..04f5623c86 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -1,6 +1,7 @@ { "releases": { "Release Notes": [ + "releases/v1.5.0", "releases/v1.4.0", "releases/v1.3.0", "releases/v1.2.0", @@ -17,6 +18,7 @@ "overview/background", "overview/adopting", "overview/versioning-policy", + "overview/threat-model", "overview/support", "overview/glossary", "overview/logos" diff --git a/mkdocs.yml b/mkdocs.yml index bf577e53a1..e3bd86afdb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -15,6 +15,7 @@ nav: - The Spotify Story: 'overview/background.md' - Strategies for adopting: 'overview/adopting.md' - Release & Versioning Policy: 'overview/versioning-policy.md' + - Backstage Threat Model: 'overview/threat-model.md' - Support and community: 'overview/support.md' - Glossary: 'overview/glossary.md' - Logo assets: 'overview/logos.md' diff --git a/package.json b/package.json index cfcfe00b1d..7fc0d22148 100644 --- a/package.json +++ b/package.json @@ -45,11 +45,10 @@ ] }, "resolutions": { - "**/@graphql-codegen/cli/**/ws": "^8.0.0", "@types/react": "^17", "@types/react-dom": "^17" }, - "version": "1.5.0", + "version": "1.6.0-next.0", "dependencies": { "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.17.11", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 77949cbb27..f51965f4bf 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/app-defaults +## 1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + ## 1.0.5 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 04852ec4b5..d115183602 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "1.0.5", + "version": "1.0.6-next.0", "private": false, "publishConfig": { "access": "public", @@ -33,10 +33,10 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-permission-react": "^0.4.4", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,8 +46,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@types/jest": "^26.0.7", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index cdc3283c1f..45eb808f17 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,63 @@ # example-app +## 0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-kafka@0.3.9-next.0 + - @backstage/plugin-lighthouse@0.3.9-next.0 + - @backstage/plugin-scaffolder@1.6.0-next.0 + - @backstage/plugin-azure-devops@0.2.0-next.0 + - @backstage/plugin-cloudbuild@0.3.9-next.0 + - @backstage/plugin-explore@0.3.40-next.0 + - @backstage/plugin-github-actions@0.5.9-next.0 + - @backstage/plugin-jenkins@0.7.8-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.2-next.0 + - @backstage/plugin-pagerduty@0.5.2-next.0 + - @backstage/plugin-sentry@0.4.2-next.0 + - @backstage/plugin-tech-insights@0.2.5-next.0 + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.4-next.0 + - @backstage/plugin-user-settings@0.4.8-next.0 + - @backstage/plugin-dynatrace@0.2.0-next.0 + - @backstage/plugin-cost-insights@0.11.31-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-org@0.5.9-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-airbrake@0.3.9-next.0 + - @backstage/plugin-apache-airflow@0.2.2-next.0 + - @backstage/plugin-api-docs@0.8.9-next.0 + - @backstage/plugin-badges@0.2.33-next.0 + - @backstage/plugin-catalog-import@0.8.12-next.0 + - @backstage/plugin-circleci@0.3.9-next.0 + - @backstage/plugin-code-coverage@0.2.2-next.0 + - @backstage/plugin-gcalendar@0.3.5-next.0 + - @backstage/plugin-gcp-projects@0.3.28-next.0 + - @backstage/plugin-gocd@0.1.15-next.0 + - @backstage/plugin-graphiql@0.2.41-next.0 + - @backstage/plugin-home@0.4.25-next.0 + - @backstage/plugin-kubernetes@0.7.2-next.0 + - @backstage/plugin-newrelic@0.3.27-next.0 + - @backstage/plugin-rollbar@0.4.9-next.0 + - @backstage/plugin-search@1.0.2-next.0 + - @backstage/plugin-shortcuts@0.3.1-next.0 + - @backstage/plugin-stack-overflow@0.1.5-next.0 + - @backstage/plugin-tech-radar@0.5.16-next.0 + - @backstage/plugin-todo@0.2.11-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + - @backstage/plugin-catalog-graph@0.2.21-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + - @internal/plugin-catalog-customized@0.0.2-next.0 + ## 0.2.74 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index d4e0644f3a..c96797dac4 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,65 +1,65 @@ { "name": "example-app", - "version": "0.2.74", + "version": "0.2.75-next.0", "private": true, "backstage": { "role": "frontend" }, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^1.0.5", + "@backstage/app-defaults": "^1.0.6-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@backstage/config": "^1.0.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-airbrake": "^0.3.8", - "@backstage/plugin-api-docs": "^0.8.8", - "@backstage/plugin-azure-devops": "^0.1.24", - "@backstage/plugin-apache-airflow": "^0.2.1", - "@backstage/plugin-badges": "^0.2.32", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-catalog-graph": "^0.2.20", - "@backstage/plugin-catalog-import": "^0.8.11", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-circleci": "^0.3.8", - "@backstage/plugin-cloudbuild": "^0.3.8", - "@backstage/plugin-code-coverage": "^0.2.1", - "@backstage/plugin-cost-insights": "^0.11.30", - "@backstage/plugin-dynatrace": "^0.1.2", - "@backstage/plugin-explore": "^0.3.39", - "@backstage/plugin-gcalendar": "^0.3.4", - "@backstage/plugin-gcp-projects": "^0.3.27", - "@backstage/plugin-github-actions": "^0.5.8", - "@backstage/plugin-gocd": "^0.1.14", - "@backstage/plugin-graphiql": "^0.2.40", - "@backstage/plugin-home": "^0.4.24", - "@backstage/plugin-jenkins": "^0.7.7", - "@backstage/plugin-kafka": "^0.3.8", - "@backstage/plugin-kubernetes": "^0.7.1", - "@backstage/plugin-lighthouse": "^0.3.8", - "@backstage/plugin-newrelic": "^0.3.26", - "@backstage/plugin-newrelic-dashboard": "^0.2.1", - "@backstage/plugin-org": "^0.5.8", - "@backstage/plugin-pagerduty": "0.5.1", - "@backstage/plugin-permission-react": "^0.4.4", - "@backstage/plugin-rollbar": "^0.4.8", - "@backstage/plugin-scaffolder": "^1.5.0", - "@backstage/plugin-search": "^1.0.1", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-react": "^1.0.1", - "@backstage/plugin-sentry": "^0.4.1", - "@backstage/plugin-shortcuts": "^0.3.0", - "@backstage/plugin-stack-overflow": "^0.1.4", - "@backstage/plugin-tech-insights": "^0.2.4", - "@backstage/plugin-tech-radar": "^0.5.15", - "@backstage/plugin-techdocs": "^1.3.1", - "@backstage/plugin-techdocs-module-addons-contrib": "^1.0.3", - "@backstage/plugin-techdocs-react": "^1.0.3", - "@backstage/plugin-todo": "^0.2.10", - "@backstage/plugin-user-settings": "^0.4.7", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-airbrake": "^0.3.9-next.0", + "@backstage/plugin-api-docs": "^0.8.9-next.0", + "@backstage/plugin-azure-devops": "^0.2.0-next.0", + "@backstage/plugin-apache-airflow": "^0.2.2-next.0", + "@backstage/plugin-badges": "^0.2.33-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-catalog-graph": "^0.2.21-next.0", + "@backstage/plugin-catalog-import": "^0.8.12-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-circleci": "^0.3.9-next.0", + "@backstage/plugin-cloudbuild": "^0.3.9-next.0", + "@backstage/plugin-code-coverage": "^0.2.2-next.0", + "@backstage/plugin-cost-insights": "^0.11.31-next.0", + "@backstage/plugin-dynatrace": "^0.2.0-next.0", + "@backstage/plugin-explore": "^0.3.40-next.0", + "@backstage/plugin-gcalendar": "^0.3.5-next.0", + "@backstage/plugin-gcp-projects": "^0.3.28-next.0", + "@backstage/plugin-github-actions": "^0.5.9-next.0", + "@backstage/plugin-gocd": "^0.1.15-next.0", + "@backstage/plugin-graphiql": "^0.2.41-next.0", + "@backstage/plugin-home": "^0.4.25-next.0", + "@backstage/plugin-jenkins": "^0.7.8-next.0", + "@backstage/plugin-kafka": "^0.3.9-next.0", + "@backstage/plugin-kubernetes": "^0.7.2-next.0", + "@backstage/plugin-lighthouse": "^0.3.9-next.0", + "@backstage/plugin-newrelic": "^0.3.27-next.0", + "@backstage/plugin-newrelic-dashboard": "^0.2.2-next.0", + "@backstage/plugin-org": "^0.5.9-next.0", + "@backstage/plugin-pagerduty": "0.5.2-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", + "@backstage/plugin-rollbar": "^0.4.9-next.0", + "@backstage/plugin-scaffolder": "^1.6.0-next.0", + "@backstage/plugin-search": "^1.0.2-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", + "@backstage/plugin-sentry": "^0.4.2-next.0", + "@backstage/plugin-shortcuts": "^0.3.1-next.0", + "@backstage/plugin-stack-overflow": "^0.1.5-next.0", + "@backstage/plugin-tech-insights": "^0.2.5-next.0", + "@backstage/plugin-tech-radar": "^0.5.16-next.0", + "@backstage/plugin-techdocs": "^1.3.2-next.0", + "@backstage/plugin-techdocs-module-addons-contrib": "^1.0.4-next.0", + "@backstage/plugin-techdocs-react": "^1.0.4-next.0", + "@backstage/plugin-todo": "^0.2.11-next.0", + "@backstage/plugin-user-settings": "^0.4.8-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -69,19 +69,18 @@ "@roadiehq/backstage-plugin-github-insights": "^2.0.0", "@roadiehq/backstage-plugin-github-pull-requests": "^2.0.0", "@roadiehq/backstage-plugin-travis-ci": "^2.0.0", - "@internal/plugin-catalog-customized": "0.0.1", + "@internal/plugin-catalog-customized": "0.0.2-next.0", "history": "^5.0.0", "prop-types": "^15.7.2", "react": "^17.0.2", "react-dom": "^17.0.2", - "react-hot-loader": "^4.13.0", "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", "react-use": "^17.2.4", "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/test-utils": "^1.1.3", + "@backstage/test-utils": "^1.1.4-next.0", "@rjsf/core": "^3.2.1", "@testing-library/cypress": "^8.0.2", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 3f748813f5..f5152ffe2e 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -85,13 +85,15 @@ import { import { AdvancedSettings } from './components/advancedSettings'; import AlarmIcon from '@material-ui/icons/Alarm'; import React from 'react'; -import { hot } from 'react-hot-loader/root'; import { Navigate, Route } from 'react-router'; import { apis } from './apis'; import { entityPage } from './components/catalog/EntityPage'; import { homePage } from './components/home/HomePage'; import { Root } from './components/Root'; -import { LowerCaseValuePickerFieldExtension } from './components/scaffolder/customScaffolderExtensions'; +import { + DelayingComponentFieldExtension, + LowerCaseValuePickerFieldExtension, +} from './components/scaffolder/customScaffolderExtensions'; import { defaultPreviewTemplate } from './components/scaffolder/defaultPreviewTemplate'; import { searchPage } from './components/search/SearchPage'; import { providers } from './identityProviders'; @@ -228,7 +230,7 @@ const routes = ( } > - + } /> @@ -273,4 +275,4 @@ const App = () => ( ); -export default hot(App); +export default App; diff --git a/packages/app/src/components/scaffolder/customScaffolderExtensions.tsx b/packages/app/src/components/scaffolder/customScaffolderExtensions.tsx index 61407e2918..2a4dedf080 100644 --- a/packages/app/src/components/scaffolder/customScaffolderExtensions.tsx +++ b/packages/app/src/components/scaffolder/customScaffolderExtensions.tsx @@ -62,3 +62,37 @@ export const LowerCaseValuePickerFieldExtension = scaffolderPlugin.provide( }, }), ); + +const MockDelayComponent = ( + props: FieldExtensionComponentProps<{ test?: string }>, +) => { + const { onChange, formData, rawErrors } = props; + return ( + onChange({ test: value })} + margin="normal" + error={rawErrors?.length > 0 && !formData} + /> + ); +}; + +export const DelayingComponentFieldExtension = scaffolderPlugin.provide( + createScaffolderFieldExtension({ + name: 'DelayingComponent', + component: MockDelayComponent, + validation: async ( + value: { test?: string }, + validation: FieldValidation, + ) => { + // delay 2 seconds + await new Promise(resolve => setTimeout(resolve, 2000)); + + if (value.test !== 'pass') { + validation.addError('value was not equal to pass'); + } + }, + }), +); diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index a467ef5b7a..c9f9ff8009 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/backend-app-api +## 0.2.1-next.0 + +### Patch Changes + +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + ## 0.2.0 ### Minor Changes diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index 26c8179771..0f8806870d 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -3,7 +3,6 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { AnyServiceFactory } from '@backstage/backend-plugin-api'; import { BackendFeature } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; @@ -29,14 +28,10 @@ export interface Backend { } // @public (undocumented) -export const cacheFactory: ServiceFactory< - PluginCacheManager, - PluginCacheManager, - {} ->; +export const cacheFactory: ServiceFactory; // @public (undocumented) -export const configFactory: ServiceFactory; +export const configFactory: ServiceFactory; // @public (undocumented) export function createSpecializedBackend( @@ -46,46 +41,28 @@ export function createSpecializedBackend( // @public (undocumented) export interface CreateSpecializedBackendOptions { // (undocumented) - services: AnyServiceFactory[]; + services: ServiceFactory[]; } // @public (undocumented) -export const databaseFactory: ServiceFactory< - PluginDatabaseManager, - PluginDatabaseManager, - {} ->; +export const databaseFactory: ServiceFactory; // @public (undocumented) -export const discoveryFactory: ServiceFactory< - PluginEndpointDiscovery, - PluginEndpointDiscovery, - {} ->; +export const discoveryFactory: ServiceFactory; // @public (undocumented) -export const httpRouterFactory: ServiceFactory< - HttpRouterService, - HttpRouterService, - {} ->; +export const httpRouterFactory: ServiceFactory; // @public (undocumented) -export const loggerFactory: ServiceFactory; +export const loggerFactory: ServiceFactory; // @public (undocumented) export const permissionsFactory: ServiceFactory< - PermissionAuthorizer | PermissionEvaluator, - PermissionAuthorizer | PermissionEvaluator, - {} + PermissionAuthorizer | PermissionEvaluator >; // @public (undocumented) -export const schedulerFactory: ServiceFactory< - PluginTaskScheduler, - PluginTaskScheduler, - {} ->; +export const schedulerFactory: ServiceFactory; // @public (undocumented) export type ServiceOrExtensionPoint = @@ -93,12 +70,8 @@ export type ServiceOrExtensionPoint = | ServiceRef; // @public (undocumented) -export const tokenManagerFactory: ServiceFactory< - TokenManager, - TokenManager, - {} ->; +export const tokenManagerFactory: ServiceFactory; // @public (undocumented) -export const urlReaderFactory: ServiceFactory; +export const urlReaderFactory: ServiceFactory; ``` diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index fc908d107b..0ff017e635 100644 --- a/packages/backend-app-api/package.json +++ b/packages/backend-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-app-api", "description": "Core API used by Backstage backend apps", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -34,16 +34,16 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-plugin-api": "^0.1.1", - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", - "@backstage/plugin-permission-node": "^0.6.4", + "@backstage/backend-plugin-api": "^0.1.2-next.0", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", + "@backstage/plugin-permission-node": "^0.6.5-next.0", "express": "^4.17.1", "express-promise-router": "^4.1.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/packages/backend-app-api/src/wiring/BackendInitializer.ts b/packages/backend-app-api/src/wiring/BackendInitializer.ts index afb5250504..355fa6001d 100644 --- a/packages/backend-app-api/src/wiring/BackendInitializer.ts +++ b/packages/backend-app-api/src/wiring/BackendInitializer.ts @@ -108,7 +108,9 @@ export class BackendInitializer { id: feature.id, provides, consumes: new Set(Object.values(registerOptions.deps)), - deps: registerOptions.deps, + deps: registerOptions.deps as { + [name: string]: ServiceOrExtensionPoint; + }, init: registerOptions.init as BackendRegisterInit['init'], }; }, diff --git a/packages/backend-app-api/src/wiring/BackstageBackend.ts b/packages/backend-app-api/src/wiring/BackstageBackend.ts index 1e09ed77ba..1d76161bfe 100644 --- a/packages/backend-app-api/src/wiring/BackstageBackend.ts +++ b/packages/backend-app-api/src/wiring/BackstageBackend.ts @@ -14,10 +14,7 @@ * limitations under the License. */ -import { - AnyServiceFactory, - BackendFeature, -} from '@backstage/backend-plugin-api'; +import { ServiceFactory, BackendFeature } from '@backstage/backend-plugin-api'; import { BackendInitializer } from './BackendInitializer'; import { ServiceRegistry } from './ServiceRegistry'; import { Backend } from './types'; @@ -26,7 +23,7 @@ export class BackstageBackend implements Backend { #services: ServiceRegistry; #initializer: BackendInitializer; - constructor(apiFactories: AnyServiceFactory[]) { + constructor(apiFactories: ServiceFactory[]) { this.#services = new ServiceRegistry(apiFactories); this.#initializer = new BackendInitializer(this.#services); } diff --git a/packages/backend-app-api/src/wiring/ServiceRegistry.test.ts b/packages/backend-app-api/src/wiring/ServiceRegistry.test.ts new file mode 100644 index 0000000000..acdd2a4c41 --- /dev/null +++ b/packages/backend-app-api/src/wiring/ServiceRegistry.test.ts @@ -0,0 +1,173 @@ +/* + * Copyright 2022 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 { + createServiceRef, + createServiceFactory, +} from '@backstage/backend-plugin-api'; +import { ServiceRegistry } from './ServiceRegistry'; + +const ref1 = createServiceRef<{ x: number; pluginId: string }>({ + id: '1', +}); +const sf1 = createServiceFactory({ + service: ref1, + deps: {}, + factory: async () => { + return async pluginId => { + return { x: 1, pluginId }; + }; + }, +}); + +const ref2 = createServiceRef<{ x: number; pluginId: string }>({ + id: '2', +}); +const sf2 = createServiceFactory({ + service: ref2, + deps: {}, + factory: async () => { + return async pluginId => { + return { x: 2, pluginId }; + }; + }, +}); +const sf2b = createServiceFactory({ + service: ref2, + deps: {}, + factory: async () => { + return async pluginId => { + return { x: 22, pluginId }; + }; + }, +}); + +const refDefault1 = createServiceRef<{ x: number; pluginId: string }>({ + id: '1', + defaultFactory: async service => + createServiceFactory({ + service, + deps: {}, + factory: async () => async pluginId => ({ x: 10, pluginId }), + }), +}); + +const refDefault2a = createServiceRef<{ x: number; pluginId: string }>({ + id: '2a', + defaultFactory: async service => + createServiceFactory({ + service, + deps: {}, + factory: async () => async pluginId => ({ x: 20, pluginId }), + }), +}); + +const refDefault2b = createServiceRef<{ x: number; pluginId: string }>({ + id: '2b', + defaultFactory: async service => + createServiceFactory({ + service, + deps: {}, + factory: async () => async pluginId => ({ x: 220, pluginId }), + }), +}); + +describe('ServiceRegistry', () => { + it('should return undefined if there is no factory defined', async () => { + const registry = new ServiceRegistry([]); + expect(registry.get(ref1)).toBe(undefined); + }); + + it('should return a factory for a registered ref', async () => { + const registry = new ServiceRegistry([sf1]); + const factory = registry.get(ref1)!; + expect(factory).toEqual(expect.any(Function)); + await expect(factory('catalog')).resolves.toEqual({ + x: 1, + pluginId: 'catalog', + }); + await expect(factory('scaffolder')).resolves.toEqual({ + x: 1, + pluginId: 'scaffolder', + }); + expect(await factory('catalog')).toBe(await factory('catalog')); + }); + + it('should handle multiple factories with different serviceRefs', async () => { + const registry = new ServiceRegistry([sf1, sf2]); + const factory1 = registry.get(ref1)!; + const factory2 = registry.get(ref2)!; + expect(factory1).toEqual(expect.any(Function)); + expect(factory2).toEqual(expect.any(Function)); + await expect(factory1('catalog')).resolves.toEqual({ + x: 1, + pluginId: 'catalog', + }); + await expect(factory2('catalog')).resolves.toEqual({ + x: 2, + pluginId: 'catalog', + }); + expect(await factory1('catalog')).not.toBe(await factory2('catalog')); + }); + + it('should use the last factory for each ref', async () => { + const registry = new ServiceRegistry([sf2, sf2b]); + const factory2 = registry.get(ref2)!; + await expect(factory2('catalog')).resolves.toEqual({ + x: 22, + pluginId: 'catalog', + }); + }); + + it('should return the defaultFactory from the ref if not provided to the registry', async () => { + const registry = new ServiceRegistry([]); + const factory = registry.get(refDefault1)!; + expect(factory).toEqual(expect.any(Function)); + await expect(factory('catalog')).resolves.toEqual({ + x: 10, + pluginId: 'catalog', + }); + }); + + it('should not return the defaultFactory from the ref if provided to the registry', async () => { + const registry = new ServiceRegistry([sf1]); + const factory = registry.get(refDefault1)!; + expect(factory).toEqual(expect.any(Function)); + await expect(factory('catalog')).resolves.toEqual({ + x: 1, + pluginId: 'catalog', + }); + }); + + it('should handle duplicate defaultFactories by duplicating the implementations', async () => { + const registry = new ServiceRegistry([]); + const factoryA = registry.get(refDefault2a)!; + const factoryB = registry.get(refDefault2b)!; + expect(factoryA).toEqual(expect.any(Function)); + expect(factoryB).toEqual(expect.any(Function)); + await expect(factoryA('catalog')).resolves.toEqual({ + x: 20, + pluginId: 'catalog', + }); + await expect(factoryB('catalog')).resolves.toEqual({ + x: 220, + pluginId: 'catalog', + }); + expect(await factoryA('catalog')).toBe(await factoryA('catalog')); + expect(await factoryB('catalog')).toBe(await factoryB('catalog')); + expect(await factoryA('catalog')).not.toBe(await factoryB('catalog')); + }); +}); diff --git a/packages/backend-app-api/src/wiring/ServiceRegistry.ts b/packages/backend-app-api/src/wiring/ServiceRegistry.ts index bdaecf30c6..b471cd67ca 100644 --- a/packages/backend-app-api/src/wiring/ServiceRegistry.ts +++ b/packages/backend-app-api/src/wiring/ServiceRegistry.ts @@ -14,35 +14,47 @@ * limitations under the License. */ import { - AnyServiceFactory, + ServiceFactory, FactoryFunc, ServiceRef, } from '@backstage/backend-plugin-api'; export class ServiceRegistry { - readonly #implementations: Map>; - readonly #factories: Map; + readonly #providedFactories: Map; + readonly #loadedDefaultFactories: Map; + readonly #implementations: Map>; - constructor(factories: AnyServiceFactory[]) { - this.#factories = new Map(factories.map(f => [f.service.id, f])); + constructor(factories: ServiceFactory[]) { + this.#providedFactories = new Map(factories.map(f => [f.service.id, f])); + this.#loadedDefaultFactories = new Map(); this.#implementations = new Map(); } get(ref: ServiceRef): FactoryFunc | undefined { - const factory = this.#factories.get(ref.id); - if (!factory) { + let factory = this.#providedFactories.get(ref.id); + const { defaultFactory } = ref; + if (!factory && !defaultFactory) { return undefined; } return async (pluginId: string): Promise => { - let implementations = this.#implementations.get(ref.id); + if (!factory) { + let loadedFactory = this.#loadedDefaultFactories.get(defaultFactory!); + if (!loadedFactory) { + loadedFactory = (await defaultFactory!(ref)) as ServiceFactory; + this.#loadedDefaultFactories.set(defaultFactory!, loadedFactory); + } + factory = loadedFactory; + } + + let implementations = this.#implementations.get(factory); if (implementations) { if (implementations.has(pluginId)) { return implementations.get(pluginId) as T; } } else { implementations = new Map(); - this.#implementations.set(ref.id, implementations); + this.#implementations.set(factory, implementations); } const factoryDeps = Object.fromEntries( diff --git a/packages/backend-app-api/src/wiring/types.ts b/packages/backend-app-api/src/wiring/types.ts index 0ca40b5660..55009edbdf 100644 --- a/packages/backend-app-api/src/wiring/types.ts +++ b/packages/backend-app-api/src/wiring/types.ts @@ -15,7 +15,7 @@ */ import { - AnyServiceFactory, + ServiceFactory, BackendFeature, ExtensionPoint, FactoryFunc, @@ -43,7 +43,7 @@ export interface BackendRegisterInit { * @public */ export interface CreateSpecializedBackendOptions { - services: AnyServiceFactory[]; + services: ServiceFactory[]; } export type ServiceHolder = { diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 6068b179e4..90574a9c22 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/backend-common +## 0.15.1-next.0 + +### Patch Changes + +- 399286d7dd: Workaround support for `swc` instead of `sucrase` +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/config-loader@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.15.0 ### Minor Changes diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 8362c3ab2f..af62238925 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -8,6 +8,7 @@ import { AbortController as AbortController_2 } from 'node-abort-controller'; import { AbortSignal as AbortSignal_2 } from 'node-abort-controller'; +import aws from 'aws-sdk'; import { AwsS3Integration } from '@backstage/integration'; import { AzureIntegration } from '@backstage/integration'; import { BitbucketCloudIntegration } from '@backstage/integration'; @@ -34,7 +35,6 @@ import { Readable } from 'stream'; import { ReadCommitResult } from 'isomorphic-git'; import { RequestHandler } from 'express'; import { Router } from 'express'; -import { S3 } from 'aws-sdk'; import { Server } from 'http'; import * as winston from 'winston'; import { Writable } from 'stream'; @@ -44,7 +44,7 @@ export class AwsS3UrlReader implements UrlReader { constructor( integration: AwsS3Integration, deps: { - s3: S3; + s3: aws.S3; treeResponseFactory: ReadTreeResponseFactory; }, ); diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index ed84bec016..43b1f81b12 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.15.0", + "version": "0.15.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -36,9 +36,9 @@ "dependencies": { "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/config-loader": "^1.1.3", + "@backstage/config-loader": "^1.1.4-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", "@backstage/types": "^1.0.0", "@google-cloud/storage": "^6.0.0", "@keyv/redis": "^2.2.3", @@ -91,8 +91,8 @@ } }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/archiver": "^5.1.0", "@types/base64-stream": "^1.0.2", "@types/compression": "^1.7.0", @@ -112,7 +112,7 @@ "better-sqlite3": "^7.5.0", "http-errors": "^2.0.0", "mock-fs": "^5.1.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "mysql2": "^2.2.5", "recursive-readdir": "^2.2.2", "supertest": "^6.1.3" diff --git a/packages/backend-common/src/reading/AwsS3UrlReader.ts b/packages/backend-common/src/reading/AwsS3UrlReader.ts index 7c314cf036..b9fc58ef5c 100644 --- a/packages/backend-common/src/reading/AwsS3UrlReader.ts +++ b/packages/backend-common/src/reading/AwsS3UrlReader.ts @@ -14,7 +14,9 @@ * limitations under the License. */ -import aws, { Credentials, S3 } from 'aws-sdk'; +// note: We do the import like this so that we don't get issues destructuring +// and it not being mocked by the aws-sdk-mock package which is unfortunate. +import aws from 'aws-sdk'; import { CredentialsOptions } from 'aws-sdk/lib/credentials'; import { ReaderFactory, @@ -126,7 +128,7 @@ export class AwsS3UrlReader implements UrlReader { return integrations.awsS3.list().map(integration => { const credentials = AwsS3UrlReader.buildCredentials(integration); - const s3 = new S3({ + const s3 = new aws.S3({ apiVersion: '2006-03-01', credentials, endpoint: integration.config.endpoint, @@ -145,7 +147,7 @@ export class AwsS3UrlReader implements UrlReader { constructor( private readonly integration: AwsS3Integration, private readonly deps: { - s3: S3; + s3: aws.S3; treeResponseFactory: ReadTreeResponseFactory; }, ) {} @@ -156,17 +158,17 @@ export class AwsS3UrlReader implements UrlReader { */ private static buildCredentials( integration?: AwsS3Integration, - ): Credentials | CredentialsOptions | undefined { + ): aws.Credentials | CredentialsOptions | undefined { if (!integration) { return undefined; } const accessKeyId = integration.config.accessKeyId; const secretAccessKey = integration.config.secretAccessKey; - let explicitCredentials: Credentials | undefined; + let explicitCredentials: aws.Credentials | undefined; if (accessKeyId && secretAccessKey) { - explicitCredentials = new Credentials({ + explicitCredentials = new aws.Credentials({ accessKeyId, secretAccessKey, }); diff --git a/packages/backend-defaults/CHANGELOG.md b/packages/backend-defaults/CHANGELOG.md index 2d80e84fc2..e91d4880c6 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-defaults +## 0.1.1-next.0 + +### Patch Changes + +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/backend-app-api@0.2.1-next.0 + ## 0.1.0 ### Minor Changes diff --git a/packages/backend-defaults/api-report.md b/packages/backend-defaults/api-report.md index 4c0fb80714..b5f1e154bb 100644 --- a/packages/backend-defaults/api-report.md +++ b/packages/backend-defaults/api-report.md @@ -3,8 +3,8 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { AnyServiceFactory } from '@backstage/backend-plugin-api'; import { Backend } from '@backstage/backend-app-api'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; // @public (undocumented) export function createBackend(options?: CreateBackendOptions): Backend; @@ -12,6 +12,6 @@ export function createBackend(options?: CreateBackendOptions): Backend; // @public (undocumented) export interface CreateBackendOptions { // (undocumented) - services?: AnyServiceFactory[]; + services?: ServiceFactory[]; } ``` diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index 1270029909..93b93b08fc 100644 --- a/packages/backend-defaults/package.json +++ b/packages/backend-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-defaults", "description": "Backend defaults used by Backstage backend apps", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -33,11 +33,11 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-app-api": "^0.2.0", - "@backstage/backend-plugin-api": "^0.1.1" + "@backstage/backend-app-api": "^0.2.1-next.0", + "@backstage/backend-plugin-api": "^0.1.2-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/packages/backend-defaults/src/CreateBackend.ts b/packages/backend-defaults/src/CreateBackend.ts index 7cc116a052..819a77ea11 100644 --- a/packages/backend-defaults/src/CreateBackend.ts +++ b/packages/backend-defaults/src/CreateBackend.ts @@ -28,7 +28,7 @@ import { tokenManagerFactory, urlReaderFactory, } from '@backstage/backend-app-api'; -import { AnyServiceFactory } from '@backstage/backend-plugin-api'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; export const defaultServiceFactories = [ cacheFactory, @@ -47,15 +47,15 @@ export const defaultServiceFactories = [ * @public */ export interface CreateBackendOptions { - services?: AnyServiceFactory[]; + services?: ServiceFactory[]; } /** * @public */ export function createBackend(options?: CreateBackendOptions): Backend { - const services = new Map( - defaultServiceFactories.map(sf => [sf.service.id, sf]), + const services = new Map( + defaultServiceFactories.map(sf => [sf.service.id, sf as ServiceFactory]), ); if (options?.services) { diff --git a/packages/backend-next/CHANGELOG.md b/packages/backend-next/CHANGELOG.md index b8706c0e51..5c25b904e2 100644 --- a/packages/backend-next/CHANGELOG.md +++ b/packages/backend-next/CHANGELOG.md @@ -1,5 +1,14 @@ # example-backend-next +## 0.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-defaults@0.1.1-next.0 + ## 0.0.2 ### Patch Changes diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index 056b6c5722..8c24ee30e0 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-next", - "version": "0.0.2", + "version": "0.0.3-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,12 +25,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-defaults": "^0.1.0", - "@backstage/plugin-catalog-backend": "^1.3.1", - "@backstage/plugin-scaffolder-backend": "^1.5.0" + "@backstage/backend-defaults": "^0.1.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-scaffolder-backend": "^1.6.0-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/packages/backend-plugin-api/CHANGELOG.md b/packages/backend-plugin-api/CHANGELOG.md index 71987fd616..b4fd5482e3 100644 --- a/packages/backend-plugin-api/CHANGELOG.md +++ b/packages/backend-plugin-api/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/backend-plugin-api +## 0.1.2-next.0 + +### Patch Changes + +- eef91a2558: Simplified the `ServiceFactory` type and removed `AnyServiceFactory`. +- 68513f169a: When defining a new `ServiceRef` you can now also include a `defaultFactory`, which will be used to construct instances of the service in case there is no explicit factory defined. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + ## 0.1.1 ### Patch Changes diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index fa5097be64..01423390e6 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -16,15 +16,6 @@ import { TokenManager } from '@backstage/backend-common'; import { TransportStreamOptions } from 'winston-transport'; import { UrlReader } from '@backstage/backend-common'; -// @public (undocumented) -export type AnyServiceFactory = ServiceFactory< - unknown, - unknown, - { - [key in string]: unknown; - } ->; - // @public (undocumented) export interface BackendFeature { // (undocumented) @@ -101,15 +92,22 @@ export function createExtensionPoint(options: { // @public (undocumented) export function createServiceFactory< - Api, - Impl extends Api, - Deps extends { + TService, + TImpl extends TService, + TDeps extends { [name in string]: unknown; }, ->(factory: ServiceFactory): ServiceFactory; +>(factory: { + service: ServiceRef; + deps: TypesToServiceRef; + factory(deps: DepsToDepFactories): Promise>; +}): ServiceFactory; // @public (undocumented) -export function createServiceRef(options: { id: string }): ServiceRef; +export function createServiceRef(options: { + id: string; + defaultFactory?: (service: ServiceRef) => Promise>; +}): ServiceRef; // @public (undocumented) export const databaseServiceRef: ServiceRef; @@ -168,22 +166,21 @@ export const permissionsServiceRef: ServiceRef< export const schedulerServiceRef: ServiceRef; // @public (undocumented) -export type ServiceFactory< - TApi, - TImpl extends TApi, - TDeps extends { - [name in string]: unknown; - }, -> = { - service: ServiceRef; - deps: TypesToServiceRef; - factory(deps: DepsToDepFactories): Promise>; +export type ServiceFactory = { + service: ServiceRef; + deps: { + [key in string]: ServiceRef; + }; + factory(deps: { + [key in string]: unknown; + }): Promise>; }; // @public export type ServiceRef = { id: string; T: T; + defaultFactory?: (service: ServiceRef) => Promise>; toString(): string; $$ref: 'service'; }; diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json index 9a4e9ce8a8..35293a820d 100644 --- a/packages/backend-plugin-api/package.json +++ b/packages/backend-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-plugin-api", "description": "Core API used by Backstage backend plugins", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -35,16 +35,16 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/backend-common": "^0.15.0", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "winston": "^3.2.1", "winston-transport": "^4.5.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/packages/backend-plugin-api/src/services/system/index.ts b/packages/backend-plugin-api/src/services/system/index.ts index eead2297a5..817b0a590f 100644 --- a/packages/backend-plugin-api/src/services/system/index.ts +++ b/packages/backend-plugin-api/src/services/system/index.ts @@ -20,6 +20,5 @@ export type { DepsToDepFactories, FactoryFunc, ServiceFactory, - AnyServiceFactory, } from './types'; export { createServiceRef, createServiceFactory } from './types'; diff --git a/packages/backend-plugin-api/src/services/system/types.ts b/packages/backend-plugin-api/src/services/system/types.ts index d578434170..3d6ebfc0dd 100644 --- a/packages/backend-plugin-api/src/services/system/types.ts +++ b/packages/backend-plugin-api/src/services/system/types.ts @@ -28,6 +28,12 @@ export type ServiceRef = { */ T: T; + /** + * The default factory that will be used to create service + * instances if no other factory is provided. + */ + defaultFactory?: (service: ServiceRef) => Promise>; + toString(): string; $$ref: 'service'; @@ -45,32 +51,26 @@ export type DepsToDepFactories = { export type FactoryFunc = (pluginId: string) => Promise; /** @public */ -export type ServiceFactory< - TApi, - TImpl extends TApi, - TDeps extends { [name in string]: unknown }, -> = { - service: ServiceRef; - deps: TypesToServiceRef; - factory(deps: DepsToDepFactories): Promise>; +export type ServiceFactory = { + service: ServiceRef; + deps: { [key in string]: ServiceRef }; + factory(deps: { [key in string]: unknown }): Promise>; }; -/** @public */ -export type AnyServiceFactory = ServiceFactory< - unknown, - unknown, - { [key in string]: unknown } ->; - /** * @public */ -export function createServiceRef(options: { id: string }): ServiceRef { +export function createServiceRef(options: { + id: string; + defaultFactory?: (service: ServiceRef) => Promise>; +}): ServiceRef { + const { id, defaultFactory } = options; return { - id: options.id, + id, get T(): T { throw new Error(`tried to read ServiceRef.T of ${this}`); }, + defaultFactory, toString() { return `serviceRef{${options.id}}`; }, @@ -82,9 +82,13 @@ export function createServiceRef(options: { id: string }): ServiceRef { * @public */ export function createServiceFactory< - Api, - Impl extends Api, - Deps extends { [name in string]: unknown }, ->(factory: ServiceFactory): ServiceFactory { - return factory; + TService, + TImpl extends TService, + TDeps extends { [name in string]: unknown }, +>(factory: { + service: ServiceRef; + deps: TypesToServiceRef; + factory(deps: DepsToDepFactories): Promise>; +}): ServiceFactory { + return factory as ServiceFactory; } diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index 59e5c8ca8a..28017cf3d5 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-tasks +## 0.3.5-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.3.4 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index 7d8886d77b..f94519525e 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.3.4", + "version": "0.3.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -33,7 +33,7 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "@backstage/types": "^1.0.0", @@ -48,8 +48,8 @@ "zod": "^3.9.5" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/cron": "^2.0.0", "wait-for-expect": "^3.0.2" }, diff --git a/packages/backend-tasks/src/tasks/TaskScheduler.ts b/packages/backend-tasks/src/tasks/TaskScheduler.ts index f1668a6691..f14fb9fc2b 100644 --- a/packages/backend-tasks/src/tasks/TaskScheduler.ts +++ b/packages/backend-tasks/src/tasks/TaskScheduler.ts @@ -58,9 +58,12 @@ export class TaskScheduler { */ forPlugin(pluginId: string): PluginTaskScheduler { const databaseFactory = once(async () => { - const knex = await this.databaseManager.forPlugin(pluginId).getClient(); + const databaseManager = this.databaseManager.forPlugin(pluginId); + const knex = await databaseManager.getClient(); - await migrateBackendTasks(knex); + if (!databaseManager.migrations?.skip) { + await migrateBackendTasks(knex); + } const janitor = new PluginTaskSchedulerJanitor({ knex, diff --git a/packages/backend-tasks/src/tasks/TaskWorker.ts b/packages/backend-tasks/src/tasks/TaskWorker.ts index c99c08e4fb..f56c03c3d5 100644 --- a/packages/backend-tasks/src/tasks/TaskWorker.ts +++ b/packages/backend-tasks/src/tasks/TaskWorker.ts @@ -292,14 +292,21 @@ export class TaskWorker { seconds: dt, })}`, ); - nextRun = this.knex.client.config.client.includes('sqlite3') - ? this.knex.raw( - `max(datetime(next_run_start_at, ?), datetime('now'))`, - [`+${dt} seconds`], - ) - : this.knex.raw( - `greatest(next_run_start_at + interval '${dt} seconds', now())`, - ); + + if (this.knex.client.config.client.includes('sqlite3')) { + nextRun = this.knex.raw( + `max(datetime(next_run_start_at, ?), datetime('now'))`, + [`+${dt} seconds`], + ); + } else if (this.knex.client.config.client.includes('mysql')) { + nextRun = this.knex.raw( + `greatest(next_run_start_at + interval ${dt} second, now())`, + ); + } else { + nextRun = this.knex.raw( + `greatest(next_run_start_at + interval '${dt} seconds', now())`, + ); + } } const rows = await this.knex(DB_TASKS_TABLE) diff --git a/packages/backend-tasks/src/tasks/util.test.ts b/packages/backend-tasks/src/tasks/util.test.ts index 614de8c6c8..ceeeba14d6 100644 --- a/packages/backend-tasks/src/tasks/util.test.ts +++ b/packages/backend-tasks/src/tasks/util.test.ts @@ -14,9 +14,16 @@ * limitations under the License. */ +import knexFactory, { Knex } from 'knex'; import { Duration } from 'luxon'; import { AbortController } from 'node-abort-controller'; -import { delegateAbortController, sleep, validateId } from './util'; +import { delegateAbortController, nowPlus, sleep, validateId } from './util'; + +class KnexBuilder { + public build(client: string): Knex { + return knexFactory({ client }); + } +} describe('util', () => { describe('validateId', () => { @@ -73,4 +80,35 @@ describe('util', () => { expect(child.signal.aborted).toBe(true); }); }); + + describe('nowPlus', () => { + describe('without duration', () => { + const databases = [ + { client: 'sqlite3', expected: 'CURRENT_TIMESTAMP' }, + { client: 'mysql2', expected: 'CURRENT_TIMESTAMP' }, + { client: 'pg', expected: 'CURRENT_TIMESTAMP' }, + ]; + + it.each(databases)('for client $client', ({ client, expected }) => { + const knex = new KnexBuilder().build(client); + const result = nowPlus(undefined, knex); + + expect(result.toString()).toBe(expected); + }); + }); + describe('With duration', () => { + const databases = [ + { client: 'sqlite3', expected: "datetime('now', '20 seconds')" }, + { client: 'mysql2', expected: 'now() + interval 20 second' }, + { client: 'pg', expected: "now() + interval '20 seconds'" }, + ]; + it.each(databases)('for client $client', ({ client, expected }) => { + const duration = Duration.fromObject({ seconds: 20 }); + const knex = new KnexBuilder().build(client); + const result = nowPlus(duration, knex); + + expect(result.toString()).toBe(expected); + }); + }); + }); }); diff --git a/packages/backend-tasks/src/tasks/util.ts b/packages/backend-tasks/src/tasks/util.ts index 34280cc2d4..2561203318 100644 --- a/packages/backend-tasks/src/tasks/util.ts +++ b/packages/backend-tasks/src/tasks/util.ts @@ -38,9 +38,16 @@ export function nowPlus(duration: Duration | undefined, knex: Knex) { if (!seconds) { return knex.fn.now(); } - return knex.client.config.client.includes('sqlite3') - ? knex.raw(`datetime('now', ?)`, [`${seconds} seconds`]) - : knex.raw(`now() + interval '${seconds} seconds'`); + + if (knex.client.config.client.includes('sqlite3')) { + return knex.raw(`datetime('now', ?)`, [`${seconds} seconds`]); + } + + if (knex.client.config.client.includes('mysql')) { + return knex.raw(`now() + interval ${seconds} second`); + } + + return knex.raw(`now() + interval '${seconds} seconds'`); } /** diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 2e1b1bea6a..6810133518 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/backend-test-utils +## 0.1.28-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- de3347ca74: Updated usages of `ServiceFactory`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/backend-app-api@0.2.1-next.0 + ## 0.1.27 ### Patch Changes diff --git a/packages/backend-test-utils/api-report.md b/packages/backend-test-utils/api-report.md index b8881e659d..c0f6a43321 100644 --- a/packages/backend-test-utils/api-report.md +++ b/packages/backend-test-utils/api-report.md @@ -3,10 +3,10 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -import { AnyServiceFactory } from '@backstage/backend-plugin-api'; import { BackendFeature } from '@backstage/backend-plugin-api'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; import { Knex } from 'knex'; +import { ServiceFactory } from '@backstage/backend-plugin-api'; import { ServiceRef } from '@backstage/backend-plugin-api'; // @public (undocumented) @@ -45,7 +45,7 @@ export interface TestBackendOptions< services?: readonly [ ...{ [index in keyof TServices]: - | AnyServiceFactory + | ServiceFactory | [ServiceRef, Partial]; }, ]; diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 31576ce77b..38b93ccf19 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.27", + "version": "0.1.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -35,21 +35,21 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-app-api": "^0.2.0", - "@backstage/backend-plugin-api": "^0.1.1", - "@backstage/cli": "^0.18.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-app-api": "^0.2.1-next.0", + "@backstage/backend-plugin-api": "^0.1.2-next.0", + "@backstage/cli": "^0.18.2-next.0", "@backstage/config": "^1.0.1", "better-sqlite3": "^7.5.0", "knex": "^2.0.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "mysql2": "^2.2.5", "pg": "^8.3.0", "testcontainers": "^8.1.2", "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/packages/backend-test-utils/src/next/wiring/TestBackend.ts b/packages/backend-test-utils/src/next/wiring/TestBackend.ts index b9276fa9b9..98e979793e 100644 --- a/packages/backend-test-utils/src/next/wiring/TestBackend.ts +++ b/packages/backend-test-utils/src/next/wiring/TestBackend.ts @@ -16,7 +16,7 @@ import { createSpecializedBackend } from '@backstage/backend-app-api'; import { - AnyServiceFactory, + ServiceFactory, ServiceRef, createServiceFactory, BackendFeature, @@ -31,7 +31,7 @@ export interface TestBackendOptions< services?: readonly [ ...{ [index in keyof TServices]: - | AnyServiceFactory + | ServiceFactory | [ServiceRef, Partial]; }, ]; @@ -68,7 +68,7 @@ export async function startTestBackend< factory: async () => async () => serviceDef[1], }); } - return serviceDef as AnyServiceFactory; + return serviceDef as ServiceFactory; }); const backend = createSpecializedBackend({ diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 670ce31973..f72f5b22f0 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,44 @@ # example-backend +## 0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/plugin-kafka-backend@0.2.29-next.0 + - @backstage/plugin-proxy-backend@0.2.30-next.0 + - @backstage/plugin-azure-devops-backend@0.3.15-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/plugin-search-backend-module-pg@0.4.0-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-app-backend@0.3.36-next.0 + - @backstage/plugin-auth-backend@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-code-coverage-backend@0.2.2-next.0 + - @backstage/plugin-graphql-backend@0.1.26-next.0 + - @backstage/plugin-jenkins-backend@0.1.26-next.0 + - @backstage/plugin-permission-backend@0.5.11-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-rollbar-backend@0.1.33-next.0 + - @backstage/plugin-techdocs-backend@1.2.2-next.0 + - @backstage/plugin-todo-backend@0.1.33-next.0 + - @backstage/plugin-tech-insights-backend@0.5.2-next.0 + - @backstage/plugin-badges-backend@0.1.30-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.0.2-next.0 + - @backstage/plugin-kubernetes-backend@0.7.2-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.4-next.0 + - @backstage/plugin-search-backend@1.0.2-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.20-next.0 + - example-app@0.2.75-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.2.74 ### Patch Changes diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile index fb60b8a669..ed18da530b 100644 --- a/packages/backend/Dockerfile +++ b/packages/backend/Dockerfile @@ -11,8 +11,6 @@ FROM node:16-bullseye-slim -WORKDIR /app - # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, # in which case you should also move better-sqlite3 to "devDependencies" in package.json. RUN apt-get update && \ @@ -20,16 +18,23 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && \ yarn config set python /usr/bin/python3 +# From here on we use the least-privileged `node` user to run the backend. +USER node +WORKDIR /app + +# This switches many Node.js dependencies to production mode. +ENV NODE_ENV production + # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. # The skeleton contains the package.json of each package in the monorepo, # and along with yarn.lock and the root package.json, that's enough to run yarn install. -COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ +COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" # Then copy the rest of the backend bundle, along with any other files we might want. -COPY packages/backend/dist/bundle.tar.gz app-config.yaml ./ +COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ RUN tar xzf bundle.tar.gz && rm bundle.tar.gz CMD ["node", "packages/backend", "--config", "app-config.yaml"] diff --git a/packages/backend/package.json b/packages/backend/package.json index 5226cf3270..37b9a1bf37 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.74", + "version": "0.2.75-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,40 +26,40 @@ "build-image": "docker build ../.. -f Dockerfile --tag example-backend" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-app-backend": "^0.3.35", - "@backstage/plugin-auth-backend": "^0.15.1", - "@backstage/plugin-auth-node": "^0.2.4", - "@backstage/plugin-azure-devops-backend": "^0.3.14", - "@backstage/plugin-badges-backend": "^0.1.29", - "@backstage/plugin-catalog-backend": "^1.3.1", - "@backstage/plugin-code-coverage-backend": "^0.2.1", - "@backstage/plugin-graphql-backend": "^0.1.25", - "@backstage/plugin-jenkins-backend": "^0.1.25", - "@backstage/plugin-kubernetes-backend": "^0.7.1", - "@backstage/plugin-kafka-backend": "^0.2.28", - "@backstage/plugin-permission-backend": "^0.5.10", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-node": "^0.6.4", - "@backstage/plugin-proxy-backend": "^0.2.29", - "@backstage/plugin-rollbar-backend": "^0.1.32", - "@backstage/plugin-scaffolder-backend": "^1.5.0", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.4.3", - "@backstage/plugin-search-backend": "^1.0.1", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-backend-node": "^1.0.1", - "@backstage/plugin-search-backend-module-elasticsearch": "^1.0.1", - "@backstage/plugin-search-backend-module-pg": "^0.3.6", - "@backstage/plugin-techdocs-backend": "^1.2.1", - "@backstage/plugin-tech-insights-backend": "^0.5.1", - "@backstage/plugin-tech-insights-node": "^0.3.3", - "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.19", - "@backstage/plugin-todo-backend": "^0.1.32", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-app-backend": "^0.3.36-next.0", + "@backstage/plugin-auth-backend": "^0.15.2-next.0", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/plugin-azure-devops-backend": "^0.3.15-next.0", + "@backstage/plugin-badges-backend": "^0.1.30-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-code-coverage-backend": "^0.2.2-next.0", + "@backstage/plugin-graphql-backend": "^0.1.26-next.0", + "@backstage/plugin-jenkins-backend": "^0.1.26-next.0", + "@backstage/plugin-kubernetes-backend": "^0.7.2-next.0", + "@backstage/plugin-kafka-backend": "^0.2.29-next.0", + "@backstage/plugin-permission-backend": "^0.5.11-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-node": "^0.6.5-next.0", + "@backstage/plugin-proxy-backend": "^0.2.30-next.0", + "@backstage/plugin-rollbar-backend": "^0.1.33-next.0", + "@backstage/plugin-scaffolder-backend": "^1.6.0-next.0", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.4.4-next.0", + "@backstage/plugin-search-backend": "^1.0.2-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-backend-node": "^1.0.2-next.0", + "@backstage/plugin-search-backend-module-elasticsearch": "^1.0.2-next.0", + "@backstage/plugin-search-backend-module-pg": "^0.4.0-next.0", + "@backstage/plugin-techdocs-backend": "^1.2.2-next.0", + "@backstage/plugin-tech-insights-backend": "^0.5.2-next.0", + "@backstage/plugin-tech-insights-node": "^0.3.4-next.0", + "@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.20-next.0", + "@backstage/plugin-todo-backend": "^0.1.33-next.0", "@gitbeaker/node": "^35.1.0", "@octokit/rest": "^19.0.3", "better-sqlite3": "^7.5.0", @@ -76,7 +76,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/dockerode": "^3.3.0", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", diff --git a/packages/backend/src/plugins/azure-devops.ts b/packages/backend/src/plugins/azure-devops.ts index 67bba8ac85..ed5b1d0068 100644 --- a/packages/backend/src/plugins/azure-devops.ts +++ b/packages/backend/src/plugins/azure-devops.ts @@ -24,5 +24,6 @@ export default async function createPlugin( return createRouter({ logger: env.logger, config: env.config, + reader: env.reader, }); } diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md index 32ad01d0bf..dc8818fd5c 100644 --- a/packages/catalog-client/CHANGELOG.md +++ b/packages/catalog-client/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/catalog-client +## 1.0.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup + ## 1.0.4 ### Patch Changes diff --git a/packages/catalog-client/api-report.md b/packages/catalog-client/api-report.md index 5fcae87dd5..964a3c1018 100644 --- a/packages/catalog-client/api-report.md +++ b/packages/catalog-client/api-report.md @@ -78,7 +78,7 @@ export class CatalogClient implements CatalogApi { }; }); addLocation( - { type, target, dryRun }: AddLocationRequest, + request: AddLocationRequest, options?: CatalogRequestOptions, ): Promise; getEntities( diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index 448e5cfb83..81432c8042 100644 --- a/packages/catalog-client/package.json +++ b/packages/catalog-client/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-client", "description": "An isomorphic client for the catalog backend", - "version": "1.0.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,9 +38,9 @@ "cross-fetch": "^3.1.5" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/packages/catalog-client/src/CatalogClient.ts b/packages/catalog-client/src/CatalogClient.ts index 371ac55db4..8ddc3eb36d 100644 --- a/packages/catalog-client/src/CatalogClient.ts +++ b/packages/catalog-client/src/CatalogClient.ts @@ -272,9 +272,11 @@ export class CatalogClient implements CatalogApi { * {@inheritdoc CatalogApi.addLocation} */ async addLocation( - { type = 'url', target, dryRun }: AddLocationRequest, + request: AddLocationRequest, options?: CatalogRequestOptions, ): Promise { + const { type = 'url', target, dryRun } = request; + const response = await this.fetchApi.fetch( `${await this.discoveryApi.getBaseUrl('catalog')}/locations${ dryRun ? '?dryRun=true' : '' diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index 40eb5419b3..1310004e8c 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -43,7 +43,7 @@ "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7", "@types/json-schema": "^7.0.5", "@types/lodash": "^4.14.151", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 4fdab1c48d..f7a1b4432b 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,74 @@ # @backstage/cli +## 0.18.2-next.0 + +### Patch Changes + +- 6ae0f6a719: Switch out `sucrase` for `swc` for transpilation. + + `sucrase` is a little more relaxed when it comes to supporting the ways of mocking in `jest`. You might have to make some changes to your tests to meet the `jest` standard and spec if your tests seems to start failing. + + Mocks that look like this are invalid, and they will throw a reference error in line with the `jest` documentation [here on example 3](https://jestjs.io/docs/es6-class-mocks#calling-jestmock-with-the-module-factory-parameter) + + ```ts + const mockCommandExists = jest.fn(); + jest.mock('command-exists', () => mockCommandExists); + ``` + + You might need to update these mocks to look a little like the following to defer the call to the `jest.fn()` spy until the mock is called. + + ```ts + const mockCommandExists = jest.fn(); + jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), + ); + ``` + + Also, imports are immutable. So it means that you might get some errors when trying to use `jest.spyOn` with starred imports. You might see an error like this: + + ```log + TypeError: Cannot redefine property: executeFrameHandlerStrategy + at Function.defineProperty () + + 20 | import { AuthResolverContext } from '../types'; + 21 | + > 22 | const mockFrameHandler = jest.spyOn( + | ^ + 23 | helpers, + 24 | 'executeFrameHandlerStrategy', + 25 | ) as unknown as jest.MockedFunction< + ``` + + This happens when you try to do `import * as something from './something'` and then `jest.spyOn(something, 'test)`. You will need to add a `jest.mock` call to mock out the required starred import to return `jest.fn()` functions from the start. Something like this fixes the above test: + + ```ts + jest.mock('../../helpers', () => ({ + executeFrameHandlerStrategy: jest.fn(), + })); + ``` + + You can also remove any occurrence of `hot(App)` and any import of `react-hot-loader` if you're using the that package locally, as all this has now been replaced with [React Refresh](https://www.npmjs.com/package/react-refresh) which you will get out of the box with the new CLI. + + **Note** If you're experiencing difficulties with running tests after the migration, please reach out to us on Discord to see if we can help, or raise an issue. But in the meantime you can switch back to the existing behaviour by using the following config in your root `package.json`. + + ```json + "jest": { + "transform": { + "\\.(js|jsx|ts|tsx|mjs|cjs)$": "@backstage/cli/config/jestSucraseTransform.js", + "\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$": "@backstage/cli/config/jestFileTransform.js", + "\\.(yaml)$": "jest-transform-yaml" + } + } + ``` + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/config-loader@1.1.4-next.0 + - @backstage/release-manifests@0.0.6-next.0 + ## 0.18.1 ### Patch Changes diff --git a/packages/cli/config/jest.js b/packages/cli/config/jest.js index 21f4462eab..028cc8d389 100644 --- a/packages/cli/config/jest.js +++ b/packages/cli/config/jest.js @@ -37,6 +37,7 @@ const transformIgnorePattern = [ 'react-dom', 'highlight\\.js', 'prismjs', + 'json-schema', 'react-use', 'typescript', ].join('|'); @@ -131,9 +132,9 @@ async function getProjectConfig(targetPath, displayName) { transform: { '\\.(js|jsx|ts|tsx|mjs|cjs)$': [ - require.resolve('./jestSucraseTransform.js'), + require.resolve('./jestSwcTransform'), { - enableSourceMaps: envOptions.enableSourceMaps || envOptions.nextTests, + sourceMaps: envOptions.enableSourceMaps || envOptions.nextTests, }, ], '\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg|eot|woff|woff2|ttf)$': @@ -149,7 +150,6 @@ async function getProjectConfig(targetPath, displayName) { : undefined, transformIgnorePatterns: [`/node_modules/(?:${transformIgnorePattern})/`], - ...getRoleConfig(closestPkgJson?.backstage?.role), }; diff --git a/packages/cli/config/jestSwcTransform.js b/packages/cli/config/jestSwcTransform.js new file mode 100644 index 0000000000..c87948978d --- /dev/null +++ b/packages/cli/config/jestSwcTransform.js @@ -0,0 +1,35 @@ +/* + * Copyright 2022 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. + */ +const { createTransformer: createSwcTransformer } = require('@swc/jest'); + +const ESM_REGEX = /\b(?:import|export)\b/; + +function createTransformer(config) { + const swcTransformer = createSwcTransformer(config); + const process = (source, filePath, jestOptions) => { + if (filePath.endsWith('.js') && !ESM_REGEX.test(source)) { + return source; + } + + return swcTransformer.process(source, filePath, jestOptions); + }; + + const getCacheKey = swcTransformer.getCacheKey; + + return { process, getCacheKey }; +} + +module.exports = { createTransformer }; diff --git a/packages/cli/package.json b/packages/cli/package.json index 2dd77778b5..560139c71a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.18.1", + "version": "0.18.2-next.0", "private": false, "publishConfig": { "access": "public" @@ -33,14 +33,13 @@ "dependencies": { "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/config-loader": "^1.1.3", + "@backstage/config-loader": "^1.1.4-next.0", "@backstage/errors": "^1.1.0", - "@backstage/release-manifests": "^0.0.5", + "@backstage/release-manifests": "^0.0.6-next.0", "@backstage/types": "^1.0.0", - "@hot-loader/react-dom-v16": "npm:@hot-loader/react-dom@^16.0.2", - "@hot-loader/react-dom-v17": "npm:@hot-loader/react-dom@^17.0.2", "@manypkg/get-packages": "^1.1.3", "@octokit/request": "^6.0.0", + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.0.6", @@ -54,6 +53,9 @@ "@svgr/plugin-svgo": "6.3.x", "@svgr/rollup": "6.3.x", "@svgr/webpack": "6.3.x", + "@swc/core": "^1.2.239", + "@swc/helpers": "^0.4.7", + "@swc/jest": "^0.2.22", "@types/webpack-env": "^1.15.2", "@typescript-eslint/eslint-plugin": "^5.9.0", "@typescript-eslint/parser": "^5.9.0", @@ -88,8 +90,8 @@ "html-webpack-plugin": "^5.3.1", "inquirer": "^8.2.0", "jest": "^27.5.1", - "jest-runtime": "^27.5.1", "jest-css-modules": "^2.1.0", + "jest-runtime": "^27.5.1", "jest-transform-yaml": "^1.0.0", "json-schema": "^0.4.0", "lodash": "^4.17.21", @@ -102,7 +104,7 @@ "postcss": "^8.1.0", "process": "^0.11.10", "react-dev-utils": "^12.0.0-next.60", - "react-hot-loader": "^4.13.0", + "react-refresh": "^0.14.0", "recursive-readdir": "^2.2.2", "replace-in-file": "^6.0.0", "rollup": "^2.60.2", @@ -114,10 +116,11 @@ "semver": "^7.3.2", "style-loader": "^3.3.1", "sucrase": "^3.20.2", + "swc-loader": "^0.2.3", "tar": "^6.1.2", "terser-webpack-plugin": "^5.1.3", "util": "^0.12.3", - "webpack": "^5.66.0", + "webpack": "^5.70.0", "webpack-dev-server": "^4.7.3", "webpack-node-externals": "^3.0.0", "yaml": "^2.0.0", @@ -126,13 +129,13 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@types/diff": "^5.0.0", "@types/express": "^4.17.6", @@ -152,7 +155,7 @@ "@types/yarnpkg__lockfile": "^1.1.4", "del": "^6.0.0", "mock-fs": "^5.1.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "nodemon": "^2.0.2", "ts-node": "^10.0.0" }, diff --git a/packages/cli/src/commands/versions/bump.test.ts b/packages/cli/src/commands/versions/bump.test.ts index e7b3c858aa..cdbf6779a4 100644 --- a/packages/cli/src/commands/versions/bump.test.ts +++ b/packages/cli/src/commands/versions/bump.test.ts @@ -51,6 +51,13 @@ jest.mock('ora', () => ({ }, })); +jest.mock('../../lib/run', () => { + return { + run: jest.fn(), + runPlain: jest.fn(), + }; +}); + const REGISTRY_VERSIONS: { [name: string]: string } = { '@backstage/core': '1.0.6', '@backstage/core-api': '1.0.7', diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index 057474ea9a..0d4649fa3f 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -135,20 +135,16 @@ export async function createConfig( }), ); - // Detect and use the appropriate react-dom hot-loader patch based on what - // version of React is used within the target repo. - const resolveAliases: Record = {}; - try { - // eslint-disable-next-line import/no-extraneous-dependencies - const { version: reactDomVersion } = require('react-dom/package.json'); - if (reactDomVersion.startsWith('16.')) { - resolveAliases['react-dom'] = '@hot-loader/react-dom-v16'; - } else { - resolveAliases['react-dom'] = '@hot-loader/react-dom-v17'; - } - } catch (error) { - console.warn(`WARNING: Failed to read react-dom version, ${error}`); - } + // These files are required by the transpiled code when using React Refresh. + // They need to be excluded to the module scope plugin which ensures that files + // that exist in the package are required. + const reactRefreshFiles = [ + require.resolve( + '@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js', + ), + require.resolve('@pmmmwh/react-refresh-webpack-plugin/overlay/index.js'), + require.resolve('react-refresh'), + ]; return { mode: isDev ? 'development' : 'production', @@ -160,7 +156,7 @@ export async function createConfig( }, devtool: isDev ? 'eval-cheap-module-source-map' : 'source-map', context: paths.targetPath, - entry: [require.resolve('react-hot-loader/patch'), paths.targetEntry], + entry: [paths.targetEntry], resolve: { extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx', '.json', '.wasm'], mainFields: ['browser', 'module', 'main'], @@ -185,10 +181,9 @@ export async function createConfig( new LinkedPackageResolvePlugin(paths.rootNodeModules, externalPkgs), new ModuleScopePlugin( [paths.targetSrc, paths.targetDev], - [paths.targetPackageJson], + [paths.targetPackageJson, ...reactRefreshFiles], ), ], - alias: resolveAliases, }, module: { rules: loaders, @@ -282,9 +277,6 @@ export async function createBackendConfig( [paths.targetPackageJson], ), ], - alias: { - 'react-dom': '@hot-loader/react-dom', - }, }, module: { rules: loaders, diff --git a/packages/cli/src/lib/bundler/transforms.ts b/packages/cli/src/lib/bundler/transforms.ts index a24c24a194..5fe20a0043 100644 --- a/packages/cli/src/lib/bundler/transforms.ts +++ b/packages/cli/src/lib/bundler/transforms.ts @@ -14,9 +14,10 @@ * limitations under the License. */ -import webpack, { ModuleOptions, WebpackPluginInstance } from 'webpack'; +import { ModuleOptions, WebpackPluginInstance } from 'webpack'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import { svgrTemplate } from '../svgrTemplate'; +import ReactRefreshPlugin from '@pmmmwh/react-refresh-webpack-plugin'; type Transforms = { loaders: ModuleOptions['rules']; @@ -31,8 +32,6 @@ type TransformOptions = { export const transforms = (options: TransformOptions): Transforms => { const { isDev, isBackend } = options; - const extraTransforms = isDev && !isBackend ? ['react-hot-loader'] : []; - // This ensures that styles inserted from the style-loader and any // async style chunks are always given lower priority than JSS styles. // Note that this function is stringified and executed in the browser @@ -54,22 +53,54 @@ export const transforms = (options: TransformOptions): Transforms => { { test: /\.(tsx?)$/, exclude: /node_modules/, - loader: require.resolve('@sucrase/webpack-loader'), - options: { - transforms: ['typescript', 'jsx', ...extraTransforms], - disableESTransforms: true, - production: !isDev, - }, + use: [ + { + loader: 'swc-loader', + options: { + jsc: { + target: 'es2019', + externalHelpers: !isBackend, + parser: { + syntax: 'typescript', + tsx: true, + dynamicImport: true, + }, + transform: { + react: { + runtime: 'automatic', + refresh: isDev, + }, + }, + }, + }, + }, + ], }, { test: /\.(jsx?|mjs|cjs)$/, exclude: /node_modules/, - loader: require.resolve('@sucrase/webpack-loader'), - options: { - transforms: ['jsx', ...extraTransforms], - disableESTransforms: true, - production: !isDev, - }, + use: [ + { + loader: 'swc-loader', + options: { + jsc: { + target: 'es2019', + externalHelpers: !isBackend, + parser: { + syntax: 'ecmascript', + jsx: true, + dynamicImport: true, + }, + transform: { + react: { + runtime: 'automatic', + refresh: isDev, + }, + }, + }, + }, + }, + ], }, { test: /\.(js|mjs|cjs)/, @@ -81,11 +112,17 @@ export const transforms = (options: TransformOptions): Transforms => { test: [/\.icon\.svg$/], use: [ { - loader: require.resolve('@sucrase/webpack-loader'), + loader: 'swc-loader', options: { - transforms: ['jsx', ...extraTransforms], - disableESTransforms: true, - production: !isDev, + jsc: { + target: 'es2019', + externalHelpers: !isBackend, + parser: { + syntax: 'ecmascript', + jsx: true, + dynamicImport: true, + }, + }, }, }, { @@ -151,7 +188,12 @@ export const transforms = (options: TransformOptions): Transforms => { const plugins = new Array(); if (isDev) { - plugins.push(new webpack.HotModuleReplacementPlugin()); + plugins.push( + new ReactRefreshPlugin({ + esModule: true, + overlay: { sockProtocol: 'ws' }, + }), + ); } else { plugins.push( new MiniCssExtractPlugin({ diff --git a/packages/cli/src/lib/versioning/packages.test.ts b/packages/cli/src/lib/versioning/packages.test.ts index 1d6d3a4c40..975be74abd 100644 --- a/packages/cli/src/lib/versioning/packages.test.ts +++ b/packages/cli/src/lib/versioning/packages.test.ts @@ -20,6 +20,13 @@ import * as runObj from '../run'; import { fetchPackageInfo, mapDependencies } from './packages'; import { NotFoundError } from '../errors'; +jest.mock('../run', () => { + return { + run: jest.fn(), + runPlain: jest.fn(), + }; +}); + describe('fetchPackageInfo', () => { afterEach(() => { jest.resetAllMocks(); diff --git a/packages/cli/templates/default-backend-plugin/package.json.hbs b/packages/cli/templates/default-backend-plugin/package.json.hbs index 0a5600ad24..3b9a34db33 100644 --- a/packages/cli/templates/default-backend-plugin/package.json.hbs +++ b/packages/cli/templates/default-backend-plugin/package.json.hbs @@ -41,7 +41,7 @@ "@backstage/cli": "{{versionQuery '@backstage/cli'}}", "@types/supertest": "{{versionQuery '@types/supertest' '2.0.8'}}", "supertest": "{{versionQuery 'supertest' '4.0.2'}}", - "msw": "{{versionQuery 'msw' '0.44.0'}}" + "msw": "{{versionQuery 'msw' '0.45.0'}}" }, "files": [ "dist" diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index f084d59a8e..540bd75755 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -49,7 +49,7 @@ "@testing-library/user-event": "{{versionQuery '@testing-library/user-event' '14.0.0'}}", "@types/jest": "{{versionQuery '@types/jest' '26.0.7'}}", "@types/node": "{{versionQuery '@types/node' '16.11.26'}}", - "msw": "{{versionQuery 'msw' '0.44.0'}}", + "msw": "{{versionQuery 'msw' '0.45.0'}}", "cross-fetch": "{{versionQuery 'cross-fetch' '3.1.5'}}" }, "files": [ diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index 484795ce5b..47e2c28c08 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/config-loader +## 1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + ## 1.1.3 ### Patch Changes diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 3a0fd87b4a..ebb7732a6d 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "1.1.3", + "version": "1.1.4-next.0", "private": false, "publishConfig": { "access": "public", @@ -57,7 +57,7 @@ "@types/node": "^16.11.26", "@types/yup": "^0.29.13", "mock-fs": "^5.1.0", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/packages/config/package.json b/packages/config/package.json index eebebf0b59..897a6b6436 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -37,7 +37,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/test-utils": "^1.1.3-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@types/jest": "^26.0.7", "@types/node": "^16.0.0" }, diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index 8a14eed4ec..9661484bfa 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/core-app-api +## 1.0.6-next.0 + +### Patch Changes + +- 744fea158b: Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + ## 1.0.5 ### Patch Changes diff --git a/packages/core-app-api/api-report.md b/packages/core-app-api/api-report.md index beb0d11201..3cc1f4a8a8 100644 --- a/packages/core-app-api/api-report.md +++ b/packages/core-app-api/api-report.md @@ -157,6 +157,7 @@ export type AppConfigLoader = () => Promise; export type AppContext = { getPlugins(): BackstagePlugin[]; getSystemIcon(key: string): IconComponent | undefined; + getSystemIcons(): Record; getComponents(): AppComponents; }; diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index d8586a7985..1e54443473 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-app-api", "description": "Core app API used by Backstage apps", - "version": "1.0.5", + "version": "1.0.6-next.0", "private": false, "publishConfig": { "access": "public", @@ -34,7 +34,7 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/types": "^1.0.0", "@backstage/version-bridge": "^1.0.1", "@types/prop-types": "^15.7.3", @@ -49,8 +49,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -59,7 +59,7 @@ "@types/node": "^16.11.26", "@types/zen-observable": "^0.8.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/packages/core-app-api/src/app/AppContext.test.tsx b/packages/core-app-api/src/app/AppContext.test.tsx index bc67ee3a9e..a27b7c6f35 100644 --- a/packages/core-app-api/src/app/AppContext.test.tsx +++ b/packages/core-app-api/src/app/AppContext.test.tsx @@ -36,6 +36,7 @@ describe('v1 consumer', () => { getPlugins: jest.fn(), getComponents: jest.fn(), getSystemIcon: jest.fn(), + getSystemIcons: jest.fn(), }; const renderedHook = renderHook(() => useMockAppV1(), { diff --git a/packages/core-app-api/src/app/AppManager.tsx b/packages/core-app-api/src/app/AppManager.tsx index 72c69f7da4..f36d37f796 100644 --- a/packages/core-app-api/src/app/AppManager.tsx +++ b/packages/core-app-api/src/app/AppManager.tsx @@ -153,6 +153,10 @@ class AppContextImpl implements AppContext { return this.app.getSystemIcon(key); } + getSystemIcons(): Record { + return this.app.getSystemIcons(); + } + getComponents(): AppComponents { return this.app.getComponents(); } @@ -194,6 +198,10 @@ export class AppManager implements BackstageApp { return this.icons[key]; } + getSystemIcons(): Record { + return this.icons; + } + getComponents(): AppComponents { return this.components; } diff --git a/packages/core-app-api/src/app/types.ts b/packages/core-app-api/src/app/types.ts index 979fb0496e..39bf9c0554 100644 --- a/packages/core-app-api/src/app/types.ts +++ b/packages/core-app-api/src/app/types.ts @@ -328,6 +328,11 @@ export type AppContext = { */ getSystemIcon(key: string): IconComponent | undefined; + /** + * Get a list of common and custom icons for this app. + */ + getSystemIcons(): Record; + /** * Get the components registered for various purposes in the app. */ diff --git a/packages/core-app-api/src/lib/AuthConnector/DefaultAuthConnector.test.ts b/packages/core-app-api/src/lib/AuthConnector/DefaultAuthConnector.test.ts index baf89a59d8..1a0a53347f 100644 --- a/packages/core-app-api/src/lib/AuthConnector/DefaultAuthConnector.test.ts +++ b/packages/core-app-api/src/lib/AuthConnector/DefaultAuthConnector.test.ts @@ -22,6 +22,12 @@ import { setupRequestMockHandlers } from '@backstage/test-utils'; import { setupServer } from 'msw/node'; import { rest } from 'msw'; +jest.mock('../loginPopup', () => { + return { + showLoginPopup: jest.fn(), + }; +}); + const defaultOptions = { discoveryApi: UrlPatternDiscovery.compile('http://my-host/api/{{pluginId}}'), environment: 'production', diff --git a/packages/core-app-api/src/routing/RoutingProvider.test.tsx b/packages/core-app-api/src/routing/RoutingProvider.test.tsx index dec92072fc..c559c0fff0 100644 --- a/packages/core-app-api/src/routing/RoutingProvider.test.tsx +++ b/packages/core-app-api/src/routing/RoutingProvider.test.tsx @@ -124,6 +124,7 @@ const Extension5 = plugin.provide( const mockContext = { getComponents: () => ({ Progress: () => null } as any), getSystemIcon: jest.fn(), + getSystemIcons: jest.fn(), getPlugins: jest.fn(), }; diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index c1cd9e33ac..24f200a687 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/core-components +## 0.11.1-next.0 + +### Patch Changes + +- b29c44d895: Adds code to generate ids for headers parsed through the MarkdownContent component. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + ## 0.11.0 ### Minor Changes diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 1cdba47257..3dc4e2848e 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -987,13 +987,10 @@ export type SidebarOpenState = { }; // @public -export const SidebarOpenStateProvider: ({ - children, - value, -}: { +export function SidebarOpenStateProvider(props: { children: ReactNode; value: SidebarOpenState; -}) => JSX.Element; +}): JSX.Element; // @public (undocumented) export type SidebarOptions = { @@ -1034,13 +1031,10 @@ export type SidebarPinStateContextType = { }; // @public -export const SidebarPinStateProvider: ({ - children, - value, -}: { +export function SidebarPinStateProvider(props: { children: ReactNode; value: SidebarPinStateContextType; -}) => JSX.Element; +}): JSX.Element; // @public (undocumented) export type SidebarProps = { diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 7a43e27290..74dc89bfc0 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.11.0", + "version": "0.11.1-next.0", "private": false, "publishConfig": { "access": "public", @@ -34,7 +34,7 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@backstage/version-bridge": "^1.0.1", @@ -79,9 +79,9 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/core-app-api": "^1.0.5", - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -101,7 +101,7 @@ "@types/react-window": "^1.8.5", "@types/zen-observable": "^0.8.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx index 9c08b83c40..fa8cb35ca8 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.test.tsx @@ -100,4 +100,34 @@ describe('', () => { 'https://example.com/blog/assets/6/header.png', ); }); + + it('render MarkdownContent component with headings given proper ids', async () => { + const rendered = await renderWithEffects( + wrapInTestApp( + , + ), + ); + + expect(rendered.getByText('Lorem ipsum').getAttribute('id')).toEqual( + 'lorem-ipsum', + ); + expect(rendered.getByText('bing bong').getAttribute('id')).toEqual( + 'bing-bong', + ); + expect( + rendered + .getByText( + 'The FitnessGram Pacer Test is a multistage aerobic capacity test', + ) + .getAttribute('id'), + ).toEqual( + 'the-fitnessgram-pacer-test-is-a-multistage-aerobic-capacity-test', + ); + }); }); diff --git a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx index 013e81817a..d97172bf75 100644 --- a/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core-components/src/components/MarkdownContent/MarkdownContent.tsx @@ -20,6 +20,7 @@ import gfm from 'remark-gfm'; import React from 'react'; import { BackstageTheme } from '@backstage/theme'; import { CodeSnippet } from '../CodeSnippet'; +import { HeadingProps } from 'react-markdown/lib/ast-to-react'; export type MarkdownContentClassKey = 'markdown'; @@ -73,6 +74,21 @@ type Props = { className?: string; }; +const flatten = (text: string, child: any): string => { + if (!child) return text; + + return typeof child === 'string' + ? text + child + : React.Children.toArray(child.props.children).reduce(flatten, text); +}; + +const headingRenderer = ({ level, children }: HeadingProps) => { + const childrenArray = React.Children.toArray(children); + const text = childrenArray.reduce(flatten, ''); + const slug = text.toLocaleLowerCase('en-US').replace(/\W/g, '-'); + return React.createElement(`h${level}`, { id: slug }, children); +}; + const components: Options['components'] = { code: ({ inline, className, children, ...props }) => { const text = String(children).replace(/\n+$/, ''); @@ -85,6 +101,12 @@ const components: Options['components'] = { ); }, + h1: headingRenderer, + h2: headingRenderer, + h3: headingRenderer, + h4: headingRenderer, + h5: headingRenderer, + h6: headingRenderer, }; /** diff --git a/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.tsx b/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.tsx index 7cb0e5b2c3..36e87b07a2 100644 --- a/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.tsx +++ b/packages/core-components/src/layout/Sidebar/SidebarOpenStateContext.tsx @@ -74,21 +74,21 @@ const VersionedSidebarContext = createVersionedContext<{ * * @public */ -export const SidebarOpenStateProvider = ({ - children, - value, -}: { +export function SidebarOpenStateProvider(props: { children: ReactNode; value: SidebarOpenState; -}) => ( - - - {children} - - -); +}) { + const { children, value } = props; + return ( + + + {children} + + + ); +} /** * Hook to read and update the sidebar's open state, which controls whether or diff --git a/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.tsx b/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.tsx index e00ed259e9..9c58a32732 100644 --- a/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.tsx +++ b/packages/core-components/src/layout/Sidebar/SidebarPinStateContext.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createVersionedContext, createVersionedValueMap, @@ -22,8 +23,8 @@ import React, { createContext, ReactNode, useContext } from 'react'; /** * Type of `SidebarPinStateContext` * - * @public @deprecated - * Use `SidebarPinState` instead. + * @public + * @deprecated Use `SidebarPinState` instead. */ export type SidebarPinStateContextType = { isPinned: boolean; @@ -80,21 +81,21 @@ const VersionedSidebarPinStateContext = createVersionedContext<{ * * @public */ -export const SidebarPinStateProvider = ({ - children, - value, -}: { +export function SidebarPinStateProvider(props: { children: ReactNode; value: SidebarPinStateContextType; -}) => ( - - - {children} - - -); +}) { + const { children, value } = props; + return ( + + + {children} + + + ); +} /** * Hook to read and update sidebar pin state, which controls whether or not the diff --git a/packages/core-plugin-api/CHANGELOG.md b/packages/core-plugin-api/CHANGELOG.md index 807718212c..8d0b6038f7 100644 --- a/packages/core-plugin-api/CHANGELOG.md +++ b/packages/core-plugin-api/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/core-plugin-api +## 1.0.6-next.0 + +### Patch Changes + +- 744fea158b: Added `getSystemIcons()` function to the `AppContext` available through `useApp` that will pull a list of all the icons that have been registered in the App. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup + ## 1.0.5 ### Patch Changes diff --git a/packages/core-plugin-api/api-report.md b/packages/core-plugin-api/api-report.md index 49e0be3800..0738d7bac5 100644 --- a/packages/core-plugin-api/api-report.md +++ b/packages/core-plugin-api/api-report.md @@ -149,6 +149,7 @@ export type AppComponents = { export type AppContext = { getPlugins(): BackstagePlugin_2[]; getSystemIcon(key: string): IconComponent_2 | undefined; + getSystemIcons(): Record; getComponents(): AppComponents; }; @@ -648,10 +649,7 @@ export interface PluginOptionsProviderProps { } // @alpha -export const PluginProvider: ({ - children, - plugin, -}: PluginOptionsProviderProps) => JSX.Element; +export const PluginProvider: (props: PluginOptionsProviderProps) => JSX.Element; // @public export type ProfileInfo = { diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index ab0136d1f1..20e06593eb 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-plugin-api", "description": "Core API used by Backstage plugins", - "version": "1.0.5", + "version": "1.0.6-next.0", "private": false, "publishConfig": { "access": "public", @@ -47,9 +47,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -59,7 +59,7 @@ "@types/prop-types": "^15.7.3", "@types/zen-observable": "^0.8.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/packages/core-plugin-api/src/plugin-options/usePluginOptions.tsx b/packages/core-plugin-api/src/plugin-options/usePluginOptions.tsx index 82684636d6..4fdacc1ace 100644 --- a/packages/core-plugin-api/src/plugin-options/usePluginOptions.tsx +++ b/packages/core-plugin-api/src/plugin-options/usePluginOptions.tsx @@ -39,10 +39,11 @@ export interface PluginOptionsProviderProps { * * @alpha */ -export const PluginProvider = ({ - children, - plugin, -}: PluginOptionsProviderProps): JSX.Element => { +export const PluginProvider = ( + props: PluginOptionsProviderProps, +): JSX.Element => { + const { children, plugin } = props; + const { Provider } = createVersionedContext<{ 1: { plugin: BackstagePlugin | undefined }; }>(contextKey); diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 51e9fa0987..31422429a3 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,99 @@ # @backstage/create-app +## 0.4.31-next.0 + +### Patch Changes + +- e83de28e36: Fix typo in the documentation +- 208d6780c9: The `packages/backend/Dockerfile` received a couple of updates, it now looks as follows: + + ```Dockerfile + FROM node:16-bullseye-slim + + # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, + # in which case you should also move better-sqlite3 to "devDependencies" in package.json. + RUN apt-get update && \ + apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + yarn config set python /usr/bin/python3 + + # From here on we use the least-privileged `node` user to run the backend. + USER node + WORKDIR /app + + # This switches many Node.js dependencies to production mode. + ENV NODE_ENV production + + # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. + # The skeleton contains the package.json of each package in the monorepo, + # and along with yarn.lock and the root package.json, that's enough to run yarn install. + COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ + RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz + + RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" + + # Then copy the rest of the backend bundle, along with any other files we might want. + COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ + RUN tar xzf bundle.tar.gz && rm bundle.tar.gz + + CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] + ``` + + The two notable changes are that a `USER node` instruction has been added and the ordering of instructions has been changed accordingly. This means that the app will now be running using the least-privileged `node` user. In order for this to work we now need to make sure that all app files are owned by the `node` user, which we do by adding the `--chown=node:node` option to the `COPY` instructions. + + The second change is the addition of `ENV NODE_ENV production`, which ensured that all Node.js modules run in production mode. If you apply this change to an existing app, note that one of the more significant changes is that this switches the log formatting to use the default production format, JSON. Rather than your log lines looking like this: + + ```log + 2022-08-10T11:36:05.478Z catalog info Performing database migration type=plugin + ``` + + They will now look like this: + + ```log + {"level":"info","message":"Performing database migration","plugin":"catalog","service":"backstage","type":"plugin"} + ``` + + If you wish to keep the existing format, you can override this change by applying the following change to `packages/backend/src/index.ts`: + + ```diff + getRootLogger, + + setRootLogger, + + createRootLogger, + + coloredFormat, + useHotMemoize, + ... + ServerTokenManager, + } from '@backstage/backend-common'; + + ... + + async function main() { + + setRootLogger(createRootLogger({ format: coloredFormat })); + + + const config = await loadBackendConfig({ + ``` + +- c0a08fd08c: Added `EntityLinksCard` to the system `EntityPage`. + + For an existing installation where you want to display the links card for entity pages of kind `system` you should make the following adjustment to `packages/app/src/components/catalog/EntityPage.tsx` + + ```diff + const systemPage = ( + ... + + + + + + + + + + - + + + + + ... + ); + ``` + ## 0.4.30 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index be2df5752a..cc20c27a26 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.30", + "version": "0.4.31-next.0", "private": false, "publishConfig": { "access": "public" diff --git a/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx b/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx index 6ec4da055d..d98153f660 100644 --- a/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/create-app/templates/default-app/packages/app/src/components/catalog/EntityPage.tsx @@ -324,7 +324,10 @@ const systemPage = ( - + + + + diff --git a/packages/create-app/templates/default-app/packages/backend/Dockerfile b/packages/create-app/templates/default-app/packages/backend/Dockerfile index 8836ac7898..682798b826 100644 --- a/packages/create-app/templates/default-app/packages/backend/Dockerfile +++ b/packages/create-app/templates/default-app/packages/backend/Dockerfile @@ -11,8 +11,6 @@ FROM node:16-bullseye-slim -WORKDIR /app - # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, # in which case you should also move better-sqlite3 to "devDependencies" in package.json. RUN apt-get update && \ @@ -20,16 +18,23 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* && \ yarn config set python /usr/bin/python3 +# From here on we use the least-privileged `node` user to run the backend. +USER node +WORKDIR /app + +# This switches many Node.js dependencies to production mode. +ENV NODE_ENV production + # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. # The skeleton contains the package.json of each package in the monorepo, # and along with yarn.lock and the root package.json, that's enough to run yarn install. -COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ +COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)" # Then copy the rest of the backend bundle, along with any other files we might want. -COPY packages/backend/dist/bundle.tar.gz app-config*.yaml ./ +COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ RUN tar xzf bundle.tar.gz && rm bundle.tar.gz CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] diff --git a/packages/create-app/templates/default-app/packages/backend/src/plugins/auth.ts b/packages/create-app/templates/default-app/packages/backend/src/plugins/auth.ts index 159116d7b8..77eb6aae21 100644 --- a/packages/create-app/templates/default-app/packages/backend/src/plugins/auth.ts +++ b/packages/create-app/templates/default-app/packages/backend/src/plugins/auth.ts @@ -25,7 +25,7 @@ export default async function createPlugin( // This particular resolver makes all users share a single "guest" identity. // It should only be used for testing and trying out Backstage. // - // If you want to use a production ready resolver you can switch to the + // If you want to use a production ready resolver you can switch to // the one that is commented out below, it looks up a user entity in the // catalog using the GitHub username of the authenticated user. // That resolver requires you to have user entities populated in the catalog, diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 34adb63d3c..fbf7f85378 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/dev-utils +## 1.0.6-next.0 + +### Patch Changes + +- 4c5e85ddf3: Removed the dependency and setup of `react-hot-loader`, since the `@backstage/cli` now uses `swc` with `React Refresh` instead. +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + ## 1.0.5 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 07c51dc8ae..062ad64585 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "1.0.5", + "version": "1.0.6-next.0", "private": false, "publishConfig": { "access": "public", @@ -33,14 +33,14 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/app-defaults": "^1.0.5", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/app-defaults": "^1.0.6-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/test-utils": "^1.1.3", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,7 +48,6 @@ "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "react-use": "^17.2.4", - "react-hot-loader": "^4.13.0", "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", "zen-observable": "^0.8.15" @@ -59,7 +58,7 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7", "@types/node": "^16.0.0" }, diff --git a/packages/dev-utils/src/devApp/render.tsx b/packages/dev-utils/src/devApp/render.tsx index 9f9fcd8ca6..5cd77528a4 100644 --- a/packages/dev-utils/src/devApp/render.tsx +++ b/packages/dev-utils/src/devApp/render.tsx @@ -46,7 +46,6 @@ import { Box } from '@material-ui/core'; import BookmarkIcon from '@material-ui/icons/Bookmark'; import React, { ComponentType, ReactNode } from 'react'; import ReactDOM from 'react-dom'; -import { hot } from 'react-hot-loader'; import { Route } from 'react-router'; import { SidebarThemeSwitcher } from './SidebarThemeSwitcher'; @@ -224,12 +223,7 @@ export class DevAppBuilder { * Build and render directory to #root element, with react hot loading. */ render(): void { - const hotModule = - require.cache['./dev/index.tsx'] ?? - require.cache['./dev/index.ts'] ?? - module; - - const DevApp = hot(hotModule)(this.build()); + const DevApp = this.build(); if ( window.location.pathname === '/' && diff --git a/packages/errors/package.json b/packages/errors/package.json index 8bd53e0848..b4128b10f4 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -38,7 +38,7 @@ "serialize-error": "^8.0.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7" }, "files": [ diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index 89fbb56619..ec2865c121 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/integration-react +## 1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + ## 1.1.3 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index 999a8a6031..114ef4879d 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "1.1.3", + "version": "1.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,9 +25,9 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration": "^1.3.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration": "^1.3.1-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -38,15 +38,15 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0", + "msw": "^0.45.0", "cross-fetch": "^3.1.5" }, "files": [ diff --git a/packages/integration/CHANGELOG.md b/packages/integration/CHANGELOG.md index 57bb9297ba..43c7b16408 100644 --- a/packages/integration/CHANGELOG.md +++ b/packages/integration/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/integration +## 1.3.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + ## 1.3.0 ### Minor Changes diff --git a/packages/integration/package.json b/packages/integration/package.json index 720cdd163d..702342a79f 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration", "description": "Helpers for managing integrations towards external systems", - "version": "1.3.0", + "version": "1.3.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -43,12 +43,12 @@ "lodash": "^4.17.21" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/config-loader": "^1.1.3", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/config-loader": "^1.1.4-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@types/jest": "^26.0.7", "@types/luxon": "^3.0.0", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.test.ts b/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.test.ts index d738edf417..1dcc45c1ef 100644 --- a/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.test.ts +++ b/packages/integration/src/github/SingleInstanceGithubCredentialsProvider.test.ts @@ -25,7 +25,7 @@ const octokit = { }, }; -jest.doMock('@octokit/rest', () => { +jest.mock('@octokit/rest', () => { class Octokit { constructor() { return octokit; diff --git a/packages/release-manifests/CHANGELOG.md b/packages/release-manifests/CHANGELOG.md index b00e1c5821..e1aad51494 100644 --- a/packages/release-manifests/CHANGELOG.md +++ b/packages/release-manifests/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/release-manifests +## 0.0.6-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + ## 0.0.5 ### Patch Changes diff --git a/packages/release-manifests/package.json b/packages/release-manifests/package.json index 330f89b5ac..fc20b5c388 100644 --- a/packages/release-manifests/package.json +++ b/packages/release-manifests/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/release-manifests", "description": "Helper library for receiving release manifests", - "version": "0.0.5", + "version": "0.0.6-next.0", "private": false, "main": "src/index.ts", "types": "src/index.ts", @@ -36,8 +36,8 @@ "cross-fetch": "^3.1.5" }, "devDependencies": { - "@backstage/test-utils": "^1.1.3-next.0", - "msw": "^0.44.0", + "@backstage/test-utils": "^1.1.4-next.0", + "msw": "^0.45.0", "@types/jest": "^26.0.7", "@types/node": "^16.0.0" }, diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index 85300ab0f7..f8e674dafc 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,21 @@ # techdocs-cli-embedded-app +## 0.2.74-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/app-defaults@1.0.6-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + ## 0.2.73 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index ea429fa611..e9263da8b5 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,24 +1,24 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.73", + "version": "0.2.74-next.0", "private": true, "backstage": { "role": "frontend" }, "bundled": true, "dependencies": { - "@backstage/app-defaults": "^1.0.5", + "@backstage/app-defaults": "^1.0.6-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@backstage/config": "^1.0.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-techdocs": "^1.3.1", - "@backstage/plugin-techdocs-react": "^1.0.3", - "@backstage/test-utils": "^1.1.3", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-techdocs": "^1.3.2-next.0", + "@backstage/plugin-techdocs-react": "^1.0.4-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -30,7 +30,7 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/packages/techdocs-cli-embedded-app/src/components/TechDocsPage/TechDocsPage.tsx b/packages/techdocs-cli-embedded-app/src/components/TechDocsPage/TechDocsPage.tsx index c7328a0487..cc20081198 100644 --- a/packages/techdocs-cli-embedded-app/src/components/TechDocsPage/TechDocsPage.tsx +++ b/packages/techdocs-cli-embedded-app/src/components/TechDocsPage/TechDocsPage.tsx @@ -55,7 +55,7 @@ export const TechDocsThemeToggle = () => { const appThemeApi = useApi(appThemeApiRef); const classes = useStyles(); const [theme, setTheme] = useState( - (appThemeApi.getActiveThemeId() as Themes) || Themes.LIGHT, + appThemeApi.getActiveThemeId() === Themes.DARK ? Themes.DARK : Themes.LIGHT, ); const themes = { diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 27843fbec5..653564ded0 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @techdocs/cli +## 1.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-techdocs-node@1.3.1-next.0 + ## 1.2.0 ### Minor Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index bb8b10fb6f..4012196076 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.2.0", + "version": "1.2.1-next.0", "private": false, "publishConfig": { "access": "public" @@ -37,7 +37,7 @@ "techdocs-cli": "bin/techdocs-cli" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/commander": "^2.12.2", "@types/fs-extra": "^9.0.6", "@types/http-proxy": "^1.17.4", @@ -62,11 +62,11 @@ "ext": "ts" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/cli-common": "^0.1.9", "@backstage/config": "^1.0.1", - "@backstage/plugin-techdocs-node": "^1.3.0", + "@backstage/plugin-techdocs-node": "^1.3.1-next.0", "@types/dockerode": "^3.3.0", "commander": "^9.1.0", "dockerode": "^3.3.1", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index 4f15c6a665..1c49cef959 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/test-utils +## 1.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + ## 1.1.3 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 0ee76a55ab..d2a22d2e05 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "1.1.3", + "version": "1.1.4-next.0", "private": false, "publishConfig": { "access": "public", @@ -34,10 +34,10 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-react": "^0.4.4", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", @@ -55,10 +55,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/packages/theme/package.json b/packages/theme/package.json index 4323549ffb..b2245d5bca 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -36,7 +36,7 @@ "@material-ui/core": "^4.12.2" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/packages/types/package.json b/packages/types/package.json index 697c9f17f3..0893637eb6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -34,7 +34,7 @@ }, "dependencies": {}, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/zen-observable": "^0.8.0", "zen-observable": "^0.8.15" }, diff --git a/packages/version-bridge/package.json b/packages/version-bridge/package.json index 37d23238ba..4c4d4f94b4 100644 --- a/packages/version-bridge/package.json +++ b/packages/version-bridge/package.json @@ -37,7 +37,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0" diff --git a/plugins/adr-backend/CHANGELOG.md b/plugins/adr-backend/CHANGELOG.md index a4ad1edfa4..17fdb9270a 100644 --- a/plugins/adr-backend/CHANGELOG.md +++ b/plugins/adr-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-adr-backend +## 0.2.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-adr-common@0.2.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.2.0 ### Minor Changes diff --git a/plugins/adr-backend/package.json b/plugins/adr-backend/package.json index 0ecc3471c4..0f18796e5d 100644 --- a/plugins/adr-backend/package.json +++ b/plugins/adr-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr-backend", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,14 +29,14 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-adr-common": "^0.2.0", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-adr-common": "^0.2.1-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "luxon": "^3.0.0", "marked": "^4.0.14", "winston": "^3.2.1", @@ -44,11 +44,11 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/marked": "^4.0.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/adr-common/CHANGELOG.md b/plugins/adr-common/CHANGELOG.md index baf239d0ab..63584b41b1 100644 --- a/plugins/adr-common/CHANGELOG.md +++ b/plugins/adr-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-adr-common +## 0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.2.0 ### Minor Changes diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index 76058f8a86..22d73f2677 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-adr-common", "description": "Common functionalities for the adr plugin", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-search-common": "^1.0.0" + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/adr/CHANGELOG.md b/plugins/adr/CHANGELOG.md index f3f92199e4..2f7188178d 100644 --- a/plugins/adr/CHANGELOG.md +++ b/plugins/adr/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-adr +## 0.2.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-adr-common@0.2.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.2.0 ### Minor Changes diff --git a/plugins/adr/api-report.md b/plugins/adr/api-report.md index 5059d51023..ecec0c0dd5 100644 --- a/plugins/adr/api-report.md +++ b/plugins/adr/api-report.md @@ -31,13 +31,7 @@ export const adrPlugin: BackstagePlugin< // @public export const AdrReader: { - ({ - adr, - decorators, - }: { - adr: string; - decorators?: AdrContentDecorator[] | undefined; - }): JSX.Element; + (props: { adr: string; decorators?: AdrContentDecorator[] }): JSX.Element; decorators: Readonly<{ createRewriteRelativeLinksDecorator(): AdrContentDecorator; createRewriteRelativeEmbedsDecorator(): AdrContentDecorator; @@ -45,23 +39,15 @@ export const AdrReader: { }; // @public -export const AdrSearchResultListItem: ({ - lineClamp, - highlight, - rank, - result, -}: { - lineClamp?: number | undefined; - highlight?: ResultHighlight | undefined; - rank?: number | undefined; +export function AdrSearchResultListItem(props: { + lineClamp?: number; + highlight?: ResultHighlight; + rank?: number; result: AdrDocument; -}) => JSX.Element; +}): JSX.Element; // @public -export const EntityAdrContent: ({ - contentDecorators, - filePathFilterFn, -}: { +export const EntityAdrContent: (props: { contentDecorators?: AdrContentDecorator[] | undefined; filePathFilterFn?: AdrFilePathFilterFn | undefined; }) => JSX.Element; diff --git a/plugins/adr/package.json b/plugins/adr/package.json index e6010addd8..3adae6db71 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,13 +23,13 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-adr-common": "^0.2.0", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-react": "^1.0.1", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-adr-common": "^0.2.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -45,10 +45,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -56,7 +56,7 @@ "@types/jest": "*", "@types/node": "*", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/adr/src/components/AdrReader/AdrReader.tsx b/plugins/adr/src/components/AdrReader/AdrReader.tsx index ae7dc6c271..3667d8fd8c 100644 --- a/plugins/adr/src/components/AdrReader/AdrReader.tsx +++ b/plugins/adr/src/components/AdrReader/AdrReader.tsx @@ -32,15 +32,14 @@ import { AdrContentDecorator } from './types'; /** * Component to fetch and render an ADR. + * * @public */ -export const AdrReader = ({ - adr, - decorators, -}: { +export const AdrReader = (props: { adr: string; decorators?: AdrContentDecorator[]; }) => { + const { adr, decorators } = props; const { entity } = useEntity(); const scmIntegrations = useApi(scmIntegrationsApiRef); const adrLocationUrl = getAdrLocationUrl(entity, scmIntegrations); diff --git a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx index bd8e4be3cf..37344cecca 100644 --- a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx +++ b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx @@ -58,13 +58,11 @@ const useStyles = makeStyles((theme: Theme) => ({ * Component for browsing ADRs on an entity page. * @public */ -export const EntityAdrContent = ({ - contentDecorators, - filePathFilterFn, -}: { +export const EntityAdrContent = (props: { contentDecorators?: AdrContentDecorator[]; filePathFilterFn?: AdrFilePathFilterFn; }) => { + const { contentDecorators, filePathFilterFn } = props; const classes = useStyles(); const { entity } = useEntity(); const rootLink = useRouteRef(rootRouteRef); diff --git a/plugins/adr/src/search/AdrSearchResultListItem.tsx b/plugins/adr/src/search/AdrSearchResultListItem.tsx index e9e05a9df2..d76f2cca4e 100644 --- a/plugins/adr/src/search/AdrSearchResultListItem.tsx +++ b/plugins/adr/src/search/AdrSearchResultListItem.tsx @@ -43,20 +43,16 @@ const useStyles = makeStyles({ }); /** - * A component to display a ADR search result + * A component to display an ADR search result. * @public */ -export const AdrSearchResultListItem = ({ - lineClamp = 5, - highlight, - rank, - result, -}: { +export function AdrSearchResultListItem(props: { lineClamp?: number; highlight?: ResultHighlight; rank?: number; result: AdrDocument; -}) => { +}) { + const { lineClamp = 5, highlight, rank, result } = props; const classes = useStyles(); const analytics = useAnalytics(); @@ -122,4 +118,4 @@ export const AdrSearchResultListItem = ({ ); -}; +} diff --git a/plugins/airbrake-backend/CHANGELOG.md b/plugins/airbrake-backend/CHANGELOG.md index 01d44965d8..d4f4747062 100644 --- a/plugins/airbrake-backend/CHANGELOG.md +++ b/plugins/airbrake-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-airbrake-backend +## 0.2.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.2.8 ### Patch Changes diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index d484e33ad1..ba9940b51c 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake-backend", - "version": "0.2.8", + "version": "0.2.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@types/express": "*", "express": "^4.17.1", @@ -33,11 +33,11 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index 9aeec07ae3..0a49e619e7 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-airbrake +## 0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/dev-utils@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index d27b1bb0ae..d75b4df303 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.3.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,11 +24,11 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/test-utils": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/app-defaults": "^1.0.5", - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/app-defaults": "^1.0.6-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -51,7 +51,7 @@ "@types/node": "^16.11.26", "@types/object-hash": "^2.2.1", "cross-fetch": "^3.1.5", - "msw": "^0.44.0", + "msw": "^0.45.0", "react-router": "6.0.0-beta.0" }, "files": [ diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index f93b59fbae..ff6a314a04 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-allure +## 0.1.25-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.24 ### Patch Changes diff --git a/plugins/allure/api-report.md b/plugins/allure/api-report.md index e6f5d2aa67..c1ce499ab2 100644 --- a/plugins/allure/api-report.md +++ b/plugins/allure/api-report.md @@ -9,13 +9,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ALLURE_PROJECT_ID_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ALLURE_PROJECT_ID_ANNOTATION = 'qameta.io/allure-project'; -// Warning: (ae-missing-release-tag) "allurePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const allurePlugin: BackstagePlugin< { @@ -25,13 +21,9 @@ export const allurePlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EntityAllureReportContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityAllureReportContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isAllureReportAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isAllureReportAvailable: (entity: Entity) => boolean; ``` diff --git a/plugins/allure/package.json b/plugins/allure/package.json index b79a1cee95..a336c3deff 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.24", + "version": "0.1.25-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,9 +26,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,17 +40,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/allure/src/components/annotationHelpers.ts b/plugins/allure/src/components/annotationHelpers.ts index 7500c1d88b..21b1a8161d 100644 --- a/plugins/allure/src/components/annotationHelpers.ts +++ b/plugins/allure/src/components/annotationHelpers.ts @@ -15,8 +15,10 @@ */ import { Entity } from '@backstage/catalog-model'; +/** @public */ export const ALLURE_PROJECT_ID_ANNOTATION = 'qameta.io/allure-project'; +/** @public */ export const isAllureReportAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[ALLURE_PROJECT_ID_ANNOTATION]); diff --git a/plugins/allure/src/plugin.ts b/plugins/allure/src/plugin.ts index a2eaa06a38..a6cfb25c88 100644 --- a/plugins/allure/src/plugin.ts +++ b/plugins/allure/src/plugin.ts @@ -26,6 +26,7 @@ export const allureRouteRef = createRouteRef({ id: 'allure', }); +/** @public */ export const allurePlugin = createPlugin({ id: 'allure', apis: [ @@ -42,6 +43,7 @@ export const allurePlugin = createPlugin({ }, }); +/** @public */ export const EntityAllureReportContent = allurePlugin.provide( createRoutableExtension({ name: 'EntityAllureReportContent', diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index 10ecbc4def..ee9f335a69 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-analytics-module-ga +## 0.1.20-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.1.19 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 4f9927585b..7425e2a612 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,8 +25,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -38,17 +38,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index 4306582b59..8bbdcc9847 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-apache-airflow +## 0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/apache-airflow/api-report.md b/plugins/apache-airflow/api-report.md index 428f3238e8..b427a0148e 100644 --- a/plugins/apache-airflow/api-report.md +++ b/plugins/apache-airflow/api-report.md @@ -9,19 +9,13 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; // @public -export const ApacheAirflowDagTable: ({ - dagIds, -}: { +export const ApacheAirflowDagTable: (props: { dagIds?: string[] | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "ApacheAirflowPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ApacheAirflowPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "apacheAirflowPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const apacheAirflowPlugin: BackstagePlugin< { diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 7625ff730c..7ef29990ea 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,8 +23,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -36,16 +36,16 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx b/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx index 2514d70d45..fcd87b2020 100644 --- a/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx +++ b/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx @@ -134,7 +134,8 @@ type DagTableComponentProps = { dagIds?: string[]; }; -export const DagTableComponent = ({ dagIds }: DagTableComponentProps) => { +export const DagTableComponent = (props: DagTableComponentProps) => { + const { dagIds } = props; const apiClient = useApi(apacheAirflowApiRef); const { value, loading, error } = useAsync(async (): Promise => { diff --git a/plugins/apache-airflow/src/plugin.ts b/plugins/apache-airflow/src/plugin.ts index 664cde36cc..4118857b05 100644 --- a/plugins/apache-airflow/src/plugin.ts +++ b/plugins/apache-airflow/src/plugin.ts @@ -25,6 +25,7 @@ import { discoveryApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const apacheAirflowPlugin = createPlugin({ id: 'apache-airflow', routes: { @@ -43,6 +44,7 @@ export const apacheAirflowPlugin = createPlugin({ ], }); +/** @public */ export const ApacheAirflowPage = apacheAirflowPlugin.provide( createRoutableExtension({ name: 'ApacheAirflowPage', diff --git a/plugins/api-docs-module-protoc-gen-doc/package.json b/plugins/api-docs-module-protoc-gen-doc/package.json index 925f81219f..3a1f00251c 100644 --- a/plugins/api-docs-module-protoc-gen-doc/package.json +++ b/plugins/api-docs-module-protoc-gen-doc/package.json @@ -37,7 +37,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@testing-library/jest-dom": "^5.16.4", "@types/react": "^16.13.1 || ^17.0.0" }, diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index 3d4dae36f1..b70e02a0ea 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-api-docs +## 0.8.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- c8bb0ff8ce: Minor cleanup of the public API surface to reduce the number of warnings +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + ## 0.8.8 ### Patch Changes diff --git a/plugins/api-docs/api-report.md b/plugins/api-docs/api-report.md index e32a529df2..0872d97355 100644 --- a/plugins/api-docs/api-report.md +++ b/plugins/api-docs/api-report.md @@ -17,13 +17,9 @@ import { TableColumn } from '@backstage/core-components'; import { TableProps } from '@backstage/core-components'; import { UserListFilterKind } from '@backstage/plugin-catalog-react'; -// Warning: (ae-missing-release-tag) "ApiDefinitionCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ApiDefinitionCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ApiDefinitionWidget = { type: string; @@ -32,14 +28,17 @@ export type ApiDefinitionWidget = { rawLanguage?: string; }; -// Warning: (ae-forgotten-export) The symbol "ApiDocsConfig" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "apiDocsConfigRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface ApiDocsConfig { + // (undocumented) + getApiDefinitionWidget: ( + apiEntity: ApiEntity, + ) => ApiDefinitionWidget | undefined; +} + // @public (undocumented) export const apiDocsConfigRef: ApiRef; -// Warning: (ae-missing-release-tag) "apiDocsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const apiDocsPlugin: BackstagePlugin< { @@ -58,54 +57,38 @@ export const ApiExplorerIndexPage: ( props: DefaultApiExplorerPageProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "ApiExplorerPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ApiExplorerPage: ( props: DefaultApiExplorerPageProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "ApiTypeTitle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ApiTypeTitle: ({ - apiEntity, -}: { - apiEntity: ApiEntity; -}) => JSX.Element; +export const ApiTypeTitle: (props: { apiEntity: ApiEntity }) => JSX.Element; -// Warning: (ae-missing-release-tag) "AsyncApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AsyncApiDefinitionWidget: ( props: AsyncApiDefinitionWidgetProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "AsyncApiDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AsyncApiDefinitionWidgetProps = { definition: string; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ConsumedApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ConsumedApisCard: ({ variant }: Props) => JSX.Element; +export const ConsumedApisCard: (props: { + variant?: InfoCardVariants; +}) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ConsumingComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ConsumingComponentsCard: ({ variant }: Props_4) => JSX.Element; +export const ConsumingComponentsCard: (props: { + variant?: InfoCardVariants; +}) => JSX.Element; // @public -export const DefaultApiExplorerPage: ({ - initiallySelectedFilter, - columns, - actions, -}: DefaultApiExplorerPageProps) => JSX.Element; +export const DefaultApiExplorerPage: ( + props: DefaultApiExplorerPageProps, +) => JSX.Element; // @public export type DefaultApiExplorerPageProps = { @@ -114,119 +97,80 @@ export type DefaultApiExplorerPageProps = { actions?: TableProps['actions']; }; -// Warning: (ae-missing-release-tag) "defaultDefinitionWidgets" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function defaultDefinitionWidgets(): ApiDefinitionWidget[]; -// Warning: (ae-missing-release-tag) "EntityApiDefinitionCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityApiDefinitionCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityConsumedApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityConsumedApisCard: ({ - variant, -}: { +export const EntityConsumedApisCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityConsumingComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityConsumingComponentsCard: ({ - variant, -}: { +export const EntityConsumingComponentsCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityHasApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityHasApisCard: ({ - variant, -}: { +export const EntityHasApisCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityProvidedApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityProvidedApisCard: ({ - variant, -}: { +export const EntityProvidedApisCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityProvidingComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityProvidingComponentsCard: ({ - variant, -}: { +export const EntityProvidingComponentsCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "GraphQlDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GraphQlDefinitionWidget: ( props: GraphQlDefinitionWidgetProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "GraphQlDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GraphQlDefinitionWidgetProps = { definition: string; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "HasApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const HasApisCard: ({ variant }: Props_2) => JSX.Element; +export const HasApisCard: (props: { + variant?: InfoCardVariants; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "OpenApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const OpenApiDefinitionWidget: ( props: OpenApiDefinitionWidgetProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "OpenApiDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OpenApiDefinitionWidgetProps = { definition: string; }; -// Warning: (ae-missing-release-tag) "PlainApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const PlainApiDefinitionWidget: ( props: PlainApiDefinitionWidgetProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "PlainApiDefinitionWidgetProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PlainApiDefinitionWidgetProps = { definition: any; language: string; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ProvidedApisCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ProvidedApisCard: ({ variant }: Props_3) => JSX.Element; +export const ProvidedApisCard: (props: { + variant?: InfoCardVariants; +}) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ProvidingComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ProvidingComponentsCard: ({ variant }: Props_5) => JSX.Element; +export const ProvidingComponentsCard: (props: { + variant?: InfoCardVariants; +}) => JSX.Element; ``` diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 8e2b400f91..ddf87f3ff7 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.8.8", + "version": "0.8.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,10 +35,10 @@ "dependencies": { "@asyncapi/react-component": "1.0.0-next.40", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -68,7 +68,7 @@ "@types/node": "^16.11.26", "@types/swagger-ui-react": "^4.1.1", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionCard.tsx b/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionCard.tsx index 353b973626..679069f209 100644 --- a/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionCard.tsx +++ b/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionCard.tsx @@ -24,6 +24,7 @@ import { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget'; import { CardTab, TabbedCard } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; +/** @public */ export const ApiDefinitionCard = () => { const { entity } = useEntity(); const config = useApi(apiDocsConfigRef); diff --git a/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx b/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx index 3b7aa406d4..03a56eaa78 100644 --- a/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx @@ -19,6 +19,7 @@ import { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget'; import { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget'; import { GrpcApiDefinitionWidget } from '../GrpcApiDefinitionWidget'; +/** @public */ export type ApiDefinitionWidget = { type: string; title: string; @@ -26,6 +27,7 @@ export type ApiDefinitionWidget = { rawLanguage?: string; }; +/** @public */ export function defaultDefinitionWidgets(): ApiDefinitionWidget[] { return [ { diff --git a/plugins/api-docs/src/components/ApiDefinitionCard/ApiTypeTitle.tsx b/plugins/api-docs/src/components/ApiDefinitionCard/ApiTypeTitle.tsx index 787c91f12b..93ab7cc05a 100644 --- a/plugins/api-docs/src/components/ApiDefinitionCard/ApiTypeTitle.tsx +++ b/plugins/api-docs/src/components/ApiDefinitionCard/ApiTypeTitle.tsx @@ -19,7 +19,11 @@ import React from 'react'; import { apiDocsConfigRef } from '../../config'; import { useApi } from '@backstage/core-plugin-api'; -export const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => { +/** + * @public + */ +export const ApiTypeTitle = (props: { apiEntity: ApiEntity }) => { + const { apiEntity } = props; const config = useApi(apiDocsConfigRef); const definition = config.getApiDefinitionWidget(apiEntity); const type = definition ? definition.title : apiEntity.spec.type; diff --git a/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx b/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx index b0acd3567c..ad43205c5f 100644 --- a/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx +++ b/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx @@ -64,11 +64,9 @@ export type DefaultApiExplorerPageProps = { * DefaultApiExplorerPage * @public */ -export const DefaultApiExplorerPage = ({ - initiallySelectedFilter = 'all', - columns, - actions, -}: DefaultApiExplorerPageProps) => { +export const DefaultApiExplorerPage = (props: DefaultApiExplorerPageProps) => { + const { initiallySelectedFilter = 'all', columns, actions } = props; + const configApi = useApi(configApiRef); const generatedSubtitle = `${ configApi.getOptionalString('organization.name') ?? 'Backstage' diff --git a/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.tsx b/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.tsx index fde41425c9..588e62ceb7 100644 --- a/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.tsx +++ b/plugins/api-docs/src/components/ApisCards/ConsumedApisCard.tsx @@ -32,11 +32,11 @@ import { WarningPanel, } from '@backstage/core-components'; -type Props = { - variant?: InfoCardVariants; -}; - -export const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => { +/** + * @public + */ +export const ConsumedApisCard = (props: { variant?: InfoCardVariants }) => { + const { variant = 'gridItem' } = props; const { entity } = useEntity(); const { entities, loading, error } = useRelatedEntities(entity, { type: RELATION_CONSUMES_API, diff --git a/plugins/api-docs/src/components/ApisCards/HasApisCard.tsx b/plugins/api-docs/src/components/ApisCards/HasApisCard.tsx index bb22f82269..b09cafacda 100644 --- a/plugins/api-docs/src/components/ApisCards/HasApisCard.tsx +++ b/plugins/api-docs/src/components/ApisCards/HasApisCard.tsx @@ -33,10 +33,6 @@ import { WarningPanel, } from '@backstage/core-components'; -type Props = { - variant?: InfoCardVariants; -}; - const columns: TableColumn[] = [ EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }), EntityTable.columns.createOwnerColumn(), @@ -45,7 +41,11 @@ const columns: TableColumn[] = [ EntityTable.columns.createMetadataDescriptionColumn(), ]; -export const HasApisCard = ({ variant = 'gridItem' }: Props) => { +/** + * @public + */ +export const HasApisCard = (props: { variant?: InfoCardVariants }) => { + const { variant = 'gridItem' } = props; const { entity } = useEntity(); const { entities, loading, error } = useRelatedEntities(entity, { type: RELATION_HAS_PART, diff --git a/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.tsx b/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.tsx index 6ffb6365d2..e9c63d9956 100644 --- a/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.tsx +++ b/plugins/api-docs/src/components/ApisCards/ProvidedApisCard.tsx @@ -32,11 +32,11 @@ import { WarningPanel, } from '@backstage/core-components'; -type Props = { - variant?: InfoCardVariants; -}; - -export const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => { +/** + * @public + */ +export const ProvidedApisCard = (props: { variant?: InfoCardVariants }) => { + const { variant = 'gridItem' } = props; const { entity } = useEntity(); const { entities, loading, error } = useRelatedEntities(entity, { type: RELATION_PROVIDES_API, diff --git a/plugins/api-docs/src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx b/plugins/api-docs/src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx index 03bc6fa8a6..2e8710b008 100644 --- a/plugins/api-docs/src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx @@ -25,10 +25,12 @@ const LazyAsyncApiDefinition = React.lazy(() => })), ); +/** @public */ export type AsyncApiDefinitionWidgetProps = { definition: string; }; +/** @public */ export const AsyncApiDefinitionWidget = ( props: AsyncApiDefinitionWidgetProps, ) => { diff --git a/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.tsx b/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.tsx index af3dcb7204..aa6afc7822 100644 --- a/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.tsx +++ b/plugins/api-docs/src/components/ComponentsCards/ConsumingComponentsCard.tsx @@ -34,11 +34,13 @@ import { WarningPanel, } from '@backstage/core-components'; -type Props = { +/** + * @public + */ +export const ConsumingComponentsCard = (props: { variant?: InfoCardVariants; -}; - -export const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => { +}) => { + const { variant = 'gridItem' } = props; const { entity } = useEntity(); const { entities, loading, error } = useRelatedEntities(entity, { type: RELATION_API_CONSUMED_BY, diff --git a/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.tsx b/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.tsx index 0be746de6d..435021e008 100644 --- a/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.tsx +++ b/plugins/api-docs/src/components/ComponentsCards/ProvidingComponentsCard.tsx @@ -34,11 +34,11 @@ import { WarningPanel, } from '@backstage/core-components'; -type Props = { +/** @public */ +export const ProvidingComponentsCard = (props: { variant?: InfoCardVariants; -}; - -export const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => { +}) => { + const { variant = 'gridItem' } = props; const { entity } = useEntity(); const { entities, loading, error } = useRelatedEntities(entity, { type: RELATION_API_PROVIDED_BY, diff --git a/plugins/api-docs/src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx b/plugins/api-docs/src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx index 1f8a796249..b5cf06e828 100644 --- a/plugins/api-docs/src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx @@ -25,10 +25,12 @@ const LazyGraphQlDefinition = React.lazy(() => })), ); +/** @public */ export type GraphQlDefinitionWidgetProps = { definition: string; }; +/** @public */ export const GraphQlDefinitionWidget = ( props: GraphQlDefinitionWidgetProps, ) => { diff --git a/plugins/api-docs/src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.tsx b/plugins/api-docs/src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.tsx index c5f9b071ef..b6bf317099 100644 --- a/plugins/api-docs/src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.tsx @@ -19,10 +19,12 @@ import { CodeSnippet } from '@backstage/core-components'; import { useTheme } from '@material-ui/core/styles'; import { BackstageTheme } from '@backstage/theme'; +/** @public */ export type GrpcApiDefinitionWidgetProps = { definition: string; }; +/** @public */ export const GrpcApiDefinitionWidget = ( props: GrpcApiDefinitionWidgetProps, ) => { diff --git a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx index 606e476454..424a52136b 100644 --- a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx @@ -25,10 +25,12 @@ const LazyOpenApiDefinition = React.lazy(() => })), ); +/** @public */ export type OpenApiDefinitionWidgetProps = { definition: string; }; +/** @public */ export const OpenApiDefinitionWidget = ( props: OpenApiDefinitionWidgetProps, ) => { diff --git a/plugins/api-docs/src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx b/plugins/api-docs/src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx index b7f1e8afc0..c7d7d83c8d 100644 --- a/plugins/api-docs/src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx @@ -17,11 +17,13 @@ import React from 'react'; import { CodeSnippet } from '@backstage/core-components'; +/** @public */ export type PlainApiDefinitionWidgetProps = { definition: any; language: string; }; +/** @public */ export const PlainApiDefinitionWidget = ( props: PlainApiDefinitionWidgetProps, ) => { diff --git a/plugins/api-docs/src/config.ts b/plugins/api-docs/src/config.ts index 979340164b..4d1e650720 100644 --- a/plugins/api-docs/src/config.ts +++ b/plugins/api-docs/src/config.ts @@ -18,10 +18,12 @@ import { ApiEntity } from '@backstage/catalog-model'; import { ApiDefinitionWidget } from './components/ApiDefinitionCard/ApiDefinitionWidget'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const apiDocsConfigRef = createApiRef({ id: 'plugin.api-docs.config', }); +/** @public */ export interface ApiDocsConfig { getApiDefinitionWidget: ( apiEntity: ApiEntity, diff --git a/plugins/api-docs/src/index.ts b/plugins/api-docs/src/index.ts index fe98e9c70e..49b2805aad 100644 --- a/plugins/api-docs/src/index.ts +++ b/plugins/api-docs/src/index.ts @@ -21,6 +21,7 @@ */ export * from './components'; +export type { ApiDocsConfig } from './config'; export { apiDocsConfigRef } from './config'; export { apiDocsPlugin, diff --git a/plugins/api-docs/src/plugin.ts b/plugins/api-docs/src/plugin.ts index f1928f4443..cabe2d82cd 100644 --- a/plugins/api-docs/src/plugin.ts +++ b/plugins/api-docs/src/plugin.ts @@ -25,6 +25,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const apiDocsPlugin = createPlugin({ id: 'api-docs', routes: { @@ -49,6 +50,7 @@ export const apiDocsPlugin = createPlugin({ }, }); +/** @public */ export const ApiExplorerPage = apiDocsPlugin.provide( createRoutableExtension({ name: 'ApiExplorerPage', @@ -58,6 +60,7 @@ export const ApiExplorerPage = apiDocsPlugin.provide( }), ); +/** @public */ export const EntityApiDefinitionCard = apiDocsPlugin.provide( createComponentExtension({ name: 'EntityApiDefinitionCard', @@ -68,6 +71,7 @@ export const EntityApiDefinitionCard = apiDocsPlugin.provide( }), ); +/** @public */ export const EntityConsumedApisCard = apiDocsPlugin.provide( createComponentExtension({ name: 'EntityConsumedApisCard', @@ -78,6 +82,7 @@ export const EntityConsumedApisCard = apiDocsPlugin.provide( }), ); +/** @public */ export const EntityConsumingComponentsCard = apiDocsPlugin.provide( createComponentExtension({ name: 'EntityConsumingComponentsCard', @@ -90,6 +95,7 @@ export const EntityConsumingComponentsCard = apiDocsPlugin.provide( }), ); +/** @public */ export const EntityProvidedApisCard = apiDocsPlugin.provide( createComponentExtension({ name: 'EntityProvidedApisCard', @@ -100,6 +106,7 @@ export const EntityProvidedApisCard = apiDocsPlugin.provide( }), ); +/** @public */ export const EntityProvidingComponentsCard = apiDocsPlugin.provide( createComponentExtension({ name: 'EntityProvidingComponentsCard', @@ -112,6 +119,7 @@ export const EntityProvidingComponentsCard = apiDocsPlugin.provide( }), ); +/** @public */ export const EntityHasApisCard = apiDocsPlugin.provide( createComponentExtension({ name: 'EntityHasApisCard', diff --git a/plugins/apollo-explorer/CHANGELOG.md b/plugins/apollo-explorer/CHANGELOG.md index fbe32ec2db..601f2d7864 100644 --- a/plugins/apollo-explorer/CHANGELOG.md +++ b/plugins/apollo-explorer/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-apollo-explorer +## 0.1.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/apollo-explorer/api-report.md b/plugins/apollo-explorer/api-report.md index 80dae62e60..1d3b41eac1 100644 --- a/plugins/apollo-explorer/api-report.md +++ b/plugins/apollo-explorer/api-report.md @@ -10,11 +10,7 @@ import { JSONObject } from '@apollo/explorer/src/helpers/types'; import { RouteRef } from '@backstage/core-plugin-api'; // @public -export const ApolloExplorerPage: ({ - title, - subtitle, - endpoints, -}: { +export const ApolloExplorerPage: (props: { title?: string | undefined; subtitle?: string | undefined; endpoints: { diff --git a/plugins/apollo-explorer/package.json b/plugins/apollo-explorer/package.json index 50e66504c6..6d01a37e3e 100644 --- a/plugins/apollo-explorer/package.json +++ b/plugins/apollo-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apollo-explorer", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,8 +22,8 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", @@ -36,16 +36,16 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "*", "@types/node": "*", - "msw": "^0.43.0", + "msw": "^0.45.0", "cross-fetch": "^3.1.5" }, "files": [ diff --git a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx index c2c02fc646..f90af9bc17 100644 --- a/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx +++ b/plugins/apollo-explorer/src/components/ApolloExplorerPage/ApolloExplorerPage.tsx @@ -41,7 +41,8 @@ type Props = { endpoints: EndpointProps[]; }; -export const ApolloExplorerPage = ({ title, subtitle, endpoints }: Props) => { +export const ApolloExplorerPage = (props: Props) => { + const { title, subtitle, endpoints } = props; return (
diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 33845eb9c7..cc6057464d 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-app-backend +## 0.3.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/config-loader@1.1.4-next.0 + ## 0.3.35 ### Patch Changes diff --git a/plugins/app-backend/api-report.md b/plugins/app-backend/api-report.md index e1b0c63469..0383129823 100644 --- a/plugins/app-backend/api-report.md +++ b/plugins/app-backend/api-report.md @@ -8,13 +8,9 @@ import express from 'express'; import { Logger } from 'winston'; import { PluginDatabaseManager } from '@backstage/backend-common'; -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { appPackageName: string; diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 4d862f02c0..d6b5c1ea26 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.35", + "version": "0.3.36-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,8 +33,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/config-loader": "^1.1.3", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/config-loader": "^1.1.4-next.0", "@backstage/config": "^1.0.1", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", @@ -50,12 +50,12 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@backstage/types": "^1.0.0", "@types/supertest": "^2.0.8", "mock-fs": "^5.1.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts b/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts index 95de905e7a..3d0973e18c 100644 --- a/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts +++ b/plugins/app-backend/src/lib/assets/StaticAssetsStore.test.ts @@ -14,12 +14,25 @@ * limitations under the License. */ +import { Knex as KnexType } from 'knex'; import { getVoidLogger } from '@backstage/backend-common'; import { TestDatabases } from '@backstage/backend-test-utils'; import { StaticAssetsStore } from './StaticAssetsStore'; const logger = getVoidLogger(); +function createDatabaseManager( + client: KnexType, + skipMigrations: boolean = false, +) { + return { + getClient: async () => client, + migrations: { + skip: skipMigrations, + }, + }; +} + describe('StaticAssetsStore', () => { const databases = TestDatabases.create({ ids: ['POSTGRES_13', 'POSTGRES_9', 'SQLITE_3'], @@ -28,9 +41,11 @@ describe('StaticAssetsStore', () => { it.each(databases.eachSupportedId())( 'should store and retrieve assets, %p', async databaseId => { + const client = await databases.init(databaseId); + const database = createDatabaseManager(client); const store = await StaticAssetsStore.create({ logger, - database: await databases.init(databaseId), + database, }); await store.storeAssets([ @@ -69,9 +84,11 @@ describe('StaticAssetsStore', () => { it.each(databases.eachSupportedId())( 'should update assets timestamps, but not contents, %p', async databaseId => { + const client = await databases.init(databaseId); + const database = createDatabaseManager(client); const store = await StaticAssetsStore.create({ logger, - database: await databases.init(databaseId), + database, }); await store.storeAssets([ @@ -119,7 +136,8 @@ describe('StaticAssetsStore', () => { it.each(databases.eachSupportedId())( 'should trim old assets, %p', async databaseId => { - const database = await databases.init(databaseId); + const knex = await databases.init(databaseId); + const database = createDatabaseManager(knex); const store = await StaticAssetsStore.create({ logger, database, @@ -137,12 +155,12 @@ describe('StaticAssetsStore', () => { ]); // Rewrite modified time of "old" to be 1h in the past - const updated = await database('static_assets_cache') + const updated = await knex('static_assets_cache') .where({ path: 'old' }) .update({ - last_modified_at: database.client.config.client.includes('sqlite3') - ? database.raw(`datetime('now', '-3600 seconds')`) - : database.raw(`now() + interval '-3600 seconds'`), + last_modified_at: knex.client.config.client.includes('sqlite3') + ? knex.raw(`datetime('now', '-3600 seconds')`) + : knex.raw(`now() + interval '-3600 seconds'`), }); expect(updated).toBe(1); diff --git a/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts b/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts index 70d664307e..6905d63779 100644 --- a/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts +++ b/plugins/app-backend/src/lib/assets/StaticAssetsStore.ts @@ -14,7 +14,10 @@ * limitations under the License. */ -import { resolvePackagePath } from '@backstage/backend-common'; +import { + PluginDatabaseManager, + resolvePackagePath, +} from '@backstage/backend-common'; import { Knex } from 'knex'; import { Logger } from 'winston'; import { DateTime } from 'luxon'; @@ -34,7 +37,7 @@ interface StaticAssetRow { /** @internal */ export interface StaticAssetsStoreOptions { - database: Knex; + database: PluginDatabaseManager; logger: Logger; } @@ -48,15 +51,21 @@ export class StaticAssetsStore implements StaticAssetProvider { #logger: Logger; static async create(options: StaticAssetsStoreOptions) { - await options.database.migrate.latest({ - directory: migrationsDir, - }); - return new StaticAssetsStore(options); + const { database } = options; + const client = await database.getClient(); + + if (!database.migrations?.skip) { + await client.migrate.latest({ + directory: migrationsDir, + }); + } + + return new StaticAssetsStore(client, options.logger); } - private constructor(options: StaticAssetsStoreOptions) { - this.#db = options.database; - this.#logger = options.logger; + private constructor(client: Knex, logger: Logger) { + this.#db = client; + this.#logger = logger; } /** diff --git a/plugins/app-backend/src/service/router.ts b/plugins/app-backend/src/service/router.ts index b666f323db..de299fd895 100644 --- a/plugins/app-backend/src/service/router.ts +++ b/plugins/app-backend/src/service/router.ts @@ -40,6 +40,7 @@ import { // express uses mime v1 while we only have types for mime v2 type Mime = { lookup(arg0: string): string }; +/** @public */ export interface RouterOptions { config: Config; logger: Logger; @@ -85,6 +86,7 @@ export interface RouterOptions { disableConfigInjection?: boolean; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { @@ -130,7 +132,7 @@ export async function createRouter( if (options.database) { const store = await StaticAssetsStore.create({ logger, - database: await options.database.getClient(), + database: options.database, }); const assets = await findStaticAssets(staticDir); diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 43460df12f..2a2eef0c41 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-backend +## 0.15.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + ## 0.15.1 ### Patch Changes diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 649a31c963..d47abeee83 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -24,26 +24,6 @@ import { TokenSet } from 'openid-client'; import { UserEntity } from '@backstage/catalog-model'; import { UserinfoResponse } from 'openid-client'; -// @public @deprecated (undocumented) -export class AtlassianAuthProvider implements OAuthHandlers { - // Warning: (ae-forgotten-export) The symbol "AtlassianAuthProviderOptions" needs to be exported by the entry point index.d.ts - constructor(options: AtlassianAuthProviderOptions); - // (undocumented) - handler(req: express.Request): Promise<{ - response: OAuthResponse; - refreshToken: string | undefined; - }>; - // (undocumented) - refresh(req: OAuthRefreshRequest): Promise<{ - response: OAuthResponse; - refreshToken: string | undefined; - }>; - // Warning: (ae-forgotten-export) The symbol "RedirectInfo" needs to be exported by the entry point index.d.ts - // - // (undocumented) - start(req: OAuthStartRequest): Promise; -} - // @public export type AuthHandler = ( input: TAuthResult, @@ -63,8 +43,6 @@ export type AuthProviderConfig = { cookieConfigurer?: CookieConfigurer; }; -// Warning: (ae-missing-release-tag) "AuthProviderFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AuthProviderFactory = (options: { providerId: string; @@ -74,8 +52,6 @@ export type AuthProviderFactory = (options: { resolverContext: AuthResolverContext; }) => AuthProviderRouteHandlers; -// Warning: (ae-missing-release-tag) "AuthProviderRouteHandlers" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AuthProviderRouteHandlers { frameHandler(req: express.Request, res: express.Response): Promise; @@ -129,8 +105,6 @@ export type AwsAlbResult = { accessToken: string; }; -// Warning: (ae-missing-release-tag) "BitbucketOAuthResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BitbucketOAuthResult = { fullProfile: BitbucketPassportProfile; @@ -143,8 +117,6 @@ export type BitbucketOAuthResult = { refreshToken?: string; }; -// Warning: (ae-missing-release-tag) "BitbucketPassportProfile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BitbucketPassportProfile = Profile & { id?: string; @@ -160,15 +132,14 @@ export type BitbucketPassportProfile = Profile & { }; }; -// Warning: (ae-missing-release-tag) "CatalogIdentityClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class CatalogIdentityClient { constructor(options: { catalogApi: CatalogApi; tokenManager: TokenManager }); - // Warning: (ae-forgotten-export) The symbol "UserQuery" needs to be exported by the entry point index.d.ts - findUser(query: UserQuery): Promise; - // Warning: (ae-forgotten-export) The symbol "MemberClaimQuery" needs to be exported by the entry point index.d.ts - resolveCatalogMembership(query: MemberClaimQuery): Promise; + findUser(query: { annotations: Record }): Promise; + resolveCatalogMembership(query: { + entityRefs: string[]; + logger?: Logger; + }): Promise; } // @public @@ -204,6 +175,7 @@ export type CloudflareAccessResult = { claims: CloudflareAccessClaims; cfIdentity: CloudflareAccessIdentityProfile; expiresInSeconds?: number; + token: string; }; // @public @@ -217,8 +189,6 @@ export type CookieConfigurer = (ctx: { secure: boolean; }; -// Warning: (ae-missing-release-tag) "createAuthProviderIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function createAuthProviderIntegration< TCreateOptions extends unknown[], @@ -233,13 +203,9 @@ export function createAuthProviderIntegration< resolvers: Readonly; }>; -// Warning: (ae-missing-release-tag) "createOriginFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createOriginFilter(config: Config): (origin: string) => boolean; -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; @@ -248,13 +214,9 @@ export const defaultAuthProviderFactories: { [providerId: string]: AuthProviderFactory; }; -// Warning: (ae-missing-release-tag) "encodeState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const encodeState: (state: OAuthState) => string; -// Warning: (ae-missing-release-tag) "ensuresXRequestedWith" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ensuresXRequestedWith: (req: express.Request) => boolean; @@ -273,8 +235,6 @@ export type GcpIapTokenInfo = { // @public export function getDefaultOwnershipEntityRefs(entity: Entity): string[]; -// Warning: (ae-missing-release-tag) "GithubOAuthResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GithubOAuthResult = { fullProfile: Profile; @@ -295,20 +255,19 @@ export type OAuth2ProxyResult = { getHeader(name: string): string | undefined; }; -// Warning: (ae-missing-release-tag) "OAuthAdapter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class OAuthAdapter implements AuthProviderRouteHandlers { - constructor(handlers: OAuthHandlers, options: Options); + constructor(handlers: OAuthHandlers, options: OAuthAdapterOptions); // (undocumented) frameHandler(req: express.Request, res: express.Response): Promise; - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - // // (undocumented) static fromConfig( config: AuthProviderConfig, handlers: OAuthHandlers, - options: Pick, + options: Pick< + OAuthAdapterOptions, + 'providerId' | 'persistScopes' | 'callbackUrl' + >, ): OAuthAdapter; // (undocumented) logout(req: express.Request, res: express.Response): Promise; @@ -318,8 +277,18 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { start(req: express.Request, res: express.Response): Promise; } -// Warning: (ae-missing-release-tag) "OAuthEnvironmentHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type OAuthAdapterOptions = { + providerId: string; + secure: boolean; + persistScopes?: boolean; + cookieDomain: string; + cookiePath: string; + appOrigin: string; + isOriginAllowed: (origin: string) => boolean; + callbackUrl: string; +}; + // @public (undocumented) export class OAuthEnvironmentHandler implements AuthProviderRouteHandlers { constructor(handlers: Map); @@ -349,11 +318,9 @@ export interface OAuthHandlers { response: OAuthResponse; refreshToken?: string; }>; - start(req: OAuthStartRequest): Promise; + start(req: OAuthStartRequest): Promise; } -// Warning: (ae-missing-release-tag) "OAuthProviderInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OAuthProviderInfo = { accessToken: string; @@ -362,8 +329,6 @@ export type OAuthProviderInfo = { scope: string; }; -// Warning: (ae-missing-release-tag) "OAuthProviderOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type OAuthProviderOptions = { clientId: string; @@ -371,8 +336,6 @@ export type OAuthProviderOptions = { callbackUrl: string; }; -// Warning: (ae-missing-release-tag) "OAuthRefreshRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OAuthRefreshRequest = express.Request<{}> & { scope: string; @@ -386,8 +349,6 @@ export type OAuthResponse = { backstageIdentity?: BackstageSignInResult; }; -// Warning: (ae-missing-release-tag) "OAuthResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OAuthResult = { fullProfile: Profile; @@ -400,16 +361,18 @@ export type OAuthResult = { refreshToken?: string; }; -// Warning: (ae-missing-release-tag) "OAuthStartRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type OAuthStartRequest = express.Request<{}> & { scope: string; state: OAuthState; }; -// Warning: (ae-missing-release-tag) "OAuthState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type OAuthStartResponse = { + url: string; + status?: number; +}; + // @public (undocumented) export type OAuthState = { nonce: string; @@ -424,8 +387,6 @@ export type OidcAuthResult = { userinfo: UserinfoResponse; }; -// Warning: (ae-missing-release-tag) "postMessageResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const postMessageResponse: ( res: express.Response, @@ -445,6 +406,11 @@ export type ProfileInfo = { picture?: string; }; +// @public (undocumented) +export type ProviderFactories = { + [s: string]: AuthProviderFactory; +}; + // @public export const providers: Readonly<{ atlassian: Readonly<{ @@ -692,13 +658,9 @@ export const providers: Readonly<{ }>; }>; -// Warning: (ae-missing-release-tag) "readState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const readState: (stateString: string) => OAuthState; -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { // (undocumented) @@ -709,8 +671,6 @@ export interface RouterOptions { discovery: PluginEndpointDiscovery; // (undocumented) logger: Logger; - // Warning: (ae-forgotten-export) The symbol "ProviderFactories" needs to be exported by the entry point index.d.ts - // // (undocumented) providerFactories?: ProviderFactories; // (undocumented) @@ -749,13 +709,9 @@ export type TokenParams = { }; }; -// Warning: (ae-missing-release-tag) "verifyNonce" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const verifyNonce: (req: express.Request, providerId: string) => void; -// Warning: (ae-missing-release-tag) "WebMessageResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type WebMessageResponse = | { diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 4628669c78..0450509674 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.15.1", + "version": "0.15.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,9 +33,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-auth-node": "^0.2.4", - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", @@ -76,8 +76,8 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", @@ -88,7 +88,7 @@ "@types/passport-saml": "^1.1.3", "@types/passport-strategy": "^0.2.35", "@types/xml2js": "^0.4.7", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.ts b/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.ts index 502da913af..494e8b4d38 100644 --- a/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.ts +++ b/plugins/auth-backend/src/lib/catalog/CatalogIdentityClient.ts @@ -26,17 +26,10 @@ import { } from '@backstage/catalog-model'; import { TokenManager } from '@backstage/backend-common'; -type UserQuery = { - annotations: Record; -}; - -type MemberClaimQuery = { - entityRefs: string[]; - logger?: Logger; -}; - /** * A catalog client tailored for reading out identity data from the catalog. + * + * @public */ export class CatalogIdentityClient { private readonly catalogApi: CatalogApi; @@ -52,7 +45,9 @@ export class CatalogIdentityClient { * * Throws a NotFoundError or ConflictError if 0 or multiple users are found. */ - async findUser(query: UserQuery): Promise { + async findUser(query: { + annotations: Record; + }): Promise { const filter: Record = { kind: 'user', }; @@ -81,7 +76,10 @@ export class CatalogIdentityClient { * * Returns a superset of the entity names that can be passed directly to `issueToken` as `ent`. */ - async resolveCatalogMembership(query: MemberClaimQuery): Promise { + async resolveCatalogMembership(query: { + entityRefs: string[]; + logger?: Logger; + }): Promise { const { entityRefs, logger } = query; const resolvedEntityRefs = entityRefs .map((ref: string) => { diff --git a/plugins/auth-backend/src/lib/flow/authFlowHelpers.ts b/plugins/auth-backend/src/lib/flow/authFlowHelpers.ts index a924c80242..94ac4fba15 100644 --- a/plugins/auth-backend/src/lib/flow/authFlowHelpers.ts +++ b/plugins/auth-backend/src/lib/flow/authFlowHelpers.ts @@ -24,6 +24,7 @@ export const safelyEncodeURIComponent = (value: string) => { return encodeURIComponent(value).replace(/'/g, '%27'); }; +/** @public */ export const postMessageResponse = ( res: express.Response, appOrigin: string, @@ -68,6 +69,7 @@ export const postMessageResponse = ( res.end(``); }; +/** @public */ export const ensuresXRequestedWith = (req: express.Request) => { const requiredHeader = req.header('X-Requested-With'); if (!requiredHeader || requiredHeader !== 'XMLHttpRequest') { diff --git a/plugins/auth-backend/src/lib/flow/types.ts b/plugins/auth-backend/src/lib/flow/types.ts index aaa8b55d1c..f67198a1b0 100644 --- a/plugins/auth-backend/src/lib/flow/types.ts +++ b/plugins/auth-backend/src/lib/flow/types.ts @@ -19,6 +19,8 @@ import { AuthResponse } from '../../providers/types'; /** * Payload sent as a post message after the auth request is complete. * If successful then has a valid payload with Auth information else contains an error. + * + * @public */ export type WebMessageResponse = | { diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts index 9c28ed8fad..6caa9fed12 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts @@ -44,7 +44,8 @@ import { prepareBackstageIdentityResponse } from '../../providers/prepareBacksta export const THOUSAND_DAYS_MS = 1000 * 24 * 60 * 60 * 1000; export const TEN_MINUTES_MS = 600 * 1000; -export type Options = { +/** @public */ +export type OAuthAdapterOptions = { providerId: string; secure: boolean; persistScopes?: boolean; @@ -54,11 +55,16 @@ export type Options = { isOriginAllowed: (origin: string) => boolean; callbackUrl: string; }; + +/** @public */ export class OAuthAdapter implements AuthProviderRouteHandlers { static fromConfig( config: AuthProviderConfig, handlers: OAuthHandlers, - options: Pick, + options: Pick< + OAuthAdapterOptions, + 'providerId' | 'persistScopes' | 'callbackUrl' + >, ): OAuthAdapter { const { origin: appOrigin } = new URL(config.appUrl); @@ -83,7 +89,7 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { constructor( private readonly handlers: OAuthHandlers, - private readonly options: Options, + private readonly options: OAuthAdapterOptions, ) { this.baseCookieOptions = { httpOnly: true, diff --git a/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts b/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts index 95a0547a5e..1c6d45d0a4 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthEnvironmentHandler.ts @@ -20,6 +20,7 @@ import { InputError, NotFoundError } from '@backstage/errors'; import { readState } from './helpers'; import { AuthProviderRouteHandlers } from '../../providers/types'; +/** @public */ export class OAuthEnvironmentHandler implements AuthProviderRouteHandlers { static mapConfig( config: Config, diff --git a/plugins/auth-backend/src/lib/oauth/helpers.ts b/plugins/auth-backend/src/lib/oauth/helpers.ts index eec25696a3..63d5d62ef9 100644 --- a/plugins/auth-backend/src/lib/oauth/helpers.ts +++ b/plugins/auth-backend/src/lib/oauth/helpers.ts @@ -19,6 +19,7 @@ import { OAuthState } from './types'; import pickBy from 'lodash/pickBy'; import { CookieConfigurer } from '../../providers/types'; +/** @public */ export const readState = (stateString: string): OAuthState => { const state = Object.fromEntries( new URLSearchParams(Buffer.from(stateString, 'hex').toString('utf-8')), @@ -35,6 +36,7 @@ export const readState = (stateString: string): OAuthState => { return state as OAuthState; }; +/** @public */ export const encodeState = (state: OAuthState): string => { const stateString = new URLSearchParams( pickBy(state, value => value !== undefined), @@ -43,6 +45,7 @@ export const encodeState = (state: OAuthState): string => { return Buffer.from(stateString, 'utf-8').toString('hex'); }; +/** @public */ export const verifyNonce = (req: express.Request, providerId: string) => { const cookieNonce = req.cookies[`${providerId}-nonce`]; const state: OAuthState = readState(req.query.state?.toString() ?? ''); diff --git a/plugins/auth-backend/src/lib/oauth/index.ts b/plugins/auth-backend/src/lib/oauth/index.ts index b7b37f5920..671e8e48e9 100644 --- a/plugins/auth-backend/src/lib/oauth/index.ts +++ b/plugins/auth-backend/src/lib/oauth/index.ts @@ -15,6 +15,7 @@ */ export { OAuthEnvironmentHandler } from './OAuthEnvironmentHandler'; +export type { OAuthAdapterOptions } from './OAuthAdapter'; export { OAuthAdapter } from './OAuthAdapter'; export { encodeState, verifyNonce, readState } from './helpers'; export type { diff --git a/plugins/auth-backend/src/lib/oauth/types.ts b/plugins/auth-backend/src/lib/oauth/types.ts index 6e5fe19859..e8b5282aad 100644 --- a/plugins/auth-backend/src/lib/oauth/types.ts +++ b/plugins/auth-backend/src/lib/oauth/types.ts @@ -17,10 +17,12 @@ import express from 'express'; import { Profile as PassportProfile } from 'passport'; import { BackstageSignInResult } from '@backstage/plugin-auth-node'; -import { RedirectInfo, ProfileInfo } from '../../providers/types'; +import { OAuthStartResponse, ProfileInfo } from '../../providers/types'; /** * Common options for passport.js-based OAuth providers + * + * @public */ export type OAuthProviderOptions = { /** @@ -37,6 +39,7 @@ export type OAuthProviderOptions = { callbackUrl: string; }; +/** @public */ export type OAuthResult = { fullProfile: PassportProfile; params: { @@ -59,6 +62,7 @@ export type OAuthResponse = { backstageIdentity?: BackstageSignInResult; }; +/** @public */ export type OAuthProviderInfo = { /** * An access token issued for the signed in user. @@ -78,6 +82,7 @@ export type OAuthProviderInfo = { scope: string; }; +/** @public */ export type OAuthState = { /* A type for the serialized value in the `state` parameter of the OAuth authorization flow */ @@ -87,11 +92,13 @@ export type OAuthState = { scope?: string; }; +/** @public */ export type OAuthStartRequest = express.Request<{}> & { scope: string; state: OAuthState; }; +/** @public */ export type OAuthRefreshRequest = express.Request<{}> & { scope: string; refreshToken: string; @@ -108,7 +115,7 @@ export interface OAuthHandlers { /** * Initiate a sign in request with an auth provider. */ - start(req: OAuthStartRequest): Promise; + start(req: OAuthStartRequest): Promise; /** * Handle the redirect from the auth provider when the user has signed in. diff --git a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts index 893be26852..660b96f018 100644 --- a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts +++ b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.test.ts @@ -33,7 +33,7 @@ describe('PassportStrategyHelper', () => { } describe('executeRedirectStrategy', () => { - it('should call authenticate and resolve with RedirectInfo', async () => { + it('should call authenticate and resolve with OAuthStartResponse', async () => { const mockStrategy = new MyCustomRedirectStrategy(); const spyAuthenticate = jest.spyOn(mockStrategy, 'authenticate'); const redirectStrategyPromise = executeRedirectStrategy( diff --git a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts index 6117736e21..16377f17f2 100644 --- a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts +++ b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts @@ -20,7 +20,7 @@ import jwtDecoder from 'jwt-decode'; import { InternalOAuthError } from 'passport-oauth2'; import { PassportProfile } from './types'; -import { ProfileInfo, RedirectInfo } from '../../providers/types'; +import { ProfileInfo, OAuthStartResponse } from '../../providers/types'; export type PassportDoneCallback = ( err?: Error, @@ -77,7 +77,7 @@ export const executeRedirectStrategy = async ( req: express.Request, providerStrategy: passport.Strategy, options: Record, -): Promise => { +): Promise => { return new Promise(resolve => { const strategy = Object.create(providerStrategy); strategy.redirect = (url: string, status?: number) => { diff --git a/plugins/auth-backend/src/providers/atlassian/index.ts b/plugins/auth-backend/src/providers/atlassian/index.ts index 8dff0197a3..f001463694 100644 --- a/plugins/auth-backend/src/providers/atlassian/index.ts +++ b/plugins/auth-backend/src/providers/atlassian/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export { atlassian, AtlassianAuthProvider } from './provider'; +export { atlassian } from './provider'; diff --git a/plugins/auth-backend/src/providers/atlassian/provider.test.ts b/plugins/auth-backend/src/providers/atlassian/provider.test.ts index c41a18aa22..1fb987d3b0 100644 --- a/plugins/auth-backend/src/providers/atlassian/provider.test.ts +++ b/plugins/auth-backend/src/providers/atlassian/provider.test.ts @@ -20,6 +20,14 @@ import { OAuthResult } from '../../lib/oauth'; import { PassportProfile } from '../../lib/passport/types'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/atlassian/provider.ts b/plugins/auth-backend/src/providers/atlassian/provider.ts index b693d226a2..e02d899fb1 100644 --- a/plugins/auth-backend/src/providers/atlassian/provider.ts +++ b/plugins/auth-backend/src/providers/atlassian/provider.ts @@ -38,12 +38,13 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import express from 'express'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; +/** @public */ export type AtlassianAuthProviderOptions = OAuthProviderOptions & { scopes: string; signInResolver?: SignInResolver; @@ -58,10 +59,6 @@ export const atlassianDefaultAuthHandler: AuthHandler = async ({ profile: makeProfileInfo(fullProfile, params.id_token), }); -/** - * @public - * @deprecated This export is deprecated and will be removed in the future. - */ export class AtlassianAuthProvider implements OAuthHandlers { private readonly _strategy: AtlassianStrategy; private readonly signInResolver?: SignInResolver; @@ -97,7 +94,7 @@ export class AtlassianAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { state: encodeState(req.state), }); diff --git a/plugins/auth-backend/src/providers/auth0/provider.ts b/plugins/auth-backend/src/providers/auth0/provider.ts index a53f504f50..8e0255ebe6 100644 --- a/plugins/auth-backend/src/providers/auth0/provider.ts +++ b/plugins/auth-backend/src/providers/auth0/provider.ts @@ -37,7 +37,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, AuthHandler, SignInResolver, AuthResolverContext, @@ -98,7 +98,7 @@ export class Auth0AuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/bitbucket/provider.test.ts b/plugins/auth-backend/src/providers/bitbucket/provider.test.ts index 9eeedc3d7b..503eccffbd 100644 --- a/plugins/auth-backend/src/providers/bitbucket/provider.test.ts +++ b/plugins/auth-backend/src/providers/bitbucket/provider.test.ts @@ -25,6 +25,14 @@ const mockFrameHandler = jest.spyOn( () => Promise<{ result: BitbucketOAuthResult; privateInfo: any }> >; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + describe('createBitbucketProvider', () => { it('should auth', async () => { const provider = new BitbucketAuthProvider({ diff --git a/plugins/auth-backend/src/providers/bitbucket/provider.ts b/plugins/auth-backend/src/providers/bitbucket/provider.ts index e3bd044466..cfa30e9a73 100644 --- a/plugins/auth-backend/src/providers/bitbucket/provider.ts +++ b/plugins/auth-backend/src/providers/bitbucket/provider.ts @@ -39,7 +39,7 @@ import { import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; import { AuthHandler, - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthResolverContext, } from '../types'; @@ -54,6 +54,7 @@ type Options = OAuthProviderOptions & { resolverContext: AuthResolverContext; }; +/** @public */ export type BitbucketOAuthResult = { fullProfile: BitbucketPassportProfile; params: { @@ -65,6 +66,7 @@ export type BitbucketOAuthResult = { refreshToken?: string; }; +/** @public */ export type BitbucketPassportProfile = PassportProfile & { id?: string; displayName?: string; @@ -119,7 +121,7 @@ export class BitbucketAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts b/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts index 21ec7371e5..7570eb9156 100644 --- a/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts +++ b/plugins/auth-backend/src/providers/cloudflare-access/provider.test.ts @@ -138,12 +138,28 @@ describe('CloudflareAccessAuthProvider', () => { const provider = new CloudflareAccessAuthProvider({ teamName: 'foobar', resolverContext: {} as AuthResolverContext, - authHandler: async ({ claims }) => ({ - profile: { - email: claims.email, - }, - }), - signInResolver: async () => { + authHandler: async result => { + expect(result).toEqual( + expect.objectContaining({ + claims: mockClaims, + cfIdentity: mockCfIdentity, + token: mockJwt, + }), + ); + return { + profile: { + email: result.claims.email, + }, + }; + }, + signInResolver: async ({ result }) => { + expect(result).toEqual( + expect.objectContaining({ + claims: mockClaims, + cfIdentity: mockCfIdentity, + token: mockJwt, + }), + ); return { token: 'eyblob.eyJzdWIiOiJ1c2VyOmRlZmF1bHQvamltbXltYXJrdW0iLCJlbnQiOlsidXNlcjpkZWZhdWx0L2ppbW15bWFya3VtIl19.eyblob', diff --git a/plugins/auth-backend/src/providers/cloudflare-access/provider.ts b/plugins/auth-backend/src/providers/cloudflare-access/provider.ts index a2c16fcebf..0d8f736550 100644 --- a/plugins/auth-backend/src/providers/cloudflare-access/provider.ts +++ b/plugins/auth-backend/src/providers/cloudflare-access/provider.ts @@ -146,13 +146,13 @@ export type CloudflareAccessIdentityProfile = { }; /** - * * @public */ export type CloudflareAccessResult = { claims: CloudflareAccessClaims; cfIdentity: CloudflareAccessIdentityProfile; expiresInSeconds?: number; + token: string; }; /** @@ -262,7 +262,11 @@ export class CloudflareAccessAuthProvider implements AuthProviderRouteHandlers { const sub = verifyResult.payload.sub; const cfAccessResultStr = await this.cache?.get(`${CACHE_PREFIX}/${sub}`); if (typeof cfAccessResultStr === 'string') { - return JSON.parse(cfAccessResultStr) as CloudflareAccessResult; + const result = JSON.parse(cfAccessResultStr) as CloudflareAccessResult; + return { + ...result, + token: jwt, + }; } const claims = verifyResult.payload as CloudflareAccessClaims; // Builds a passport profile from JWT claims first @@ -273,13 +277,16 @@ export class CloudflareAccessAuthProvider implements AuthProviderRouteHandlers { const cfIdentity = await this.getIdentityProfile(jwt); // Stores a stringified JSON object in cfaccess provider cache only when // we complete all steps - const cfAccessResult: CloudflareAccessResult = { + const cfAccessResult = { claims, cfIdentity, expiresInSeconds: claims.exp - claims.iat, }; this.cache?.set(`${CACHE_PREFIX}/${sub}`, JSON.stringify(cfAccessResult)); - return cfAccessResult; + return { + ...cfAccessResult, + token: jwt, + }; } catch (err) { throw new ForwardedError( 'Failed to populate access identity information', diff --git a/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts b/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts index c6e9107353..9143d63143 100644 --- a/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts +++ b/plugins/auth-backend/src/providers/createAuthProviderIntegration.ts @@ -22,6 +22,8 @@ import { AuthProviderFactory, SignInResolver } from './types'; * * The returned object facilitates the creation of provider instances, and * supplies built-in sign-in resolvers for the specific provider. + * + * @public */ export function createAuthProviderIntegration< TCreateOptions extends unknown[], diff --git a/plugins/auth-backend/src/providers/github/provider.test.ts b/plugins/auth-backend/src/providers/github/provider.test.ts index 18690a986b..ff750223d3 100644 --- a/plugins/auth-backend/src/providers/github/provider.test.ts +++ b/plugins/auth-backend/src/providers/github/provider.test.ts @@ -21,6 +21,15 @@ import { makeProfileInfo } from '../../lib/passport/PassportStrategyHelper'; import { OAuthStartRequest, encodeState } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + ...jest.requireActual('../../lib/passport/PassportStrategyHelper'), + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/github/provider.ts b/plugins/auth-backend/src/providers/github/provider.ts index 9c115b5eb8..7571b4a327 100644 --- a/plugins/auth-backend/src/providers/github/provider.ts +++ b/plugins/auth-backend/src/providers/github/provider.ts @@ -26,7 +26,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, AuthHandler, SignInResolver, StateEncoder, @@ -52,6 +52,7 @@ type PrivateInfo = { refreshToken?: string; }; +/** @public */ export type GithubOAuthResult = { fullProfile: PassportProfile; params: { @@ -106,7 +107,7 @@ export class GithubAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { scope: req.scope, state: (await this.stateEncoder(req)).encodedState, diff --git a/plugins/auth-backend/src/providers/gitlab/provider.test.ts b/plugins/auth-backend/src/providers/gitlab/provider.test.ts index 169930786b..f9e1442661 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.test.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.test.ts @@ -23,6 +23,14 @@ import { PassportProfile } from '../../lib/passport/types'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/gitlab/provider.ts b/plugins/auth-backend/src/providers/gitlab/provider.ts index c24c2e128d..7f5489d391 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.ts @@ -25,7 +25,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthHandler, AuthResolverContext, @@ -110,7 +110,7 @@ export class GitlabAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { scope: req.scope, state: encodeState(req.state), diff --git a/plugins/auth-backend/src/providers/google/provider.test.ts b/plugins/auth-backend/src/providers/google/provider.test.ts index 2e904c62ad..3c0b367be2 100644 --- a/plugins/auth-backend/src/providers/google/provider.test.ts +++ b/plugins/auth-backend/src/providers/google/provider.test.ts @@ -19,6 +19,14 @@ import * as helpers from '../../lib/passport/PassportStrategyHelper'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/google/provider.ts b/plugins/auth-backend/src/providers/google/provider.ts index f60d4e9947..7689cd1a3a 100644 --- a/plugins/auth-backend/src/providers/google/provider.ts +++ b/plugins/auth-backend/src/providers/google/provider.ts @@ -39,7 +39,7 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; @@ -98,7 +98,7 @@ export class GoogleAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this.strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/index.ts b/plugins/auth-backend/src/providers/index.ts index 83dd1c6c1f..67d3a62990 100644 --- a/plugins/auth-backend/src/providers/index.ts +++ b/plugins/auth-backend/src/providers/index.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -export { AtlassianAuthProvider } from './atlassian'; export type { AwsAlbResult } from './aws-alb'; export type { BitbucketOAuthResult, @@ -50,6 +49,7 @@ export type { StateEncoder, AuthResponse, ProfileInfo, + OAuthStartResponse, } from './types'; export { prepareBackstageIdentityResponse } from './prepareBackstageIdentityResponse'; diff --git a/plugins/auth-backend/src/providers/microsoft/provider.test.ts b/plugins/auth-backend/src/providers/microsoft/provider.test.ts index e9b4424a95..e4e919004c 100644 --- a/plugins/auth-backend/src/providers/microsoft/provider.test.ts +++ b/plugins/auth-backend/src/providers/microsoft/provider.test.ts @@ -23,6 +23,12 @@ import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/microsoft/provider.ts b/plugins/auth-backend/src/providers/microsoft/provider.ts index db79dba225..fd2a1529a7 100644 --- a/plugins/auth-backend/src/providers/microsoft/provider.ts +++ b/plugins/auth-backend/src/providers/microsoft/provider.ts @@ -38,7 +38,7 @@ import { } from '../../lib/passport'; import { AuthHandler, - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthResolverContext, } from '../types'; @@ -97,7 +97,7 @@ export class MicrosoftAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { scope: req.scope, state: encodeState(req.state), diff --git a/plugins/auth-backend/src/providers/oauth2/provider.test.ts b/plugins/auth-backend/src/providers/oauth2/provider.test.ts index 23e08dd729..9bdf7095f3 100644 --- a/plugins/auth-backend/src/providers/oauth2/provider.test.ts +++ b/plugins/auth-backend/src/providers/oauth2/provider.test.ts @@ -19,6 +19,14 @@ import * as helpers from '../../lib/passport/PassportStrategyHelper'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/oauth2/provider.ts b/plugins/auth-backend/src/providers/oauth2/provider.ts index 6fa649c421..3e7720b14a 100644 --- a/plugins/auth-backend/src/providers/oauth2/provider.ts +++ b/plugins/auth-backend/src/providers/oauth2/provider.ts @@ -39,7 +39,7 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; @@ -114,7 +114,7 @@ export class OAuth2AuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/oidc/provider.ts b/plugins/auth-backend/src/providers/oidc/provider.ts index eb963a3711..bce8ba843b 100644 --- a/plugins/auth-backend/src/providers/oidc/provider.ts +++ b/plugins/auth-backend/src/providers/oidc/provider.ts @@ -40,7 +40,7 @@ import { import { AuthHandler, AuthResolverContext, - RedirectInfo, + OAuthStartResponse, SignInResolver, } from '../types'; import { createAuthProviderIntegration } from '../createAuthProviderIntegration'; @@ -91,7 +91,7 @@ export class OidcAuthProvider implements OAuthHandlers { this.resolverContext = options.resolverContext; } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { const { strategy } = await this.implementation; const options: Record = { scope: req.scope || this.scope || 'openid profile email', diff --git a/plugins/auth-backend/src/providers/okta/provider.test.ts b/plugins/auth-backend/src/providers/okta/provider.test.ts index 468c4cdcc8..bc27129300 100644 --- a/plugins/auth-backend/src/providers/okta/provider.test.ts +++ b/plugins/auth-backend/src/providers/okta/provider.test.ts @@ -19,6 +19,14 @@ import * as helpers from '../../lib/passport/PassportStrategyHelper'; import { OAuthResult } from '../../lib/oauth'; import { AuthResolverContext } from '../types'; +jest.mock('../../lib/passport/PassportStrategyHelper', () => { + return { + executeFrameHandlerStrategy: jest.fn(), + executeRefreshTokenStrategy: jest.fn(), + executeFetchUserProfileStrategy: jest.fn(), + }; +}); + const mockFrameHandler = jest.spyOn( helpers, 'executeFrameHandlerStrategy', diff --git a/plugins/auth-backend/src/providers/okta/provider.ts b/plugins/auth-backend/src/providers/okta/provider.ts index cb686f17e9..05e0451bdb 100644 --- a/plugins/auth-backend/src/providers/okta/provider.ts +++ b/plugins/auth-backend/src/providers/okta/provider.ts @@ -38,7 +38,7 @@ import { } from '../../lib/passport'; import { AuthHandler, - RedirectInfo, + OAuthStartResponse, SignInResolver, AuthResolverContext, } from '../types'; @@ -125,7 +125,7 @@ export class OktaAuthProvider implements OAuthHandlers { ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this.strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index 59b57b3851..ac636f92cc 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -37,7 +37,7 @@ import { PassportDoneCallback, } from '../../lib/passport'; import { - RedirectInfo, + OAuthStartResponse, AuthHandler, SignInResolver, AuthResolverContext, @@ -95,7 +95,7 @@ export class OneLoginProvider implements OAuthHandlers { }, ); } - async start(req: OAuthStartRequest): Promise { + async start(req: OAuthStartRequest): Promise { return await executeRedirectStrategy(req, this._strategy, { accessType: 'offline', prompt: 'consent', diff --git a/plugins/auth-backend/src/providers/types.ts b/plugins/auth-backend/src/providers/types.ts index c99bdfbadb..574afade79 100644 --- a/plugins/auth-backend/src/providers/types.ts +++ b/plugins/auth-backend/src/providers/types.ts @@ -126,7 +126,8 @@ export type AuthProviderConfig = { cookieConfigurer?: CookieConfigurer; }; -export type RedirectInfo = { +/** @public */ +export type OAuthStartResponse = { /** * URL to redirect to */ @@ -147,6 +148,8 @@ export type RedirectInfo = { * `/auth/[provider]/handler/frame -> frameHandler` * `/auth/[provider]/refresh -> refresh` * `/auth/[provider]/logout -> logout` + * + * @public */ export interface AuthProviderRouteHandlers { /** @@ -192,6 +195,7 @@ export interface AuthProviderRouteHandlers { logout?(req: express.Request, res: express.Response): Promise; } +/** @public */ export type AuthProviderFactory = (options: { providerId: string; globalConfig: AuthProviderConfig; diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index e4fa5eeea4..8fd758f1b4 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -36,8 +36,10 @@ import passport from 'passport'; import { Minimatch } from 'minimatch'; import { CatalogAuthResolverContext } from '../lib/resolvers'; -type ProviderFactories = { [s: string]: AuthProviderFactory }; +/** @public */ +export type ProviderFactories = { [s: string]: AuthProviderFactory }; +/** @public */ export interface RouterOptions { logger: Logger; database: PluginDatabaseManager; @@ -48,6 +50,7 @@ export interface RouterOptions { providerFactories?: ProviderFactories; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { @@ -187,6 +190,7 @@ export async function createRouter( return router; } +/** @public */ export function createOriginFilter( config: Config, ): (origin: string) => boolean { diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index c01c24590d..f965e4ac8f 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-node +## 0.2.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.2.4 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index 2f1d2d6b8c..8390683a2f 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.2.4", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "express": "^4.17.1", @@ -33,9 +33,9 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "lodash": "^4.17.21", - "msw": "^0.44.0", + "msw": "^0.45.0", "uuid": "^8.0.0" }, "files": [ diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 5c8de9557e..239cf68d52 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,52 @@ # @backstage/plugin-azure-devops-backend +## 0.3.15-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- cb1cfc018b: `createRouter` now requires an additional reader: `UrlReader` argument + + ```diff + export default async function createPlugin( + env: PluginEnvironment, + ): Promise { + return createRouter({ + logger: env.logger, + config: env.config, + + reader: env.reader, + }); + } + ``` + + Remember to check if you have already provided these settings previously. + + #### [Azure DevOps] + + ```yaml + # app-config.yaml + azureDevOps: + host: dev.azure.com + token: my-token + organization: my-company + ``` + + #### [Azure Integrations] + + ```yaml + # app-config.yaml + integrations: + azure: + - host: dev.azure.com + token: ${AZURE_TOKEN} + ``` + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + ## 0.3.14 ### Patch Changes diff --git a/plugins/azure-devops-backend/api-report.md b/plugins/azure-devops-backend/api-report.md index eaebea4d7b..900b3c3d12 100644 --- a/plugins/azure-devops-backend/api-report.md +++ b/plugins/azure-devops-backend/api-report.md @@ -18,13 +18,12 @@ import { PullRequestOptions } from '@backstage/plugin-azure-devops-common'; import { RepoBuild } from '@backstage/plugin-azure-devops-common'; import { Team } from '@backstage/plugin-azure-devops-common'; import { TeamMember } from '@backstage/plugin-azure-devops-common'; +import { UrlReader } from '@backstage/backend-common'; import { WebApi } from 'azure-devops-node-api'; -// Warning: (ae-missing-release-tag) "AzureDevOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureDevOpsApi { - constructor(logger: Logger, webApi: WebApi); + constructor(logger: Logger, webApi: WebApi, urlReader: UrlReader); // (undocumented) getAllTeams(): Promise; // (undocumented) @@ -73,28 +72,31 @@ export class AzureDevOpsApi { options: PullRequestOptions, ): Promise; // (undocumented) + getReadme( + host: string, + org: string, + project: string, + repo: string, + ): Promise<{ + url: string; + content: string; + }>; + // (undocumented) getRepoBuilds( projectName: string, repoName: string, top: number, ): Promise; // (undocumented) - getTeamMembers({ - projectId, - teamId, - }: { + getTeamMembers(options: { projectId: string; teamId: string; }): Promise; } -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { // (undocumented) @@ -103,6 +105,8 @@ export interface RouterOptions { config: Config; // (undocumented) logger: Logger; + // (undocumented) + reader: UrlReader; } // (No @packageDocumentation comment for this package) diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index 467a3f7e5b..91c2992116 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.3.14", + "version": "0.3.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,22 +23,23 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", - "@backstage/plugin-azure-devops-common": "^0.2.4", + "@backstage/plugin-azure-devops-common": "^0.3.0-next.0", "@types/express": "^4.17.6", "azure-devops-node-api": "^11.0.1", "express": "^4.17.1", "express-promise-router": "^4.1.0", "p-limit": "^3.1.0", "winston": "^3.2.1", - "yn": "^4.0.0" + "yn": "^4.0.0", + "mime-types": "^2.1.27" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts index 240ba0b189..2bf2988a98 100644 --- a/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts +++ b/plugins/azure-devops-backend/src/api/AzureDevOpsApi.ts @@ -42,6 +42,8 @@ import { convertDashboardPullRequest, convertPolicy, getArtifactId, + replaceReadme, + buildEncodedUrl, } from '../utils'; import { TeamMember as AdoTeamMember } from 'azure-devops-node-api/interfaces/common/VSSInterfaces'; @@ -52,11 +54,14 @@ import { TeamProjectReference, WebApiTeam, } from 'azure-devops-node-api/interfaces/CoreInterfaces'; +import { UrlReader } from '@backstage/backend-common'; +/** @public */ export class AzureDevOpsApi { public constructor( private readonly logger: Logger, private readonly webApi: WebApi, + private readonly urlReader: UrlReader, ) {} public async getProjects(): Promise { @@ -73,6 +78,7 @@ export class AzureDevOpsApi { a.name && b.name ? a.name.localeCompare(b.name) : 0, ); } + public async getGitRepository( projectName: string, repoName: string, @@ -294,13 +300,11 @@ export class AzureDevOpsApi { ); } - public async getTeamMembers({ - projectId, - teamId, - }: { + public async getTeamMembers(options: { projectId: string; teamId: string; }): Promise { + const { projectId, teamId } = options; this.logger?.debug(`Getting team member ids for team '${teamId}'.`); const client = await this.webApi.getCoreApi(); @@ -393,6 +397,28 @@ export class AzureDevOpsApi { return buildRuns; } + + public async getReadme( + host: string, + org: string, + project: string, + repo: string, + ): Promise<{ + url: string; + content: string; + }> { + const url = buildEncodedUrl(host, org, project, repo, 'README.md'); + const response = await this.urlReader.read(url); + const content = await replaceReadme( + this.urlReader, + host, + org, + project, + repo, + response.toString(), + ); + return { url, content }; + } } export function mappedRepoBuild(build: Build): RepoBuild { diff --git a/plugins/azure-devops-backend/src/service/router.test.ts b/plugins/azure-devops-backend/src/service/router.test.ts index 3bf18de6a2..a77600feb0 100644 --- a/plugins/azure-devops-backend/src/service/router.test.ts +++ b/plugins/azure-devops-backend/src/service/router.test.ts @@ -33,7 +33,7 @@ import { ConfigReader } from '@backstage/config'; import { GitRepository } from 'azure-devops-node-api/interfaces/GitInterfaces'; import { createRouter } from './router'; import express from 'express'; -import { getVoidLogger } from '@backstage/backend-common'; +import { getVoidLogger, UrlReaders } from '@backstage/backend-common'; import request from 'supertest'; describe('createRouter', () => { @@ -53,19 +53,30 @@ describe('createRouter', () => { getBuildRuns: jest.fn(), getAllTeams: jest.fn(), getTeamMembers: jest.fn(), + getReadme: jest.fn(), } as any; + + const config = new ConfigReader({ + azureDevOps: { + token: 'foo', + host: 'host.com', + organization: 'myOrg', + top: 5, + }, + }); + + const logger = getVoidLogger(); + const router = await createRouter({ + config, + logger, azureDevOpsApi, - logger: getVoidLogger(), - config: new ConfigReader({ - azureDevOps: { - token: 'foo', - host: 'host.com', - organization: 'myOrg', - top: 5, - }, + reader: UrlReaders.default({ + config, + logger, }), }); + app = express().use(router); }); @@ -455,4 +466,67 @@ describe('createRouter', () => { expect(response.status).toEqual(200); }); }); + + describe('GET /readme/:projectName/:repoName', () => { + it('fetches readme file', async () => { + const content = getReadmeMock(); + const url = `https://host.com/myOrg/myProject/_git/myRepo?path=README.md`; + + azureDevOpsApi.getReadme.mockResolvedValueOnce({ + content, + url, + }); + + const response = await request(app).get( + '/readme/myProject/myRepo?path=README.md', + ); + expect(azureDevOpsApi.getReadme).toHaveBeenCalledWith( + 'host.com', + 'myOrg', + 'myProject', + 'myRepo', + ); + expect(response.status).toEqual(200); + expect(response.body).toEqual({ + content, + url, + }); + }); + }); }); + +function getReadmeMock() { + return ` + # Introduction + TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. + + # Getting Started + TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: + 1. Installation process + 2. Software dependencies + 3. Latest releases + 4. API references + + # Build and Test + TODO: Describe and show how to build your code and run the tests. + + # Contribute + TODO: Explain how other users and developers can contribute to make your code better. + + If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files: + - [ASP.NET Core](https://github.com/aspnet/Home) + - [Visual Studio Code](https://github.com/Microsoft/vscode) + - [Chakra Core](https://github.com/Microsoft/ChakraCore) + + + - ![Imagem 1](./images/image1.jpg) + - ![Imagem 2](./images/image2.png) + - ![Imagem 3](./images/image3.jpg) + - ![Imagem 4](./images/image4.webp) + - ![Imagem 5](./images/image5.png) + - ![Imagem 6](/images/image6.png) + - ![Imagem 7](/images/image-7.jpg) + - ![Imagem 8](./images/image-8.gif) + - ![Imagem 9](/images/image9.png) + `; +} diff --git a/plugins/azure-devops-backend/src/service/router.ts b/plugins/azure-devops-backend/src/service/router.ts index a4a76b4a14..b6b8a6fdea 100644 --- a/plugins/azure-devops-backend/src/service/router.ts +++ b/plugins/azure-devops-backend/src/service/router.ts @@ -26,21 +26,24 @@ import { Config } from '@backstage/config'; import { Logger } from 'winston'; import { PullRequestsDashboardProvider } from '../api/PullRequestsDashboardProvider'; import Router from 'express-promise-router'; -import { errorHandler } from '@backstage/backend-common'; +import { errorHandler, UrlReader } from '@backstage/backend-common'; import express from 'express'; const DEFAULT_TOP = 10; +/** @public */ export interface RouterOptions { azureDevOpsApi?: AzureDevOpsApi; logger: Logger; config: Config; + reader: UrlReader; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { - const { logger } = options; + const { logger, reader } = options; const config = options.config.getConfig('azureDevOps'); const token = config.getString('token'); @@ -51,7 +54,7 @@ export async function createRouter( const webApi = new WebApi(`https://${host}/${organization}`, authHandler); const azureDevOpsApi = - options.azureDevOpsApi || new AzureDevOpsApi(logger, webApi); + options.azureDevOpsApi || new AzureDevOpsApi(logger, webApi, reader); const pullRequestsDashboardProvider = await PullRequestsDashboardProvider.create(logger, azureDevOpsApi); @@ -191,6 +194,17 @@ export async function createRouter( res.status(200).json(teamIds); }); + router.get('/readme/:projectName/:repoName', async (req, res) => { + const { projectName, repoName } = req.params; + const readme = await azureDevOpsApi.getReadme( + host, + organization, + projectName, + repoName, + ); + res.status(200).json(readme); + }); + router.use(errorHandler()); return router; } diff --git a/plugins/azure-devops-backend/src/service/standaloneServer.ts b/plugins/azure-devops-backend/src/service/standaloneServer.ts index 1d5889fcf1..e2f4aa4986 100644 --- a/plugins/azure-devops-backend/src/service/standaloneServer.ts +++ b/plugins/azure-devops-backend/src/service/standaloneServer.ts @@ -17,6 +17,7 @@ import { createServiceBuilder, loadBackendConfig, + UrlReaders, } from '@backstage/backend-common'; import { Server } from 'http'; import { Logger } from 'winston'; @@ -39,6 +40,7 @@ export async function startStandaloneServer( const router = await createRouter({ logger, config, + reader: UrlReaders.default({ logger, config }), }); let service = createServiceBuilder(module) diff --git a/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts b/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts index 8aed436710..f044a20968 100644 --- a/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts +++ b/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts @@ -21,12 +21,15 @@ import { } from '@backstage/plugin-azure-devops-common'; import { convertDashboardPullRequest, + extractAssets, + extractPartsFromAsset, getArtifactId, getAvatarUrl, getPullRequestLink, + replaceReadme, } from './azure-devops-utils'; - import { GitPullRequest } from 'azure-devops-node-api/interfaces/GitInterfaces'; +import { UrlReader } from '@backstage/backend-common'; describe('convertDashboardPullRequest', () => { it('should return DashboardPullRequest', () => { @@ -159,3 +162,115 @@ describe('getArtifactId', () => { expect(result).toBe('vstfs:///CodeReview/CodeReviewId/project1/1'); }); }); + +describe('extractAssets', () => { + it('should return assets', () => { + const readme = ` + ## Images + ![Image 1](./images/sample-4(2).png) + ![Image 2](./images/cdCSj+-012340.jpg) + ![Image 3](/images/test-4(2)))).jpeg) + ![Image 4](./images/test-2211jd.webp) + ![Image 5](/images/sa)mple.gif) + `; + const result = extractAssets(readme); + expect(result).toEqual([ + '[Image 1](./images/sample-4(2).png)', + '[Image 2](./images/cdCSj+-012340.jpg)', + '[Image 3](/images/test-4(2)))).jpeg)', + '[Image 4](./images/test-2211jd.webp)', + '[Image 5](/images/sa)mple.gif)', + ]); + }); +}); + +describe('extractPartsFromAsset', () => { + it('should return parts from asset - PNG', () => { + const result = extractPartsFromAsset('[Image 1](./images/sample-4(2).png)'); + expect(result).toEqual({ + label: 'Image 1', + path: '/images/sample-4(2)', + ext: '.png', + }); + }); + + it('should return parts from asset - JPG', () => { + const result = extractPartsFromAsset( + '[Image 2](./images/cdCSj+-012340.jpg)', + ); + expect(result).toEqual({ + label: 'Image 2', + path: '/images/cdCSj+-012340', + ext: '.jpg', + }); + }); + + it('should return parts from asset - JPEG', () => { + const result = extractPartsFromAsset( + '[Image 2](/images/test-4(2)))).jpeg)', + ); + expect(result).toEqual({ + label: 'Image 2', + path: '/images/test-4(2))))', + ext: '.jpeg', + }); + }); + + it('should return parts from asset - WEBP', () => { + const result = extractPartsFromAsset('[Image 2](/images/test-2211jd.webp)'); + expect(result).toEqual({ + label: 'Image 2', + path: '/images/test-2211jd', + ext: '.webp', + }); + }); + + it('should return parts from asset - GIF', () => { + const result = extractPartsFromAsset('[Image 2](/images/test-4(2)))).gif)'); + expect(result).toEqual({ + label: 'Image 2', + path: '/images/test-4(2))))', + ext: '.gif', + }); + }); +}); + +describe('replaceReadme', () => { + it('should return mime type', async () => { + const readme = ` + ## Images + ![Image 1](./images/sample-4(2).png) + ![Image 2](./images/cdCSj+-012340.jpg) + ![Image 3](/images/test-4(2)))).jpeg) + ![Image 4](./images/test-2211jd.webp) + ![Image 5](/images/sa)mple.gif) + `; + + const reader: UrlReader = { + read: url => new Promise(resolve => resolve(Buffer.from(url))), + readTree: jest.fn(), + search: jest.fn(), + readUrl: jest.fn(), + }; + + const result = await replaceReadme( + reader, + 'host', + 'org', + 'project', + 'repo', + readme, + ); + + const expected = ` + ## Images + ![Image 1](data:image/png;base64,aHR0cHM6Ly9ob3N0L29yZy9wcm9qZWN0L19naXQvcmVwbz9wYXRoPSUyRmltYWdlcyUyRnNhbXBsZS00KDIpLnBuZw==) + ![Image 2](data:image/jpeg;base64,aHR0cHM6Ly9ob3N0L29yZy9wcm9qZWN0L19naXQvcmVwbz9wYXRoPSUyRmltYWdlcyUyRmNkQ1NqJTJCLTAxMjM0MC5qcGc=) + ![Image 3](data:image/jpeg;base64,aHR0cHM6Ly9ob3N0L29yZy9wcm9qZWN0L19naXQvcmVwbz9wYXRoPSUyRmltYWdlcyUyRnRlc3QtNCgyKSkpKS5qcGVn) + ![Image 4](data:image/webp;base64,aHR0cHM6Ly9ob3N0L29yZy9wcm9qZWN0L19naXQvcmVwbz9wYXRoPSUyRmltYWdlcyUyRnRlc3QtMjIxMWpkLndlYnA=) + ![Image 5](data:image/gif;base64,aHR0cHM6Ly9ob3N0L29yZy9wcm9qZWN0L19naXQvcmVwbz9wYXRoPSUyRmltYWdlcyUyRnNhKW1wbGUuZ2lm) + `; + + expect(expected).toBe(result); + }); +}); diff --git a/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts b/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts index 7a0d0a279e..191486a925 100644 --- a/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts +++ b/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts @@ -30,9 +30,11 @@ import { GitRepository, IdentityRefWithVote, } from 'azure-devops-node-api/interfaces/GitInterfaces'; +import mime from 'mime-types'; import { IdentityRef } from 'azure-devops-node-api/interfaces/common/VSSInterfaces'; import { PolicyEvaluationRecord } from 'azure-devops-node-api/interfaces/PolicyInterfaces'; +import { UrlReader } from '@backstage/backend-common'; export function convertDashboardPullRequest( pullRequest: GitPullRequest, @@ -205,6 +207,48 @@ export function convertPolicy( }; } +export async function replaceReadme( + urlReader: UrlReader, + host: string, + org: string, + project: string, + repo: string, + readmeContent: string, +) { + const filesPath = extractAssets(readmeContent); + if (!filesPath) return readmeContent; + return await filesPath.reduce( + async (promise: Promise, filePath: string) => + promise.then(async content => { + const { label, path, ext } = extractPartsFromAsset(filePath); + const data = mime.lookup(ext); + const url = buildEncodedUrl(host, org, project, repo, path + ext); + const buffer = await urlReader.read(url); + const file = await buffer.toString('base64'); + return content.replace( + filePath, + `[${label}](data:${data};base64,${file})`, + ); + }), + Promise.resolve(readmeContent), + ); +} + +export function buildEncodedUrl( + host: string, + org: string, + project: string, + repo: string, + path: string, +): string { + const encodedHost = encodeURIComponent(host); + const encodedOrg = encodeURIComponent(org); + const encodedProject = encodeURIComponent(project); + const encodedRepo = encodeURIComponent(repo); + const encodedPath = encodeURIComponent(path); + return `https://${encodedHost}/${encodedOrg}/${encodedProject}/_git/${encodedRepo}?path=${encodedPath}`; +} + function convertReviewer( identityRef?: IdentityRefWithVote, ): Reviewer | undefined { @@ -263,3 +307,24 @@ function convertCreatedBy(identityRef?: IdentityRef): CreatedBy | undefined { function hasAutoComplete(pullRequest: GitPullRequest): boolean { return pullRequest.isDraft !== true && !!pullRequest.completionOptions; } + +export function extractAssets(content: string) { + const regExp = + /\[([^\[\]]*)\]\((?!https?:\/\/)(.*?)(\.png|\.jpg|\.jpeg|\.gif|\.webp)(.*)\)/gim; + return content.match(regExp); +} + +export function extractPartsFromAsset(content: string): { + label: string; + path: string; + ext: string; +} { + const regExp = + /\[(.*?)\]\((?!https?:\/\/)(.*?)(\.png|\.jpg|\.jpeg|\.gif|\.webp)(.*)\)/; + const [_, label, path, ext] = regExp.exec(content) || []; + return { + ext, + label, + path: path.startsWith('.') ? path.substring(1, path.length) : path, + }; +} diff --git a/plugins/azure-devops-common/CHANGELOG.md b/plugins/azure-devops-common/CHANGELOG.md index cdd02cc625..8f0c5b9f76 100644 --- a/plugins/azure-devops-common/CHANGELOG.md +++ b/plugins/azure-devops-common/CHANGELOG.md @@ -1,5 +1,58 @@ # @backstage/plugin-azure-devops-common +## 0.3.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup + ## 0.2.4 ### Patch Changes diff --git a/plugins/azure-devops-common/api-report.md b/plugins/azure-devops-common/api-report.md index 34d911dac6..ea9f7130c0 100644 --- a/plugins/azure-devops-common/api-report.md +++ b/plugins/azure-devops-common/api-report.md @@ -3,8 +3,6 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -// Warning: (ae-missing-release-tag) "BuildResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum BuildResult { Canceled = 32, @@ -14,8 +12,6 @@ export enum BuildResult { Succeeded = 2, } -// Warning: (ae-missing-release-tag) "BuildRun" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BuildRun = { id?: number; @@ -30,15 +26,11 @@ export type BuildRun = { uniqueName?: string; }; -// Warning: (ae-missing-release-tag) "BuildRunOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BuildRunOptions = { top?: number; }; -// Warning: (ae-missing-release-tag) "BuildStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum BuildStatus { All = 47, @@ -50,8 +42,6 @@ export enum BuildStatus { Postponed = 8, } -// Warning: (ae-missing-release-tag) "CreatedBy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CreatedBy { // (undocumented) @@ -68,8 +58,6 @@ export interface CreatedBy { uniqueName?: string; } -// Warning: (ae-missing-release-tag) "DashboardPullRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DashboardPullRequest { // (undocumented) @@ -98,8 +86,6 @@ export interface DashboardPullRequest { title?: string; } -// Warning: (ae-missing-release-tag) "GitTag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GitTag = { objectId?: string; @@ -110,8 +96,6 @@ export type GitTag = { commitLink: string; }; -// Warning: (ae-missing-release-tag) "Policy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Policy { // (undocumented) @@ -126,9 +110,7 @@ export interface Policy { type: PolicyType; } -// Warning: (ae-missing-release-tag) "PolicyEvaluationStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public +// @public (undocumented) export enum PolicyEvaluationStatus { Approved = 2, Broken = 5, @@ -138,8 +120,6 @@ export enum PolicyEvaluationStatus { Running = 1, } -// Warning: (ae-missing-release-tag) "PolicyType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PolicyType { // (undocumented) @@ -156,8 +136,6 @@ export enum PolicyType { Status = 'Status', } -// Warning: (ae-missing-release-tag) "PolicyTypeId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PolicyTypeId { Build = '0609b952-1397-4640-95ec-e00a01b2c241', @@ -168,8 +146,6 @@ export enum PolicyTypeId { Status = 'cbdc66da-9728-4af8-aada-9a5a32e4a226', } -// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Project = { id?: string; @@ -177,8 +153,6 @@ export type Project = { description?: string; }; -// Warning: (ae-missing-release-tag) "PullRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PullRequest = { pullRequestId?: number; @@ -194,16 +168,12 @@ export type PullRequest = { link: string; }; -// Warning: (ae-missing-release-tag) "PullRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PullRequestOptions = { top: number; status: PullRequestStatus; }; -// Warning: (ae-missing-release-tag) "PullRequestStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PullRequestStatus { Abandoned = 2, @@ -213,8 +183,6 @@ export enum PullRequestStatus { NotSet = 0, } -// Warning: (ae-missing-release-tag) "PullRequestVoteStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum PullRequestVoteStatus { // (undocumented) @@ -229,8 +197,22 @@ export enum PullRequestVoteStatus { WaitingForAuthor = -5, } -// Warning: (ae-missing-release-tag) "RepoBuild" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface Readme { + // (undocumented) + content: string; + // (undocumented) + url: string; +} + +// @public (undocumented) +export interface ReadmeConfig { + // (undocumented) + project: string; + // (undocumented) + repo: string; +} + // @public (undocumented) export type RepoBuild = { id?: number; @@ -245,15 +227,11 @@ export type RepoBuild = { uniqueName?: string; }; -// Warning: (ae-missing-release-tag) "RepoBuildOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type RepoBuildOptions = { top?: number; }; -// Warning: (ae-missing-release-tag) "Repository" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Repository { // (undocumented) @@ -264,8 +242,6 @@ export interface Repository { url?: string; } -// Warning: (ae-missing-release-tag) "Reviewer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Reviewer { // (undocumented) @@ -284,8 +260,6 @@ export interface Reviewer { voteStatus: PullRequestVoteStatus; } -// Warning: (ae-missing-release-tag) "Team" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Team { // (undocumented) @@ -300,8 +274,6 @@ export interface Team { projectName?: string; } -// Warning: (ae-missing-release-tag) "TeamMember" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface TeamMember { // (undocumented) diff --git a/plugins/azure-devops-common/package.json b/plugins/azure-devops-common/package.json index 40803ae633..2be8c22935 100644 --- a/plugins/azure-devops-common/package.json +++ b/plugins/azure-devops-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-common", - "version": "0.2.4", + "version": "0.3.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli package clean" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/azure-devops-common/src/types.ts b/plugins/azure-devops-common/src/types.ts index db2813dec1..380cb3e585 100644 --- a/plugins/azure-devops-common/src/types.ts +++ b/plugins/azure-devops-common/src/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export enum BuildResult { /** * No result @@ -37,6 +38,7 @@ export enum BuildResult { Canceled = 32, } +/** @public */ export enum BuildStatus { /** * No status. @@ -68,6 +70,7 @@ export enum BuildStatus { All = 47, } +/** @public */ export type RepoBuild = { id?: number; title: string; @@ -81,10 +84,12 @@ export type RepoBuild = { uniqueName?: string; }; +/** @public */ export type RepoBuildOptions = { top?: number; }; +/** @public */ export enum PullRequestStatus { /** * Status not set. Default state. @@ -108,6 +113,7 @@ export enum PullRequestStatus { All = 4, } +/** @public */ export type GitTag = { objectId?: string; peeledObjectId?: string; @@ -117,6 +123,7 @@ export type GitTag = { commitLink: string; }; +/** @public */ export type PullRequest = { pullRequestId?: number; repoName?: string; @@ -131,11 +138,13 @@ export type PullRequest = { link: string; }; +/** @public */ export type PullRequestOptions = { top: number; status: PullRequestStatus; }; +/** @public */ export interface DashboardPullRequest { pullRequestId?: number; title?: string; @@ -151,6 +160,7 @@ export interface DashboardPullRequest { link?: string; } +/** @public */ export interface Reviewer { id?: string; displayName?: string; @@ -161,6 +171,7 @@ export interface Reviewer { voteStatus: PullRequestVoteStatus; } +/** @public */ export interface Policy { id?: number; type: PolicyType; @@ -169,6 +180,7 @@ export interface Policy { link?: string; } +/** @public */ export interface CreatedBy { id?: string; displayName?: string; @@ -178,12 +190,14 @@ export interface CreatedBy { teamNames?: string[]; } +/** @public */ export interface Repository { id?: string; name?: string; url?: string; } +/** @public */ export interface Team { id?: string; name?: string; @@ -192,6 +206,19 @@ export interface Team { members?: string[]; } +/** @public */ +export interface ReadmeConfig { + project: string; + repo: string; +} + +/** @public */ +export interface Readme { + url: string; + content: string; +} + +/** @public */ export interface TeamMember { id?: string; displayName?: string; @@ -202,6 +229,7 @@ export interface TeamMember { /** * Status of a policy which is running against a specific pull request. */ +/** @public */ export enum PolicyEvaluationStatus { /** * The policy is either queued to run, or is waiting for some event before progressing. @@ -229,6 +257,7 @@ export enum PolicyEvaluationStatus { Broken = 5, } +/** @public */ export enum PolicyType { Build = 'Build', Status = 'Status', @@ -238,6 +267,7 @@ export enum PolicyType { MergeStrategy = 'MergeStrategy', } +/** @public */ export enum PolicyTypeId { /** * This policy will require a successful build has been performed before updating protected refs. @@ -265,6 +295,7 @@ export enum PolicyTypeId { MergeStrategy = 'fa4e907d-c16b-4a4c-9dfa-4916e5d171ab', } +/** @public */ export enum PullRequestVoteStatus { Approved = 10, ApprovedWithSuggestions = 5, @@ -272,6 +303,8 @@ export enum PullRequestVoteStatus { WaitingForAuthor = -5, Rejected = -10, } + +/** @public */ export type BuildRun = { id?: number; title: string; @@ -285,10 +318,12 @@ export type BuildRun = { uniqueName?: string; }; +/** @public */ export type BuildRunOptions = { top?: number; }; +/** @public */ export type Project = { id?: string; name?: string; diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index f108dd1424..85b3800c30 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,64 @@ # @backstage/plugin-azure-devops +## 0.2.0-next.0 + +### Minor Changes + +- 6c1c59b96e: Added README card `EntityAzureReadmeCard` for Azure Devops. + + To get the README component working you'll need to do the following two steps: + + 1. First we need to add the @backstage/plugin-azure-devops package to your frontend app: + + ```bash + # From your Backstage root directory + yarn add --cwd packages/app @backstage/plugin-azure-devops + ``` + + 2. Second we need to add the `EntityAzureReadmeCard` extension to the entity page in your app: + + ```tsx + // In packages/app/src/components/catalog/EntityPage.tsx + import { + EntityAzureReadmeCard, + isAzureDevOpsAvailable, + } from '@backstage/plugin-azure-devops'; + + // As it is a card, you can customize it the way you prefer + // For example in the Service section + + const overviewContent = ( + + + + + ... + + + + + + + + ); + ``` + + **Notes:** + + - You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. + - The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation + - The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-azure-devops-common@0.3.0-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.24 ### Patch Changes diff --git a/plugins/azure-devops/README.md b/plugins/azure-devops/README.md index 68d2b57afc..5079fa4f16 100644 --- a/plugins/azure-devops/README.md +++ b/plugins/azure-devops/README.md @@ -22,6 +22,12 @@ Lists all Git Tags for a given repository ![Azure Repos Git Tags Example](./docs/azure-devops-git-tags.png) +### Azure Readme + +Readme for a given repository + +![Azure Readme Example](./docs/azure-devops-readme.png) + ## Setup The following sections will help you get the Azure DevOps plugin setup and running @@ -70,7 +76,7 @@ In this case `` will be the name of your Team Project and ` + + + + ... + + + + + + + + ); + ``` + +**Notes:** + +- You'll need to add the `EntitySwitch.Case` above from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to the `websiteEntityPage` section. +- The `if` prop is optional on the `EntitySwitch.Case`, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation +- The `maxHeight` property on the `EntityAzureReadmeCard` will set the maximum screen size you would like to see, if not set it will default to 100% + ## Limitations - Currently multiple organizations are not supported diff --git a/plugins/azure-devops/api-report.md b/plugins/azure-devops/api-report.md index 0fe600f15d..d083d00dba 100644 --- a/plugins/azure-devops/api-report.md +++ b/plugins/azure-devops/api-report.md @@ -16,28 +16,24 @@ import { GitTag } from '@backstage/plugin-azure-devops-common'; import { IdentityApi } from '@backstage/core-plugin-api'; import { PullRequest } from '@backstage/plugin-azure-devops-common'; import { PullRequestOptions } from '@backstage/plugin-azure-devops-common'; +import { Readme } from '@backstage/plugin-azure-devops-common'; +import { ReadmeConfig } from '@backstage/plugin-azure-devops-common'; import { RepoBuild } from '@backstage/plugin-azure-devops-common'; import { RepoBuildOptions } from '@backstage/plugin-azure-devops-common'; import { SvgIconProps } from '@material-ui/core'; import { Team } from '@backstage/plugin-azure-devops-common'; -// Warning: (ae-missing-release-tag) "AllFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AllFilter = BaseFilter & { type: FilterType.All; }; -// Warning: (ae-missing-release-tag) "AssignedToTeamFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AssignedToTeamFilter = BaseFilter & { type: FilterType.AssignedToTeam; teamId: string; }; -// Warning: (ae-missing-release-tag) "AssignedToTeamsFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AssignedToTeamsFilter = BaseFilter & ( @@ -51,8 +47,6 @@ export type AssignedToTeamsFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "AssignedToUserFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AssignedToUserFilter = BaseFilter & ( @@ -66,8 +60,6 @@ export type AssignedToUserFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "AzureDevOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AzureDevOpsApi { // (undocumented) @@ -101,6 +93,8 @@ export interface AzureDevOpsApi { items: PullRequest[]; }>; // (undocumented) + getReadme(opts: ReadmeConfig): Promise; + // (undocumented) getRepoBuilds( projectName: string, repoName: string, @@ -112,13 +106,9 @@ export interface AzureDevOpsApi { getUserTeamIds(userId: string): Promise; } -// Warning: (ae-missing-release-tag) "azureDevOpsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const azureDevOpsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "AzureDevOpsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class AzureDevOpsClient implements AzureDevOpsApi { constructor(options: { @@ -156,6 +146,8 @@ export class AzureDevOpsClient implements AzureDevOpsApi { items: PullRequest[]; }>; // (undocumented) + getReadme(opts: ReadmeConfig): Promise; + // (undocumented) getRepoBuilds( projectName: string, repoName: string, @@ -167,38 +159,24 @@ export class AzureDevOpsClient implements AzureDevOpsApi { getUserTeamIds(userId: string): Promise; } -// Warning: (ae-missing-release-tag) "azureDevOpsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const azureDevOpsPlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-missing-release-tag) "AzurePullRequestsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AzurePullRequestsIcon: (props: SvgIconProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "AzurePullRequestsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const AzurePullRequestsPage: ({ - projectName, - pollingInterval, - defaultColumnConfigs, -}: { +export const AzurePullRequestsPage: (props: { projectName?: string | undefined; pollingInterval?: number | undefined; defaultColumnConfigs?: PullRequestColumnConfig[] | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "BaseFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BaseFilter = { type: FilterType; }; -// Warning: (ae-missing-release-tag) "CreatedByTeamFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CreatedByTeamFilter = BaseFilter & ({ @@ -212,8 +190,6 @@ export type CreatedByTeamFilter = BaseFilter & } )); -// Warning: (ae-missing-release-tag) "CreatedByTeamsFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CreatedByTeamsFilter = BaseFilter & ( @@ -233,8 +209,6 @@ export type CreatedByTeamsFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "CreatedByUserFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CreatedByUserFilter = BaseFilter & ( @@ -248,31 +222,24 @@ export type CreatedByUserFilter = BaseFilter & } ); -// Warning: (ae-missing-release-tag) "EntityAzureGitTagsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityAzureGitTagsContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityAzurePipelinesContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityAzurePipelinesContent: ({ - defaultLimit, -}: { +export const EntityAzurePipelinesContent: (props: { defaultLimit?: number | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityAzurePullRequestsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityAzurePullRequestsContent: ({ - defaultLimit, -}: { +export const EntityAzurePullRequestsContent: (props: { defaultLimit?: number | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "Filter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const EntityAzureReadmeCard: (props: { + maxHeight?: number | undefined; +}) => JSX.Element; + // @public (undocumented) export type Filter = | AssignedToUserFilter @@ -283,8 +250,6 @@ export type Filter = | CreatedByTeamsFilter | AllFilter; -// Warning: (ae-missing-release-tag) "FilterType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum FilterType { // (undocumented) @@ -311,18 +276,12 @@ export enum FilterType { CreatedByUser = 'CreatedByUser', } -// Warning: (ae-missing-release-tag) "isAzureDevOpsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isAzureDevOpsAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "isAzurePipelinesAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isAzurePipelinesAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "PullRequestColumnConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PullRequestColumnConfig { // (undocumented) @@ -333,8 +292,6 @@ export interface PullRequestColumnConfig { title: string; } -// Warning: (ae-missing-release-tag) "PullRequestFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean; diff --git a/plugins/azure-devops/docs/azure-devops-readme.png b/plugins/azure-devops/docs/azure-devops-readme.png new file mode 100644 index 0000000000..cac087f685 Binary files /dev/null and b/plugins/azure-devops/docs/azure-devops-readme.png differ diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 457cc008a0..d80e01fbe9 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.1.24", + "version": "0.2.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,11 +31,11 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-azure-devops-common": "^0.2.4", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-azure-devops-common": "^0.3.0-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,17 +49,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/azure-devops/src/api/AzureDevOpsApi.ts b/plugins/azure-devops/src/api/AzureDevOpsApi.ts index ccedc401f1..ce6a3cac39 100644 --- a/plugins/azure-devops/src/api/AzureDevOpsApi.ts +++ b/plugins/azure-devops/src/api/AzureDevOpsApi.ts @@ -21,6 +21,8 @@ import { GitTag, PullRequest, PullRequestOptions, + Readme, + ReadmeConfig, RepoBuild, RepoBuildOptions, Team, @@ -28,10 +30,12 @@ import { import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const azureDevOpsApiRef = createApiRef({ id: 'plugin.azure-devops.service', }); +/** @public */ export interface AzureDevOpsApi { getRepoBuilds( projectName: string, @@ -64,4 +68,6 @@ export interface AzureDevOpsApi { definitionName?: string, options?: BuildRunOptions, ): Promise<{ items: BuildRun[] }>; + + getReadme(opts: ReadmeConfig): Promise; } diff --git a/plugins/azure-devops/src/api/AzureDevOpsClient.ts b/plugins/azure-devops/src/api/AzureDevOpsClient.ts index 61c8479d71..68d8896538 100644 --- a/plugins/azure-devops/src/api/AzureDevOpsClient.ts +++ b/plugins/azure-devops/src/api/AzureDevOpsClient.ts @@ -21,15 +21,17 @@ import { GitTag, PullRequest, PullRequestOptions, + Readme, + ReadmeConfig, RepoBuild, RepoBuildOptions, Team, } from '@backstage/plugin-azure-devops-common'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; - -import { AzureDevOpsApi } from './AzureDevOpsApi'; import { ResponseError } from '@backstage/errors'; +import { AzureDevOpsApi } from './AzureDevOpsApi'; +/** @public */ export class AzureDevOpsClient implements AzureDevOpsApi { private readonly discoveryApi: DiscoveryApi; private readonly identityApi: IdentityApi; @@ -130,6 +132,14 @@ export class AzureDevOpsClient implements AzureDevOpsApi { return { items }; } + public async getReadme(opts: ReadmeConfig): Promise { + return await this.get( + `readme/${encodeURIComponent(opts.project)}/${encodeURIComponent( + opts.repo, + )}`, + ); + } + private async get(path: string): Promise { const baseUrl = `${await this.discoveryApi.getBaseUrl('azure-devops')}/`; const url = new URL(path, baseUrl); diff --git a/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx b/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx index bb4cb8c081..99e3f74e90 100644 --- a/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx +++ b/plugins/azure-devops/src/components/AzurePullRequestsIcon/AzurePullRequestsIcon.tsx @@ -14,10 +14,10 @@ * limitations under the License. */ +import React from 'react'; import { SvgIcon, SvgIconProps } from '@material-ui/core'; -import React from 'react'; - +/** @public */ export const AzurePullRequestsIcon = (props: SvgIconProps) => ( { +export const EntityPageAzurePipelines = (props: { defaultLimit?: number }) => { const { entity } = useEntity(); const { project, repo, definition } = getAnnotationFromEntity(entity); const { items, loading, error } = useBuildRuns( project, - defaultLimit, + props.defaultLimit, repo, definition, ); diff --git a/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx b/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx index 3d1a3ef77a..b5a21ff750 100644 --- a/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx +++ b/plugins/azure-devops/src/components/EntityPageAzurePullRequests/EntityPageAzurePullRequests.tsx @@ -17,10 +17,8 @@ import { PullRequestTable } from '../PullRequestTable/PullRequestTable'; import React from 'react'; -export const EntityPageAzurePullRequests = ({ - defaultLimit, -}: { +export const EntityPageAzurePullRequests = (props: { defaultLimit?: number; }) => { - return ; + return ; }; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx b/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx index 158c4bca5b..c5da207bd6 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx +++ b/plugins/azure-devops/src/components/PullRequestsPage/PullRequestsPage.tsx @@ -24,7 +24,6 @@ import { import { PullRequestColumnConfig, PullRequestGroup } from './lib/types'; import React, { useState } from 'react'; import { getPullRequestGroupConfigs, getPullRequestGroups } from './lib/utils'; - import { FilterType } from './lib/filters'; import { PullRequestGrid } from './lib/PullRequestGrid'; import { useDashboardPullRequests } from '../../hooks'; @@ -71,11 +70,9 @@ type PullRequestsPageProps = { defaultColumnConfigs?: PullRequestColumnConfig[]; }; -export const PullRequestsPage = ({ - projectName, - pollingInterval, - defaultColumnConfigs, -}: PullRequestsPageProps) => { +export const PullRequestsPage = (props: PullRequestsPageProps) => { + const { projectName, pollingInterval, defaultColumnConfigs } = props; + const { pullRequests, loading, error } = useDashboardPullRequests( projectName, pollingInterval, diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts index 90ec822ef6..952f7ddc57 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/allFilter.ts @@ -18,6 +18,7 @@ import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +/** @public */ export type AllFilter = BaseFilter & { type: FilterType.All; }; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts index 8e816db2c3..fa6b3de00a 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { stringArrayHas } from '../../../../utils'; +/** @public */ export type AssignedToTeamFilter = BaseFilter & { type: FilterType.AssignedToTeam; teamId: string; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts index ce5e5bcc11..df93e38f81 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToTeamsFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { createAssignedToTeamFilter } from './assignedToTeamFilter'; +/** @public */ export type AssignedToTeamsFilter = BaseFilter & ( | { diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts index 95ee3d5a59..3f554de62b 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/assignedToUserFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { stringArrayHas } from '../../../../utils'; +/** @public */ export type AssignedToUserFilter = BaseFilter & ( | { diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts index 70a388b540..e4d28d28b1 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { stringArrayHas } from '../../../../utils'; +/** @public */ export type CreatedByTeamFilter = BaseFilter & ({ type: FilterType.CreatedByTeam; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts index 34ed81db5d..44e02136ec 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByTeamsFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { createCreatedByTeamFilter } from './createdByTeamFilter'; +/** @public */ export type CreatedByTeamsFilter = BaseFilter & ( | ({ diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts index 69d4f23db5..24c14311eb 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/createdByUserFilter.ts @@ -14,11 +14,11 @@ * limitations under the License. */ -import { BaseFilter, FilterType, PullRequestFilter } from './types'; - import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +import { BaseFilter, FilterType, PullRequestFilter } from './types'; import { equalsIgnoreCase } from '../../../../utils'; +/** @public */ export type CreatedByUserFilter = BaseFilter & ( | { diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts index bc4643d51b..6b0d95eb78 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/filters/types.ts @@ -23,6 +23,7 @@ import { CreatedByTeamsFilter } from './createdByTeamsFilter'; import { CreatedByUserFilter } from './createdByUserFilter'; import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; +/** @public */ export enum FilterType { All = 'All', @@ -41,6 +42,7 @@ export enum FilterType { CreatedByCurrentUsersTeams = 'CreatedByCurrentUsersTeams', } +/** @public */ export const FilterTypes = [ FilterType.All, @@ -57,10 +59,12 @@ export const FilterTypes = [ FilterType.CreatedByCurrentUsersTeams, ] as const; +/** @public */ export type BaseFilter = { type: FilterType; }; +/** @public */ export type Filter = | AssignedToUserFilter | CreatedByUserFilter @@ -80,4 +84,5 @@ export type { AllFilter, }; +/** @public */ export type PullRequestFilter = (pullRequest: DashboardPullRequest) => boolean; diff --git a/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts b/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts index 74c8ebe605..5f5f0119d8 100644 --- a/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts +++ b/plugins/azure-devops/src/components/PullRequestsPage/lib/types.ts @@ -14,22 +14,24 @@ * limitations under the License. */ +import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; import { Filter, PullRequestFilter } from './filters'; -import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; - +/** @public */ export interface PullRequestColumnConfig { title: string; filters: Filter[]; simplified?: boolean; } +/** @public */ export interface PullRequestGroupConfig { title: string; filter: PullRequestFilter; simplified?: boolean; } +/** @public */ export interface PullRequestGroup { title: string; pullRequests: DashboardPullRequest[]; diff --git a/plugins/azure-devops/src/components/ReadmeCard/ReadmeCard.tsx b/plugins/azure-devops/src/components/ReadmeCard/ReadmeCard.tsx new file mode 100644 index 0000000000..d06726e929 --- /dev/null +++ b/plugins/azure-devops/src/components/ReadmeCard/ReadmeCard.tsx @@ -0,0 +1,120 @@ +/* + * Copyright 2022 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 { Box, Button, makeStyles } from '@material-ui/core'; +import { + InfoCard, + Progress, + MarkdownContent, + EmptyState, + ErrorPanel, +} from '@backstage/core-components'; +import { useEntity } from '@backstage/plugin-catalog-react'; +import { useProjectRepoFromEntity } from '../../hooks'; +import { useApi } from '@backstage/core-plugin-api'; +import React from 'react'; +import { azureDevOpsApiRef } from '../../api'; +import useAsync from 'react-use/lib/useAsync'; + +const useStyles = makeStyles(theme => ({ + readMe: { + overflowY: 'auto', + paddingRight: theme.spacing(1), + '&::-webkit-scrollbar-track': { + backgroundColor: '#F5F5F5', + borderRadius: '5px', + }, + '&::-webkit-scrollbar': { + width: '5px', + backgroundColor: '#F5F5F5', + borderRadius: '5px', + }, + '&::-webkit-scrollbar-thumb': { + border: '1px solid #555555', + backgroundColor: '#555', + borderRadius: '4px', + }, + }, +})); + +type Props = { + maxHeight?: number; +}; + +type ErrorProps = { + error: Error; +}; + +function isNotFoundError(error: any): boolean { + return error?.response?.status === 404; +} + +const ReadmeCardError = ({ error }: ErrorProps) => { + if (isNotFoundError(error)) + return ( + + Read more + + } + /> + ); + return ; +}; + +export const ReadmeCard = (props: Props) => { + const classes = useStyles(); + const api = useApi(azureDevOpsApiRef); + const { entity } = useEntity(); + const { project, repo } = useProjectRepoFromEntity(entity); + + const { loading, error, value } = useAsync( + () => + api.getReadme({ + project, + repo, + }), + [api, project, repo, entity], + ); + + if (loading) { + return ; + } else if (error) { + return ; + } + + return ( + + + + + + ); +}; diff --git a/packages/cli/config/jestEsmTransform.js b/plugins/azure-devops/src/components/ReadmeCard/index.ts similarity index 77% rename from packages/cli/config/jestEsmTransform.js rename to plugins/azure-devops/src/components/ReadmeCard/index.ts index c1eec7d9f8..9b92a0eaf1 100644 --- a/packages/cli/config/jestEsmTransform.js +++ b/plugins/azure-devops/src/components/ReadmeCard/index.ts @@ -1,5 +1,5 @@ /* - * Copyright 2021 The Backstage Authors + * Copyright 2022 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. @@ -14,6 +14,4 @@ * limitations under the License. */ -throw new Error( - 'The ./jestEsmTransform.js transform has been removed, switch to using ./jestSucraseTransform.js instead', -); +export { ReadmeCard } from './ReadmeCard'; diff --git a/plugins/azure-devops/src/index.ts b/plugins/azure-devops/src/index.ts index e65c1d02a3..37e85b7422 100644 --- a/plugins/azure-devops/src/index.ts +++ b/plugins/azure-devops/src/index.ts @@ -19,6 +19,7 @@ export { EntityAzurePipelinesContent, EntityAzureGitTagsContent, EntityAzurePullRequestsContent, + EntityAzureReadmeCard, isAzureDevOpsAvailable, isAzurePipelinesAvailable, AzurePullRequestsPage, diff --git a/plugins/azure-devops/src/plugin.ts b/plugins/azure-devops/src/plugin.ts index ccd183eee9..4dd423f35a 100644 --- a/plugins/azure-devops/src/plugin.ts +++ b/plugins/azure-devops/src/plugin.ts @@ -29,6 +29,7 @@ import { createApiFactory, createPlugin, createRoutableExtension, + createComponentExtension, discoveryApiRef, identityApiRef, } from '@backstage/core-plugin-api'; @@ -37,9 +38,11 @@ import { AzureDevOpsClient } from './api/AzureDevOpsClient'; import { Entity } from '@backstage/catalog-model'; import { azureDevOpsApiRef } from './api/AzureDevOpsApi'; +/** @public */ export const isAzureDevOpsAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_REPO_ANNOTATION]); +/** @public */ export const isAzurePipelinesAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_REPO_ANNOTATION]) || (Boolean(entity.metadata.annotations?.[AZURE_DEVOPS_PROJECT_ANNOTATION]) && @@ -47,6 +50,7 @@ export const isAzurePipelinesAvailable = (entity: Entity) => entity.metadata.annotations?.[AZURE_DEVOPS_BUILD_DEFINITION_ANNOTATION], )); +/** @public */ export const azureDevOpsPlugin = createPlugin({ id: 'azureDevOps', apis: [ @@ -59,6 +63,7 @@ export const azureDevOpsPlugin = createPlugin({ ], }); +/** @public */ export const AzurePullRequestsPage = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'AzurePullRequestsPage', @@ -68,6 +73,7 @@ export const AzurePullRequestsPage = azureDevOpsPlugin.provide( }), ); +/** @public */ export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'EntityAzurePipelinesContent', @@ -79,6 +85,7 @@ export const EntityAzurePipelinesContent = azureDevOpsPlugin.provide( }), ); +/** @public */ export const EntityAzureGitTagsContent = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'EntityAzureGitTagsContent', @@ -90,6 +97,7 @@ export const EntityAzureGitTagsContent = azureDevOpsPlugin.provide( }), ); +/** @public */ export const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide( createRoutableExtension({ name: 'EntityAzurePullRequestsContent', @@ -100,3 +108,13 @@ export const EntityAzurePullRequestsContent = azureDevOpsPlugin.provide( mountPoint: azurePullRequestsEntityContentRouteRef, }), ); + +/** @public */ +export const EntityAzureReadmeCard = azureDevOpsPlugin.provide( + createComponentExtension({ + name: 'EntityAzureReadmeCard', + component: { + lazy: () => import('./components/ReadmeCard').then(m => m.ReadmeCard), + }, + }), +); diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index c9730194af..f26dab77f3 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-badges-backend +## 0.1.30-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + ## 0.1.29 ### Patch Changes diff --git a/plugins/badges-backend/api-report.md b/plugins/badges-backend/api-report.md index 0660d23fdb..0ecf41ee85 100644 --- a/plugins/badges-backend/api-report.md +++ b/plugins/badges-backend/api-report.md @@ -9,8 +9,6 @@ import { Entity } from '@backstage/catalog-model'; import express from 'express'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; -// Warning: (ae-missing-release-tag) "Badge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Badge { color?: string; @@ -23,8 +21,6 @@ export interface Badge { style?: BadgeStyle; } -// Warning: (ae-missing-release-tag) "BADGE_STYLES" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const BADGE_STYLES: readonly [ 'plastic', @@ -34,8 +30,6 @@ export const BADGE_STYLES: readonly [ 'social', ]; -// Warning: (ae-missing-release-tag) "BadgeBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BadgeBuilder = { getBadges(): Promise; @@ -43,8 +37,6 @@ export type BadgeBuilder = { createBadgeSvg(options: BadgeOptions): Promise; }; -// Warning: (ae-missing-release-tag) "BadgeContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BadgeContext { // (undocumented) @@ -55,39 +47,29 @@ export interface BadgeContext { entity?: Entity; } -// Warning: (ae-missing-release-tag) "BadgeFactories" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BadgeFactories { // (undocumented) [id: string]: BadgeFactory; } -// Warning: (ae-missing-release-tag) "BadgeFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BadgeFactory { // (undocumented) createBadge(context: BadgeContext): Badge; } -// Warning: (ae-missing-release-tag) "BadgeInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BadgeInfo = { id: string; }; -// Warning: (ae-missing-release-tag) "BadgeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BadgeOptions = { badgeInfo: BadgeInfo; context: BadgeContext; }; -// Warning: (ae-missing-release-tag) "BadgeSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BadgeSpec = { id: string; @@ -96,23 +78,15 @@ export type BadgeSpec = { markdown: string; }; -// Warning: (ae-missing-release-tag) "BadgeStyle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BadgeStyle = typeof BADGE_STYLES[number]; -// Warning: (ae-missing-release-tag) "createDefaultBadgeFactories" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const createDefaultBadgeFactories: () => BadgeFactories; -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "DefaultBadgeBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class DefaultBadgeBuilder implements BadgeBuilder { constructor(factories: BadgeFactories); @@ -126,8 +100,6 @@ export class DefaultBadgeBuilder implements BadgeBuilder { protected getMarkdownCode(params: Badge, badgeUrl: string): string; } -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { // (undocumented) diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index e642121802..de173d3b46 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges-backend", "description": "A Backstage backend plugin that generates README badges for your entities", - "version": "0.1.29", + "version": "0.1.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", @@ -48,7 +48,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/badges-backend/src/badges.ts b/plugins/badges-backend/src/badges.ts index 78108de080..9167116d95 100644 --- a/plugins/badges-backend/src/badges.ts +++ b/plugins/badges-backend/src/badges.ts @@ -31,6 +31,7 @@ function entityUrl(context: BadgeContext): string { return `${catalogUrl}/${entityUri}`.toLowerCase(); } +/** @public */ export const createDefaultBadgeFactories = (): BadgeFactories => ({ pingback: { createBadge: (context: BadgeContext): Badge => { diff --git a/plugins/badges-backend/src/lib/BadgeBuilder/DefaultBadgeBuilder.ts b/plugins/badges-backend/src/lib/BadgeBuilder/DefaultBadgeBuilder.ts index 78e34351a0..efe58078f7 100644 --- a/plugins/badges-backend/src/lib/BadgeBuilder/DefaultBadgeBuilder.ts +++ b/plugins/badges-backend/src/lib/BadgeBuilder/DefaultBadgeBuilder.ts @@ -19,6 +19,7 @@ import { makeBadge, Format } from 'badge-maker'; import { BadgeBuilder, BadgeInfo, BadgeOptions, BadgeSpec } from './types'; import { Badge, BadgeFactories } from '../../types'; +/** @public */ export class DefaultBadgeBuilder implements BadgeBuilder { constructor(private readonly factories: BadgeFactories) {} diff --git a/plugins/badges-backend/src/lib/BadgeBuilder/types.ts b/plugins/badges-backend/src/lib/BadgeBuilder/types.ts index e2be17a7db..fa1dd4a5ad 100644 --- a/plugins/badges-backend/src/lib/BadgeBuilder/types.ts +++ b/plugins/badges-backend/src/lib/BadgeBuilder/types.ts @@ -16,15 +16,18 @@ import { Badge, BadgeContext } from '../../types'; +/** @public */ export type BadgeInfo = { id: string; }; +/** @public */ export type BadgeOptions = { badgeInfo: BadgeInfo; context: BadgeContext; }; +/** @public */ export type BadgeSpec = { /** Badge id */ id: string; @@ -39,6 +42,7 @@ export type BadgeSpec = { markdown: string; }; +/** @public */ export type BadgeBuilder = { getBadges(): Promise; createBadgeJson(options: BadgeOptions): Promise; diff --git a/plugins/badges-backend/src/service/router.ts b/plugins/badges-backend/src/service/router.ts index b7211a0aad..2006b45dc4 100644 --- a/plugins/badges-backend/src/service/router.ts +++ b/plugins/badges-backend/src/service/router.ts @@ -26,6 +26,7 @@ import { NotFoundError } from '@backstage/errors'; import { BadgeBuilder, DefaultBadgeBuilder } from '../lib/BadgeBuilder'; import { BadgeContext, BadgeFactories } from '../types'; +/** @public */ export interface RouterOptions { badgeBuilder?: BadgeBuilder; badgeFactories?: BadgeFactories; @@ -34,6 +35,7 @@ export interface RouterOptions { discovery: PluginEndpointDiscovery; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/badges-backend/src/types.ts b/plugins/badges-backend/src/types.ts index 0467b18155..eec7063f88 100644 --- a/plugins/badges-backend/src/types.ts +++ b/plugins/badges-backend/src/types.ts @@ -17,6 +17,7 @@ import { Config } from '@backstage/config'; import { Entity } from '@backstage/catalog-model'; +/** @public */ export const BADGE_STYLES = [ 'plastic', 'flat', @@ -24,8 +25,11 @@ export const BADGE_STYLES = [ 'for-the-badge', 'social', ] as const; + +/** @public */ export type BadgeStyle = typeof BADGE_STYLES[number]; +/** @public */ export interface Badge { /** Badge message background color. */ color?: string; @@ -48,16 +52,19 @@ export interface Badge { style?: BadgeStyle; } +/** @public */ export interface BadgeContext { badgeUrl: string; config: Config; entity?: Entity; // for entity badges } +/** @public */ export interface BadgeFactory { createBadge(context: BadgeContext): Badge; } +/** @public */ export interface BadgeFactories { [id: string]: BadgeFactory; } diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index 534c433781..5f59e32bbc 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges +## 0.2.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.32 ### Patch Changes diff --git a/plugins/badges/api-report.md b/plugins/badges/api-report.md index e3af0857a4..b051bbb452 100644 --- a/plugins/badges/api-report.md +++ b/plugins/badges/api-report.md @@ -7,18 +7,11 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "badgesPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const badgesPlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-missing-release-tag) "EntityBadgesDialog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityBadgesDialog: ({ - open, - onClose, -}: { +export const EntityBadgesDialog: (props: { open: boolean; onClose?: (() => any) | undefined; }) => JSX.Element; diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 0399835530..8a850e321e 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges", "description": "A Backstage plugin that generates README badges for your entities", - "version": "0.2.32", + "version": "0.2.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,10 +31,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,17 +46,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/badges/src/components/EntityBadgesDialog.tsx b/plugins/badges/src/components/EntityBadgesDialog.tsx index 422dbc96a3..097bba5581 100644 --- a/plugins/badges/src/components/EntityBadgesDialog.tsx +++ b/plugins/badges/src/components/EntityBadgesDialog.tsx @@ -37,12 +37,11 @@ import { } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; -type Props = { +export const EntityBadgesDialog = (props: { open: boolean; onClose?: () => any; -}; - -export const EntityBadgesDialog = ({ open, onClose }: Props) => { +}) => { + const { open, onClose } = props; const theme = useTheme(); const { entity } = useAsyncEntity(); const fullScreen = useMediaQuery(theme.breakpoints.down('sm')); diff --git a/plugins/badges/src/plugin.ts b/plugins/badges/src/plugin.ts index ee88fb31e0..7ef3025458 100644 --- a/plugins/badges/src/plugin.ts +++ b/plugins/badges/src/plugin.ts @@ -22,6 +22,7 @@ import { identityApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const badgesPlugin = createPlugin({ id: 'badges', apis: [ @@ -34,6 +35,7 @@ export const badgesPlugin = createPlugin({ ], }); +/** @public */ export const EntityBadgesDialog = badgesPlugin.provide( createComponentExtension({ name: 'EntityBadgesDialog', diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index d607584548..b6cec7bc0d 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-bazaar-backend +## 0.1.20-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + ## 0.1.19 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 85539c6dab..340a261a97 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,8 +23,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-test-utils": "^0.1.27", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", "@backstage/config": "^1.0.1", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/bazaar-backend/src/service/DatabaseHandler.test.ts b/plugins/bazaar-backend/src/service/DatabaseHandler.test.ts index 3099e5bbb2..e1a722016b 100644 --- a/plugins/bazaar-backend/src/service/DatabaseHandler.test.ts +++ b/plugins/bazaar-backend/src/service/DatabaseHandler.test.ts @@ -16,6 +16,7 @@ import { DatabaseHandler } from './DatabaseHandler'; import { TestDatabaseId, TestDatabases } from '@backstage/backend-test-utils'; +import { Knex as KnexType } from 'knex'; const bazaarProject: any = { name: 'n1', @@ -35,11 +36,24 @@ describe('DatabaseHandler', () => { ids: ['POSTGRES_13', 'POSTGRES_9', 'SQLITE_3'], }); + function createDatabaseManager( + client: KnexType, + skipMigrations: boolean = false, + ) { + return { + getClient: async () => client, + migrations: { + skip: skipMigrations, + }, + }; + } + async function createDatabaseHandler(databaseId: TestDatabaseId) { const knex = await databases.init(databaseId); + const databaseManager = createDatabaseManager(knex); return { knex, - dbHandler: await DatabaseHandler.create({ database: knex }), + dbHandler: await DatabaseHandler.create({ database: databaseManager }), }; } diff --git a/plugins/bazaar-backend/src/service/DatabaseHandler.ts b/plugins/bazaar-backend/src/service/DatabaseHandler.ts index 7da06a54b8..d8d975b7ed 100644 --- a/plugins/bazaar-backend/src/service/DatabaseHandler.ts +++ b/plugins/bazaar-backend/src/service/DatabaseHandler.ts @@ -14,7 +14,10 @@ * limitations under the License. */ -import { resolvePackagePath } from '@backstage/backend-common'; +import { + PluginDatabaseManager, + resolvePackagePath, +} from '@backstage/backend-common'; import { Knex } from 'knex'; const migrationsDir = resolvePackagePath( @@ -23,24 +26,27 @@ const migrationsDir = resolvePackagePath( ); type Options = { - database: Knex; + database: PluginDatabaseManager; }; export class DatabaseHandler { static async create(options: Options): Promise { const { database } = options; + const client = await database.getClient(); - await database.migrate.latest({ - directory: migrationsDir, - }); + if (!database.migrations?.skip) { + await client.migrate.latest({ + directory: migrationsDir, + }); + } - return new DatabaseHandler(options); + return new DatabaseHandler(client); } - private readonly database: Knex; + private readonly client: Knex; - private constructor(options: Options) { - this.database = options.database; + private constructor(client: Knex) { + this.client = client; } private columns = [ @@ -58,14 +64,11 @@ export class DatabaseHandler { ]; async getMembers(id: string) { - return await this.database - .select('*') - .from('members') - .where({ item_id: id }); + return await this.client.select('*').from('members').where({ item_id: id }); } async addMember(id: number, userId: string, picture?: string) { - await this.database + await this.client .insert({ item_id: id, user_id: userId, @@ -75,18 +78,18 @@ export class DatabaseHandler { } async deleteMember(id: number, userId: string) { - return await this.database('members') + return await this.client('members') .where({ item_id: id }) .andWhere('user_id', userId) .del(); } async getMetadataById(id: number) { - const coalesce = this.database.raw( + const coalesce = this.client.raw( 'coalesce(count(members.item_id), 0) as members_count', ); - return await this.database('metadata') + return await this.client('metadata') .select([...this.columns, coalesce]) .where({ 'metadata.id': id }) .groupBy(this.columns) @@ -94,11 +97,11 @@ export class DatabaseHandler { } async getMetadataByRef(entityRef: string) { - const coalesce = this.database.raw( + const coalesce = this.client.raw( 'coalesce(count(members.item_id), 0) as members_count', ); - return await this.database('metadata') + return await this.client('metadata') .select([...this.columns, coalesce]) .where({ 'metadata.entity_ref': entityRef }) .groupBy(this.columns) @@ -118,7 +121,7 @@ export class DatabaseHandler { responsible, } = bazaarProject; - await this.database + await this.client .insert({ name, entity_ref: entityRef, @@ -148,7 +151,7 @@ export class DatabaseHandler { responsible, } = bazaarProject; - return await this.database('metadata').where({ id: id }).update({ + return await this.client('metadata').where({ id: id }).update({ name, entity_ref: entityRef, description, @@ -163,15 +166,15 @@ export class DatabaseHandler { } async deleteMetadata(id: number) { - return await this.database('metadata').where({ id: id }).del(); + return await this.client('metadata').where({ id: id }).del(); } async getProjects() { - const coalesce = this.database.raw( + const coalesce = this.client.raw( 'coalesce(count(members.item_id), 0) as members_count', ); - return await this.database('metadata') + return await this.client('metadata') .select([...this.columns, coalesce]) .groupBy(this.columns) .leftJoin('members', 'metadata.id', '=', 'members.item_id'); diff --git a/plugins/bazaar-backend/src/service/router.ts b/plugins/bazaar-backend/src/service/router.ts index c61309d279..a5248c2949 100644 --- a/plugins/bazaar-backend/src/service/router.ts +++ b/plugins/bazaar-backend/src/service/router.ts @@ -33,9 +33,8 @@ export async function createRouter( options: RouterOptions, ): Promise { const { logger, database } = options; - const db = await database.getClient(); - const dbHandler = await DatabaseHandler.create({ database: db }); + const dbHandler = await DatabaseHandler.create({ database }); logger.info('Initializing Bazaar backend'); diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index c1c9f91eed..ffb5d62bb3 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-bazaar +## 0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/cli@0.18.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + ## 0.1.23 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index db2b72f920..4d39f92a09 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.23", + "version": "0.1.24-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,13 +24,13 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/cli": "^0.18.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@date-io/luxon": "1.x", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -47,8 +47,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", "@testing-library/jest-dom": "^5.10.1", "cross-fetch": "^3.1.5" }, diff --git a/plugins/bitbucket-cloud-common/CHANGELOG.md b/plugins/bitbucket-cloud-common/CHANGELOG.md index e6c2f366d6..4c31b9fccd 100644 --- a/plugins/bitbucket-cloud-common/CHANGELOG.md +++ b/plugins/bitbucket-cloud-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitbucket-cloud-common +## 0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/integration@1.3.1-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index 5ae5ea33f5..217db60c1e 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitbucket-cloud-common", "description": "Common functionalities for bitbucket-cloud plugins", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,13 +28,13 @@ "update-models": "yarn refresh-schema && yarn generate-models && yarn reduce-models" }, "dependencies": { - "@backstage/integration": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", "cross-fetch": "^3.1.5" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@openapitools/openapi-generator-cli": "^2.4.26", - "msw": "^0.44.0", + "msw": "^0.45.0", "ts-morph": "^15.0.0" }, "files": [ diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index 8fd4113dd2..531efcf02d 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bitrise +## 0.1.36-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.35 ### Patch Changes diff --git a/plugins/bitrise/api-report.md b/plugins/bitrise/api-report.md index f8421a532a..01d10c61cf 100644 --- a/plugins/bitrise/api-report.md +++ b/plugins/bitrise/api-report.md @@ -8,18 +8,15 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; -// Warning: (ae-missing-release-tag) "bitrisePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const BITRISE_APP_ANNOTATION = 'bitrise.io/app'; + // @public (undocumented) export const bitrisePlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-missing-release-tag) "EntityBitriseContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityBitriseContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isBitriseAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isBitriseAvailable: (entity: Entity) => boolean; ``` diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 9045bdd64f..558cf618b3 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitrise", "description": "A Backstage plugin that integrates towards Bitrise", - "version": "0.1.35", + "version": "0.1.36-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,9 +25,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,17 +43,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "@types/recharts": "^1.8.15", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx b/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx index 19e97628df..2dcffc3bb3 100644 --- a/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx +++ b/plugins/bitrise/src/components/BitriseBuildDetailsDialog/BitriseBuildDetailsDialog.test.tsx @@ -20,7 +20,7 @@ import { BitriseBuildDetailsDialog } from './BitriseBuildDetailsDialog'; import { BitriseBuildResult } from '../../api/bitriseApi.model'; jest.mock('../BitriseArtifactsComponent', () => ({ - BitriseArtifactsComponent: (_props: { build: string }) => <>, + BitriseArtifactsComponent: (_props: { build: string }) => <>VISIBLE, })); describe('BitriseArtifactsComponent', () => { @@ -42,18 +42,14 @@ describe('BitriseArtifactsComponent', () => { expect(await rendered.findByTestId('btn')).toBeInTheDocument(); }); - it('should change the state when the button is clicked', async () => { - const setOpen = jest.fn(); - const useStateMock: any = (initState: any) => [initState, setOpen]; - - jest.spyOn(React, 'useState').mockImplementation(useStateMock); - + it('should open the modal when clicked to render the ArtifactsComponent', async () => { const rendered = renderComponent(); - const btn = await rendered.findByTestId('btn'); + expect(await rendered.queryByText('VISIBLE')).not.toBeInTheDocument(); + btn.click(); - expect(setOpen).toHaveBeenCalled(); + expect(rendered.getByText('VISIBLE')).toBeInTheDocument(); }); }); diff --git a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx index f805f050fa..3c93fb20d7 100644 --- a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx +++ b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx @@ -32,8 +32,10 @@ export type Props = { entity: Entity; }; +/** @public */ export const BITRISE_APP_ANNOTATION = 'bitrise.io/app'; +/** @public */ export const isBitriseAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[BITRISE_APP_ANNOTATION]); diff --git a/plugins/bitrise/src/extensions.ts b/plugins/bitrise/src/extensions.ts index ccb5fb24dd..e588f092d8 100644 --- a/plugins/bitrise/src/extensions.ts +++ b/plugins/bitrise/src/extensions.ts @@ -17,6 +17,7 @@ import { bitrisePlugin } from './plugin'; import { createComponentExtension } from '@backstage/core-plugin-api'; +/** @public */ export const EntityBitriseContent = bitrisePlugin.provide( createComponentExtension({ name: 'EntityBitriseContent', diff --git a/plugins/bitrise/src/index.ts b/plugins/bitrise/src/index.ts index 3cf1389013..54cce62cec 100644 --- a/plugins/bitrise/src/index.ts +++ b/plugins/bitrise/src/index.ts @@ -22,4 +22,7 @@ export { bitrisePlugin } from './plugin'; export { EntityBitriseContent } from './extensions'; -export { isBitriseAvailable } from './components/BitriseBuildsComponent'; +export { + isBitriseAvailable, + BITRISE_APP_ANNOTATION, +} from './components/BitriseBuildsComponent'; diff --git a/plugins/bitrise/src/plugin.ts b/plugins/bitrise/src/plugin.ts index 92beda287c..2b75f6d8b5 100644 --- a/plugins/bitrise/src/plugin.ts +++ b/plugins/bitrise/src/plugin.ts @@ -28,6 +28,7 @@ export const bitriseApiRef = createApiRef({ id: 'plugin.bitrise.service', }); +/** @public */ export const bitrisePlugin = createPlugin({ id: 'bitrise', apis: [ diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index ab7ac4b3ac..8f9db30419 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.8 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index 5b4eefb70b..a2f7c499dd 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", "description": "A Backstage catalog backend module that helps integrate towards AWS", - "version": "0.1.8", + "version": "0.1.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,13 +33,13 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "aws-sdk": "^2.840.0", "lodash": "^4.17.21", @@ -48,7 +48,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", "aws-sdk-mock": "^5.2.1", "yaml": "^2.0.0" diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index d7f0d022ce..fa502fe75a 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 3c76cc870f..ccb6985475 100644 --- a/plugins/catalog-backend-module-azure/package.json +++ b/plugins/catalog-backend-module-azure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-azure", "description": "A Backstage catalog backend module that helps integrate towards Azure", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,23 +33,23 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", - "msw": "^0.44.0", + "msw": "^0.45.0", "uuid": "^8.0.0", "node-fetch": "^2.6.7", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index 2586ee3a5a..17a73fc25c 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-tasks@0.3.5-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.1.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index d335b06b1a..4d9da39c66 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-cloud", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket Cloud", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,19 +33,19 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-bitbucket-cloud-common": "^0.1.2", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-bitbucket-cloud-common": "^0.1.3-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", - "msw": "^0.44.0" + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md index 216de9ff65..8fcfee0ba5 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 02c16f0a12..8facc9cceb 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-server", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,21 +32,21 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.0.1", "@backstage/config": "^1.0.0", "@backstage/errors": "^1.0.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "cross-fetch": "^3.1.5", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", - "msw": "^0.44.0" + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md index 1f1761bc71..e7bebee4b7 100644 --- a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket +## 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 diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json index 92f29ef6f1..36b669c81d 100644 --- a/plugins/catalog-backend-module-bitbucket/package.json +++ b/plugins/catalog-backend-module-bitbucket/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,22 +33,22 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-bitbucket-cloud-common": "^0.1.2", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-bitbucket-cloud-common": "^0.1.3-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", - "msw": "^0.44.0", + "msw": "^0.45.0", "node-fetch": "^2.6.7", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index b4292da75c..73f86afd2f 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index 8a36c90796..b81603232c 100644 --- a/plugins/catalog-backend-module-gerrit/package.json +++ b/plugins/catalog-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gerrit", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -28,22 +28,22 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "fs-extra": "10.1.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "node-fetch": "^2.6.7", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/fs-extra": "^9.0.1" }, "files": [ diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index 2e9c03529b..72fb0d52df 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-github +## 0.1.7-next.0 + +### Patch Changes + +- 3c4a388537: New experimental alpha exports for use with the upcoming backend system. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/api-report.md b/plugins/catalog-backend-module-github/api-report.md index 3e4c2cb06b..8e8055bafc 100644 --- a/plugins/catalog-backend-module-github/api-report.md +++ b/plugins/catalog-backend-module-github/api-report.md @@ -3,6 +3,7 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; import { CatalogProcessor } from '@backstage/plugin-catalog-backend'; import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend'; import { Config } from '@backstage/config'; @@ -14,6 +15,7 @@ import { LocationSpec } from '@backstage/plugin-catalog-backend'; import { Logger } from 'winston'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { TaskRunner } from '@backstage/backend-tasks'; +import { TaskScheduleDefinition } from '@backstage/backend-tasks'; // @public export class GithubDiscoveryProcessor implements CatalogProcessor { @@ -58,6 +60,16 @@ export class GitHubEntityProvider implements EntityProvider { refresh(logger: Logger): Promise; } +// @alpha +export const githubEntityProviderCatalogModule: ( + options?: GithubEntityProviderCatalogModuleOptions | undefined, +) => BackendFeature; + +// @alpha +export type GithubEntityProviderCatalogModuleOptions = { + schedule?: TaskScheduleDefinition; +}; + // @public export type GithubMultiOrgConfig = Array<{ name: string; diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index a0b7f10833..9dade48c04 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-github", "description": "A Backstage catalog backend module that helps integrate towards GitHub", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -9,7 +9,8 @@ "publishConfig": { "access": "public", "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "alphaTypes": "dist/index.alpha.d.ts" }, "backstage": { "role": "backend-plugin-module" @@ -24,7 +25,7 @@ "backstage" ], "scripts": { - "build": "backstage-cli package build", + "build": "backstage-cli package build --experimental-type-build", "lint": "backstage-cli package lint", "test": "backstage-cli package test", "prepack": "backstage-cli package prepack", @@ -33,28 +34,31 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", + "@backstage/backend-plugin-api": "^0.1.2-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", "@backstage/types": "^1.0.0", "@octokit/graphql": "^5.0.0", "lodash": "^4.17.21", - "msw": "^0.44.0", + "msw": "^0.45.0", "node-fetch": "^2.6.7", "uuid": "^8.0.0", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ "dist", + "alpha", "config.d.ts" ], "configSchema": "config.d.ts" diff --git a/plugins/catalog-backend-module-github/src/index.ts b/plugins/catalog-backend-module-github/src/index.ts index 22a1167d48..d793d48f1e 100644 --- a/plugins/catalog-backend-module-github/src/index.ts +++ b/plugins/catalog-backend-module-github/src/index.ts @@ -27,3 +27,5 @@ export { GitHubEntityProvider } from './providers/GitHubEntityProvider'; export { GitHubOrgEntityProvider } from './providers/GitHubOrgEntityProvider'; export type { GitHubOrgEntityProviderOptions } from './providers/GitHubOrgEntityProvider'; export type { GithubMultiOrgConfig } from './lib'; +export { githubEntityProviderCatalogModule } from './module'; +export type { GithubEntityProviderCatalogModuleOptions } from './module'; diff --git a/plugins/catalog-backend-module-github/src/module.ts b/plugins/catalog-backend-module-github/src/module.ts new file mode 100644 index 0000000000..4eccef0611 --- /dev/null +++ b/plugins/catalog-backend-module-github/src/module.ts @@ -0,0 +1,69 @@ +/* + * Copyright 2022 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 { + createBackendModule, + loggerToWinstonLogger, + configServiceRef, + loggerServiceRef, + schedulerServiceRef, +} from '@backstage/backend-plugin-api'; +import { TaskScheduleDefinition } from '@backstage/backend-tasks'; +import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node'; +import { GitHubEntityProvider } from './providers/GitHubEntityProvider'; + +/** + * Options for {@link githubEntityProviderCatalogModule}. + * + * @alpha + */ +export type GithubEntityProviderCatalogModuleOptions = { + schedule?: TaskScheduleDefinition; +}; + +/** + * Registers the GitHubEntityProvider with the catalog processing extension point. + * + * @alpha + */ +export const githubEntityProviderCatalogModule = createBackendModule({ + pluginId: 'catalog', + moduleId: 'github-entity-provider', + register(env, options?: GithubEntityProviderCatalogModuleOptions) { + env.registerInit({ + deps: { + config: configServiceRef, + catalog: catalogProcessingExtensionPoint, + logger: loggerServiceRef, + scheduler: schedulerServiceRef, + }, + async init({ config, catalog, logger, scheduler }) { + const scheduleDef = options?.schedule ?? { + frequency: { seconds: 600 }, + timeout: { seconds: 900 }, + initialDelay: { seconds: 3 }, + }; + + catalog.addEntityProvider( + GitHubEntityProvider.fromConfig(config, { + logger: loggerToWinstonLogger(logger), + schedule: scheduler.createScheduledTaskRunner(scheduleDef), + }), + ); + }, + }); + }, +}); diff --git a/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts b/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts index a40ab4eb5c..5cc464d345 100644 --- a/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts +++ b/plugins/catalog-backend-module-github/src/providers/GitHubEntityProvider.test.ts @@ -21,6 +21,11 @@ import { EntityProviderConnection } from '@backstage/plugin-catalog-backend'; import { GitHubEntityProvider } from './GitHubEntityProvider'; import * as helpers from '../lib/github'; +jest.mock('../lib/github', () => { + return { + getOrganizationRepositories: jest.fn(), + }; +}); class PersistingTaskRunner implements TaskRunner { private tasks: TaskInvocationDefinition[] = []; diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index e3f269514b..dbd243050e 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index a5f9259764..0146c7af45 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", "description": "A Backstage catalog backend module that helps integrate towards GitLab", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,23 +33,23 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "lodash": "^4.17.21", - "msw": "^0.44.0", + "msw": "^0.45.0", "node-fetch": "^2.6.7", "winston": "^3.2.1", "uuid": "^8.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", "@types/uuid": "^8.0.0" }, diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 8e41d6325b..dec2c7a657 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.5.3-next.0 + +### Patch Changes + +- c54fcea9af: Now the `searchStream` method in LDAP client awaits the callbacks +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + ## 0.5.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/api-report.md b/plugins/catalog-backend-module-ldap/api-report.md index 90e58b3fb2..9876c163e8 100644 --- a/plugins/catalog-backend-module-ldap/api-report.md +++ b/plugins/catalog-backend-module-ldap/api-report.md @@ -90,7 +90,7 @@ export class LdapClient { searchStreaming( dn: string, options: SearchOptions, - f: (entry: SearchEntry) => void, + f: (entry: SearchEntry) => Promise | void, ): Promise; } diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 1de6cbd331..1244605ff9 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", "description": "A Backstage catalog backend module that helps integrate towards LDAP", - "version": "0.5.2", + "version": "0.5.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,11 +33,11 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@backstage/types": "^1.0.0", "@types/ldapjs": "^2.2.0", "ldapjs": "^2.2.0", @@ -46,7 +46,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151" }, "files": [ diff --git a/plugins/catalog-backend-module-ldap/src/ldap/client.ts b/plugins/catalog-backend-module-ldap/src/ldap/client.ts index d9d0faf9a2..0afeb16248 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/client.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/client.ts @@ -14,12 +14,12 @@ * limitations under the License. */ -import { ForwardedError } from '@backstage/errors'; +import { ForwardedError, stringifyError } from '@backstage/errors'; import ldap, { Client, SearchEntry, SearchOptions } from 'ldapjs'; import { cloneDeep } from 'lodash'; import { Logger } from 'winston'; import { BindConfig, TLSConfig } from './config'; -import { errorString } from './util'; +import { createOptions, errorString } from './util'; import { ActiveDirectoryVendor, DefaultLdapVendor, @@ -147,23 +147,45 @@ export class LdapClient { async searchStreaming( dn: string, options: SearchOptions, - f: (entry: SearchEntry) => void, + f: (entry: SearchEntry) => Promise | void, ): Promise { try { return await new Promise((resolve, reject) => { // Note that we clone the (frozen) options, since ldapjs rudely tries to // overwrite parts of them - this.client.search(dn, cloneDeep(options), (err, res) => { + this.client.search(dn, createOptions(options), (err, res) => { if (err) { reject(new Error(errorString(err))); } + let awaitList: Array | void> = []; + let transformError = false; + + const transformReject = (e: Error) => { + transformError = true; + reject( + new Error( + `Transform function threw an exception, ${stringifyError(e)}`, + ), + ); + }; res.on('searchReference', () => { this.logger.warn('Received unsupported search referral'); }); res.on('searchEntry', entry => { - f(entry); + if (!transformError) awaitList.push(f(entry)); + }); + + res.on('page', (_, cb) => { + // awaits completion before fetching next page + Promise.all(awaitList) + .then(() => { + // flush list + awaitList = []; + if (cb) cb(); + }) + .catch(transformReject); }); res.on('error', e => { @@ -176,7 +198,9 @@ export class LdapClient { } else if (r.status !== 0) { throw new Error(`Got status ${r.status}: ${r.errorMessage}`); } else { - resolve(); + Promise.all(awaitList) + .then(() => resolve()) + .catch(transformReject); } }); }); diff --git a/plugins/catalog-backend-module-ldap/src/ldap/util.test.ts b/plugins/catalog-backend-module-ldap/src/ldap/util.test.ts index 5978012875..d8787b1226 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/util.test.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/util.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { errorString } from './util'; +import { errorString, createOptions } from './util'; describe('errorString', () => { it('formats', () => { @@ -22,3 +22,52 @@ describe('errorString', () => { expect(errorString(e)).toEqual('1 n: m'); }); }); + +describe('createOptions', () => { + it('should add pagePause', () => { + const options = { + filter: 'f', + paged: true, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 0, + typesOnly: false, + }; + expect(createOptions(options)).toEqual({ + filter: 'f', + paged: { pagePause: true }, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 0, + typesOnly: false, + }); + const options2 = { + filter: 'f', + paged: {}, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 0, + typesOnly: false, + }; + expect(createOptions(options2)).toEqual({ + filter: 'f', + paged: { pagePause: true }, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 0, + typesOnly: false, + }); + }); + + it('should not add pagePause', () => { + const options = { + filter: 'f', + paged: false, + timeLimit: 42, + sizeLimit: 100, + derefAliases: 0, + typesOnly: false, + }; + expect(createOptions(options)).toEqual(options); + }); +}); diff --git a/plugins/catalog-backend-module-ldap/src/ldap/util.ts b/plugins/catalog-backend-module-ldap/src/ldap/util.ts index 0f443c1a86..74b8fe4f88 100644 --- a/plugins/catalog-backend-module-ldap/src/ldap/util.ts +++ b/plugins/catalog-backend-module-ldap/src/ldap/util.ts @@ -14,7 +14,8 @@ * limitations under the License. */ -import { Error as LDAPError, SearchEntry } from 'ldapjs'; +import { Error as LDAPError, SearchEntry, SearchOptions } from 'ldapjs'; +import { cloneDeep } from 'lodash'; import { LdapVendor } from './vendors'; /** @@ -54,6 +55,18 @@ export function mapStringAttr( } } +export function createOptions(inputOptions: SearchOptions): SearchOptions { + const result = cloneDeep(inputOptions); + + if (result.paged === true) { + result.paged = { pagePause: true }; + } else if (typeof result.paged === 'object') { + result.paged.pagePause = true; + } + + return result; +} + export type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index f914f83f00..8da7b81927 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.4.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 4c82b955fc: Fix typo +- Updated dependencies + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + ## 0.4.1 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/README.md b/plugins/catalog-backend-module-msgraph/README.md index 23166a755d..fe2e568b5a 100644 --- a/plugins/catalog-backend-module-msgraph/README.md +++ b/plugins/catalog-backend-module-msgraph/README.md @@ -80,7 +80,7 @@ catalog: # See https://docs.microsoft.com/en-us/graph/search-query-parameter search: '"description:One" AND ("displayName:Video" OR "displayName:Drive")' # Optional select for groups, this will allow you work with schemaExtensions - # in order to add extra information to your groups that can be used on you custom groupTransformers + # in order to add extra information to your groups that can be used on your custom groupTransformers # See https://docs.microsoft.com/en-us/graph/api/resources/schemaextension?view=graph-rest-1.0 select: ['id', 'displayName', 'description'] ``` diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 383dd42fcf..835a9e2846 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph", - "version": "0.4.1", + "version": "0.4.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,10 +34,10 @@ }, "dependencies": { "@azure/identity": "^2.1.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/plugin-catalog-backend": "^1.3.1", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", "@microsoft/microsoft-graph-types": "^2.6.0", "@types/node-fetch": "^2.5.12", "lodash": "^4.17.21", @@ -48,11 +48,11 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md index 660fbd4148..692239989b 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.2-next.0 + +### Patch Changes + +- 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-catalog-node@1.0.2-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index ce08fcf4d3..ecf2a6b756 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-openapi", "description": "A Backstage catalog backend module that helps with OpenAPI specifications", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,19 +34,19 @@ }, "dependencies": { "@apidevtools/swagger-parser": "^10.1.0", - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", - "@backstage/plugin-catalog-node": "^1.0.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", "@backstage/types": "^1.0.0", "winston": "^3.2.1", "yaml": "^2.1.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "openapi-types": "^12.0.0" }, "files": [ diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index bc287ad98a..9810c789d7 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-backend +## 1.3.2-next.0 + +### Patch Changes + +- 243533ecdc: Added support to mysql on some raw queries +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.3.1 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 45e447efe8..f90b051a75 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "1.3.1", + "version": "1.3.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,19 +34,19 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-plugin-api": "^0.1.1", - "@backstage/plugin-catalog-node": "^1.0.1", - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-plugin-api": "^0.1.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-node": "^0.6.4", - "@backstage/plugin-scaffolder-common": "^1.1.2", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-node": "^0.6.5-next.0", + "@backstage/plugin-scaffolder-common": "^1.2.0-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", "codeowners-utils": "^1.0.2", @@ -70,17 +70,17 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-search-backend-node": "1.0.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-search-backend-node": "1.0.2-next.0", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", "better-sqlite3": "^7.5.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3", "wait-for-expect": "^3.0.2", "luxon": "^3.0.0" diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts index c9b71d096d..1cf2643339 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts @@ -113,7 +113,10 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { // Delete old relations let previousRelationRows: DbRelationsRow[]; - if (tx.client.config.client.includes('sqlite3')) { + if ( + tx.client.config.client.includes('sqlite3') || + tx.client.config.client.includes('mysql') + ) { previousRelationRows = await tx('relations') .select('*') .where({ originating_entity_id: id }); @@ -201,6 +204,13 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { if (toRemove.length) { let removedCount = 0; + const rootId = () => { + if (tx.client.config.client.includes('mysql')) { + return tx.raw('CAST(NULL as UNSIGNED INT)', []); + } + + return tx.raw('CAST(NULL as INT)', []); + }; for (const refs of lodash.chunk(toRemove, 1000)) { /* WITH RECURSIVE @@ -266,7 +276,7 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { .withRecursive('ancestors', function ancestors(outer) { return outer .select({ - root_id: tx.raw('CAST(NULL as INT)', []), + root_id: rootId(), via_entity_ref: 'entity_ref', to_entity_ref: 'entity_ref', }) @@ -435,15 +445,26 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { .orderBy('next_update_at', 'asc'); const interval = this.options.refreshInterval(); + + const nextUpdateAt = (refreshInterval: number) => { + if (tx.client.config.client.includes('sqlite3')) { + return tx.raw(`datetime('now', ?)`, [`${refreshInterval} seconds`]); + } + + if (tx.client.config.client.includes('mysql')) { + return tx.raw(`now() + interval ${refreshInterval} second`); + } + + return tx.raw(`now() + interval '${refreshInterval} seconds'`); + }; + await tx('refresh_state') .whereIn( 'entity_ref', items.map(i => i.entity_ref), ) .update({ - next_update_at: tx.client.config.client.includes('sqlite3') - ? tx.raw(`datetime('now', ?)`, [`${interval} seconds`]) - : tx.raw(`now() + interval '${interval} seconds'`), + next_update_at: nextUpdateAt(interval), }); return { diff --git a/plugins/catalog-backend/src/service/CatalogPlugin.ts b/plugins/catalog-backend/src/service/CatalogPlugin.ts index ed356df5a2..64e1e52494 100644 --- a/plugins/catalog-backend/src/service/CatalogPlugin.ts +++ b/plugins/catalog-backend/src/service/CatalogPlugin.ts @@ -35,12 +35,16 @@ class CatalogExtensionPointImpl implements CatalogProcessingExtensionPoint { #processors = new Array(); #entityProviders = new Array(); - addProcessor(processor: CatalogProcessor): void { - this.#processors.push(processor); + addProcessor( + ...processors: Array> + ): void { + this.#processors.push(...processors.flat()); } - addEntityProvider(provider: EntityProvider): void { - this.#entityProviders.push(provider); + addEntityProvider( + ...providers: Array> + ): void { + this.#entityProviders.push(...providers.flat()); } get processors() { diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index b3e150edc8..45d1e9bbec 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-common +## 1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.5 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 09911048ee..835fdb411e 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-common", "description": "Common functionalities for the catalog plugin", - "version": "1.0.5", + "version": "1.0.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-search-common": "^1.0.0" + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/catalog-customized/CHANGELOG.md b/plugins/catalog-customized/CHANGELOG.md index 7d4ce71cb2..d8c95242db 100644 --- a/plugins/catalog-customized/CHANGELOG.md +++ b/plugins/catalog-customized/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-catalog-customized +## 0.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + ## 0.0.1 ### Patch Changes diff --git a/plugins/catalog-customized/package.json b/plugins/catalog-customized/package.json index 747897da41..6513b62d53 100644 --- a/plugins/catalog-customized/package.json +++ b/plugins/catalog-customized/package.json @@ -1,7 +1,7 @@ { "name": "@internal/plugin-catalog-customized", "description": "The internal Backstage Customizable plugin for browsing the Backstage catalog", - "version": "0.0.1", + "version": "0.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-catalog-react": "^1.1.3" + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0" }, "devDependencies": { "@types/react": "^16.13.1 || ^17.0.0" diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 398aec357f..380d4610ab 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-graph +## 0.2.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.20 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 14f5aecb0d..d74c10b50a 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.2.20", + "version": "0.2.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,11 +24,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -45,11 +45,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/types": "^1.0.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", diff --git a/plugins/catalog-graphql/CHANGELOG.md b/plugins/catalog-graphql/CHANGELOG.md index 3f2ffd4f64..92da5866ca 100644 --- a/plugins/catalog-graphql/CHANGELOG.md +++ b/plugins/catalog-graphql/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-catalog-graphql +## 0.3.13-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + ## 0.3.12 ### Patch Changes diff --git a/plugins/catalog-graphql/api-report.md b/plugins/catalog-graphql/api-report.md index e14fd988d0..f03ed94af5 100644 --- a/plugins/catalog-graphql/api-report.md +++ b/plugins/catalog-graphql/api-report.md @@ -7,13 +7,9 @@ import { Config } from '@backstage/config'; import { Logger } from 'winston'; import { Module } from 'graphql-modules'; -// Warning: (ae-missing-release-tag) "createModule" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createModule(options: ModuleOptions): Promise; -// Warning: (ae-missing-release-tag) "ModuleOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ModuleOptions { // (undocumented) diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 25ba1cb492..af85222603 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-graphql", "description": "An experimental Backstage catalog GraphQL module", - "version": "0.3.12", + "version": "0.3.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -46,14 +46,14 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@graphql-codegen/cli": "^2.3.1", "@graphql-codegen/graphql-modules-preset": "^2.3.2", "@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript-resolvers": "^2.4.3", "@graphql-tools/schema": "^9.0.0", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/catalog-graphql/src/graphql/module.ts b/plugins/catalog-graphql/src/graphql/module.ts index e33ee429b4..e27adbbaf1 100644 --- a/plugins/catalog-graphql/src/graphql/module.ts +++ b/plugins/catalog-graphql/src/graphql/module.ts @@ -27,11 +27,13 @@ import GraphQLJSON, { GraphQLJSONObject } from 'graphql-type-json'; import { Entity } from '@backstage/catalog-model'; import typeDefs from '../schema'; +/** @public */ export interface ModuleOptions { logger: Logger; config: Config; } +/** @public */ export async function createModule(options: ModuleOptions): Promise { const catalogClient = new CatalogClient( options.config.getString('backend.baseUrl'), diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index bbed459737..7a157d4bd6 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-import +## 0.8.12-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.8.11 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 006decf867..3e02888b94 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-import", "description": "A Backstage plugin the helps you import entities into your catalog", - "version": "0.8.11", + "version": "0.8.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,15 +34,15 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", @@ -60,17 +60,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/catalog-import/src/api/CatalogImportClient.test.ts b/plugins/catalog-import/src/api/CatalogImportClient.test.ts index 5a65738d61..98aea30638 100644 --- a/plugins/catalog-import/src/api/CatalogImportClient.test.ts +++ b/plugins/catalog-import/src/api/CatalogImportClient.test.ts @@ -37,7 +37,7 @@ const octokit = { }, }; -jest.doMock('@octokit/rest', () => { +jest.mock('@octokit/rest', () => { class Octokit { constructor() { return octokit; diff --git a/plugins/catalog-node/CHANGELOG.md b/plugins/catalog-node/CHANGELOG.md index 04b65bb4ba..ac0e62054c 100644 --- a/plugins/catalog-node/CHANGELOG.md +++ b/plugins/catalog-node/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-node +## 1.0.2-next.0 + +### Patch Changes + +- 62788b2ee8: The experimental `CatalogProcessingExtensionPoint` now accepts multiple providers and processors at once. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.2-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/catalog-node/api-report.md b/plugins/catalog-node/api-report.md index 46e3efef99..26617910b9 100644 --- a/plugins/catalog-node/api-report.md +++ b/plugins/catalog-node/api-report.md @@ -13,9 +13,13 @@ import { JsonValue } from '@backstage/types'; // @alpha (undocumented) export interface CatalogProcessingExtensionPoint { // (undocumented) - addEntityProvider(provider: EntityProvider): void; + addEntityProvider( + ...providers: Array> + ): void; // (undocumented) - addProcessor(processor: CatalogProcessor): void; + addProcessor( + ...processors: Array> + ): void; } // @alpha (undocumented) diff --git a/plugins/catalog-node/package.json b/plugins/catalog-node/package.json index 08f61b699c..4513f8ab2b 100644 --- a/plugins/catalog-node/package.json +++ b/plugins/catalog-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-node", "description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,14 +25,14 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-plugin-api": "^0.1.1", + "@backstage/backend-plugin-api": "^0.1.2-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/errors": "1.1.0", "@backstage/types": "^1.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/cli": "^0.18.1" + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/catalog-node/src/extensions.ts b/plugins/catalog-node/src/extensions.ts index 80fbd7630f..8dd9d8579a 100644 --- a/plugins/catalog-node/src/extensions.ts +++ b/plugins/catalog-node/src/extensions.ts @@ -21,8 +21,12 @@ import { CatalogProcessor } from './api/processor'; * @alpha */ export interface CatalogProcessingExtensionPoint { - addProcessor(processor: CatalogProcessor): void; - addEntityProvider(provider: EntityProvider): void; + addProcessor( + ...processors: Array> + ): void; + addEntityProvider( + ...providers: Array> + ): void; } /** diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 964e1e0017..5176b633ba 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-react +## 1.1.4-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + ## 1.1.3 ### Patch Changes diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 5232c49150..6e0ba235b7 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -109,20 +109,13 @@ export const columnFactories: Readonly<{ createEntityRefColumn(options: { defaultKind?: string; }): TableColumn; - createEntityRelationColumn({ - title, - relation, - defaultKind, - filter: entityFilter, - }: { + createEntityRelationColumn(options: { title: string; relation: string; - defaultKind?: string | undefined; - filter?: - | { - kind: string; - } - | undefined; + defaultKind?: string; + filter?: { + kind: string; + }; }): TableColumn; createOwnerColumn(): TableColumn; createDomainColumn(): TableColumn; @@ -324,12 +317,7 @@ export const EntityTable: { createEntityRefColumn(options: { defaultKind?: string | undefined; }): TableColumn; - createEntityRelationColumn({ - title, - relation, - defaultKind, - filter: entityFilter, - }: { + createEntityRelationColumn(options: { title: string; relation: string; defaultKind?: string | undefined; diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 08987df622..291def38c6 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "1.1.3", + "version": "1.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,15 +34,15 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-react": "^0.4.4", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@backstage/version-bridge": "^1.0.1", @@ -63,11 +63,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-scaffolder-common": "^1.1.2", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-scaffolder-common": "^1.2.0-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/catalog-react/src/components/EntityTable/columns.tsx b/plugins/catalog-react/src/components/EntityTable/columns.tsx index 72b6931e94..292235c78c 100644 --- a/plugins/catalog-react/src/components/EntityTable/columns.tsx +++ b/plugins/catalog-react/src/components/EntityTable/columns.tsx @@ -70,17 +70,14 @@ export const columnFactories = Object.freeze({ ), }; }, - createEntityRelationColumn({ - title, - relation, - defaultKind, - filter: entityFilter, - }: { + createEntityRelationColumn(options: { title: string; relation: string; defaultKind?: string; filter?: { kind: string }; }): TableColumn { + const { title, relation, defaultKind, filter: entityFilter } = options; + function getRelations(entity: T): CompoundEntityRef[] { return getEntityRelations(entity, relation, entityFilter); } diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 578b51c61b..cc178e78c5 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog +## 1.5.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.5.0 ### Minor Changes diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 98bc7ab89e..377b62a1e6 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -64,6 +64,9 @@ export type BackstageOverrides = Overrides & { >; }; +// @public (undocumented) +export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; + // @public (undocumented) export const CatalogEntityPage: () => JSX.Element; @@ -79,8 +82,6 @@ export interface CatalogKindHeaderProps { initialFilter?: string; } -// Warning: (ae-forgotten-export) The symbol "CatalogInputPluginOptions" needs to be exported by the entry point index.d.ts -// // @public (undocumented) export const catalogPlugin: BackstagePlugin< { @@ -176,6 +177,9 @@ export interface CatalogTableRow { }; } +// @public (undocumented) +export type ColumnBreakpoints = Record; + // @public export interface DefaultCatalogPageProps { // (undocumented) @@ -296,15 +300,11 @@ export type EntityLayoutRouteProps = { >; }; -// Warning: (ae-forgotten-export) The symbol "EntityLinksCard" needs to be exported by the entry point index.d.ts -// // @public (undocumented) -export const EntityLinksCard: EntityLinksCard_2; +export const EntityLinksCard: (props: EntityLinksCardProps) => JSX.Element; // @public (undocumented) export interface EntityLinksCardProps { - // Warning: (ae-forgotten-export) The symbol "ColumnBreakpoints" needs to be exported by the entry point index.d.ts - // // (undocumented) cols?: ColumnBreakpoints | number; // (undocumented) diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index ba20f0d285..5465814ef9 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "1.5.0", + "version": "1.5.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,16 +34,16 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-react": "^1.0.1", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", @@ -61,11 +61,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-permission-react": "^0.4.4", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", diff --git a/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx b/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx index 10302d7837..ebc551c29f 100644 --- a/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx +++ b/plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx @@ -29,7 +29,7 @@ export interface EntityLinksCardProps { variant?: InfoCardVariants; } -export function EntityLinksCard(props: EntityLinksCardProps) { +export const EntityLinksCard = (props: EntityLinksCardProps) => { const { cols = undefined, variant } = props; const { entity } = useEntity(); const app = useApp(); @@ -55,4 +55,4 @@ export function EntityLinksCard(props: EntityLinksCardProps) { )} ); -} +}; diff --git a/plugins/catalog/src/components/EntityLinksCard/index.ts b/plugins/catalog/src/components/EntityLinksCard/index.ts index dcd4366066..eb3beda6ea 100644 --- a/plugins/catalog/src/components/EntityLinksCard/index.ts +++ b/plugins/catalog/src/components/EntityLinksCard/index.ts @@ -17,3 +17,4 @@ export { EntityLinksCard } from './EntityLinksCard'; export type { EntityLinksCardProps } from './EntityLinksCard'; export type { EntityLinksEmptyStateClassKey } from './EntityLinksEmptyState'; +export type { Breakpoint, ColumnBreakpoints } from './types'; diff --git a/plugins/catalog/src/components/EntityLinksCard/types.ts b/plugins/catalog/src/components/EntityLinksCard/types.ts index e3cd1a94ac..fdd9c9c07c 100644 --- a/plugins/catalog/src/components/EntityLinksCard/types.ts +++ b/plugins/catalog/src/components/EntityLinksCard/types.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +/** @public */ export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; +/** @public */ export type ColumnBreakpoints = Record; diff --git a/plugins/catalog/src/index.ts b/plugins/catalog/src/index.ts index f0f94656d5..886039e329 100644 --- a/plugins/catalog/src/index.ts +++ b/plugins/catalog/src/index.ts @@ -59,6 +59,8 @@ export type { DependsOnResourcesCardProps } from './components/DependsOnResource export type { EntityLinksEmptyStateClassKey, EntityLinksCardProps, + Breakpoint, + ColumnBreakpoints, } from './components/EntityLinksCard'; export type { SystemDiagramCardClassKey } from './components/SystemDiagramCard'; export type { DefaultCatalogPageProps } from './components/CatalogPage'; diff --git a/plugins/catalog/src/options.ts b/plugins/catalog/src/options.ts index 1d8b972ec2..bb248c16b6 100644 --- a/plugins/catalog/src/options.ts +++ b/plugins/catalog/src/options.ts @@ -20,6 +20,7 @@ export type CatalogPluginOptions = { createButtonTitle: string; }; +/** @ignore */ export type CatalogInputPluginOptions = { createButtonTitle: string; }; diff --git a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md index 163776416b..4846df3e12 100644 --- a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md +++ b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-cicd-statistics-module-gitlab +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-cicd-statistics@0.1.11-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index b034b48177..294b36eacd 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics-module-gitlab", "description": "CI/CD Statistics plugin module; Gitlab CICD", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,16 +29,16 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/plugin-cicd-statistics": "^0.1.10", + "@backstage/plugin-cicd-statistics": "^0.1.11-next.0", "@gitbeaker/browser": "^35.6.0", "@gitbeaker/core": "^35.6.0", "luxon": "^3.0.0", "p-limit": "^4.0.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/catalog-model": "^1.1.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/cicd-statistics/CHANGELOG.md b/plugins/cicd-statistics/CHANGELOG.md index 268e32b825..f8d3c66ca5 100644 --- a/plugins/cicd-statistics/CHANGELOG.md +++ b/plugins/cicd-statistics/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-cicd-statistics +## 0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.10 ### Patch Changes diff --git a/plugins/cicd-statistics/api-report.md b/plugins/cicd-statistics/api-report.md index e49c6b27dc..b0966aa281 100644 --- a/plugins/cicd-statistics/api-report.md +++ b/plugins/cicd-statistics/api-report.md @@ -10,13 +10,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "AbortError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class AbortError extends Error {} -// Warning: (ae-missing-release-tag) "Build" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface Build { branchType: FilterBranchType; @@ -30,25 +26,17 @@ export interface Build { triggeredBy?: TriggerReason; } -// Warning: (ae-missing-release-tag) "BuildWithRaw" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type BuildWithRaw = Build & { raw: T; }; -// Warning: (ae-missing-release-tag) "ChartType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type ChartType = 'duration' | 'count'; -// Warning: (ae-missing-release-tag) "ChartTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export type ChartTypes = Array; -// Warning: (ae-missing-release-tag) "CicdConfiguration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdConfiguration { availableStatuses: ReadonlyArray; @@ -56,8 +44,6 @@ export interface CicdConfiguration { formatStageName: (parentNames: Array, stageName: string) => string; } -// Warning: (ae-missing-release-tag) "CicdDefaults" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdDefaults { chartTypes: Record; @@ -75,16 +61,12 @@ export interface CicdDefaults { timeTo: Date; } -// Warning: (ae-missing-release-tag) "CicdState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdState { // (undocumented) builds: Array; } -// Warning: (ae-missing-release-tag) "CicdStatisticsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface CicdStatisticsApi { // (undocumented) @@ -95,13 +77,9 @@ export interface CicdStatisticsApi { ): Promise>; } -// Warning: (ae-missing-release-tag) "cicdStatisticsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const cicdStatisticsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "cicdStatisticsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const cicdStatisticsPlugin: BackstagePlugin< { @@ -111,18 +89,12 @@ export const cicdStatisticsPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EntityCicdStatisticsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCicdStatisticsContent: EntityPageCicdCharts; -// Warning: (ae-missing-release-tag) "EntityPageCicdCharts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function EntityPageCicdCharts(): JSX.Element; -// Warning: (ae-missing-release-tag) "FetchBuildsOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface FetchBuildsOptions { // (undocumented) @@ -141,13 +113,9 @@ export interface FetchBuildsOptions { updateProgress: UpdateProgress; } -// Warning: (ae-missing-release-tag) "FilterBranchType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type FilterBranchType = 'master' | 'branch'; -// Warning: (ae-missing-release-tag) "FilterStatusType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type FilterStatusType = | 'unknown' @@ -160,16 +128,12 @@ export type FilterStatusType = | 'stalled' | 'expired'; -// Warning: (ae-missing-release-tag) "GetConfigurationOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface GetConfigurationOptions { // (undocumented) entity: Entity; } -// Warning: (ae-missing-release-tag) "Stage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface Stage { duration: number; @@ -179,13 +143,9 @@ export interface Stage { status: FilterStatusType; } -// Warning: (ae-missing-release-tag) "statusTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const statusTypes: Array; -// Warning: (ae-missing-release-tag) "TriggerReason" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TriggerReason = /** Triggered by source code management, e.g. a Github hook */ @@ -197,13 +157,9 @@ export type TriggerReason = /** Triggered for some other reason */ | 'other'; -// Warning: (ae-missing-release-tag) "triggerReasons" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const triggerReasons: Array; -// Warning: (ae-missing-release-tag) "UpdateProgress" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface UpdateProgress { // (undocumented) diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index 10e5e5ea38..288416d3d5 100644 --- a/plugins/cicd-statistics/package.json +++ b/plugins/cicd-statistics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics", "description": "A frontend plugin visualizing CI/CD pipeline statistics (build time)", - "version": "0.1.10", + "version": "0.1.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,8 +38,8 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@date-io/luxon": "^1.3.13", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.11.2", diff --git a/plugins/cicd-statistics/src/apis/cicd-statistics.ts b/plugins/cicd-statistics/src/apis/cicd-statistics.ts index 714900a1bd..3ece331ec9 100644 --- a/plugins/cicd-statistics/src/apis/cicd-statistics.ts +++ b/plugins/cicd-statistics/src/apis/cicd-statistics.ts @@ -15,9 +15,9 @@ */ import { createApiRef } from '@backstage/core-plugin-api'; - import { CicdStatisticsApi } from './types'; +/** @public */ export const cicdStatisticsApiRef = createApiRef({ id: 'cicd-statistics-api', }); diff --git a/plugins/cicd-statistics/src/apis/types.ts b/plugins/cicd-statistics/src/apis/types.ts index 32d9d3f2df..226fa3f55d 100644 --- a/plugins/cicd-statistics/src/apis/types.ts +++ b/plugins/cicd-statistics/src/apis/types.ts @@ -21,6 +21,8 @@ import { Entity } from '@backstage/catalog-model'; * * If all of these aren't applicable to the underlying CI/CD, these can be * configured to be hidden, using the `availableStatuses` in `CicdConfiguration`. + * + * @public */ export type FilterStatusType = | 'unknown' @@ -32,6 +34,10 @@ export type FilterStatusType = | 'failed' | 'stalled' | 'expired'; + +/** + * @public + */ export const statusTypes: Array = [ 'succeeded', 'failed', @@ -50,9 +56,14 @@ export const statusTypes: Array = [ * The concept of what constitutes a master branch is generic. It might be called * something like 'release' or 'main' or 'trunk' in the underlying CI/CD system, * which is then up to the Api to map accordingly. + * + * @public */ export type FilterBranchType = 'master' | 'branch'; +/** + * @public + */ export type TriggerReason = /** Triggered by source code management, e.g. a Github hook */ | 'scm' @@ -63,6 +74,9 @@ export type TriggerReason = /** Triggered for some other reason */ | 'other'; +/** + * @public + */ export const triggerReasons: Array = [ 'scm', 'manual', @@ -76,6 +90,8 @@ export const triggerReasons: Array = [ * This may be called things like Stage or Step or Task in CI/CD systems, but is * generic here. There's also no concept of parallelism which might exist within * some stages. + * + * @public */ export interface Stage { name: string; @@ -94,6 +110,8 @@ export interface Stage { * Generic Build type. * * A build has e.g. a build type (master/branch), a status and (possibly) sub stages. + * + * @public */ export interface Build { raw?: unknown; @@ -125,6 +143,8 @@ export interface Build { * * This can be useful in an Api to use while mapping internal data structures * (raw) into generic builds. + * + * @public */ export type BuildWithRaw = Build & { raw: T; @@ -136,8 +156,16 @@ export type BuildWithRaw = Build & { * Values are: * * `duration`: shows an area chart of the duration over time * * `count`: shows a bar chart of the number of build per day + * + * @public */ export type ChartType = 'duration' | 'count'; + +/** + * Chart types. + * + * @public + */ export type ChartTypes = Array; /** @@ -145,6 +173,8 @@ export type ChartTypes = Array; * * These are all optional, but can be overridden from the Api to whatever makes * most sense for that implementation. + * + * @public */ export interface CicdDefaults { timeFrom: Date; @@ -171,6 +201,8 @@ export interface CicdDefaults { * configuration before anything else. * * All of these fields are optional though, and will fallback to hard-coded defaults. + * + * @public */ export interface CicdConfiguration { /** @@ -200,11 +232,15 @@ export interface CicdConfiguration { /** * If the Api implements support for aborting the fetching of builds, throw an * AbortError of this type (or any other error with name === 'AbortError'). + * + * @public */ export class AbortError extends Error {} /** * The result type for `fetchBuilds`. + * + * @public */ export interface CicdState { builds: Array; @@ -222,6 +258,8 @@ export interface CicdState { * the UI. * * Optionally this can signal multiple progresses in several steps + * + * @public */ export interface UpdateProgress { (completed: number, total: number, started?: number): void; @@ -238,6 +276,8 @@ export interface UpdateProgress { /** * When reading configuration, the Api can return a custom settings depending on * the entity being viewed. + * + * @public */ export interface GetConfigurationOptions { entity: Entity; @@ -252,6 +292,8 @@ export interface GetConfigurationOptions { * * When the UI re-fetches, it will abort any previous fetching, so polling * `abortSignal.aborted`, and possibly throwing an `AbortError`, can be useful. + * + * @public */ export interface FetchBuildsOptions { entity: Entity; @@ -266,6 +308,8 @@ export interface FetchBuildsOptions { /** * The interface which is mapped to the `cicdStatisticsApiRef` which is used by * the UI. + * + * @public */ export interface CicdStatisticsApi { getConfiguration( diff --git a/plugins/cicd-statistics/src/entity-page.tsx b/plugins/cicd-statistics/src/entity-page.tsx index 3c51dabf2a..db5cba42aa 100644 --- a/plugins/cicd-statistics/src/entity-page.tsx +++ b/plugins/cicd-statistics/src/entity-page.tsx @@ -46,6 +46,7 @@ import { cleanupBuildTree } from './utils/stage-names'; import { renderFallbacks, useAsyncChain } from './components/progress'; import { sortFilterStatusType } from './utils/api'; +/** @public */ export function EntityPageCicdCharts() { const state = useCicdConfiguration(); diff --git a/plugins/cicd-statistics/src/plugin.ts b/plugins/cicd-statistics/src/plugin.ts index ca9506475a..2abac90d03 100644 --- a/plugins/cicd-statistics/src/plugin.ts +++ b/plugins/cicd-statistics/src/plugin.ts @@ -26,6 +26,7 @@ const rootCatalogCicdStatsRouteRef = createRouteRef({ id: 'cicd-statistics', }); +/** @public */ export const cicdStatisticsPlugin = createPlugin({ id: 'cicd-statistics', routes: { @@ -33,6 +34,7 @@ export const cicdStatisticsPlugin = createPlugin({ }, }); +/** @public */ export const EntityCicdStatisticsContent = cicdStatisticsPlugin.provide( createRoutableExtension({ component: () => import('./entity-page').then(m => m.EntityPageCicdCharts), diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index b76be5b5b2..365ffd1677 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-circleci +## 0.3.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/circleci/api-report.md b/plugins/circleci/api-report.md index e8640ec78b..277b5720de 100644 --- a/plugins/circleci/api-report.md +++ b/plugins/circleci/api-report.md @@ -26,17 +26,12 @@ export { BuildSummary }; export { BuildWithSteps }; -// Warning: (ae-missing-release-tag) "CIRCLECI_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CIRCLECI_ANNOTATION = 'circleci.com/project-slug'; -// Warning: (ae-missing-release-tag) "CircleCIApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class CircleCIApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(options: Options); + constructor(options: { discoveryApi: DiscoveryApi; proxyPath?: string }); // (undocumented) getBuild( buildNumber: number, @@ -44,10 +39,7 @@ export class CircleCIApi { ): Promise; // (undocumented) getBuilds( - { - limit, - offset, - }: { + pagination: { limit: number; offset: number; }, @@ -62,44 +54,30 @@ export class CircleCIApi { ): Promise; } -// Warning: (ae-missing-release-tag) "circleCIApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const circleCIApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "circleCIBuildRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const circleCIBuildRouteRef: SubRouteRef>; -// Warning: (ae-missing-release-tag) "circleCIPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const circleCIPlugin: BackstagePlugin<{}, {}, {}>; export { circleCIPlugin }; export { circleCIPlugin as plugin }; -// Warning: (ae-missing-release-tag) "circleCIRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const circleCIRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "EntityCircleCIContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCircleCIContent: () => JSX.Element; export { GitType }; -// Warning: (ae-missing-release-tag) "isCircleCIAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isCircleCIAvailable: (entity: Entity) => boolean; export { isCircleCIAvailable }; export { isCircleCIAvailable as isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Router: () => JSX.Element; ``` diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index d26df28bce..23334570a2 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-circleci", "description": "A Backstage plugin that integrates towards Circle CI", - "version": "0.3.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,9 +36,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -55,10 +55,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -66,7 +66,7 @@ "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/circleci/src/api/CircleCIApi.ts b/plugins/circleci/src/api/CircleCIApi.ts index 78b8b378d6..6ec8addd76 100644 --- a/plugins/circleci/src/api/CircleCIApi.ts +++ b/plugins/circleci/src/api/CircleCIApi.ts @@ -28,28 +28,31 @@ import { } from 'circleci-api'; import { createApiRef, DiscoveryApi } from '@backstage/core-plugin-api'; +/** @public */ export { GitType }; + +/** @public */ export type { BuildWithSteps, BuildStepAction, BuildSummary }; +/** @public */ export const circleCIApiRef = createApiRef({ id: 'plugin.circleci.service', }); const DEFAULT_PROXY_PATH = '/circleci/api'; -type Options = { - discoveryApi: DiscoveryApi; - /** - * Path to use for requests via the proxy, defaults to /circleci/api - */ - proxyPath?: string; -}; - +/** @public */ export class CircleCIApi { private readonly discoveryApi: DiscoveryApi; private readonly proxyPath: string; - constructor(options: Options) { + constructor(options: { + discoveryApi: DiscoveryApi; + /** + * Path to use for requests via the proxy, defaults to /circleci/api + */ + proxyPath?: string; + }) { this.discoveryApi = options.discoveryApi; this.proxyPath = options.proxyPath ?? DEFAULT_PROXY_PATH; } @@ -62,9 +65,10 @@ export class CircleCIApi { } async getBuilds( - { limit = 10, offset = 0 }: { limit: number; offset: number }, + pagination: { limit: number; offset: number }, options: Partial, ) { + const { limit = 10, offset = 0 } = pagination; return getBuildSummaries('', { options: { limit, diff --git a/plugins/circleci/src/api/index.ts b/plugins/circleci/src/api/index.ts index 213ce2de8b..08a549b1ee 100644 --- a/plugins/circleci/src/api/index.ts +++ b/plugins/circleci/src/api/index.ts @@ -14,7 +14,8 @@ * limitations under the License. */ -export { CircleCIApi, circleCIApiRef, GitType } from './CircleCIApi'; +export type { GitType } from './CircleCIApi'; +export { CircleCIApi, circleCIApiRef } from './CircleCIApi'; export type { BuildWithSteps, BuildStepAction, diff --git a/plugins/circleci/src/components/Router.tsx b/plugins/circleci/src/components/Router.tsx index e16c91f2a0..09c74dbbe8 100644 --- a/plugins/circleci/src/components/Router.tsx +++ b/plugins/circleci/src/components/Router.tsx @@ -24,9 +24,11 @@ import { Entity } from '@backstage/catalog-model'; import { useEntity } from '@backstage/plugin-catalog-react'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isCircleCIAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[CIRCLECI_ANNOTATION]); +/** @public */ export const Router = () => { const { entity } = useEntity(); diff --git a/plugins/circleci/src/constants.ts b/plugins/circleci/src/constants.ts index 97c016826e..3478c22aee 100644 --- a/plugins/circleci/src/constants.ts +++ b/plugins/circleci/src/constants.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export const CIRCLECI_ANNOTATION = 'circleci.com/project-slug'; diff --git a/plugins/circleci/src/plugin.ts b/plugins/circleci/src/plugin.ts index 890e40ae9a..0cf7fb52ea 100644 --- a/plugins/circleci/src/plugin.ts +++ b/plugins/circleci/src/plugin.ts @@ -23,6 +23,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const circleCIPlugin = createPlugin({ id: 'circleci', apis: [ @@ -34,6 +35,7 @@ export const circleCIPlugin = createPlugin({ ], }); +/** @public */ export const EntityCircleCIContent = circleCIPlugin.provide( createRoutableExtension({ name: 'EntityCircleCIContent', diff --git a/plugins/circleci/src/route-refs.tsx b/plugins/circleci/src/route-refs.tsx index e8579b9f0d..22295c4ebc 100644 --- a/plugins/circleci/src/route-refs.tsx +++ b/plugins/circleci/src/route-refs.tsx @@ -16,10 +16,12 @@ import { createRouteRef, createSubRouteRef } from '@backstage/core-plugin-api'; +/** @public */ export const circleCIRouteRef = createRouteRef({ id: 'circle-ci', }); +/** @public */ export const circleCIBuildRouteRef = createSubRouteRef({ id: 'circle-ci/build', parent: circleCIRouteRef, diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 18ebdec1df..3132f88ed2 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-cloudbuild +## 0.3.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/cloudbuild/api-report.md b/plugins/cloudbuild/api-report.md index ecc6d7b460..deacf96acd 100644 --- a/plugins/cloudbuild/api-report.md +++ b/plugins/cloudbuild/api-report.md @@ -11,8 +11,6 @@ import { Entity } from '@backstage/catalog-model'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ActionsGetWorkflowResponseData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ActionsGetWorkflowResponseData = { id: string; @@ -37,16 +35,12 @@ export type ActionsGetWorkflowResponseData = { timing: Timing2; }; -// Warning: (ae-missing-release-tag) "ActionsListWorkflowRunsForRepoResponseData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ActionsListWorkflowRunsForRepoResponseData { // (undocumented) builds: ActionsGetWorkflowResponseData[]; } -// Warning: (ae-missing-release-tag) "BUILD" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BUILD { // (undocumented) @@ -55,87 +49,54 @@ export interface BUILD { startTime: string; } -// Warning: (ae-missing-release-tag) "CLOUDBUILD_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug'; -// Warning: (ae-missing-release-tag) "CloudbuildApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CloudbuildApi = { - listWorkflowRuns: (request: { + listWorkflowRuns: (options: { projectId: string; }) => Promise; - getWorkflow: ({ - projectId, - id, - }: { + getWorkflow: (options: { projectId: string; id: string; }) => Promise; - getWorkflowRun: ({ - projectId, - id, - }: { + getWorkflowRun: (options: { projectId: string; id: string; }) => Promise; - reRunWorkflow: ({ - projectId, - runId, - }: { + reRunWorkflow: (options: { projectId: string; runId: string; }) => Promise; }; -// Warning: (ae-missing-release-tag) "cloudbuildApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const cloudbuildApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CloudbuildClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class CloudbuildClient implements CloudbuildApi { constructor(googleAuthApi: OAuthApi); // (undocumented) getToken(): Promise; // (undocumented) - getWorkflow({ - projectId, - id, - }: { + getWorkflow(options: { projectId: string; id: string; }): Promise; // (undocumented) - getWorkflowRun({ - projectId, - id, - }: { + getWorkflowRun(options: { projectId: string; id: string; }): Promise; // (undocumented) - listWorkflowRuns({ - projectId, - }: { + listWorkflowRuns(options: { projectId: string; }): Promise; // (undocumented) - reRunWorkflow({ - projectId, - runId, - }: { - projectId: string; - runId: string; - }): Promise; + reRunWorkflow(options: { projectId: string; runId: string }): Promise; } -// Warning: (ae-missing-release-tag) "cloudbuildPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const cloudbuildPlugin: BackstagePlugin< { @@ -147,31 +108,19 @@ const cloudbuildPlugin: BackstagePlugin< export { cloudbuildPlugin }; export { cloudbuildPlugin as plugin }; -// Warning: (ae-missing-release-tag) "EntityCloudbuildContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCloudbuildContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestCloudbuildRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestCloudbuildRunCard: ({ - branch, -}: { +export const EntityLatestCloudbuildRunCard: (props: { branch: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestCloudbuildsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestCloudbuildsForBranchCard: ({ - branch, -}: { +export const EntityLatestCloudbuildsForBranchCard: (props: { branch: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "FETCHSOURCE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface FETCHSOURCE { // (undocumented) @@ -180,33 +129,19 @@ export interface FETCHSOURCE { startTime: string; } -// Warning: (ae-missing-release-tag) "isCloudbuildAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isCloudbuildAvailable: (entity: Entity) => boolean; export { isCloudbuildAvailable }; export { isCloudbuildAvailable as isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "LatestWorkflowRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const LatestWorkflowRunCard: ({ - branch, -}: { +export const LatestWorkflowRunCard: (props: { branch: string }) => JSX.Element; + +// @public (undocumented) +export const LatestWorkflowsForBranchCard: (props: { branch: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "LatestWorkflowsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const LatestWorkflowsForBranchCard: ({ - branch, -}: { - branch: string; -}) => JSX.Element; - -// Warning: (ae-missing-release-tag) "Options" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Options { // (undocumented) @@ -219,8 +154,6 @@ export interface Options { substitutionOption: string; } -// Warning: (ae-missing-release-tag) "PullTiming" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PullTiming { // (undocumented) @@ -229,8 +162,6 @@ export interface PullTiming { startTime: string; } -// Warning: (ae-missing-release-tag) "ResolvedStorageSource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ResolvedStorageSource { // (undocumented) @@ -241,8 +172,6 @@ export interface ResolvedStorageSource { object: string; } -// Warning: (ae-missing-release-tag) "Results" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Results { // (undocumented) @@ -251,21 +180,15 @@ export interface Results { buildStepOutputs: string[]; } -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Router: () => JSX.Element; -// Warning: (ae-missing-release-tag) "Source" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Source { // (undocumented) storageSource: StorageSource; } -// Warning: (ae-missing-release-tag) "SourceProvenance" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SourceProvenance { // (undocumented) @@ -274,8 +197,6 @@ export interface SourceProvenance { resolvedStorageSource: {}; } -// Warning: (ae-missing-release-tag) "Step" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Step { // (undocumented) @@ -300,8 +221,6 @@ export interface Step { waitFor: string[]; } -// Warning: (ae-missing-release-tag) "StorageSource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface StorageSource { // (undocumented) @@ -310,8 +229,6 @@ export interface StorageSource { object: string; } -// Warning: (ae-missing-release-tag) "Substitutions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Substitutions { // (undocumented) @@ -326,8 +243,6 @@ export interface Substitutions { SHORT_SHA: string; } -// Warning: (ae-missing-release-tag) "Timing" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Timing { // (undocumented) @@ -336,8 +251,6 @@ export interface Timing { startTime: string; } -// Warning: (ae-missing-release-tag) "Timing2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Timing2 { // (undocumented) @@ -346,8 +259,6 @@ export interface Timing2 { FETCHSOURCE: FETCHSOURCE; } -// Warning: (ae-missing-release-tag) "Volume" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Volume { // (undocumented) diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 570cebfbb2..ac65694c74 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cloudbuild", "description": "A Backstage plugin that integrates towards Google Cloud Build", - "version": "0.3.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,9 +35,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -52,17 +52,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/cloudbuild/src/api/CloudbuildApi.ts b/plugins/cloudbuild/src/api/CloudbuildApi.ts index 92ea8511fe..cb29b49fbf 100644 --- a/plugins/cloudbuild/src/api/CloudbuildApi.ts +++ b/plugins/cloudbuild/src/api/CloudbuildApi.ts @@ -20,32 +20,25 @@ import { } from '../api/types'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const cloudbuildApiRef = createApiRef({ id: 'plugin.cloudbuild.service', }); +/** @public */ export type CloudbuildApi = { - listWorkflowRuns: (request: { + listWorkflowRuns: (options: { projectId: string; }) => Promise; - getWorkflow: ({ - projectId, - id, - }: { + getWorkflow: (options: { projectId: string; id: string; }) => Promise; - getWorkflowRun: ({ - projectId, - id, - }: { + getWorkflowRun: (options: { projectId: string; id: string; }) => Promise; - reRunWorkflow: ({ - projectId, - runId, - }: { + reRunWorkflow: (options: { projectId: string; runId: string; }) => Promise; diff --git a/plugins/cloudbuild/src/api/CloudbuildClient.ts b/plugins/cloudbuild/src/api/CloudbuildClient.ts index cbd47e84e9..035b20f63d 100644 --- a/plugins/cloudbuild/src/api/CloudbuildClient.ts +++ b/plugins/cloudbuild/src/api/CloudbuildClient.ts @@ -21,20 +21,18 @@ import { } from '../api/types'; import { OAuthApi } from '@backstage/core-plugin-api'; +/** @public */ export class CloudbuildClient implements CloudbuildApi { constructor(private readonly googleAuthApi: OAuthApi) {} - async reRunWorkflow({ - projectId, - runId, - }: { + async reRunWorkflow(options: { projectId: string; runId: string; }): Promise { await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, - )}/builds/${encodeURIComponent(runId)}:retry`, + options.projectId, + )}/builds/${encodeURIComponent(options.runId)}:retry`, { headers: new Headers({ Accept: '*/*', @@ -43,14 +41,13 @@ export class CloudbuildClient implements CloudbuildApi { }, ); } - async listWorkflowRuns({ - projectId, - }: { + + async listWorkflowRuns(options: { projectId: string; }): Promise { const workflowRuns = await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, + options.projectId, )}/builds`, { headers: new Headers({ @@ -65,17 +62,15 @@ export class CloudbuildClient implements CloudbuildApi { return builds; } - async getWorkflow({ - projectId, - id, - }: { + + async getWorkflow(options: { projectId: string; id: string; }): Promise { const workflow = await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, - )}/builds/${encodeURIComponent(id)}`, + options.projectId, + )}/builds/${encodeURIComponent(options.id)}`, { headers: new Headers({ Accept: '*/*', @@ -88,17 +83,15 @@ export class CloudbuildClient implements CloudbuildApi { return build; } - async getWorkflowRun({ - projectId, - id, - }: { + + async getWorkflowRun(options: { projectId: string; id: string; }): Promise { const workflow = await fetch( `https://cloudbuild.googleapis.com/v1/projects/${encodeURIComponent( - projectId, - )}/builds/${encodeURIComponent(id)}`, + options.projectId, + )}/builds/${encodeURIComponent(options.id)}`, { headers: new Headers({ Accept: '*/*', diff --git a/plugins/cloudbuild/src/api/types.ts b/plugins/cloudbuild/src/api/types.ts index c9f6481b9e..1dd03265bc 100644 --- a/plugins/cloudbuild/src/api/types.ts +++ b/plugins/cloudbuild/src/api/types.ts @@ -14,10 +14,12 @@ * limitations under the License. */ +/** @public */ export interface ActionsListWorkflowRunsForRepoResponseData { builds: ActionsGetWorkflowResponseData[]; } +/** @public */ export type ActionsGetWorkflowResponseData = { id: string; status: string; @@ -41,6 +43,7 @@ export type ActionsGetWorkflowResponseData = { timing: Timing2; }; +/** @public */ export interface Step { name: string; args: string[]; @@ -54,16 +57,19 @@ export interface Step { pullTiming: PullTiming; } +/** @public */ export interface Timing2 { BUILD: BUILD; FETCHSOURCE: FETCHSOURCE; } +/** @public */ export interface SourceProvenance { resolvedStorageSource: {}; fileHashes: {}; } +/** @public */ export interface Options { machineType: string; substitutionOption: string; @@ -71,6 +77,7 @@ export interface Options { dynamicSubstitutions: boolean; } +/** @public */ export interface Substitutions { COMMIT_SHA: string; SHORT_SHA: string; @@ -79,45 +86,54 @@ export interface Substitutions { REVISION_ID: string; } +/** @public */ export interface Results { buildStepImages: string[]; buildStepOutputs: string[]; } +/** @public */ export interface BUILD { startTime: string; endTime: string; } +/** @public */ export interface FETCHSOURCE { startTime: string; endTime: string; } +/** @public */ export interface StorageSource { bucket: string; object: string; } +/** @public */ export interface Source { storageSource: StorageSource; } +/** @public */ export interface Volume { name: string; path: string; } +/** @public */ export interface Timing { startTime: string; endTime: string; } +/** @public */ export interface PullTiming { startTime: string; endTime: string; } +/** @public */ export interface ResolvedStorageSource { bucket: string; object: string; diff --git a/plugins/cloudbuild/src/components/Cards/Cards.tsx b/plugins/cloudbuild/src/components/Cards/Cards.tsx index 82e0eb1b88..2b7a8607b7 100644 --- a/plugins/cloudbuild/src/components/Cards/Cards.tsx +++ b/plugins/cloudbuild/src/components/Cards/Cards.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React, { useEffect } from 'react'; import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns'; import { WorkflowRunsTable } from '../WorkflowRunsTable'; @@ -72,11 +73,9 @@ const WidgetContent = ({ ); }; -export const LatestWorkflowRunCard = ({ - branch = 'master', -}: { - branch: string; -}) => { +/** @public */ +export const LatestWorkflowRunCard = (props: { branch: string }) => { + const { branch = 'master' } = props; const { entity } = useEntity(); const errorApi = useApi(errorApiRef); const projectId = entity?.metadata.annotations?.[CLOUDBUILD_ANNOTATION] || ''; @@ -103,11 +102,9 @@ export const LatestWorkflowRunCard = ({ ); }; -export const LatestWorkflowsForBranchCard = ({ - branch = 'master', -}: { - branch: string; -}) => { +/** @public */ +export const LatestWorkflowsForBranchCard = (props: { branch: string }) => { + const { branch = 'master' } = props; const { entity } = useEntity(); return ( diff --git a/plugins/cloudbuild/src/components/Cards/index.ts b/plugins/cloudbuild/src/components/Cards/index.ts index 669f723c2d..7149bdf3ca 100644 --- a/plugins/cloudbuild/src/components/Cards/index.ts +++ b/plugins/cloudbuild/src/components/Cards/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { LatestWorkflowRunCard, LatestWorkflowsForBranchCard } from './Cards'; diff --git a/plugins/cloudbuild/src/components/Router.tsx b/plugins/cloudbuild/src/components/Router.tsx index e4c590bcaf..6ac025fef1 100644 --- a/plugins/cloudbuild/src/components/Router.tsx +++ b/plugins/cloudbuild/src/components/Router.tsx @@ -23,9 +23,11 @@ import { WorkflowRunsTable } from './WorkflowRunsTable'; import { CLOUDBUILD_ANNOTATION } from './useProjectName'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isCloudbuildAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[CLOUDBUILD_ANNOTATION]); +/** @public */ export const Router = () => { const { entity } = useEntity(); diff --git a/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx b/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx index a6a63770ca..0e532178e1 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunDetails/WorkflowRunDetails.tsx @@ -61,8 +61,8 @@ const useStyles = makeStyles(theme => ({ }, })); -export const WorkflowRunDetails = ({ entity }: { entity: Entity }) => { - const { value: projectName, loading, error } = useProjectName(entity); +export const WorkflowRunDetails = (props: { entity: Entity }) => { + const { value: projectName, loading, error } = useProjectName(props.entity); const [projectId] = (projectName ?? '/').split('/'); const details = useWorkflowRunsDetails(projectId); diff --git a/plugins/cloudbuild/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx b/plugins/cloudbuild/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx index 3f43d84ce4..fce8566dc0 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunStatus/WorkflowRunStatus.tsx @@ -23,11 +23,8 @@ import { StatusError, } from '@backstage/core-components'; -export const WorkflowRunStatus = ({ - status, -}: { - status: string | undefined; -}) => { +export const WorkflowRunStatus = (props: { status: string | undefined }) => { + const { status } = props; if (status === undefined) return null; switch (status.toLocaleLowerCase('en-US')) { case 'queued': diff --git a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx index d79d481cd4..a8e2a12ea8 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx +++ b/plugins/cloudbuild/src/components/WorkflowRunsTable/WorkflowRunsTable.tsx @@ -164,8 +164,8 @@ export const WorkflowRunsTableView = ({ ); }; -export const WorkflowRunsTable = ({ entity }: { entity: Entity }) => { - const { value: projectName, loading } = useProjectName(entity); +export const WorkflowRunsTable = (props: { entity: Entity }) => { + const { value: projectName, loading } = useProjectName(props.entity); const [projectId] = (projectName ?? '/').split('/'); const [tableProps, { retry, setPage, setPageSize }] = useWorkflowRuns({ diff --git a/plugins/cloudbuild/src/components/useProjectName.ts b/plugins/cloudbuild/src/components/useProjectName.ts index 3f314aaa47..ae6ae07b56 100644 --- a/plugins/cloudbuild/src/components/useProjectName.ts +++ b/plugins/cloudbuild/src/components/useProjectName.ts @@ -17,6 +17,7 @@ import useAsync from 'react-use/lib/useAsync'; import { Entity } from '@backstage/catalog-model'; +/** @public */ export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug'; export const useProjectName = (entity: Entity) => { diff --git a/plugins/cloudbuild/src/components/useWorkflowRuns.ts b/plugins/cloudbuild/src/components/useWorkflowRuns.ts index f2e107ea3f..424f08e38d 100644 --- a/plugins/cloudbuild/src/components/useWorkflowRuns.ts +++ b/plugins/cloudbuild/src/components/useWorkflowRuns.ts @@ -33,7 +33,8 @@ export type WorkflowRun = { rerun: () => void; }; -export function useWorkflowRuns({ projectId }: { projectId: string }) { +export function useWorkflowRuns(options: { projectId: string }) { + const { projectId } = options; const api = useApi(cloudbuildApiRef); const errorApi = useApi(errorApiRef); diff --git a/plugins/cloudbuild/src/plugin.ts b/plugins/cloudbuild/src/plugin.ts index fc96d154b7..2933bfb0be 100644 --- a/plugins/cloudbuild/src/plugin.ts +++ b/plugins/cloudbuild/src/plugin.ts @@ -23,6 +23,7 @@ import { createComponentExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const cloudbuildPlugin = createPlugin({ id: 'cloudbuild', apis: [ @@ -39,6 +40,7 @@ export const cloudbuildPlugin = createPlugin({ }, }); +/** @public */ export const EntityCloudbuildContent = cloudbuildPlugin.provide( createRoutableExtension({ name: 'EntityCloudbuildContent', @@ -47,6 +49,7 @@ export const EntityCloudbuildContent = cloudbuildPlugin.provide( }), ); +/** @public */ export const EntityLatestCloudbuildRunCard = cloudbuildPlugin.provide( createComponentExtension({ name: 'EntityLatestCloudbuildRunCard', @@ -57,6 +60,7 @@ export const EntityLatestCloudbuildRunCard = cloudbuildPlugin.provide( }), ); +/** @public */ export const EntityLatestCloudbuildsForBranchCard = cloudbuildPlugin.provide( createComponentExtension({ name: 'EntityLatestCloudbuildsForBranchCard', diff --git a/plugins/code-climate/CHANGELOG.md b/plugins/code-climate/CHANGELOG.md index 6202bf67a3..b360bea1ec 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-code-climate +## 0.1.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.8 ### Patch Changes diff --git a/plugins/code-climate/api-report.md b/plugins/code-climate/api-report.md index 5ef53cf543..f4a2d3a26d 100644 --- a/plugins/code-climate/api-report.md +++ b/plugins/code-climate/api-report.md @@ -11,21 +11,15 @@ import { DiscoveryApi } from '@backstage/core-plugin-api'; import { FetchApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "CodeClimateApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CodeClimateApi { // (undocumented) fetchData(repoID: string): Promise; } -// Warning: (ae-missing-release-tag) "codeClimateApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const codeClimateApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CodeClimateData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CodeClimateData = { repoID: string; @@ -42,8 +36,6 @@ export type CodeClimateData = { numberOfOtherIssues: number; }; -// Warning: (ae-missing-release-tag) "codeClimatePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const codeClimatePlugin: BackstagePlugin< { @@ -53,30 +45,18 @@ export const codeClimatePlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "EntityCodeClimateCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityCodeClimateCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "MockCodeClimateApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class MockCodeClimateApi implements CodeClimateApi { // (undocumented) fetchData(): Promise; } -// Warning: (ae-missing-release-tag) "mockData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const mockData: CodeClimateData; - -// Warning: (ae-missing-release-tag) "ProductionCodeClimateApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ProductionCodeClimateApi implements CodeClimateApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(options: Options); + constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }); // (undocumented) fetchAllData(options: { apiUrl: string; diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 669f21cb88..3631017c94 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-code-climate", - "version": "0.1.8", + "version": "0.1.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,9 +24,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -51,7 +51,7 @@ "@types/luxon": "^3.0.0", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/code-climate/src/api/code-climate-api.ts b/plugins/code-climate/src/api/code-climate-api.ts index fb4f41ebb5..d58d355d75 100644 --- a/plugins/code-climate/src/api/code-climate-api.ts +++ b/plugins/code-climate/src/api/code-climate-api.ts @@ -17,10 +17,12 @@ import { CodeClimateData } from './code-climate-data'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const codeClimateApiRef = createApiRef({ id: 'plugin.code-climate.service', }); +/** @public */ export interface CodeClimateApi { fetchData(repoID: string): Promise; } diff --git a/plugins/code-climate/src/api/code-climate-data.ts b/plugins/code-climate/src/api/code-climate-data.ts index 9271905157..77e10d67d9 100644 --- a/plugins/code-climate/src/api/code-climate-data.ts +++ b/plugins/code-climate/src/api/code-climate-data.ts @@ -164,6 +164,7 @@ export type CodeClimateIssuesData = { meta: { current_page: number; total_pages: number; total_count: number }; }; +/** @public */ export type CodeClimateData = { repoID: string; maintainability: { diff --git a/plugins/code-climate/src/api/mock/index.ts b/plugins/code-climate/src/api/mock/index.ts index 56ba9c7974..0044fec7bb 100644 --- a/plugins/code-climate/src/api/mock/index.ts +++ b/plugins/code-climate/src/api/mock/index.ts @@ -14,5 +14,4 @@ * limitations under the License. */ -export { mockData } from './mock-api'; export { MockCodeClimateApi } from './mock-api'; diff --git a/plugins/code-climate/src/api/mock/mock-api.ts b/plugins/code-climate/src/api/mock/mock-api.ts index 74e4d83027..65ac6de3b8 100644 --- a/plugins/code-climate/src/api/mock/mock-api.ts +++ b/plugins/code-climate/src/api/mock/mock-api.ts @@ -47,6 +47,7 @@ export const mockData: CodeClimateData = { numberOfOtherIssues: 26, }; +/** @public */ export class MockCodeClimateApi implements CodeClimateApi { fetchData(): Promise { return new Promise(resolve => { diff --git a/plugins/code-climate/src/api/production-api.ts b/plugins/code-climate/src/api/production-api.ts index 81ba6b9ad6..e227201b9d 100644 --- a/plugins/code-climate/src/api/production-api.ts +++ b/plugins/code-climate/src/api/production-api.ts @@ -34,16 +34,12 @@ const codeSmellsQuery = `${basicIssuesOptions}&${categoriesFilter}=Complexity`; const duplicationQuery = `${basicIssuesOptions}&${categoriesFilter}=Duplication`; const otherIssuesQuery = `${basicIssuesOptions}&${categoriesFilter}=Bug%20Risk`; -type Options = { - discoveryApi: DiscoveryApi; - fetchApi: FetchApi; -}; - +/** @public */ export class ProductionCodeClimateApi implements CodeClimateApi { private readonly discoveryApi: DiscoveryApi; private readonly fetchApi: FetchApi; - constructor(options: Options) { + constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }) { this.discoveryApi = options.discoveryApi; this.fetchApi = options.fetchApi; } diff --git a/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx b/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx index a2ced6f5a2..70d34d0298 100644 --- a/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx +++ b/plugins/code-climate/src/components/CodeClimateTable/CodeClimateTable.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { render } from '@testing-library/react'; import { CodeClimateTable } from './CodeClimateTable'; -import { mockData } from '../../api/mock'; +import { mockData } from '../../api/mock/mock-api'; import { ThemeProvider } from '@material-ui/core'; import { lightTheme } from '@backstage/theme'; diff --git a/plugins/code-climate/src/plugin.ts b/plugins/code-climate/src/plugin.ts index 54502b6355..38bb268388 100644 --- a/plugins/code-climate/src/plugin.ts +++ b/plugins/code-climate/src/plugin.ts @@ -30,6 +30,7 @@ export const rootRouteRef = createRouteRef({ id: 'code-climate', }); +/** @public */ export const codeClimatePlugin = createPlugin({ id: 'code-climate', apis: [ @@ -48,6 +49,7 @@ export const codeClimatePlugin = createPlugin({ }, }); +/** @public */ export const EntityCodeClimateCard = codeClimatePlugin.provide( createComponentExtension({ name: 'EntityCodeClimateCard', diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 0d07616343..f2da88d456 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-code-coverage-backend +## 0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 34c75f45ed..83a89ba25f 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,12 +23,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -39,10 +39,10 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/express-xml-bodyparser": "^0.3.2", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.6", "xml2js": "^0.4.23" }, diff --git a/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.test.ts b/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.test.ts index 635debca02..ed913e2c79 100644 --- a/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.test.ts +++ b/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.test.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { Knex as KnexType } from 'knex'; import { DatabaseManager } from '@backstage/backend-common'; import { stringifyEntityRef } from '@backstage/catalog-model'; import { ConfigReader } from '@backstage/config'; @@ -95,12 +96,24 @@ const coverage: Array = [ ], }, ]; - +function createDatabaseManager( + client: KnexType, + skipMigrations: boolean = false, +) { + return { + getClient: async () => client, + migrations: { + skip: skipMigrations, + }, + }; +} let database: CodeCoverageStore; describe('CodeCoverageDatabase', () => { beforeAll(async () => { const client = await db.getClient(); - database = await CodeCoverageDatabase.create(client); + const databaseManager = createDatabaseManager(client); + database = await CodeCoverageDatabase.create(databaseManager); + await database.insertCodeCoverage(coverage[0]); await database.insertCodeCoverage(coverage[1]); }); diff --git a/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.ts b/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.ts index 9235f3a8fd..4cbcd76fe0 100644 --- a/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.ts +++ b/plugins/code-coverage-backend/src/service/CodeCoverageDatabase.ts @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { resolvePackagePath } from '@backstage/backend-common'; +import { + PluginDatabaseManager, + resolvePackagePath, +} from '@backstage/backend-common'; import { NotFoundError } from '@backstage/errors'; import { parseEntityRef, stringifyEntityRef } from '@backstage/catalog-model'; import { Knex } from 'knex'; @@ -41,10 +44,17 @@ const migrationsDir = resolvePackagePath( ); export class CodeCoverageDatabase implements CodeCoverageStore { - static async create(knex: Knex): Promise { - await knex.migrate.latest({ - directory: migrationsDir, - }); + static async create( + database: PluginDatabaseManager, + ): Promise { + const knex = await database.getClient(); + + if (!database.migrations?.skip) { + await knex.migrate.latest({ + directory: migrationsDir, + }); + } + return new CodeCoverageDatabase(knex); } diff --git a/plugins/code-coverage-backend/src/service/router.ts b/plugins/code-coverage-backend/src/service/router.ts index 37279b549f..b87b21bffd 100644 --- a/plugins/code-coverage-backend/src/service/router.ts +++ b/plugins/code-coverage-backend/src/service/router.ts @@ -57,9 +57,7 @@ export const makeRouter = async ( ): Promise => { const { config, logger, discovery, database, urlReader } = options; - const codeCoverageDatabase = await CodeCoverageDatabase.create( - await database.getClient(), - ); + const codeCoverageDatabase = await CodeCoverageDatabase.create(database); const codecovUrl = await discovery.getExternalBaseUrl('code-coverage'); const catalogApi: CatalogApi = new CatalogClient({ discoveryApi: discovery }); const scm = ScmIntegrations.fromConfig(config); diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 9e4282b28a..b907d5fb0b 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-code-coverage +## 0.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index b49e4b8b3b..62aaf4c5ba 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,10 +26,10 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -46,10 +46,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -58,7 +58,7 @@ "@types/node": "^16.11.26", "@types/recharts": "^1.8.15", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/codescene/CHANGELOG.md b/plugins/codescene/CHANGELOG.md index f753f291f7..b549eb2222 100644 --- a/plugins/codescene/CHANGELOG.md +++ b/plugins/codescene/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-codescene +## 0.1.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index e99c0132e3..af2f380a26 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-codescene", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,8 +23,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.10", @@ -38,16 +38,16 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "*", "@types/node": "*", - "msw": "^0.44.0", + "msw": "^0.45.0", "cross-fetch": "^3.1.5" }, "files": [ diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index f69905cce2..88b8bfebd6 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-config-schema +## 0.1.32-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.1.31 ### Patch Changes diff --git a/plugins/config-schema/api-report.md b/plugins/config-schema/api-report.md index 4b9f47c950..7d110c34d4 100644 --- a/plugins/config-schema/api-report.md +++ b/plugins/config-schema/api-report.md @@ -11,28 +11,18 @@ import { Observable } from '@backstage/types'; import { RouteRef } from '@backstage/core-plugin-api'; import { Schema } from 'jsonschema'; -// Warning: (ae-missing-release-tag) "ConfigSchemaApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ConfigSchemaApi { - // Warning: (ae-forgotten-export) The symbol "ConfigSchemaResult" needs to be exported by the entry point index.d.ts - // // (undocumented) schema$(): Observable; } -// Warning: (ae-missing-release-tag) "configSchemaApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const configSchemaApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "ConfigSchemaPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ConfigSchemaPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "configSchemaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const configSchemaPlugin: BackstagePlugin< { @@ -42,6 +32,12 @@ export const configSchemaPlugin: BackstagePlugin< {} >; +// @public (undocumented) +export interface ConfigSchemaResult { + // (undocumented) + schema?: Schema; +} + // @public export class StaticSchemaLoader implements ConfigSchemaApi { constructor(options?: { url?: string }); diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index 957fc57b35..0437eff613 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-config-schema", "description": "A Backstage plugin that lets you browse the configuration schema of your app", - "version": "0.1.31", + "version": "0.1.32-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,8 +25,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", @@ -41,17 +41,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/config-schema/src/api/index.ts b/plugins/config-schema/src/api/index.ts index 8c1532ed0c..18319a2fe7 100644 --- a/plugins/config-schema/src/api/index.ts +++ b/plugins/config-schema/src/api/index.ts @@ -15,5 +15,5 @@ */ export { configSchemaApiRef } from './types'; -export type { ConfigSchemaApi } from './types'; +export type { ConfigSchemaApi, ConfigSchemaResult } from './types'; export { StaticSchemaLoader } from './StaticSchemaLoader'; diff --git a/plugins/config-schema/src/api/types.ts b/plugins/config-schema/src/api/types.ts index 13cd4f602b..b0c43495cf 100644 --- a/plugins/config-schema/src/api/types.ts +++ b/plugins/config-schema/src/api/types.ts @@ -18,14 +18,17 @@ import { Schema } from 'jsonschema'; import { createApiRef } from '@backstage/core-plugin-api'; import { Observable } from '@backstage/types'; +/** @public */ export interface ConfigSchemaResult { schema?: Schema; } +/** @public */ export interface ConfigSchemaApi { schema$(): Observable; } +/** @public */ export const configSchemaApiRef = createApiRef({ id: 'plugin.config-schema', }); diff --git a/plugins/config-schema/src/plugin.ts b/plugins/config-schema/src/plugin.ts index 91d7daa871..a0ad45f18c 100644 --- a/plugins/config-schema/src/plugin.ts +++ b/plugins/config-schema/src/plugin.ts @@ -20,6 +20,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const configSchemaPlugin = createPlugin({ id: 'config-schema', routes: { @@ -27,6 +28,7 @@ export const configSchemaPlugin = createPlugin({ }, }); +/** @public */ export const ConfigSchemaPage = configSchemaPlugin.provide( createRoutableExtension({ name: 'ConfigSchemaPage', diff --git a/plugins/cost-insights-common/package.json b/plugins/cost-insights-common/package.json index 03d3b11ea8..ef28594488 100644 --- a/plugins/cost-insights-common/package.json +++ b/plugins/cost-insights-common/package.json @@ -34,7 +34,7 @@ }, "dependencies": {}, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 080f2e1f41..ece5960fd7 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cost-insights +## 0.11.31-next.0 + +### Patch Changes + +- 9318bf15d4: The `CostInsightsHeader`component now uses group names if available +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.11.30 ### Patch Changes diff --git a/plugins/cost-insights/api-report.md b/plugins/cost-insights/api-report.md index 2a4cecc4eb..f4c8c9bd6f 100644 --- a/plugins/cost-insights/api-report.md +++ b/plugins/cost-insights/api-report.md @@ -25,8 +25,6 @@ import { SetStateAction } from 'react'; import { TooltipProps } from 'recharts'; import { TypographyProps } from '@material-ui/core'; -// Warning: (ae-missing-release-tag) "Alert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export type Alert = { title: string | JSX.Element; @@ -43,8 +41,6 @@ export type Alert = { onDismissed?(options: AlertOptions): Promise; }; -// Warning: (ae-missing-release-tag) "AlertCost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertCost { // (undocumented) @@ -53,8 +49,6 @@ export interface AlertCost { id: string; } -// Warning: (ae-missing-release-tag) "AlertDismissFormData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertDismissFormData { // (undocumented) @@ -65,8 +59,6 @@ export interface AlertDismissFormData { reason: AlertDismissReason; } -// Warning: (ae-missing-release-tag) "AlertDismissOption" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertDismissOption { // (undocumented) @@ -75,13 +67,9 @@ export interface AlertDismissOption { reason: string; } -// Warning: (ae-missing-release-tag) "AlertDismissOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AlertDismissOptions: AlertDismissOption[]; -// Warning: (ae-missing-release-tag) "AlertDismissReason" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum AlertDismissReason { // (undocumented) @@ -98,8 +86,6 @@ export enum AlertDismissReason { Seasonal = 'seasonal', } -// Warning: (ae-missing-release-tag) "AlertForm" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AlertForm< A extends Alert = any, @@ -108,8 +94,6 @@ export type AlertForm< AlertFormProps & RefAttributes >; -// Warning: (ae-missing-release-tag) "AlertFormProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AlertFormProps = { alert: A; @@ -117,8 +101,6 @@ export type AlertFormProps = { disableSubmit: (isDisabled: boolean) => void; }; -// Warning: (ae-missing-release-tag) "AlertOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface AlertOptions { // (undocumented) @@ -127,29 +109,21 @@ export interface AlertOptions { group: string; } -// Warning: (ae-missing-release-tag) "AlertSnoozeFormData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface AlertSnoozeFormData { // (undocumented) intervals: string; } -// Warning: (ae-missing-release-tag) "AlertSnoozeOption" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AlertSnoozeOption = { label: string; duration: Duration; }; -// Warning: (ae-missing-release-tag) "AlertSnoozeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const AlertSnoozeOptions: AlertSnoozeOption[]; -// Warning: (ae-missing-release-tag) "AlertStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum AlertStatus { // (undocumented) @@ -160,36 +134,17 @@ export enum AlertStatus { Snoozed = 'snoozed', } -// Warning: (ae-missing-release-tag) "BarChart" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChart: ({ - resources, - responsive, - displayAmount, - options, - tooltip, - onClick, - onMouseMove, -}: BarChartProps) => JSX.Element; +export const BarChart: (props: BarChartProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public +// @public @deprecated (undocumented) export interface BarChartData extends BarChartOptions {} -// Warning: (ae-missing-release-tag) "BarChartLegend" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChartLegend: ({ - costStart, - costEnd, - options, - children, -}: PropsWithChildren) => JSX.Element; +export const BarChartLegend: ( + props: PropsWithChildren, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartLegendOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartLegendOptions = { previousName: string; @@ -199,8 +154,6 @@ export type BarChartLegendOptions = { hideMarker?: boolean; }; -// Warning: (ae-missing-release-tag) "BarChartLegendProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartLegendProps = { costStart: number; @@ -208,8 +161,6 @@ export type BarChartLegendProps = { options?: Partial; }; -// Warning: (ae-missing-release-tag) "BarChartOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface BarChartOptions { // (undocumented) @@ -222,8 +173,6 @@ export interface BarChartOptions { previousName: string; } -// Warning: (ae-missing-release-tag) "BarChartProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartProps = { resources: ResourceData[]; @@ -235,34 +184,21 @@ export type BarChartProps = { onMouseMove?: RechartsFunction; }; -// Warning: (ae-missing-release-tag) "BarChartTooltip" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChartTooltip: ({ - title, - content, - subtitle, - topRight, - actions, - children, -}: PropsWithChildren) => JSX.Element; +export const BarChartTooltip: ( + props: PropsWithChildren, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartTooltipItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const BarChartTooltipItem: ({ - item, -}: BarChartTooltipItemProps) => JSX.Element; +export const BarChartTooltipItem: ( + props: BarChartTooltipItemProps, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "BarChartTooltipItemProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartTooltipItemProps = { item: TooltipItem; }; -// Warning: (ae-missing-release-tag) "BarChartTooltipProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type BarChartTooltipProps = { title: string; @@ -272,13 +208,9 @@ export type BarChartTooltipProps = { actions?: ReactNode; }; -// Warning: (ae-missing-release-tag) "ChangeStatistic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type ChangeStatistic = common.ChangeStatistic; -// Warning: (ae-missing-release-tag) "ChangeThreshold" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum ChangeThreshold { // (undocumented) @@ -295,28 +227,26 @@ export type ChartData = { [key: string]: number; }; -// Warning: (ae-missing-release-tag) "Cost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type ConfigContextProps = { + metrics: Metric[]; + products: Product[]; + icons: Icon[]; + engineerCost: number; + currencies: Currency[]; +}; + // @public @deprecated (undocumented) export type Cost = common.Cost; -// Warning: (ae-missing-release-tag) "CostGrowth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const CostGrowth: ({ change, duration }: CostGrowthProps) => JSX.Element; +export const CostGrowth: (props: CostGrowthProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "CostGrowthIndicator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const CostGrowthIndicator: ({ - change, - formatter, - className, - ...props -}: CostGrowthIndicatorProps) => JSX.Element; +export const CostGrowthIndicator: ( + props: CostGrowthIndicatorProps, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "CostGrowthIndicatorProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostGrowthIndicatorProps = TypographyProps & { change: ChangeStatistic; @@ -328,16 +258,12 @@ export type CostGrowthIndicatorProps = TypographyProps & { ) => Maybe; }; -// Warning: (ae-missing-release-tag) "CostGrowthProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostGrowthProps = { change: ChangeStatistic; duration: Duration; }; -// Warning: (ae-missing-release-tag) "CostInsightsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostInsightsApi = { getLastCompleteBillingDate(): Promise; @@ -350,36 +276,36 @@ export type CostInsightsApi = { getAlerts(group: string): Promise; }; -// Warning: (ae-missing-release-tag) "costInsightsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const costInsightsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "CostInsightsLabelDataflowInstructionsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CostInsightsLabelDataflowInstructionsPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "CostInsightsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CostInsightsPage: () => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "CostInsightsPaletteAdditions" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "CostInsightsPalette" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type CostInsightsPalette = BackstagePalette & CostInsightsPaletteAdditions; -// Warning: (ae-missing-release-tag) "CostInsightsPaletteOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type CostInsightsPaletteAdditions = { + blue: string; + lightBlue: string; + darkBlue: string; + magenta: string; + yellow: string; + tooltip: CostInsightsTooltipOptions; + navigationText: string; + alertBackground: string; + dataViz: string[]; +}; + // @public (undocumented) export type CostInsightsPaletteOptions = PaletteOptions & CostInsightsPaletteAdditions; -// Warning: (ae-missing-release-tag) "costInsightsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const costInsightsPlugin: BackstagePlugin< { @@ -393,27 +319,27 @@ const costInsightsPlugin: BackstagePlugin< export { costInsightsPlugin }; export { costInsightsPlugin as plugin }; -// Warning: (ae-missing-release-tag) "CostInsightsProjectGrowthInstructionsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const CostInsightsProjectGrowthInstructionsPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "CostInsightsTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CostInsightsTheme extends BackstageTheme { // (undocumented) palette: CostInsightsPalette; } -// Warning: (ae-missing-release-tag) "CostInsightsThemeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CostInsightsThemeOptions extends PaletteOptions { // (undocumented) palette: CostInsightsPaletteOptions; } +// @public (undocumented) +export type CostInsightsTooltipOptions = { + background: string; + color: string; +}; + // @public (undocumented) export interface Currency { // (undocumented) @@ -428,8 +354,12 @@ export interface Currency { unit: string; } -// Warning: (ae-missing-release-tag) "CurrencyType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type CurrencyContextProps = { + currency: Currency; + setCurrency: Dispatch>; +}; + // @public (undocumented) export enum CurrencyType { // (undocumented) @@ -442,8 +372,6 @@ export enum CurrencyType { USD = 'USD', } -// Warning: (ae-missing-release-tag) "DataKey" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum DataKey { // (undocumented) @@ -454,13 +382,9 @@ export enum DataKey { Previous = 'previous', } -// Warning: (ae-missing-release-tag) "DateAggregation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type DateAggregation = common.DateAggregation; -// Warning: (ae-missing-release-tag) "DEFAULT_DATE_FORMAT" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; @@ -476,18 +400,12 @@ export enum Duration { P90D = 'P90D', } -// Warning: (ae-missing-release-tag) "EngineerThreshold" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EngineerThreshold = 0.5; -// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Entity = common.Entity; -// Warning: (ae-missing-release-tag) "ExampleCostInsightsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ExampleCostInsightsClient implements CostInsightsApi { // (undocumented) @@ -508,13 +426,9 @@ export class ExampleCostInsightsClient implements CostInsightsApi { getUserGroups(userId: string): Promise; } -// Warning: (ae-missing-release-tag) "Group" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Group = common.Group; -// Warning: (ae-missing-release-tag) "GrowthType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum GrowthType { // (undocumented) @@ -525,16 +439,12 @@ export enum GrowthType { Savings = 1, } -// Warning: (ae-missing-release-tag) "Icon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Icon = { kind: string; component: JSX.Element; }; -// Warning: (ae-missing-release-tag) "IconType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum IconType { // (undocumented) @@ -551,18 +461,11 @@ export enum IconType { Storage = 'storage', } -// Warning: (ae-missing-release-tag) "LegendItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const LegendItem: ({ - title, - tooltipText, - markerColor, - children, -}: PropsWithChildren) => JSX.Element; +export const LegendItem: ( + props: PropsWithChildren, +) => JSX.Element; -// Warning: (ae-missing-release-tag) "LegendItemProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LegendItemProps = { title: string; @@ -570,43 +473,37 @@ export type LegendItemProps = { markerColor?: string; }; -// Warning: (ae-missing-release-tag) "Loading" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Loading = Record; -// Warning: (ae-missing-release-tag) "Maybe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Maybe = common.Maybe; -// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Metric = common.Metric; -// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type MetricData = common.MetricData; -// Warning: (ae-forgotten-export) The symbol "MockConfigProviderProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "MockConfigProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const MockConfigProvider: ({ - children, - ...context -}: MockConfigProviderProps) => JSX.Element; +export const MockConfigProvider: ( + props: MockConfigProviderProps, +) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "MockCurrencyProviderProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "MockCurrencyProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const MockCurrencyProvider: ({ - children, - ...context -}: MockCurrencyProviderProps) => JSX.Element; +export type MockConfigProviderProps = PropsWithChildren< + Partial +>; + +// @public (undocumented) +export const MockCurrencyProvider: ( + props: MockCurrencyProviderProps, +) => JSX.Element; + +// @public (undocumented) +export type MockCurrencyProviderProps = PropsWithChildren< + Partial +>; // @public (undocumented) export interface PageFilters { @@ -620,16 +517,12 @@ export interface PageFilters { project: Maybe_2; } -// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Product = common.Product; // @public (undocumented) export type ProductFilters = Array; -// Warning: (ae-missing-release-tag) "ProductInsightsOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ProductInsightsOptions = { product: string; @@ -646,13 +539,9 @@ export interface ProductPeriod { productType: string; } -// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Project = common.Project; -// Warning: (ae-missing-release-tag) "ProjectGrowthAlert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class ProjectGrowthAlert implements Alert { constructor(data: ProjectGrowthData); @@ -668,8 +557,6 @@ export class ProjectGrowthAlert implements Alert { get url(): string; } -// Warning: (ae-missing-release-tag) "ProjectGrowthData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ProjectGrowthData { // (undocumented) @@ -686,8 +573,6 @@ export interface ProjectGrowthData { project: string; } -// Warning: (ae-missing-release-tag) "ResourceData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ResourceData { // (undocumented) @@ -698,8 +583,6 @@ export interface ResourceData { previous: number; } -// Warning: (ae-missing-release-tag) "TooltipItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type TooltipItem = { fill: string; @@ -707,13 +590,9 @@ export type TooltipItem = { value: string; }; -// Warning: (ae-missing-release-tag) "Trendline" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export type Trendline = common.Trendline; -// Warning: (ae-missing-release-tag) "UnlabeledDataflowAlert" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class UnlabeledDataflowAlert implements Alert { constructor(data: UnlabeledDataflowData); @@ -731,8 +610,6 @@ export class UnlabeledDataflowAlert implements Alert { get url(): string; } -// Warning: (ae-missing-release-tag) "UnlabeledDataflowAlertProject" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface UnlabeledDataflowAlertProject { // (undocumented) @@ -743,8 +620,6 @@ export interface UnlabeledDataflowAlertProject { unlabeledCost: number; } -// Warning: (ae-missing-release-tag) "UnlabeledDataflowData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface UnlabeledDataflowData { // (undocumented) diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index d520945f8f..a737688d74 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights", "description": "A Backstage plugin that helps you keep track of your cloud spend", - "version": "0.11.30", + "version": "0.11.31-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,8 +36,8 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/plugin-cost-insights-common": "^0.1.1", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", @@ -61,10 +61,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -76,7 +76,7 @@ "@types/yup": "^0.29.13", "canvas": "^2.6.1", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx b/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx index 6767477f67..f432a14ff8 100644 --- a/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx +++ b/plugins/cost-insights/src/alerts/ProjectGrowthAlert.tsx @@ -22,8 +22,9 @@ import { Alert, ProjectGrowthData } from '../types'; * The alert below is an example of an Alert implementation; the CostInsightsApi permits returning * any implementation of the Alert type, so adopters can create their own. The CostInsightsApi * fetches alert data from the backend, then creates Alert classes with the data. + * + * @public */ - export class ProjectGrowthAlert implements Alert { data: ProjectGrowthData; diff --git a/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx b/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx index da96f7d1f8..b4ee3d559c 100644 --- a/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx +++ b/plugins/cost-insights/src/alerts/UnlabeledDataflowAlert.tsx @@ -22,8 +22,9 @@ import { Alert, AlertStatus, UnlabeledDataflowData } from '../types'; * The alert below is an example of an Alert implementation; the CostInsightsApi permits returning * any implementation of the Alert type, so adopters can create their own. The CostInsightsApi * fetches alert data from the backend, then creates Alert classes with the data. + * + * @public */ - export class UnlabeledDataflowAlert implements Alert { data: UnlabeledDataflowData; status?: AlertStatus; diff --git a/plugins/cost-insights/src/api/CostInsightsApi.ts b/plugins/cost-insights/src/api/CostInsightsApi.ts index 558cb57c0e..3c97407f08 100644 --- a/plugins/cost-insights/src/api/CostInsightsApi.ts +++ b/plugins/cost-insights/src/api/CostInsightsApi.ts @@ -25,6 +25,7 @@ import { } from '../types'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export type ProductInsightsOptions = { /** * The product from the cost-insights configuration in app-config.yaml @@ -47,6 +48,7 @@ export type ProductInsightsOptions = { project: Maybe; }; +/** @public */ export type CostInsightsApi = { /** * Get the most current date for which billing data is complete, in YYYY-MM-DD format. This helps @@ -146,6 +148,7 @@ export type CostInsightsApi = { getAlerts(group: string): Promise; }; +/** @public */ export const costInsightsApiRef = createApiRef({ id: 'plugin.costinsights.service', }); diff --git a/plugins/cost-insights/src/components/BarChart/BarChart.tsx b/plugins/cost-insights/src/components/BarChart/BarChart.tsx index 27ef69db7a..145819db08 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChart.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChart.tsx @@ -61,6 +61,7 @@ export const defaultTooltip: ContentRenderer = ({ ); }; +/** @public */ export type BarChartProps = { resources: ResourceData[]; responsive?: boolean; @@ -71,15 +72,18 @@ export type BarChartProps = { onMouseMove?: RechartsFunction; }; -export const BarChart = ({ - resources, - responsive = true, - displayAmount = 6, - options = {}, - tooltip = defaultTooltip, - onClick, - onMouseMove, -}: BarChartProps) => { +/** @public */ +export const BarChart = (props: BarChartProps) => { + const { + resources, + responsive = true, + displayAmount = 6, + options = {}, + tooltip = defaultTooltip, + onClick, + onMouseMove, + } = props; + const theme = useTheme(); const styles = useBarChartStyles(theme); const [activeChart, setActiveChart] = useState(false); diff --git a/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx b/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx index e7afe5fa59..72c3120dd4 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChartLegend.tsx @@ -21,6 +21,7 @@ import { currencyFormatter } from '../../utils/formatters'; import { CostInsightsTheme } from '../../types'; import { useBarChartLayoutStyles as useStyles } from '../../utils/styles'; +/** @public */ export type BarChartLegendOptions = { previousName: string; previousFill: string; @@ -29,18 +30,19 @@ export type BarChartLegendOptions = { hideMarker?: boolean; }; +/** @public */ export type BarChartLegendProps = { costStart: number; costEnd: number; options?: Partial; }; -export const BarChartLegend = ({ - costStart, - costEnd, - options = {}, - children, -}: PropsWithChildren) => { +/** @public */ +export const BarChartLegend = ( + props: PropsWithChildren, +) => { + const { costStart, costEnd, options = {}, children } = props; + const theme = useTheme(); const classes = useStyles(); diff --git a/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx b/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx index 101f0cbb8c..0b522e5e09 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChartTooltip.tsx @@ -19,6 +19,7 @@ import classnames from 'classnames'; import { Box, Divider, Typography } from '@material-ui/core'; import { useTooltipStyles as useStyles } from '../../utils/styles'; +/** @public */ export type BarChartTooltipProps = { title: string; content?: ReactNode | string; @@ -27,14 +28,12 @@ export type BarChartTooltipProps = { actions?: ReactNode; }; -export const BarChartTooltip = ({ - title, - content, - subtitle, - topRight, - actions, - children, -}: PropsWithChildren) => { +/** @public */ +export const BarChartTooltip = ( + props: PropsWithChildren, +) => { + const { title, content, subtitle, topRight, actions, children } = props; + const classes = useStyles(); const titleClassName = classnames(classes.truncate, { [classes.maxWidth]: topRight === undefined, diff --git a/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx b/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx index 758bc9ffa0..fc50ab979a 100644 --- a/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx +++ b/plugins/cost-insights/src/components/BarChart/BarChartTooltipItem.tsx @@ -19,18 +19,24 @@ import { Box, Typography } from '@material-ui/core'; import LensIcon from '@material-ui/icons/Lens'; import { useTooltipStyles as useStyles } from '../../utils/styles'; +/** @public */ export type TooltipItem = { fill: string; label: string; value: string; }; +/** @public */ export type BarChartTooltipItemProps = { item: TooltipItem; }; -export const BarChartTooltipItem = ({ item }: BarChartTooltipItemProps) => { +/** @public */ +export const BarChartTooltipItem = (props: BarChartTooltipItemProps) => { + const { item } = props; + const classes = useStyles(); + return ( { +/** @public */ +export const CostGrowth = (props: CostGrowthProps) => { + const { change, duration } = props; + const styles = useStyles(); const { engineerCost } = useConfig(); const [currency] = useCurrency(); diff --git a/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx b/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx index e7746495d6..8993504c84 100644 --- a/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx +++ b/plugins/cost-insights/src/components/CostGrowth/CostGrowthIndicator.tsx @@ -23,6 +23,7 @@ import { growthOf } from '../../utils/change'; import { ChangeStatistic, GrowthType, Maybe } from '../../types'; import { useCostGrowthStyles as useStyles } from '../../utils/styles'; +/** @public */ export type CostGrowthIndicatorProps = TypographyProps & { change: ChangeStatistic; formatter?: ( @@ -31,12 +32,10 @@ export type CostGrowthIndicatorProps = TypographyProps & { ) => Maybe; }; -export const CostGrowthIndicator = ({ - change, - formatter, - className, - ...props -}: CostGrowthIndicatorProps) => { +/** @public */ +export const CostGrowthIndicator = (props: CostGrowthIndicatorProps) => { + const { change, formatter, className, ...extraProps } = props; + const classes = useStyles(); const growth = growthOf(change); @@ -46,7 +45,7 @@ export const CostGrowthIndicator = ({ }); return ( - + {formatter ? formatter(change, { absolute: true }) : change.ratio} {growth === GrowthType.Excess && } {growth === GrowthType.Savings && } diff --git a/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.test.tsx b/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.test.tsx index cccf8b60cd..015a6279da 100644 --- a/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.test.tsx +++ b/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.test.tsx @@ -35,7 +35,7 @@ describe('', () => { const rendered = await renderInTestApp( ', () => { const rendered = await renderInTestApp( ', () => { const rendered = await renderInTestApp( ', () => { const rendered = await renderInTestApp( ', () => { ); expect(rendered.queryByText(/this is awkward/)).toBeInTheDocument(); }); + + describe.each` + hasCostData | alerts + ${true} | ${0} + ${true} | ${1} + ${false} | ${0} + `('Shows proper group name', ({ hasCostData, alerts }) => { + it('Shows group display name when available', async () => { + const rendered = await renderInTestApp( + + + , + ); + expect( + rendered.queryByText(/Test group display name/), + ).toBeInTheDocument(); + }); + + it('Fallbacks to group id when display name not available', async () => { + const rendered = await renderInTestApp( + + + , + ); + expect(rendered.queryByText(/test-user-group-1/)).toBeInTheDocument(); + }); + }); }); diff --git a/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx b/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx index cc68f79db1..540165d1d9 100644 --- a/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx +++ b/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx @@ -28,19 +28,20 @@ function useDisplayName(): string { } type CostInsightsHeaderProps = { - owner: string; + groupId: string; groups: Group[]; hasCostData: boolean; alerts: number; }; const CostInsightsHeaderNoData = ({ - owner, + groupId, groups, }: CostInsightsHeaderProps) => { const displayName = useDisplayName(); const classes = useCostInsightsStyles(); const hasMultipleGroups = groups.length > 1; + const ownerName = groups.find(({ id }) => id === groupId)?.name ?? groupId; return ( <> @@ -51,8 +52,8 @@ const CostInsightsHeaderNoData = ({ Well this is awkward - Hey, {displayName}! {owner} doesn't seem to have any cloud - costs. + Hey, {displayName}! {ownerName} doesn't seem to have any + cloud costs. {hasMultipleGroups && ( @@ -64,11 +65,13 @@ const CostInsightsHeaderNoData = ({ }; const CostInsightsHeaderAlerts = ({ - owner, + groupId, + groups, alerts, }: CostInsightsHeaderProps) => { const displayName = useDisplayName(); const classes = useCostInsightsStyles(); + const ownerName = groups.find(({ id }) => id === groupId)?.name ?? groupId; return ( <> @@ -81,15 +84,19 @@ const CostInsightsHeaderAlerts = ({ Hey, {displayName}! We've identified{' '} {alerts > 1 ? 'a few things ' : 'one thing '} - {owner} should look into next. + {ownerName} should look into next. ); }; -const CostInsightsHeaderNoAlerts = ({ owner }: CostInsightsHeaderProps) => { +const CostInsightsHeaderNoAlerts = ({ + groupId, + groups, +}: CostInsightsHeaderProps) => { const displayName = useDisplayName(); const classes = useCostInsightsStyles(); + const ownerName = groups.find(({ id }) => id === groupId)?.name ?? groupId; return ( <> @@ -100,7 +107,7 @@ const CostInsightsHeaderNoAlerts = ({ owner }: CostInsightsHeaderProps) => { Your team is doing great - Hey, {displayName}! {owner} is doing well. No major + Hey, {displayName}! {ownerName} is doing well. No major changes this month. diff --git a/plugins/cost-insights/src/components/CostInsightsPage/CostInsightsPage.tsx b/plugins/cost-insights/src/components/CostInsightsPage/CostInsightsPage.tsx index 8fdfda936e..00d92f945d 100644 --- a/plugins/cost-insights/src/components/CostInsightsPage/CostInsightsPage.tsx +++ b/plugins/cost-insights/src/components/CostInsightsPage/CostInsightsPage.tsx @@ -272,7 +272,7 @@ export const CostInsightsPage = () => { ) => { +/** @public */ +export const LegendItem = (props: PropsWithChildren) => { + const { title, tooltipText, markerColor, children } = props; + const classes = useCostGrowthLegendStyles(); + return ( { return new Promise(resolve => setTimeout(resolve, 0, res)); diff --git a/plugins/cost-insights/src/hooks/useConfig.tsx b/plugins/cost-insights/src/hooks/useConfig.tsx index 236c142b3b..322e1e35f1 100644 --- a/plugins/cost-insights/src/hooks/useConfig.tsx +++ b/plugins/cost-insights/src/hooks/useConfig.tsx @@ -58,6 +58,7 @@ import { configApiRef, useApi } from '@backstage/core-plugin-api'; * rate: 3.5 */ +/** @public */ export type ConfigContextProps = { metrics: Metric[]; products: Product[]; diff --git a/plugins/cost-insights/src/hooks/useCurrency.tsx b/plugins/cost-insights/src/hooks/useCurrency.tsx index 13458ee432..32dc907578 100644 --- a/plugins/cost-insights/src/hooks/useCurrency.tsx +++ b/plugins/cost-insights/src/hooks/useCurrency.tsx @@ -23,6 +23,7 @@ import React, { import { Currency } from '../types'; import { useConfig } from './useConfig'; +/** @public */ export type CurrencyContextProps = { currency: Currency; setCurrency: Dispatch>; diff --git a/plugins/cost-insights/src/index.ts b/plugins/cost-insights/src/index.ts index b9a4bb83e0..2c46156005 100644 --- a/plugins/cost-insights/src/index.ts +++ b/plugins/cost-insights/src/index.ts @@ -38,8 +38,13 @@ export { LegendItem, } from './components'; export { MockConfigProvider, MockCurrencyProvider } from './testUtils'; +export type { + MockConfigProviderProps, + MockCurrencyProviderProps, +} from './testUtils'; export * from './api'; export * from './alerts'; +export type { ConfigContextProps, CurrencyContextProps } from './hooks'; export * from './types'; export type { diff --git a/plugins/cost-insights/src/plugin.ts b/plugins/cost-insights/src/plugin.ts index a422098e08..789d803438 100644 --- a/plugins/cost-insights/src/plugin.ts +++ b/plugins/cost-insights/src/plugin.ts @@ -32,6 +32,7 @@ export const unlabeledDataflowAlertRef = createRouteRef({ id: 'cost-insights:labeling-jobs', }); +/** @public */ export const costInsightsPlugin = createPlugin({ id: 'cost-insights', featureFlags: [{ name: 'cost-insights-currencies' }], @@ -42,6 +43,7 @@ export const costInsightsPlugin = createPlugin({ }, }); +/** @public */ export const CostInsightsPage = costInsightsPlugin.provide( createRoutableExtension({ name: 'CostInsightsPage', @@ -51,6 +53,7 @@ export const CostInsightsPage = costInsightsPlugin.provide( }), ); +/** @public */ export const CostInsightsProjectGrowthInstructionsPage = costInsightsPlugin.provide( createRoutableExtension({ @@ -63,6 +66,7 @@ export const CostInsightsProjectGrowthInstructionsPage = }), ); +/** @public */ export const CostInsightsLabelDataflowInstructionsPage = costInsightsPlugin.provide( createRoutableExtension({ diff --git a/plugins/cost-insights/src/testUtils/providers.tsx b/plugins/cost-insights/src/testUtils/providers.tsx index efcb15b5a3..8088fca3c6 100644 --- a/plugins/cost-insights/src/testUtils/providers.tsx +++ b/plugins/cost-insights/src/testUtils/providers.tsx @@ -27,12 +27,11 @@ import { import { ScrollContext, ScrollContextProps } from '../hooks/useScroll'; import { Group, Duration } from '../types'; -type PartialPropsWithChildren = PropsWithChildren>; - export const MockGroups: Group[] = [{ id: 'tech' }, { id: 'mock-group' }]; -export type MockFilterProviderProps = - PartialPropsWithChildren; +export type MockFilterProviderProps = PropsWithChildren< + Partial +>; export const MockFilterProvider = ({ children, @@ -56,8 +55,9 @@ export const MockFilterProvider = ({ ); }; -export type MockLoadingProviderProps = - PartialPropsWithChildren; +export type MockLoadingProviderProps = PropsWithChildren< + Partial +>; export const MockLoadingProvider = ({ children, @@ -75,13 +75,15 @@ export const MockLoadingProvider = ({ ); }; -export type MockConfigProviderProps = - PartialPropsWithChildren; +/** @public */ +export type MockConfigProviderProps = PropsWithChildren< + Partial +>; + +/** @public */ +export const MockConfigProvider = (props: MockConfigProviderProps) => { + const { children, ...context } = props; -export const MockConfigProvider = ({ - children, - ...context -}: MockConfigProviderProps) => { const defaultContext: ConfigContextProps = { metrics: [], products: [], @@ -89,6 +91,7 @@ export const MockConfigProvider = ({ engineerCost: 0, currencies: [], }; + return ( {children} @@ -96,13 +99,15 @@ export const MockConfigProvider = ({ ); }; -export type MockCurrencyProviderProps = - PartialPropsWithChildren; +/** @public */ +export type MockCurrencyProviderProps = PropsWithChildren< + Partial +>; + +/** @public */ +export const MockCurrencyProvider = (props: MockCurrencyProviderProps) => { + const { children, ...context } = props; -export const MockCurrencyProvider = ({ - children, - ...context -}: MockCurrencyProviderProps) => { const defaultContext: CurrencyContextProps = { currency: { kind: null, @@ -111,6 +116,7 @@ export const MockCurrencyProvider = ({ }, setCurrency: jest.fn(), }; + return ( {children} @@ -118,8 +124,9 @@ export const MockCurrencyProvider = ({ ); }; -export type MockBillingDateProviderProps = - PartialPropsWithChildren; +export type MockBillingDateProviderProps = PropsWithChildren< + Partial +>; export const MockBillingDateProvider = ({ children, @@ -149,8 +156,9 @@ export const MockScrollProvider = ({ children }: MockScrollProviderProps) => { ); }; -export type MockGroupsProviderProps = - PartialPropsWithChildren; +export type MockGroupsProviderProps = PropsWithChildren< + Partial +>; export const MockGroupsProvider = ({ children, diff --git a/plugins/cost-insights/src/types/Alert.ts b/plugins/cost-insights/src/types/Alert.ts index 483b9a654d..0b6773b3a8 100644 --- a/plugins/cost-insights/src/types/Alert.ts +++ b/plugins/cost-insights/src/types/Alert.ts @@ -31,8 +31,9 @@ import { Duration } from './Duration'; * React.forwardRef. See https://reactjs.org/docs/forwarding-refs * * Errors thrown within hooks will generate a snackbar error notification. + * + * @public */ - export type Alert = { title: string | JSX.Element; subtitle: string | JSX.Element; @@ -48,6 +49,7 @@ export type Alert = { onDismissed?(options: AlertOptions): Promise; }; +/** @public */ export type AlertForm< A extends Alert = any, Data = any, @@ -55,6 +57,7 @@ export type AlertForm< AlertFormProps & RefAttributes >; +/** @public */ export interface AlertOptions { data: T; group: string; @@ -69,11 +72,14 @@ export interface AlertOptions { * inclusive of the last day. * * https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals + * + * @public */ export interface AlertSnoozeFormData { intervals: string; } +/** @public */ export interface AlertDismissFormData { other: Maybe; reason: AlertDismissReason; @@ -81,23 +87,27 @@ export interface AlertDismissFormData { } // TODO: Convert enum to literal +/** @public */ export enum AlertStatus { Snoozed = 'snoozed', Accepted = 'accepted', Dismissed = 'dismissed', } +/** @public */ export type AlertFormProps = { alert: A; onSubmit: (data: FormData) => void; disableSubmit: (isDisabled: boolean) => void; }; +/** @public */ export interface AlertDismissOption { label: string; reason: string; } +/** @public */ export enum AlertDismissReason { Other = 'other', Resolved = 'resolved', @@ -107,6 +117,7 @@ export enum AlertDismissReason { NotApplicable = 'not-applicable', } +/** @public */ export const AlertDismissOptions: AlertDismissOption[] = [ { reason: AlertDismissReason.Resolved, @@ -134,11 +145,13 @@ export const AlertDismissOptions: AlertDismissOption[] = [ }, ]; +/** @public */ export type AlertSnoozeOption = { label: string; duration: Duration; }; +/** @public */ export const AlertSnoozeOptions: AlertSnoozeOption[] = [ { duration: Duration.P7D, @@ -154,17 +167,20 @@ export const AlertSnoozeOptions: AlertSnoozeOption[] = [ }, ]; +/** @public */ export interface AlertCost { id: string; aggregation: [number, number]; } +/** @public */ export interface ResourceData { previous: number; current: number; name: Maybe; } +/** @public */ export interface BarChartOptions { previousFill: string; currentFill: string; @@ -172,15 +188,20 @@ export interface BarChartOptions { currentName: string; } -/** deprecated use BarChartOptions instead */ +/** + * @public + * @deprecated use BarChartOptions instead + */ export interface BarChartData extends BarChartOptions {} +/** @public */ export enum DataKey { Previous = 'previous', Current = 'current', Name = 'name', } +/** @public */ export interface ProjectGrowthData { project: string; periodStart: string; @@ -190,6 +211,7 @@ export interface ProjectGrowthData { products: Array; } +/** @public */ export interface UnlabeledDataflowData { periodStart: string; periodEnd: string; @@ -198,6 +220,7 @@ export interface UnlabeledDataflowData { labeledCost: number; } +/** @public */ export interface UnlabeledDataflowAlertProject { id: string; unlabeledCost: number; diff --git a/plugins/cost-insights/src/types/ChangeStatistic.ts b/plugins/cost-insights/src/types/ChangeStatistic.ts index 8264b23c8d..ba022aacf3 100644 --- a/plugins/cost-insights/src/types/ChangeStatistic.ts +++ b/plugins/cost-insights/src/types/ChangeStatistic.ts @@ -14,13 +14,16 @@ * limitations under the License. */ +/** @public */ export const EngineerThreshold = 0.5; +/** @public */ export enum ChangeThreshold { upper = 0.05, lower = -0.05, } +/** @public */ export enum GrowthType { Negligible, Savings, diff --git a/plugins/cost-insights/src/types/CurrencyType.ts b/plugins/cost-insights/src/types/CurrencyType.ts index 0316e8f90e..b20c57393f 100644 --- a/plugins/cost-insights/src/types/CurrencyType.ts +++ b/plugins/cost-insights/src/types/CurrencyType.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export enum CurrencyType { USD = 'USD', CarbonOffsetTons = 'CARBON_OFFSET_TONS', diff --git a/plugins/cost-insights/src/types/DateFormat.ts b/plugins/cost-insights/src/types/DateFormat.ts index c5d9c83f6e..4ada898905 100644 --- a/plugins/cost-insights/src/types/DateFormat.ts +++ b/plugins/cost-insights/src/types/DateFormat.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export const DEFAULT_DATE_FORMAT = 'yyyy-LL-dd'; diff --git a/plugins/cost-insights/src/types/Icon.ts b/plugins/cost-insights/src/types/Icon.ts index 24312677c9..968abd18a6 100644 --- a/plugins/cost-insights/src/types/Icon.ts +++ b/plugins/cost-insights/src/types/Icon.ts @@ -14,11 +14,13 @@ * limitations under the License. */ +/** @public */ export type Icon = { kind: string; component: JSX.Element; }; +/** @public */ export enum IconType { Compute = 'compute', Data = 'data', diff --git a/plugins/cost-insights/src/types/Loading.ts b/plugins/cost-insights/src/types/Loading.ts index eddab2401e..36dc0159c5 100644 --- a/plugins/cost-insights/src/types/Loading.ts +++ b/plugins/cost-insights/src/types/Loading.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export type Loading = Record; diff --git a/plugins/cost-insights/src/types/Theme.ts b/plugins/cost-insights/src/types/Theme.ts index 943bf29a12..39b4428a9f 100644 --- a/plugins/cost-insights/src/types/Theme.ts +++ b/plugins/cost-insights/src/types/Theme.ts @@ -13,15 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { BackstagePalette, BackstageTheme } from '@backstage/theme'; import { PaletteOptions } from '@material-ui/core/styles/createPalette'; -type CostInsightsTooltipOptions = { +/** @public */ +export type CostInsightsTooltipOptions = { background: string; color: string; }; -type CostInsightsPaletteAdditions = { +/** @public */ +export type CostInsightsPaletteAdditions = { blue: string; lightBlue: string; darkBlue: string; @@ -33,16 +36,20 @@ type CostInsightsPaletteAdditions = { dataViz: string[]; }; +/** @public */ export type CostInsightsPalette = BackstagePalette & CostInsightsPaletteAdditions; +/** @public */ export type CostInsightsPaletteOptions = PaletteOptions & CostInsightsPaletteAdditions; +/** @public */ export interface CostInsightsThemeOptions extends PaletteOptions { palette: CostInsightsPaletteOptions; } +/** @public */ export interface CostInsightsTheme extends BackstageTheme { palette: CostInsightsPalette; } diff --git a/plugins/cost-insights/src/types/index.ts b/plugins/cost-insights/src/types/index.ts index b836914e73..750114d3ec 100644 --- a/plugins/cost-insights/src/types/index.ts +++ b/plugins/cost-insights/src/types/index.ts @@ -35,45 +35,56 @@ import * as common from '@backstage/plugin-cost-insights-common'; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type ChangeStatistic = common.ChangeStatistic; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Cost = common.Cost; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type DateAggregation = common.DateAggregation; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Entity = common.Entity; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Group = common.Group; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Maybe = common.Maybe; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Metric = common.Metric; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type MetricData = common.MetricData; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Product = common.Product; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Project = common.Project; /** * @deprecated use the same type from `@backstage/plugin-cost-insights-common` instead + * @public */ export type Trendline = common.Trendline; diff --git a/plugins/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index 08a98daa2e..f07258752e 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-dynatrace +## 0.2.0-next.0 + +### Minor Changes + +- e44c0b3811: New features: + + - Some visual improvements to the table that displays Problems + - Added support for viewing recent Synthetics results using + - Added some additional linking to the configured Dynatrace instance + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/dynatrace/README.md b/plugins/dynatrace/README.md index 150c9768af..8ed72ebb5d 100644 --- a/plugins/dynatrace/README.md +++ b/plugins/dynatrace/README.md @@ -38,6 +38,8 @@ dynatrace: #### Catalog Configuration +##### View Recent Application Problems + To show information from Dynatrace for a catalog entity, add the following annotation to `catalog-info.yaml`: ```yaml @@ -51,6 +53,23 @@ metadata: The `DYNATRACE_ENTITY_ID` can be found in Dynatrace by browsing to the entity (a service, synthetic, frontend, workload, etc.). It will be located in the browser address bar in the `id` parameter and has the format `ENTITY_TYPE-ENTITY_ID`, where `ENTITY_TYPE` will be one of `SERVICE`, `SYNTHETIC_TEST`, or other, and `ENTITY_ID` will be a string of characters containing uppercase letters and numbers. +##### Viewing Recent Synthetics Results + +To show recent results from a Synthetic Monitor, add the following annotation to `catalog-info.yaml`: + +```yaml +# catalog-info.yaml +# [...] +metadata: + annotations: + dynatrace.com/synthetics-ids: SYNTHETIC_ID, SYNTHETIC_ID_2, ... +# [...] +``` + +The annotation can also contain a comma or space separated list of Synthetic Ids to surface details for multiple monitors! + +The `SYNTHETIC_ID` can be found in Dynatrace by browsing to the Synthetic monitor. It will be located in the browser address bar in the resource path - `https://example.dynatrace.com/ui/http-monitor/HTTP_CHECK-1234` for an Http check, or `https://example.dynatrace.com/ui/browser-monitor/SYNTHETIC_TEST-1234` for a browser clickpath. + ## Disclaimer This plugin is not officially supported by Dynatrace. diff --git a/plugins/dynatrace/api-report.md b/plugins/dynatrace/api-report.md index 59fd145250..1677318a9f 100644 --- a/plugins/dynatrace/api-report.md +++ b/plugins/dynatrace/api-report.md @@ -14,8 +14,6 @@ export const dynatracePlugin: BackstagePlugin<{}, {}, {}>; // @public export const DynatraceTab: () => JSX.Element; -// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' -// // @public export const isDynatraceAvailable: (entity: Entity) => boolean; diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index 75840783b1..93bc1911cc 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-dynatrace", - "version": "0.1.2", + "version": "0.2.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,8 +23,8 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", @@ -33,14 +33,14 @@ "react-use": "^17.2.4" }, "peerDependencies": { - "@backstage/plugin-catalog-react": "^1.1.3-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -48,7 +48,7 @@ "@types/node": "*", "cross-fetch": "^3.1.5", "express": "^4.18.1", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/dynatrace/src/api/DynatraceApi.ts b/plugins/dynatrace/src/api/DynatraceApi.ts index 1865b20363..4cb5f105bf 100644 --- a/plugins/dynatrace/src/api/DynatraceApi.ts +++ b/plugins/dynatrace/src/api/DynatraceApi.ts @@ -35,8 +35,32 @@ export type DynatraceProblem = { affectedEntities: Array; }; +type SyntheticRequestResults = { + startTimestamp: number; +}; + +export interface DynatraceSyntheticResults { + monitorId: string; + locationsExecutionResults: [ + { + locationId: number; + executionId: string; + requestResults: Array; + }, + ]; +} + +export interface DynatraceSyntheticLocationInfo { + entityId: string; + name: string; + city: string; + browserType: string; +} + export interface DynatraceProblems { problems: Array; + totalCount: number; + pageSize: number; } export const dynatraceApiRef = createApiRef({ @@ -47,4 +71,10 @@ export type DynatraceApi = { getDynatraceProblems( dynatraceEntityId: string, ): Promise; + getDynatraceSyntheticFailures( + syntheticsId: string, + ): Promise; + getDynatraceSyntheticLocationInfo( + syntheticLocationId: string, + ): Promise; }; diff --git a/plugins/dynatrace/src/api/DynatraceClient.ts b/plugins/dynatrace/src/api/DynatraceClient.ts index 27476ddbac..a31253bcb5 100644 --- a/plugins/dynatrace/src/api/DynatraceClient.ts +++ b/plugins/dynatrace/src/api/DynatraceClient.ts @@ -13,7 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { DynatraceProblems, DynatraceApi } from './DynatraceApi'; +import { + DynatraceProblems, + DynatraceApi, + DynatraceSyntheticResults, + DynatraceSyntheticLocationInfo, +} from './DynatraceApi'; import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api'; export class DynatraceClient implements DynatraceApi { @@ -52,11 +57,37 @@ export class DynatraceClient implements DynatraceApi { ); } + async getDynatraceSyntheticFailures( + syntheticsId: string, + ): Promise { + if (!syntheticsId) { + throw new Error('Dynatrace syntheticId is required'); + } + + return this.callApi( + `synthetic/execution/${encodeURIComponent(syntheticsId)}/FAILED`, + {}, + ); + } + + async getDynatraceSyntheticLocationInfo( + syntheticLocationId: string, + ): Promise { + if (!syntheticLocationId) { + throw new Error('Dynatrace syntheticLocationId is required'); + } + + return this.callApi( + `synthetic/locations/${encodeURIComponent(syntheticLocationId)}`, + {}, + ); + } + async getDynatraceProblems( dynatraceEntityId: string, ): Promise { if (!dynatraceEntityId) { - throw new Error('Dynatrace entity ID is required'); + throw new Error('Dynatrace entity id is required'); } return this.callApi('problems', { diff --git a/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx b/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx index c284eaba0f..3f58eed9dc 100644 --- a/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx +++ b/plugins/dynatrace/src/components/DynatraceTab/DynatraceTab.tsx @@ -18,14 +18,16 @@ import { Grid } from '@material-ui/core'; import { Page, Content, - ContentHeader, - SupportButton, MissingAnnotationEmptyState, } from '@backstage/core-components'; import { useEntity } from '@backstage/plugin-catalog-react'; import { ProblemsList } from '../Problems/ProblemsList'; +import { SyntheticsCard } from '../Synthetics/SyntheticsCard'; import { isDynatraceAvailable } from '../../plugin'; -import { DYNATRACE_ID_ANNOTATION } from '../../constants'; +import { + DYNATRACE_ID_ANNOTATION, + DYNATRACE_SYNTHETICS_ANNOTATION, +} from '../../constants'; export const DynatraceTab = () => { const { entity } = useEntity(); @@ -37,18 +39,30 @@ export const DynatraceTab = () => { const dynatraceEntityId: string = entity?.metadata.annotations?.[DYNATRACE_ID_ANNOTATION]!; + const syntheticsIds: string = + entity?.metadata.annotations?.[DYNATRACE_SYNTHETICS_ANNOTATION]!; + return ( - - - Plugin to show information from Dynatrace - - - - - + {dynatraceEntityId ? ( + + + + ) : ( + '' + )} + {syntheticsIds + ?.split(/[ ,]/) + .filter(Boolean) + .map(id => { + return ( + + + + ); + })} diff --git a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.test.tsx b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.test.tsx index 1249f4e886..9b9c51dca1 100644 --- a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.test.tsx +++ b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.test.tsx @@ -36,12 +36,12 @@ describe('ProblemStatus', () => { .mockResolvedValue({ problems }); const rendered = await renderInTestApp( - + , ); expect(await rendered.findByText('example-service')).toBeInTheDocument(); }); - it('renders "nothing to report :)" if no problems are found', async () => { + it('returns "No Problems to Report!" if no problems are found', async () => { mockDynatraceApi.getDynatraceProblems = jest.fn().mockResolvedValue({}); const rendered = await renderInTestApp( @@ -49,7 +49,7 @@ describe('ProblemStatus', () => { , ); expect( - await rendered.findByText('Nothing to report :)'), + await rendered.findByText('No Problems to Report!'), ).toBeInTheDocument(); }); }); diff --git a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx index ac69abf93e..2ee0dda48d 100644 --- a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx +++ b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx @@ -15,19 +15,40 @@ */ import React from 'react'; import useAsync from 'react-use/lib/useAsync'; -import { Progress } from '@backstage/core-components'; -import Alert from '@material-ui/lab/Alert'; -import { useApi } from '@backstage/core-plugin-api'; +import { + Progress, + ResponseErrorPanel, + EmptyState, +} from '@backstage/core-components'; +import { useApi, configApiRef } from '@backstage/core-plugin-api'; import { ProblemsTable } from '../ProblemsTable'; -import { dynatraceApiRef } from '../../../api'; +import { dynatraceApiRef, DynatraceProblem } from '../../../api'; +import { InfoCard } from '@backstage/core-components'; type ProblemsListProps = { dynatraceEntityId: string; }; +const cardContents = ( + problems: DynatraceProblem[], + dynatraceBaseUrl: string, +) => { + return problems.length ? ( + + ) : ( + + ); +}; + export const ProblemsList = (props: ProblemsListProps) => { const { dynatraceEntityId } = props; + const configApi = useApi(configApiRef); const dynatraceApi = useApi(dynatraceApiRef); + const dynatraceBaseUrl = configApi.getString('dynatrace.baseUrl'); + const { value, loading, error } = useAsync(async () => { return dynatraceApi.getDynatraceProblems(dynatraceEntityId); }, [dynatraceApi, dynatraceEntityId]); @@ -36,8 +57,18 @@ export const ProblemsList = (props: ProblemsListProps) => { if (loading) { return ; } else if (error) { - return {error.message}; + return ; } - if (!problems) return
Nothing to report :)
; - return ; + return ( + + {cardContents(problems || [], dynatraceBaseUrl)} + + ); }; diff --git a/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.test.tsx b/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.test.tsx index e4adc43656..aaa3ea0024 100644 --- a/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.test.tsx +++ b/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.test.tsx @@ -28,17 +28,9 @@ describe('ProblemsTable', () => { it('renders the table with some problem data', async () => { const rendered = await renderInTestApp( - , + , , ); - expect(await rendered.findByText('example-service')).toBeInTheDocument(); - }); - it('renders an empty table when no data is provided', async () => { - const rendered = await renderInTestApp( - - - , - ); - expect(await rendered.findByText('Problems')).toBeInTheDocument(); + expect(await rendered.findByTitle('Search')).toBeInTheDocument(); }); }); diff --git a/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.tsx b/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.tsx index 8e3d330c37..78d26e3fe2 100644 --- a/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.tsx +++ b/plugins/dynatrace/src/components/Problems/ProblemsTable/ProblemsTable.tsx @@ -17,17 +17,19 @@ import React from 'react'; import { Table, TableColumn } from '@backstage/core-components'; import { DynatraceProblem } from '../../../api/DynatraceApi'; import { ProblemStatus } from '../ProblemStatus'; -import { configApiRef } from '@backstage/core-plugin-api'; -import { useApi } from '@backstage/core-plugin-api'; import { Link } from '@material-ui/core'; type ProblemsTableProps = { problems: DynatraceProblem[]; + dynatraceBaseUrl: string; }; -export const ProblemsTable = ({ problems }: ProblemsTableProps) => { - const configApi = useApi(configApiRef); - const dynatraceBaseUrl = configApi.getString('dynatrace.baseUrl'); +const parseTimestamp = (timestamp: number | undefined) => { + return timestamp ? new Date(timestamp).toLocaleString() : 'N/A'; +}; + +export const ProblemsTable = (props: ProblemsTableProps) => { + const { problems, dynatraceBaseUrl } = props; const columns: TableColumn[] = [ { title: 'Title', @@ -62,20 +64,18 @@ export const ProblemsTable = ({ problems }: ProblemsTableProps) => { { title: 'Start Time', field: 'startTime', - render: (row: Partial) => - new Date(row.startTime || 0).toString(), + render: (row: Partial) => parseTimestamp(row.startTime), }, { title: 'End Time', field: 'endTime', render: (row: Partial) => - row.endTime === -1 ? 'ongoing' : new Date(row.endTime || 0).toString(), + row.endTime === -1 ? 'ongoing' : parseTimestamp(row.endTime), }, ]; return ( { diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.test.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.test.tsx new file mode 100644 index 0000000000..e9083a3f82 --- /dev/null +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.test.tsx @@ -0,0 +1,52 @@ +/* + * Copyright 2022 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 React from 'react'; +import { SyntheticsCard } from './SyntheticsCard'; +import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils'; +import { dynatraceApiRef } from '../../../api'; +import { ApiProvider, ConfigReader } from '@backstage/core-app-api'; +import { configApiRef } from '@backstage/core-plugin-api'; + +const mockDynatraceApi = { + getDynatraceSyntheticFailures: jest.fn(), +}; +const apis = TestApiRegistry.from( + [dynatraceApiRef, mockDynatraceApi], + [configApiRef, new ConfigReader({ dynatrace: { baseUrl: '__dynatrace__' } })], +); + +describe('SyntheticsCard', () => { + it('renders the card with Synthetics data', async () => { + mockDynatraceApi.getDynatraceSyntheticFailures = jest + .fn() + .mockResolvedValue({ + locationsExecutionResults: [ + { + locationId: '__location__', + requestResults: [{ startTimestamp: 0 }], + }, + ], + }); + const rendered = await renderInTestApp( + + , + , + ); + expect( + await rendered.findByText('View this Synthetic in Dynatrace'), + ).toBeInTheDocument(); + }); +}); diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx new file mode 100644 index 0000000000..6b51a1725c --- /dev/null +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx @@ -0,0 +1,88 @@ +/* + * Copyright 2022 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 React from 'react'; +import useAsync from 'react-use/lib/useAsync'; +import { Progress, ResponseErrorPanel } from '@backstage/core-components'; +import { InfoCard } from '@backstage/core-components'; +import { useApi, configApiRef } from '@backstage/core-plugin-api'; +import { dynatraceApiRef } from '../../../api'; +import { SyntheticsLocation } from '../SyntheticsLocation'; + +type SyntheticsCardProps = { + syntheticsId: string; +}; + +const dynatraceMonitorPrefixes = (idPrefix: string): string => { + switch (idPrefix) { + case 'HTTP_CHECK': + return 'ui/http-monitor'; + case 'BROWSER_MONITOR': + return 'ui/browser-monitor'; + case 'SYNTHETIC_TEST': + return 'ui/browser-monitor'; + default: + throw new Error('Invalid synthetic Id'); + } +}; + +export const SyntheticsCard = (props: SyntheticsCardProps) => { + const { syntheticsId } = props; + const configApi = useApi(configApiRef); + const dynatraceApi = useApi(dynatraceApiRef); + const dynatraceBaseUrl = configApi.getString('dynatrace.baseUrl'); + + const { value, loading, error } = useAsync(async () => { + return dynatraceApi.getDynatraceSyntheticFailures(syntheticsId); + }, [dynatraceApi, syntheticsId]); + + if (loading) { + return ; + } else if (error) { + return ; + } + + const deepLinkPrefix = dynatraceMonitorPrefixes( + `${syntheticsId.split('-')[0]}`, + ); + + const lastFailed = value?.locationsExecutionResults.map(l => { + return { + timestamp: l.requestResults[0].startTimestamp, + location: Number(l.locationId).toString(16), + }; + }); + + return ( + + {lastFailed?.map(l => { + return ( + + ); + })} + + ); +}; diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/index.ts b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/index.ts new file mode 100644 index 0000000000..5284e0cfab --- /dev/null +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2022 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 { SyntheticsCard } from './SyntheticsCard'; diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.test.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.test.tsx new file mode 100644 index 0000000000..de04f73e36 --- /dev/null +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.test.tsx @@ -0,0 +1,65 @@ +/* + * Copyright 2022 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 React from 'react'; +import { SyntheticsLocation } from './SyntheticsLocation'; +import { renderInTestApp, TestApiRegistry } from '@backstage/test-utils'; +import { dynatraceApiRef } from '../../../api'; +import { ApiProvider, ConfigReader } from '@backstage/core-app-api'; +import { configApiRef } from '@backstage/core-plugin-api'; + +const mockDynatraceApi = { + getDynatraceSyntheticLocationInfo: jest.fn(), +}; +const apis = TestApiRegistry.from( + [dynatraceApiRef, mockDynatraceApi], + [configApiRef, new ConfigReader({ dynatrace: { baseUrl: '__dynatrace__' } })], +); + +describe('SyntheticsLocation', () => { + it('renders the SyntheticsLocation chip - recent failure', async () => { + mockDynatraceApi.getDynatraceSyntheticLocationInfo = jest + .fn() + .mockResolvedValue({ name: '__location__' }); + const rendered = await renderInTestApp( + + + , + , + ); + expect(await rendered.findByText(/failed/)).toBeInTheDocument(); + }); + it('renders the SyntheticsLocation chip - no failures', async () => { + mockDynatraceApi.getDynatraceSyntheticLocationInfo = jest + .fn() + .mockResolvedValue({ name: '__location__' }); + const rendered = await renderInTestApp( + + + , + , + ); + expect(await rendered.findByText(/__location__/)).toBeInTheDocument(); + expect(await rendered.queryByText(/failed/)).not.toBeInTheDocument(); + }); +}); diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx new file mode 100644 index 0000000000..4d328210cb --- /dev/null +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx @@ -0,0 +1,75 @@ +/* + * Copyright 2022 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 React from 'react'; +import useAsync from 'react-use/lib/useAsync'; +import { Progress, ResponseErrorPanel } from '@backstage/core-components'; +import { useApi } from '@backstage/core-plugin-api'; +import { Chip } from '@material-ui/core'; +import { dynatraceApiRef } from '../../../api'; + +type SyntheticsLocationProps = { + lastFailedTimestamp: Date; + locationId: string; + key: string; +}; + +const failedInLastXHours = (timestamp: Date, offset: number): boolean => { + if (offset < 0 || offset > 24) + throw new Error('offset must be between 0 and 24'); + return timestamp > new Date(new Date().getTime() - 1000 * 60 * 60 * offset); +}; + +const chipColor = (timestamp: Date): string => { + if (failedInLastXHours(timestamp, 1)) { + return 'salmon'; + } + if (failedInLastXHours(timestamp, 6)) { + return 'sandybrown'; + } + if (failedInLastXHours(timestamp, 24)) { + return 'palegoldenrod'; + } + return 'lightgreen'; +}; + +export const SyntheticsLocation = (props: SyntheticsLocationProps) => { + const { lastFailedTimestamp, locationId } = props; + const dynatraceApi = useApi(dynatraceApiRef); + const { value, loading, error } = useAsync(async () => { + return dynatraceApi.getDynatraceSyntheticLocationInfo( + `SYNTHETIC_LOCATION-00000000000000${locationId}`, + ); + }); + + if (loading) { + return ; + } else if (error) { + return ; + } + + return ( + + ); +}; diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/index.ts b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/index.ts new file mode 100644 index 0000000000..1dc8a783fe --- /dev/null +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2022 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 { SyntheticsLocation } from './SyntheticsLocation'; diff --git a/plugins/dynatrace/src/constants.ts b/plugins/dynatrace/src/constants.ts index 21453e0338..c4cc48d48a 100644 --- a/plugins/dynatrace/src/constants.ts +++ b/plugins/dynatrace/src/constants.ts @@ -14,3 +14,4 @@ * limitations under the License. */ export const DYNATRACE_ID_ANNOTATION = 'dynatrace.com/dynatrace-entity-id'; +export const DYNATRACE_SYNTHETICS_ANNOTATION = 'dynatrace.com/synthetics-ids'; diff --git a/plugins/dynatrace/src/index.ts b/plugins/dynatrace/src/index.ts index c96c16201d..0c5da219a5 100644 --- a/plugins/dynatrace/src/index.ts +++ b/plugins/dynatrace/src/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { dynatracePlugin, DynatraceTab, isDynatraceAvailable } from './plugin'; diff --git a/plugins/dynatrace/src/mocks/problems.json b/plugins/dynatrace/src/mocks/problems.json index b1894bef56..16e3e156ec 100644 --- a/plugins/dynatrace/src/mocks/problems.json +++ b/plugins/dynatrace/src/mocks/problems.json @@ -1,5 +1,5 @@ { - "totalCount": 0, + "totalCount": 1, "pageSize": 0, "nextPageKey": "AQAAABQBAAAABQ==", "problems": [ diff --git a/plugins/dynatrace/src/plugin.ts b/plugins/dynatrace/src/plugin.ts index fc1778b45c..1488ae7417 100644 --- a/plugins/dynatrace/src/plugin.ts +++ b/plugins/dynatrace/src/plugin.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { dynatraceApiRef, DynatraceClient } from './api'; import { createApiFactory, @@ -23,7 +24,10 @@ import { } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; -import { DYNATRACE_ID_ANNOTATION } from './constants'; +import { + DYNATRACE_ID_ANNOTATION, + DYNATRACE_SYNTHETICS_ANNOTATION, +} from './constants'; import { rootRouteRef } from './routes'; @@ -52,10 +56,11 @@ export const dynatracePlugin = createPlugin({ /** * Checks if the entity has a dynatrace id annotation. * @public - * @param entity {Entity} - The entity to check for the dynatrace id annotation. + * @param entity - The entity to check for the dynatrace id annotation. */ export const isDynatraceAvailable = (entity: Entity) => - Boolean(entity.metadata.annotations?.[DYNATRACE_ID_ANNOTATION]); + Boolean(entity.metadata.annotations?.[DYNATRACE_ID_ANNOTATION]) || + Boolean(entity.metadata.annotations?.[DYNATRACE_SYNTHETICS_ANNOTATION]); /** * Creates a routable extension for the dynatrace plugin tab. diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index d541b6e65d..ba33b2f29d 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-todo-list-backend +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + ## 1.0.4 ### Patch Changes diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index 544b1e219e..e95436b632 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-backend", - "version": "1.0.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", + "@backstage/plugin-auth-node": "^0.2.5-next.0", "@types/express": "^4.17.6", "cross-fetch": "^3.1.5", "express": "^4.17.1", @@ -36,10 +36,10 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.6" }, "files": [ diff --git a/plugins/example-todo-list-common/CHANGELOG.md b/plugins/example-todo-list-common/CHANGELOG.md index d624c2f6a6..ed40a99c3e 100644 --- a/plugins/example-todo-list-common/CHANGELOG.md +++ b/plugins/example-todo-list-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @internal/plugin-todo-list-common +## 1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + ## 1.0.3 ### Patch Changes diff --git a/plugins/example-todo-list-common/package.json b/plugins/example-todo-list-common/package.json index 34154fd174..979ea61c36 100644 --- a/plugins/example-todo-list-common/package.json +++ b/plugins/example-todo-list-common/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-common", - "version": "1.0.3", + "version": "1.0.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,15 +23,15 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/plugin-permission-common": "^0.6.3" + "@backstage/plugin-permission-common": "^0.6.4-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", - "@backstage/core-app-api": "^1.0.5-next.0", - "@backstage/dev-utils": "^1.0.5-next.0", - "@backstage/test-utils": "^1.1.3-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@types/node": "^16.11.26", - "msw": "^0.44.0", + "msw": "^0.45.0", "cross-fetch": "^3.1.5" }, "files": [ diff --git a/plugins/example-todo-list/CHANGELOG.md b/plugins/example-todo-list/CHANGELOG.md index 3d637910de..b096ccfa4e 100644 --- a/plugins/example-todo-list/CHANGELOG.md +++ b/plugins/example-todo-list/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-todo-list +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 1.0.4 ### Patch Changes diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index 6900e7455a..37e57c1467 100644 --- a/plugins/example-todo-list/package.json +++ b/plugins/example-todo-list/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list", - "version": "1.0.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,8 +24,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -36,16 +36,16 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/explore-react/CHANGELOG.md b/plugins/explore-react/CHANGELOG.md index b4c5547d9f..c819d6be7a 100644 --- a/plugins/explore-react/CHANGELOG.md +++ b/plugins/explore-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-explore-react +## 0.0.21-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + ## 0.0.20 ### Patch Changes diff --git a/plugins/explore-react/api-report.md b/plugins/explore-react/api-report.md index 75fb01064d..8a9d2b8b13 100644 --- a/plugins/explore-react/api-report.md +++ b/plugins/explore-react/api-report.md @@ -5,8 +5,6 @@ ```ts import { ApiRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ExploreTool" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ExploreTool = { title: string; @@ -17,16 +15,12 @@ export type ExploreTool = { lifecycle?: string; }; -// Warning: (ae-missing-release-tag) "ExploreToolsConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ExploreToolsConfig { // (undocumented) getTools: () => Promise; } -// Warning: (ae-missing-release-tag) "exploreToolsConfigRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const exploreToolsConfigRef: ApiRef; ``` diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index dee3504382..625a6d6947 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore-react", "description": "A frontend library for Backstage plugins that want to interact with the explore plugin", - "version": "0.0.20", + "version": "0.0.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,19 +33,19 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/core-plugin-api": "^1.0.5" + "@backstage/core-plugin-api": "^1.0.6-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/explore-react/src/tools/api.ts b/plugins/explore-react/src/tools/api.ts index 8a91b84785..0fae2ce0fb 100644 --- a/plugins/explore-react/src/tools/api.ts +++ b/plugins/explore-react/src/tools/api.ts @@ -16,10 +16,12 @@ import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const exploreToolsConfigRef = createApiRef({ id: 'plugin.explore.toolsconfig', }); +/** @public */ export type ExploreTool = { title: string; description?: string; @@ -29,6 +31,7 @@ export type ExploreTool = { lifecycle?: string; }; +/** @public */ export interface ExploreToolsConfig { getTools: () => Promise; } diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 96813c08ca..39dd8e0812 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-explore +## 0.3.40-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-explore-react@0.0.21-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.39 ### Patch Changes diff --git a/plugins/explore/api-report.md b/plugins/explore/api-report.md index c7181af19d..9653c0fb63 100644 --- a/plugins/explore/api-report.md +++ b/plugins/explore/api-report.md @@ -12,8 +12,6 @@ import { ExternalRouteRef } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; import { TabProps } from '@material-ui/core'; -// Warning: (ae-missing-release-tag) "catalogEntityRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export const catalogEntityRouteRef: ExternalRouteRef< { @@ -24,36 +22,30 @@ export const catalogEntityRouteRef: ExternalRouteRef< true >; -// Warning: (ae-forgotten-export) The symbol "DomainCardProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "DomainCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const DomainCard: ({ entity }: DomainCardProps) => JSX.Element; +export const DomainCard: (props: { entity: DomainEntity }) => JSX.Element; -// Warning: (ae-missing-release-tag) "DomainExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const DomainExplorerContent: ({ - title, -}: { +export const DomainExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "ExploreLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const ExploreLayout: { - ({ title, subtitle, children }: ExploreLayoutProps): JSX.Element; + (props: ExploreLayoutProps): JSX.Element; Route: (props: SubRoute) => null; }; -// Warning: (ae-missing-release-tag) "ExplorePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type ExploreLayoutProps = { + title?: string; + subtitle?: string; + children?: default_2.ReactNode; +}; + // @public (undocumented) export const ExplorePage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "explorePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const explorePlugin: BackstagePlugin< { @@ -74,31 +66,29 @@ const explorePlugin: BackstagePlugin< export { explorePlugin }; export { explorePlugin as plugin }; -// Warning: (ae-missing-release-tag) "exploreRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const exploreRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "GroupsExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const GroupsExplorerContent: ({ - title, -}: { +export const GroupsExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "ToolExplorerContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ToolExplorerContent: ({ - title, -}: { +export type SubRoute = { + path: string; + title: string; + children: JSX.Element; + tabProps?: TabProps< + default_2.ElementType, + { + component?: default_2.ElementType; + } + >; +}; + +// @public (undocumented) +export const ToolExplorerContent: (props: { title?: string | undefined; }) => JSX.Element; - -// Warnings were encountered during analysis: -// -// src/components/ExploreLayout/ExploreLayout.d.ts:29:5 - (ae-forgotten-export) The symbol "ExploreLayoutProps" needs to be exported by the entry point index.d.ts -// src/components/ExploreLayout/ExploreLayout.d.ts:30:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 793baa699e..db91907e25 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore", "description": "A Backstage plugin for building an exploration page of your software ecosystem", - "version": "0.3.39", + "version": "0.3.40-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,10 +35,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-explore-react": "^0.0.20", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-explore-react": "^0.0.21-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,17 +53,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/explore/src/components/DomainCard/DomainCard.tsx b/plugins/explore/src/components/DomainCard/DomainCard.tsx index 94e4f145c3..a20a5e1f0c 100644 --- a/plugins/explore/src/components/DomainCard/DomainCard.tsx +++ b/plugins/explore/src/components/DomainCard/DomainCard.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DomainEntity, RELATION_OWNED_BY } from '@backstage/catalog-model'; import { EntityRefLinks, @@ -33,13 +34,11 @@ import React from 'react'; import { Button, ItemCardHeader } from '@backstage/core-components'; import { useRouteRef } from '@backstage/core-plugin-api'; -type DomainCardProps = { - entity: DomainEntity; -}; +/** @public */ +export const DomainCard = (props: { entity: DomainEntity }) => { + const { entity } = props; -export const DomainCard = ({ entity }: DomainCardProps) => { const catalogEntityRoute = useRouteRef(entityRouteRef); - const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY); const url = catalogEntityRoute(entityRouteParams(entity)); diff --git a/plugins/explore/src/components/DomainCard/index.ts b/plugins/explore/src/components/DomainCard/index.ts index 5d62a09e89..dbae755460 100644 --- a/plugins/explore/src/components/DomainCard/index.ts +++ b/plugins/explore/src/components/DomainCard/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { DomainCard } from './DomainCard'; diff --git a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx index ba495f6492..3cfed5b12b 100644 --- a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx +++ b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DomainEntity } from '@backstage/catalog-model'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import { Button } from '@material-ui/core'; import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { DomainCard } from '../DomainCard'; - import { Content, ContentHeader, @@ -29,7 +29,6 @@ import { SupportButton, WarningPanel, } from '@backstage/core-components'; - import { useApi } from '@backstage/core-plugin-api'; const Body = () => { @@ -85,16 +84,11 @@ const Body = () => { ); }; -type DomainExplorerContentProps = { - title?: string; -}; - -export const DomainExplorerContent = ({ - title, -}: DomainExplorerContentProps) => { +/** @public */ +export const DomainExplorerContent = (props: { title?: string }) => { return ( - + Discover the domains in your ecosystem. diff --git a/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx b/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx index bc9553c612..3ddf0b17f8 100644 --- a/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx +++ b/plugins/explore/src/components/ExploreLayout/ExploreLayout.tsx @@ -24,8 +24,8 @@ import { default as React } from 'react'; // TODO: This layout could be a shared based component if it was possible to create custom TabbedLayouts // A generalized version of createSubRoutesFromChildren, etc. would be required - -type SubRoute = { +/** @public */ +export type SubRoute = { path: string; title: string; children: JSX.Element; @@ -40,7 +40,8 @@ attachComponentData(Route, dataKey, true); // This causes all mount points that are discovered within this route to use the path of the route itself attachComponentData(Route, 'core.gatherMountPoints', true); -type ExploreLayoutProps = { +/** @public */ +export type ExploreLayoutProps = { title?: string; subtitle?: string; children?: React.ReactNode; @@ -57,12 +58,12 @@ type ExploreLayoutProps = { * * * ``` + * + * @public */ -export const ExploreLayout = ({ - title, - subtitle, - children, -}: ExploreLayoutProps) => { +export const ExploreLayout = (props: ExploreLayoutProps) => { + const { title, subtitle, children } = props; + const routes = useElementFilter(children, elements => elements .selectByComponentData({ diff --git a/plugins/explore/src/components/ExploreLayout/index.ts b/plugins/explore/src/components/ExploreLayout/index.ts index fa98ec78da..4d1781b3f4 100644 --- a/plugins/explore/src/components/ExploreLayout/index.ts +++ b/plugins/explore/src/components/ExploreLayout/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +export type { ExploreLayoutProps, SubRoute } from './ExploreLayout'; export { ExploreLayout } from './ExploreLayout'; diff --git a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx index ae711b85d9..62c4b093c0 100644 --- a/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx +++ b/plugins/explore/src/components/GroupsExplorerContent/GroupsExplorerContent.tsx @@ -31,21 +31,14 @@ const useStyles = makeStyles({ }, }); -type GroupsExplorerContentProps = { - title?: string; -}; - -export const GroupsExplorerContent = ({ - title, -}: GroupsExplorerContentProps) => { +export const GroupsExplorerContent = (props: { title?: string }) => { const classes = useStyles(); return ( - + Explore your groups. - ); diff --git a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx index db07bd0665..5404c67393 100644 --- a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx +++ b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx @@ -18,7 +18,6 @@ import { exploreToolsConfigRef } from '@backstage/plugin-explore-react'; import React from 'react'; import useAsync from 'react-use/lib/useAsync'; import { ToolCard } from '../ToolCard'; - import { Content, ContentHeader, @@ -28,7 +27,6 @@ import { SupportButton, WarningPanel, } from '@backstage/core-components'; - import { useApi } from '@backstage/core-plugin-api'; const Body = () => { @@ -68,13 +66,9 @@ const Body = () => { ); }; -type ToolExplorerContentProps = { - title?: string; -}; - -export const ToolExplorerContent = ({ title }: ToolExplorerContentProps) => ( +export const ToolExplorerContent = (props: { title?: string }) => ( - + Discover the tools in your ecosystem. diff --git a/plugins/explore/src/components/index.ts b/plugins/explore/src/components/index.ts index cefc549684..f8fba16910 100644 --- a/plugins/explore/src/components/index.ts +++ b/plugins/explore/src/components/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export { DomainCard } from './DomainCard'; -export { ExploreLayout } from './ExploreLayout'; +export * from './DomainCard'; +export * from './ExploreLayout'; diff --git a/plugins/explore/src/extensions.tsx b/plugins/explore/src/extensions.tsx index 6800f86966..c6d66c4c12 100644 --- a/plugins/explore/src/extensions.tsx +++ b/plugins/explore/src/extensions.tsx @@ -21,6 +21,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const ExplorePage = explorePlugin.provide( createRoutableExtension({ name: 'ExplorePage', @@ -30,6 +31,7 @@ export const ExplorePage = explorePlugin.provide( }), ); +/** @public */ export const DomainExplorerContent = explorePlugin.provide( createComponentExtension({ name: 'DomainExplorerContent', @@ -42,6 +44,7 @@ export const DomainExplorerContent = explorePlugin.provide( }), ); +/** @public */ export const GroupsExplorerContent = explorePlugin.provide( createComponentExtension({ name: 'GroupsExplorerContent', @@ -54,6 +57,7 @@ export const GroupsExplorerContent = explorePlugin.provide( }), ); +/** @public */ export const ToolExplorerContent = explorePlugin.provide( createComponentExtension({ name: 'ToolExplorerContent', diff --git a/plugins/explore/src/plugin.ts b/plugins/explore/src/plugin.ts index cefb884834..a4bb538265 100644 --- a/plugins/explore/src/plugin.ts +++ b/plugins/explore/src/plugin.ts @@ -19,6 +19,7 @@ import { catalogEntityRouteRef, exploreRouteRef } from './routes'; import { exampleTools } from './util/examples'; import { createApiFactory, createPlugin } from '@backstage/core-plugin-api'; +/** @public */ export const explorePlugin = createPlugin({ id: 'explore', apis: [ diff --git a/plugins/explore/src/routes.ts b/plugins/explore/src/routes.ts index e8b393c4f6..0f66974a03 100644 --- a/plugins/explore/src/routes.ts +++ b/plugins/explore/src/routes.ts @@ -19,12 +19,14 @@ import { createRouteRef, } from '@backstage/core-plugin-api'; +/** @public */ export const exploreRouteRef = createRouteRef({ id: 'explore', }); /** * @deprecated This route is no longer used and can be removed + * @public */ export const catalogEntityRouteRef = createExternalRouteRef({ id: 'catalog-entity', diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index 2af1f5ffe3..238f43d7de 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-firehydrant +## 0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.25 ### Patch Changes diff --git a/plugins/firehydrant/api-report.md b/plugins/firehydrant/api-report.md index c12048e81f..2e3bcf6385 100644 --- a/plugins/firehydrant/api-report.md +++ b/plugins/firehydrant/api-report.md @@ -8,13 +8,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "FirehydrantCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const FirehydrantCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "firehydrantPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const firehydrantPlugin: BackstagePlugin< { diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index def4c08045..b426e8db08 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-firehydrant", "description": "A Backstage plugin that integrates towards FireHydrant", - "version": "0.1.25", + "version": "0.1.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,9 +25,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -39,17 +39,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/firehydrant/src/plugin.ts b/plugins/firehydrant/src/plugin.ts index df21ee7f9c..6deefe4fce 100644 --- a/plugins/firehydrant/src/plugin.ts +++ b/plugins/firehydrant/src/plugin.ts @@ -23,6 +23,7 @@ import { import { rootRouteRef } from './routes'; +/** @public */ export const firehydrantPlugin = createPlugin({ id: 'firehydrant', apis: [ @@ -37,6 +38,7 @@ export const firehydrantPlugin = createPlugin({ }, }); +/** @public */ export const FirehydrantCard = firehydrantPlugin.provide( createComponentExtension({ name: 'FirehydrantCard', diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index 8a7e37e0eb..59fc0986eb 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-fossa +## 0.2.41-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.40 ### Patch Changes diff --git a/plugins/fossa/api-report.md b/plugins/fossa/api-report.md index ca9610b992..45f0746ac3 100644 --- a/plugins/fossa/api-report.md +++ b/plugins/fossa/api-report.md @@ -9,22 +9,14 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { InfoCardVariants } from '@backstage/core-components'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityFossaCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityFossaCard: ({ - variant, -}: { +export const EntityFossaCard: (props: { variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "FossaPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const FossaPage: ({ entitiesFilter }: FossaPageProps) => JSX.Element; +export const FossaPage: (props: FossaPageProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "FossaPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type FossaPageProps = { entitiesFilter?: @@ -33,8 +25,6 @@ export type FossaPageProps = { | undefined; }; -// Warning: (ae-missing-release-tag) "fossaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const fossaPlugin: BackstagePlugin< { diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index f9de9e8087..15cbb078ac 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-fossa", "description": "A Backstage plugin that integrates towards FOSSA", - "version": "0.2.40", + "version": "0.2.41-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,10 +36,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,16 +53,16 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/fossa/src/components/FossaCard/FossaCard.tsx b/plugins/fossa/src/components/FossaCard/FossaCard.tsx index bbd5594fbc..31ff84e107 100644 --- a/plugins/fossa/src/components/FossaCard/FossaCard.tsx +++ b/plugins/fossa/src/components/FossaCard/FossaCard.tsx @@ -100,7 +100,9 @@ const Card = ({ ); }; -export const FossaCard = ({ variant }: { variant?: InfoCardVariants }) => { + +export const FossaCard = (props: { variant?: InfoCardVariants }) => { + const { variant } = props; const { entity } = useEntity(); const fossaApi = useApi(fossaApiRef); diff --git a/plugins/fossa/src/components/FossaPage/FossaPage.tsx b/plugins/fossa/src/components/FossaPage/FossaPage.tsx index 731852d4a7..faff862d0f 100644 --- a/plugins/fossa/src/components/FossaPage/FossaPage.tsx +++ b/plugins/fossa/src/components/FossaPage/FossaPage.tsx @@ -167,6 +167,7 @@ const filters: TableFilter[] = [ { column: 'Branch', type: 'select' }, ]; +/** @public */ export type FossaPageProps = { entitiesFilter?: | Record[] @@ -174,9 +175,8 @@ export type FossaPageProps = { | undefined; }; -export const FossaPage = ({ - entitiesFilter = { kind: 'Component' }, -}: FossaPageProps) => { +export const FossaPage = (props: FossaPageProps) => { + const { entitiesFilter = { kind: 'Component' } } = props; const catalogApi = useApi(catalogApiRef); const fossaApi = useApi(fossaApiRef); const [filter, setFilter] = useState(entitiesFilter); diff --git a/plugins/fossa/src/extensions.tsx b/plugins/fossa/src/extensions.tsx index 97bea6a4cf..d26057d9cc 100644 --- a/plugins/fossa/src/extensions.tsx +++ b/plugins/fossa/src/extensions.tsx @@ -21,6 +21,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const EntityFossaCard = fossaPlugin.provide( createComponentExtension({ name: 'EntityFossaCard', @@ -30,6 +31,7 @@ export const EntityFossaCard = fossaPlugin.provide( }), ); +/** @public */ export const FossaPage = fossaPlugin.provide( createRoutableExtension({ name: 'FossaPage', diff --git a/plugins/fossa/src/plugin.ts b/plugins/fossa/src/plugin.ts index 954ecedc81..bcc8c0f8e6 100644 --- a/plugins/fossa/src/plugin.ts +++ b/plugins/fossa/src/plugin.ts @@ -24,6 +24,7 @@ import { identityApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const fossaPlugin = createPlugin({ id: 'fossa', apis: [ diff --git a/plugins/gcalendar/CHANGELOG.md b/plugins/gcalendar/CHANGELOG.md index 946aae643a..7c93731f47 100644 --- a/plugins/gcalendar/CHANGELOG.md +++ b/plugins/gcalendar/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gcalendar +## 0.3.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.3.4 ### Patch Changes diff --git a/plugins/gcalendar/api-report.md b/plugins/gcalendar/api-report.md index 61c39aaf2a..8c86e4d2c9 100644 --- a/plugins/gcalendar/api-report.md +++ b/plugins/gcalendar/api-report.md @@ -12,22 +12,15 @@ import { FetchApi } from '@backstage/core-plugin-api'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EventAttendee" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type EventAttendee = gapi.client.calendar.EventAttendee; -// Warning: (ae-missing-release-tag) "GCalendar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GCalendar = gapi.client.calendar.CalendarListEntry; -// Warning: (ae-missing-release-tag) "GCalendarApiClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class GCalendarApiClient { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(options: Options); + constructor(options: { authApi: OAuthApi; fetchApi: FetchApi }); // (undocumented) getCalendars(params?: any): Promise; // (undocumented) @@ -39,13 +32,9 @@ export class GCalendarApiClient { }>; } -// Warning: (ae-missing-release-tag) "gcalendarApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gcalendarApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "GCalendarEvent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GCalendarEvent = gapi.client.calendar.Event & Pick & @@ -53,13 +42,9 @@ export type GCalendarEvent = gapi.client.calendar.Event & calendarId?: string; }; -// Warning: (ae-missing-release-tag) "GCalendarList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GCalendarList = gapi.client.calendar.CalendarList; -// Warning: (ae-missing-release-tag) "gcalendarPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gcalendarPlugin: BackstagePlugin< { @@ -69,13 +54,9 @@ export const gcalendarPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "HomePageCalendar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const HomePageCalendar: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ResponseStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum ResponseStatus { // (undocumented) diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index cc7fdfa61c..f46660f942 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcalendar", - "version": "0.3.4", + "version": "0.3.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,8 +22,8 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -55,7 +55,7 @@ "@types/node": "^16.11.26", "@types/sanitize-html": "^2.6.2", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/gcalendar/src/api/client.ts b/plugins/gcalendar/src/api/client.ts index 084c302636..0f5b56cc08 100644 --- a/plugins/gcalendar/src/api/client.ts +++ b/plugins/gcalendar/src/api/client.ts @@ -13,25 +13,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { OAuthApi, createApiRef, FetchApi } from '@backstage/core-plugin-api'; +import { OAuthApi, createApiRef, FetchApi } from '@backstage/core-plugin-api'; import { GCalendarEvent, GCalendarList } from './types'; import { ResponseError } from '@backstage/errors'; -type Options = { - authApi: OAuthApi; - fetchApi: FetchApi; -}; - +/** @public */ export const gcalendarApiRef = createApiRef({ id: 'plugin.gcalendar.service', }); +/** @public */ export class GCalendarApiClient { private readonly authApi: OAuthApi; private readonly fetchApi: FetchApi; - constructor(options: Options) { + constructor(options: { authApi: OAuthApi; fetchApi: FetchApi }) { this.authApi = options.authApi; this.fetchApi = options.fetchApi; } diff --git a/plugins/gcalendar/src/api/index.ts b/plugins/gcalendar/src/api/index.ts index 4c195158d3..09cc21a2d0 100644 --- a/plugins/gcalendar/src/api/index.ts +++ b/plugins/gcalendar/src/api/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export * from './client'; export * from './types'; diff --git a/plugins/gcalendar/src/api/types.ts b/plugins/gcalendar/src/api/types.ts index 5c8bbdd1c1..9b1b508762 100644 --- a/plugins/gcalendar/src/api/types.ts +++ b/plugins/gcalendar/src/api/types.ts @@ -16,18 +16,23 @@ /// +/** @public */ export type GCalendarList = gapi.client.calendar.CalendarList; +/** @public */ export type GCalendar = gapi.client.calendar.CalendarListEntry; +/** @public */ export type EventAttendee = gapi.client.calendar.EventAttendee; +/** @public */ export type GCalendarEvent = gapi.client.calendar.Event & Pick & Pick & { calendarId?: string; }; +/** @public */ export enum ResponseStatus { needsAction = 'needsAction', accepted = 'accepted', diff --git a/plugins/gcalendar/src/index.ts b/plugins/gcalendar/src/index.ts index 7c7f0c6374..37d51d0ef4 100644 --- a/plugins/gcalendar/src/index.ts +++ b/plugins/gcalendar/src/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { gcalendarPlugin, HomePageCalendar } from './plugin'; export * from './api'; diff --git a/plugins/gcalendar/src/plugin.ts b/plugins/gcalendar/src/plugin.ts index 1f98f560f1..06c3922087 100644 --- a/plugins/gcalendar/src/plugin.ts +++ b/plugins/gcalendar/src/plugin.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createApiFactory, createComponentExtension, @@ -20,10 +21,10 @@ import { fetchApiRef, googleAuthApiRef, } from '@backstage/core-plugin-api'; - import { GCalendarApiClient, gcalendarApiRef } from './api'; import { rootRouteRef } from './routes'; +/** @public */ export const gcalendarPlugin = createPlugin({ id: 'gcalendar', routes: { @@ -40,6 +41,7 @@ export const gcalendarPlugin = createPlugin({ ], }); +/** @public */ export const HomePageCalendar = gcalendarPlugin.provide( createComponentExtension({ name: 'HomePageCalendar', diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index c7ab79eada..39a1dd7235 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gcp-projects +## 0.3.28-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.3.27 ### Patch Changes diff --git a/plugins/gcp-projects/api-report.md b/plugins/gcp-projects/api-report.md index 46c8dd2c2f..5b7604c935 100644 --- a/plugins/gcp-projects/api-report.md +++ b/plugins/gcp-projects/api-report.md @@ -10,8 +10,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "GcpApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GcpApi = { listProjects(): Promise; @@ -22,13 +20,9 @@ export type GcpApi = { }): Promise; }; -// Warning: (ae-missing-release-tag) "gcpApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gcpApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "GcpClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class GcpClient implements GcpApi { constructor(googleAuthApi: OAuthApi); @@ -45,13 +39,9 @@ export class GcpClient implements GcpApi { listProjects(): Promise; } -// Warning: (ae-missing-release-tag) "GcpProjectsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GcpProjectsPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "gcpProjectsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const gcpProjectsPlugin: BackstagePlugin< { @@ -63,8 +53,6 @@ const gcpProjectsPlugin: BackstagePlugin< export { gcpProjectsPlugin }; export { gcpProjectsPlugin as plugin }; -// Warning: (ae-missing-release-tag) "Operation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Operation = { name: string; @@ -74,8 +62,6 @@ export type Operation = { response: string; }; -// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Project = { name: string; @@ -85,15 +71,11 @@ export type Project = { createTime?: string; }; -// Warning: (ae-missing-release-tag) "ProjectDetails" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type ProjectDetails = { details: string; }; -// Warning: (ae-missing-release-tag) "Status" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Status = { code: number; diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 5a24b88a5e..56c68effee 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.27", + "version": "0.3.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -47,17 +47,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/gcp-projects/src/api/GcpApi.ts b/plugins/gcp-projects/src/api/GcpApi.ts index 9167d2983f..434da5fd28 100644 --- a/plugins/gcp-projects/src/api/GcpApi.ts +++ b/plugins/gcp-projects/src/api/GcpApi.ts @@ -17,10 +17,12 @@ import { Project, Operation } from './types'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const gcpApiRef = createApiRef({ id: 'plugin.gcpprojects.service', }); +/** @public */ export type GcpApi = { listProjects(): Promise; getProject(projectId: string): Promise; diff --git a/plugins/gcp-projects/src/api/GcpClient.ts b/plugins/gcp-projects/src/api/GcpClient.ts index f226e3b20c..10dcb5a4c8 100644 --- a/plugins/gcp-projects/src/api/GcpClient.ts +++ b/plugins/gcp-projects/src/api/GcpClient.ts @@ -21,6 +21,7 @@ import { OAuthApi } from '@backstage/core-plugin-api'; const BASE_URL = 'https://content-cloudresourcemanager.googleapis.com/v1/projects'; +/** @public */ export class GcpClient implements GcpApi { constructor(private readonly googleAuthApi: OAuthApi) {} diff --git a/plugins/gcp-projects/src/api/types.ts b/plugins/gcp-projects/src/api/types.ts index 6b70c627d2..8e3dd39519 100644 --- a/plugins/gcp-projects/src/api/types.ts +++ b/plugins/gcp-projects/src/api/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type Project = { name: string; projectNumber?: string; @@ -22,10 +23,12 @@ export type Project = { createTime?: string; }; +/** @public */ export type ProjectDetails = { details: string; }; +/** @public */ export type Operation = { name: string; metadata: string; @@ -34,6 +37,7 @@ export type Operation = { response: string; }; +/** @public */ export type Status = { code: number; message: string; diff --git a/plugins/gcp-projects/src/plugin.ts b/plugins/gcp-projects/src/plugin.ts index 080d051ee3..fede29e3b5 100644 --- a/plugins/gcp-projects/src/plugin.ts +++ b/plugins/gcp-projects/src/plugin.ts @@ -23,6 +23,7 @@ import { googleAuthApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const gcpProjectsPlugin = createPlugin({ id: 'gcp-projects', routes: { @@ -39,6 +40,7 @@ export const gcpProjectsPlugin = createPlugin({ ], }); +/** @public */ export const GcpProjectsPage = gcpProjectsPlugin.provide( createRoutableExtension({ name: 'GcpProjectsPage', diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index 4613940252..8544b6b42f 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-git-release-manager +## 0.3.22-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.3.21 ### Patch Changes diff --git a/plugins/git-release-manager/api-report.md b/plugins/git-release-manager/api-report.md index 24207de991..d34b6c07fb 100644 --- a/plugins/git-release-manager/api-report.md +++ b/plugins/git-release-manager/api-report.md @@ -90,7 +90,6 @@ const DISABLE_CACHE: { const Divider: () => JSX.Element; // Warning: (ae-forgotten-export) The symbol "SemverTagParts" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "getBumpedSemverTagParts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public function getBumpedSemverTagParts( @@ -105,14 +104,8 @@ function getBumpedSemverTagParts( }; }; -// Warning: (ae-missing-release-tag) "getBumpedTag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public -function getBumpedTag({ - project, - tag, - bumpLevel, -}: { +function getBumpedTag(options: { project: Project; tag: string; bumpLevel: keyof typeof SEMVER_PARTS; @@ -167,10 +160,8 @@ function getSemverTagParts(tag: string): // @public (undocumented) function getShortCommitHash(hash: string): string; -// Warning: (ae-missing-release-tag) "getTagParts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public -function getTagParts({ project, tag }: { project: Project; tag: string }): +function getTagParts(options: { project: Project; tag: string }): | { error: AlertError; tagParts?: undefined; @@ -207,14 +198,8 @@ export const gitReleaseManagerPlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "InfoCardPlus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -const InfoCardPlus: ({ - children, -}: { - children?: React_2.ReactNode; -}) => JSX.Element; +const InfoCardPlus: (props: { children?: React_2.ReactNode }) => JSX.Element; // Warning: (ae-missing-release-tag) "internals" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // @@ -625,16 +610,8 @@ declare namespace testIds { export { TEST_IDS }; } -// Warning: (ae-missing-release-tag) "validateTagName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -const validateTagName: ({ - project, - tagName, -}: { - project: Project; - tagName?: string | undefined; -}) => +const validateTagName: (options: { project: Project; tagName?: string }) => | { tagNameError: null; } @@ -653,9 +630,9 @@ const VERSIONING_STRATEGIES: { // Warnings were encountered during analysis: // // src/components/ResponseStepDialog/LinearProgressWithLabel.d.ts:5:5 - (ae-forgotten-export) The symbol "ResponseStep" needs to be exported by the entry point index.d.ts -// src/helpers/getBumpedTag.d.ts:14:5 - (ae-forgotten-export) The symbol "Project" needs to be exported by the entry point index.d.ts -// src/helpers/getBumpedTag.d.ts:19:5 - (ae-forgotten-export) The symbol "CalverTagParts" needs to be exported by the entry point index.d.ts -// src/helpers/getBumpedTag.d.ts:31:5 - (ae-forgotten-export) The symbol "AlertError" needs to be exported by the entry point index.d.ts +// src/helpers/getBumpedTag.d.ts:16:5 - (ae-forgotten-export) The symbol "Project" needs to be exported by the entry point index.d.ts +// src/helpers/getBumpedTag.d.ts:21:5 - (ae-forgotten-export) The symbol "CalverTagParts" needs to be exported by the entry point index.d.ts +// src/helpers/getBumpedTag.d.ts:33:5 - (ae-forgotten-export) The symbol "AlertError" needs to be exported by the entry point index.d.ts // src/index.d.ts:9:5 - (ae-forgotten-export) The symbol "components" needs to be exported by the entry point index.d.ts // src/index.d.ts:10:5 - (ae-forgotten-export) The symbol "constants" needs to be exported by the entry point index.d.ts // src/index.d.ts:11:5 - (ae-forgotten-export) The symbol "helpers" needs to be exported by the entry point index.d.ts diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index d5b0835513..b6c95e3f79 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.21", + "version": "0.3.22-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,9 +24,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration": "^1.3.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration": "^1.3.1-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,10 +43,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -55,7 +55,7 @@ "@types/node": "^16.11.26", "@types/recharts": "^1.8.15", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/git-release-manager/src/components/InfoCardPlus.tsx b/plugins/git-release-manager/src/components/InfoCardPlus.tsx index bd0b79ba37..cd682adde1 100644 --- a/plugins/git-release-manager/src/components/InfoCardPlus.tsx +++ b/plugins/git-release-manager/src/components/InfoCardPlus.tsx @@ -17,7 +17,6 @@ import React from 'react'; import { makeStyles } from '@material-ui/core'; import { TEST_IDS } from '../test-helpers/test-ids'; - import { InfoCard } from '@backstage/core-components'; const useStyles = makeStyles(() => ({ @@ -26,7 +25,8 @@ const useStyles = makeStyles(() => ({ }, })); -export const InfoCardPlus = ({ children }: { children?: React.ReactNode }) => { +/** @public */ +export const InfoCardPlus = (props: { children?: React.ReactNode }) => { const classes = useStyles(); return ( @@ -34,7 +34,7 @@ export const InfoCardPlus = ({ children }: { children?: React.ReactNode }) => { style={{ position: 'relative' }} data-testid={TEST_IDS.info.infoFeaturePlus} > - {children} + {props.children} ); }; diff --git a/plugins/git-release-manager/src/helpers/getBumpedTag.ts b/plugins/git-release-manager/src/helpers/getBumpedTag.ts index dbfb00818e..5183947a1c 100644 --- a/plugins/git-release-manager/src/helpers/getBumpedTag.ts +++ b/plugins/git-release-manager/src/helpers/getBumpedTag.ts @@ -28,16 +28,15 @@ import { SemverTagParts } from './tagParts/getSemverTagParts'; * * For semantic versioning this means either a minor or a patch bump * depending on the value of `bumpLevel` + * + * @public */ -export function getBumpedTag({ - project, - tag, - bumpLevel, -}: { +export function getBumpedTag(options: { project: Project; tag: string; bumpLevel: keyof typeof SEMVER_PARTS; }) { + const { project, tag, bumpLevel } = options; const tagParts = getTagParts({ project, tag }); if (tagParts.error !== undefined) { @@ -53,6 +52,7 @@ export function getBumpedTag({ return getBumpedSemverTag(tagParts.tagParts, bumpLevel); } +/** @public */ function getPatchedCalverTag(tagParts: CalverTagParts) { const bumpedTagParts: CalverTagParts = { ...tagParts, @@ -67,6 +67,7 @@ function getPatchedCalverTag(tagParts: CalverTagParts) { }; } +/** @public */ function getBumpedSemverTag( tagParts: SemverTagParts, semverBumpLevel: keyof typeof SEMVER_PARTS, @@ -85,6 +86,8 @@ function getBumpedSemverTag( /** * Calculates the next semantic version, taking into account * whether or not it's a minor or patch + * + * @public */ export function getBumpedSemverTagParts( tagParts: SemverTagParts, diff --git a/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts b/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts index 750e4e23c5..ba8412b2b4 100644 --- a/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts +++ b/plugins/git-release-manager/src/helpers/tagParts/getTagParts.ts @@ -21,17 +21,13 @@ import { Project } from '../../contexts/ProjectContext'; /** * Tag parts are the individual parts of a version, e.g. .. * are the parts of a semantic version + * + * @public */ -export function getTagParts({ - project, - tag, -}: { - project: Project; - tag: string; -}) { - if (project.versioningStrategy === 'calver') { - return getCalverTagParts(tag); +export function getTagParts(options: { project: Project; tag: string }) { + if (options.project.versioningStrategy === 'calver') { + return getCalverTagParts(options.tag); } - return getSemverTagParts(tag); + return getSemverTagParts(options.tag); } diff --git a/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts b/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts index b9c0fb74ff..4e35cb0ca4 100644 --- a/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts +++ b/plugins/git-release-manager/src/helpers/tagParts/validateTagName.ts @@ -18,13 +18,13 @@ import { getCalverTagParts } from './getCalverTagParts'; import { getSemverTagParts } from './getSemverTagParts'; import { Project } from '../../contexts/ProjectContext'; -export const validateTagName = ({ - project, - tagName, -}: { +/** @public */ +export const validateTagName = (options: { project: Project; tagName?: string; }) => { + const { project, tagName } = options; + if (!tagName) { return { tagNameError: null, @@ -33,7 +33,6 @@ export const validateTagName = ({ if (project.versioningStrategy === 'calver') { const { error } = getCalverTagParts(tagName); - return { tagNameError: error, }; diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index cb3f73d4cb..dac9fea3ea 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-github-actions +## 0.5.9-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.5.8 ### Patch Changes diff --git a/plugins/github-actions/api-report.md b/plugins/github-actions/api-report.md index 862d20d608..b1628996e0 100644 --- a/plugins/github-actions/api-report.md +++ b/plugins/github-actions/api-report.md @@ -14,8 +14,6 @@ import { OAuthApi } from '@backstage/core-plugin-api'; import { RestEndpointMethodTypes } from '@octokit/rest'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "BuildStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export enum BuildStatus { // (undocumented) @@ -28,46 +26,29 @@ export enum BuildStatus { 'success' = 0, } -// Warning: (ae-missing-release-tag) "EntityGithubActionsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityGithubActionsContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestGithubActionRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestGithubActionRunCard: ({ - branch, - variant, -}: { +export const EntityLatestGithubActionRunCard: (props: { branch: string; variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestGithubActionsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestGithubActionsForBranchCard: ({ - branch, - variant, -}: { +export const EntityLatestGithubActionsForBranchCard: (props: { branch: string; variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntityRecentGithubActionsRunsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityRecentGithubActionsRunsCard: ({ - branch, - dense, - limit, - variant, -}: Props) => JSX.Element; +export const EntityRecentGithubActionsRunsCard: (props: { + branch?: string | undefined; + dense?: boolean | undefined; + limit?: number | undefined; + variant?: InfoCardVariants | undefined; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "GITHUB_ACTIONS_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GITHUB_ACTIONS_ANNOTATION = 'github.com/project-slug'; @@ -125,8 +106,6 @@ export type GithubActionsApi = { >; }; -// Warning: (ae-missing-release-tag) "githubActionsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const githubActionsApiRef: ApiRef; @@ -191,8 +170,6 @@ export class GithubActionsClient implements GithubActionsApi { }): Promise; } -// Warning: (ae-missing-release-tag) "githubActionsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const githubActionsPlugin: BackstagePlugin< { @@ -204,15 +181,11 @@ const githubActionsPlugin: BackstagePlugin< export { githubActionsPlugin }; export { githubActionsPlugin as plugin }; -// Warning: (ae-missing-release-tag) "isGithubActionsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isGithubActionsAvailable: (entity: Entity) => boolean; export { isGithubActionsAvailable }; export { isGithubActionsAvailable as isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "Job" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Job = { html_url?: string; @@ -225,48 +198,35 @@ export type Job = { steps?: Step[]; }; -// Warning: (ae-missing-release-tag) "Jobs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Jobs = { total_count: number; jobs: Job[]; }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "LatestWorkflowRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const LatestWorkflowRunCard: ({ - branch, - variant, -}: Props_2) => JSX.Element; +export const LatestWorkflowRunCard: (props: { + branch: string; + variant?: InfoCardVariants; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "LatestWorkflowsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const LatestWorkflowsForBranchCard: ({ - branch, - variant, -}: Props_2) => JSX.Element; +export const LatestWorkflowsForBranchCard: (props: { + branch: string; + variant?: InfoCardVariants; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "RecentWorkflowRunsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const RecentWorkflowRunsCard: ({ - branch, - dense, - limit, - variant, -}: Props) => JSX.Element; +export const RecentWorkflowRunsCard: (props: { + branch?: string; + dense?: boolean; + limit?: number; + variant?: InfoCardVariants; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Router: () => JSX.Element; -// Warning: (ae-missing-release-tag) "Step" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Step = { name: string; diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 6360a532e6..18adf36085 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.5.8", + "version": "0.5.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,10 +37,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -55,17 +55,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/github-actions/src/api/GithubActionsApi.ts b/plugins/github-actions/src/api/GithubActionsApi.ts index 25bbf0b809..14dbc3210e 100644 --- a/plugins/github-actions/src/api/GithubActionsApi.ts +++ b/plugins/github-actions/src/api/GithubActionsApi.ts @@ -17,6 +17,7 @@ import { RestEndpointMethodTypes } from '@octokit/rest'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const githubActionsApiRef = createApiRef({ id: 'plugin.githubactions.service', }); diff --git a/plugins/github-actions/src/api/types.ts b/plugins/github-actions/src/api/types.ts index db926d9c03..2e997d9bf7 100644 --- a/plugins/github-actions/src/api/types.ts +++ b/plugins/github-actions/src/api/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type Step = { name: string; status: string; @@ -23,6 +24,7 @@ export type Step = { completed_at?: string; }; +/** @public */ export type Job = { html_url?: string; status: string; @@ -34,11 +36,13 @@ export type Job = { steps?: Step[]; }; +/** @public */ export type Jobs = { total_count: number; jobs: Job[]; }; +/** @public */ export enum BuildStatus { 'success', 'failure', diff --git a/plugins/github-actions/src/components/Cards/Cards.tsx b/plugins/github-actions/src/components/Cards/Cards.tsx index 61a5146bee..79777ed8c3 100644 --- a/plugins/github-actions/src/components/Cards/Cards.tsx +++ b/plugins/github-actions/src/components/Cards/Cards.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { readGitHubIntegrationConfigs } from '@backstage/integration'; import { useEntity } from '@backstage/plugin-catalog-react'; import { @@ -27,7 +28,6 @@ import { GITHUB_ACTIONS_ANNOTATION } from '../getProjectNameFromEntity'; import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns'; import { WorkflowRunsTable } from '../WorkflowRunsTable'; import { WorkflowRunStatus } from '../WorkflowRunStatus'; - import { configApiRef, errorApiRef, useApi } from '@backstage/core-plugin-api'; import { InfoCard, @@ -43,20 +43,18 @@ const useStyles = makeStyles({ }, }); -const WidgetContent = ({ - error, - loading, - lastRun, - branch, -}: { +const WidgetContent = (props: { error?: Error; loading?: boolean; lastRun: WorkflowRun; branch: string; }) => { + const { error, loading, lastRun, branch } = props; const classes = useStyles(); + if (error) return Couldn't fetch latest {branch} run; if (loading) return ; + return ( { +/** @public */ +export const LatestWorkflowRunCard = (props: { + branch: string; + variant?: InfoCardVariants; +}) => { + const { branch = 'master', variant } = props; const { entity } = useEntity(); const config = useApi(configApiRef); const errorApi = useApi(errorApiRef); @@ -120,15 +119,12 @@ export const LatestWorkflowRunCard = ({ ); }; -type Props = { +/** @public */ +export const LatestWorkflowsForBranchCard = (props: { branch: string; variant?: InfoCardVariants; -}; - -export const LatestWorkflowsForBranchCard = ({ - branch = 'master', - variant, -}: Props) => { +}) => { + const { branch = 'master', variant } = props; const { entity } = useEntity(); return ( diff --git a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx index a987a8569f..7a20501072 100644 --- a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx +++ b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.test.tsx @@ -21,7 +21,6 @@ import { render } from '@testing-library/react'; import React from 'react'; import { MemoryRouter } from 'react-router'; import { useWorkflowRuns } from '../useWorkflowRuns'; -import type { Props as RecentWorkflowRunsCardProps } from './RecentWorkflowRunsCard'; import { RecentWorkflowRunsCard } from './RecentWorkflowRunsCard'; import { ConfigReader } from '@backstage/core-app-api'; @@ -75,7 +74,7 @@ describe('', () => { jest.resetAllMocks(); }); - const renderSubject = (props: RecentWorkflowRunsCardProps = {}) => + const renderSubject = (props: any = {}) => render( diff --git a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx index 3eba4981e7..fcd0f194a3 100644 --- a/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx +++ b/plugins/github-actions/src/components/Cards/RecentWorkflowRunsCard.tsx @@ -32,29 +32,28 @@ import { const firstLine = (message: string): string => message.split('\n')[0]; -export type Props = { +/** @public */ +export const RecentWorkflowRunsCard = (props: { branch?: string; dense?: boolean; limit?: number; variant?: InfoCardVariants; -}; +}) => { + const { branch, dense = false, limit = 5, variant } = props; -export const RecentWorkflowRunsCard = ({ - branch, - dense = false, - limit = 5, - variant, -}: Props) => { const { entity } = useEntity(); const config = useApi(configApiRef); const errorApi = useApi(errorApiRef); + // TODO: Get github hostname from metadata annotation const hostname = readGitHubIntegrationConfigs( config.getOptionalConfigArray('integrations.github') ?? [], )[0].host; + const [owner, repo] = ( entity?.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION] ?? '/' ).split('/'); + const [{ runs = [], loading, error }] = useWorkflowRuns({ hostname, owner, @@ -62,6 +61,7 @@ export const RecentWorkflowRunsCard = ({ branch, initialPageSize: limit, }); + useEffect(() => { if (error) { errorApi.post(error); diff --git a/plugins/github-actions/src/components/Cards/index.ts b/plugins/github-actions/src/components/Cards/index.ts index 1457b9c86f..335c0c42da 100644 --- a/plugins/github-actions/src/components/Cards/index.ts +++ b/plugins/github-actions/src/components/Cards/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { LatestWorkflowRunCard, LatestWorkflowsForBranchCard } from './Cards'; export { RecentWorkflowRunsCard } from './RecentWorkflowRunsCard'; diff --git a/plugins/github-actions/src/components/Router.tsx b/plugins/github-actions/src/components/Router.tsx index 793293cce8..d8b8a87d38 100644 --- a/plugins/github-actions/src/components/Router.tsx +++ b/plugins/github-actions/src/components/Router.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React from 'react'; import { Entity } from '@backstage/catalog-model'; import { useEntity } from '@backstage/plugin-catalog-react'; @@ -23,9 +24,11 @@ import { WorkflowRunsTable } from './WorkflowRunsTable'; import { GITHUB_ACTIONS_ANNOTATION } from './getProjectNameFromEntity'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isGithubActionsAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION]); +/** @public */ export const Router = () => { const { entity } = useEntity(); diff --git a/plugins/github-actions/src/components/getProjectNameFromEntity.ts b/plugins/github-actions/src/components/getProjectNameFromEntity.ts index 13e0a2bdd5..24e546754e 100644 --- a/plugins/github-actions/src/components/getProjectNameFromEntity.ts +++ b/plugins/github-actions/src/components/getProjectNameFromEntity.ts @@ -13,8 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity } from '@backstage/catalog-model'; +/** @public */ export const GITHUB_ACTIONS_ANNOTATION = 'github.com/project-slug'; export const getProjectNameFromEntity = (entity: Entity) => diff --git a/plugins/github-actions/src/plugin.ts b/plugins/github-actions/src/plugin.ts index d8db5e16d0..26cf246fb9 100644 --- a/plugins/github-actions/src/plugin.ts +++ b/plugins/github-actions/src/plugin.ts @@ -25,6 +25,7 @@ import { createComponentExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const githubActionsPlugin = createPlugin({ id: 'github-actions', apis: [ @@ -40,6 +41,7 @@ export const githubActionsPlugin = createPlugin({ }, }); +/** @public */ export const EntityGithubActionsContent = githubActionsPlugin.provide( createRoutableExtension({ name: 'EntityGithubActionsContent', @@ -48,6 +50,7 @@ export const EntityGithubActionsContent = githubActionsPlugin.provide( }), ); +/** @public */ export const EntityLatestGithubActionRunCard = githubActionsPlugin.provide( createComponentExtension({ name: 'EntityLatestGithubActionRunCard', @@ -58,6 +61,7 @@ export const EntityLatestGithubActionRunCard = githubActionsPlugin.provide( }), ); +/** @public */ export const EntityLatestGithubActionsForBranchCard = githubActionsPlugin.provide( createComponentExtension({ @@ -71,6 +75,7 @@ export const EntityLatestGithubActionsForBranchCard = }), ); +/** @public */ export const EntityRecentGithubActionsRunsCard = githubActionsPlugin.provide( createComponentExtension({ name: 'EntityRecentGithubActionsRunsCard', diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 0e331108a3..578926915f 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-github-deployments +## 0.1.40-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.39 ### Patch Changes diff --git a/plugins/github-deployments/api-report.md b/plugins/github-deployments/api-report.md index 3e75b2f9bc..82d2222127 100644 --- a/plugins/github-deployments/api-report.md +++ b/plugins/github-deployments/api-report.md @@ -9,34 +9,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { TableColumn } from '@backstage/core-components'; -// Warning: (ae-forgotten-export) The symbol "GithubDeployment" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "createCommitColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -function createCommitColumn(): TableColumn; - -// Warning: (ae-missing-release-tag) "createCreatorColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -function createCreatorColumn(): TableColumn; - -// Warning: (ae-missing-release-tag) "createEnvironmentColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -function createEnvironmentColumn(): TableColumn; - -// Warning: (ae-missing-release-tag) "createLastUpdatedColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -function createLastUpdatedColumn(): TableColumn; - -// Warning: (ae-missing-release-tag) "createStatusColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -function createStatusColumn(): TableColumn; - -// Warning: (ae-missing-release-tag) "EntityGithubDeploymentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityGithubDeploymentsCard: (props: { last?: number | undefined; @@ -44,37 +16,57 @@ export const EntityGithubDeploymentsCard: (props: { columns?: TableColumn[] | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "githubDeploymentsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const GITHUB_PROJECT_SLUG_ANNOTATION = 'github.com/project-slug'; + +// @public (undocumented) +export type GithubDeployment = { + environment: string; + state: string; + updatedAt: string; + commit: { + abbreviatedOid: string; + commitUrl: string; + } | null; + statuses: { + nodes: Node_2[]; + }; + creator: { + login: string; + }; + repository: { + nameWithOwner: string; + }; + payload: string; +}; + // @public (undocumented) export const githubDeploymentsPlugin: BackstagePlugin<{}, {}, {}>; -// Warning: (ae-forgotten-export) The symbol "GithubDeploymentsTableProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "GithubDeploymentsTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// Warning: (ae-missing-release-tag) "GithubDeploymentsTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export function GithubDeploymentsTable( - props: GithubDeploymentsTableProps, -): JSX.Element; +export const GithubDeploymentsTable: { + (props: { + deployments: GithubDeployment[]; + isLoading: boolean; + reload: () => void; + columns: TableColumn[]; + }): JSX.Element; + columns: Readonly<{ + createEnvironmentColumn(): TableColumn; + createStatusColumn(): TableColumn; + createCommitColumn(): TableColumn; + createCreatorColumn(): TableColumn; + createLastUpdatedColumn(): TableColumn; + }>; + defaultDeploymentColumns: TableColumn[]; +}; -// @public (undocumented) -export namespace GithubDeploymentsTable { - var // Warning: (ae-forgotten-export) The symbol "columnFactories" needs to be exported by the entry point index.d.ts - // - // (undocumented) - columns: typeof columnFactories; - var // (undocumented) - defaultDeploymentColumns: TableColumn[]; -} - -// Warning: (ae-missing-release-tag) "GithubStateIndicator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -const GithubStateIndicator: (props: { state: string }) => JSX.Element; - -// Warning: (ae-missing-release-tag) "isGithubDeploymentsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isGithubDeploymentsAvailable: (entity: Entity) => boolean; + +// @public (undocumented) +type Node_2 = { + logUrl?: string; +}; +export { Node_2 as Node }; ``` diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index f230fb77fc..414d5fa350 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.39", + "version": "0.1.40-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,12 +25,12 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -43,17 +43,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/github-deployments/src/Router.tsx b/plugins/github-deployments/src/Router.tsx index 5425a49710..1e6990b991 100644 --- a/plugins/github-deployments/src/Router.tsx +++ b/plugins/github-deployments/src/Router.tsx @@ -13,9 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity } from '@backstage/catalog-model'; +/** @public */ export const GITHUB_PROJECT_SLUG_ANNOTATION = 'github.com/project-slug'; +/** @public */ export const isGithubDeploymentsAvailable = (entity: Entity) => Boolean(entity?.metadata.annotations?.[GITHUB_PROJECT_SLUG_ANNOTATION]); diff --git a/plugins/github-deployments/src/api/index.ts b/plugins/github-deployments/src/api/index.ts index 48363557ff..6e246f7569 100644 --- a/plugins/github-deployments/src/api/index.ts +++ b/plugins/github-deployments/src/api/index.ts @@ -53,10 +53,12 @@ const getBaseUrl = ( return config?.config.apiBaseUrl; }; -type Node = { +/** @public */ +export type Node = { logUrl?: string; }; +/** @public */ export type GithubDeployment = { environment: string; state: string; diff --git a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx index 68881617f4..e828116f41 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React from 'react'; import useAsyncRetry from 'react-use/lib/useAsyncRetry'; import { GithubDeployment, githubDeploymentsApiRef } from '../api'; diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx b/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx index 2c48f3eef1..61295abff0 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { GithubDeployment } from '../../api'; import { Typography, makeStyles } from '@material-ui/core'; import SyncIcon from '@material-ui/icons/Sync'; -import * as columnFactories from './columns'; +import { columnFactories } from './columns'; import { defaultDeploymentColumns } from './presets'; import { Table, TableColumn } from '@backstage/core-components'; @@ -29,14 +29,13 @@ const useStyles = makeStyles(theme => ({ }, })); -type GithubDeploymentsTableProps = { +/** @public */ +export const GithubDeploymentsTable = (props: { deployments: GithubDeployment[]; isLoading: boolean; reload: () => void; columns: TableColumn[]; -}; - -export function GithubDeploymentsTable(props: GithubDeploymentsTableProps) { +}) => { const { deployments, isLoading, reload, columns } = props; const classes = useStyles(); @@ -64,7 +63,7 @@ export function GithubDeploymentsTable(props: GithubDeploymentsTableProps) { } /> ); -} +}; GithubDeploymentsTable.columns = columnFactories; diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx b/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx index 9a720c0e75..5dffdd9089 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React from 'react'; import { GithubDeployment } from '../../api'; import { DateTime } from 'luxon'; @@ -43,50 +44,54 @@ export const GithubStateIndicator = (props: { state: string }) => { } }; -export function createEnvironmentColumn(): TableColumn { - return { - title: 'Environment', - field: 'environment', - highlight: true, - }; -} +export const columnFactories = Object.freeze({ + createEnvironmentColumn(): TableColumn { + return { + title: 'Environment', + field: 'environment', + highlight: true, + }; + }, -export function createStatusColumn(): TableColumn { - return { - title: 'Status', - render: (row: GithubDeployment): JSX.Element => ( - - - {row.state} - - ), - }; -} - -export function createCommitColumn(): TableColumn { - return { - title: 'Commit', - render: (row: GithubDeployment) => - row.commit && ( - - {row.commit.abbreviatedOid} - + createStatusColumn(): TableColumn { + return { + title: 'Status', + render: (row: GithubDeployment): JSX.Element => ( + + + {row.state} + ), - }; -} + }; + }, -export function createCreatorColumn(): TableColumn { - return { - title: 'Creator', - field: 'creator.login', - }; -} + createCommitColumn(): TableColumn { + return { + title: 'Commit', + render: (row: GithubDeployment) => + row.commit && ( + + {row.commit.abbreviatedOid} + + ), + }; + }, -export function createLastUpdatedColumn(): TableColumn { - return { - title: 'Last Updated', - render: (row: GithubDeployment): JSX.Element => ( - {DateTime.fromISO(row.updatedAt).toRelative({ locale: 'en' })} - ), - }; -} + createCreatorColumn(): TableColumn { + return { + title: 'Creator', + field: 'creator.login', + }; + }, + + createLastUpdatedColumn(): TableColumn { + return { + title: 'Last Updated', + render: (row: GithubDeployment): JSX.Element => ( + + {DateTime.fromISO(row.updatedAt).toRelative({ locale: 'en' })} + + ), + }; + }, +}); diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/index.ts b/plugins/github-deployments/src/components/GithubDeploymentsTable/index.ts index 14cf093337..e3d57629b5 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/index.ts +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { GithubDeploymentsTable } from './GithubDeploymentsTable'; diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/presets.ts b/plugins/github-deployments/src/components/GithubDeploymentsTable/presets.ts index ba48857c3c..af0e21ea23 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/presets.ts +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/presets.ts @@ -13,20 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { GithubDeployment } from '../../api'; -import { - createEnvironmentColumn, - createStatusColumn, - createCommitColumn, - createLastUpdatedColumn, - createCreatorColumn, -} from './columns'; +import { columnFactories } from './columns'; import { TableColumn } from '@backstage/core-components'; export const defaultDeploymentColumns: TableColumn[] = [ - createEnvironmentColumn(), - createStatusColumn(), - createCommitColumn(), - createCreatorColumn(), - createLastUpdatedColumn(), + columnFactories.createEnvironmentColumn(), + columnFactories.createStatusColumn(), + columnFactories.createCommitColumn(), + columnFactories.createCreatorColumn(), + columnFactories.createLastUpdatedColumn(), ]; diff --git a/plugins/github-deployments/src/index.ts b/plugins/github-deployments/src/index.ts index 55c1d2f2d2..7806da54ba 100644 --- a/plugins/github-deployments/src/index.ts +++ b/plugins/github-deployments/src/index.ts @@ -20,6 +20,10 @@ * @packageDocumentation */ +export type { Node, GithubDeployment } from './api'; export { githubDeploymentsPlugin, EntityGithubDeploymentsCard } from './plugin'; export { GithubDeploymentsTable } from './components/GithubDeploymentsTable'; -export { isGithubDeploymentsAvailable } from './Router'; +export { + isGithubDeploymentsAvailable, + GITHUB_PROJECT_SLUG_ANNOTATION, +} from './Router'; diff --git a/plugins/github-deployments/src/plugin.ts b/plugins/github-deployments/src/plugin.ts index 5c4ef9c3e4..1d5dee57bc 100644 --- a/plugins/github-deployments/src/plugin.ts +++ b/plugins/github-deployments/src/plugin.ts @@ -22,6 +22,7 @@ import { githubAuthApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const githubDeploymentsPlugin = createPlugin({ id: 'github-deployments', apis: [ @@ -37,6 +38,7 @@ export const githubDeploymentsPlugin = createPlugin({ ], }); +/** @public */ export const EntityGithubDeploymentsCard = githubDeploymentsPlugin.provide( createComponentExtension({ name: 'EntityGithubDeploymentsCard', diff --git a/plugins/github-issues/CHANGELOG.md b/plugins/github-issues/CHANGELOG.md index a85982820d..ad390bb860 100644 --- a/plugins/github-issues/CHANGELOG.md +++ b/plugins/github-issues/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-github-issues +## 0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/github-issues/package.json b/plugins/github-issues/package.json index f64d849ab5..b0c8b01457 100644 --- a/plugins/github-issues/package.json +++ b/plugins/github-issues/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-issues", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,11 +23,11 @@ }, "dependencies": { "@backstage/catalog-model": "^1.0.3", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.15", "@material-ui/core": "^4.12.4", "@material-ui/icons": "^4.9.1", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@spotify/prettier-config": "^14.0.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", @@ -52,7 +52,7 @@ "@types/node": "*", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/github-pull-requests-board/CHANGELOG.md b/plugins/github-pull-requests-board/CHANGELOG.md index 8ff761dfc3..77f63cc5e7 100644 --- a/plugins/github-pull-requests-board/CHANGELOG.md +++ b/plugins/github-pull-requests-board/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-github-pull-requests-board +## 0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/github-pull-requests-board/api-report.md b/plugins/github-pull-requests-board/api-report.md index 33814c76b4..1657d455b5 100644 --- a/plugins/github-pull-requests-board/api-report.md +++ b/plugins/github-pull-requests-board/api-report.md @@ -7,13 +7,9 @@ import { FunctionComponent } from 'react'; -// Warning: (ae-missing-release-tag) "EntityTeamPullRequestsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityTeamPullRequestsCard: FunctionComponent<{}>; -// Warning: (ae-missing-release-tag) "EntityTeamPullRequestsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityTeamPullRequestsContent: FunctionComponent<{}>; diff --git a/plugins/github-pull-requests-board/package.json b/plugins/github-pull-requests-board/package.json index e8d22dcf6f..1b57aaddcf 100644 --- a/plugins/github-pull-requests-board/package.json +++ b/plugins/github-pull-requests-board/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-pull-requests-board", "description": "A Backstage plugin that allows you to see all open Pull Requests for all the repositories owned by your team", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,10 +36,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,16 +49,16 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "peerDependencies": { "@types/react": "^16.13.1 || ^17.0.0", diff --git a/plugins/github-pull-requests-board/src/plugin.ts b/plugins/github-pull-requests-board/src/plugin.ts index c3ed426dec..87aea76d31 100644 --- a/plugins/github-pull-requests-board/src/plugin.ts +++ b/plugins/github-pull-requests-board/src/plugin.ts @@ -27,6 +27,7 @@ const githubPullRequestsBoardPlugin = createPlugin({ }, }); +/** @public */ export const EntityTeamPullRequestsCard = githubPullRequestsBoardPlugin.provide( createComponentExtension({ name: 'EntityTeamPullRequestsCard', @@ -39,6 +40,7 @@ export const EntityTeamPullRequestsCard = githubPullRequestsBoardPlugin.provide( }), ); +/** @public */ export const EntityTeamPullRequestsContent = githubPullRequestsBoardPlugin.provide( createRoutableExtension({ diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 83407f23b7..1f96c14e96 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gitops-profiles +## 0.3.27-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.3.26 ### Patch Changes diff --git a/plugins/gitops-profiles/api-report.md b/plugins/gitops-profiles/api-report.md index 245a1fb30b..9449417bba 100644 --- a/plugins/gitops-profiles/api-report.md +++ b/plugins/gitops-profiles/api-report.md @@ -9,8 +9,6 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ApplyProfileRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ApplyProfileRequest { // (undocumented) @@ -25,8 +23,6 @@ export interface ApplyProfileRequest { targetRepo: string; } -// Warning: (ae-missing-release-tag) "ChangeClusterStateRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ChangeClusterStateRequest { // (undocumented) @@ -41,8 +37,6 @@ export interface ChangeClusterStateRequest { targetRepo: string; } -// Warning: (ae-missing-release-tag) "CloneFromTemplateRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CloneFromTemplateRequest { // (undocumented) @@ -62,8 +56,6 @@ export interface CloneFromTemplateRequest { templateRepository: string; } -// Warning: (ae-missing-release-tag) "ClusterStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClusterStatus { // (undocumented) @@ -78,8 +70,6 @@ export interface ClusterStatus { status: string; } -// Warning: (ae-missing-release-tag) "FetchError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class FetchError extends Error { // (undocumented) @@ -88,24 +78,18 @@ export class FetchError extends Error { get name(): string; } -// Warning: (ae-missing-release-tag) "GithubUserInfoRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface GithubUserInfoRequest { // (undocumented) accessToken: string; } -// Warning: (ae-missing-release-tag) "GithubUserInfoResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface GithubUserInfoResponse { // (undocumented) login: string; } -// Warning: (ae-missing-release-tag) "GitOpsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GitOpsApi = { url: string; @@ -117,28 +101,18 @@ export type GitOpsApi = { fetchUserInfo(req: GithubUserInfoRequest): Promise; }; -// Warning: (ae-missing-release-tag) "gitOpsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const gitOpsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "GitopsProfilesClusterListPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GitopsProfilesClusterListPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "GitopsProfilesClusterPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GitopsProfilesClusterPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "GitopsProfilesCreatePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const GitopsProfilesCreatePage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "gitopsProfilesPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const gitopsProfilesPlugin: BackstagePlugin< { @@ -155,8 +129,6 @@ const gitopsProfilesPlugin: BackstagePlugin< export { gitopsProfilesPlugin }; export { gitopsProfilesPlugin as plugin }; -// Warning: (ae-missing-release-tag) "GitOpsRestApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class GitOpsRestApi implements GitOpsApi { constructor(url?: string); @@ -176,8 +148,6 @@ export class GitOpsRestApi implements GitOpsApi { url: string; } -// Warning: (ae-missing-release-tag) "ListClusterRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ListClusterRequest { // (undocumented) @@ -186,16 +156,12 @@ export interface ListClusterRequest { gitHubUser: string; } -// Warning: (ae-missing-release-tag) "ListClusterStatusesResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ListClusterStatusesResponse { // (undocumented) result: ClusterStatus[]; } -// Warning: (ae-missing-release-tag) "PollLogRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PollLogRequest { // (undocumented) @@ -208,8 +174,6 @@ export interface PollLogRequest { targetRepo: string; } -// Warning: (ae-missing-release-tag) "Status" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Status { // (undocumented) @@ -220,8 +184,6 @@ export interface Status { status: string; } -// Warning: (ae-missing-release-tag) "StatusResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface StatusResponse { // (undocumented) diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 078b83c61e..23796ad3e9 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.26", + "version": "0.3.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,8 +35,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,17 +48,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/gitops-profiles/src/api.ts b/plugins/gitops-profiles/src/api.ts index ca141140d8..fe47d20336 100644 --- a/plugins/gitops-profiles/src/api.ts +++ b/plugins/gitops-profiles/src/api.ts @@ -13,8 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export interface CloneFromTemplateRequest { templateRepository: string; secrets: { @@ -27,6 +29,7 @@ export interface CloneFromTemplateRequest { gitHubToken: string; } +/** @public */ export interface ApplyProfileRequest { targetOrg: string; targetRepo: string; @@ -35,6 +38,7 @@ export interface ApplyProfileRequest { profiles: string[]; } +/** @public */ export interface ChangeClusterStateRequest { targetOrg: string; targetRepo: string; @@ -43,6 +47,7 @@ export interface ChangeClusterStateRequest { clusterState: 'present' | 'absent'; // /api/cluster/state } +/** @public */ export interface PollLogRequest { targetOrg: string; targetRepo: string; @@ -50,18 +55,21 @@ export interface PollLogRequest { gitHubToken: string; } +/** @public */ export interface Status { status: string; // queued, in_progress, or completed message: string; conclusion: string; // success, failure, neutral, cancelled, skipped, timed_out, or action_required } +/** @public */ export interface StatusResponse { result: Status[]; link: string; status: string; } +/** @public */ export interface ClusterStatus { name: string; link: string; @@ -70,23 +78,28 @@ export interface ClusterStatus { runStatus: Status[]; } +/** @public */ export interface ListClusterStatusesResponse { result: ClusterStatus[]; } +/** @public */ export interface ListClusterRequest { gitHubUser: string; gitHubToken: string; } +/** @public */ export interface GithubUserInfoRequest { accessToken: string; } +/** @public */ export interface GithubUserInfoResponse { login: string; } +/** @public */ export class FetchError extends Error { get name(): string { return this.constructor.name; @@ -101,6 +114,7 @@ export class FetchError extends Error { } } +/** @public */ export type GitOpsApi = { url: string; fetchLog(req: PollLogRequest): Promise; @@ -111,10 +125,12 @@ export type GitOpsApi = { fetchUserInfo(req: GithubUserInfoRequest): Promise; }; +/** @public */ export const gitOpsApiRef = createApiRef({ id: 'plugin.gitops.service', }); +/** @public */ export class GitOpsRestApi implements GitOpsApi { constructor(public url: string = '') {} diff --git a/plugins/gitops-profiles/src/plugin.ts b/plugins/gitops-profiles/src/plugin.ts index fc961d7026..8c8bfc52fa 100644 --- a/plugins/gitops-profiles/src/plugin.ts +++ b/plugins/gitops-profiles/src/plugin.ts @@ -26,6 +26,7 @@ import { createRoutableExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const gitopsProfilesPlugin = createPlugin({ id: 'gitops-profiles', apis: [ @@ -38,6 +39,7 @@ export const gitopsProfilesPlugin = createPlugin({ }, }); +/** @public */ export const GitopsProfilesClusterListPage = gitopsProfilesPlugin.provide( createRoutableExtension({ name: 'GitopsProfilesClusterListPage', @@ -46,6 +48,7 @@ export const GitopsProfilesClusterListPage = gitopsProfilesPlugin.provide( }), ); +/** @public */ export const GitopsProfilesClusterPage = gitopsProfilesPlugin.provide( createRoutableExtension({ name: 'GitopsProfilesClusterPage', @@ -54,6 +57,7 @@ export const GitopsProfilesClusterPage = gitopsProfilesPlugin.provide( }), ); +/** @public */ export const GitopsProfilesCreatePage = gitopsProfilesPlugin.provide( createRoutableExtension({ name: 'GitopsProfilesCreatePage', diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index 62f1019c62..c48d6b00be 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-gocd +## 0.1.15-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.14 ### Patch Changes diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 30a2b78c32..596d9cd1f0 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.14", + "version": "0.1.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,10 +32,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -61,7 +61,7 @@ "@types/luxon": "^3.0.0", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index dad0b78969..5b58164556 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-graphiql +## 0.2.41-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.2.40 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index a5525f0353..a78ba4d5d7 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.40", + "version": "0.2.41-next.0", "private": false, "publishConfig": { "access": "public", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -60,7 +60,7 @@ "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0", + "msw": "^0.45.0", "react-router-dom": "6.0.0-beta.0" }, "files": [ diff --git a/plugins/graphql-backend/CHANGELOG.md b/plugins/graphql-backend/CHANGELOG.md index 88f7454741..14153d3075 100644 --- a/plugins/graphql-backend/CHANGELOG.md +++ b/plugins/graphql-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-graphql-backend +## 0.1.26-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-graphql@0.3.13-next.0 + ## 0.1.25 ### Patch Changes diff --git a/plugins/graphql-backend/api-report.md b/plugins/graphql-backend/api-report.md index f1707288b7..a787c4f209 100644 --- a/plugins/graphql-backend/api-report.md +++ b/plugins/graphql-backend/api-report.md @@ -7,13 +7,9 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { // (undocumented) diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 20be68c811..4944d1d016 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphql-backend", "description": "An experimental Backstage backend plugin for GraphQL", - "version": "0.1.25", + "version": "0.1.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", - "@backstage/plugin-catalog-graphql": "^0.3.12", + "@backstage/plugin-catalog-graphql": "^0.3.13-next.0", "@graphql-tools/schema": "^9.0.0", "@types/express": "^4.17.6", "apollo-server": "^3.0.0", @@ -51,9 +51,9 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/graphql-backend/src/service/router.ts b/plugins/graphql-backend/src/service/router.ts index 22d284eb27..773eebd608 100644 --- a/plugins/graphql-backend/src/service/router.ts +++ b/plugins/graphql-backend/src/service/router.ts @@ -25,11 +25,13 @@ import { Config } from '@backstage/config'; import helmet from 'helmet'; import { makeExecutableSchema } from '@graphql-tools/schema'; +/** @public */ export interface RouterOptions { logger: Logger; config: Config; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index 8a340590ed..fc9aeda1e2 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-home +## 0.4.25-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-stack-overflow@0.1.5-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.4.24 ### Patch Changes diff --git a/plugins/home/api-report.md b/plugins/home/api-report.md index 0870a23ba7..cbd36cd627 100644 --- a/plugins/home/api-report.md +++ b/plugins/home/api-report.md @@ -11,8 +11,11 @@ import { default as React_2 } from 'react'; import { ReactNode } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "ClockConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type CardExtensionProps = ComponentRenderer & { + title?: string; +} & T; + // @public (undocumented) export type ClockConfig = { label: string; @@ -29,6 +32,14 @@ export const ComponentAccordion: (props: { ContextProvider?: ((props: any) => JSX.Element) | undefined; }) => JSX.Element; +// @public (undocumented) +export type ComponentParts = { + Content: (props?: any) => JSX.Element; + Actions?: () => JSX.Element; + Settings?: () => JSX.Element; + ContextProvider?: (props: any) => JSX.Element; +}; + // @public (undocumented) export type ComponentRenderer = { Renderer?: (props: RendererProps) => JSX.Element; @@ -50,8 +61,6 @@ export const ComponentTabs: (props: { }[]; }) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "CardExtensionProps" needs to be exported by the entry point index.d.ts -// // @public export function createCardExtension(options: { title: string; @@ -79,27 +88,19 @@ export const HomepageCompositionRoot: (props: { // @public (undocumented) export const HomePageRandomJoke: ( - props: ComponentRenderer & { - title?: string | undefined; - } & { + props: CardExtensionProps<{ defaultCategory?: 'any' | 'programming' | undefined; - }, + }>, ) => JSX.Element; // @public export const HomePageStarredEntities: ( - props: ComponentRenderer & { - title?: string | undefined; - }, + props: CardExtensionProps, ) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "ToolkitContentProps" needs to be exported by the entry point index.d.ts -// // @public export const HomePageToolkit: ( - props: ComponentRenderer & { - title?: string | undefined; - } & ToolkitContentProps, + props: CardExtensionProps, ) => JSX.Element; // @public (undocumented) @@ -111,8 +112,11 @@ export const homePlugin: BackstagePlugin< {} >; -// Warning: (ae-missing-release-tag) "SettingsModal" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type RendererProps = { + title: string; +} & ComponentParts; + // @public (undocumented) export const SettingsModal: (props: { open: boolean; @@ -121,24 +125,29 @@ export const SettingsModal: (props: { children: JSX.Element; }) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "TemplateBackstageLogoProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "TemplateBackstageLogo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const TemplateBackstageLogo: ( - props: TemplateBackstageLogoProps, -) => JSX.Element; +export const TemplateBackstageLogo: (props: { + classes: { + svg: string; + path: string; + }; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "TemplateBackstageLogoIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const TemplateBackstageLogoIcon: () => JSX.Element; +// @public (undocumented) +export type Tool = { + label: string; + url: string; + icon: React_2.ReactNode; +}; + +// @public +export type ToolkitContentProps = { + tools: Tool[]; +}; + // @public export const WelcomeTitle: () => JSX.Element; - -// Warnings were encountered during analysis: -// -// src/extensions.d.ts:6:5 - (ae-forgotten-export) The symbol "RendererProps" needs to be exported by the entry point index.d.ts -// src/extensions.d.ts:27:5 - (ae-forgotten-export) The symbol "ComponentParts" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/home/package.json b/plugins/home/package.json index 3f87d10771..e02d6d3e34 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.24", + "version": "0.4.25-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,10 +36,10 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-stack-overflow": "^0.1.4", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-stack-overflow": "^0.1.5-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,17 +53,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/home/src/assets/TemplateBackstageLogo.tsx b/plugins/home/src/assets/TemplateBackstageLogo.tsx index 9088cfa58c..231e65e0c6 100644 --- a/plugins/home/src/assets/TemplateBackstageLogo.tsx +++ b/plugins/home/src/assets/TemplateBackstageLogo.tsx @@ -16,16 +16,13 @@ import React from 'react'; -type Classes = { - svg: string; - path: string; -}; - -type TemplateBackstageLogoProps = { - classes: Classes; -}; - -export const TemplateBackstageLogo = (props: TemplateBackstageLogoProps) => { +/** @public */ +export const TemplateBackstageLogo = (props: { + classes: { + svg: string; + path: string; + }; +}) => { return ( { const classes = useStyles(); diff --git a/plugins/home/src/components/SettingsModal.tsx b/plugins/home/src/components/SettingsModal.tsx index 4ee25f9f5c..ace9944f28 100644 --- a/plugins/home/src/components/SettingsModal.tsx +++ b/plugins/home/src/components/SettingsModal.tsx @@ -23,6 +23,7 @@ import { DialogTitle, } from '@material-ui/core'; +/** @public */ export const SettingsModal = (props: { open: boolean; close: Function; diff --git a/plugins/home/src/extensions.tsx b/plugins/home/src/extensions.tsx index f1edbc99b6..af5dbee3ed 100644 --- a/plugins/home/src/extensions.tsx +++ b/plugins/home/src/extensions.tsx @@ -28,16 +28,25 @@ export type ComponentRenderer = { Renderer?: (props: RendererProps) => JSX.Element; }; -type ComponentParts = { +/** + * @public + */ +export type ComponentParts = { Content: (props?: any) => JSX.Element; Actions?: () => JSX.Element; Settings?: () => JSX.Element; ContextProvider?: (props: any) => JSX.Element; }; -type RendererProps = { title: string } & ComponentParts; +/** + * @public + */ +export type RendererProps = { title: string } & ComponentParts; -type CardExtensionProps = ComponentRenderer & { title?: string } & T; +/** + * @public + */ +export type CardExtensionProps = ComponentRenderer & { title?: string } & T; /** * An extension creator to create card based components for the homepage diff --git a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.tsx b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.tsx index 6672fe6a22..a45a51e0ad 100644 --- a/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.tsx +++ b/plugins/home/src/homePageComponents/HeaderWorldClock/HeaderWorldClock.tsx @@ -27,6 +27,7 @@ type TimeObj = { label: string; }; +/** @public */ export type ClockConfig = { label: string; timeZone: string; diff --git a/plugins/home/src/homePageComponents/Toolkit/Content.tsx b/plugins/home/src/homePageComponents/Toolkit/Content.tsx index e73a834a7e..a1ada00b0b 100644 --- a/plugins/home/src/homePageComponents/Toolkit/Content.tsx +++ b/plugins/home/src/homePageComponents/Toolkit/Content.tsx @@ -52,15 +52,6 @@ const useStyles = makeStyles(theme => ({ }, })); -/** - * Props for Toolkit content component {@link Content}. - * - * @public - */ -export type ToolkitContentProps = { - tools: Tool[]; -}; - /** * A component to display a list of tools for the user. * @@ -85,3 +76,12 @@ export const Content = (props: ToolkitContentProps) => { ); }; + +/** + * Props for Toolkit Content component. + * + * @public + */ +export type ToolkitContentProps = { + tools: Tool[]; +}; diff --git a/plugins/home/src/homePageComponents/Toolkit/Context.tsx b/plugins/home/src/homePageComponents/Toolkit/Context.tsx index 3e7b121252..20f8b16b6d 100644 --- a/plugins/home/src/homePageComponents/Toolkit/Context.tsx +++ b/plugins/home/src/homePageComponents/Toolkit/Context.tsx @@ -16,6 +16,7 @@ import React, { createContext } from 'react'; +/** @public */ export type Tool = { label: string; url: string; diff --git a/plugins/home/src/homePageComponents/Toolkit/index.ts b/plugins/home/src/homePageComponents/Toolkit/index.ts index 67ea1f3c84..266a8afffb 100644 --- a/plugins/home/src/homePageComponents/Toolkit/index.ts +++ b/plugins/home/src/homePageComponents/Toolkit/index.ts @@ -17,3 +17,4 @@ export { Content } from './Content'; export type { ToolkitContentProps } from './Content'; export { ContextProvider } from './Context'; +export type { Tool } from './Context'; diff --git a/plugins/home/src/homePageComponents/index.ts b/plugins/home/src/homePageComponents/index.ts index d318226dbd..6a3978c595 100644 --- a/plugins/home/src/homePageComponents/index.ts +++ b/plugins/home/src/homePageComponents/index.ts @@ -14,6 +14,5 @@ * limitations under the License. */ -export * from './CompanyLogo'; -export * from './Toolkit'; +export type { ToolkitContentProps, Tool } from './Toolkit'; export type { ClockConfig } from './HeaderWorldClock'; diff --git a/plugins/home/src/index.ts b/plugins/home/src/index.ts index 1776b5aa9c..83eb72b613 100644 --- a/plugins/home/src/index.ts +++ b/plugins/home/src/index.ts @@ -35,6 +35,11 @@ export { } from './plugin'; export { SettingsModal } from './components'; export * from './assets'; -export type { ClockConfig } from './homePageComponents'; +export * from './homePageComponents'; export { createCardExtension } from './extensions'; -export type { ComponentRenderer } from './extensions'; +export type { + CardExtensionProps, + ComponentParts, + ComponentRenderer, + RendererProps, +} from './extensions'; diff --git a/plugins/home/src/plugin.ts b/plugins/home/src/plugin.ts index 9b221ad8dc..5ae72ae510 100644 --- a/plugins/home/src/plugin.ts +++ b/plugins/home/src/plugin.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createComponentExtension, createPlugin, @@ -20,7 +21,6 @@ import { } from '@backstage/core-plugin-api'; import { createCardExtension } from './extensions'; import { ToolkitContentProps } from './homePageComponents'; - import { rootRouteRef } from './routes'; /** @public */ diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index 83649c4010..97b93d21db 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-ilert +## 0.1.35-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.34 ### Patch Changes diff --git a/plugins/ilert/api-report.md b/plugins/ilert/api-report.md index a4e6a7a76c..96576a8358 100644 --- a/plugins/ilert/api-report.md +++ b/plugins/ilert/api-report.md @@ -13,20 +13,252 @@ import { Entity } from '@backstage/catalog-model'; import { IconComponent } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityILertCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const ACCEPTED = 'ACCEPTED'; + +// @public (undocumented) +export interface AlertSource { + // (undocumented) + active?: boolean; + // (undocumented) + autoResolutionTimeout?: string; + // (undocumented) + autotaskMetadata?: AlertSourceAutotaskMetadata; + // (undocumented) + darkIconUrl?: string; + // (undocumented) + emailFiltered?: boolean; + // (undocumented) + emailPredicates?: AlertSourceEmailPredicate[]; + // (undocumented) + emailResolveFiltered?: boolean; + // (undocumented) + emailResolvePredicates?: AlertSourceEmailPredicate[]; + // (undocumented) + escalationPolicy: EscalationPolicy; + // (undocumented) + filterOperator?: AlertSourceFilterOperator; + // (undocumented) + heartbeat?: AlertSourceHeartbeat; + // (undocumented) + iconUrl?: string; + // (undocumented) + id: number; + // (undocumented) + incidentCreation?: AlertSourceIncidentCreation; + // (undocumented) + incidentPriorityRule?: AlertSourceIncidentPriorityRule; + // (undocumented) + integrationKey?: string; + // (undocumented) + integrationType: AlertSourceIntegrationType; + // (undocumented) + lightIconUrl?: string; + // (undocumented) + name: string; + // (undocumented) + resolveFilterOperator?: AlertSourceFilterOperator; + // (undocumented) + status: AlertSourceStatus; + // (undocumented) + supportHours?: AlertSourceSupportHours; + // (undocumented) + teams: TeamShort[]; +} + +// @public (undocumented) +export interface AlertSourceAutotaskMetadata { + // (undocumented) + apiIntegrationCode: string; + // (undocumented) + secret: string; + // (undocumented) + userName: string; + // (undocumented) + webServer: string; +} + +// @public (undocumented) +export interface AlertSourceEmailPredicate { + // (undocumented) + criteria: + | 'CONTAINS_ANY_WORDS' + | 'CONTAINS_NOT_WORDS' + | 'CONTAINS_STRING' + | 'CONTAINS_NOT_STRING' + | 'IS_STRING' + | 'IS_NOT_STRING' + | 'MATCHES_REGEX' + | 'MATCHES_NOT_REGEX'; + // (undocumented) + field: 'EMAIL_FROM' | 'EMAIL_SUBJECT' | 'EMAIL_BODY'; + // (undocumented) + value: string; +} + +// @public (undocumented) +export type AlertSourceFilterOperator = 'AND' | 'OR'; + +// @public (undocumented) +export interface AlertSourceHeartbeat { + // (undocumented) + intervalSec: number; + // (undocumented) + status: 'OVERDUE' | 'ON_TIME' | 'NEVER_RECEIVED'; + // (undocumented) + summary: string; +} + +// @public (undocumented) +export type AlertSourceIncidentCreation = + | 'ONE_INCIDENT_PER_EMAIL' + | 'ONE_INCIDENT_PER_EMAIL_SUBJECT' + | 'ONE_PENDING_INCIDENT_ALLOWED' + | 'ONE_OPEN_INCIDENT_ALLOWED' + | 'OPEN_RESOLVE_ON_EXTRACTION'; + +// @public (undocumented) +export type AlertSourceIncidentPriorityRule = + | 'HIGH' + | 'LOW' + | 'HIGH_DURING_SUPPORT_HOURS' + | 'LOW_DURING_SUPPORT_HOURS'; + +// @public (undocumented) +export type AlertSourceIntegrationType = + | 'NAGIOS' + | 'ICINGA' + | 'EMAIL' + | 'SMS' + | 'API' + | 'CRN' + | 'HEARTBEAT' + | 'PRTG' + | 'PINGDOM' + | 'CLOUDWATCH' + | 'AWSPHD' + | 'STACKDRIVER' + | 'INSTANA' + | 'ZABBIX' + | 'SOLARWINDS' + | 'PROMETHEUS' + | 'NEWRELIC' + | 'GRAFANA' + | 'GITHUB' + | 'DATADOG' + | 'UPTIMEROBOT' + | 'APPDYNAMICS' + | 'DYNATRACE' + | 'TOPDESK' + | 'STATUSCAKE' + | 'MONITOR' + | 'TOOL' + | 'CHECKMK' + | 'AUTOTASK' + | 'AWSBUDGET' + | 'KENTIXAM' + | 'CONSUL' + | 'ZAMMAD' + | 'SIGNALFX' + | 'SPLUNK' + | 'KUBERNETES' + | 'SEMATEXT' + | 'SENTRY' + | 'SUMOLOGIC' + | 'RAYGUN' + | 'MXTOOLBOX' + | 'ESWATCHER' + | 'AMAZONSNS' + | 'KAPACITOR' + | 'CORTEXXSOAR' + | string; + +// @public (undocumented) +export type AlertSourceStatus = + | 'PENDING' + | 'ALL_ACCEPTED' + | 'ALL_RESOLVED' + | 'IN_MAINTENANCE' + | 'DISABLED'; + +// @public (undocumented) +export interface AlertSourceSupportDay { + // (undocumented) + end: string; + // (undocumented) + start: string; +} + +// @public (undocumented) +export interface AlertSourceSupportHours { + // (undocumented) + autoRaiseIncidents: boolean; + // (undocumented) + supportDays: { + MONDAY: AlertSourceSupportDay; + TUESDAY: AlertSourceSupportDay; + WEDNESDAY: AlertSourceSupportDay; + THURSDAY: AlertSourceSupportDay; + FRIDAY: AlertSourceSupportDay; + SATURDAY: AlertSourceSupportDay; + SUNDAY: AlertSourceSupportDay; + }; + // (undocumented) + timezone: AlertSourceTimeZone; +} + +// @public (undocumented) +export type AlertSourceTimeZone = + | 'Europe/Berlin' + | 'America/New_York' + | 'America/Los_Angeles' + | 'Asia/Istanbul'; + // @public (undocumented) export const EntityILertCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "GetIncidentsCountOpts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface EscalationPolicy { + // (undocumented) + escalationRules: EscalationRule[]; + // (undocumented) + frequency?: number; + // (undocumented) + id: number; + // (undocumented) + name: string; + // (undocumented) + newEscalationRule: EscalationRule; + // (undocumented) + repeating?: boolean; + // (undocumented) + teams: TeamShort[]; +} + +// @public (undocumented) +export interface EscalationRule { + // (undocumented) + escalationTimeout: number; + // (undocumented) + schedule: Schedule | null; + // (undocumented) + user: User | null; +} + +// @public (undocumented) +export type EventRequest = { + integrationKey: string; + summary: string; + details: string; + userName: string; + source: string; +}; + // @public (undocumented) export type GetIncidentsCountOpts = { states?: IncidentStatus[]; }; -// Warning: (ae-missing-release-tag) "GetIncidentsOpts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GetIncidentsOpts = { maxResults?: number; @@ -35,8 +267,6 @@ export type GetIncidentsOpts = { alertSources?: number[]; }; -// Warning: (ae-missing-release-tag) "ILertApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ILertApi { // (undocumented) @@ -51,8 +281,6 @@ export interface ILertApi { incident: Incident, responder: IncidentResponder, ): Promise; - // Warning: (ae-forgotten-export) The symbol "EventRequest" needs to be exported by the entry point index.d.ts - // // (undocumented) createIncident(eventRequest: EventRequest): Promise; // (undocumented) @@ -61,48 +289,30 @@ export interface ILertApi { enableAlertSource(alertSource: AlertSource): Promise; // (undocumented) fetchAlertSource(idOrIntegrationKey: number | string): Promise; - // Warning: (ae-forgotten-export) The symbol "OnCall" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchAlertSourceOnCalls(alertSource: AlertSource): Promise; - // Warning: (ae-forgotten-export) The symbol "AlertSource" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchAlertSources(): Promise; // (undocumented) fetchIncident(id: number): Promise; - // Warning: (ae-forgotten-export) The symbol "IncidentAction" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchIncidentActions(incident: Incident): Promise; - // Warning: (ae-forgotten-export) The symbol "IncidentResponder" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchIncidentResponders(incident: Incident): Promise; - // Warning: (ae-forgotten-export) The symbol "Incident" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchIncidents(opts?: GetIncidentsOpts): Promise; // (undocumented) fetchIncidentsCount(opts?: GetIncidentsCountOpts): Promise; - // Warning: (ae-forgotten-export) The symbol "Schedule" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchOnCallSchedules(): Promise; // (undocumented) fetchUptimeMonitor(id: number): Promise; - // Warning: (ae-forgotten-export) The symbol "UptimeMonitor" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchUptimeMonitors(): Promise; - // Warning: (ae-forgotten-export) The symbol "User" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchUsers(): Promise; // (undocumented) getAlertSourceDetailsURL(alertSource: AlertSource | null): string; - // Warning: (ae-forgotten-export) The symbol "EscalationPolicy" needs to be exported by the entry point index.d.ts - // // (undocumented) getEscalationPolicyDetailsURL(escalationPolicy: EscalationPolicy): string; // (undocumented) @@ -135,22 +345,19 @@ export interface ILertApi { ): Promise; } -// Warning: (ae-missing-release-tag) "ilertApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ilertApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "ILertCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ILertCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ILertClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ILertClient implements ILertApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(opts: Options); + constructor(opts: { + discoveryApi: DiscoveryApi; + baseUrl: string; + proxyPath: string; + }); // (undocumented) acceptIncident(incident: Incident, userName: string): Promise; // (undocumented) @@ -232,18 +439,12 @@ export class ILertClient implements ILertApi { ): Promise; } -// Warning: (ae-missing-release-tag) "ILertIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ILertIcon: IconComponent; -// Warning: (ae-missing-release-tag) "ILertPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ILertPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ilertPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ilertPlugin: BackstagePlugin< { @@ -255,34 +456,319 @@ const ilertPlugin: BackstagePlugin< export { ilertPlugin }; export { ilertPlugin as plugin }; -// Warning: (ae-missing-release-tag) "iLertRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const iLertRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +interface Image_2 { + // (undocumented) + alt: string; + // (undocumented) + href: string; + // (undocumented) + src: string; +} +export { Image_2 as Image }; + +// @public (undocumented) +export interface Incident { + // (undocumented) + alertSource: AlertSource | null; + // (undocumented) + assignedTo: User | null; + // (undocumented) + commentPublishToSubscribers: boolean; + // (undocumented) + commentText: string; + // (undocumented) + details: string; + // (undocumented) + id: number; + // (undocumented) + images: Image_2[]; + // (undocumented) + incidentKey: string; + // (undocumented) + links: Link[]; + // (undocumented) + logEntries: LogEntry[]; + // (undocumented) + priority: IncidentPriority; + // (undocumented) + reportTime: string; + // (undocumented) + resolvedOn: string; + // (undocumented) + status: IncidentStatus; + // (undocumented) + subscribers: Subscriber[]; + // (undocumented) + summary: string; +} + +// @public (undocumented) +export interface IncidentAction { + // (undocumented) + extensionId?: string; + // (undocumented) + history?: IncidentActionHistory[]; + // (undocumented) + name: string; + // (undocumented) + type: string; + // (undocumented) + webhookId: string; +} + +// @public (undocumented) +export interface IncidentActionHistory { + // (undocumented) + actor: User; + // (undocumented) + id: string; + // (undocumented) + incidentId: number; + // (undocumented) + success: boolean; + // (undocumented) + webhookId: string; +} + +// @public (undocumented) +export type IncidentPriority = 'HIGH' | 'LOW'; + +// @public (undocumented) +export interface IncidentResponder { + // (undocumented) + disabled: boolean; + // (undocumented) + group: 'SUGGESTED' | 'USER' | 'ESCALATION_POLICY' | 'ON_CALL_SCHEDULE'; + // (undocumented) + id: number; + // (undocumented) + name: string; +} + +// @public (undocumented) +export type IncidentStatus = typeof PENDING | typeof ACCEPTED | typeof RESOLVED; + // @public (undocumented) const isPluginApplicableToEntity: (entity: Entity) => boolean; export { isPluginApplicableToEntity as isILertAvailable }; export { isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "ILertPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type Language = 'de' | 'en'; + +// @public (undocumented) +export interface Link { + // (undocumented) + href: string; + // (undocumented) + text: string; +} + +// @public (undocumented) +export interface LogEntry { + // (undocumented) + filterTypes?: string[]; + // (undocumented) + iconClass?: string; + // (undocumented) + iconName?: string; + // (undocumented) + id: number; + // (undocumented) + incidentId?: number; + // (undocumented) + logEntryType: string; + // (undocumented) + text: string; + // (undocumented) + timestamp: string; +} + +// @public (undocumented) +export interface OnCall { + // (undocumented) + end: string; + // (undocumented) + escalationLevel: number; + // (undocumented) + escalationPolicy: EscalationPolicy; + // (undocumented) + schedule?: Schedule; + // (undocumented) + start: string; + // (undocumented) + user: User; +} + +// @public (undocumented) +export const PENDING = 'PENDING'; + +// @public (undocumented) +export interface Phone { + // (undocumented) + number: string; + // (undocumented) + regionCode: string; +} + +// @public (undocumented) +export const RESOLVED = 'RESOLVED'; + // @public (undocumented) export const Router: () => JSX.Element; -// Warning: (ae-missing-release-tag) "TableState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface Schedule { + // (undocumented) + currentShift: Shift; + // (undocumented) + id: number; + // (undocumented) + name: string; + // (undocumented) + nextShift: Shift; + // (undocumented) + overrides: Shift[]; + // (undocumented) + shifts: Shift[]; + // (undocumented) + startsOn: string; + // (undocumented) + teams: TeamShort[]; + // (undocumented) + timezone: string; +} + +// @public (undocumented) +export interface Shift { + // (undocumented) + end: string; + // (undocumented) + start: string; + // (undocumented) + user: User; +} + +// @public (undocumented) +export interface Subscriber { + // (undocumented) + id: number; + // (undocumented) + name: string; + // (undocumented) + type: SubscriberType; +} + +// @public (undocumented) +export type SubscriberType = 'TEAM' | 'USER'; + // @public (undocumented) export type TableState = { page: number; pageSize: number; }; -// Warnings were encountered during analysis: -// -// src/api/types.d.ts:14:5 - (ae-forgotten-export) The symbol "IncidentStatus" needs to be exported by the entry point index.d.ts +// @public (undocumented) +export interface TeamMember { + // (undocumented) + role: 'STAKEHOLDER' | 'RESPONDER' | 'USER' | 'ADMIN'; + // (undocumented) + user: User; +} + +// @public (undocumented) +export interface TeamShort { + // (undocumented) + id: number; + // (undocumented) + name: string; +} + +// @public (undocumented) +export interface UptimeMonitor { + // (undocumented) + checkParams: UptimeMonitorCheckParams; + // (undocumented) + checkType: 'http' | 'tcp' | 'udp' | 'ping'; + // (undocumented) + createIncidentAfterFailedChecks: number; + // (undocumented) + embedUrl: string; + // (undocumented) + escalationPolicy: EscalationPolicy; + // (undocumented) + id: number; + // (undocumented) + intervalSec: number; + // (undocumented) + lastStatusChange: string; + // (undocumented) + name: string; + // (undocumented) + paused: boolean; + // (undocumented) + region: 'EU' | 'US'; + // (undocumented) + shareUrl: string; + // (undocumented) + status: string; + // (undocumented) + teams: TeamShort[]; + // (undocumented) + timeoutMs: number; +} + +// @public (undocumented) +export interface UptimeMonitorCheckParams { + // (undocumented) + host?: string; + // (undocumented) + port?: number; + // (undocumented) + url?: string; +} + +// @public (undocumented) +export interface User { + // (undocumented) + department: string; + // (undocumented) + email: string; + // (undocumented) + firstName: string; + // (undocumented) + id: number; + // (undocumented) + landline: Phone; + // (undocumented) + language?: Language; + // (undocumented) + lastName: string; + // (undocumented) + mobile: Phone; + // (undocumented) + notificationPreferences?: any[]; + // (undocumented) + position: string; + // (undocumented) + role?: UserRole; + // (undocumented) + timezone?: string; + // (undocumented) + username: string; +} + +// @public (undocumented) +export type UserRole = + | 'USER' + | 'ADMIN' + | 'STAKEHOLDER' + | 'ACCOUNT_OWNER' + | 'RESPONDER'; // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index 4342d9a93d..b0d8ac653b 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.1.34", + "version": "0.1.35-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,10 +25,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@date-io/luxon": "1.x", "@material-ui/core": "^4.12.2", @@ -43,17 +43,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/ilert/src/api/client.ts b/plugins/ilert/src/api/client.ts index 13de8c1f2c..7ab9a6d08c 100644 --- a/plugins/ilert/src/api/client.ts +++ b/plugins/ilert/src/api/client.ts @@ -29,7 +29,6 @@ import { ILertApi, GetIncidentsOpts, GetIncidentsCountOpts, - Options, EventRequest, } from './types'; import { DateTime as dt } from 'luxon'; @@ -39,6 +38,7 @@ import { DiscoveryApi, } from '@backstage/core-plugin-api'; +/** @public */ export const ilertApiRef = createApiRef({ id: 'plugin.ilert.service', }); @@ -49,6 +49,7 @@ const JSON_HEADERS = { Accept: 'application/json', }; +/** @public */ export class ILertClient implements ILertApi { private readonly discoveryApi: DiscoveryApi; private readonly proxyPath: string; @@ -66,7 +67,20 @@ export class ILertClient implements ILertApi { }); } - constructor(opts: Options) { + constructor(opts: { + discoveryApi: DiscoveryApi; + + /** + * URL used by users to access iLert web UI. + * Example: https://my-org.ilert.com/ + */ + baseUrl: string; + + /** + * Path to use for requests via the proxy, defaults to /ilert/api + */ + proxyPath: string; + }) { this.discoveryApi = opts.discoveryApi; this.baseUrl = opts.baseUrl; this.proxyPath = opts.proxyPath; diff --git a/plugins/ilert/src/api/index.ts b/plugins/ilert/src/api/index.ts index 02ee9706f7..e1163090ec 100644 --- a/plugins/ilert/src/api/index.ts +++ b/plugins/ilert/src/api/index.ts @@ -17,6 +17,7 @@ export { ILertClient, ilertApiRef } from './client'; export type { ILertApi, + EventRequest, GetIncidentsCountOpts, GetIncidentsOpts, TableState, diff --git a/plugins/ilert/src/api/types.ts b/plugins/ilert/src/api/types.ts index 3a085bdb5b..2e9ea30f2f 100644 --- a/plugins/ilert/src/api/types.ts +++ b/plugins/ilert/src/api/types.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { AlertSource, Incident, @@ -25,13 +26,14 @@ import { IncidentAction, OnCall, } from '../types'; -import { DiscoveryApi } from '@backstage/core-plugin-api'; +/** @public */ export type TableState = { page: number; pageSize: number; }; +/** @public */ export type GetIncidentsOpts = { maxResults?: number; startIndex?: number; @@ -39,10 +41,12 @@ export type GetIncidentsOpts = { alertSources?: number[]; }; +/** @public */ export type GetIncidentsCountOpts = { states?: IncidentStatus[]; }; +/** @public */ export type EventRequest = { integrationKey: string; summary: string; @@ -51,6 +55,7 @@ export type EventRequest = { source: string; }; +/** @public */ export interface ILertApi { fetchIncidents(opts?: GetIncidentsOpts): Promise; fetchIncidentsCount(opts?: GetIncidentsCountOpts): Promise; @@ -103,18 +108,3 @@ export interface ILertApi { getUserPhoneNumber(user: User | null): string; getUserInitials(user: User | null): string; } - -export type Options = { - discoveryApi: DiscoveryApi; - - /** - * URL used by users to access iLert web UI. - * Example: https://my-org.ilert.com/ - */ - baseUrl: string; - - /** - * Path to use for requests via the proxy, defaults to /ilert/api - */ - proxyPath: string; -}; diff --git a/plugins/ilert/src/components/ILertCard/ILertCard.tsx b/plugins/ilert/src/components/ILertCard/ILertCard.tsx index a014c265c2..6330189a01 100644 --- a/plugins/ilert/src/components/ILertCard/ILertCard.tsx +++ b/plugins/ilert/src/components/ILertCard/ILertCard.tsx @@ -35,6 +35,7 @@ import { ILertCardEmptyState } from './ILertCardEmptyState'; import { ILertCardOnCall } from './ILertCardOnCall'; import { ResponseErrorPanel } from '@backstage/core-components'; +/** @public */ export const isPluginApplicableToEntity = (entity: Entity) => Boolean(entity.metadata.annotations?.[ILERT_INTEGRATION_KEY_ANNOTATION]); @@ -50,6 +51,7 @@ const useStyles = makeStyles({ }, }); +/** @public */ export const ILertCard = () => { const classes = useStyles(); const { integrationKey, name } = useILertEntity(); diff --git a/plugins/ilert/src/components/ILertPage/ILertPage.tsx b/plugins/ilert/src/components/ILertPage/ILertPage.tsx index c532cd7f64..89dae215e4 100644 --- a/plugins/ilert/src/components/ILertPage/ILertPage.tsx +++ b/plugins/ilert/src/components/ILertPage/ILertPage.tsx @@ -25,6 +25,7 @@ import { Content, } from '@backstage/core-components'; +/** @public */ export const ILertPage = () => { const [selectedTab, setSelectedTab] = React.useState(0); const tabs = [ diff --git a/plugins/ilert/src/index.ts b/plugins/ilert/src/index.ts index 9a3119516f..5fcf42011b 100644 --- a/plugins/ilert/src/index.ts +++ b/plugins/ilert/src/index.ts @@ -37,4 +37,7 @@ export { } from './components'; export * from './api'; export * from './route-refs'; +export * from './types'; + +/** @public */ export const ILertIcon: IconComponent = ILertIconComponent as IconComponent; diff --git a/plugins/ilert/src/plugin.ts b/plugins/ilert/src/plugin.ts index 89df59b0b6..96e57e6f48 100644 --- a/plugins/ilert/src/plugin.ts +++ b/plugins/ilert/src/plugin.ts @@ -25,6 +25,7 @@ import { createComponentExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const ilertPlugin = createPlugin({ id: 'ilert', apis: [ @@ -44,6 +45,7 @@ export const ilertPlugin = createPlugin({ }, }); +/** @public */ export const ILertPage = ilertPlugin.provide( createRoutableExtension({ name: 'ILertPage', @@ -52,6 +54,7 @@ export const ILertPage = ilertPlugin.provide( }), ); +/** @public */ export const EntityILertCard = ilertPlugin.provide( createComponentExtension({ name: 'EntityILertCard', diff --git a/plugins/ilert/src/route-refs.tsx b/plugins/ilert/src/route-refs.tsx index 8a3d53001d..fd61bd2bbd 100644 --- a/plugins/ilert/src/route-refs.tsx +++ b/plugins/ilert/src/route-refs.tsx @@ -16,6 +16,7 @@ import { createRouteRef } from '@backstage/core-plugin-api'; +/** @public */ export const iLertRouteRef = createRouteRef({ id: 'ilert', }); diff --git a/plugins/ilert/src/types.ts b/plugins/ilert/src/types.ts index c3e863c6a6..3d1531329a 100644 --- a/plugins/ilert/src/types.ts +++ b/plugins/ilert/src/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export interface Incident { id: number; summary: string; @@ -33,31 +34,43 @@ export interface Incident { commentPublishToSubscribers: boolean; } +/** @public */ export const PENDING = 'PENDING'; +/** @public */ export const ACCEPTED = 'ACCEPTED'; +/** @public */ export const RESOLVED = 'RESOLVED'; + +/** @public */ export type IncidentStatus = typeof PENDING | typeof ACCEPTED | typeof RESOLVED; + +/** @public */ export type IncidentPriority = 'HIGH' | 'LOW'; +/** @public */ export interface Link { href: string; text: string; } +/** @public */ export interface Image { src: string; href: string; alt: string; } +/** @public */ export type SubscriberType = 'TEAM' | 'USER'; +/** @public */ export interface Subscriber { id: number; name: string; type: SubscriberType; } +/** @public */ export interface LogEntry { id: number; timestamp: string; @@ -69,6 +82,7 @@ export interface LogEntry { filterTypes?: string[]; } +/** @public */ export interface User { id: number; username: string; @@ -85,18 +99,22 @@ export interface User { department: string; } +/** @public */ export type UserRole = | 'USER' | 'ADMIN' | 'STAKEHOLDER' | 'ACCOUNT_OWNER' | 'RESPONDER'; +/** @public */ export type Language = 'de' | 'en'; +/** @public */ export interface Phone { regionCode: string; number: string; } +/** @public */ export interface AlertSource { id: number; name: string; @@ -123,22 +141,26 @@ export interface AlertSource { teams: TeamShort[]; } +/** @public */ export interface TeamShort { id: number; name: string; } +/** @public */ export interface TeamMember { user: User; role: 'STAKEHOLDER' | 'RESPONDER' | 'USER' | 'ADMIN'; } +/** @public */ export type AlertSourceStatus = | 'PENDING' | 'ALL_ACCEPTED' | 'ALL_RESOLVED' | 'IN_MAINTENANCE' | 'DISABLED'; +/** @public */ export type AlertSourceIntegrationType = | 'NAGIOS' | 'ICINGA' @@ -186,18 +208,22 @@ export type AlertSourceIntegrationType = | 'KAPACITOR' | 'CORTEXXSOAR' | string; +/** @public */ export type AlertSourceIncidentCreation = | 'ONE_INCIDENT_PER_EMAIL' | 'ONE_INCIDENT_PER_EMAIL_SUBJECT' | 'ONE_PENDING_INCIDENT_ALLOWED' | 'ONE_OPEN_INCIDENT_ALLOWED' | 'OPEN_RESOLVE_ON_EXTRACTION'; +/** @public */ export type AlertSourceFilterOperator = 'AND' | 'OR'; +/** @public */ export type AlertSourceIncidentPriorityRule = | 'HIGH' | 'LOW' | 'HIGH_DURING_SUPPORT_HOURS' | 'LOW_DURING_SUPPORT_HOURS'; +/** @public */ export interface AlertSourceEmailPredicate { field: 'EMAIL_FROM' | 'EMAIL_SUBJECT' | 'EMAIL_BODY'; criteria: @@ -211,15 +237,18 @@ export interface AlertSourceEmailPredicate { | 'MATCHES_NOT_REGEX'; value: string; } +/** @public */ export type AlertSourceTimeZone = | 'Europe/Berlin' | 'America/New_York' | 'America/Los_Angeles' | 'Asia/Istanbul'; +/** @public */ export interface AlertSourceSupportDay { start: string; end: string; } +/** @public */ export interface AlertSourceSupportHours { timezone: AlertSourceTimeZone; autoRaiseIncidents: boolean; @@ -233,12 +262,14 @@ export interface AlertSourceSupportHours { SUNDAY: AlertSourceSupportDay; }; } +/** @public */ export interface AlertSourceHeartbeat { summary: string; intervalSec: number; status: 'OVERDUE' | 'ON_TIME' | 'NEVER_RECEIVED'; } +/** @public */ export interface AlertSourceAutotaskMetadata { userName: string; secret: string; @@ -246,6 +277,7 @@ export interface AlertSourceAutotaskMetadata { webServer: string; } +/** @public */ export interface EscalationPolicy { id: number; name: string; @@ -256,12 +288,14 @@ export interface EscalationPolicy { teams: TeamShort[]; } +/** @public */ export interface EscalationRule { user: User | null; schedule: Schedule | null; escalationTimeout: number; } +/** @public */ export interface Schedule { id: number; name: string; @@ -274,12 +308,14 @@ export interface Schedule { teams: TeamShort[]; } +/** @public */ export interface Shift { user: User; start: string; end: string; } +/** @public */ export interface UptimeMonitor { id: number; name: string; @@ -298,12 +334,14 @@ export interface UptimeMonitor { teams: TeamShort[]; } +/** @public */ export interface UptimeMonitorCheckParams { host?: string; port?: number; url?: string; } +/** @public */ export interface IncidentResponder { group: 'SUGGESTED' | 'USER' | 'ESCALATION_POLICY' | 'ON_CALL_SCHEDULE'; id: number; @@ -311,6 +349,7 @@ export interface IncidentResponder { disabled: boolean; } +/** @public */ export interface IncidentAction { name: string; type: string; @@ -319,6 +358,7 @@ export interface IncidentAction { history?: IncidentActionHistory[]; } +/** @public */ export interface IncidentActionHistory { id: string; webhookId: string; @@ -327,6 +367,7 @@ export interface IncidentActionHistory { success: boolean; } +/** @public */ export interface OnCall { user: User; escalationPolicy: EscalationPolicy; diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index b07e224d2a..16f90c5291 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-jenkins-backend +## 0.1.26-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-jenkins-common@0.1.8-next.0 + ## 0.1.25 ### Patch Changes diff --git a/plugins/jenkins-backend/api-report.md b/plugins/jenkins-backend/api-report.md index 029f2c7af3..489a5e4fb2 100644 --- a/plugins/jenkins-backend/api-report.md +++ b/plugins/jenkins-backend/api-report.md @@ -11,13 +11,9 @@ import { Logger } from 'winston'; import { PermissionAuthorizer } from '@backstage/plugin-permission-common'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "DefaultJenkinsInfoProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider { // (undocumented) @@ -37,8 +33,6 @@ export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider { static readonly OLD_JENKINS_ANNOTATION = 'jenkins.io/github-folder'; } -// Warning: (ae-missing-release-tag) "JenkinsConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export class JenkinsConfig { constructor(instances: JenkinsInstanceConfig[]); @@ -48,8 +42,6 @@ export class JenkinsConfig { readonly instances: JenkinsInstanceConfig[]; } -// Warning: (ae-missing-release-tag) "JenkinsInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface JenkinsInfo { // (undocumented) @@ -62,8 +54,6 @@ export interface JenkinsInfo { jobFullName: string; } -// Warning: (ae-missing-release-tag) "JenkinsInfoProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface JenkinsInfoProvider { // (undocumented) @@ -74,8 +64,6 @@ export interface JenkinsInfoProvider { }): Promise; } -// Warning: (ae-missing-release-tag) "JenkinsInstanceConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface JenkinsInstanceConfig { // (undocumented) @@ -90,8 +78,6 @@ export interface JenkinsInstanceConfig { username: string; } -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RouterOptions { // (undocumented) diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index 9a62239954..af97fec891 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins-backend", "description": "A Backstage backend plugin that integrates towards Jenkins", - "version": "0.1.25", + "version": "0.1.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,14 +25,14 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", - "@backstage/plugin-jenkins-common": "^0.1.7", - "@backstage/plugin-permission-common": "^0.6.3", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/plugin-jenkins-common": "^0.1.8-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -42,10 +42,10 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/jenkins": "^0.23.1", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.6" }, "files": [ diff --git a/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts b/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts index fcce944dc8..37aae5cb1c 100644 --- a/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts +++ b/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts @@ -22,6 +22,7 @@ import { } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; +/** @public */ export interface JenkinsInfoProvider { getInstance(options: { /** @@ -37,6 +38,7 @@ export interface JenkinsInfoProvider { }): Promise; } +/** @public */ export interface JenkinsInfo { baseUrl: string; headers?: Record; @@ -44,6 +46,7 @@ export interface JenkinsInfo { crumbIssuer?: boolean; } +/** @public */ export interface JenkinsInstanceConfig { name: string; baseUrl: string; @@ -54,6 +57,8 @@ export interface JenkinsInstanceConfig { /** * Holds multiple Jenkins configurations. + * + * @public */ export class JenkinsConfig { constructor(public readonly instances: JenkinsInstanceConfig[]) {} @@ -163,6 +168,8 @@ export class JenkinsConfig { * Use default config and annotations, build using fromConfig static function. * * This will fallback through various deprecated config and annotation schemes. + * + * @public */ export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider { static readonly OLD_JENKINS_ANNOTATION = 'jenkins.io/github-folder'; diff --git a/plugins/jenkins-backend/src/service/router.ts b/plugins/jenkins-backend/src/service/router.ts index b4c06314e1..bc0e978396 100644 --- a/plugins/jenkins-backend/src/service/router.ts +++ b/plugins/jenkins-backend/src/service/router.ts @@ -28,12 +28,14 @@ import { import { getBearerTokenFromAuthorizationHeader } from '@backstage/plugin-auth-node'; import { stringifyEntityRef } from '@backstage/catalog-model'; +/** @public */ export interface RouterOptions { logger: Logger; jenkinsInfoProvider: JenkinsInfoProvider; permissions?: PermissionEvaluator | PermissionAuthorizer; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/jenkins-common/CHANGELOG.md b/plugins/jenkins-common/CHANGELOG.md index a284687d69..1eedf680d5 100644 --- a/plugins/jenkins-common/CHANGELOG.md +++ b/plugins/jenkins-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-jenkins-common +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/jenkins-common/package.json b/plugins/jenkins-common/package.json index 6a58de3601..2f92b0ff4c 100644 --- a/plugins/jenkins-common/package.json +++ b/plugins/jenkins-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins-common", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,11 +22,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3" + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index 6c10aef068..7e865f8254 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-jenkins +## 0.7.8-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-jenkins-common@0.1.8-next.0 + ## 0.7.7 ### Patch Changes diff --git a/plugins/jenkins/api-report.md b/plugins/jenkins/api-report.md index 33072ecf49..59e3dc636e 100644 --- a/plugins/jenkins/api-report.md +++ b/plugins/jenkins/api-report.md @@ -14,24 +14,15 @@ import { IdentityApi } from '@backstage/core-plugin-api'; import { InfoCardVariants } from '@backstage/core-components'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityJenkinsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityJenkinsContent: (_props: {}) => JSX.Element; +export const EntityJenkinsContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLatestJenkinsRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLatestJenkinsRunCard: ({ - branch, - variant, -}: { +export const EntityLatestJenkinsRunCard: (props: { branch: string; variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "isJenkinsAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isJenkinsAvailable: (entity: Entity) => boolean; export { isJenkinsAvailable }; @@ -101,8 +92,6 @@ export class JenkinsClient implements JenkinsApi { }): Promise; } -// Warning: (ae-missing-release-tag) "jenkinsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const jenkinsPlugin: BackstagePlugin< { @@ -117,12 +106,9 @@ export { jenkinsPlugin as plugin }; // Warning: (ae-missing-release-tag) "LatestRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const LatestRunCard: ({ - branch, - variant, -}: { +export const LatestRunCard: (props: { branch: string; - variant?: InfoCardVariants | undefined; + variant?: InfoCardVariants; }) => JSX.Element; // Warning: (ae-missing-release-tag) "LEGACY_JENKINS_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) @@ -130,9 +116,8 @@ export const LatestRunCard: ({ // @public (undocumented) export const LEGACY_JENKINS_ANNOTATION = 'jenkins.io/github-folder'; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts // Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export const Router: (_props: Props) => JSX.Element; +export const Router: () => JSX.Element; ``` diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index f013532b55..6d53c7fc78 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.7.7", + "version": "0.7.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,11 +36,11 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-jenkins-common": "^0.1.7", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-jenkins-common": "^0.1.8-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -54,10 +54,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -65,7 +65,7 @@ "@types/node": "^16.11.26", "@types/testing-library__jest-dom": "^5.9.1", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/jenkins/src/components/Cards/Cards.tsx b/plugins/jenkins/src/components/Cards/Cards.tsx index cb84964124..44bbc06f65 100644 --- a/plugins/jenkins/src/components/Cards/Cards.tsx +++ b/plugins/jenkins/src/components/Cards/Cards.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { LinearProgress, makeStyles, Theme } from '@material-ui/core'; import ExternalLinkIcon from '@material-ui/icons/Launch'; import { DateTime, Duration } from 'luxon'; @@ -77,13 +78,12 @@ const WidgetContent = ({ ); }; -const JenkinsApiErrorPanel = ({ - message, - errorType, -}: { +const JenkinsApiErrorPanel = (props: { message: string; errorType: ErrorType; }) => { + const { message, errorType } = props; + let title = undefined; if (errorType === ErrorType.CONNECTION_ERROR) { title = "Can't connect to Jenkins"; @@ -94,13 +94,11 @@ const JenkinsApiErrorPanel = ({ return ; }; -export const LatestRunCard = ({ - branch = 'master', - variant, -}: { +export const LatestRunCard = (props: { branch: string; variant?: InfoCardVariants; }) => { + const { branch = 'master', variant } = props; const [{ projects, loading, error }] = useBuilds({ branch }); const latestRun = projects?.[0]; return ( diff --git a/plugins/jenkins/src/components/Router.tsx b/plugins/jenkins/src/components/Router.tsx index b3561be2b0..ef86203e9e 100644 --- a/plugins/jenkins/src/components/Router.tsx +++ b/plugins/jenkins/src/components/Router.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity } from '@backstage/catalog-model'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; import { useEntity } from '@backstage/plugin-catalog-react'; @@ -23,13 +24,12 @@ import { buildRouteRef } from '../plugin'; import { CITable } from './BuildsPage/lib/CITable'; import { DetailedViewPage } from './BuildWithStepsPage/'; +/** @public */ export const isJenkinsAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[JENKINS_ANNOTATION]) || Boolean(entity.metadata.annotations?.[LEGACY_JENKINS_ANNOTATION]); -type Props = {}; - -export const Router = (_props: Props) => { +export const Router = () => { const { entity } = useEntity(); if (!isJenkinsAvailable(entity)) { diff --git a/plugins/jenkins/src/plugin.ts b/plugins/jenkins/src/plugin.ts index c32c9b50d1..7dbb6bfde1 100644 --- a/plugins/jenkins/src/plugin.ts +++ b/plugins/jenkins/src/plugin.ts @@ -26,16 +26,19 @@ import { } from '@backstage/core-plugin-api'; import { JenkinsClient, jenkinsApiRef } from './api'; +/** @public */ export const rootRouteRef = createRouteRef({ id: 'jenkins', }); +/** @public */ export const buildRouteRef = createSubRouteRef({ id: 'jenkins/builds', path: '/builds/:jobFullName/:buildNumber', parent: rootRouteRef, }); +/** @public */ export const jenkinsPlugin = createPlugin({ id: 'jenkins', apis: [ @@ -51,6 +54,7 @@ export const jenkinsPlugin = createPlugin({ }, }); +/** @public */ export const EntityJenkinsContent = jenkinsPlugin.provide( createRoutableExtension({ name: 'EntityJenkinsContent', @@ -58,6 +62,8 @@ export const EntityJenkinsContent = jenkinsPlugin.provide( mountPoint: rootRouteRef, }), ); + +/** @public */ export const EntityLatestJenkinsRunCard = jenkinsPlugin.provide( createComponentExtension({ name: 'EntityLatestJenkinsRunCard', diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index ce42cd1202..6dd2737b9a 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kafka-backend +## 0.2.29-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.2.28 ### Patch Changes diff --git a/plugins/kafka-backend/api-report.md b/plugins/kafka-backend/api-report.md index e73d8e9e03..20c8260b52 100644 --- a/plugins/kafka-backend/api-report.md +++ b/plugins/kafka-backend/api-report.md @@ -7,9 +7,14 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; -// Warning: (ae-forgotten-export) The symbol "RouterOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; + +// @public (undocumented) +export interface RouterOptions { + // (undocumented) + config: Config; + // (undocumented) + logger: Logger; +} ``` diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index aaba4b1abe..7ab9076be9 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.28", + "version": "0.2.29-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", @@ -47,7 +47,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/jest-when": "^3.5.0", "@types/lodash": "^4.14.151", "jest-when": "^3.1.0", diff --git a/plugins/kafka-backend/src/index.ts b/plugins/kafka-backend/src/index.ts index ab1026e99d..70b7fb45a4 100644 --- a/plugins/kafka-backend/src/index.ts +++ b/plugins/kafka-backend/src/index.ts @@ -20,4 +20,5 @@ * @packageDocumentation */ +export type { RouterOptions } from './service/router'; export { createRouter } from './service/router'; diff --git a/plugins/kafka-backend/src/service/router.ts b/plugins/kafka-backend/src/service/router.ts index 6c8bce7af3..1271e8f48c 100644 --- a/plugins/kafka-backend/src/service/router.ts +++ b/plugins/kafka-backend/src/service/router.ts @@ -23,6 +23,7 @@ import { KafkaApi, KafkaJsApiImpl } from './KafkaApi'; import _ from 'lodash'; import { getClusterDetails } from '../config/ClusterReader'; +/** @public */ export interface RouterOptions { logger: Logger; config: Config; @@ -84,6 +85,7 @@ export const makeRouter = ( return router; }; +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index 344f591932..331b4665d5 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-kafka +## 0.3.9-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/kafka/api-report.md b/plugins/kafka/api-report.md index 844082764e..18b51b77fa 100644 --- a/plugins/kafka/api-report.md +++ b/plugins/kafka/api-report.md @@ -9,26 +9,18 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityKafkaContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityKafkaContent: (_props: {}) => JSX.Element; +export const EntityKafkaContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isPluginApplicableToEntity: (entity: Entity) => boolean; export { isPluginApplicableToEntity as isKafkaAvailable }; export { isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "KAFKA_CONSUMER_GROUP_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const KAFKA_CONSUMER_GROUP_ANNOTATION = 'kafka.apache.org/consumer-groups'; -// Warning: (ae-missing-release-tag) "kafkaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const kafkaPlugin: BackstagePlugin< { @@ -40,9 +32,6 @@ const kafkaPlugin: BackstagePlugin< export { kafkaPlugin }; export { kafkaPlugin as plugin }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Router: (_props: Props) => JSX.Element; +export const Router: () => JSX.Element; ``` diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 5bd7da5060..0dfb4a2134 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.3.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -27,9 +27,9 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -41,10 +41,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -53,7 +53,7 @@ "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", "jest-when": "^3.1.0", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/kafka/src/Router.tsx b/plugins/kafka/src/Router.tsx index 133326b5b9..af6d2d7ef8 100644 --- a/plugins/kafka/src/Router.tsx +++ b/plugins/kafka/src/Router.tsx @@ -22,12 +22,12 @@ import { KAFKA_CONSUMER_GROUP_ANNOTATION } from './constants'; import { KafkaTopicsForConsumer } from './components/ConsumerGroupOffsets/ConsumerGroupOffsets'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isPluginApplicableToEntity = (entity: Entity) => Boolean(entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION]); -type Props = {}; - -export const Router = (_props: Props) => { +/** @public */ +export const Router = () => { const { entity } = useEntity(); if (!isPluginApplicableToEntity(entity)) { diff --git a/plugins/kafka/src/constants.ts b/plugins/kafka/src/constants.ts index b85a738888..a900ec6abe 100644 --- a/plugins/kafka/src/constants.ts +++ b/plugins/kafka/src/constants.ts @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/** @public */ export const KAFKA_CONSUMER_GROUP_ANNOTATION = 'kafka.apache.org/consumer-groups'; + export const KAFKA_DASHBOARD_URL = 'kafka.apache.org/dashboard-urls'; diff --git a/plugins/kafka/src/plugin.ts b/plugins/kafka/src/plugin.ts index 6caa4ca5ca..395152729b 100644 --- a/plugins/kafka/src/plugin.ts +++ b/plugins/kafka/src/plugin.ts @@ -26,10 +26,12 @@ import { } from '@backstage/core-plugin-api'; import { KafkaDashboardClient } from './api/KafkaDashboardClient'; +/** @public */ export const rootCatalogKafkaRouteRef = createRouteRef({ id: 'kafka', }); +/** @public */ export const kafkaPlugin = createPlugin({ id: 'kafka', apis: [ @@ -50,6 +52,7 @@ export const kafkaPlugin = createPlugin({ }, }); +/** @public */ export const EntityKafkaContent = kafkaPlugin.provide( createRoutableExtension({ name: 'EntityKafkaContent', diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index f4e98a4152..17be0c85b0 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-kubernetes-backend +## 0.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + ## 0.7.1 ### Patch Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 6a894d8820..52c1a53404 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.7.1", + "version": "0.7.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,12 +36,12 @@ }, "dependencies": { "@azure/identity": "^2.0.4", - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", + "@backstage/plugin-auth-node": "^0.2.5-next.0", "@backstage/plugin-kubernetes-common": "^0.4.1", "@google-cloud/container": "^4.0.0", "@kubernetes/client-node": "^0.17.0", @@ -63,7 +63,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/aws4": "^1.5.1", "aws-sdk-mock": "^5.2.1", "supertest": "^6.1.3" diff --git a/plugins/kubernetes-common/api-report.md b/plugins/kubernetes-common/api-report.md index f8a8c6b460..ef36d5ce28 100644 --- a/plugins/kubernetes-common/api-report.md +++ b/plugins/kubernetes-common/api-report.md @@ -18,13 +18,9 @@ import { V1ReplicaSet } from '@kubernetes/client-node'; import { V1Service } from '@kubernetes/client-node'; import { V1StatefulSet } from '@kubernetes/client-node'; -// Warning: (ae-missing-release-tag) "AuthProviderType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure'; -// Warning: (ae-missing-release-tag) "ClientContainerStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClientContainerStatus { // (undocumented) @@ -35,8 +31,6 @@ export interface ClientContainerStatus { memoryUsage: ClientCurrentResourceUsage; } -// Warning: (ae-missing-release-tag) "ClientCurrentResourceUsage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClientCurrentResourceUsage { // (undocumented) @@ -47,8 +41,6 @@ export interface ClientCurrentResourceUsage { requestTotal: number | string; } -// Warning: (ae-missing-release-tag) "ClientPodStatus" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClientPodStatus { // (undocumented) @@ -61,8 +53,6 @@ export interface ClientPodStatus { pod: V1Pod; } -// Warning: (ae-missing-release-tag) "ClusterAttributes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClusterAttributes { dashboardApp?: string; @@ -71,8 +61,6 @@ export interface ClusterAttributes { name: string; } -// Warning: (ae-missing-release-tag) "ClusterObjects" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ClusterObjects { // (undocumented) @@ -85,8 +73,6 @@ export interface ClusterObjects { resources: FetchResponse[]; } -// Warning: (ae-missing-release-tag) "ConfigMapFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ConfigMapFetchResponse { // (undocumented) @@ -95,8 +81,6 @@ export interface ConfigMapFetchResponse { type: 'configmaps'; } -// Warning: (ae-missing-release-tag) "CronJobsFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CronJobsFetchResponse { // (undocumented) @@ -105,8 +89,6 @@ export interface CronJobsFetchResponse { type: 'cronjobs'; } -// Warning: (ae-missing-release-tag) "CustomResourceFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface CustomResourceFetchResponse { // (undocumented) @@ -115,8 +97,6 @@ export interface CustomResourceFetchResponse { type: 'customresources'; } -// Warning: (ae-missing-release-tag) "DaemonSetsFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DaemonSetsFetchResponse { // (undocumented) @@ -125,8 +105,6 @@ export interface DaemonSetsFetchResponse { type: 'daemonsets'; } -// Warning: (ae-missing-release-tag) "DeploymentFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DeploymentFetchResponse { // (undocumented) @@ -135,8 +113,6 @@ export interface DeploymentFetchResponse { type: 'deployments'; } -// Warning: (ae-missing-release-tag) "FetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type FetchResponse = | PodFetchResponse @@ -153,8 +129,6 @@ export type FetchResponse = | StatefulSetsFetchResponse | DaemonSetsFetchResponse; -// Warning: (ae-missing-release-tag) "HorizontalPodAutoscalersFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface HorizontalPodAutoscalersFetchResponse { // (undocumented) @@ -163,8 +137,6 @@ export interface HorizontalPodAutoscalersFetchResponse { type: 'horizontalpodautoscalers'; } -// Warning: (ae-missing-release-tag) "IngressesFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface IngressesFetchResponse { // (undocumented) @@ -173,8 +145,6 @@ export interface IngressesFetchResponse { type: 'ingresses'; } -// Warning: (ae-missing-release-tag) "JobsFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface JobsFetchResponse { // (undocumented) @@ -183,8 +153,6 @@ export interface JobsFetchResponse { type: 'jobs'; } -// Warning: (ae-missing-release-tag) "KubernetesErrorTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type KubernetesErrorTypes = | 'BAD_REQUEST' @@ -192,8 +160,6 @@ export type KubernetesErrorTypes = | 'SYSTEM_ERROR' | 'UNKNOWN_ERROR'; -// Warning: (ae-missing-release-tag) "KubernetesFetchError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface KubernetesFetchError { // (undocumented) @@ -204,8 +170,6 @@ export interface KubernetesFetchError { statusCode?: number; } -// Warning: (ae-missing-release-tag) "KubernetesRequestAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface KubernetesRequestAuth { // (undocumented) @@ -216,8 +180,6 @@ export interface KubernetesRequestAuth { }; } -// Warning: (ae-missing-release-tag) "KubernetesRequestBody" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface KubernetesRequestBody { // (undocumented) @@ -226,8 +188,6 @@ export interface KubernetesRequestBody { entity: Entity; } -// Warning: (ae-missing-release-tag) "LimitRangeFetchReponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface LimitRangeFetchReponse { // (undocumented) @@ -236,16 +196,12 @@ export interface LimitRangeFetchReponse { type: 'limitranges'; } -// Warning: (ae-missing-release-tag) "ObjectsByEntityResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ObjectsByEntityResponse { // (undocumented) items: ClusterObjects[]; } -// Warning: (ae-missing-release-tag) "PodFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PodFetchResponse { // (undocumented) @@ -254,8 +210,6 @@ export interface PodFetchResponse { type: 'pods'; } -// Warning: (ae-missing-release-tag) "ReplicaSetsFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ReplicaSetsFetchResponse { // (undocumented) @@ -264,8 +218,6 @@ export interface ReplicaSetsFetchResponse { type: 'replicasets'; } -// Warning: (ae-missing-release-tag) "ServiceFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ServiceFetchResponse { // (undocumented) @@ -274,8 +226,6 @@ export interface ServiceFetchResponse { type: 'services'; } -// Warning: (ae-missing-release-tag) "StatefulSetsFetchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface StatefulSetsFetchResponse { // (undocumented) diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index 16d3e7d61b..1345d4ff59 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -42,7 +42,7 @@ "@kubernetes/client-node": "^0.17.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "jest": { "roots": [ diff --git a/plugins/kubernetes-common/src/types.ts b/plugins/kubernetes-common/src/types.ts index 53f6a5a640..830c32c32c 100644 --- a/plugins/kubernetes-common/src/types.ts +++ b/plugins/kubernetes-common/src/types.ts @@ -31,6 +31,7 @@ import { } from '@kubernetes/client-node'; import { Entity } from '@backstage/catalog-model'; +/** @public */ export interface KubernetesRequestAuth { google?: string; oidc?: { @@ -38,11 +39,13 @@ export interface KubernetesRequestAuth { }; } +/** @public */ export interface KubernetesRequestBody { auth?: KubernetesRequestAuth; entity: Entity; } +/** @public */ export interface ClusterAttributes { /** * Specifies the name of the Kubernetes cluster. @@ -81,6 +84,7 @@ export interface ClusterAttributes { dashboardParameters?: JsonObject; } +/** @public */ export interface ClusterObjects { cluster: ClusterAttributes; resources: FetchResponse[]; @@ -88,12 +92,15 @@ export interface ClusterObjects { errors: KubernetesFetchError[]; } +/** @public */ export interface ObjectsByEntityResponse { items: ClusterObjects[]; } +/** @public */ export type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure'; +/** @public */ export type FetchResponse = | PodFetchResponse | ServiceFetchResponse @@ -109,95 +116,113 @@ export type FetchResponse = | StatefulSetsFetchResponse | DaemonSetsFetchResponse; +/** @public */ export interface PodFetchResponse { type: 'pods'; resources: Array; } +/** @public */ export interface ServiceFetchResponse { type: 'services'; resources: Array; } +/** @public */ export interface ConfigMapFetchResponse { type: 'configmaps'; resources: Array; } +/** @public */ export interface DeploymentFetchResponse { type: 'deployments'; resources: Array; } +/** @public */ export interface ReplicaSetsFetchResponse { type: 'replicasets'; resources: Array; } +/** @public */ export interface LimitRangeFetchReponse { type: 'limitranges'; resources: Array; } +/** @public */ export interface HorizontalPodAutoscalersFetchResponse { type: 'horizontalpodautoscalers'; resources: Array; } +/** @public */ export interface JobsFetchResponse { type: 'jobs'; resources: Array; } +/** @public */ export interface CronJobsFetchResponse { type: 'cronjobs'; resources: Array; } +/** @public */ export interface IngressesFetchResponse { type: 'ingresses'; resources: Array; } +/** @public */ export interface CustomResourceFetchResponse { type: 'customresources'; resources: Array; } +/** @public */ export interface StatefulSetsFetchResponse { type: 'statefulsets'; resources: Array; } +/** @public */ export interface DaemonSetsFetchResponse { type: 'daemonsets'; resources: Array; } +/** @public */ export interface KubernetesFetchError { errorType: KubernetesErrorTypes; statusCode?: number; resourcePath?: string; } +/** @public */ export type KubernetesErrorTypes = | 'BAD_REQUEST' | 'UNAUTHORIZED_ERROR' | 'SYSTEM_ERROR' | 'UNKNOWN_ERROR'; +/** @public */ export interface ClientCurrentResourceUsage { currentUsage: number | string; requestTotal: number | string; limitTotal: number | string; } +/** @public */ export interface ClientContainerStatus { container: string; cpuUsage: ClientCurrentResourceUsage; memoryUsage: ClientCurrentResourceUsage; } +/** @public */ export interface ClientPodStatus { pod: V1Pod; cpu: ClientCurrentResourceUsage; diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index 546d6a1912..4f4475a4cf 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-kubernetes +## 0.7.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.7.1 ### Patch Changes diff --git a/plugins/kubernetes/api-report.md b/plugins/kubernetes/api-report.md index ccb4dcae8d..5cf1c3ed34 100644 --- a/plugins/kubernetes/api-report.md +++ b/plugins/kubernetes/api-report.md @@ -208,16 +208,10 @@ export interface GroupedResponses extends DeploymentResources { // @public (undocumented) export const GroupedResponsesContext: React_2.Context; -// Warning: (ae-missing-release-tag) "HorizontalPodAutoscalerDrawer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const HorizontalPodAutoscalerDrawer: ({ - hpa, - expanded, - children, -}: { +export const HorizontalPodAutoscalerDrawer: (props: { hpa: V1HorizontalPodAutoscaler; - expanded?: boolean | undefined; + expanded?: boolean; children?: React_2.ReactNode; }) => JSX.Element; @@ -361,15 +355,10 @@ const kubernetesPlugin: BackstagePlugin< export { kubernetesPlugin }; export { kubernetesPlugin as plugin }; -// Warning: (ae-missing-release-tag) "PodDrawer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const PodDrawer: ({ - pod, - expanded, -}: { +export const PodDrawer: (props: { pod: V1Pod; - expanded?: boolean | undefined; + expanded?: boolean; }) => JSX.Element; // Warning: (ae-missing-release-tag) "PodNamesWithErrorsContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index f0d7076efd..41be1bdf77 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.7.1", + "version": "0.7.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,9 +36,9 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/plugin-kubernetes-common": "^0.4.1", "@backstage/theme": "^0.2.16", "@kubernetes/client-node": "^0.17.0", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -68,7 +68,7 @@ "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/kubernetes/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx b/plugins/kubernetes/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx index 504a4f26bc..ca7abe07aa 100644 --- a/plugins/kubernetes/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx +++ b/plugins/kubernetes/src/components/HorizontalPodAutoscalers/HorizontalPodAutoscalerDrawer.tsx @@ -18,15 +18,14 @@ import React from 'react'; import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node'; import { KubernetesDrawer } from '../KubernetesDrawer/KubernetesDrawer'; -export const HorizontalPodAutoscalerDrawer = ({ - hpa, - expanded, - children, -}: { +/** @public */ +export const HorizontalPodAutoscalerDrawer = (props: { hpa: V1HorizontalPodAutoscaler; expanded?: boolean; children?: React.ReactNode; }) => { + const { hpa, expanded, children } = props; + return ( { +/** @public */ +export const PodDrawer = (props: { pod: V1Pod; expanded?: boolean }) => { + const { pod, expanded } = props; + return ( JSX.Element; +export const EmbeddedRouter: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLastLighthouseAuditCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLastLighthouseAuditCard: ({ - dense, - variant, -}: { +export const EntityLastLighthouseAuditCard: (props: { dense?: boolean | undefined; variant?: InfoCardVariants | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityLighthouseContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityLighthouseContent: (_props: {}) => JSX.Element; +export const EntityLighthouseContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "FetchError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class FetchError extends Error { // (undocumented) @@ -82,15 +71,11 @@ export class FetchError extends Error { get name(): string; } -// Warning: (ae-missing-release-tag) "isLighthouseAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isLighthouseAvailable: (entity: Entity) => boolean; export { isLighthouseAvailable }; export { isLighthouseAvailable as isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "LASListRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface LASListRequest { // (undocumented) @@ -99,8 +84,6 @@ export interface LASListRequest { offset?: number; } -// Warning: (ae-missing-release-tag) "LASListResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface LASListResponse { // (undocumented) @@ -113,19 +96,12 @@ export interface LASListResponse { total: number; } -// Warning: (ae-missing-release-tag) "LastLighthouseAuditCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const LastLighthouseAuditCard: ({ - dense, - variant, -}: { - dense?: boolean | undefined; - variant?: InfoCardVariants | undefined; +export const LastLighthouseAuditCard: (props: { + dense?: boolean; + variant?: InfoCardVariants; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "LighthouseApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LighthouseApi = { url: string; @@ -135,13 +111,9 @@ export type LighthouseApi = { getWebsiteByUrl: (websiteUrl: string) => Promise; }; -// Warning: (ae-missing-release-tag) "lighthouseApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const lighthouseApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "LighthouseCategoryAbbr" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface LighthouseCategoryAbbr { // (undocumented) @@ -152,8 +124,6 @@ export interface LighthouseCategoryAbbr { title: string; } -// Warning: (ae-missing-release-tag) "LighthouseCategoryId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type LighthouseCategoryId = | 'pwa' @@ -162,13 +132,9 @@ export type LighthouseCategoryId = | 'accessibility' | 'best-practices'; -// Warning: (ae-missing-release-tag) "LighthousePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const LighthousePage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "lighthousePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const lighthousePlugin: BackstagePlugin< { @@ -181,8 +147,6 @@ const lighthousePlugin: BackstagePlugin< export { lighthousePlugin }; export { lighthousePlugin as plugin }; -// Warning: (ae-missing-release-tag) "LighthouseRestApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class LighthouseRestApi implements LighthouseApi { constructor(url: string); @@ -193,23 +157,16 @@ export class LighthouseRestApi implements LighthouseApi { // (undocumented) getWebsiteForAuditId(auditId: string): Promise; // (undocumented) - getWebsiteList({ - limit, - offset, - }?: LASListRequest): Promise; + getWebsiteList(options?: LASListRequest): Promise; // (undocumented) triggerAudit(payload: TriggerAuditPayload): Promise; // (undocumented) url: string; } -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Router: () => JSX.Element; -// Warning: (ae-missing-release-tag) "TriggerAuditPayload" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface TriggerAuditPayload { // (undocumented) @@ -224,8 +181,6 @@ export interface TriggerAuditPayload { url: string; } -// Warning: (ae-missing-release-tag) "Website" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface Website { // (undocumented) @@ -236,8 +191,6 @@ export interface Website { url: string; } -// Warning: (ae-missing-release-tag) "WebsiteListResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type WebsiteListResponse = LASListResponse; ``` diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 30539b8859..720c8a3a09 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.3.8", + "version": "0.3.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,9 +37,9 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -51,10 +51,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -63,7 +63,7 @@ "@types/node": "^16.11.26", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/lighthouse/src/Router.tsx b/plugins/lighthouse/src/Router.tsx index 1c41f522f4..04c00cde41 100644 --- a/plugins/lighthouse/src/Router.tsx +++ b/plugins/lighthouse/src/Router.tsx @@ -25,9 +25,11 @@ import { LIGHTHOUSE_WEBSITE_URL_ANNOTATION } from '../constants'; import { AuditListForEntity } from './components/AuditList/AuditListForEntity'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isLighthouseAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[LIGHTHOUSE_WEBSITE_URL_ANNOTATION]); +/** @public */ export const Router = () => ( } /> @@ -36,9 +38,8 @@ export const Router = () => ( ); -type Props = {}; - -export const EmbeddedRouter = (_props: Props) => { +/** @public */ +export const EmbeddedRouter = () => { const { entity } = useEntity(); if (!isLighthouseAvailable(entity)) { diff --git a/plugins/lighthouse/src/api.ts b/plugins/lighthouse/src/api.ts index b40b70356f..e4ccefe2a1 100644 --- a/plugins/lighthouse/src/api.ts +++ b/plugins/lighthouse/src/api.ts @@ -17,6 +17,7 @@ import { Config } from '@backstage/config'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export type LighthouseCategoryId = | 'pwa' | 'seo' @@ -24,17 +25,20 @@ export type LighthouseCategoryId = | 'accessibility' | 'best-practices'; +/** @public */ export interface LighthouseCategoryAbbr { id: LighthouseCategoryId; score: number; title: string; } +/** @public */ export interface LASListRequest { offset?: number; limit?: number; } +/** @public */ export interface LASListResponse { items: Item[]; total: number; @@ -42,21 +46,25 @@ export interface LASListResponse { limit: number; } -interface AuditBase { +/** @public */ +export interface AuditBase { id: string; url: string; timeCreated: string; } +/** @public */ export interface AuditRunning extends AuditBase { status: 'RUNNING'; } +/** @public */ export interface AuditFailed extends AuditBase { status: 'FAILED'; timeCompleted: string; } +/** @public */ export interface AuditCompleted extends AuditBase { status: 'COMPLETED'; timeCompleted: string; @@ -64,16 +72,20 @@ export interface AuditCompleted extends AuditBase { categories: Record; } +/** @public */ export type Audit = AuditRunning | AuditFailed | AuditCompleted; +/** @public */ export interface Website { url: string; audits: Audit[]; lastAudit: Audit; } +/** @public */ export type WebsiteListResponse = LASListResponse; +/** @public */ export interface TriggerAuditPayload { url: string; options: { @@ -85,6 +97,7 @@ export interface TriggerAuditPayload { }; } +/** @public */ export class FetchError extends Error { get name(): string { return this.constructor.name; @@ -99,6 +112,7 @@ export class FetchError extends Error { } } +/** @public */ export type LighthouseApi = { url: string; getWebsiteList: (listOptions: LASListRequest) => Promise; @@ -107,10 +121,12 @@ export type LighthouseApi = { getWebsiteByUrl: (websiteUrl: string) => Promise; }; +/** @public */ export const lighthouseApiRef = createApiRef({ id: 'plugin.lighthouse.service', }); +/** @public */ export class LighthouseRestApi implements LighthouseApi { static fromConfig(config: Config) { return new LighthouseRestApi(config.getString('lighthouse.baseUrl')); @@ -124,10 +140,10 @@ export class LighthouseRestApi implements LighthouseApi { return await resp.json(); } - async getWebsiteList({ - limit, - offset, - }: LASListRequest = {}): Promise { + async getWebsiteList( + options: LASListRequest = {}, + ): Promise { + const { limit, offset } = options; const params = new URLSearchParams(); if (typeof limit === 'number') params.append('limit', limit.toString()); if (typeof offset === 'number') params.append('offset', offset.toString()); diff --git a/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.tsx b/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.tsx index fc44397330..4daeb5177c 100644 --- a/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.tsx +++ b/plugins/lighthouse/src/components/Cards/LastLighthouseAuditCard.tsx @@ -27,8 +27,8 @@ import { StructuredMetadataTable, } from '@backstage/core-components'; -const LighthouseCategoryScoreStatus = ({ score }: { score: number }) => { - const scoreAsPercentage = Math.round(score * 100); +const LighthouseCategoryScoreStatus = (props: { score: number }) => { + const scoreAsPercentage = Math.round(props.score * 100); switch (true) { case scoreAsPercentage >= 90: return ( @@ -56,20 +56,15 @@ const LighthouseCategoryScoreStatus = ({ score }: { score: number }) => { } }; -const LighthouseAuditStatus = ({ audit }: { audit: Audit }) => ( +const LighthouseAuditStatus = (props: { audit: Audit }) => ( <> - - {audit.status.toLocaleUpperCase('en-US')} + + {props.audit.status.toLocaleUpperCase('en-US')} ); -const LighthouseAuditSummary = ({ - audit, - dense = false, -}: { - audit: Audit; - dense?: boolean; -}) => { +const LighthouseAuditSummary = (props: { audit: Audit; dense?: boolean }) => { + const { audit, dense = false } = props; const { url } = audit; const flattenedCategoryData: Record = {}; if (audit.status === 'COMPLETED') { @@ -92,13 +87,12 @@ const LighthouseAuditSummary = ({ return ; }; -export const LastLighthouseAuditCard = ({ - dense = false, - variant, -}: { +/** @public */ +export const LastLighthouseAuditCard = (props: { dense?: boolean; variant?: InfoCardVariants; }) => { + const { dense = false, variant } = props; const { value: website, loading, error } = useWebsiteForEntity(); let content; diff --git a/plugins/lighthouse/src/plugin.ts b/plugins/lighthouse/src/plugin.ts index 1c9bc295f8..24052f7771 100644 --- a/plugins/lighthouse/src/plugin.ts +++ b/plugins/lighthouse/src/plugin.ts @@ -40,6 +40,7 @@ export const entityContentRouteRef = createRouteRef({ id: 'lighthouse:entity-content', }); +/** @public */ export const lighthousePlugin = createPlugin({ id: 'lighthouse', apis: [ @@ -55,6 +56,7 @@ export const lighthousePlugin = createPlugin({ }, }); +/** @public */ export const LighthousePage = lighthousePlugin.provide( createRoutableExtension({ name: 'LighthousePage', @@ -63,6 +65,7 @@ export const LighthousePage = lighthousePlugin.provide( }), ); +/** @public */ export const EntityLighthouseContent = lighthousePlugin.provide( createRoutableExtension({ name: 'EntityLighthouseContent', @@ -71,6 +74,7 @@ export const EntityLighthouseContent = lighthousePlugin.provide( }), ); +/** @public */ export const EntityLastLighthouseAuditCard = lighthousePlugin.provide( createComponentExtension({ name: 'EntityLastLighthouseAuditCard', diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index 431fcb4a33..f72490b834 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-newrelic-dashboard +## 0.2.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/newrelic-dashboard/api-report.md b/plugins/newrelic-dashboard/api-report.md index d74d69cad6..740fc46ef7 100644 --- a/plugins/newrelic-dashboard/api-report.md +++ b/plugins/newrelic-dashboard/api-report.md @@ -10,33 +10,21 @@ import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; // @public -export const DashboardSnapshotComponent: ({ - guid, - name, - permalink, -}: { +export const DashboardSnapshotComponent: (props: { guid: string; name: string; permalink: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityNewRelicDashboardCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityNewRelicDashboardCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityNewRelicDashboardContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityNewRelicDashboardContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isNewRelicDashboardAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const isNewRelicDashboardAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "newRelicDashboardPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const newRelicDashboardPlugin: BackstagePlugin< { diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 2644524e32..c7a07b9431 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,18 +24,18 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", "@testing-library/jest-dom": "^5.10.1", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5" diff --git a/plugins/newrelic-dashboard/src/Router.tsx b/plugins/newrelic-dashboard/src/Router.tsx index 24a5a1037f..b549d1107b 100644 --- a/plugins/newrelic-dashboard/src/Router.tsx +++ b/plugins/newrelic-dashboard/src/Router.tsx @@ -21,6 +21,7 @@ import { NewRelicDashboard } from './components/NewRelicDashboard'; import { useEntity } from '@backstage/plugin-catalog-react'; import { NEWRELIC_GUID_ANNOTATION } from './constants'; +/** @public */ export const isNewRelicDashboardAvailable = (entity: Entity) => Boolean(entity?.metadata?.annotations?.[NEWRELIC_GUID_ANNOTATION]); diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx index f501fd77bf..dcbde9279a 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React from 'react'; import { Box, Grid, MenuItem, Select } from '@material-ui/core'; import { useApi, storageApiRef } from '@backstage/core-plugin-api'; @@ -27,13 +28,15 @@ import { newRelicDashboardApiRef } from '../../../api'; import { DashboardSnapshotSummary } from '../../../api/NewRelicDashboardApi'; import useObservable from 'react-use/lib/useObservable'; -type Props = { +/** + * @public + */ +export const DashboardSnapshot = (props: { guid: string; name: string; permalink: string; -}; - -export const DashboardSnapshot = ({ guid, name, permalink }: Props) => { +}) => { + const { guid, name, permalink } = props; const newRelicDashboardAPI = useApi(newRelicDashboardApiRef); const storageApi = useApi(storageApiRef).forBucket('newrelic-dashboard'); const setStorageValue = (value: number) => { diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx index 85a73b0a4b..594a5fd53d 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx @@ -44,15 +44,14 @@ function TabPanel(props: TabPanelProps) { ); } + function a11yProps(index: number) { return { id: `simple-tab-${index}`, 'aria-controls': `simple-tabpanel-${index}`, }; } -type Props = { - guid: string; -}; + const useStyles = makeStyles( theme => ({ tabsWrapper: { @@ -79,7 +78,9 @@ const useStyles = makeStyles( }), { name: 'DashboardHeaderTabs' }, ); -export const DashboardSnapshotList = ({ guid }: Props) => { + +export const DashboardSnapshotList = (props: { guid: string }) => { + const { guid } = props; const styles = useStyles(); const newRelicDashboardAPI = useApi(newRelicDashboardApiRef); const { value, loading, error } = useAsync(async (): Promise< diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts index 6b17582515..6d6ba5666b 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/index.ts @@ -13,5 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { DashboardSnapshot } from './DashboardSnapshot'; export { DashboardSnapshotList } from './DashboardSnapshotList'; diff --git a/plugins/newrelic-dashboard/src/index.ts b/plugins/newrelic-dashboard/src/index.ts index 060306524f..ba87b8a514 100644 --- a/plugins/newrelic-dashboard/src/index.ts +++ b/plugins/newrelic-dashboard/src/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { newRelicDashboardPlugin, EntityNewRelicDashboardCard, diff --git a/plugins/newrelic-dashboard/src/plugin.ts b/plugins/newrelic-dashboard/src/plugin.ts index d4ed11573f..51be731ca7 100644 --- a/plugins/newrelic-dashboard/src/plugin.ts +++ b/plugins/newrelic-dashboard/src/plugin.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { createPlugin, configApiRef, @@ -24,6 +25,7 @@ import { import { newRelicDashboardApiRef, NewRelicDashboardClient } from './api'; import { rootRouteRef } from './routes'; +/** @public */ export const newRelicDashboardPlugin = createPlugin({ id: 'new-relic-dashboard', routes: { @@ -46,6 +48,8 @@ export const newRelicDashboardPlugin = createPlugin({ }), ], }); + +/** @public */ export const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide( createComponentExtension({ name: 'EntityNewRelicDashboardPage', @@ -55,6 +59,7 @@ export const EntityNewRelicDashboardContent = newRelicDashboardPlugin.provide( }), ); +/** @public */ export const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide( createComponentExtension({ name: 'EntityNewRelicDashboardListComponent', @@ -66,6 +71,7 @@ export const EntityNewRelicDashboardCard = newRelicDashboardPlugin.provide( }, }), ); + /** * Render dashboard snapshots from Newrelic in backstage. Use dashboards which have the tag `isDashboardPage: true` * diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index 11dc6139db..42a8109495 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-newrelic +## 0.3.27-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.3.26 ### Patch Changes diff --git a/plugins/newrelic/api-report.md b/plugins/newrelic/api-report.md index fbf639ee9d..302b7c918a 100644 --- a/plugins/newrelic/api-report.md +++ b/plugins/newrelic/api-report.md @@ -8,13 +8,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "NewRelicPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const NewRelicPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "newRelicPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const newRelicPlugin: BackstagePlugin< { diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 541fdbddb3..7e7876f212 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.26", + "version": "0.3.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,8 +35,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -47,17 +47,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/newrelic/src/plugin.ts b/plugins/newrelic/src/plugin.ts index 6cf77a785f..0387c50aa9 100644 --- a/plugins/newrelic/src/plugin.ts +++ b/plugins/newrelic/src/plugin.ts @@ -27,6 +27,7 @@ export const rootRouteRef = createRouteRef({ id: 'newrelic', }); +/** @public */ export const newRelicPlugin = createPlugin({ id: 'newrelic', apis: [ @@ -41,6 +42,7 @@ export const newRelicPlugin = createPlugin({ }, }); +/** @public */ export const NewRelicPage = newRelicPlugin.provide( createRoutableExtension({ name: 'NewRelicPage', diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index f67be53874..5e107487ff 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-org +## 0.5.9-next.0 + +### Patch Changes + +- ab6650ede9: Added an edit button to the `UserProfileCard` that is enabled when the `backstage.io/edit-url` is present, this matches how the `GroupProfileCard` works +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.5.8 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index 3d9582a81b..bc871ac480 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.5.8", + "version": "0.5.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,9 +30,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,18 +48,18 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/catalog-client": "^1.0.4", - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/catalog-client": "^1.0.5-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx index 68e9715b06..f339a5828c 100644 --- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx +++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.test.tsx @@ -73,3 +73,86 @@ describe('UserSummary Test', () => { expect(rendered.getByText('Super awesome human')).toBeInTheDocument(); }); }); + +describe('Edit Button', () => { + it('Should not be present by default', async () => { + const userEntity: UserEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'calum.leavy', + description: 'Super awesome human', + }, + spec: { + profile: { + displayName: 'Calum Leavy', + email: 'calum-leavy@example.com', + }, + memberOf: ['ExampleGroup'], + }, + relations: [ + { + type: 'memberOf', + targetRef: 'group:default/examplegroup', + }, + ], + }; + + const rendered = await renderWithEffects( + wrapInTestApp( + + + , + { + mountedRoutes: { + '/catalog/:namespace/:kind/:name': entityRouteRef, + }, + }, + ), + ); + + expect(rendered.queryByTitle('Edit Metadata')).not.toBeInTheDocument(); + }); + + it('Should be visible when edit URL annotation is present', async () => { + const annotations: Record = { + 'backstage.io/edit-url': 'https://example.com/user.yaml', + }; + const userEntity: UserEntity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'User', + metadata: { + name: 'calum.leavy', + description: 'Super awesome human', + annotations, + }, + spec: { + profile: { + displayName: 'Calum Leavy', + email: 'calum-leavy@example.com', + }, + memberOf: ['ExampleGroup'], + }, + relations: [ + { + type: 'memberOf', + targetRef: 'group:default/examplegroup', + }, + ], + }; + + const rendered = await renderWithEffects( + wrapInTestApp( + + + , + { + mountedRoutes: { + '/catalog/:namespace/:kind/:name': entityRouteRef, + }, + }, + ), + ); + expect(rendered.getByRole('button')).toBeInTheDocument(); + }); +}); diff --git a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx index 148fb03d19..dd75578687 100644 --- a/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx +++ b/plugins/org/src/components/Cards/User/UserProfileCard/UserProfileCard.tsx @@ -14,7 +14,11 @@ * limitations under the License. */ -import { RELATION_MEMBER_OF, UserEntity } from '@backstage/catalog-model'; +import { + RELATION_MEMBER_OF, + UserEntity, + ANNOTATION_EDIT_URL, +} from '@backstage/catalog-model'; import { EntityRefLinks, getEntityRelations, @@ -23,12 +27,14 @@ import { import { Box, Grid, + IconButton, List, ListItem, ListItemIcon, ListItemText, Tooltip, } from '@material-ui/core'; +import EditIcon from '@material-ui/icons/Edit'; import EmailIcon from '@material-ui/icons/Email'; import GroupIcon from '@material-ui/icons/Group'; import PersonIcon from '@material-ui/icons/Person'; @@ -56,6 +62,9 @@ export const UserProfileCard = (props: { variant?: InfoCardVariants }) => { return User not found; } + const entityMetadataEditUrl = + user.metadata.annotations?.[ANNOTATION_EDIT_URL]; + const { metadata: { name: metaName, description }, spec: { profile }, @@ -71,6 +80,20 @@ export const UserProfileCard = (props: { variant?: InfoCardVariants }) => { title={} subheader={description} variant={props.variant} + action={ + <> + {entityMetadataEditUrl && ( + + + + )} + + } > diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index 6e4e062402..21253e8e5b 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-pagerduty +## 0.5.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.5.1 ### Patch Changes diff --git a/plugins/pagerduty/api-report.md b/plugins/pagerduty/api-report.md index c81da24454..5bfe84e63f 100644 --- a/plugins/pagerduty/api-report.md +++ b/plugins/pagerduty/api-report.md @@ -13,26 +13,30 @@ import { Entity } from '@backstage/catalog-model'; import { FetchApi } from '@backstage/core-plugin-api'; import { ReactNode } from 'react'; -// Warning: (ae-missing-release-tag) "EntityPagerDutyCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityPagerDutyCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isPluginApplicableToEntity: (entity: Entity) => boolean; export { isPluginApplicableToEntity as isPagerDutyAvailable }; export { isPluginApplicableToEntity }; -// Warning: (ae-forgotten-export) The symbol "PagerDutyApi" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "pagerDutyApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface PagerDutyApi { + getChangeEventsByServiceId( + serviceId: string, + ): Promise; + getIncidentsByServiceId( + serviceId: string, + ): Promise; + getOnCallByPolicyId(policyId: string): Promise; + getServiceByEntity(entity: Entity): Promise; + triggerAlarm(request: PagerDutyTriggerAlarmRequest): Promise; +} + // @public (undocumented) export const pagerDutyApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "PagerDutyAssignee" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyAssignee = { id: string; @@ -40,13 +44,9 @@ export type PagerDutyAssignee = { html_url: string; }; -// Warning: (ae-missing-release-tag) "PagerDutyCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const PagerDutyCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "PagerDutyChangeEvent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyChangeEvent = { id: string; @@ -67,22 +67,18 @@ export type PagerDutyChangeEvent = { timestamp: string; }; -// Warning: (ae-missing-release-tag) "PagerDutyChangeEventsResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyChangeEventsResponse = { change_events: PagerDutyChangeEvent[]; }; -// Warning: (ae-missing-release-tag) "PagerDutyClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class PagerDutyClient implements PagerDutyApi { constructor(config: PagerDutyClientApiConfig); // (undocumented) static fromConfig( configApi: ConfigApi, - { discoveryApi, fetchApi }: PagerDutyClientApiDependencies, + dependencies: PagerDutyClientApiDependencies, ): PagerDutyClient; // (undocumented) getChangeEventsByServiceId( @@ -100,23 +96,17 @@ export class PagerDutyClient implements PagerDutyApi { triggerAlarm(request: PagerDutyTriggerAlarmRequest): Promise; } -// Warning: (ae-missing-release-tag) "PagerDutyClientApiConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyClientApiConfig = PagerDutyClientApiDependencies & { eventsBaseUrl?: string; }; -// Warning: (ae-missing-release-tag) "PagerDutyClientApiDependencies" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyClientApiDependencies = { discoveryApi: DiscoveryApi; fetchApi: FetchApi; }; -// Warning: (ae-missing-release-tag) "PagerDutyEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyEntity = { integrationKey?: string; @@ -124,8 +114,6 @@ export type PagerDutyEntity = { name: string; }; -// Warning: (ae-missing-release-tag) "PagerDutyIncident" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyIncident = { id: string; @@ -141,37 +129,27 @@ export type PagerDutyIncident = { created_at: string; }; -// Warning: (ae-missing-release-tag) "PagerDutyIncidentsResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyIncidentsResponse = { incidents: PagerDutyIncident[]; }; -// Warning: (ae-missing-release-tag) "PagerDutyOnCall" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyOnCall = { user: PagerDutyUser; escalation_level: number; }; -// Warning: (ae-missing-release-tag) "PagerDutyOnCallsResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyOnCallsResponse = { oncalls: PagerDutyOnCall[]; }; -// Warning: (ae-missing-release-tag) "pagerDutyPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const pagerDutyPlugin: BackstagePlugin<{}, {}, {}>; export { pagerDutyPlugin }; export { pagerDutyPlugin as plugin }; -// Warning: (ae-missing-release-tag) "PagerDutyService" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyService = { id: string; @@ -185,15 +163,11 @@ export type PagerDutyService = { }; }; -// Warning: (ae-missing-release-tag) "PagerDutyServiceResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyServiceResponse = { service: PagerDutyService; }; -// Warning: (ae-missing-release-tag) "PagerDutyTriggerAlarmRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyTriggerAlarmRequest = { integrationKey: string; @@ -202,8 +176,6 @@ export type PagerDutyTriggerAlarmRequest = { userName: string; }; -// Warning: (ae-missing-release-tag) "PagerDutyUser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PagerDutyUser = { id: string; @@ -213,14 +185,9 @@ export type PagerDutyUser = { name: string; }; -// Warning: (ae-forgotten-export) The symbol "TriggerButtonProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "TriggerButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export function TriggerButton(props: TriggerButtonProps): JSX.Element; +export function TriggerButton(props: { children?: ReactNode }): JSX.Element; -// Warning: (ae-missing-release-tag) "UnauthorizedError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class UnauthorizedError extends Error {} ``` diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 367bcdc40a..714b67d879 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.5.1", + "version": "0.5.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,10 +35,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,17 +53,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/pagerduty/src/api/client.ts b/plugins/pagerduty/src/api/client.ts index 69a702f66d..7266d5e9eb 100644 --- a/plugins/pagerduty/src/api/client.ts +++ b/plugins/pagerduty/src/api/client.ts @@ -31,8 +31,10 @@ import { NotFoundError } from '@backstage/errors'; import { Entity } from '@backstage/catalog-model'; import { getPagerDutyEntity } from '../components/pagerDutyEntity'; +/** @public */ export class UnauthorizedError extends Error {} +/** @public */ export const pagerDutyApiRef = createApiRef({ id: 'plugin.pagerduty.api', }); @@ -40,11 +42,14 @@ export const pagerDutyApiRef = createApiRef({ const commonGetServiceParams = 'time_zone=UTC&include[]=integrations&include[]=escalation_policies'; +/** @public */ export class PagerDutyClient implements PagerDutyApi { static fromConfig( configApi: ConfigApi, - { discoveryApi, fetchApi }: PagerDutyClientApiDependencies, + dependencies: PagerDutyClientApiDependencies, ) { + const { discoveryApi, fetchApi } = dependencies; + const eventsBaseUrl: string = configApi.getOptionalString('pagerDuty.eventsBaseUrl') ?? 'https://events.pagerduty.com/v2'; @@ -55,6 +60,7 @@ export class PagerDutyClient implements PagerDutyApi { fetchApi, }); } + constructor(private readonly config: PagerDutyClientApiConfig) {} async getServiceByEntity(entity: Entity): Promise { diff --git a/plugins/pagerduty/src/api/index.ts b/plugins/pagerduty/src/api/index.ts index 9a0c08973d..031920fa62 100644 --- a/plugins/pagerduty/src/api/index.ts +++ b/plugins/pagerduty/src/api/index.ts @@ -16,6 +16,7 @@ export { PagerDutyClient, pagerDutyApiRef, UnauthorizedError } from './client'; export type { + PagerDutyApi, PagerDutyServiceResponse, PagerDutyIncidentsResponse, PagerDutyChangeEventsResponse, diff --git a/plugins/pagerduty/src/api/types.ts b/plugins/pagerduty/src/api/types.ts index 786b0bdffd..f1971d53d5 100644 --- a/plugins/pagerduty/src/api/types.ts +++ b/plugins/pagerduty/src/api/types.ts @@ -27,22 +27,27 @@ export type PagerDutyServicesResponse = { services: PagerDutyService[]; }; +/** @public */ export type PagerDutyServiceResponse = { service: PagerDutyService; }; +/** @public */ export type PagerDutyIncidentsResponse = { incidents: PagerDutyIncident[]; }; +/** @public */ export type PagerDutyChangeEventsResponse = { change_events: PagerDutyChangeEvent[]; }; +/** @public */ export type PagerDutyOnCallsResponse = { oncalls: PagerDutyOnCall[]; }; +/** @public */ export type PagerDutyTriggerAlarmRequest = { integrationKey: string; source: string; @@ -50,6 +55,7 @@ export type PagerDutyTriggerAlarmRequest = { userName: string; }; +/** @public */ export interface PagerDutyApi { /** * Fetches the service for the provided Entity. @@ -85,11 +91,13 @@ export interface PagerDutyApi { triggerAlarm(request: PagerDutyTriggerAlarmRequest): Promise; } +/** @public */ export type PagerDutyClientApiDependencies = { discoveryApi: DiscoveryApi; fetchApi: FetchApi; }; +/** @public */ export type PagerDutyClientApiConfig = PagerDutyClientApiDependencies & { eventsBaseUrl?: string; }; diff --git a/plugins/pagerduty/src/components/PagerDutyCard/index.tsx b/plugins/pagerduty/src/components/PagerDutyCard/index.tsx index e8ba2c522c..15967fae01 100644 --- a/plugins/pagerduty/src/components/PagerDutyCard/index.tsx +++ b/plugins/pagerduty/src/components/PagerDutyCard/index.tsx @@ -46,12 +46,14 @@ const BasicCard = ({ children }: { children: ReactNode }) => ( {children} ); +/** @public */ export const isPluginApplicableToEntity = (entity: Entity) => Boolean( entity.metadata.annotations?.[PAGERDUTY_INTEGRATION_KEY] || entity.metadata.annotations?.[PAGERDUTY_SERVICE_ID], ); +/** @public */ export const PagerDutyCard = () => { const { entity } = useEntity(); const pagerDutyEntity = getPagerDutyEntity(entity); diff --git a/plugins/pagerduty/src/components/TriggerButton/index.tsx b/plugins/pagerduty/src/components/TriggerButton/index.tsx index 6f83effcf4..732298c6d8 100644 --- a/plugins/pagerduty/src/components/TriggerButton/index.tsx +++ b/plugins/pagerduty/src/components/TriggerButton/index.tsx @@ -20,10 +20,6 @@ import { BackstageTheme } from '@backstage/theme'; import { usePagerdutyEntity } from '../../hooks'; import { TriggerDialog } from '../TriggerDialog'; -export type TriggerButtonProps = { - children?: ReactNode; -}; - const useStyles = makeStyles(theme => ({ buttonStyle: { backgroundColor: theme.palette.error.main, @@ -34,7 +30,8 @@ const useStyles = makeStyles(theme => ({ }, })); -export function TriggerButton(props: TriggerButtonProps) { +/** @public */ +export function TriggerButton(props: { children?: ReactNode }) { const { buttonStyle } = useStyles(); const { integrationKey } = usePagerdutyEntity(); const [dialogShown, setDialogShown] = useState(false); diff --git a/plugins/pagerduty/src/components/types.ts b/plugins/pagerduty/src/components/types.ts index 89cdffea16..156b5c9b9d 100644 --- a/plugins/pagerduty/src/components/types.ts +++ b/plugins/pagerduty/src/components/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type PagerDutyChangeEvent = { id: string; integration: [ @@ -33,6 +34,7 @@ export type PagerDutyChangeEvent = { timestamp: string; }; +/** @public */ export type PagerDutyIncident = { id: string; title: string; @@ -47,6 +49,7 @@ export type PagerDutyIncident = { created_at: string; }; +/** @public */ export type PagerDutyService = { id: string; name: string; @@ -59,17 +62,20 @@ export type PagerDutyService = { }; }; +/** @public */ export type PagerDutyOnCall = { user: PagerDutyUser; escalation_level: number; }; +/** @public */ export type PagerDutyAssignee = { id: string; summary: string; html_url: string; }; +/** @public */ export type PagerDutyUser = { id: string; summary: string; @@ -78,6 +84,7 @@ export type PagerDutyUser = { name: string; }; +/** @public */ export type SubHeaderLink = { title: string; href?: string; diff --git a/plugins/pagerduty/src/plugin.ts b/plugins/pagerduty/src/plugin.ts index d49de29416..73e7e0b397 100644 --- a/plugins/pagerduty/src/plugin.ts +++ b/plugins/pagerduty/src/plugin.ts @@ -28,6 +28,7 @@ export const rootRouteRef = createRouteRef({ id: 'pagerduty', }); +/** @public */ export const pagerDutyPlugin = createPlugin({ id: 'pagerduty', apis: [ @@ -44,6 +45,7 @@ export const pagerDutyPlugin = createPlugin({ ], }); +/** @public */ export const EntityPagerDutyCard = pagerDutyPlugin.provide( createComponentExtension({ name: 'EntityPagerDutyCard', diff --git a/plugins/pagerduty/src/types.ts b/plugins/pagerduty/src/types.ts index 07f7f2bbe3..9f38b429ef 100644 --- a/plugins/pagerduty/src/types.ts +++ b/plugins/pagerduty/src/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type PagerDutyEntity = { integrationKey?: string; serviceId?: string; diff --git a/plugins/periskop-backend/CHANGELOG.md b/plugins/periskop-backend/CHANGELOG.md index 3652e42d0a..86f3d6fafc 100644 --- a/plugins/periskop-backend/CHANGELOG.md +++ b/plugins/periskop-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-periskop-backend +## 0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index bdbf7f8e62..a52eefdf35 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop-backend", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,7 +24,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@types/express": "*", "cross-fetch": "^3.0.6", @@ -35,9 +35,9 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.6" }, "files": [ diff --git a/plugins/periskop/CHANGELOG.md b/plugins/periskop/CHANGELOG.md index 261af5f7f7..10583824d2 100644 --- a/plugins/periskop/CHANGELOG.md +++ b/plugins/periskop/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-periskop +## 0.1.7-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index e3137741ef..6c15d694ec 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,10 +26,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,10 +42,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -53,7 +53,7 @@ "@types/luxon": "^3.0.0", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 45c37afe27..1ca613259b 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-permission-backend +## 0.5.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + ## 0.5.10 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index a529c87439..114f115e67 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.5.10", + "version": "0.5.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,12 +22,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-node": "^0.6.4", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-node": "^0.6.5-next.0", "@types/express": "*", "dataloader": "^2.0.0", "express": "^4.17.1", @@ -39,11 +39,11 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/lodash": "^4.14.151", "@types/supertest": "^2.0.8", "supertest": "^6.1.6", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/permission-common/CHANGELOG.md b/plugins/permission-common/CHANGELOG.md index 0adc62a332..91b6e41005 100644 --- a/plugins/permission-common/CHANGELOG.md +++ b/plugins/permission-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-permission-common +## 0.6.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. + ## 0.6.3 ### Patch Changes diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index 2ae26ad6f9..c9667ec620 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-common", "description": "Isomorphic types and client for Backstage permissions and authorization", - "version": "0.6.3", + "version": "0.6.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { @@ -48,8 +48,8 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7", - "msw": "^0.44.0" + "msw": "^0.45.0" } } diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 924cb098ce..848252cf28 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-node +## 0.6.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + ## 0.6.4 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 980a600020..150a9aabdf 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.6.4", + "version": "0.6.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,20 +33,20 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", - "@backstage/plugin-permission-common": "^0.6.3", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/permission-react/CHANGELOG.md b/plugins/permission-react/CHANGELOG.md index 3215aa7b90..b137655708 100644 --- a/plugins/permission-react/CHANGELOG.md +++ b/plugins/permission-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-permission-react +## 0.4.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + ## 0.4.4 ### Patch Changes diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index c0a7084f4b..86b7f5297d 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-react", - "version": "0.4.4", + "version": "0.4.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,8 +32,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", "cross-fetch": "^3.1.5", "react-router": "6.0.0-beta.0", "react-use": "^17.2.4", @@ -44,8 +44,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@types/jest": "^26.0.7" diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index c80a754839..d3ad7c192f 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-proxy-backend +## 0.2.30-next.0 + +### Patch Changes + +- f6be17460d: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.2.29 ### Patch Changes diff --git a/plugins/proxy-backend/api-report.md b/plugins/proxy-backend/api-report.md index 45ef63f4d9..b6497adbaf 100644 --- a/plugins/proxy-backend/api-report.md +++ b/plugins/proxy-backend/api-report.md @@ -8,9 +8,18 @@ import express from 'express'; import { Logger } from 'winston'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; -// Warning: (ae-forgotten-export) The symbol "RouterOptions" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; + +// @public (undocumented) +export interface RouterOptions { + // (undocumented) + config: Config; + // (undocumented) + discovery: PluginEndpointDiscovery; + // (undocumented) + logger: Logger; + // (undocumented) + skipInvalidProxies?: boolean; +} ``` diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 3b6c732a57..8c5ec006a1 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-proxy-backend", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", - "version": "0.2.29", + "version": "0.2.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,7 +32,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -46,12 +46,12 @@ "yup": "^0.32.9" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", "@types/yup": "^0.29.13", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/proxy-backend/src/service/index.ts b/plugins/proxy-backend/src/service/index.ts index d87e53b5c1..31d50951fd 100644 --- a/plugins/proxy-backend/src/service/index.ts +++ b/plugins/proxy-backend/src/service/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +export type { RouterOptions } from './router'; export { createRouter } from './router'; diff --git a/plugins/proxy-backend/src/service/router.ts b/plugins/proxy-backend/src/service/router.ts index e0910da145..b7ee7014bc 100644 --- a/plugins/proxy-backend/src/service/router.ts +++ b/plugins/proxy-backend/src/service/router.ts @@ -47,6 +47,7 @@ const safeForwardHeaders = [ 'user-agent', ]; +/** @public */ export interface RouterOptions { logger: Logger; config: Config; @@ -177,6 +178,7 @@ export function buildMiddleware( return createProxyMiddleware(filter, fullConfig); } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index 3e61d541a4..cb28aeb015 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar-backend +## 0.1.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.1.32 ### Patch Changes diff --git a/plugins/rollbar-backend/api-report.md b/plugins/rollbar-backend/api-report.md index 1c0800a393..58a5fb0252 100644 --- a/plugins/rollbar-backend/api-report.md +++ b/plugins/rollbar-backend/api-report.md @@ -7,13 +7,9 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; -// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function createRouter(options: RouterOptions): Promise; -// Warning: (ae-missing-release-tag) "getRequestHeaders" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export function getRequestHeaders(token: string): { headers: { @@ -21,8 +17,6 @@ export function getRequestHeaders(token: string): { }; }; -// Warning: (ae-missing-release-tag) "RollbarApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class RollbarApi { constructor(accessToken: string, logger: Logger); @@ -100,8 +94,168 @@ export class RollbarApi { >; } -// Warning: (ae-missing-release-tag) "RouterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type RollbarEnvironment = 'production' | string; + +// @public (undocumented) +export enum RollbarFrameworkId { + // (undocumented) + 'browser-js' = 7, + // (undocumented) + 'node-js' = 4, + // (undocumented) + 'rollbar-system' = 8, + // (undocumented) + 'android' = 9, + // (undocumented) + 'celery' = 17, + // (undocumented) + 'django' = 2, + // (undocumented) + 'flask' = 16, + // (undocumented) + 'ios' = 10, + // (undocumented) + 'logentries' = 12, + // (undocumented) + 'mailgun' = 11, + // (undocumented) + 'php' = 6, + // (undocumented) + 'pylons' = 5, + // (undocumented) + 'pyramid' = 3, + // (undocumented) + 'python' = 13, + // (undocumented) + 'rails' = 1, + // (undocumented) + 'rq' = 18, + // (undocumented) + 'ruby' = 14, + // (undocumented) + 'sidekiq' = 15, + // (undocumented) + 'unknown' = 0, +} + +// @public (undocumented) +export type RollbarItem = { + publicItemId: number; + integrationsData: null; + levelLock: number; + controllingId: number; + lastActivatedTimestamp: number; + assignedUserId: number; + groupStatus: number; + hash: string; + id: number; + environment: RollbarEnvironment; + titleLock: number; + title: string; + lastOccurrenceId: number; + lastOccurrenceTimestamp: number; + platform: RollbarPlatformId; + firstOccurrenceTimestamp: number; + project_id: number; + resolvedInVersion: string; + status: 'enabled' | string; + uniqueOccurrences: number; + groupItemId: number; + framework: RollbarFrameworkId; + totalOccurrences: number; + level: RollbarLevel; + counter: number; + lastModifiedBy: number; + firstOccurrenceId: number; + activatingOccurrenceId: number; + lastResolvedTimestamp: number; +}; + +// @public (undocumented) +export type RollbarItemCount = { + timestamp: number; + count: number; +}; + +// @public (undocumented) +export type RollbarItemsResponse = { + items: RollbarItem[]; + page: number; + totalCount: number; +}; + +// @public (undocumented) +export enum RollbarLevel { + // (undocumented) + critical = 50, + // (undocumented) + debug = 10, + // (undocumented) + error = 40, + // (undocumented) + info = 20, + // (undocumented) + warning = 30, +} + +// @public (undocumented) +export enum RollbarPlatformId { + // (undocumented) + 'google-app-engine' = 6, + // (undocumented) + 'android' = 3, + // (undocumented) + 'browser' = 1, + // (undocumented) + 'client' = 7, + // (undocumented) + 'flash' = 2, + // (undocumented) + 'heroku' = 5, + // (undocumented) + 'ios' = 4, + // (undocumented) + 'unknown' = 0, +} + +// @public (undocumented) +export type RollbarProject = { + id: number; + name: string; + accountId: number; + status: 'enabled' | string; +}; + +// @public (undocumented) +export type RollbarProjectAccessToken = { + projectId: number; + name: string; + scopes: RollbarProjectAccessTokenScope[]; + accessToken: string; + status: 'enabled' | string; +}; + +// @public (undocumented) +export type RollbarProjectAccessTokenScope = 'read' | 'write'; + +// @public (undocumented) +export type RollbarTopActiveItem = { + item: { + id: number; + counter: number; + environment: RollbarEnvironment; + framework: RollbarFrameworkId; + lastOccurrenceTimestamp: number; + level: number; + occurrences: number; + projectId: number; + title: string; + uniqueOccurrences: number; + }; + counts: number[]; +}; + // @public (undocumented) export interface RouterOptions { // (undocumented) @@ -111,9 +265,4 @@ export interface RouterOptions { // (undocumented) rollbarApi?: RollbarApi; } - -// Warnings were encountered during analysis: -// -// src/api/RollbarApi.d.ts:21:9 - (ae-forgotten-export) The symbol "RollbarItem" needs to be exported by the entry point index.d.ts -// src/api/RollbarApi.d.ts:32:13 - (ae-forgotten-export) The symbol "RollbarFrameworkId" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 449ff72536..99fd5d81e8 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar-backend", "description": "A Backstage backend plugin that integrates towards Rollbar", - "version": "0.1.32", + "version": "0.1.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,7 +34,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@types/express": "^4.17.6", "camelcase-keys": "^7.0.1", @@ -50,10 +50,10 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/rollbar-backend/src/api/RollbarApi.ts b/plugins/rollbar-backend/src/api/RollbarApi.ts index 245164b531..59394d7ad0 100644 --- a/plugins/rollbar-backend/src/api/RollbarApi.ts +++ b/plugins/rollbar-backend/src/api/RollbarApi.ts @@ -30,6 +30,7 @@ const baseUrl = 'https://api.rollbar.com/api/1'; const buildUrl = (url: string) => `${baseUrl}${url}`; +/** @public */ export class RollbarApi { private projectMap: ProjectMetadataMap | undefined; @@ -165,6 +166,7 @@ export class RollbarApi { } } +/** @public */ export function getRequestHeaders(token: string) { return { headers: { diff --git a/plugins/rollbar-backend/src/api/index.ts b/plugins/rollbar-backend/src/api/index.ts index a2ce96e16a..08d6c4b061 100644 --- a/plugins/rollbar-backend/src/api/index.ts +++ b/plugins/rollbar-backend/src/api/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ -export { RollbarApi, getRequestHeaders } from './RollbarApi'; +export { getRequestHeaders, RollbarApi } from './RollbarApi'; +export * from './types'; diff --git a/plugins/rollbar-backend/src/api/types.ts b/plugins/rollbar-backend/src/api/types.ts index 1133f84b67..a1a6202656 100644 --- a/plugins/rollbar-backend/src/api/types.ts +++ b/plugins/rollbar-backend/src/api/types.ts @@ -16,9 +16,13 @@ // TODO: Make this re-usable with backend +/** @public */ export type RollbarProjectAccessTokenScope = 'read' | 'write'; + +/** @public */ export type RollbarEnvironment = 'production' | string; +/** @public */ export enum RollbarLevel { debug = 10, info = 20, @@ -27,6 +31,7 @@ export enum RollbarLevel { critical = 50, } +/** @public */ export enum RollbarFrameworkId { 'unknown' = 0, 'rails' = 1, @@ -49,6 +54,7 @@ export enum RollbarFrameworkId { 'rq' = 18, } +/** @public */ export enum RollbarPlatformId { 'unknown' = 0, 'browser' = 1, @@ -60,6 +66,7 @@ export enum RollbarPlatformId { 'client' = 7, } +/** @public */ export type RollbarProject = { id: number; name: string; @@ -67,6 +74,7 @@ export type RollbarProject = { status: 'enabled' | string; }; +/** @public */ export type RollbarProjectAccessToken = { projectId: number; name: string; @@ -75,6 +83,7 @@ export type RollbarProjectAccessToken = { status: 'enabled' | string; }; +/** @public */ export type RollbarItem = { publicItemId: number; integrationsData: null; @@ -107,17 +116,20 @@ export type RollbarItem = { lastResolvedTimestamp: number; }; +/** @public */ export type RollbarItemsResponse = { items: RollbarItem[]; page: number; totalCount: number; }; +/** @public */ export type RollbarItemCount = { timestamp: number; count: number; }; +/** @public */ export type RollbarTopActiveItem = { item: { id: number; diff --git a/plugins/rollbar-backend/src/service/router.ts b/plugins/rollbar-backend/src/service/router.ts index 6d578af29f..a5646fdf06 100644 --- a/plugins/rollbar-backend/src/service/router.ts +++ b/plugins/rollbar-backend/src/service/router.ts @@ -21,12 +21,14 @@ import { errorHandler } from '@backstage/backend-common'; import { Config } from '@backstage/config'; import { RollbarApi } from '../api'; +/** @public */ export interface RouterOptions { rollbarApi?: RollbarApi; logger: Logger; config: Config; } +/** @public */ export async function createRouter( options: RouterOptions, ): Promise { diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index de7caae47d..cd9f73bfe0 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-rollbar +## 0.4.9-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.4.8 ### Patch Changes diff --git a/plugins/rollbar/api-report.md b/plugins/rollbar/api-report.md index 27f0e4641b..5ee8a50ce3 100644 --- a/plugins/rollbar/api-report.md +++ b/plugins/rollbar/api-report.md @@ -12,44 +12,28 @@ import { Entity } from '@backstage/catalog-model'; import { IdentityApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityPageRollbar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const EntityPageRollbar: () => JSX.Element; -// Warning: (ae-missing-release-tag) "EntityRollbarContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntityRollbarContent: (_props: {}) => JSX.Element; +export const EntityRollbarContent: () => JSX.Element; -// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const isPluginApplicableToEntity: (entity: Entity) => boolean; export { isPluginApplicableToEntity }; export { isPluginApplicableToEntity as isRollbarAvailable }; -// Warning: (ae-missing-release-tag) "ROLLBAR_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ROLLBAR_ANNOTATION = 'rollbar.com/project-slug'; -// Warning: (ae-missing-release-tag) "RollbarApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RollbarApi { - // Warning: (ae-forgotten-export) The symbol "RollbarProject" needs to be exported by the entry point index.d.ts - // // (undocumented) getAllProjects(): Promise; // (undocumented) getProject(projectName: string): Promise; - // Warning: (ae-forgotten-export) The symbol "RollbarItemsResponse" needs to be exported by the entry point index.d.ts - // // (undocumented) getProjectItems(project: string): Promise; - // Warning: (ae-forgotten-export) The symbol "RollbarTopActiveItem" needs to be exported by the entry point index.d.ts - // // (undocumented) getTopActiveItems( project: string, @@ -57,13 +41,9 @@ export interface RollbarApi { ): Promise; } -// Warning: (ae-missing-release-tag) "rollbarApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const rollbarApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "RollbarClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class RollbarClient implements RollbarApi { constructor(options: { @@ -84,8 +64,131 @@ export class RollbarClient implements RollbarApi { ): Promise; } -// Warning: (ae-missing-release-tag) "rollbarPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type RollbarEnvironment = 'production' | string; + +// @public (undocumented) +export enum RollbarFrameworkId { + // (undocumented) + 'browser-js' = 7, + // (undocumented) + 'node-js' = 4, + // (undocumented) + 'rollbar-system' = 8, + // (undocumented) + 'android' = 9, + // (undocumented) + 'celery' = 17, + // (undocumented) + 'django' = 2, + // (undocumented) + 'flask' = 16, + // (undocumented) + 'ios' = 10, + // (undocumented) + 'logentries' = 12, + // (undocumented) + 'mailgun' = 11, + // (undocumented) + 'php' = 6, + // (undocumented) + 'pylons' = 5, + // (undocumented) + 'pyramid' = 3, + // (undocumented) + 'python' = 13, + // (undocumented) + 'rails' = 1, + // (undocumented) + 'rq' = 18, + // (undocumented) + 'ruby' = 14, + // (undocumented) + 'sidekiq' = 15, + // (undocumented) + 'unknown' = 0, +} + +// @public (undocumented) +export type RollbarItem = { + publicItemId: number; + integrationsData: null; + levelLock: number; + controllingId: number; + lastActivatedTimestamp: number; + assignedUserId: number; + groupStatus: number; + hash: string; + id: number; + environment: RollbarEnvironment; + titleLock: number; + title: string; + lastOccurrenceId: number; + lastOccurrenceTimestamp: number; + platform: RollbarPlatformId; + firstOccurrenceTimestamp: number; + project_id: number; + resolvedInVersion: string; + status: 'enabled' | string; + uniqueOccurrences: number; + groupItemId: number; + framework: RollbarFrameworkId; + totalOccurrences: number; + level: RollbarLevel; + counter: number; + lastModifiedBy: number; + firstOccurrenceId: number; + activatingOccurrenceId: number; + lastResolvedTimestamp: number; +}; + +// @public (undocumented) +export type RollbarItemCount = { + timestamp: number; + count: number; +}; + +// @public (undocumented) +export type RollbarItemsResponse = { + items: RollbarItem[]; + page: number; + totalCount: number; +}; + +// @public (undocumented) +export enum RollbarLevel { + // (undocumented) + critical = 50, + // (undocumented) + debug = 10, + // (undocumented) + error = 40, + // (undocumented) + info = 20, + // (undocumented) + warning = 30, +} + +// @public (undocumented) +export enum RollbarPlatformId { + // (undocumented) + 'google-app-engine' = 6, + // (undocumented) + 'android' = 3, + // (undocumented) + 'browser' = 1, + // (undocumented) + 'client' = 7, + // (undocumented) + 'flash' = 2, + // (undocumented) + 'heroku' = 5, + // (undocumented) + 'ios' = 4, + // (undocumented) + 'unknown' = 0, +} + // @public (undocumented) const rollbarPlugin: BackstagePlugin< { @@ -97,9 +200,43 @@ const rollbarPlugin: BackstagePlugin< export { rollbarPlugin as plugin }; export { rollbarPlugin }; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Router: (_props: Props) => JSX.Element; +export type RollbarProject = { + id: number; + name: string; + accountId: number; + status: 'enabled' | string; +}; + +// @public (undocumented) +export type RollbarProjectAccessToken = { + projectId: number; + name: string; + scopes: RollbarProjectAccessTokenScope[]; + accessToken: string; + status: 'enabled' | string; +}; + +// @public (undocumented) +export type RollbarProjectAccessTokenScope = 'read' | 'write'; + +// @public (undocumented) +export type RollbarTopActiveItem = { + item: { + id: number; + counter: number; + environment: RollbarEnvironment; + framework: RollbarFrameworkId; + lastOccurrenceTimestamp: number; + level: number; + occurrences: number; + projectId: number; + title: string; + uniqueOccurrences: number; + }; + counts: number[]; +}; + +// @public (undocumented) +export const Router: () => JSX.Element; ``` diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 0928e90778..d31dd16bcb 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.4.8", + "version": "0.4.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,9 +36,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -65,7 +65,7 @@ "@types/node": "^16.11.26", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/rollbar/src/api/RollbarApi.ts b/plugins/rollbar/src/api/RollbarApi.ts index 3da52338ec..d5d6fe6aca 100644 --- a/plugins/rollbar/src/api/RollbarApi.ts +++ b/plugins/rollbar/src/api/RollbarApi.ts @@ -21,10 +21,12 @@ import { } from './types'; import { createApiRef } from '@backstage/core-plugin-api'; +/** @public */ export const rollbarApiRef = createApiRef({ id: 'plugin.rollbar.service', }); +/** @public */ export interface RollbarApi { getAllProjects(): Promise; getProject(projectName: string): Promise; diff --git a/plugins/rollbar/src/api/RollbarClient.ts b/plugins/rollbar/src/api/RollbarClient.ts index b87a6c8cc8..71c9f74ff0 100644 --- a/plugins/rollbar/src/api/RollbarClient.ts +++ b/plugins/rollbar/src/api/RollbarClient.ts @@ -22,6 +22,7 @@ import { } from './types'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; +/** @public */ export class RollbarClient implements RollbarApi { private readonly discoveryApi: DiscoveryApi; private readonly identityApi: IdentityApi; diff --git a/plugins/rollbar/src/api/index.ts b/plugins/rollbar/src/api/index.ts index 56c23f07dd..882024f90f 100644 --- a/plugins/rollbar/src/api/index.ts +++ b/plugins/rollbar/src/api/index.ts @@ -16,3 +16,4 @@ export * from './RollbarApi'; export * from './RollbarClient'; +export * from './types'; diff --git a/plugins/rollbar/src/api/types.ts b/plugins/rollbar/src/api/types.ts index 549bdbbbb7..0a8f718a26 100644 --- a/plugins/rollbar/src/api/types.ts +++ b/plugins/rollbar/src/api/types.ts @@ -16,9 +16,13 @@ // TODO: Make this shared/dry with backend +/** @public */ export type RollbarProjectAccessTokenScope = 'read' | 'write'; + +/** @public */ export type RollbarEnvironment = 'production' | string; +/** @public */ export enum RollbarLevel { debug = 10, info = 20, @@ -27,6 +31,7 @@ export enum RollbarLevel { critical = 50, } +/** @public */ export enum RollbarFrameworkId { 'unknown' = 0, 'rails' = 1, @@ -49,6 +54,7 @@ export enum RollbarFrameworkId { 'rq' = 18, } +/** @public */ export enum RollbarPlatformId { 'unknown' = 0, 'browser' = 1, @@ -60,6 +66,7 @@ export enum RollbarPlatformId { 'client' = 7, } +/** @public */ export type RollbarProject = { id: number; name: string; @@ -67,6 +74,7 @@ export type RollbarProject = { status: 'enabled' | string; }; +/** @public */ export type RollbarProjectAccessToken = { projectId: number; name: string; @@ -75,6 +83,7 @@ export type RollbarProjectAccessToken = { status: 'enabled' | string; }; +/** @public */ export type RollbarItem = { publicItemId: number; integrationsData: null; @@ -107,17 +116,20 @@ export type RollbarItem = { lastResolvedTimestamp: number; }; +/** @public */ export type RollbarItemsResponse = { items: RollbarItem[]; page: number; totalCount: number; }; +/** @public */ export type RollbarItemCount = { timestamp: number; count: number; }; +/** @public */ export type RollbarTopActiveItem = { item: { id: number; diff --git a/plugins/rollbar/src/components/EntityPageRollbar/EntityPageRollbar.tsx b/plugins/rollbar/src/components/EntityPageRollbar/EntityPageRollbar.tsx index 626b3442e5..cde396674e 100644 --- a/plugins/rollbar/src/components/EntityPageRollbar/EntityPageRollbar.tsx +++ b/plugins/rollbar/src/components/EntityPageRollbar/EntityPageRollbar.tsx @@ -18,6 +18,7 @@ import { useEntity } from '@backstage/plugin-catalog-react'; import React from 'react'; import { RollbarProject } from '../RollbarProject/RollbarProject'; +/** @public */ export const EntityPageRollbar = () => { const { entity } = useEntity(); diff --git a/plugins/rollbar/src/components/Router.tsx b/plugins/rollbar/src/components/Router.tsx index a11acb379c..9cd63e74aa 100644 --- a/plugins/rollbar/src/components/Router.tsx +++ b/plugins/rollbar/src/components/Router.tsx @@ -22,12 +22,12 @@ import { ROLLBAR_ANNOTATION } from '../constants'; import { EntityPageRollbar } from './EntityPageRollbar/EntityPageRollbar'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; +/** @public */ export const isPluginApplicableToEntity = (entity: Entity) => Boolean(entity.metadata.annotations?.[ROLLBAR_ANNOTATION]); -type Props = {}; - -export const Router = (_props: Props) => { +/** @public */ +export const Router = () => { const { entity } = useEntity(); if (!isPluginApplicableToEntity(entity)) { diff --git a/plugins/rollbar/src/constants.ts b/plugins/rollbar/src/constants.ts index 8697c3239f..42031ddcef 100644 --- a/plugins/rollbar/src/constants.ts +++ b/plugins/rollbar/src/constants.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +/** @public */ export const ROLLBAR_ANNOTATION = 'rollbar.com/project-slug'; diff --git a/plugins/rollbar/src/plugin.ts b/plugins/rollbar/src/plugin.ts index 3ca456058f..de3dd38b1a 100644 --- a/plugins/rollbar/src/plugin.ts +++ b/plugins/rollbar/src/plugin.ts @@ -29,6 +29,7 @@ export const rootRouteRef = createRouteRef({ id: 'rollbar', }); +/** @public */ export const rollbarPlugin = createPlugin({ id: 'rollbar', apis: [ @@ -44,6 +45,7 @@ export const rollbarPlugin = createPlugin({ }, }); +/** @public */ export const EntityRollbarContent = rollbarPlugin.provide( createRoutableExtension({ name: 'EntityRollbarContent', diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index 509e2025a7..e5f6fedf6a 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.11-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.2.10 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index aeb8a42df6..94f5233fca 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.2.10", + "version": "0.2.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,10 +23,10 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-scaffolder-backend": "^1.5.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-scaffolder-backend": "^1.6.0-next.0", "@backstage/config": "^1.0.1", "@backstage/types": "^1.0.0", "command-exists": "^1.2.9", @@ -35,13 +35,13 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/fs-extra": "^9.0.1", "@types/mock-fs": "^4.13.0", "@types/jest": "^26.0.7", "@types/command-exists": "^1.2.0", "mock-fs": "^5.1.0", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts b/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts index 8c501cf8f1..3b235b9650 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts +++ b/plugins/scaffolder-backend-module-cookiecutter/src/actions/fetch/cookiecutter.test.ts @@ -13,16 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -const executeShellCommand = jest.fn(); -const commandExists = jest.fn(); -const fetchContents = jest.fn(); - -jest.mock('@backstage/plugin-scaffolder-backend', () => ({ - ...jest.requireActual('@backstage/plugin-scaffolder-backend'), - fetchContents, - executeShellCommand, -})); -jest.mock('command-exists', () => commandExists); import { getVoidLogger, @@ -39,6 +29,23 @@ import { createFetchCookiecutterAction } from './cookiecutter'; import { join } from 'path'; import type { ActionContext } from '@backstage/plugin-scaffolder-backend'; +const executeShellCommand = jest.fn(); +const commandExists = jest.fn(); +const fetchContents = jest.fn(); + +jest.mock('@backstage/plugin-scaffolder-backend', () => ({ + ...jest.requireActual('@backstage/plugin-scaffolder-backend'), + fetchContents: (...args: any[]) => fetchContents(...args), + executeShellCommand: (...args: any[]) => executeShellCommand(...args), +})); + +jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), +); + describe('fetch:cookiecutter', () => { const integrations = ScmIntegrations.fromConfig( new ConfigReader({ diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 64f782e243..15930b6b1d 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + - @backstage/integration@1.3.1-next.0 + ## 0.4.3 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 5df1b902eb..79c3c4cd89 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.4.3", + "version": "0.4.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,17 +24,17 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/plugin-scaffolder-backend": "^1.5.0", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/plugin-scaffolder-backend": "^1.6.0-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", "@backstage/types": "^1.0.0", "command-exists": "^1.2.9", "fs-extra": "^10.0.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.test.ts b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.test.ts index 0767e63f29..433a1b7965 100644 --- a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.test.ts +++ b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.test.ts @@ -18,17 +18,20 @@ const executeShellCommand = jest.fn(); const commandExists = jest.fn(); jest.mock('@backstage/plugin-scaffolder-backend', () => ({ - executeShellCommand, + executeShellCommand: (...args: any[]) => executeShellCommand(...args), })); -jest.mock('command-exists', () => commandExists); +jest.mock( + 'command-exists', + () => + (...args: any[]) => + commandExists(...args), +); jest.mock('fs-extra'); import { ContainerRunner } from '@backstage/backend-common'; import fs from 'fs-extra'; - import path from 'path'; import { PassThrough } from 'stream'; - import { RailsNewRunner } from './railsNewRunner'; describe('Rails Templater', () => { diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index 21bc6b30fa..117dd2e7d0 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.2.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.6.0-next.0 + ## 0.2.8 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index ab487b72f3..01aed0c8fc 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.2.8", + "version": "0.2.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,13 +24,13 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/plugin-scaffolder-backend": "^1.5.0", + "@backstage/plugin-scaffolder-backend": "^1.6.0-next.0", "@backstage/types": "^1.0.0", "winston": "^3.2.1", "yeoman-environment": "^3.9.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@types/jest": "^26.0.7" }, "files": [ diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index c471cc82eb..609afd2c9b 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-scaffolder-backend +## 1.6.0-next.0 + +### Minor Changes + +- ea2eee9e6a: Add the option for a homepage when using the `github:publish` action +- 8872cc735d: Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options. + + To use this new implementation you need to create the instance of `DatabaseTaskStore` using the `PluginDatabaseManager` instead of `Knex`; + + ``` + import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; + import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend'; + + const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); + const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); + const databaseTaskStore = await DatabaseTaskStore.create(databaseManager); + ``` + +- 1ff817b3f0: add entity metadata to the template info type + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 2df9955f4a: Removed the depreacated `publish:file` action, use the template editor to test templates instead. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-catalog-backend@1.3.2-next.0 + - @backstage/backend-plugin-api@0.1.2-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-node@1.0.2-next.0 + ## 1.5.0 ### Minor Changes diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index df46ee53ed..c49db66aa4 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -179,6 +179,7 @@ export function createGithubRepoCreateAction(options: { }): TemplateAction<{ repoUrl: string; description?: string | undefined; + homepage?: string | undefined; access?: string | undefined; deleteBranchOnMerge?: boolean | undefined; gitAuthorName?: string | undefined; @@ -304,11 +305,6 @@ export function createPublishBitbucketServerAction(options: { token?: string | undefined; }>; -// @public @deprecated -export function createPublishFileAction(): TemplateAction<{ - path: string; -}>; - // @public export function createPublishGerritAction(options: { integrations: ScmIntegrationRegistry; @@ -344,6 +340,7 @@ export function createPublishGithubAction(options: { }): TemplateAction<{ repoUrl: string; description?: string | undefined; + homepage?: string | undefined; access?: string | undefined; defaultBranch?: string | undefined; protectDefaultBranch?: boolean | undefined; @@ -460,11 +457,7 @@ export class DatabaseTaskStore implements TaskStore { // (undocumented) claimTask(): Promise; // (undocumented) - completeTask({ - taskId, - status, - eventBody, - }: { + completeTask(options: { taskId: string; status: TaskStatus; eventBody: JsonObject; @@ -492,11 +485,11 @@ export class DatabaseTaskStore implements TaskStore { tasks: SerializedTask[]; }>; // (undocumented) - listEvents({ taskId, after }: TaskStoreListEventsOptions): Promise<{ + listEvents(options: TaskStoreListEventsOptions): Promise<{ events: SerializedTaskEvent[]; }>; // (undocumented) - listStaleTasks({ timeoutS }: { timeoutS: number }): Promise<{ + listStaleTasks(options: { timeoutS: number }): Promise<{ tasks: { taskId: string; }[]; @@ -505,20 +498,14 @@ export class DatabaseTaskStore implements TaskStore { // @public export type DatabaseTaskStoreOptions = { - database: Knex; + database: PluginDatabaseManager | Knex; }; // @public export const executeShellCommand: (options: RunCommandOptions) => Promise; // @public -export function fetchContents({ - reader, - integrations, - baseUrl, - fetchUrl, - outputPath, -}: { +export function fetchContents(options: { reader: UrlReader; integrations: ScmIntegrations; baseUrl?: string; diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index be19b43b67..b8f09ff0dc 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "1.5.0", + "version": "1.6.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,17 +35,17 @@ "build:assets": "node scripts/build-nunjucks.js" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-backend": "^1.3.1", - "@backstage/plugin-scaffolder-common": "^1.1.2", - "@backstage/plugin-auth-node": "^0.2.4-next.0", - "@backstage/backend-plugin-api": "^0.1.1", - "@backstage/plugin-catalog-node": "^1.0.1", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/plugin-catalog-backend": "^1.3.2-next.0", + "@backstage/plugin-scaffolder-common": "^1.2.0-next.0", + "@backstage/backend-plugin-api": "^0.1.2-next.0", + "@backstage/plugin-catalog-node": "^1.0.2-next.0", "@backstage/types": "^1.0.0", "@gitbeaker/core": "^35.6.0", "@gitbeaker/node": "^35.1.0", @@ -80,8 +80,8 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", @@ -92,7 +92,7 @@ "esbuild": "^0.14.1", "jest-when": "^3.1.0", "mock-fs": "^5.1.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3", "yaml": "^2.0.0" }, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.ts index a01fcee6f7..4b82595cfd 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/helpers.ts @@ -26,19 +26,15 @@ import path from 'path'; * * @public */ -export async function fetchContents({ - reader, - integrations, - baseUrl, - fetchUrl = '.', - outputPath, -}: { +export async function fetchContents(options: { reader: UrlReader; integrations: ScmIntegrations; baseUrl?: string; fetchUrl?: string; outputPath: string; }) { + const { reader, integrations, baseUrl, fetchUrl = '.', outputPath } = options; + let fetchUrlIsAbsolute = false; try { // eslint-disable-next-line no-new diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts index 0e7e907917..f04a735bee 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts @@ -129,6 +129,26 @@ describe('github:repo:create', () => { allow_rebase_merge: true, visibility: 'public', }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + homepage: 'https://example.com', + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + homepage: 'https://example.com', + name: 'repo', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + visibility: 'private', + }); }); it('should call the githubApis with the correct values for createForAuthenticatedUser', async () => { @@ -171,6 +191,26 @@ describe('github:repo:create', () => { allow_merge_commit: true, allow_rebase_merge: true, }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + homepage: 'https://example.com', + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + homepage: 'https://example.com', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + }); }); it('should add access for the team when it starts with the owner', async () => { diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts index 1e92d91a64..5bc1fa8702 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts @@ -42,6 +42,7 @@ export function createGithubRepoCreateAction(options: { return createTemplateAction<{ repoUrl: string; description?: string; + homepage?: string; access?: string; deleteBranchOnMerge?: boolean; gitAuthorName?: string; @@ -79,6 +80,7 @@ export function createGithubRepoCreateAction(options: { properties: { repoUrl: inputProps.repoUrl, description: inputProps.description, + homepage: inputProps.homepage, access: inputProps.access, requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews, requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts, @@ -104,6 +106,7 @@ export function createGithubRepoCreateAction(options: { const { repoUrl, description, + homepage, access, repoVisibility = 'private', deleteBranchOnMerge = false, @@ -135,6 +138,7 @@ export function createGithubRepoCreateAction(options: { owner, repoVisibility, description, + homepage, deleteBranchOnMerge, allowMergeCommit, allowSquashMerge, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts index b60794295a..fd3899b18a 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts @@ -97,6 +97,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics( owner: string, repoVisibility: 'private' | 'internal' | 'public', description: string | undefined, + homepage: string | undefined, deleteBranchOnMerge: boolean, allowMergeCommit: boolean, allowSquashMerge: boolean, @@ -138,6 +139,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics( allow_merge_commit: allowMergeCommit, allow_squash_merge: allowSquashMerge, allow_rebase_merge: allowRebaseMerge, + homepage: homepage, }) : client.rest.repos.createForAuthenticatedUser({ name: repo, @@ -147,6 +149,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics( allow_merge_commit: allowMergeCommit, allow_squash_merge: allowSquashMerge, allow_rebase_merge: allowRebaseMerge, + homepage: homepage, }); let newRepo; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts index b0113a4485..153b2e6941 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts @@ -23,6 +23,10 @@ const description = { title: 'Repository Description', type: 'string', }; +const homepage = { + title: 'Repository Homepage', + type: 'string', +}; const access = { title: 'Repository Access', description: `Sets an admin collaborator on the repository. Can either be a user reference different from 'owner' in 'repoUrl' or team reference, eg. 'org/team-name'`, @@ -156,6 +160,7 @@ export { description }; export { gitAuthorEmail }; export { gitAuthorName }; export { gitCommitMessage }; +export { homepage }; export { protectDefaultBranch }; export { protectEnforceAdmins }; export { repoUrl }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts deleted file mode 100644 index 52376e39a3..0000000000 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/file.ts +++ /dev/null @@ -1,65 +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 fs from 'fs-extra'; -import { dirname } from 'path'; -import { InputError } from '@backstage/errors'; -import { createTemplateAction } from '../../createTemplateAction'; - -/** - * This task is useful for local development and testing of both the scaffolder - * and scaffolder templates. - * - * @remarks - * - * This action is not installed by default and should not be installed in - * production, as it writes the files to the local filesystem of the scaffolder. - * - * @public - * @deprecated This action will be removed, prefer testing templates using the template editor instead. - */ -export function createPublishFileAction() { - return createTemplateAction<{ path: string }>({ - id: 'publish:file', - description: 'Writes contents of the workspace to a local directory', - schema: { - input: { - type: 'object', - required: ['path'], - properties: { - path: { - title: 'Path to a directory where the output will be written', - type: 'string', - }, - }, - }, - }, - async handler(ctx) { - ctx.logger.warn( - '[DEPRECATED] This action will be removed, prefer testing templates using the template editor instead.', - ); - - const { path } = ctx.input; - - const exists = await fs.pathExists(path); - if (exists) { - throw new InputError('Output path already exists'); - } - await fs.ensureDir(dirname(path)); - await fs.copy(ctx.workspacePath, path); - }, - }); -} diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts index a526e73019..6a2665bc8d 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts @@ -134,6 +134,26 @@ describe('publish:github', () => { allow_rebase_merge: true, visibility: 'public', }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + homepage: 'https://example.com', + }, + }); + expect(mockOctokit.rest.repos.createInOrg).toHaveBeenCalledWith({ + description: 'description', + name: 'repo', + homepage: 'https://example.com', + org: 'owner', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + visibility: 'private', + }); }); it('should call the githubApis with the correct values for createForAuthenticatedUser', async () => { @@ -176,6 +196,26 @@ describe('publish:github', () => { allow_merge_commit: true, allow_rebase_merge: true, }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + homepage: 'https://example.com', + }, + }); + expect( + mockOctokit.rest.repos.createForAuthenticatedUser, + ).toHaveBeenCalledWith({ + description: 'description', + homepage: 'https://example.com', + name: 'repo', + private: true, + delete_branch_on_merge: false, + allow_squash_merge: true, + allow_merge_commit: true, + allow_rebase_merge: true, + }); }); it('should call initRepoAndPush with the correct values', async () => { @@ -812,4 +852,37 @@ describe('publish:github', () => { expect(enableBranchProtectionOnDefaultRepoBranch).not.toHaveBeenCalled(); }); + + it('should add homepage when provided', async () => { + mockOctokit.rest.users.getByUsername.mockResolvedValue({ + data: { type: 'User' }, + }); + + mockOctokit.rest.repos.createForAuthenticatedUser.mockResolvedValue({ + data: { + clone_url: 'https://github.com/clone/url.git', + html_url: 'https://github.com/html/url', + }, + }); + + mockOctokit.rest.repos.replaceAllTopics.mockResolvedValue({ + data: { + names: ['node.js'], + }, + }); + + await action.handler({ + ...mockContext, + input: { + ...mockContext.input, + topics: ['node.js'], + }, + }); + + expect(mockOctokit.rest.repos.replaceAllTopics).toHaveBeenCalledWith({ + owner: 'owner', + repo: 'repo', + names: ['node.js'], + }); + }); }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index eea006ae8f..8ce9105237 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -45,6 +45,7 @@ export function createPublishGithubAction(options: { return createTemplateAction<{ repoUrl: string; description?: string; + homepage?: string; access?: string; defaultBranch?: string; protectDefaultBranch?: boolean; @@ -88,6 +89,7 @@ export function createPublishGithubAction(options: { properties: { repoUrl: inputProps.repoUrl, description: inputProps.description, + homepage: inputProps.homepage, access: inputProps.access, requireCodeOwnerReviews: inputProps.requireCodeOwnerReviews, requiredStatusCheckContexts: inputProps.requiredStatusCheckContexts, @@ -120,6 +122,7 @@ export function createPublishGithubAction(options: { const { repoUrl, description, + homepage, access, requireCodeOwnerReviews = false, requiredStatusCheckContexts = [], @@ -159,6 +162,7 @@ export function createPublishGithubAction(options: { owner, repoVisibility, description, + homepage, deleteBranchOnMerge, allowMergeCommit, allowSquashMerge, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/index.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/index.ts index 8819c93d08..a8a40ab1df 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/index.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/index.ts @@ -18,7 +18,6 @@ export { createPublishAzureAction } from './azure'; export { createPublishBitbucketAction } from './bitbucket'; export { createPublishBitbucketCloudAction } from './bitbucketCloud'; export { createPublishBitbucketServerAction } from './bitbucketServer'; -export { createPublishFileAction } from './file'; export { createPublishGerritAction } from './gerrit'; export { createPublishGerritReviewAction } from './gerritReview'; export { createPublishGithubAction } from './github'; diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts index d62e59744f..206dc2ac1d 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts @@ -15,7 +15,10 @@ */ import { JsonObject } from '@backstage/types'; -import { resolvePackagePath } from '@backstage/backend-common'; +import { + PluginDatabaseManager, + resolvePackagePath, +} from '@backstage/backend-common'; import { ConflictError, NotFoundError } from '@backstage/errors'; import { Knex } from 'knex'; import { v4 as uuid } from 'uuid'; @@ -61,9 +64,20 @@ export type RawDbTaskEventRow = { * @public */ export type DatabaseTaskStoreOptions = { - database: Knex; + database: PluginDatabaseManager | Knex; }; +/** + * Typeguard to help DatabaseTaskStore understand when database is PluginDatabaseManager vs. when database is a Knex instance. + * + * * @public + */ +function isPluginDatabaseManager( + opt: PluginDatabaseManager | Knex, +): opt is PluginDatabaseManager { + return (opt as PluginDatabaseManager).getClient !== undefined; +} + const parseSqlDateToIsoString = (input: T): T | string => { if (typeof input === 'string') { return DateTime.fromSQL(input, { zone: 'UTC' }).toISO(); @@ -83,14 +97,45 @@ export class DatabaseTaskStore implements TaskStore { static async create( options: DatabaseTaskStoreOptions, ): Promise { - await options.database.migrate.latest({ - directory: migrationsDir, - }); - return new DatabaseTaskStore(options); + const { database } = options; + const client = await this.getClient(database); + + await this.runMigrations(database, client); + + return new DatabaseTaskStore(client); } - private constructor(options: DatabaseTaskStoreOptions) { - this.db = options.database; + private static async getClient( + database: PluginDatabaseManager | Knex, + ): Promise { + if (isPluginDatabaseManager(database)) { + return database.getClient(); + } + + return database; + } + + private static async runMigrations( + database: PluginDatabaseManager | Knex, + client: Knex, + ): Promise { + if (!isPluginDatabaseManager(database)) { + await client.migrate.latest({ + directory: migrationsDir, + }); + + return; + } + + if (!database.migrations?.skip) { + await client.migrate.latest({ + directory: migrationsDir, + }); + } + } + + private constructor(client: Knex) { + this.db = client; } async list(options: { @@ -211,9 +256,11 @@ export class DatabaseTaskStore implements TaskStore { } } - async listStaleTasks({ timeoutS }: { timeoutS: number }): Promise<{ + async listStaleTasks(options: { timeoutS: number }): Promise<{ tasks: { taskId: string }[]; }> { + const { timeoutS } = options; + const rawRows = await this.db('tasks') .where('status', 'processing') .andWhere( @@ -232,15 +279,13 @@ export class DatabaseTaskStore implements TaskStore { return { tasks }; } - async completeTask({ - taskId, - status, - eventBody, - }: { + async completeTask(options: { taskId: string; status: TaskStatus; eventBody: JsonObject; }): Promise { + const { taskId, status, eventBody } = options; + let oldStatus: string; if (status === 'failed' || status === 'completed') { oldStatus = 'processing'; @@ -301,10 +346,10 @@ export class DatabaseTaskStore implements TaskStore { }); } - async listEvents({ - taskId, - after, - }: TaskStoreListEventsOptions): Promise<{ events: SerializedTaskEvent[] }> { + async listEvents( + options: TaskStoreListEventsOptions, + ): Promise<{ events: SerializedTaskEvent[] }> { + const { taskId, after } = options; const rawEvents = await this.db('task_events') .where({ task_id: taskId, diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts index 2350072806..4fc142a991 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts @@ -32,8 +32,9 @@ async function createStore(): Promise { }, }), ).forPlugin('scaffolder'); + return await DatabaseTaskStore.create({ - database: await manager.getClient(), + database: manager, }); } diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.test.ts index e1421486f4..ee8ae400c4 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.test.ts @@ -40,7 +40,7 @@ async function createStore(): Promise { }), ).forPlugin('scaffolder'); return await DatabaseTaskStore.create({ - database: await manager.getClient(), + database: manager, }); } diff --git a/plugins/scaffolder-backend/src/service/router.test.ts b/plugins/scaffolder-backend/src/service/router.test.ts index 43dc6a8dd5..9e2c7b9265 100644 --- a/plugins/scaffolder-backend/src/service/router.test.ts +++ b/plugins/scaffolder-backend/src/service/router.test.ts @@ -14,22 +14,6 @@ * limitations under the License. */ -import { BackstageIdentityResponse } from '@backstage/plugin-auth-node'; - -const mockAccess = jest.fn(); -jest.doMock('fs-extra', () => ({ - access: mockAccess, - promises: { - access: mockAccess, - }, - constants: { - F_OK: 0, - W_OK: 1, - }, - mkdir: jest.fn(), - remove: jest.fn(), -})); - import { DatabaseManager, getVoidLogger, @@ -56,7 +40,21 @@ import { } from '@backstage/catalog-model'; import { createRouter, DatabaseTaskStore, TaskBroker } from '../index'; import { StorageTaskBroker } from '../scaffolder/tasks/StorageTaskBroker'; -import { Logger } from 'winston'; + +const mockAccess = jest.fn(); + +jest.mock('fs-extra', () => ({ + access: (...args: any[]) => mockAccess(...args), + promises: { + access: (...args: any[]) => mockAccess(...args), + }, + constants: { + F_OK: 0, + W_OK: 1, + }, + mkdir: jest.fn(), + remove: jest.fn(), +})); function createDatabase(): PluginDatabaseManager { return DatabaseManager.fromConfig( @@ -80,17 +78,6 @@ describe('createRouter', () => { let app: express.Express; let loggerSpy: jest.SpyInstance; let taskBroker: TaskBroker; - let logger: Logger; - const getIdentity = jest.fn(); - const rawPayload = Buffer.from( - JSON.stringify({ - sub: 'user:default/guest', - ent: ['group:default/guests'], - }), - 'utf8', - ).toString('base64'); - const mockToken = ['blob', rawPayload, 'blob'].join('.'); - const catalogClient = { getEntityByRef: jest.fn() } as unknown as CatalogApi; const mockTemplate: TemplateEntityV1beta3 = { @@ -139,10 +126,9 @@ describe('createRouter', () => { }; beforeEach(async () => { - getIdentity.mockReset(); - logger = getVoidLogger(); + const logger = getVoidLogger(); const databaseTaskStore = await DatabaseTaskStore.create({ - database: await createDatabase().getClient(), + database: createDatabase(), }); taskBroker = new StorageTaskBroker(databaseTaskStore, logger); @@ -152,18 +138,6 @@ describe('createRouter', () => { jest.spyOn(taskBroker, 'event$'); loggerSpy = jest.spyOn(logger, 'info'); - getIdentity.mockImplementation( - async (_req): Promise => { - return { - token: mockToken, - identity: { - type: 'user', - userEntityRef: 'user:default/guest', - ownershipEntityRefs: ['group:default/guests'], - }, - }; - }, - ); const router = await createRouter({ logger: logger, config: new ConfigReader({}), @@ -171,9 +145,6 @@ describe('createRouter', () => { catalogClient, reader: mockUrlReader, taskBroker, - identity: { - getIdentity, - }, }); app = express().use(router); @@ -247,6 +218,8 @@ describe('createRouter', () => { it('should call the broker with a correct spec', async () => { const broker = taskBroker.dispatch as jest.Mocked['dispatch']; + const mockToken = + 'blob.eyJzdWIiOiJ1c2VyOmRlZmF1bHQvZ3Vlc3QiLCJuYW1lIjoiSm9obiBEb2UifQ.blob'; await request(app) .post('/v2/tasks') @@ -289,80 +262,117 @@ describe('createRouter', () => { name: mockTemplate.metadata?.name, }), baseUrl: 'https://dev.azure.com', + entity: { + metadata: mockTemplate.metadata, + }, }, }, }), ); }); - describe('no auth is passed', () => { - beforeEach(async () => { - getIdentity.mockImplementation( - async (_req): Promise => { - return undefined; - }, - ); - const router = await createRouter({ - logger: logger, - config: new ConfigReader({}), - database: createDatabase(), - catalogClient, - reader: mockUrlReader, - taskBroker, - identity: { - getIdentity, + it('should not throw when an invalid authorization header is passed', async () => { + const broker = taskBroker.dispatch as jest.Mocked['dispatch']; + const mockToken = 'blob.eyJzdWIiOiIiLCJuYW1lIjoiSm9obiBEb2UifQ.blob'; + + await request(app) + .post('/v2/tasks') + .set('Authorization', `Bearer ${mockToken}`) + .send({ + templateRef: stringifyEntityRef({ + kind: 'template', + name: 'create-react-app-template', + }), + values: { + required: 'required-value', }, }); - app = express().use(router); - }); + expect(broker).toHaveBeenCalledWith( + expect.objectContaining({ + createdBy: undefined, + secrets: { + backstageToken: undefined, + }, - it('should not decorate a user when no backstage auth is passed', async () => { - const broker = - taskBroker.dispatch as jest.Mocked['dispatch']; - - await request(app) - .post('/v2/tasks') - .send({ - templateRef: stringifyEntityRef({ - kind: 'template', - name: 'create-react-app-template', - }), - values: { + spec: { + apiVersion: mockTemplate.apiVersion, + steps: mockTemplate.spec.steps.map((step, index) => ({ + ...step, + id: step.id ?? `step-${index + 1}`, + name: step.name ?? step.action, + })), + output: mockTemplate.spec.output ?? {}, + parameters: { required: 'required-value', }, - }); + user: { + entity: undefined, + ref: undefined, + }, + templateInfo: { + entityRef: stringifyEntityRef({ + kind: 'Template', + namespace: 'Default', + name: mockTemplate.metadata?.name, + }), + baseUrl: 'https://dev.azure.com', + entity: { + metadata: mockTemplate.metadata, + }, + }, + }, + }), + ); + }); - expect(broker).toHaveBeenCalledWith( - expect.objectContaining({ - createdBy: undefined, - spec: expect.objectContaining({ - user: { entity: undefined, ref: undefined }, - }), + it('should not decorate a user when no backstage auth is passed', async () => { + const broker = taskBroker.dispatch as jest.Mocked['dispatch']; + + await request(app) + .post('/v2/tasks') + .send({ + templateRef: stringifyEntityRef({ + kind: 'template', + name: 'create-react-app-template', }), - ); - }); + values: { + required: 'required-value', + }, + }); - it('should emit auditlog containing without user identifier', async () => { - await request(app) - .post('/v2/tasks') - .send({ - templateRef: stringifyEntityRef({ - kind: 'template', - name: 'create-react-app-template', - }), - values: { - required: 'required-value', - }, - }); + expect(broker).toHaveBeenCalledWith( + expect.objectContaining({ + createdBy: undefined, + spec: expect.objectContaining({ + user: { entity: undefined, ref: undefined }, + }), + }), + ); + }); - expect(loggerSpy).toHaveBeenCalledTimes(1); - expect(loggerSpy).toHaveBeenCalledWith( - 'Scaffolding task for template:default/create-react-app-template', - ); - }); + it('should emit auditlog containing without user identifier when no backstage auth is passed', async () => { + await request(app) + .post('/v2/tasks') + .send({ + templateRef: stringifyEntityRef({ + kind: 'template', + name: 'create-react-app-template', + }), + values: { + required: 'required-value', + }, + }); + + expect(loggerSpy).toHaveBeenCalledTimes(1); + expect(loggerSpy).toHaveBeenCalledWith( + 'Scaffolding task for template:default/create-react-app-template', + ); }); it('should emit auditlog containing user identifier when backstage auth is passed', async () => { + const mockToken = + 'blob.eyJzdWIiOiJ1c2VyOmRlZmF1bHQvZ3Vlc3QiLCJuYW1lIjoiSm9obiBEb2UifQ.blob'; + await request(app) .post('/v2/tasks') .set('Authorization', `Bearer ${mockToken}`) diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 55ae9159fe..a9ddfb6888 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -100,9 +100,7 @@ export async function createRouter( let taskBroker: TaskBroker; if (!options.taskBroker) { - const databaseTaskStore = await DatabaseTaskStore.create({ - database: await database.getClient(), - }); + const databaseTaskStore = await DatabaseTaskStore.create({ database }); taskBroker = new StorageTaskBroker(databaseTaskStore, logger); } else { taskBroker = options.taskBroker; @@ -254,6 +252,9 @@ export async function createRouter( name: template.metadata?.name, }), baseUrl, + entity: { + metadata: template.metadata, + }, }, }; diff --git a/plugins/scaffolder-common/CHANGELOG.md b/plugins/scaffolder-common/CHANGELOG.md index bee023f1db..95a5c9061b 100644 --- a/plugins/scaffolder-common/CHANGELOG.md +++ b/plugins/scaffolder-common/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-scaffolder-common +## 1.2.0-next.0 + +### Minor Changes + +- 1ff817b3f0: add entity metadata to the template info type + ## 1.1.2 ### Patch Changes diff --git a/plugins/scaffolder-common/api-report.md b/plugins/scaffolder-common/api-report.md index a1c5c2bf23..8864c0d76d 100644 --- a/plugins/scaffolder-common/api-report.md +++ b/plugins/scaffolder-common/api-report.md @@ -4,10 +4,11 @@ ```ts import { Entity } from '@backstage/catalog-model'; +import type { EntityMeta } from '@backstage/catalog-model'; import { JsonObject } from '@backstage/types'; -import { JsonValue } from '@backstage/types'; +import type { JsonValue } from '@backstage/types'; import { KindValidator } from '@backstage/catalog-model'; -import { UserEntity } from '@backstage/catalog-model'; +import type { UserEntity } from '@backstage/catalog-model'; // @public export type TaskSpec = TaskSpecV1beta3; @@ -64,5 +65,8 @@ export const templateEntityV1beta3Validator: KindValidator; export type TemplateInfo = { entityRef: string; baseUrl?: string; + entity?: { + metadata: EntityMeta; + }; }; ``` diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index 6e12684ef1..f12e6e8de3 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-common", "description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", - "version": "1.1.2", + "version": "1.2.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -43,6 +43,6 @@ "@backstage/types": "^1.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0" + "@backstage/cli": "^0.18.2-next.0" } } diff --git a/plugins/scaffolder-common/src/TaskSpec.ts b/plugins/scaffolder-common/src/TaskSpec.ts index 4ba43092ae..1c71790736 100644 --- a/plugins/scaffolder-common/src/TaskSpec.ts +++ b/plugins/scaffolder-common/src/TaskSpec.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import { UserEntity } from '@backstage/catalog-model'; -import { JsonValue, JsonObject } from '@backstage/types'; +import type { EntityMeta, UserEntity } from '@backstage/catalog-model'; +import type { JsonValue, JsonObject } from '@backstage/types'; /** * Information about a template that is stored on a task specification. @@ -32,6 +32,16 @@ export type TemplateInfo = { * Where the template is stored, so we can resolve relative paths for things like `fetch:template` paths. */ baseUrl?: string; + + /** + * the Template entity + */ + entity?: { + /** + * The metadata of the Template + */ + metadata: EntityMeta; + }; }; /** diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 323e91f28b..c4a9830f3c 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-scaffolder +## 1.6.0-next.0 + +### Minor Changes + +- 3424a8075d: Added support for `async` validation for the `next` version of the plugin +- 192d856495: Implementing review step for the scaffolder under `create/next` + +### Patch Changes + +- 9ffb75616d: Fix bug with empty strings in `EntityPicker` +- 3f739be9d9: Minor API signatures cleanup +- 9097278df2: Updated dependency `json-schema-library` to `^7.0.0`. +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.0-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-permission-react@0.4.5-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + ## 1.5.0 ### Minor Changes diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 24ff8e210d..d611309df3 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -44,7 +44,7 @@ export type CustomFieldValidator = ( context: { apiHolder: ApiHolder; }, -) => void; +) => void | Promise; // @public export const EntityNamePickerFieldExtension: FieldExtensionComponent< @@ -248,11 +248,7 @@ export interface ScaffolderApi { ): Promise; listActions(): Promise; // (undocumented) - listTasks?({ - filterByOwnership, - }: { - filterByOwnership: 'owned' | 'all'; - }): Promise<{ + listTasks?(options: { filterByOwnership: 'owned' | 'all' }): Promise<{ tasks: ScaffolderTask[]; }>; scaffold( diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 626a20d73e..4200e2d3ff 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "1.5.0", + "version": "1.6.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,18 +35,18 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/catalog-client": "^1.0.4", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-permission-react": "^0.4.4", - "@backstage/plugin-scaffolder-common": "^1.1.2", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-permission-react": "^0.4.5-next.0", + "@backstage/plugin-scaffolder-common": "^1.2.0-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@codemirror/language": "^6.0.0", @@ -65,6 +65,7 @@ "humanize-duration": "^3.25.1", "immer": "^9.0.1", "json-schema": "^0.4.0", + "json-schema-library": "^7.0.0", "lodash": "^4.17.21", "luxon": "^3.0.0", "qs": "^6.9.4", @@ -80,11 +81,11 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -94,7 +95,7 @@ "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", "event-source-polyfill": "1.0.25", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx index b7e3122c31..2aa72550c3 100644 --- a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx @@ -72,7 +72,7 @@ export const EntityPicker = ( const onSelect = useCallback( (_: any, value: string | null) => { - onChange(value || ''); + onChange(value ?? undefined); }, [onChange], ); diff --git a/plugins/scaffolder/src/extensions/types.ts b/plugins/scaffolder/src/extensions/types.ts index be8dc14b0a..9b42ba478b 100644 --- a/plugins/scaffolder/src/extensions/types.ts +++ b/plugins/scaffolder/src/extensions/types.ts @@ -25,7 +25,7 @@ export type CustomFieldValidator = ( data: TFieldReturnValue, field: FieldValidation, context: { apiHolder: ApiHolder }, -) => void; +) => void | Promise; /** * Type for the Custom Field Extension with the diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/ReviewState.test.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/ReviewState.test.tsx new file mode 100644 index 0000000000..2b2e706102 --- /dev/null +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/ReviewState.test.tsx @@ -0,0 +1,140 @@ +/* + * Copyright 2022 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 React from 'react'; +import { ReviewState } from './ReviewState'; +import { render } from '@testing-library/react'; +import { ParsedTemplateSchema } from './useTemplateSchema'; + +describe('ReviewState', () => { + it('should render the text as normal with no options', () => { + const formState = { + name: 'John Doe', + test: 'bob', + }; + + const { getByRole } = render( + , + ); + + expect(getByRole('row', { name: 'Name John Doe' })).toBeInTheDocument(); + expect(getByRole('row', { name: 'Test bob' })).toBeInTheDocument(); + }); + + it('should mask password ui:fields', () => { + const formState = { + name: 'John Doe', + test: 'bob', + }; + + const schemas: ParsedTemplateSchema[] = [ + { + mergedSchema: { + type: 'object', + properties: { + name: { + type: 'string', + 'ui:widget': 'password', + }, + }, + }, + schema: {}, + title: 'test', + uiSchema: {}, + description: 'asd', + }, + ]; + + const { getByRole } = render( + , + ); + + expect(getByRole('row', { name: 'Name ******' })).toBeInTheDocument(); + }); + + it('should hide from review if show is not set', async () => { + const formState = { + name: 'John Doe', + test: 'bob', + }; + + const schemas: ParsedTemplateSchema[] = [ + { + mergedSchema: { + type: 'object', + properties: { + name: { + type: 'string', + 'ui:widget': 'password', + 'ui:backstage': { + review: { + show: false, + }, + }, + }, + }, + }, + schema: {}, + title: 'test', + uiSchema: {}, + description: 'asd', + }, + ]; + + const { queryByRole } = render( + , + ); + + expect( + await queryByRole('row', { name: 'Name ******' }), + ).not.toBeInTheDocument(); + }); + + it('should allow for masking an option with a set text', () => { + const formState = { + name: 'John Doe', + test: 'bob', + }; + + const schemas: ParsedTemplateSchema[] = [ + { + mergedSchema: { + type: 'object', + properties: { + name: { + type: 'string', + 'ui:widget': 'password', + 'ui:backstage': { + review: { + mask: 'lols', + }, + }, + }, + }, + }, + schema: {}, + title: 'test', + uiSchema: {}, + description: 'asd', + }, + ]; + + const { getByRole } = render( + , + ); + + expect(getByRole('row', { name: 'Name lols' })).toBeInTheDocument(); + }); +}); diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/ReviewState.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/ReviewState.tsx new file mode 100644 index 0000000000..f39a26622a --- /dev/null +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/ReviewState.tsx @@ -0,0 +1,58 @@ +/* + * Copyright 2022 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 React from 'react'; +import { StructuredMetadataTable } from '@backstage/core-components'; +import { JsonObject } from '@backstage/types'; +import { ParsedTemplateSchema } from './useTemplateSchema'; +import { Draft07 as JSONSchema } from 'json-schema-library'; + +interface ReviewStateProps { + schemas: ParsedTemplateSchema[]; + formState: JsonObject; +} + +export const ReviewState = (props: ReviewStateProps) => { + const reviewData = Object.fromEntries( + Object.entries(props.formState).map(([key, value]) => { + for (const step of props.schemas) { + const parsedSchema = new JSONSchema(step.mergedSchema); + const definitionInSchema = parsedSchema.getSchema( + `#/${key}`, + props.formState, + ); + if (definitionInSchema) { + const backstageReviewOptions = + definitionInSchema['ui:backstage']?.review; + + if (backstageReviewOptions) { + if (backstageReviewOptions.mask) { + return [key, backstageReviewOptions.mask]; + } + if (backstageReviewOptions.show === false) { + return []; + } + } + + if (definitionInSchema['ui:widget'] === 'password') { + return [key, '******']; + } + } + } + return [key, value]; + }), + ); + return ; +}; diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx index 2b091883ae..f605e9c114 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { TemplateParameterSchema } from '../../../types'; import { Stepper } from './Stepper'; import { renderInTestApp } from '@backstage/test-utils'; -import { fireEvent } from '@testing-library/react'; +import { act, fireEvent } from '@testing-library/react'; describe('Stepper', () => { it('should render the step titles for each step of the manifest', async () => { @@ -47,15 +47,17 @@ describe('Stepper', () => { title: 'React JSON Schema Form Test', }; - const { getByText } = await renderInTestApp( + const { getByRole } = await renderInTestApp( , ); - expect(getByText('Next')).toBeInTheDocument(); + expect(getByRole('button', { name: 'Next' })).toBeInTheDocument(); - await fireEvent.click(getByText('Next')); + await act(async () => { + await fireEvent.click(getByRole('button', { name: 'Next' })); + }); - expect(getByText('Review')).toBeInTheDocument(); + expect(getByRole('button', { name: 'Review' })).toBeInTheDocument(); }); it('should remember the state of the form when cycling through the pages', async () => { @@ -85,7 +87,7 @@ describe('Stepper', () => { title: 'React JSON Schema Form Test', }; - const { getByRole, getByText } = await renderInTestApp( + const { getByRole } = await renderInTestApp( , ); @@ -93,9 +95,13 @@ describe('Stepper', () => { target: { value: 'im a test value' }, }); - await fireEvent.click(getByText('Next')); + await act(async () => { + await fireEvent.click(getByRole('button', { name: 'Next' })); + }); - await fireEvent.click(getByText('Back')); + await act(async () => { + await fireEvent.click(getByRole('button', { name: 'Back' })); + }); expect(getByRole('textbox', { name: 'name' })).toHaveValue( 'im a test value', diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx index 19335d4993..f5656092c1 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/Stepper.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { useApiHolder } from '@backstage/core-plugin-api'; import { JsonObject } from '@backstage/types'; import { Stepper as MuiStepper, @@ -21,17 +22,20 @@ import { Button, makeStyles, } from '@material-ui/core'; -import { withTheme } from '@rjsf/core'; +import { FieldValidation, withTheme } from '@rjsf/core'; import { Theme as MuiTheme } from '@rjsf/material-ui'; import React, { useMemo, useState } from 'react'; import { FieldExtensionOptions } from '../../../extensions'; import { TemplateParameterSchema } from '../../../types'; +import { createAsyncValidators } from './createAsyncValidators'; import { useTemplateSchema } from './useTemplateSchema'; +import { ReviewState } from './ReviewState'; const useStyles = makeStyles(theme => ({ backButton: { marginRight: theme.spacing(1), }, + footer: { display: 'flex', flexDirection: 'row', @@ -51,8 +55,12 @@ const Form = withTheme(MuiTheme); export const Stepper = (props: StepperProps) => { const { steps } = useTemplateSchema(props.manifest); + const apiHolder = useApiHolder(); const [activeStep, setActiveStep] = useState(0); const [formState, setFormState] = useState({}); + const [errors, setErrors] = useState< + undefined | Record + >(); const styles = useStyles(); const extensions = useMemo(() => { @@ -61,15 +69,46 @@ export const Stepper = (props: StepperProps) => { ); }, [props.extensions]); + const validators = useMemo(() => { + return Object.fromEntries( + props.extensions.map(({ name, validation }) => [name, validation]), + ); + }, [props.extensions]); + + const validation = useMemo(() => { + return createAsyncValidators(steps[activeStep]?.mergedSchema, validators, { + apiHolder, + }); + }, [steps, activeStep, validators, apiHolder]); + const handleBack = () => { setActiveStep(prevActiveStep => prevActiveStep - 1); }; - const handleNext = ({ formData }: { formData: JsonObject }) => { - setActiveStep(prevActiveStep => prevActiveStep + 1); + const handleNext = async ({ formData }: { formData: JsonObject }) => { + // TODO(blam): What do we do about loading states, does each field extension get a chance + // to display it's own loading? Or should we grey out the entire form. + setErrors(undefined); + + const returnedValidation = await validation(formData); + + const hasErrors = Object.values(returnedValidation).some(i => { + return i.__errors.length > 0; + }); + + if (hasErrors) { + setErrors(returnedValidation); + } else { + setErrors(undefined); + setActiveStep(prevActiveStep => prevActiveStep + 1); + } setFormState(current => ({ ...current, ...formData })); }; + const handleCreate = () => { + // TODO(blam): Create the template in a modal with the ability to view the logs etc. + }; + return ( <> @@ -78,29 +117,51 @@ export const Stepper = (props: StepperProps) => { {step.title} ))} + + Review +
-
-
- - -
- + {activeStep < steps.length ? ( +
+
+ + +
+ + ) : ( + <> + +
+ + +
+ + )}
); diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/createAsyncValidators.test.ts b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/createAsyncValidators.test.ts new file mode 100644 index 0000000000..ed887fb56d --- /dev/null +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/createAsyncValidators.test.ts @@ -0,0 +1,154 @@ +/* + * Copyright 2022 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 { JsonObject } from '@backstage/types'; +import { CustomFieldValidator } from '../../../extensions'; +import { createAsyncValidators } from './createAsyncValidators'; + +describe('createAsyncValidators', () => { + it('should call the correct functions for validation', async () => { + const schema: JsonObject = { + type: 'object', + properties: { + name: { + type: 'string', + 'ui:field': 'NameField', + }, + address: { + type: 'object', + 'ui:field': 'AddressField', + properties: { + street: { + type: 'string', + }, + postcode: { + type: 'string', + }, + }, + }, + }, + }; + + const validators = { NameField: jest.fn(), AddressField: jest.fn() }; + + const validate = createAsyncValidators(schema, validators, { + apiHolder: { get: jest.fn() }, + }); + + await validate({ + name: 'asd', + address: { street: 'street', postcode: 'postcode' }, + }); + + expect(validators.NameField).toHaveBeenCalled(); + expect(validators.AddressField).toHaveBeenCalled(); + }); + + it('should return the correct errors to the frontend', async () => { + const schema: JsonObject = { + type: 'object', + properties: { + name: { + type: 'string', + 'ui:field': 'NameField', + }, + address: { + type: 'object', + 'ui:field': 'AddressField', + properties: { + street: { + type: 'string', + }, + postcode: { + type: 'string', + }, + }, + }, + }, + }; + + const NameField: CustomFieldValidator = (value, { addError }) => { + if (!value) { + addError('something is broken here!'); + } + }; + + const AddressField: CustomFieldValidator<{ + street?: string; + postcode?: string; + }> = (value, { addError }) => { + if (!value.postcode) { + addError('postcode is missing!'); + } + + if (!value.street) { + addError('street is missing here!'); + } + }; + + const validate = createAsyncValidators( + schema, + { + NameField: NameField as CustomFieldValidator, + AddressField: AddressField as CustomFieldValidator, + }, + { + apiHolder: { get: jest.fn() }, + }, + ); + + await expect( + validate({ + name: 'asd', + address: { street: 'street', postcode: 'postcode' }, + }), + ).resolves.toEqual({ + name: expect.objectContaining({ + __errors: [], + }), + address: expect.objectContaining({ + __errors: [], + }), + }); + + await expect( + validate({ + name: 'asd', + address: { street: '', postcode: 'postcode' }, + }), + ).resolves.toEqual({ + name: expect.objectContaining({ + __errors: [], + }), + address: expect.objectContaining({ + __errors: ['street is missing here!'], + }), + }); + + await expect( + validate({ + name: '', + address: { street: '', postcode: '' }, + }), + ).resolves.toEqual({ + name: expect.objectContaining({ + __errors: ['something is broken here!'], + }), + address: expect.objectContaining({ + __errors: ['postcode is missing!', 'street is missing here!'], + }), + }); + }); +}); diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/createAsyncValidators.ts b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/createAsyncValidators.ts new file mode 100644 index 0000000000..d89f0d4e5f --- /dev/null +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/createAsyncValidators.ts @@ -0,0 +1,60 @@ +/* + * Copyright 2022 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 { FieldValidation } from '@rjsf/core'; +import { JsonObject } from '@backstage/types'; +import { ApiHolder } from '@backstage/core-plugin-api'; +import { CustomFieldValidator } from '../../../extensions'; +import { Draft07 as JSONSchema } from 'json-schema-library'; +import { createFieldValidation } from './schema'; + +export const createAsyncValidators = ( + rootSchema: JsonObject, + validators: Record>, + context: { + apiHolder: ApiHolder; + }, +) => { + async function validate(formData: JsonObject, pathPrefix: string = '#') { + const parsedSchema = new JSONSchema(rootSchema); + const formValidation: Record = {}; + for (const [key, value] of Object.entries(formData)) { + const definitionInSchema = parsedSchema.getSchema( + `${pathPrefix}/${key}`, + formData, + ); + + if (definitionInSchema && 'ui:field' in definitionInSchema) { + const validator = validators[definitionInSchema['ui:field']]; + if (validator) { + const fieldValidation = createFieldValidation(); + try { + await validator(value, fieldValidation, context); + } catch (ex) { + fieldValidation.addError(ex.message); + } + formValidation[key] = fieldValidation; + } + } + } + + return formValidation; + } + + return async (formData: JsonObject) => { + return await validate(formData); + }; +}; diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/schema.ts b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/schema.ts index 5a33a622bb..e2d5e89932 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/schema.ts +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/schema.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { JsonObject } from '@backstage/types'; -import { UiSchema } from '@rjsf/core'; +import { FieldValidation, UiSchema } from '@rjsf/core'; function isObject(value: unknown): value is JsonObject { return typeof value === 'object' && value !== null && !Array.isArray(value); @@ -110,3 +110,18 @@ export const extractSchemaFromStep = ( extractUiSchema(returnSchema, uiSchema); return { uiSchema, schema: returnSchema }; }; + +/** + * @alpha + * Creates a field validation object for use in react jsonschema form + */ +export const createFieldValidation = (): FieldValidation => { + const fieldValidation: FieldValidation = { + __errors: [] as string[], + addError: (message: string) => { + fieldValidation.__errors.push(message); + }, + }; + + return fieldValidation; +}; diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/useTemplateSchema.ts b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/useTemplateSchema.ts index d5fe244a25..d0d8590a7b 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/useTemplateSchema.ts +++ b/plugins/scaffolder/src/next/TemplateWizardPage/Stepper/useTemplateSchema.ts @@ -19,20 +19,21 @@ import { UiSchema } from '@rjsf/core'; import { TemplateParameterSchema } from '../../../types'; import { extractSchemaFromStep } from './schema'; +export interface ParsedTemplateSchema { + uiSchema: UiSchema; + mergedSchema: JsonObject; + schema: JsonObject; + title: string; + description?: string; +} export const useTemplateSchema = ( manifest: TemplateParameterSchema, -): { - steps: { - uiSchema: UiSchema; - schema: JsonObject; - title: string; - description?: string; - }[]; -} => { +): { steps: ParsedTemplateSchema[] } => { const featureFlags = useApi(featureFlagsApiRef); const steps = manifest.steps.map(({ title, description, schema }) => ({ title, description, + mergedSchema: schema, ...extractSchemaFromStep(schema), })); diff --git a/plugins/scaffolder/src/types.ts b/plugins/scaffolder/src/types.ts index d814119398..acb0f0e114 100644 --- a/plugins/scaffolder/src/types.ts +++ b/plugins/scaffolder/src/types.ts @@ -194,9 +194,7 @@ export interface ScaffolderApi { getTask(taskId: string): Promise; - listTasks?({ - filterByOwnership, - }: { + listTasks?(options: { filterByOwnership: 'owned' | 'all'; }): Promise<{ tasks: ScaffolderTask[] }>; diff --git a/plugins/search-backend-module-elasticsearch/CHANGELOG.md b/plugins/search-backend-module-elasticsearch/CHANGELOG.md index ed1c23000f..211d5b9444 100644 --- a/plugins/search-backend-module-elasticsearch/CHANGELOG.md +++ b/plugins/search-backend-module-elasticsearch/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend-module-elasticsearch +## 1.0.2-next.0 + +### Patch Changes + +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/search-backend-module-elasticsearch/api-report.md b/plugins/search-backend-module-elasticsearch/api-report.md index 5a951948c2..be54fe9d4a 100644 --- a/plugins/search-backend-module-elasticsearch/api-report.md +++ b/plugins/search-backend-module-elasticsearch/api-report.md @@ -132,17 +132,13 @@ export class ElasticSearchClientWrapper { refreshOnCompletion?: string | boolean; }): BulkHelper; // (undocumented) - createIndex({ - index, - }: { + createIndex(options: { index: string; }): | TransportRequestPromise, unknown>> | TransportRequestPromise_2, unknown>>; // (undocumented) - deleteIndex({ - index, - }: { + deleteIndex(options: { index: string | string[]; }): | TransportRequestPromise, unknown>> @@ -152,17 +148,13 @@ export class ElasticSearchClientWrapper { options: ElasticSearchClientOptions, ): ElasticSearchClientWrapper; // (undocumented) - getAliases({ - aliases, - }: { + getAliases(options: { aliases: string[]; }): | TransportRequestPromise, unknown>> | TransportRequestPromise_2, unknown>>; // (undocumented) - indexExists({ - index, - }: { + indexExists(options: { index: string | string[]; }): | TransportRequestPromise> @@ -174,19 +166,14 @@ export class ElasticSearchClientWrapper { | TransportRequestPromise, unknown>> | TransportRequestPromise_2, unknown>>; // (undocumented) - search({ - index, - body, - }: { + search(options: { index: string | string[]; body: Object; }): | TransportRequestPromise, unknown>> | TransportRequestPromise_2, unknown>>; // (undocumented) - updateAliases({ - actions, - }: { + updateAliases(options: { actions: ElasticSearchAliasAction[]; }): | TransportRequestPromise, unknown>> diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 119c4602d1..2c8e143dd7 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-elasticsearch", "description": "A module for the search backend that implements search using ElasticSearch", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,8 +24,8 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/plugin-search-backend-node": "^1.0.1", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/plugin-search-backend-node": "^1.0.2-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@elastic/elasticsearch": "^7.13.0", "@opensearch-project/opensearch": "^2.0.0", "aws-os-connection": "^0.1.0", @@ -36,8 +36,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/cli": "^0.18.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@elastic/elasticsearch-mock": "^1.0.0", "@short.io/opensearch-mock": "^0.3.1" }, diff --git a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts index bcf67e091c..395f861223 100644 --- a/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts +++ b/plugins/search-backend-module-elasticsearch/src/engines/ElasticSearchClientWrapper.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Client as ElasticSearchClient } from '@elastic/elasticsearch'; import { Client as OpenSearchClient } from '@opensearch-project/opensearch'; import { Readable } from 'stream'; @@ -69,15 +70,12 @@ export class ElasticSearchClientWrapper { private readonly elasticSearchClient: ElasticSearchClient | undefined; private readonly openSearchClient: OpenSearchClient | undefined; - private constructor({ - openSearchClient, - elasticSearchClient, - }: { + private constructor(options: { openSearchClient?: OpenSearchClient; elasticSearchClient?: ElasticSearchClient; }) { - this.openSearchClient = openSearchClient; - this.elasticSearchClient = elasticSearchClient; + this.openSearchClient = options.openSearchClient; + this.elasticSearchClient = options.elasticSearchClient; } static fromClientOptions(options: ElasticSearchClientOptions) { @@ -92,13 +90,13 @@ export class ElasticSearchClientWrapper { }); } - search({ index, body }: { index: string | string[]; body: Object }) { + search(options: { index: string | string[]; body: Object }) { if (this.openSearchClient) { - return this.openSearchClient.search({ index, body }); + return this.openSearchClient.search(options); } if (this.elasticSearchClient) { - return this.elasticSearchClient.search({ index, body }); + return this.elasticSearchClient.search(options); } throw new Error('No client defined'); @@ -132,43 +130,45 @@ export class ElasticSearchClientWrapper { throw new Error('No client defined'); } - indexExists({ index }: { index: string | string[] }) { + indexExists(options: { index: string | string[] }) { if (this.openSearchClient) { - return this.openSearchClient.indices.exists({ index }); + return this.openSearchClient.indices.exists(options); } if (this.elasticSearchClient) { - return this.elasticSearchClient.indices.exists({ index }); + return this.elasticSearchClient.indices.exists(options); } throw new Error('No client defined'); } - deleteIndex({ index }: { index: string | string[] }) { + deleteIndex(options: { index: string | string[] }) { if (this.openSearchClient) { - return this.openSearchClient.indices.delete({ index }); + return this.openSearchClient.indices.delete(options); } if (this.elasticSearchClient) { - return this.elasticSearchClient.indices.delete({ index }); + return this.elasticSearchClient.indices.delete(options); } throw new Error('No client defined'); } - createIndex({ index }: { index: string }) { + createIndex(options: { index: string }) { if (this.openSearchClient) { - return this.openSearchClient.indices.create({ index }); + return this.openSearchClient.indices.create(options); } if (this.elasticSearchClient) { - return this.elasticSearchClient.indices.create({ index }); + return this.elasticSearchClient.indices.create(options); } throw new Error('No client defined'); } - getAliases({ aliases }: { aliases: string[] }) { + getAliases(options: { aliases: string[] }) { + const { aliases } = options; + if (this.openSearchClient) { return this.openSearchClient.cat.aliases({ format: 'json', @@ -186,8 +186,9 @@ export class ElasticSearchClientWrapper { throw new Error('No client defined'); } - updateAliases({ actions }: { actions: ElasticSearchAliasAction[] }) { - const filteredActions = actions.filter(Boolean); + updateAliases(options: { actions: ElasticSearchAliasAction[] }) { + const filteredActions = options.actions.filter(Boolean); + if (this.openSearchClient) { return this.openSearchClient.indices.updateAliases({ body: { diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index c760d518ea..f1d5e35b18 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,29 @@ # @backstage/plugin-search-backend-module-pg +## 0.4.0-next.0 + +### Minor Changes + +- 8872cc735d: Fixed a bug in search-backend-module-pg where it ignores the skip migration database options when using the database. + + To use this new implementation you need to create the instance of `DatabaseDocumentStore` using the `PluginDatabaseManager` instead of `Knex`; + + ``` + import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common'; + import { DatabaseDocumentStore } from '@backstage/plugin-search-backend-module-pg'; + + const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() }); + const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } }); + const databaseDocumentStore = await DatabaseDocumentStore.create(databaseManager); + ``` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.3.6 ### Patch Changes diff --git a/plugins/search-backend-module-pg/api-report.md b/plugins/search-backend-module-pg/api-report.md index d1913a535d..d35bac66aa 100644 --- a/plugins/search-backend-module-pg/api-report.md +++ b/plugins/search-backend-module-pg/api-report.md @@ -18,15 +18,15 @@ export type ConcretePgSearchQuery = { pageSize: number; }; -// Warning: (ae-missing-release-tag) "DatabaseDocumentStore" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class DatabaseDocumentStore implements DatabaseStore { constructor(db: Knex); // (undocumented) completeInsert(tx: Knex.Transaction, type: string): Promise; // (undocumented) - static create(knex: Knex): Promise; + static create( + database: PluginDatabaseManager, + ): Promise; // (undocumented) getTransaction(): Promise; // (undocumented) @@ -37,8 +37,6 @@ export class DatabaseDocumentStore implements DatabaseStore { ): Promise; // (undocumented) prepareInsert(tx: Knex.Transaction): Promise; - // Warning: (ae-forgotten-export) The symbol "DocumentResultRow" needs to be exported by the entry point index.d.ts - // // (undocumented) query( tx: Knex.Transaction, @@ -50,8 +48,6 @@ export class DatabaseDocumentStore implements DatabaseStore { transaction(fn: (tx: Knex.Transaction) => Promise): Promise; } -// Warning: (ae-missing-release-tag) "DatabaseStore" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface DatabaseStore { // (undocumented) @@ -75,8 +71,16 @@ export interface DatabaseStore { transaction(fn: (tx: Knex.Transaction) => Promise): Promise; } -// Warning: (ae-missing-release-tag) "PgSearchEngine" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface DocumentResultRow { + // (undocumented) + document: IndexableDocument; + // (undocumented) + highlight: IndexableDocument; + // (undocumented) + type: string; +} + // @public (undocumented) export class PgSearchEngine implements SearchEngine { // @deprecated @@ -106,8 +110,6 @@ export class PgSearchEngine implements SearchEngine { ): ConcretePgSearchQuery; } -// Warning: (ae-missing-release-tag) "PgSearchEngineIndexer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class PgSearchEngineIndexer extends BatchSearchEngineIndexer { constructor(options: PgSearchEngineIndexerOptions); @@ -119,8 +121,6 @@ export class PgSearchEngineIndexer extends BatchSearchEngineIndexer { initialize(): Promise; } -// Warning: (ae-missing-release-tag) "PgSearchEngineIndexerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type PgSearchEngineIndexerOptions = { batchSize: number; @@ -146,8 +146,6 @@ export type PgSearchOptions = { database: PluginDatabaseManager; }; -// Warning: (ae-missing-release-tag) "PgSearchQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface PgSearchQuery { // (undocumented) @@ -175,8 +173,6 @@ export type PgSearchQueryTranslatorOptions = { highlightOptions: PgSearchHighlightOptions; }; -// Warning: (ae-missing-release-tag) "RawDocumentRow" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface RawDocumentRow { // (undocumented) diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index b2a75f8ebc..23d7548809 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-pg", "description": "A module for the search backend that implements search using PostgreSQL", - "version": "0.3.6", + "version": "0.4.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,17 +23,17 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", - "@backstage/plugin-search-backend-node": "^1.0.1", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/plugin-search-backend-node": "^1.0.2-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "lodash": "^4.17.21", "knex": "^2.0.0", "uuid": "^8.3.2" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1" + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist", diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts index 9da5ceec0e..01fe0fff82 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngine.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { PluginDatabaseManager } from '@backstage/backend-common'; import { SearchEngine } from '@backstage/plugin-search-common'; import { @@ -79,6 +80,7 @@ export type PgSearchHighlightOptions = { postTag: string; }; +/** @public */ export class PgSearchEngine implements SearchEngine { private readonly highlightOptions: PgSearchHighlightOptions; @@ -115,14 +117,14 @@ export class PgSearchEngine implements SearchEngine { config: Config; }): Promise { return new PgSearchEngine( - await DatabaseDocumentStore.create(await options.database.getClient()), + await DatabaseDocumentStore.create(options.database), options.config, ); } static async fromConfig(config: Config, options: PgSearchOptions) { return new PgSearchEngine( - await DatabaseDocumentStore.create(await options.database.getClient()), + await DatabaseDocumentStore.create(options.database), config, ); } diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngineIndexer.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngineIndexer.ts index fa27509a69..e3dbe82751 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngineIndexer.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/PgSearchEngineIndexer.ts @@ -19,12 +19,14 @@ import { IndexableDocument } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; import { DatabaseStore } from '../database'; +/** @public */ export type PgSearchEngineIndexerOptions = { batchSize: number; type: string; databaseStore: DatabaseStore; }; +/** @public */ export class PgSearchEngineIndexer extends BatchSearchEngineIndexer { private store: DatabaseStore; private type: string; diff --git a/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts b/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts index e9ea04e5c4..e62e709f26 100644 --- a/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts +++ b/plugins/search-backend-module-pg/src/PgSearchEngine/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { PgSearchEngine } from './PgSearchEngine'; export type { ConcretePgSearchQuery, diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts index 355e41352d..59c8d85562 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.test.ts @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import { Knex as KnexType } from 'knex'; import { TestDatabaseId, TestDatabases } from '@backstage/backend-test-utils'; import { IndexableDocument } from '@backstage/plugin-search-common'; import { PgSearchHighlightOptions } from '../PgSearchEngine'; @@ -30,6 +32,18 @@ const highlightOptions: PgSearchHighlightOptions = { fragmentDelimiter: ' ... ', }; +function createDatabaseManager( + client: KnexType, + skipMigrations: boolean = false, +) { + return { + getClient: async () => client, + migrations: { + skip: skipMigrations, + }, + }; +} + describe('DatabaseDocumentStore', () => { describe('unsupported', () => { const databases = TestDatabases.create({ @@ -51,9 +65,10 @@ describe('DatabaseDocumentStore', () => { 'should fail to create, %p', async databaseId => { const knex = await databases.init(databaseId); + const databaseManager = createDatabaseManager(knex); await expect( - async () => await DatabaseDocumentStore.create(knex), + async () => await DatabaseDocumentStore.create(databaseManager), ).rejects.toThrow(); }, 60_000, @@ -67,7 +82,9 @@ describe('DatabaseDocumentStore', () => { async function createStore(databaseId: TestDatabaseId) { const knex = await databases.init(databaseId); - const store = await DatabaseDocumentStore.create(knex); + const databaseManager = createDatabaseManager(knex); + const store = await DatabaseDocumentStore.create(databaseManager); + return { store, knex }; } diff --git a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts index 8e73c0f16f..023992a335 100644 --- a/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts +++ b/plugins/search-backend-module-pg/src/database/DatabaseDocumentStore.ts @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { resolvePackagePath } from '@backstage/backend-common'; +import { + PluginDatabaseManager, + resolvePackagePath, +} from '@backstage/backend-common'; import { IndexableDocument } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; import { @@ -29,8 +32,12 @@ const migrationsDir = resolvePackagePath( 'migrations', ); +/** @public */ export class DatabaseDocumentStore implements DatabaseStore { - static async create(knex: Knex): Promise { + static async create( + database: PluginDatabaseManager, + ): Promise { + const knex = await database.getClient(); try { const majorVersion = await queryPostgresMajorVersion(knex); @@ -49,9 +56,12 @@ export class DatabaseDocumentStore implements DatabaseStore { ); } - await knex.migrate.latest({ - directory: migrationsDir, - }); + if (!database.migrations?.skip) { + await knex.migrate.latest({ + directory: migrationsDir, + }); + } + return new DatabaseDocumentStore(knex); } diff --git a/plugins/search-backend-module-pg/src/database/index.ts b/plugins/search-backend-module-pg/src/database/index.ts index d2ca3ba3da..69441d56ec 100644 --- a/plugins/search-backend-module-pg/src/database/index.ts +++ b/plugins/search-backend-module-pg/src/database/index.ts @@ -13,5 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { DatabaseDocumentStore } from './DatabaseDocumentStore'; -export type { DatabaseStore, PgSearchQuery, RawDocumentRow } from './types'; +export type { + DatabaseStore, + DocumentResultRow, + PgSearchQuery, + RawDocumentRow, +} from './types'; diff --git a/plugins/search-backend-module-pg/src/database/types.ts b/plugins/search-backend-module-pg/src/database/types.ts index 151be7d13f..f330651cef 100644 --- a/plugins/search-backend-module-pg/src/database/types.ts +++ b/plugins/search-backend-module-pg/src/database/types.ts @@ -17,6 +17,7 @@ import { IndexableDocument } from '@backstage/plugin-search-common'; import { Knex } from 'knex'; import { PgSearchHighlightOptions } from '../PgSearchEngine'; +/** @public */ export interface PgSearchQuery { fields?: Record; types?: string[]; @@ -26,6 +27,7 @@ export interface PgSearchQuery { options: PgSearchHighlightOptions; } +/** @public */ export interface DatabaseStore { transaction(fn: (tx: Knex.Transaction) => Promise): Promise; getTransaction(): Promise; @@ -42,12 +44,14 @@ export interface DatabaseStore { ): Promise; } +/** @public */ export interface RawDocumentRow { document: IndexableDocument; type: string; hash: unknown; } +/** @public */ export interface DocumentResultRow { document: IndexableDocument; type: string; diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index 71e4bd5431..e02f0fda0b 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-search-backend-node +## 1.0.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/search-backend-node/api-report.md b/plugins/search-backend-node/api-report.md index 64957f6366..62a4eabc26 100644 --- a/plugins/search-backend-node/api-report.md +++ b/plugins/search-backend-node/api-report.md @@ -56,9 +56,9 @@ export abstract class DecoratorBase extends Transform { // @public export class IndexBuilder { - constructor({ logger, searchEngine }: IndexBuilderOptions); - addCollator({ factory, schedule }: RegisterCollatorParameters): void; - addDecorator({ factory }: RegisterDecoratorParameters): void; + constructor(options: IndexBuilderOptions); + addCollator(options: RegisterCollatorParameters): void; + addDecorator(options: RegisterDecoratorParameters): void; build(): Promise<{ scheduler: Scheduler; }>; @@ -77,7 +77,7 @@ export type LunrQueryTranslator = (query: SearchQuery) => ConcreteLunrQuery; // @public export class LunrSearchEngine implements SearchEngine { - constructor({ logger }: { logger: Logger }); + constructor(options: { logger: Logger }); // (undocumented) protected docStore: Record; // (undocumented) @@ -157,8 +157,8 @@ export interface RegisterDecoratorParameters { // @public export class Scheduler { - constructor({ logger }: { logger: Logger }); - addToSchedule({ id, task, scheduledRunner }: ScheduleTaskParameters): void; + constructor(options: { logger: Logger }); + addToSchedule(options: ScheduleTaskParameters): void; start(): void; stop(): void; } diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index ec83bb50a8..6f6125e85a 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-node", "description": "A library for Backstage backend plugins that want to interact with the search backend plugin", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,12 +23,12 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@types/lunr": "^2.3.3", "lodash": "^4.17.21", "lunr": "^2.3.9", @@ -38,8 +38,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/cli": "^0.18.1", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/ndjson": "^2.0.1" }, "files": [ diff --git a/plugins/search-backend-node/src/IndexBuilder.ts b/plugins/search-backend-node/src/IndexBuilder.ts index 3e1dae1c2f..0ba9ba0059 100644 --- a/plugins/search-backend-node/src/IndexBuilder.ts +++ b/plugins/search-backend-node/src/IndexBuilder.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { DocumentDecoratorFactory, DocumentTypeInfo, @@ -38,12 +39,12 @@ export class IndexBuilder { private searchEngine: SearchEngine; private logger: Logger; - constructor({ logger, searchEngine }: IndexBuilderOptions) { + constructor(options: IndexBuilderOptions) { this.collators = {}; this.decorators = {}; this.documentTypes = {}; - this.logger = logger; - this.searchEngine = searchEngine; + this.logger = options.logger; + this.searchEngine = options.searchEngine; } /** @@ -64,7 +65,9 @@ export class IndexBuilder { * Makes the index builder aware of a collator that should be executed at the * given refresh interval. */ - addCollator({ factory, schedule }: RegisterCollatorParameters): void { + addCollator(options: RegisterCollatorParameters): void { + const { factory, schedule } = options; + this.logger.info( `Added ${factory.constructor.name} collator factory for type ${factory.type}`, ); @@ -82,7 +85,8 @@ export class IndexBuilder { * the decorator, it will be applied to documents from all known collators, * otherwise it will only be applied to documents of the given types. */ - addDecorator({ factory }: RegisterDecoratorParameters): void { + addDecorator(options: RegisterDecoratorParameters): void { + const { factory } = options; const types = factory.types || ['*']; this.logger.info( `Added decorator ${factory.constructor.name} to types ${types.join( diff --git a/plugins/search-backend-node/src/Scheduler.ts b/plugins/search-backend-node/src/Scheduler.ts index 404823c53a..872a410808 100644 --- a/plugins/search-backend-node/src/Scheduler.ts +++ b/plugins/search-backend-node/src/Scheduler.ts @@ -43,8 +43,8 @@ export class Scheduler { private abortController: AbortController; private isRunning: boolean; - constructor({ logger }: { logger: Logger }) { - this.logger = logger; + constructor(options: { logger: Logger }) { + this.logger = options.logger; this.schedule = {}; this.abortController = new AbortController(); this.isRunning = false; @@ -55,7 +55,9 @@ export class Scheduler { * When running the tasks, the scheduler waits at least for the time specified * in the interval once the task was completed, before running it again. */ - addToSchedule({ id, task, scheduledRunner }: ScheduleTaskParameters) { + addToSchedule(options: ScheduleTaskParameters) { + const { id, task, scheduledRunner } = options; + if (this.isRunning) { throw new Error( 'Cannot add task to schedule that has already been started.', diff --git a/plugins/search-backend-node/src/engines/LunrSearchEngine.ts b/plugins/search-backend-node/src/engines/LunrSearchEngine.ts index ec8550d721..4d6779950f 100644 --- a/plugins/search-backend-node/src/engines/LunrSearchEngine.ts +++ b/plugins/search-backend-node/src/engines/LunrSearchEngine.ts @@ -43,7 +43,7 @@ type LunrResultEnvelope = { }; /** - * Translator repsonsible for translating search term and filters to a query that the Lunr Search Engine understands. + * Translator responsible for translating search term and filters to a query that the Lunr Search Engine understands. * @public */ export type LunrQueryTranslator = (query: SearchQuery) => ConcreteLunrQuery; @@ -59,8 +59,8 @@ export class LunrSearchEngine implements SearchEngine { protected highlightPreTag: string; protected highlightPostTag: string; - constructor({ logger }: { logger: Logger }) { - this.logger = logger; + constructor(options: { logger: Logger }) { + this.logger = options.logger; this.docStore = {}; const uuidTag = uuid(); this.highlightPreTag = `<${uuidTag}>`; diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index 019aa50ea8..6179dbff4f 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-backend +## 1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-search-backend-node@1.0.2-next.0 + - @backstage/plugin-auth-node@0.2.5-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-permission-node@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index 0e1efb11f6..0e1ec070e3 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend", "description": "The Backstage backend plugin that provides your backstage app with search", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,14 +23,14 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/plugin-auth-node": "^0.2.4", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-permission-node": "^0.6.4", - "@backstage/plugin-search-backend-node": "^1.0.1", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/plugin-auth-node": "^0.2.5-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-permission-node": "^0.6.5-next.0", + "@backstage/plugin-search-backend-node": "^1.0.2-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@backstage/types": "^1.0.0", "@types/express": "^4.17.6", "dataloader": "^2.0.0", @@ -43,7 +43,7 @@ "zod": "^3.11.6" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search-common/CHANGELOG.md b/plugins/search-common/CHANGELOG.md index 2f06e6da67..7f19edf98d 100644 --- a/plugins/search-common/CHANGELOG.md +++ b/plugins/search-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-search-common +## 1.0.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.4-next.0 + ## 1.0.0 ### Major Changes diff --git a/plugins/search-common/package.json b/plugins/search-common/package.json index ae643941b7..d0be6ddb43 100644 --- a/plugins/search-common/package.json +++ b/plugins/search-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-common", "description": "Common functionalities for Search, to be shared between various search-enabled plugins", - "version": "1.0.0", + "version": "1.0.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -40,10 +40,10 @@ }, "dependencies": { "@backstage/types": "^1.0.0", - "@backstage/plugin-permission-common": "^0.6.3" + "@backstage/plugin-permission-common": "^0.6.4-next.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1-next.0" + "@backstage/cli": "^0.18.2-next.0" }, "jest": { "roots": [ diff --git a/plugins/search-react/CHANGELOG.md b/plugins/search-react/CHANGELOG.md index d250b7ffe4..d5272d8410 100644 --- a/plugins/search-react/CHANGELOG.md +++ b/plugins/search-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-react +## 1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index 4ca61dba66..80234670e7 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-react", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,9 +31,9 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/version-bridge": "^1.0.1", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", @@ -48,8 +48,8 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/core-app-api": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", "@testing-library/jest-dom": "^5.10.1", diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 550073969d..25fc0fbd8c 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search +## 1.0.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index 11bbc4b1ae..a0b1370ec8 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search", "description": "The Backstage plugin that provides your backstage app with search", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,12 +35,12 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-react": "^1.0.1", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@backstage/version-bridge": "^1.0.1", @@ -57,10 +57,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -68,7 +68,7 @@ "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index d7327602f0..ddd7e4f358 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sentry +## 0.4.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.4.1 ### Patch Changes diff --git a/plugins/sentry/api-report.md b/plugins/sentry/api-report.md index e752eb2110..2a1b041546 100644 --- a/plugins/sentry/api-report.md +++ b/plugins/sentry/api-report.md @@ -14,36 +14,24 @@ import { InfoCardVariants } from '@backstage/core-components'; import { Options } from '@material-table/core'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-forgotten-export) The symbol "SentryPageProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntitySentryCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntitySentryCard: ({ - statsFor, - tableOptions, -}: SentryPageProps) => JSX.Element; +export const EntitySentryCard: (props: SentryPageProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "EntitySentryContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntitySentryContent: ({ - statsFor, - tableOptions, -}: SentryPageProps) => JSX.Element; +export const EntitySentryContent: (props: SentryPageProps) => JSX.Element; + +// @public (undocumented) +export type EventPoint = number[]; // @public export const isSentryAvailable: (entity: Entity) => boolean; -// Warning: (ae-missing-release-tag) "MockSentryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class MockSentryApi implements SentryApi { // (undocumented) fetchIssues(): Promise; } -// Warning: (ae-missing-release-tag) "ProductionSentryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ProductionSentryApi implements SentryApi { constructor( @@ -61,13 +49,9 @@ export class ProductionSentryApi implements SentryApi { ): Promise; } -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Router: ({ entity }: { entity: Entity }) => JSX.Element; +export const Router: (props: { entity: Entity }) => JSX.Element; -// Warning: (ae-missing-release-tag) "SentryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface SentryApi { // (undocumented) @@ -80,13 +64,14 @@ export interface SentryApi { ): Promise; } -// Warning: (ae-missing-release-tag) "sentryApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type SentryApiError = { + detail: string; +}; + // @public (undocumented) export const sentryApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "SentryIssue" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type SentryIssue = { platform: SentryPlatform; @@ -121,25 +106,32 @@ export type SentryIssue = { statusDetails: any; }; -// Warning: (ae-missing-release-tag) "SentryIssuesWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const SentryIssuesWidget: ({ - entity, - statsFor, - tableOptions, - variant, - query, -}: { +export type SentryIssueMetadata = { + function?: string; + type?: string; + value?: string; + filename?: string; +}; + +// @public (undocumented) +export const SentryIssuesWidget: (props: { entity: Entity; statsFor: '24h' | '14d' | ''; tableOptions: Options; - variant?: InfoCardVariants | undefined; - query?: string | undefined; + variant?: InfoCardVariants; + query?: string; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "sentryPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type SentryPageProps = { + statsFor?: '24h' | '14d' | ''; + tableOptions?: Options; +}; + +// @public (undocumented) +export type SentryPlatform = 'javascript' | 'javascript-react' | string; + // @public (undocumented) const sentryPlugin: BackstagePlugin< { @@ -151,10 +143,11 @@ const sentryPlugin: BackstagePlugin< export { sentryPlugin as plugin }; export { sentryPlugin }; -// Warnings were encountered during analysis: -// -// src/api/sentry-issue.d.ts:16:5 - (ae-forgotten-export) The symbol "SentryPlatform" needs to be exported by the entry point index.d.ts -// src/api/sentry-issue.d.ts:21:9 - (ae-forgotten-export) The symbol "EventPoint" needs to be exported by the entry point index.d.ts -// src/api/sentry-issue.d.ts:31:5 - (ae-forgotten-export) The symbol "SentryIssueMetadata" needs to be exported by the entry point index.d.ts -// src/api/sentry-issue.d.ts:44:5 - (ae-forgotten-export) The symbol "SentryProject" needs to be exported by the entry point index.d.ts +// @public (undocumented) +export type SentryProject = { + platform: SentryPlatform; + slug: string; + id: string; + name: string; +}; ``` diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index afcf15c1c5..c0d3df778f 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sentry", "description": "A Backstage plugin that integrates towards Sentry", - "version": "0.4.1", + "version": "0.4.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,9 +36,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-table/core": "^3.1.0", "@material-ui/core": "^4.12.2", @@ -53,10 +53,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -65,7 +65,7 @@ "@types/node": "^16.11.26", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/sentry/src/api/index.ts b/plugins/sentry/src/api/index.ts index 66ac07eda2..9ae6d4eea2 100644 --- a/plugins/sentry/src/api/index.ts +++ b/plugins/sentry/src/api/index.ts @@ -17,5 +17,12 @@ export * from './mock'; export type { SentryApi } from './sentry-api'; export { sentryApiRef } from './sentry-api'; -export type { SentryIssue } from './sentry-issue'; +export type { + EventPoint, + SentryApiError, + SentryIssue, + SentryIssueMetadata, + SentryPlatform, + SentryProject, +} from './sentry-issue'; export { ProductionSentryApi } from './production-api'; diff --git a/plugins/sentry/src/api/mock/mock-api.ts b/plugins/sentry/src/api/mock/mock-api.ts index af64d8656a..4f9f4254fc 100644 --- a/plugins/sentry/src/api/mock/mock-api.ts +++ b/plugins/sentry/src/api/mock/mock-api.ts @@ -30,9 +30,12 @@ function getMockIssue(): SentryIssue { stats: randomizedStats, }; } + function getMockIssues(number: number): SentryIssue[] { return new Array(number).fill(0).map(getMockIssue); } + +/** @public */ export class MockSentryApi implements SentryApi { fetchIssues(): Promise { return new Promise(resolve => { diff --git a/plugins/sentry/src/api/production-api.ts b/plugins/sentry/src/api/production-api.ts index da77f8a47d..7fe4afdf98 100644 --- a/plugins/sentry/src/api/production-api.ts +++ b/plugins/sentry/src/api/production-api.ts @@ -20,6 +20,7 @@ import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { getProjectSlug, getOrganization } from './annotations'; +/** @public */ export class ProductionSentryApi implements SentryApi { constructor( private readonly discoveryApi: DiscoveryApi, diff --git a/plugins/sentry/src/api/sentry-api.ts b/plugins/sentry/src/api/sentry-api.ts index 507803804d..73f1301cad 100644 --- a/plugins/sentry/src/api/sentry-api.ts +++ b/plugins/sentry/src/api/sentry-api.ts @@ -18,10 +18,12 @@ import { SentryIssue } from './sentry-issue'; import { createApiRef } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; +/** @public */ export const sentryApiRef = createApiRef({ id: 'plugin.sentry.service', }); +/** @public */ export interface SentryApi { fetchIssues( entity: Entity, diff --git a/plugins/sentry/src/api/sentry-issue.ts b/plugins/sentry/src/api/sentry-issue.ts index ef0e99adb8..e25cf88829 100644 --- a/plugins/sentry/src/api/sentry-issue.ts +++ b/plugins/sentry/src/api/sentry-issue.ts @@ -14,24 +14,29 @@ * limitations under the License. */ -type SentryPlatform = 'javascript' | 'javascript-react' | string; +/** @public */ +export type SentryPlatform = 'javascript' | 'javascript-react' | string; -type EventPoint = number[]; +/** @public */ +export type EventPoint = number[]; -type SentryProject = { +/** @public */ +export type SentryProject = { platform: SentryPlatform; slug: string; id: string; name: string; }; -type SentryIssueMetadata = { +/** @public */ +export type SentryIssueMetadata = { function?: string; type?: string; value?: string; filename?: string; }; +/** @public */ export type SentryIssue = { platform: SentryPlatform; lastSeen: string; @@ -65,6 +70,7 @@ export type SentryIssue = { statusDetails: any; }; +/** @public */ export type SentryApiError = { detail: string; }; diff --git a/plugins/sentry/src/components/Router.tsx b/plugins/sentry/src/components/Router.tsx index 2a3172824a..e683a6c7fa 100644 --- a/plugins/sentry/src/components/Router.tsx +++ b/plugins/sentry/src/components/Router.tsx @@ -19,14 +19,15 @@ import { Entity } from '@backstage/catalog-model'; import { Route, Routes } from 'react-router'; import { SentryIssuesWidget } from './SentryIssuesWidget'; -export const Router = ({ entity }: { entity: Entity }) => { +/** @public */ +export const Router = (props: { entity: Entity }) => { return ( ; }; -const SentryIssuesTable = ({ - sentryIssues, - statsFor, - tableOptions, -}: SentryIssuesTableProps) => { +const SentryIssuesTable = (props: SentryIssuesTableProps) => { + const { sentryIssues, statsFor, tableOptions } = props; return (
; variant?: InfoCardVariants; query?: string; }) => { + const { + entity, + statsFor, + tableOptions, + variant = 'gridItem', + query = '', + } = props; const errorApi = useApi(errorApiRef); const sentryApi = useApi(sentryApiRef); diff --git a/plugins/sentry/src/extensions.tsx b/plugins/sentry/src/extensions.tsx index 2e3ab35519..2dc2f7fb9d 100644 --- a/plugins/sentry/src/extensions.tsx +++ b/plugins/sentry/src/extensions.tsx @@ -23,11 +23,13 @@ import { } from '@backstage/core-plugin-api'; import { Options } from '@material-table/core'; -type SentryPageProps = { +/** @public */ +export type SentryPageProps = { statsFor?: '24h' | '14d' | ''; tableOptions?: Options; }; +/** @public */ export const EntitySentryContent = sentryPlugin.provide( createRoutableExtension({ name: 'EntitySentryContent', @@ -35,7 +37,7 @@ export const EntitySentryContent = sentryPlugin.provide( component: () => import('./components/SentryIssuesWidget').then( ({ SentryIssuesWidget }) => { - const SentryPage = ({ statsFor, tableOptions }: SentryPageProps) => { + const SentryPage = (props: SentryPageProps) => { const { entity } = useEntity(); const defaultOptions: Options = { padding: 'dense', @@ -46,8 +48,8 @@ export const EntitySentryContent = sentryPlugin.provide( return ( ); }; @@ -57,6 +59,7 @@ export const EntitySentryContent = sentryPlugin.provide( }), ); +/** @public */ export const EntitySentryCard = sentryPlugin.provide( createComponentExtension({ name: 'EntitySentryCard', @@ -64,17 +67,14 @@ export const EntitySentryCard = sentryPlugin.provide( lazy: () => import('./components/SentryIssuesWidget').then( ({ SentryIssuesWidget }) => { - const SentryCard = ({ - statsFor, - tableOptions, - }: SentryPageProps) => { + const SentryCard = (props: SentryPageProps) => { const { entity } = useEntity(); return ( ; } -// Warning: (ae-missing-release-tag) "Shortcut" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type Shortcut = { id: string; @@ -40,8 +36,6 @@ export type Shortcut = { title: string; }; -// Warning: (ae-missing-release-tag) "ShortcutApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ShortcutApi { add(shortcut: Omit): Promise; @@ -52,18 +46,12 @@ export interface ShortcutApi { update(shortcut: Shortcut): Promise; } -// Warning: (ae-missing-release-tag) "Shortcuts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const Shortcuts: (props: ShortcutsProps) => JSX.Element; -// Warning: (ae-missing-release-tag) "shortcutsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const shortcutsApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "shortcutsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const shortcutsPlugin: BackstagePlugin<{}, {}, {}>; diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index 46f75c010d..f02a7ba68a 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-shortcuts", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", - "version": "0.3.0", + "version": "0.3.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,8 +24,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", "@material-ui/core": "^4.12.2", @@ -42,17 +42,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/shortcuts/src/api/LocalStoredShortcuts.ts b/plugins/shortcuts/src/api/LocalStoredShortcuts.ts index 82f4b7dd1a..9f3561be67 100644 --- a/plugins/shortcuts/src/api/LocalStoredShortcuts.ts +++ b/plugins/shortcuts/src/api/LocalStoredShortcuts.ts @@ -23,6 +23,8 @@ import Observable from 'zen-observable'; /** * Implementation of the ShortcutApi that uses the StorageApi to store shortcuts. + * + * @public */ export class LocalStoredShortcuts implements ShortcutApi { constructor(private readonly storageApi: StorageApi) {} diff --git a/plugins/shortcuts/src/api/ShortcutApi.ts b/plugins/shortcuts/src/api/ShortcutApi.ts index 1f93baa66c..96c5de1697 100644 --- a/plugins/shortcuts/src/api/ShortcutApi.ts +++ b/plugins/shortcuts/src/api/ShortcutApi.ts @@ -18,10 +18,12 @@ import { Shortcut } from '../types'; import { createApiRef } from '@backstage/core-plugin-api'; import { Observable } from '@backstage/types'; +/** @public */ export const shortcutsApiRef = createApiRef({ id: 'plugin.shortcuts.api', }); +/** @public */ export interface ShortcutApi { /** * Returns an Observable that will subscribe to changes. diff --git a/plugins/shortcuts/src/plugin.ts b/plugins/shortcuts/src/plugin.ts index d20cfa8401..2b0d0559e0 100644 --- a/plugins/shortcuts/src/plugin.ts +++ b/plugins/shortcuts/src/plugin.ts @@ -22,6 +22,7 @@ import { storageApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const shortcutsPlugin = createPlugin({ id: 'shortcuts', apis: [ @@ -34,6 +35,7 @@ export const shortcutsPlugin = createPlugin({ ], }); +/** @public */ export const Shortcuts = shortcutsPlugin.provide( createComponentExtension({ name: 'Shortcuts', diff --git a/plugins/shortcuts/src/types.ts b/plugins/shortcuts/src/types.ts index 2421f0e369..75ef561f74 100644 --- a/plugins/shortcuts/src/types.ts +++ b/plugins/shortcuts/src/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type Shortcut = { id: string; url: string; diff --git a/plugins/sonarqube-backend/CHANGELOG.md b/plugins/sonarqube-backend/CHANGELOG.md index 06b98d9044..19faf29088 100644 --- a/plugins/sonarqube-backend/CHANGELOG.md +++ b/plugins/sonarqube-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-sonarqube-backend +## 0.1.1-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/sonarqube-backend/api-report.md b/plugins/sonarqube-backend/api-report.md index f4c48cadce..0fbd463cf3 100644 --- a/plugins/sonarqube-backend/api-report.md +++ b/plugins/sonarqube-backend/api-report.md @@ -13,13 +13,10 @@ export function createRouter(options: RouterOptions): Promise; // @public export class DefaultSonarqubeInfoProvider implements SonarqubeInfoProvider { static fromConfig(config: Config): DefaultSonarqubeInfoProvider; - getBaseUrl({ instanceName }?: { instanceName?: string }): { + getBaseUrl(options?: { instanceName?: string }): { baseUrl: string; }; - getFindings({ - componentKey, - instanceName, - }: { + getFindings(options: { componentKey: string; instanceName?: string; }): Promise; @@ -35,9 +32,7 @@ export interface RouterOptions { export class SonarqubeConfig { constructor(instances: SonarqubeInstanceConfig[]); static fromConfig(config: Config): SonarqubeConfig; - getInstanceConfig({ - sonarqubeName, - }?: { + getInstanceConfig(options?: { sonarqubeName?: string; }): SonarqubeInstanceConfig; // (undocumented) @@ -52,13 +47,10 @@ export interface SonarqubeFindings { // @public export interface SonarqubeInfoProvider { - getBaseUrl({ instanceName }?: { instanceName?: string }): { + getBaseUrl(options?: { instanceName?: string }): { baseUrl: string; }; - getFindings({ - componentKey, - instanceName, - }: { + getFindings(options: { componentKey: string; instanceName?: string; }): Promise; diff --git a/plugins/sonarqube-backend/package.json b/plugins/sonarqube-backend/package.json index a5046136aa..6f32e36331 100644 --- a/plugins/sonarqube-backend/package.json +++ b/plugins/sonarqube-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sonarqube-backend", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "@types/express": "*", @@ -34,10 +34,10 @@ "yn": "^5.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@types/supertest": "^2.0.12", - "msw": "^0.44.2", + "msw": "^0.45.0", "supertest": "^6.2.4" }, "files": [ diff --git a/plugins/sonarqube-backend/src/service/sonarqubeInfoProvider.ts b/plugins/sonarqube-backend/src/service/sonarqubeInfoProvider.ts index 7027738d2c..2b96e6764e 100644 --- a/plugins/sonarqube-backend/src/service/sonarqubeInfoProvider.ts +++ b/plugins/sonarqube-backend/src/service/sonarqubeInfoProvider.ts @@ -30,7 +30,7 @@ export interface SonarqubeInfoProvider { * @param instanceName - Name of the sonarqube instance to get the info from * @returns the url of the instance */ - getBaseUrl({ instanceName }?: { instanceName?: string }): { baseUrl: string }; + getBaseUrl(options?: { instanceName?: string }): { baseUrl: string }; /** * Query the sonarqube instance corresponding to the instanceName to get all @@ -43,10 +43,7 @@ export interface SonarqubeInfoProvider { * @returns All measures with the analysis date. Will return undefined if we * can't provide the full response */ - getFindings({ - componentKey, - instanceName, - }: { + getFindings(options: { componentKey: string; instanceName?: string; }): Promise; @@ -185,9 +182,10 @@ export class SonarqubeConfig { * @returns The requested Sonarqube instance. * @throws Error when no default config could be found or the requested name couldn't be found in config. */ - getInstanceConfig({ - sonarqubeName, - }: { sonarqubeName?: string } = {}): SonarqubeInstanceConfig { + getInstanceConfig( + options: { sonarqubeName?: string } = {}, + ): SonarqubeInstanceConfig { + const { sonarqubeName } = options; const DEFAULT_SONARQUBE_NAME = 'default'; if (!sonarqubeName || sonarqubeName === DEFAULT_SONARQUBE_NAME) { @@ -303,11 +301,11 @@ export class DefaultSonarqubeInfoProvider implements SonarqubeInfoProvider { * {@inheritDoc SonarqubeInfoProvider.getBaseUrl} * @throws Error If configuration can't be retrieved. */ - getBaseUrl({ instanceName }: { instanceName?: string } = {}): { + getBaseUrl(options: { instanceName?: string } = {}): { baseUrl: string; } { const instanceConfig = this.config.getInstanceConfig({ - sonarqubeName: instanceName, + sonarqubeName: options.instanceName, }); return { baseUrl: instanceConfig.baseUrl }; } @@ -316,13 +314,11 @@ export class DefaultSonarqubeInfoProvider implements SonarqubeInfoProvider { * {@inheritDoc SonarqubeInfoProvider.getFindings} * @throws Error If configuration can't be retrieved. */ - async getFindings({ - componentKey, - instanceName, - }: { + async getFindings(options: { componentKey: string; instanceName?: string; }): Promise { + const { componentKey, instanceName } = options; const { baseUrl, apiKey } = this.config.getInstanceConfig({ sonarqubeName: instanceName, }); diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 9181ae3fcf..946c9701ed 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sonarqube +## 0.4.1-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.4.0 ### Minor Changes diff --git a/plugins/sonarqube/api-report.md b/plugins/sonarqube/api-report.md index 06e4b8578e..e0a51479a4 100644 --- a/plugins/sonarqube/api-report.md +++ b/plugins/sonarqube/api-report.md @@ -9,46 +9,29 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { InfoCardVariants } from '@backstage/core-components'; -// Warning: (ae-missing-release-tag) "EntitySonarQubeCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const EntitySonarQubeCard: ({ - variant, - duplicationRatings, -}: { - variant?: InfoCardVariants | undefined; - duplicationRatings?: - | { - greaterThan: number; - rating: '1.0' | '2.0' | '3.0' | '4.0' | '5.0'; - }[] - | undefined; -}) => JSX.Element; +export type DuplicationRating = { + greaterThan: number; + rating: '1.0' | '2.0' | '3.0' | '4.0' | '5.0'; +}; -// Warning: (ae-missing-release-tag) "isSonarQubeAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const isSonarQubeAvailable: (entity: Entity) => boolean; - -// Warning: (ae-missing-release-tag) "SonarQubeCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) -export const SonarQubeCard: ({ - variant, - duplicationRatings, -}: { +export const EntitySonarQubeCard: (props: { variant?: InfoCardVariants | undefined; duplicationRatings?: DuplicationRating[] | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "sonarQubePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const isSonarQubeAvailable: (entity: Entity) => boolean; + +// @public (undocumented) +export const SonarQubeCard: (props: { + variant?: InfoCardVariants; + duplicationRatings?: DuplicationRating[]; +}) => JSX.Element; + // @public (undocumented) const sonarQubePlugin: BackstagePlugin<{}, {}, {}>; export { sonarQubePlugin as plugin }; export { sonarQubePlugin }; - -// Warnings were encountered during analysis: -// -// src/components/SonarQubeCard/SonarQubeCard.d.ts:9:5 - (ae-forgotten-export) The symbol "DuplicationRating" needs to be exported by the entry point index.d.ts ``` diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 2944e40894..5bd8a088a6 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.4.0", + "version": "0.4.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,9 +37,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -53,16 +53,16 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/sonarqube/src/api/SonarQubeApi.ts b/plugins/sonarqube/src/api/SonarQubeApi.ts index 271f1d8e8e..9dbb6331dd 100644 --- a/plugins/sonarqube/src/api/SonarQubeApi.ts +++ b/plugins/sonarqube/src/api/SonarQubeApi.ts @@ -38,10 +38,7 @@ export const sonarQubeApiRef = createApiRef({ }); export type SonarQubeApi = { - getFindingSummary({ - componentKey, - projectInstance, - }: { + getFindingSummary(options: { componentKey?: string; projectInstance?: string; }): Promise; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx index af91bc5469..b32a66aaa3 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx @@ -32,7 +32,6 @@ import { Percentage } from './Percentage'; import { Rating } from './Rating'; import { RatingCard } from './RatingCard'; import { Value } from './Value'; - import { EmptyState, InfoCard, @@ -40,7 +39,6 @@ import { MissingAnnotationEmptyState, Progress, } from '@backstage/core-components'; - import { useApi } from '@backstage/core-plugin-api'; const useStyles = makeStyles(theme => ({ @@ -72,7 +70,8 @@ const useStyles = makeStyles(theme => ({ }, })); -type DuplicationRating = { +/** @public */ +export type DuplicationRating = { greaterThan: number; rating: '1.0' | '2.0' | '3.0' | '4.0' | '5.0'; }; @@ -85,13 +84,15 @@ const defaultDuplicationRatings: DuplicationRating[] = [ { greaterThan: 20, rating: '5.0' }, ]; -export const SonarQubeCard = ({ - variant = 'gridItem', - duplicationRatings = defaultDuplicationRatings, -}: { +/** @public */ +export const SonarQubeCard = (props: { variant?: InfoCardVariants; duplicationRatings?: DuplicationRating[]; }) => { + const { + variant = 'gridItem', + duplicationRatings = defaultDuplicationRatings, + } = props; const { entity } = useEntity(); const sonarQubeApi = useApi(sonarQubeApiRef); diff --git a/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx b/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx index 58fb401ba1..a166f62a89 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/Value.tsx @@ -27,8 +27,7 @@ const useStyles = makeStyles((theme: BackstageTheme) => { }; }); -export const Value = ({ value }: { value?: string }) => { +export const Value = (props: { value?: string }) => { const classes = useStyles(); - - return {value}; + return {props.value}; }; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/index.ts b/plugins/sonarqube/src/components/SonarQubeCard/index.ts index 44ab809439..307a9abc41 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/index.ts +++ b/plugins/sonarqube/src/components/SonarQubeCard/index.ts @@ -14,4 +14,5 @@ * limitations under the License. */ +export type { DuplicationRating } from './SonarQubeCard'; export { SonarQubeCard } from './SonarQubeCard'; diff --git a/plugins/sonarqube/src/components/useProjectKey.ts b/plugins/sonarqube/src/components/useProjectKey.ts index 7a5a428f49..59a572a6c4 100644 --- a/plugins/sonarqube/src/components/useProjectKey.ts +++ b/plugins/sonarqube/src/components/useProjectKey.ts @@ -19,6 +19,7 @@ import { Entity } from '@backstage/catalog-model'; export const SONARQUBE_PROJECT_KEY_ANNOTATION = 'sonarqube.org/project-key'; export const SONARQUBE_PROJECT_INSTANCE_SEPARATOR = '/'; +/** @public */ export const isSonarQubeAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[SONARQUBE_PROJECT_KEY_ANNOTATION]); diff --git a/plugins/sonarqube/src/plugin.ts b/plugins/sonarqube/src/plugin.ts index 4ac49b2350..0ea62de492 100644 --- a/plugins/sonarqube/src/plugin.ts +++ b/plugins/sonarqube/src/plugin.ts @@ -23,6 +23,7 @@ import { identityApiRef, } from '@backstage/core-plugin-api'; +/** @public */ export const sonarQubePlugin = createPlugin({ id: 'sonarqube', apis: [ @@ -41,6 +42,7 @@ export const sonarQubePlugin = createPlugin({ ], }); +/** @public */ export const EntitySonarQubeCard = sonarQubePlugin.provide( createComponentExtension({ name: 'EntitySonarQubeCard', diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index 9bedb8334b..9dfaaf7751 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-splunk-on-call +## 0.3.33-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.3.32 ### Patch Changes diff --git a/plugins/splunk-on-call/api-report.md b/plugins/splunk-on-call/api-report.md index b24a68e07a..e0609c5b82 100644 --- a/plugins/splunk-on-call/api-report.md +++ b/plugins/splunk-on-call/api-report.md @@ -12,62 +12,207 @@ import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-forgotten-export) The symbol "EntitySplunkOnCallCardProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "EntitySplunkOnCallCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type ClientApiConfig = { + eventsRestEndpoint: string | null; + discoveryApi: DiscoveryApi; +}; + // @public (undocumented) export const EntitySplunkOnCallCard: ( props: EntitySplunkOnCallCardProps, ) => JSX.Element; -// Warning: (ae-missing-release-tag) "isSplunkOnCallAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type EntitySplunkOnCallCardProps = { + readOnly?: boolean; +}; + +// @public (undocumented) +export type EscalationPolicyInfo = { + policy: EscalationPolicySummary; + team?: EscalationPolicyTeam; +}; + +// @public (undocumented) +export type EscalationPolicyResponse = { + policies: EscalationPolicyInfo[]; +}; + +// @public (undocumented) +export type EscalationPolicySummary = { + name: string; + slug: string; + _selfUrl: string; +}; + +// @public (undocumented) +export type EscalationPolicyTeam = { + name: string; + slug: string; +}; + +// @public (undocumented) +export type Incident = { + incidentNumber?: string; + startTime?: string; + currentPhase: IncidentPhase; + entityState?: string; + entityType?: string; + routingKey?: string; + alertCount?: number; + lastAlertTime?: string; + lastAlertId?: string; + entityId: string; + host?: string; + service?: string; + pagedUsers?: string[]; + pagedTeams?: string[]; + entityDisplayName?: string; + pagedPolicies?: EscalationPolicyInfo[]; + transitions?: IncidentTransition[]; + firstAlertUuid?: string; + monitorName?: string; + monitorType?: string; + incidentLink?: string; +}; + +// @public (undocumented) +export type IncidentPhase = 'UNACKED' | 'ACKED' | 'RESOLVED'; + +// @public (undocumented) +export type IncidentsResponse = { + incidents: Incident[]; +}; + +// @public (undocumented) +export type IncidentTransition = { + name?: string; + at?: string; + by?: string; + message?: string; + manually?: boolean; + alertId?: string; + alertUrl?: string; +}; + // @public (undocumented) export const isSplunkOnCallAvailable: (entity: Entity) => boolean; -// Warning: (ae-forgotten-export) The symbol "SplunkOnCallApi" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "splunkOnCallApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type ListRoutingKeyResponse = { + routingKeys: RoutingKey[]; + _selfUrl?: string; +}; + +// @public (undocumented) +export type ListUserResponse = { + users: User[]; + _selfUrl?: string; +}; + +// @public (undocumented) +export type MessageType = + | 'CRITICAL' + | 'WARNING' + | 'ACKNOWLEDGEMENT' + | 'INFO' + | 'RECOVERY'; + +// @public (undocumented) +export type OnCall = { + team?: OnCallTeamResource; + oncallNow?: OnCallNowResource[]; +}; + +// @public (undocumented) +export type OnCallEscalationPolicyResource = { + name?: string; + slug?: string; +}; + +// @public (undocumented) +export type OnCallNowResource = { + escalationPolicy?: OnCallEscalationPolicyResource; + users?: OnCallUsersResource[]; +}; + +// @public (undocumented) +export type OnCallsResponse = { + teamsOnCall: OnCall[]; +}; + +// @public (undocumented) +export type OnCallTeamResource = { + name?: string; + slug?: string; +}; + +// @public (undocumented) +export type OnCallUser = { + username?: string; +}; + +// @public (undocumented) +export type OnCallUsersResource = { + onCalluser?: OnCallUser; +}; + +// @public (undocumented) +export type RequestOptions = { + method: string; + headers: HeadersInit; + body?: BodyInit; +}; + +// @public (undocumented) +export type RoutingKey = { + routingKey: string; + targets: RoutingKeyTarget[]; + isDefault: boolean; +}; + +// @public (undocumented) +export type RoutingKeyTarget = { + policyName: string; + policySlug: string; + _teamUrl: string; +}; + +// @public (undocumented) +export interface SplunkOnCallApi { + getEscalationPolicies(): Promise; + getIncidents(): Promise; + getOnCallUsers(): Promise; + getRoutingKeys(): Promise; + getTeams(): Promise; + getUsers(): Promise; + incidentAction(request: TriggerAlarmRequest): Promise; +} + // @public (undocumented) export const splunkOnCallApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "SplunkOnCallClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class SplunkOnCallClient implements SplunkOnCallApi { - // Warning: (ae-forgotten-export) The symbol "ClientApiConfig" needs to be exported by the entry point index.d.ts constructor(config: ClientApiConfig); // (undocumented) static fromConfig( configApi: ConfigApi, discoveryApi: DiscoveryApi, ): SplunkOnCallClient; - // Warning: (ae-forgotten-export) The symbol "EscalationPolicyInfo" needs to be exported by the entry point index.d.ts - // // (undocumented) getEscalationPolicies(): Promise; - // Warning: (ae-forgotten-export) The symbol "Incident" needs to be exported by the entry point index.d.ts - // // (undocumented) getIncidents(): Promise; - // Warning: (ae-forgotten-export) The symbol "OnCall" needs to be exported by the entry point index.d.ts - // // (undocumented) getOnCallUsers(): Promise; - // Warning: (ae-forgotten-export) The symbol "RoutingKey" needs to be exported by the entry point index.d.ts - // // (undocumented) getRoutingKeys(): Promise; - // Warning: (ae-forgotten-export) The symbol "Team" needs to be exported by the entry point index.d.ts - // // (undocumented) getTeams(): Promise; - // Warning: (ae-forgotten-export) The symbol "User" needs to be exported by the entry point index.d.ts - // // (undocumented) getUsers(): Promise; - // Warning: (ae-forgotten-export) The symbol "TriggerAlarmRequest" needs to be exported by the entry point index.d.ts - // // (undocumented) incidentAction({ routingKey, @@ -79,8 +224,6 @@ export class SplunkOnCallClient implements SplunkOnCallApi { }: TriggerAlarmRequest): Promise; } -// Warning: (ae-missing-release-tag) "SplunkOnCallPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const SplunkOnCallPage: { ({ title, subtitle, pageTitle }: SplunkOnCallPageProps): JSX.Element; @@ -91,8 +234,13 @@ export const SplunkOnCallPage: { }; }; -// Warning: (ae-missing-release-tag) "splunkOnCallPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type SplunkOnCallPageProps = { + title?: string; + subtitle?: string; + pageTitle?: string; +}; + // @public (undocumented) const splunkOnCallPlugin: BackstagePlugin< { @@ -104,12 +252,42 @@ const splunkOnCallPlugin: BackstagePlugin< export { splunkOnCallPlugin as plugin }; export { splunkOnCallPlugin }; -// Warning: (ae-missing-release-tag) "UnauthorizedError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type Team = { + name?: string; + slug?: string; + memberCount?: number; + version?: number; + isDefaultTeam?: boolean; + _selfUrl?: string; + _policiesUrl?: string; + _membersUrl?: string; + _adminsUrl?: string; +}; + +// @public (undocumented) +export type TriggerAlarmRequest = { + routingKey?: string; + incidentType: MessageType; + incidentId?: string; + incidentDisplayName?: string; + incidentMessage?: string; + incidentStartTime?: number; +}; + // @public (undocumented) export class UnauthorizedError extends Error {} -// Warnings were encountered during analysis: -// -// src/plugin.d.ts:7:5 - (ae-forgotten-export) The symbol "SplunkOnCallPageProps" needs to be exported by the entry point index.d.ts +// @public (undocumented) +export type User = { + firstName?: string; + lastName?: string; + displayName?: string; + username?: string; + email?: string; + createdAt?: string; + passwordLastUpdated?: string; + verified?: boolean; + _selfUrl?: string; +}; ``` diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index ef287bfc64..0bf2d7daed 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-splunk-on-call", "description": "A Backstage plugin that integrates towards Splunk On-Call", - "version": "0.3.32", + "version": "0.3.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,9 +35,9 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -51,10 +51,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -62,7 +62,7 @@ "@types/luxon": "^3.0.0", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "configSchema": "config.d.ts", "files": [ diff --git a/plugins/splunk-on-call/src/api/client.ts b/plugins/splunk-on-call/src/api/client.ts index 6c0ff9bdc4..aa655a4772 100644 --- a/plugins/splunk-on-call/src/api/client.ts +++ b/plugins/splunk-on-call/src/api/client.ts @@ -39,12 +39,15 @@ import { ConfigApi, } from '@backstage/core-plugin-api'; +/** @public */ export class UnauthorizedError extends Error {} +/** @public */ export const splunkOnCallApiRef = createApiRef({ id: 'plugin.splunk-on-call.api', }); +/** @public */ export class SplunkOnCallClient implements SplunkOnCallApi { static fromConfig(configApi: ConfigApi, discoveryApi: DiscoveryApi) { const eventsRestEndpoint: string | null = diff --git a/plugins/splunk-on-call/src/api/index.ts b/plugins/splunk-on-call/src/api/index.ts index 8b38168fc9..ecfb7acca7 100644 --- a/plugins/splunk-on-call/src/api/index.ts +++ b/plugins/splunk-on-call/src/api/index.ts @@ -19,4 +19,4 @@ export { splunkOnCallApiRef, UnauthorizedError, } from './client'; -export type { SplunkOnCallApi } from './types'; +export * from './types'; diff --git a/plugins/splunk-on-call/src/api/types.ts b/plugins/splunk-on-call/src/api/types.ts index 6a414d18bd..427eb8bbca 100644 --- a/plugins/splunk-on-call/src/api/types.ts +++ b/plugins/splunk-on-call/src/api/types.ts @@ -24,6 +24,7 @@ import { } from '../components/types'; import { DiscoveryApi } from '@backstage/core-plugin-api'; +/** @public */ export type MessageType = | 'CRITICAL' | 'WARNING' @@ -31,6 +32,7 @@ export type MessageType = | 'INFO' | 'RECOVERY'; +/** @public */ export type TriggerAlarmRequest = { routingKey?: string; incidentType: MessageType; @@ -40,6 +42,7 @@ export type TriggerAlarmRequest = { incidentStartTime?: number; }; +/** @public */ export interface SplunkOnCallApi { /** * Fetches a list of incidents @@ -77,33 +80,40 @@ export interface SplunkOnCallApi { getEscalationPolicies(): Promise; } +/** @public */ export type EscalationPolicyResponse = { policies: EscalationPolicyInfo[]; }; +/** @public */ export type ListUserResponse = { users: User[]; _selfUrl?: string; }; +/** @public */ export type ListRoutingKeyResponse = { routingKeys: RoutingKey[]; _selfUrl?: string; }; +/** @public */ export type IncidentsResponse = { incidents: Incident[]; }; +/** @public */ export type OnCallsResponse = { teamsOnCall: OnCall[]; }; +/** @public */ export type ClientApiConfig = { eventsRestEndpoint: string | null; discoveryApi: DiscoveryApi; }; +/** @public */ export type RequestOptions = { method: string; headers: HeadersInit; diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx index 4f6bcd9a0e..d635f7328f 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx @@ -99,6 +99,7 @@ export const MissingEventsRestEndpoint = () => ( ); +/** @public */ export const isSplunkOnCallAvailable = (entity: Entity) => Boolean(entity.metadata.annotations?.[SPLUNK_ON_CALL_TEAM]) || Boolean(entity.metadata.annotations?.[SPLUNK_ON_CALL_ROUTING_KEY]); diff --git a/plugins/splunk-on-call/src/components/SplunkOnCallPage.tsx b/plugins/splunk-on-call/src/components/SplunkOnCallPage.tsx index 1f5bb49410..0c8b223857 100644 --- a/plugins/splunk-on-call/src/components/SplunkOnCallPage.tsx +++ b/plugins/splunk-on-call/src/components/SplunkOnCallPage.tsx @@ -31,6 +31,7 @@ const useStyles = makeStyles(() => ({ }, })); +/** @public */ export type SplunkOnCallPageProps = { title?: string; subtitle?: string; diff --git a/plugins/splunk-on-call/src/components/index.ts b/plugins/splunk-on-call/src/components/index.ts new file mode 100644 index 0000000000..47fd7fbf27 --- /dev/null +++ b/plugins/splunk-on-call/src/components/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2022 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 type { SplunkOnCallPageProps } from './SplunkOnCallPage'; +export type { EntitySplunkOnCallCardProps } from './EntitySplunkOnCallCard'; +export { isSplunkOnCallAvailable } from './EntitySplunkOnCallCard'; +export * from './types'; diff --git a/plugins/splunk-on-call/src/components/types.ts b/plugins/splunk-on-call/src/components/types.ts index 0feefe8b03..7e83de84a7 100644 --- a/plugins/splunk-on-call/src/components/types.ts +++ b/plugins/splunk-on-call/src/components/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export type Team = { name?: string; slug?: string; @@ -26,34 +27,41 @@ export type Team = { _adminsUrl?: string; }; +/** @public */ export type OnCall = { team?: OnCallTeamResource; oncallNow?: OnCallNowResource[]; }; +/** @public */ export type OnCallTeamResource = { name?: string; slug?: string; }; +/** @public */ export type OnCallNowResource = { escalationPolicy?: OnCallEscalationPolicyResource; users?: OnCallUsersResource[]; }; +/** @public */ export type OnCallEscalationPolicyResource = { name?: string; slug?: string; }; +/** @public */ export type OnCallUsersResource = { onCalluser?: OnCallUser; }; +/** @public */ export type OnCallUser = { username?: string; }; +/** @public */ export type User = { firstName?: string; lastName?: string; @@ -66,8 +74,10 @@ export type User = { _selfUrl?: string; }; +/** @public */ export type IncidentPhase = 'UNACKED' | 'ACKED' | 'RESOLVED'; +/** @public */ export type Incident = { incidentNumber?: string; startTime?: string; @@ -92,11 +102,13 @@ export type Incident = { incidentLink?: string; }; +/** @public */ export type EscalationPolicyInfo = { policy: EscalationPolicySummary; team?: EscalationPolicyTeam; }; +/** @public */ export type IncidentTransition = { name?: string; at?: string; @@ -107,23 +119,27 @@ export type IncidentTransition = { alertUrl?: string; }; +/** @public */ export type EscalationPolicySummary = { name: string; slug: string; _selfUrl: string; }; +/** @public */ export type EscalationPolicyTeam = { name: string; slug: string; }; +/** @public */ export type RoutingKey = { routingKey: string; targets: RoutingKeyTarget[]; isDefault: boolean; }; +/** @public */ export type RoutingKeyTarget = { policyName: string; policySlug: string; diff --git a/plugins/splunk-on-call/src/index.ts b/plugins/splunk-on-call/src/index.ts index 917106504b..285e6c8f89 100644 --- a/plugins/splunk-on-call/src/index.ts +++ b/plugins/splunk-on-call/src/index.ts @@ -26,9 +26,5 @@ export { splunkOnCallPlugin as plugin, SplunkOnCallPage, } from './plugin'; -export { isSplunkOnCallAvailable } from './components/EntitySplunkOnCallCard'; -export { - SplunkOnCallClient, - splunkOnCallApiRef, - UnauthorizedError, -} from './api/client'; +export * from './components'; +export * from './api'; diff --git a/plugins/splunk-on-call/src/plugin.ts b/plugins/splunk-on-call/src/plugin.ts index 2256b382ee..f1fa08bfcc 100644 --- a/plugins/splunk-on-call/src/plugin.ts +++ b/plugins/splunk-on-call/src/plugin.ts @@ -26,6 +26,7 @@ import { export const rootRouteRef = createRouteRef({ id: 'splunk-on-call' }); +/** @public */ export const splunkOnCallPlugin = createPlugin({ id: 'splunk-on-call', apis: [ @@ -41,6 +42,7 @@ export const splunkOnCallPlugin = createPlugin({ }, }); +/** @public */ export const SplunkOnCallPage = splunkOnCallPlugin.provide( createRoutableExtension({ name: 'SplunkOnCallPage', @@ -50,6 +52,7 @@ export const SplunkOnCallPage = splunkOnCallPlugin.provide( }), ); +/** @public */ export const EntitySplunkOnCallCard = splunkOnCallPlugin.provide( createComponentExtension({ name: 'EntitySplunkOnCallCard', diff --git a/plugins/stack-overflow-backend/CHANGELOG.md b/plugins/stack-overflow-backend/CHANGELOG.md index 4ba519ba73..cb83e3205f 100644 --- a/plugins/stack-overflow-backend/CHANGELOG.md +++ b/plugins/stack-overflow-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-stack-overflow-backend +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/stack-overflow-backend/package.json b/plugins/stack-overflow-backend/package.json index 9f75578252..db883dbfd1 100644 --- a/plugins/stack-overflow-backend/package.json +++ b/plugins/stack-overflow-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-stack-overflow-backend", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@backstage/config": "^1.0.1", "qs": "^6.9.4", "cross-fetch": "^3.1.5", diff --git a/plugins/stack-overflow/CHANGELOG.md b/plugins/stack-overflow/CHANGELOG.md index 193f0f4b6e..2770402c01 100644 --- a/plugins/stack-overflow/CHANGELOG.md +++ b/plugins/stack-overflow/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-stack-overflow +## 0.1.5-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-home@0.4.25-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/stack-overflow/api-report.md b/plugins/stack-overflow/api-report.md index 9404c74700..81cfe1395b 100644 --- a/plugins/stack-overflow/api-report.md +++ b/plugins/stack-overflow/api-report.md @@ -6,14 +6,12 @@ /// import { BackstagePlugin } from '@backstage/core-plugin-api'; -import { ComponentRenderer } from '@backstage/plugin-home'; +import { CardExtensionProps } from '@backstage/plugin-home'; import { ReactNode } from 'react'; // @public export const HomePageStackOverflowQuestions: ( - props: ComponentRenderer & { - title?: string | undefined; - } & StackOverflowQuestionsContentProps, + props: CardExtensionProps, ) => JSX.Element; // @public diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index 27da0751f4..f6b7be12b9 100644 --- a/plugins/stack-overflow/package.json +++ b/plugins/stack-overflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-stack-overflow", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,10 +24,10 @@ }, "dependencies": { "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/plugin-home": "^0.4.24", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/plugin-home": "^0.4.25-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -42,15 +42,15 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index c6e8bd0d0a..6951f1d4ef 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + ## 0.1.19 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index 3a7191e429..912834c049 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "@backstage/plugin-tech-insights-common": "^0.2.6", - "@backstage/plugin-tech-insights-node": "^0.3.3", + "@backstage/plugin-tech-insights-node": "^0.3.4-next.0", "ajv": "^8.10.0", "json-rules-engine": "^6.1.2", "lodash": "^4.17.21", @@ -46,7 +46,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index a9178622a9..fcd617e04a 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-tech-insights-backend +## 0.5.2-next.0 + +### Patch Changes + +- 8872cc735d: Fixed a bug where the database option to skip migrations was ignored. +- 2e0689e536: Support for timeout in FactRetrieverRegistrationOptions +- 9e8e9f5243: Modify Tech insight initialization to expose FactRetrieverEngine. Enables users to trigger fact retrieval manually or reschedule retrievers on runtime. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/plugin-tech-insights-node@0.3.4-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/catalog-client@1.0.5-next.0 + ## 0.5.1 ### Patch Changes diff --git a/plugins/tech-insights-backend/api-report.md b/plugins/tech-insights-backend/api-report.md index dc90d76107..94ac35ad9f 100644 --- a/plugins/tech-insights-backend/api-report.md +++ b/plugins/tech-insights-backend/api-report.md @@ -5,6 +5,7 @@ ```ts import { CheckResult } from '@backstage/plugin-tech-insights-common'; import { Config } from '@backstage/config'; +import { Duration } from 'luxon'; import express from 'express'; import { FactChecker } from '@backstage/plugin-tech-insights-node'; import { FactCheckerFactory } from '@backstage/plugin-tech-insights-node'; @@ -12,6 +13,7 @@ import { FactLifecycle } from '@backstage/plugin-tech-insights-node'; import { FactRetriever } from '@backstage/plugin-tech-insights-node'; import { FactRetrieverRegistration } from '@backstage/plugin-tech-insights-node'; import { FactSchema } from '@backstage/plugin-tech-insights-node'; +import { HumanDuration } from '@backstage/backend-tasks'; import { Logger } from 'winston'; import { PluginDatabaseManager } from '@backstage/backend-common'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; @@ -45,11 +47,19 @@ export const entityMetadataFactRetriever: FactRetriever; // @public export const entityOwnershipFactRetriever: FactRetriever; +// @public +export interface FactRetrieverEngine { + getJobRegistration(ref: string): Promise; + schedule(): Promise; + triggerJob(ref: string): Promise; +} + // @public (undocumented) export type FactRetrieverRegistrationOptions = { cadence: string; factRetriever: FactRetriever; lifecycle?: FactLifecycle; + timeout?: Duration | HumanDuration; }; // @public (undocumented) @@ -92,6 +102,7 @@ export type TechInsightsContext< > = { factChecker?: FactChecker; persistenceContext: PersistenceContext; + factRetrieverEngine: FactRetrieverEngine; }; // @public (undocumented) diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index 194959d163..e9ef5f0c83 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.5.1", + "version": "0.5.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,15 +34,16 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "@backstage/plugin-tech-insights-common": "^0.2.6", - "@backstage/plugin-tech-insights-node": "^0.3.3", + "@backstage/plugin-tech-insights-node": "^0.3.4-next.0", "@types/express": "^4.17.6", + "@types/luxon": "^3.0.0", "express": "^4.17.1", "express-promise-router": "^4.1.0", "knex": "^2.0.0", @@ -54,10 +55,10 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", - "@types/supertest": "^2.0.8", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", "@types/semver": "^7.3.8", + "@types/supertest": "^2.0.8", "supertest": "^6.1.3", "wait-for-expect": "^3.0.2" }, diff --git a/plugins/tech-insights-backend/src/index.ts b/plugins/tech-insights-backend/src/index.ts index 66180b1006..28a922cd67 100644 --- a/plugins/tech-insights-backend/src/index.ts +++ b/plugins/tech-insights-backend/src/index.ts @@ -22,7 +22,7 @@ export type { TechInsightsOptions, TechInsightsContext, } from './service/techInsightsContextBuilder'; - +export type { FactRetrieverEngine } from './service/fact/FactRetrieverEngine'; export type { PersistenceContext } from './service/persistence/persistenceContext'; export { createFactRetrieverRegistration } from './service/fact/createFactRetriever'; export type { FactRetrieverRegistry } from './service/fact/FactRetrieverRegistry'; diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.test.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.test.ts index 131635a1de..3a9506ed46 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.test.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.test.ts @@ -21,7 +21,10 @@ import { TechInsightsStore, } from '@backstage/plugin-tech-insights-node'; import { FactRetrieverRegistry } from './FactRetrieverRegistry'; -import { FactRetrieverEngine } from './FactRetrieverEngine'; +import { + DefaultFactRetrieverEngine, + FactRetrieverEngine, +} from './FactRetrieverEngine'; import { DatabaseManager, getVoidLogger, @@ -131,7 +134,7 @@ describe('FactRetrieverEngine', () => { }; const manager = databaseManager as DatabaseManager; const scheduler = new TaskScheduler(manager, getVoidLogger()); - return await FactRetrieverEngine.create({ + return await DefaultFactRetrieverEngine.create({ factRetrieverContext: { logger: getVoidLogger(), config: ConfigReader.fromConfigs([]), diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts index f8ff3762dd..2d738b7de8 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverEngine.ts @@ -38,7 +38,36 @@ function duration(startTimestamp: [number, number]): string { return `${seconds.toFixed(1)}s`; } -export class FactRetrieverEngine { +/** + * @public + * + * FactRetrieverEngine responsible scheduling and running fact retrieval tasks. + */ +export interface FactRetrieverEngine { + /** + * Schedules fact retriever run cycles based on configuration provided in the registration. + * + * Default implementation uses backend-tasks to handle scheduling. This function can be called multiple + * times, where initial calls schedule the tasks and subsequents invocations update the schedules. + */ + schedule(): Promise; + + /** + * Provides possibility to manually run a fact retriever job and construct fact data + * + * @param ref - Reference to the task name stored in the executor database. By convention this is the fact retriever id + */ + triggerJob(ref: string): Promise; + + /** + * Exposes fact retriever job configuration information about previous and next runs and schedule + * + * @param ref - Reference to the task name stored in the executor database. By convention this is the fact retriever id + */ + getJobRegistration(ref: string): Promise; +} + +export class DefaultFactRetrieverEngine implements FactRetrieverEngine { private constructor( private readonly repository: TechInsightsStore, private readonly factRetrieverRegistry: FactRetrieverRegistry, @@ -69,7 +98,7 @@ export class FactRetrieverEngine { const retrievers = await factRetrieverRegistry.listRetrievers(); await Promise.all(retrievers.map(it => repository.insertFactSchema(it))); - return new FactRetrieverEngine( + return new DefaultFactRetrieverEngine( repository, factRetrieverRegistry, factRetrieverContext, diff --git a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts index 9f4be11bec..62adbad8e3 100644 --- a/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts +++ b/plugins/tech-insights-backend/src/service/fact/FactRetrieverRegistry.ts @@ -36,7 +36,7 @@ export interface FactRetrieverRegistry { /** * A basic in memory fact retriever registry. * - * You can replace this with a persistance based version using the FactRetrieverRegistry interface. + * You can replace this with a persistence based version using the FactRetrieverRegistry interface. * */ export class DefaultFactRetrieverRegistry implements FactRetrieverRegistry { diff --git a/plugins/tech-insights-backend/src/service/fact/createFactRetriever.ts b/plugins/tech-insights-backend/src/service/fact/createFactRetriever.ts index de49888e1b..aaba29ecb1 100644 --- a/plugins/tech-insights-backend/src/service/fact/createFactRetriever.ts +++ b/plugins/tech-insights-backend/src/service/fact/createFactRetriever.ts @@ -13,11 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { HumanDuration } from '@backstage/backend-tasks'; import { FactLifecycle, FactRetriever, FactRetrieverRegistration, } from '@backstage/plugin-tech-insights-node'; +import { Duration } from 'luxon'; /** * @public @@ -25,22 +27,24 @@ import { * @param cadence - cron expression to indicate when the fact retriever should be triggered * @param factRetriever - Implementation of fact retriever consisting of at least id, version, schema and handler * @param lifecycle - Optional lifecycle definition indicating the cleanup logic of facts when this retriever is run + * @param timeout - Optional duration to determine how long the fact retriever should be allowed to run, defaults to 5 minutes * */ export type FactRetrieverRegistrationOptions = { cadence: string; factRetriever: FactRetriever; lifecycle?: FactLifecycle; + timeout?: Duration | HumanDuration; }; /** * @public * * A helper function to construct fact retriever registrations. - * - * @param cadence - cron expression to indicate when the fact retriever should be triggered + * @param cadence - Cron expression to indicate when the fact retriever should be triggered * @param factRetriever - Implementation of fact retriever consisting of at least id, version, schema and handler * @param lifecycle - Optional lifecycle definition indicating the cleanup logic of facts when this retriever is run + * @param timeout - Optional duration to determine how long the fact retriever should be allowed to run, defaults to 5 minutes * * * @remarks @@ -64,10 +68,11 @@ export type FactRetrieverRegistrationOptions = { export function createFactRetrieverRegistration( options: FactRetrieverRegistrationOptions, ): FactRetrieverRegistration { - const { cadence, factRetriever, lifecycle } = options; + const { cadence, factRetriever, lifecycle, timeout } = options; return { cadence, factRetriever, lifecycle, + timeout, }; } diff --git a/plugins/tech-insights-backend/src/service/persistence/TechInsightsDatabase.test.ts b/plugins/tech-insights-backend/src/service/persistence/TechInsightsDatabase.test.ts index e7e8819c66..3cf6d08c65 100644 --- a/plugins/tech-insights-backend/src/service/persistence/TechInsightsDatabase.test.ts +++ b/plugins/tech-insights-backend/src/service/persistence/TechInsightsDatabase.test.ts @@ -15,7 +15,7 @@ */ import { DateTime, Duration } from 'luxon'; import { TechInsightsStore } from '@backstage/plugin-tech-insights-node'; -import { Knex } from 'knex'; +import { Knex as KnexType, Knex } from 'knex'; import { TestDatabases } from '@backstage/backend-test-utils'; import { getVoidLogger } from '@backstage/backend-common'; import { initializePersistenceContext } from './persistenceContext'; @@ -165,15 +165,28 @@ const multipleSameFacts = [ }, ]; +function createDatabaseManager( + client: KnexType, + skipMigrations: boolean = false, +) { + return { + getClient: async () => client, + migrations: { + skip: skipMigrations, + }, + }; +} + describe('Tech Insights database', () => { const databases = TestDatabases.create(); let store: TechInsightsStore; let testDbClient: Knex; beforeAll(async () => { testDbClient = await databases.init('SQLITE_3'); + const database = createDatabaseManager(testDbClient); store = ( - await initializePersistenceContext(testDbClient, { + await initializePersistenceContext(database, { logger: getVoidLogger(), }) ).techInsightsStore; diff --git a/plugins/tech-insights-backend/src/service/persistence/persistenceContext.ts b/plugins/tech-insights-backend/src/service/persistence/persistenceContext.ts index b0fb65349f..575ee67bdf 100644 --- a/plugins/tech-insights-backend/src/service/persistence/persistenceContext.ts +++ b/plugins/tech-insights-backend/src/service/persistence/persistenceContext.ts @@ -13,8 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { getVoidLogger, resolvePackagePath } from '@backstage/backend-common'; -import { Knex } from 'knex'; +import { + getVoidLogger, + PluginDatabaseManager, + resolvePackagePath, +} from '@backstage/backend-common'; import { Logger } from 'winston'; import { TechInsightsDatabase } from './TechInsightsDatabase'; import { TechInsightsStore } from '@backstage/plugin-tech-insights-node'; @@ -47,13 +50,18 @@ const defaultOptions: CreateDatabaseOptions = { * @public */ export const initializePersistenceContext = async ( - knex: Knex, + database: PluginDatabaseManager, options: CreateDatabaseOptions = defaultOptions, ): Promise => { - await knex.migrate.latest({ - directory: migrationsDir, - }); + const client = await database.getClient(); + + if (!database.migrations?.skip) { + await client.migrate.latest({ + directory: migrationsDir, + }); + } + return { - techInsightsStore: new TechInsightsDatabase(knex, options.logger), + techInsightsStore: new TechInsightsDatabase(client, options.logger), }; }; diff --git a/plugins/tech-insights-backend/src/service/router.ts b/plugins/tech-insights-backend/src/service/router.ts index b86677ab90..4b93bf4d60 100644 --- a/plugins/tech-insights-backend/src/service/router.ts +++ b/plugins/tech-insights-backend/src/service/router.ts @@ -142,7 +142,7 @@ export async function createRouter< }); /** - * /facts/latest?entity=component:default/mycomponent&startDateTime=2021-12-24T01:23:45&endDateTime=2021-12-31T23:59:59&ids[]=factRetrieverId1&ids[]=factRetrieverId2 + * /facts/range?entity=component:default/mycomponent&startDateTime=2021-12-24T01:23:45&endDateTime=2021-12-31T23:59:59&ids[]=factRetrieverId1&ids[]=factRetrieverId2 */ router.get('/facts/range', async (req, res) => { const { entity } = req.query; diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts index 82f504c8a8..7a274e6f96 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.test.ts @@ -27,7 +27,7 @@ import { Knex } from 'knex'; jest.mock('./fact/FactRetrieverRegistry'); jest.mock('./fact/FactRetrieverEngine', () => ({ - FactRetrieverEngine: { + DefaultFactRetrieverEngine: { create: jest.fn().mockResolvedValue({ schedule: jest.fn(), }), diff --git a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts index 008acf192d..f85d99b2a8 100644 --- a/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts +++ b/plugins/tech-insights-backend/src/service/techInsightsContextBuilder.ts @@ -14,7 +14,10 @@ * limitations under the License. */ -import { FactRetrieverEngine } from './fact/FactRetrieverEngine'; +import { + DefaultFactRetrieverEngine, + FactRetrieverEngine, +} from './fact/FactRetrieverEngine'; import { Logger } from 'winston'; import { DefaultFactRetrieverRegistry, @@ -93,6 +96,7 @@ export type TechInsightsContext< > = { factChecker?: FactChecker; persistenceContext: PersistenceContext; + factRetrieverEngine: FactRetrieverEngine; }; /** @@ -135,12 +139,11 @@ export const buildTechInsightsContext = async < const factRetrieverRegistry = buildFactRetrieverRegistry(); - const persistenceContext = await initializePersistenceContext( - await database.getClient(), - { logger }, - ); + const persistenceContext = await initializePersistenceContext(database, { + logger, + }); - const factRetrieverEngine = await FactRetrieverEngine.create({ + const factRetrieverEngine = await DefaultFactRetrieverEngine.create({ scheduler, repository: persistenceContext.techInsightsStore, factRetrieverRegistry, @@ -161,10 +164,12 @@ export const buildTechInsightsContext = async < return { persistenceContext, factChecker, + factRetrieverEngine, }; } return { persistenceContext, + factRetrieverEngine, }; }; diff --git a/plugins/tech-insights-common/package.json b/plugins/tech-insights-common/package.json index 1b5dabb88d..9c38ddc8c1 100644 --- a/plugins/tech-insights-common/package.json +++ b/plugins/tech-insights-common/package.json @@ -38,7 +38,7 @@ "@backstage/types": "^1.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/tech-insights-node/CHANGELOG.md b/plugins/tech-insights-node/CHANGELOG.md index 36650980e8..53e8b06716 100644 --- a/plugins/tech-insights-node/CHANGELOG.md +++ b/plugins/tech-insights-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-tech-insights-node +## 0.3.4-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- 2e0689e536: Support for timeout in FactRetrieverRegistrationOptions +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + ## 0.3.3 ### Patch Changes diff --git a/plugins/tech-insights-node/api-report.md b/plugins/tech-insights-node/api-report.md index 84677bdcbc..a57cf3ec4a 100644 --- a/plugins/tech-insights-node/api-report.md +++ b/plugins/tech-insights-node/api-report.md @@ -8,6 +8,7 @@ import { Config } from '@backstage/config'; import { DateTime } from 'luxon'; import { Duration } from 'luxon'; import { DurationLike } from 'luxon'; +import { HumanDuration } from '@backstage/backend-tasks'; import { JsonValue } from '@backstage/types'; import { Logger } from 'winston'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; @@ -72,7 +73,7 @@ export type FactRetrieverContext = { export type FactRetrieverRegistration = { factRetriever: FactRetriever; cadence?: string; - timeout?: Duration; + timeout?: Duration | HumanDuration; lifecycle?: FactLifecycle; }; @@ -169,11 +170,7 @@ export interface TechInsightsStore { [factRef: string]: FlatTechInsightFact; }>; getLatestSchemas(ids?: string[]): Promise; - insertFacts({ - id, - facts, - lifecycle, - }: { + insertFacts(options: { id: string; facts: TechInsightFact[]; lifecycle?: FactLifecycle; diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 0233fac050..afdc2c8c82 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-node", - "version": "0.3.3", + "version": "0.3.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", "@backstage/config": "^1.0.1", "@backstage/plugin-tech-insights-common": "^0.2.6", "@backstage/types": "^1.0.0", @@ -42,7 +43,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1" + "@backstage/cli": "^0.18.2-next.0" }, "files": [ "dist" diff --git a/plugins/tech-insights-node/src/facts.ts b/plugins/tech-insights-node/src/facts.ts index cda238694f..41db302fd5 100644 --- a/plugins/tech-insights-node/src/facts.ts +++ b/plugins/tech-insights-node/src/facts.ts @@ -21,6 +21,7 @@ import { TokenManager, } from '@backstage/backend-common'; import { Logger } from 'winston'; +import { HumanDuration } from '@backstage/backend-tasks'; /** * A container for facts. The shape of the fact records needs to correspond to the FactSchema with same `ref` value. @@ -270,7 +271,7 @@ export type FactRetrieverRegistration = { * defaults to 5 minutes. * */ - timeout?: Duration; + timeout?: Duration | HumanDuration; /** * Fact lifecycle definition diff --git a/plugins/tech-insights-node/src/persistence.ts b/plugins/tech-insights-node/src/persistence.ts index 4324c24c42..31fda403a8 100644 --- a/plugins/tech-insights-node/src/persistence.ts +++ b/plugins/tech-insights-node/src/persistence.ts @@ -38,11 +38,7 @@ export interface TechInsightsStore { * @param facts - A collection of TechInsightFacts * @param lifecycle - (Optional) Fact lifecycle object indicating the expiration logic for these items */ - insertFacts({ - id, - facts, - lifecycle, - }: { + insertFacts(options: { id: string; facts: TechInsightFact[]; lifecycle?: FactLifecycle; diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index b80355146d..040783d6eb 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-insights +## 0.2.5-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.2.4 ### Patch Changes diff --git a/plugins/tech-insights/api-report.md b/plugins/tech-insights/api-report.md index 694fb583d2..4f2687fa48 100644 --- a/plugins/tech-insights/api-report.md +++ b/plugins/tech-insights/api-report.md @@ -33,22 +33,14 @@ export type CheckResultRenderer = { }; // @public (undocumented) -export const EntityTechInsightsScorecardCard: ({ - title, - description, - checksId, -}: { +export const EntityTechInsightsScorecardCard: (props: { title?: string | undefined; description?: string | undefined; checksId?: string[] | undefined; }) => JSX.Element; // @public (undocumented) -export const EntityTechInsightsScorecardContent: ({ - title, - description, - checksId, -}: { +export const EntityTechInsightsScorecardContent: (props: { title?: string | undefined; description?: string | undefined; checksId?: string[] | undefined; diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 2cd84c9915..ab4477acf1 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.2.4", + "version": "0.2.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,10 +29,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/plugin-tech-insights-common": "^0.2.6", "@backstage/theme": "^0.2.16", "@backstage/types": "^1.0.0", @@ -47,17 +47,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx b/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx index f6bc4b0cb5..57b8915b58 100644 --- a/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx +++ b/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx @@ -23,15 +23,12 @@ import { ScorecardInfo } from '../ScorecardsInfo'; import Alert from '@material-ui/lab/Alert'; import { techInsightsApiRef } from '../../api/TechInsightsApi'; -export const ScorecardsCard = ({ - title, - description, - checksId, -}: { +export const ScorecardsCard = (props: { title?: string; description?: string; checksId?: string[]; }) => { + const { title, description, checksId } = props; const api = useApi(techInsightsApiRef); const { namespace, kind, name } = useParams(); const { value, loading, error } = useAsync( diff --git a/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx b/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx index 07a839d7a8..c3d02c938f 100644 --- a/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx +++ b/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx @@ -31,15 +31,12 @@ const useStyles = makeStyles(() => ({ }, })); -export const ScorecardsContent = ({ - title, - description, - checksId, -}: { +export const ScorecardsContent = (props: { title?: string; description?: string; checksId?: string[]; }) => { + const { title, description, checksId } = props; const classes = useStyles(); const api = useApi(techInsightsApiRef); const { namespace, kind, name } = useParams(); diff --git a/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx b/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx index 2c5abb3596..9d5fc5ac9e 100644 --- a/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx +++ b/plugins/tech-insights/src/components/ScorecardsInfo/ScorecardInfo.tsx @@ -30,15 +30,9 @@ const useStyles = makeStyles((theme: BackstageTheme) => ({ }, })); -type Checks = { - checks: CheckResult[]; - title?: string; - description?: string; -}; - const infoCard = ( - title: Checks['title'], - description: Checks['description'], + title: string | undefined, + description: string | undefined, className: string, element: JSX.Element, ) => ( @@ -54,7 +48,12 @@ const infoCard = ( ); -export const ScorecardInfo = ({ checks, title, description }: Checks) => { +export const ScorecardInfo = (props: { + checks: CheckResult[]; + title?: string; + description?: string; +}) => { + const { checks, title, description } = props; const classes = useStyles(); const api = useApi(techInsightsApiRef); diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index 0659f93073..9892f57f73 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-tech-radar +## 0.5.16-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.5.15 ### Patch Changes diff --git a/plugins/tech-radar/api-report.md b/plugins/tech-radar/api-report.md index a55cf79f28..39fa19da43 100644 --- a/plugins/tech-radar/api-report.md +++ b/plugins/tech-radar/api-report.md @@ -9,8 +9,6 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "MovedState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export enum MovedState { Down = -1, @@ -18,8 +16,6 @@ export enum MovedState { Up = 1, } -// Warning: (ae-missing-release-tag) "RadarEntry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface RadarEntry { description?: string; @@ -31,8 +27,6 @@ export interface RadarEntry { url: string; } -// Warning: (ae-missing-release-tag) "RadarEntrySnapshot" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface RadarEntrySnapshot { date: Date; @@ -41,21 +35,15 @@ export interface RadarEntrySnapshot { ringId: string; } -// Warning: (ae-missing-release-tag) "RadarPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function RadarPage(props: TechRadarPageProps): JSX.Element; -// Warning: (ae-missing-release-tag) "RadarQuadrant" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface RadarQuadrant { id: string; name: string; } -// Warning: (ae-missing-release-tag) "RadarRing" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface RadarRing { color: string; @@ -63,30 +51,20 @@ export interface RadarRing { name: string; } -// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public @deprecated (undocumented) export const Router: typeof RadarPage; -// Warning: (ae-missing-release-tag) "TechRadarApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface TechRadarApi { load: (id: string | undefined) => Promise; } -// Warning: (ae-missing-release-tag) "techRadarApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const techRadarApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "RadarComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function TechRadarComponent(props: TechRadarComponentProps): JSX.Element; -// Warning: (ae-missing-release-tag) "TechRadarComponentProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface TechRadarComponentProps { height: number; @@ -96,8 +74,6 @@ export interface TechRadarComponentProps { width: number; } -// Warning: (ae-missing-release-tag) "TechRadarLoaderResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface TechRadarLoaderResponse { entries: RadarEntry[]; @@ -105,13 +81,9 @@ export interface TechRadarLoaderResponse { rings: RadarRing[]; } -// Warning: (ae-missing-release-tag) "TechRadarPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export const TechRadarPage: RadarPage; -// Warning: (ae-missing-release-tag) "TechRadarPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface TechRadarPageProps extends TechRadarComponentProps { pageTitle?: string; @@ -119,8 +91,6 @@ export interface TechRadarPageProps extends TechRadarComponentProps { title?: string; } -// Warning: (ae-missing-release-tag) "techRadarPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public const techRadarPlugin: BackstagePlugin< { diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index c65d159429..e637ca6720 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", - "version": "0.5.15", + "version": "0.5.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "start": "backstage-cli package start" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,10 +49,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -62,7 +62,7 @@ "@types/node": "^16.11.26", "@types/react": "^16.13.1 || ^17.0.0", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/tech-radar/src/api.ts b/plugins/tech-radar/src/api.ts index 241f3dce85..c932ec98e2 100644 --- a/plugins/tech-radar/src/api.ts +++ b/plugins/tech-radar/src/api.ts @@ -13,10 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { ApiRef, createApiRef } from '@backstage/core-plugin-api'; /** * {@link @backstage/core-plugin-api#ApiRef} for the {@link TechRadarApi} + * + * @public */ export const techRadarApiRef: ApiRef = createApiRef( { @@ -31,6 +34,8 @@ export const techRadarApiRef: ApiRef = createApiRef( * * This should be implemented by user, as {@link https://github.com/backstage/backstage/blob/master/plugins/tech-radar/src/sample.ts | default} * serves only some static data for example purposes + * + * @public */ export interface TechRadarApi { /** @@ -46,6 +51,8 @@ export interface TechRadarApi { /** * Tech Radar Ring which indicates stage of {@link RadarEntry} + * + * @public */ export interface RadarRing { /** @@ -68,6 +75,8 @@ export interface RadarRing { /** * Tech Radar Quadrant which represent area/topic of {@link RadarEntry} + * + * @public */ export interface RadarQuadrant { /** @@ -82,6 +91,8 @@ export interface RadarQuadrant { /** * Single Entry in Tech Radar + * + * @public */ export interface RadarEntry { /** @@ -120,6 +131,8 @@ export interface RadarEntry { /** * State of {@link RadarEntry} at given point in time + * + * @public */ export interface RadarEntrySnapshot { /** @@ -142,6 +155,8 @@ export interface RadarEntrySnapshot { /** * Indicates how {@link RadarEntry} moved though {@link RadarRing} on {@link RadarEntry.timeline} + * + * @public */ export enum MovedState { /** @@ -164,6 +179,8 @@ export enum MovedState { /** * Response from {@link TechRadarApi} + * + * @public */ export interface TechRadarLoaderResponse { /** diff --git a/plugins/tech-radar/src/components/RadarComponent.tsx b/plugins/tech-radar/src/components/RadarComponent.tsx index e7cca7d45f..4ed7626d52 100644 --- a/plugins/tech-radar/src/components/RadarComponent.tsx +++ b/plugins/tech-radar/src/components/RadarComponent.tsx @@ -61,6 +61,8 @@ function matchFilter(filter?: string): (entry: RadarEntry) => boolean { /** * Properties of {@link TechRadarComponent} + * + * @public */ export interface TechRadarComponentProps { /** @@ -95,6 +97,8 @@ export interface TechRadarComponentProps { * @remarks * * For advanced use cases. Typically, you want to use {@link TechRadarPage} + * + * @public */ export function RadarComponent(props: TechRadarComponentProps) { const { loading, error, value: data } = useTechRadarLoader(props.id); diff --git a/plugins/tech-radar/src/components/RadarPage.tsx b/plugins/tech-radar/src/components/RadarPage.tsx index 17e481fcc4..49f856eddd 100644 --- a/plugins/tech-radar/src/components/RadarPage.tsx +++ b/plugins/tech-radar/src/components/RadarPage.tsx @@ -34,6 +34,8 @@ const useStyles = makeStyles(() => ({ /** * Properties for {@link TechRadarPage} + * + * @public */ export interface TechRadarPageProps extends TechRadarComponentProps { /** @@ -52,6 +54,8 @@ export interface TechRadarPageProps extends TechRadarComponentProps { /** * Main Page of Tech Radar + * + * @public */ export function RadarPage(props: TechRadarPageProps) { const { diff --git a/plugins/tech-radar/src/index.ts b/plugins/tech-radar/src/index.ts index dbffcca553..0ea02cabe5 100644 --- a/plugins/tech-radar/src/index.ts +++ b/plugins/tech-radar/src/index.ts @@ -32,6 +32,8 @@ export * from './components'; /** * @deprecated Use plugin extensions instead + * + * @public */ export const Router = RadarPage; diff --git a/plugins/tech-radar/src/plugin.ts b/plugins/tech-radar/src/plugin.ts index 495aa47879..7f042a1b6f 100644 --- a/plugins/tech-radar/src/plugin.ts +++ b/plugins/tech-radar/src/plugin.ts @@ -15,7 +15,6 @@ */ import { techRadarApiRef } from './api'; - import { SampleTechRadarApi } from './sample'; import { createPlugin, @@ -30,6 +29,8 @@ const rootRouteRef = createRouteRef({ /** * Tech Radar plugin instance + * + * @public */ export const techRadarPlugin = createPlugin({ id: 'tech-radar', @@ -45,6 +46,8 @@ export const techRadarPlugin = createPlugin({ * @remarks * * Uses {@link TechRadarPageProps} as props + * + * @public */ export const TechRadarPage = techRadarPlugin.provide( createRoutableExtension({ diff --git a/plugins/techdocs-addons-test-utils/CHANGELOG.md b/plugins/techdocs-addons-test-utils/CHANGELOG.md index f10fadfec2..872898aa96 100644 --- a/plugins/techdocs-addons-test-utils/CHANGELOG.md +++ b/plugins/techdocs-addons-test-utils/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-techdocs-addons-test-utils +## 1.0.4-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/plugin-techdocs@1.3.2-next.0 + - @backstage/core-app-api@1.0.6-next.0 + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/test-utils@1.1.4-next.0 + - @backstage/plugin-catalog@1.5.1-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + ## 1.0.3 ### Patch Changes diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index a355d55276..7d87ca2e52 100644 --- a/plugins/techdocs-addons-test-utils/package.json +++ b/plugins/techdocs-addons-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-addons-test-utils", - "version": "1.0.3", + "version": "1.0.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -32,15 +32,15 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-app-api": "^1.0.5", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog": "^1.5.0", - "@backstage/plugin-search-react": "^1.0.1", - "@backstage/plugin-techdocs": "^1.3.1", - "@backstage/plugin-techdocs-react": "^1.0.3", - "@backstage/test-utils": "^1.1.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog": "^1.5.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", + "@backstage/plugin-techdocs": "^1.3.2-next.0", + "@backstage/plugin-techdocs-react": "^1.0.4-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", @@ -56,14 +56,14 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/dev-utils": "^1.0.5", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", - "msw": "^0.44.0", + "msw": "^0.45.0", "cross-fetch": "^3.1.5" }, "files": [ diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 8140808d9d..890bcfef4f 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-techdocs-backend +## 1.2.2-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/catalog-client@1.0.5-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-permission-common@0.6.4-next.0 + - @backstage/plugin-techdocs-node@1.3.1-next.0 + - @backstage/plugin-catalog-common@1.0.6-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.2.1 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index dcf8da6d7a..46b7d062dd 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-backend", "description": "The Backstage backend plugin that renders technical documentation for your components", - "version": "1.2.1", + "version": "1.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,16 +34,16 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/catalog-client": "^1.0.4", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/catalog-client": "^1.0.5-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-catalog-common": "^1.0.5", - "@backstage/plugin-permission-common": "^0.6.3", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-techdocs-node": "^1.3.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-catalog-common": "^1.0.6-next.0", + "@backstage/plugin-permission-common": "^0.6.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-techdocs-node": "^1.3.1-next.0", "@types/express": "^4.17.6", "dockerode": "^3.3.1", "express": "^4.17.1", @@ -56,11 +56,11 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/backend-test-utils": "^0.1.27", - "@backstage/cli": "^0.18.1", - "@backstage/plugin-search-backend-node": "1.0.1", + "@backstage/backend-test-utils": "^0.1.28-next.0", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/plugin-search-backend-node": "1.0.2-next.0", "@types/dockerode": "^3.3.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/techdocs-module-addons-contrib/CHANGELOG.md b/plugins/techdocs-module-addons-contrib/CHANGELOG.md index 4babb601bc..9b7107ae84 100644 --- a/plugins/techdocs-module-addons-contrib/CHANGELOG.md +++ b/plugins/techdocs-module-addons-contrib/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-techdocs-module-addons-contrib +## 1.0.4-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + ## 1.0.3 ### Patch Changes diff --git a/plugins/techdocs-module-addons-contrib/api-report.md b/plugins/techdocs-module-addons-contrib/api-report.md index f787e0678c..68fad9121d 100644 --- a/plugins/techdocs-module-addons-contrib/api-report.md +++ b/plugins/techdocs-module-addons-contrib/api-report.md @@ -26,9 +26,7 @@ export type ReportIssueTemplate = { }; // @public -export type ReportIssueTemplateBuilder = ({ - selection, -}: { +export type ReportIssueTemplateBuilder = (options: { selection: Selection; }) => ReportIssueTemplate; diff --git a/plugins/techdocs-module-addons-contrib/package.json b/plugins/techdocs-module-addons-contrib/package.json index 7e8b3f3cac..2bacd57513 100644 --- a/plugins/techdocs-module-addons-contrib/package.json +++ b/plugins/techdocs-module-addons-contrib/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-module-addons-contrib", "description": "Plugin module for contributed TechDocs Addons", - "version": "1.0.3", + "version": "1.0.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,11 +34,11 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", - "@backstage/integration": "^1.3.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-techdocs-react": "^1.0.3", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-techdocs-react": "^1.0.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", @@ -51,18 +51,18 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/plugin-techdocs-addons-test-utils": "^1.0.3", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/plugin-techdocs-addons-test-utils": "^1.0.4-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "@types/react": "^16.13.1 || ^17.0.0", - "msw": "^0.44.0", + "msw": "^0.45.0", "cross-fetch": "^3.1.5" }, "files": [ diff --git a/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts b/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts index 0816b45d9d..84143a40f2 100644 --- a/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts +++ b/plugins/techdocs-module-addons-contrib/src/ReportIssue/types.ts @@ -37,9 +37,7 @@ export type ReportIssueTemplate = { * * @public */ -export type ReportIssueTemplateBuilder = ({ - selection, -}: { +export type ReportIssueTemplateBuilder = (options: { selection: Selection; }) => ReportIssueTemplate; diff --git a/plugins/techdocs-node/CHANGELOG.md b/plugins/techdocs-node/CHANGELOG.md index 8b1b2059cb..016c2c4278 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-techdocs-node +## 1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.3.0 ### Minor Changes diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index d1a79db3b3..f858329058 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-node", "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "1.3.0", + "version": "1.3.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -42,12 +42,12 @@ "dependencies": { "@azure/identity": "^2.0.1", "@azure/storage-blob": "^12.5.0", - "@backstage/backend-common": "^0.15.0", + "@backstage/backend-common": "^0.15.1-next.0", "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/plugin-search-common": "^1.0.0", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", "@google-cloud/storage": "^6.0.0", "@trendyol-js/openstack-swift-sdk": "^0.0.5", "@types/express": "^4.17.6", @@ -64,7 +64,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/fs-extra": "^9.0.5", "@types/js-yaml": "^4.0.0", "@types/mime-types": "^2.1.0", diff --git a/plugins/techdocs-react/CHANGELOG.md b/plugins/techdocs-react/CHANGELOG.md index 08db6050b8..bffa6af98e 100644 --- a/plugins/techdocs-react/CHANGELOG.md +++ b/plugins/techdocs-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-techdocs-react +## 1.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 1.0.3 ### Patch Changes diff --git a/plugins/techdocs-react/package.json b/plugins/techdocs-react/package.json index 8074b799bf..452838284e 100644 --- a/plugins/techdocs-react/package.json +++ b/plugins/techdocs-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-react", "description": "Shared frontend utilities for TechDocs and Addons", - "version": "1.0.3", + "version": "1.0.4-next.0", "private": false, "publishConfig": { "access": "public", @@ -37,8 +37,8 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/version-bridge": "^1.0.1", "@material-ui/core": "^4.12.2", "@material-ui/lab": "4.0.0-alpha.57", @@ -57,7 +57,7 @@ "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", - "@backstage/test-utils": "^1.1.3", + "@backstage/test-utils": "^1.1.4-next.0", "@backstage/theme": "^0.2.16" }, "files": [ diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index 099c84eb0b..72460db23b 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-techdocs +## 1.3.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- 829f14a9b0: Always update the title and sub-title when the location changes on a `TechDocs` reader page. +- ef9ab322de: Minor API signatures cleanup +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/integration-react@1.1.4-next.0 + - @backstage/integration@1.3.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + - @backstage/plugin-search-react@1.0.2-next.0 + - @backstage/plugin-techdocs-react@1.0.4-next.0 + - @backstage/plugin-search-common@1.0.1-next.0 + ## 1.3.1 ### Patch Changes diff --git a/plugins/techdocs/api-report.md b/plugins/techdocs/api-report.md index ef037fbb05..b2f0331a9b 100644 --- a/plugins/techdocs/api-report.md +++ b/plugins/techdocs/api-report.md @@ -345,11 +345,7 @@ export type TechDocsReaderPageProps = { }; // @public -export type TechDocsReaderPageRenderFunction = ({ - techdocsMetadataValue, - entityMetadataValue, - entityRef, -}: { +export type TechDocsReaderPageRenderFunction = (options: { techdocsMetadataValue?: TechDocsMetadata_2 | undefined; entityMetadataValue?: TechDocsEntityMetadata_2 | undefined; entityRef: CompoundEntityRef; @@ -357,10 +353,8 @@ export type TechDocsReaderPageRenderFunction = ({ }) => JSX.Element; // @public -export const TechDocsReaderPageSubheader: ({ - toolbarProps, -}: { - toolbarProps?: ToolbarProps<'div', {}> | undefined; +export const TechDocsReaderPageSubheader: (props: { + toolbarProps?: ToolbarProps; }) => JSX.Element | null; // @public diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 10f9f2f4c0..604fec15ed 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "1.3.1", + "version": "1.3.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,15 +37,15 @@ "dependencies": { "@backstage/catalog-model": "^1.1.0", "@backstage/config": "^1.0.1", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/integration": "^1.3.0", - "@backstage/integration-react": "^1.1.3", - "@backstage/plugin-catalog-react": "^1.1.3", - "@backstage/plugin-search-common": "^1.0.0", - "@backstage/plugin-search-react": "^1.0.1", - "@backstage/plugin-techdocs-react": "^1.0.3", + "@backstage/integration": "^1.3.1-next.0", + "@backstage/integration-react": "^1.1.4-next.0", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", + "@backstage/plugin-search-common": "^1.0.1-next.0", + "@backstage/plugin-search-react": "^1.0.2-next.0", + "@backstage/plugin-techdocs-react": "^1.0.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -67,10 +67,10 @@ "react-dom": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", @@ -81,7 +81,7 @@ "@types/node": "^16.11.26", "canvas": "^2.6.1", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist", diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx index def15abf8d..7db00f6590 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageContent/TechDocsReaderPageContent.test.tsx @@ -29,12 +29,12 @@ import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; const useTechDocsReaderDom = jest.fn(); jest.mock('./dom', () => ({ ...jest.requireActual('./dom'), - useTechDocsReaderDom, + useTechDocsReaderDom: (...args: any[]) => useTechDocsReaderDom(...args), })); const useReaderState = jest.fn(); jest.mock('../useReaderState', () => ({ ...jest.requireActual('../useReaderState'), - useReaderState, + useReaderState: (...args: any[]) => useReaderState(...args), })); import { TechDocsReaderPageContent } from './TechDocsReaderPageContent'; diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx index 8826154eee..e76cb1d173 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageHeader/TechDocsReaderPageHeader.tsx @@ -77,16 +77,13 @@ export const TechDocsReaderPageHeader = ( useEffect(() => { if (!metadata) return; - setTitle(prevTitle => { - const { site_name } = metadata; - return prevTitle || site_name; - }); - setSubtitle(prevSubtitle => { + setTitle(metadata.site_name); + setSubtitle(() => { let { site_description } = metadata; if (!site_description || site_description === 'None') { site_description = 'Home'; } - return prevSubtitle || site_description; + return site_description; }); }, [metadata, setTitle, setSubtitle]); diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx index a0013e81ab..0cef4d521f 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPageSubheader/TechDocsReaderPageSubheader.tsx @@ -47,9 +47,7 @@ const useStyles = makeStyles(theme => ({ * Please use the Tech Docs add-ons to customize it * @public */ -export const TechDocsReaderPageSubheader = ({ - toolbarProps, -}: { +export const TechDocsReaderPageSubheader = (props: { toolbarProps?: ToolbarProps; }) => { const classes = useStyles(); @@ -81,7 +79,7 @@ export const TechDocsReaderPageSubheader = ({ if (entityMetadataLoading === false && !entityMetadata) return null; return ( - + JSX.Element; +export const DefaultProviderSettings: (props: { + configuredProviders: string[]; +}) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "ProviderSettingsItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const ProviderSettingsItem: ({ - title, - description, - icon: Icon, - apiRef, -}: Props_4) => JSX.Element; +export const ProviderSettingsItem: (props: { + title: string; + description: string; + icon: IconComponent; + apiRef: ApiRef; +}) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "SettingsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Router: ({ providerSettings }: Props) => JSX.Element; +export const Router: (props: { providerSettings?: JSX.Element }) => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "SettingsProps" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "Settings" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const Settings: (props: SettingsProps) => JSX.Element; +export const Settings: (props: { icon?: IconComponent }) => JSX.Element; // @public (undocumented) export const USER_SETTINGS_TAB_KEY = 'user-settings.tab'; -// Warning: (ae-missing-release-tag) "UserSettingsAppearanceCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsAppearanceCard: () => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "UserSettingsAuthProviders" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const UserSettingsAuthProviders: ({ - providerSettings, -}: Props_2) => JSX.Element; +export const UserSettingsAuthProviders: (props: { + providerSettings?: JSX.Element; +}) => JSX.Element; -// Warning: (ae-missing-release-tag) "UserSettingsFeatureFlags" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsFeatureFlags: () => JSX.Element; -// Warning: (ae-missing-release-tag) "UserSettingsGeneral" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsGeneral: () => JSX.Element; -// Warning: (ae-missing-release-tag) "UserSettingsIdentityCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsIdentityCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "UserSettingsMenu" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsMenu: () => JSX.Element; -// Warning: (ae-missing-release-tag) "UserSettingsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const UserSettingsPage: ({ - providerSettings, -}: { +export const UserSettingsPage: (props: { providerSettings?: JSX.Element | undefined; }) => JSX.Element; -// Warning: (ae-missing-release-tag) "UserSettingsPinToggle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsPinToggle: () => JSX.Element; -// Warning: (ae-missing-release-tag) "userSettingsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const userSettingsPlugin: BackstagePlugin< { @@ -108,16 +75,13 @@ const userSettingsPlugin: BackstagePlugin< export { userSettingsPlugin as plugin }; export { userSettingsPlugin }; -// Warning: (ae-missing-release-tag) "UserSettingsProfileCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsProfileCard: () => JSX.Element; -// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts -// Warning: (ae-missing-release-tag) "UserSettingsSignInAvatar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) -export const UserSettingsSignInAvatar: ({ size }: Props_5) => JSX.Element; +export const UserSettingsSignInAvatar: (props: { + size?: number; +}) => JSX.Element; // @public export const UserSettingsTab: (props: UserSettingsTabProps) => JSX.Element; @@ -128,13 +92,9 @@ export type UserSettingsTabProps = PropsWithChildren<{ title: string; }>; -// Warning: (ae-missing-release-tag) "UserSettingsThemeToggle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const UserSettingsThemeToggle: () => JSX.Element; -// Warning: (ae-missing-release-tag) "useUserProfile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const useUserProfile: () => | { diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 7aea0a9bbb..6e73ba6499 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings", "description": "A Backstage plugin that provides a settings page", - "version": "0.4.7", + "version": "0.4.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,8 +34,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -48,17 +48,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "^26.0.7", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/user-settings/src/components/AuthProviders/DefaultProviderSettings.tsx b/plugins/user-settings/src/components/AuthProviders/DefaultProviderSettings.tsx index 019967cf55..f8e1fb190c 100644 --- a/plugins/user-settings/src/components/AuthProviders/DefaultProviderSettings.tsx +++ b/plugins/user-settings/src/components/AuthProviders/DefaultProviderSettings.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import Star from '@material-ui/icons/Star'; import React from 'react'; import { ProviderSettingsItem } from './ProviderSettingsItem'; @@ -27,75 +28,77 @@ import { oneloginAuthApiRef, } from '@backstage/core-plugin-api'; -type Props = { +/** @public */ +export const DefaultProviderSettings = (props: { configuredProviders: string[]; +}) => { + const { configuredProviders } = props; + return ( + <> + {configuredProviders.includes('google') && ( + + )} + {configuredProviders.includes('microsoft') && ( + + )} + {configuredProviders.includes('github') && ( + + )} + {configuredProviders.includes('gitlab') && ( + + )} + {configuredProviders.includes('okta') && ( + + )} + {configuredProviders.includes('bitbucket') && ( + + )} + {configuredProviders.includes('onelogin') && ( + + )} + {configuredProviders.includes('atlassian') && ( + + )} + + ); }; - -export const DefaultProviderSettings = ({ configuredProviders }: Props) => ( - <> - {configuredProviders.includes('google') && ( - - )} - {configuredProviders.includes('microsoft') && ( - - )} - {configuredProviders.includes('github') && ( - - )} - {configuredProviders.includes('gitlab') && ( - - )} - {configuredProviders.includes('okta') && ( - - )} - {configuredProviders.includes('bitbucket') && ( - - )} - {configuredProviders.includes('onelogin') && ( - - )} - {configuredProviders.includes('atlassian') && ( - - )} - -); diff --git a/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx b/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx index 53fa127e36..e170aa2daa 100644 --- a/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx +++ b/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import React, { useEffect, useState } from 'react'; import { Button, @@ -30,19 +31,15 @@ import { SessionState, } from '@backstage/core-plugin-api'; -type Props = { +/** @public */ +export const ProviderSettingsItem = (props: { title: string; description: string; icon: IconComponent; apiRef: ApiRef; -}; +}) => { + const { title, description, icon: Icon, apiRef } = props; -export const ProviderSettingsItem = ({ - title, - description, - icon: Icon, - apiRef, -}: Props) => { const api = useApi(apiRef); const [signedIn, setSignedIn] = useState(false); diff --git a/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.tsx b/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.tsx index 8107944781..d23716c2bf 100644 --- a/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.tsx +++ b/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.tsx @@ -18,15 +18,14 @@ import React from 'react'; import { List } from '@material-ui/core'; import { EmptyProviders } from './EmptyProviders'; import { DefaultProviderSettings } from './DefaultProviderSettings'; - import { configApiRef, useApi } from '@backstage/core-plugin-api'; import { InfoCard } from '@backstage/core-components'; -type Props = { +/** @public */ +export const UserSettingsAuthProviders = (props: { providerSettings?: JSX.Element; -}; - -export const UserSettingsAuthProviders = ({ providerSettings }: Props) => { +}) => { + const { providerSettings } = props; const configApi = useApi(configApiRef); const providersConfig = configApi.getOptionalConfig('auth.providers'); const configuredProviders = providersConfig?.keys() || []; diff --git a/plugins/user-settings/src/components/FeatureFlags/UserSettingsFeatureFlags.tsx b/plugins/user-settings/src/components/FeatureFlags/UserSettingsFeatureFlags.tsx index e8f488de85..21aafc089e 100644 --- a/plugins/user-settings/src/components/FeatureFlags/UserSettingsFeatureFlags.tsx +++ b/plugins/user-settings/src/components/FeatureFlags/UserSettingsFeatureFlags.tsx @@ -24,7 +24,6 @@ import { } from '@material-ui/core'; import { EmptyFlags } from './EmptyFlags'; import { FlagItem } from './FeatureFlagsItem'; - import { featureFlagsApiRef, FeatureFlagState, @@ -33,6 +32,7 @@ import { import { InfoCard } from '@backstage/core-components'; import ClearIcon from '@material-ui/icons/Clear'; +/** @public */ export const UserSettingsFeatureFlags = () => { const featureFlagsApi = useApi(featureFlagsApiRef); const featureFlags = featureFlagsApi.getRegisteredFlags(); diff --git a/plugins/user-settings/src/components/General/UserSettingsAppearanceCard.tsx b/plugins/user-settings/src/components/General/UserSettingsAppearanceCard.tsx index cd55218db5..6b61edb83b 100644 --- a/plugins/user-settings/src/components/General/UserSettingsAppearanceCard.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsAppearanceCard.tsx @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { InfoCard, useSidebarPinState } from '@backstage/core-components'; import { List } from '@material-ui/core'; import React from 'react'; import { UserSettingsPinToggle } from './UserSettingsPinToggle'; import { UserSettingsThemeToggle } from './UserSettingsThemeToggle'; +/** @public */ export const UserSettingsAppearanceCard = () => { const { isMobile } = useSidebarPinState(); diff --git a/plugins/user-settings/src/components/General/UserSettingsGeneral.tsx b/plugins/user-settings/src/components/General/UserSettingsGeneral.tsx index db7fdd7be6..8dde87ba5c 100644 --- a/plugins/user-settings/src/components/General/UserSettingsGeneral.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsGeneral.tsx @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Grid } from '@material-ui/core'; import React from 'react'; import { UserSettingsProfileCard } from './UserSettingsProfileCard'; import { UserSettingsAppearanceCard } from './UserSettingsAppearanceCard'; import { UserSettingsIdentityCard } from './UserSettingsIdentityCard'; +/** @public */ export const UserSettingsGeneral = () => { return ( diff --git a/plugins/user-settings/src/components/General/UserSettingsIdentityCard.tsx b/plugins/user-settings/src/components/General/UserSettingsIdentityCard.tsx index 908cda1423..1369f4aab8 100644 --- a/plugins/user-settings/src/components/General/UserSettingsIdentityCard.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsIdentityCard.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { InfoCard } from '@backstage/core-components'; import React from 'react'; import { useUserProfile } from '../useUserProfileInfo'; @@ -20,6 +21,7 @@ import Chip from '@material-ui/core/Chip'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; +/** @public */ export const UserSettingsIdentityCard = () => { const { backstageIdentity } = useUserProfile(); diff --git a/plugins/user-settings/src/components/General/UserSettingsMenu.tsx b/plugins/user-settings/src/components/General/UserSettingsMenu.tsx index c93de9c636..2483f6cd36 100644 --- a/plugins/user-settings/src/components/General/UserSettingsMenu.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsMenu.tsx @@ -20,6 +20,7 @@ import SignOutIcon from '@material-ui/icons/MeetingRoom'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import { identityApiRef, useApi } from '@backstage/core-plugin-api'; +/** @public */ export const UserSettingsMenu = () => { const identityApi = useApi(identityApiRef); const [open, setOpen] = React.useState(false); diff --git a/plugins/user-settings/src/components/General/UserSettingsPinToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsPinToggle.tsx index d218787c05..a06b079e8e 100644 --- a/plugins/user-settings/src/components/General/UserSettingsPinToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsPinToggle.tsx @@ -24,6 +24,7 @@ import { } from '@material-ui/core'; import { useSidebarPinState } from '@backstage/core-components'; +/** @public */ export const UserSettingsPinToggle = () => { const { isPinned, toggleSidebarPinState } = useSidebarPinState(); diff --git a/plugins/user-settings/src/components/General/UserSettingsProfileCard.tsx b/plugins/user-settings/src/components/General/UserSettingsProfileCard.tsx index 93bb32c5db..3c49121cfc 100644 --- a/plugins/user-settings/src/components/General/UserSettingsProfileCard.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsProfileCard.tsx @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Grid, Typography } from '@material-ui/core'; import React from 'react'; import { UserSettingsSignInAvatar } from './UserSettingsSignInAvatar'; @@ -20,6 +21,7 @@ import { UserSettingsMenu } from './UserSettingsMenu'; import { useUserProfile } from '../useUserProfileInfo'; import { InfoCard } from '@backstage/core-components'; +/** @public */ export const UserSettingsProfileCard = () => { const { profile, displayName } = useUserProfile(); diff --git a/plugins/user-settings/src/components/General/UserSettingsSignInAvatar.tsx b/plugins/user-settings/src/components/General/UserSettingsSignInAvatar.tsx index eced74c29c..af1d2969e6 100644 --- a/plugins/user-settings/src/components/General/UserSettingsSignInAvatar.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsSignInAvatar.tsx @@ -29,9 +29,10 @@ const useStyles = makeStyles(theme => ({ }, })); -type Props = { size?: number }; +/** @public */ +export const UserSettingsSignInAvatar = (props: { size?: number }) => { + const { size } = props; -export const UserSettingsSignInAvatar = ({ size }: Props) => { const { iconSize } = sidebarConfig; const classes = useStyles(size ? { size } : { size: iconSize }); const { profile } = useUserProfile(); diff --git a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx index 4a28a72818..156ac210fd 100644 --- a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx @@ -97,6 +97,7 @@ const TooltipToggleButton = ({ ); +/** @public */ export const UserSettingsThemeToggle = () => { const classes = useStyles(); const appThemeApi = useApi(appThemeApiRef); diff --git a/plugins/user-settings/src/components/Settings.tsx b/plugins/user-settings/src/components/Settings.tsx index e9b3ae7d0a..6735b20f87 100644 --- a/plugins/user-settings/src/components/Settings.tsx +++ b/plugins/user-settings/src/components/Settings.tsx @@ -20,11 +20,8 @@ import { settingsRouteRef } from '../plugin'; import { SidebarItem } from '@backstage/core-components'; import { useRouteRef, IconComponent } from '@backstage/core-plugin-api'; -type SettingsProps = { - icon?: IconComponent; -}; - -export const Settings = (props: SettingsProps) => { +/** @public */ +export const Settings = (props: { icon?: IconComponent }) => { const routePath = useRouteRef(settingsRouteRef); const Icon = props.icon ? props.icon : SettingsIcon; return ; diff --git a/plugins/user-settings/src/components/SettingsPage.tsx b/plugins/user-settings/src/components/SettingsPage.tsx index dcaf62d435..9803bf4761 100644 --- a/plugins/user-settings/src/components/SettingsPage.tsx +++ b/plugins/user-settings/src/components/SettingsPage.tsx @@ -28,11 +28,11 @@ import { UserSettingsFeatureFlags } from './FeatureFlags'; import { UserSettingsGeneral } from './General'; import { USER_SETTINGS_TAB_KEY, UserSettingsTabProps } from './UserSettingsTab'; -type Props = { - providerSettings?: JSX.Element; -}; - -export const SettingsPage = ({ providerSettings }: Props) => { +/** + * @public + */ +export const SettingsPage = (props: { providerSettings?: JSX.Element }) => { + const { providerSettings } = props; const { isMobile } = useSidebarPinState(); const outlet = useOutlet(); diff --git a/plugins/user-settings/src/components/UserSettingsTab/index.ts b/plugins/user-settings/src/components/UserSettingsTab/index.ts index ec7228b7a6..d0645d4efb 100644 --- a/plugins/user-settings/src/components/UserSettingsTab/index.ts +++ b/plugins/user-settings/src/components/UserSettingsTab/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export * from './UserSettingsTab'; diff --git a/plugins/user-settings/src/components/index.ts b/plugins/user-settings/src/components/index.ts index 90a7105876..8dc76ee7f1 100644 --- a/plugins/user-settings/src/components/index.ts +++ b/plugins/user-settings/src/components/index.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export { Settings } from './Settings'; export { SettingsPage as Router } from './SettingsPage'; export * from './AuthProviders'; diff --git a/plugins/user-settings/src/components/useUserProfileInfo.ts b/plugins/user-settings/src/components/useUserProfileInfo.ts index c168fc12b4..8b2a41a55f 100644 --- a/plugins/user-settings/src/components/useUserProfileInfo.ts +++ b/plugins/user-settings/src/components/useUserProfileInfo.ts @@ -23,6 +23,7 @@ import { import { useEffect } from 'react'; import useAsync from 'react-use/lib/useAsync'; +/** @public */ export const useUserProfile = () => { const identityApi = useApi(identityApiRef); const alertApi = useApi(alertApiRef); diff --git a/plugins/user-settings/src/plugin.ts b/plugins/user-settings/src/plugin.ts index 01793dc418..4b538b7296 100644 --- a/plugins/user-settings/src/plugin.ts +++ b/plugins/user-settings/src/plugin.ts @@ -24,6 +24,7 @@ export const settingsRouteRef = createRouteRef({ id: 'user-settings', }); +/** @public */ export const userSettingsPlugin = createPlugin({ id: 'user-settings', routes: { @@ -31,6 +32,7 @@ export const userSettingsPlugin = createPlugin({ }, }); +/** @public */ export const UserSettingsPage = userSettingsPlugin.provide( createRoutableExtension({ name: 'UserSettingsPage', diff --git a/plugins/vault-backend/CHANGELOG.md b/plugins/vault-backend/CHANGELOG.md index 64c3782f9d..63dc693cc6 100644 --- a/plugins/vault-backend/CHANGELOG.md +++ b/plugins/vault-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-vault-backend +## 0.2.2-next.0 + +### Patch Changes + +- 3f739be9d9: Minor API signatures cleanup +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/backend-common@0.15.1-next.0 + - @backstage/backend-tasks@0.3.5-next.0 + - @backstage/backend-test-utils@0.1.28-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/vault-backend/api-report.md b/plugins/vault-backend/api-report.md index d2e9e1b177..2b1fb14bd0 100644 --- a/plugins/vault-backend/api-report.md +++ b/plugins/vault-backend/api-report.md @@ -48,7 +48,7 @@ export type VaultBuilderReturn = { // @public export class VaultClient implements VaultApi { - constructor({ config }: { config: Config }); + constructor(options: { config: Config }); // (undocumented) getFrontendSecretsUrl(): string; // (undocumented) diff --git a/plugins/vault-backend/package.json b/plugins/vault-backend/package.json index 506b68ed6e..27ca7069fe 100644 --- a/plugins/vault-backend/package.json +++ b/plugins/vault-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault-backend", "description": "A Backstage backend plugin that integrates towards Vault", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,9 +34,9 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/backend-common": "^0.15.0", - "@backstage/backend-tasks": "^0.3.4", - "@backstage/backend-test-utils": "^0.1.27", + "@backstage/backend-common": "^0.15.1-next.0", + "@backstage/backend-tasks": "^0.3.5-next.0", + "@backstage/backend-test-utils": "^0.1.28-next.0", "@backstage/config": "^1.0.1", "@backstage/errors": "^1.1.0", "@types/express": "*", @@ -51,10 +51,10 @@ "yn": "^5.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", + "@backstage/cli": "^0.18.2-next.0", "@types/compression": "^1.7.2", "@types/supertest": "^2.0.8", - "msw": "^0.44.0", + "msw": "^0.45.0", "supertest": "^6.1.6" }, "files": [ diff --git a/plugins/vault-backend/src/service/vaultApi.ts b/plugins/vault-backend/src/service/vaultApi.ts index 158778294a..16aa39ae03 100644 --- a/plugins/vault-backend/src/service/vaultApi.ts +++ b/plugins/vault-backend/src/service/vaultApi.ts @@ -79,8 +79,8 @@ export class VaultClient implements VaultApi { private vaultConfig: VaultConfig; private readonly limit = plimit(5); - constructor({ config }: { config: Config }) { - this.vaultConfig = getVaultConfig(config); + constructor(options: { config: Config }) { + this.vaultConfig = getVaultConfig(options.config); } private async callApi( diff --git a/plugins/vault/CHANGELOG.md b/plugins/vault/CHANGELOG.md index 1cbc985e1c..0ca6452507 100644 --- a/plugins/vault/CHANGELOG.md +++ b/plugins/vault/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-vault +## 0.1.3-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + - @backstage/plugin-catalog-react@1.1.4-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/vault/package.json b/plugins/vault/package.json index 66797dc171..3c1265901f 100644 --- a/plugins/vault/package.json +++ b/plugins/vault/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault", "description": "A Backstage plugin that integrates towards Vault", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,10 +35,10 @@ }, "dependencies": { "@backstage/catalog-model": "^1.1.0", - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", - "@backstage/plugin-catalog-react": "^1.1.3", + "@backstage/plugin-catalog-react": "^1.1.4-next.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", @@ -49,17 +49,17 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", "@types/jest": "*", "@types/node": "*", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index 2639b124e8..46701e0e11 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-xcmetrics +## 0.2.29-next.0 + +### Patch Changes + +- bf5e9030eb: Updated dependency `msw` to `^0.45.0`. +- Updated dependencies + - @backstage/core-plugin-api@1.0.6-next.0 + - @backstage/core-components@0.11.1-next.0 + ## 0.2.28 ### Patch Changes diff --git a/plugins/xcmetrics/api-report.md b/plugins/xcmetrics/api-report.md index 373748e9e2..8dd87cc7d6 100644 --- a/plugins/xcmetrics/api-report.md +++ b/plugins/xcmetrics/api-report.md @@ -8,13 +8,9 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "XcmetricsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const XcmetricsPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "xcmetricsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const xcmetricsPlugin: BackstagePlugin< { diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index d71dbb02d3..a12c2bc64a 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-xcmetrics", "description": "A Backstage plugin that shows XCode build metrics for your components", - "version": "0.2.28", + "version": "0.2.29-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,8 +24,8 @@ "clean": "backstage-cli package clean" }, "dependencies": { - "@backstage/core-components": "^0.11.0", - "@backstage/core-plugin-api": "^1.0.5", + "@backstage/core-components": "^0.11.1-next.0", + "@backstage/core-plugin-api": "^1.0.6-next.0", "@backstage/errors": "^1.1.0", "@backstage/theme": "^0.2.16", "@material-ui/core": "^4.12.2", @@ -40,10 +40,10 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { - "@backstage/cli": "^0.18.1", - "@backstage/core-app-api": "^1.0.5", - "@backstage/dev-utils": "^1.0.5", - "@backstage/test-utils": "^1.1.3", + "@backstage/cli": "^0.18.2-next.0", + "@backstage/core-app-api": "^1.0.6-next.0", + "@backstage/dev-utils": "^1.0.6-next.0", + "@backstage/test-utils": "^1.1.4-next.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", @@ -51,7 +51,7 @@ "@types/luxon": "^3.0.0", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", - "msw": "^0.44.0" + "msw": "^0.45.0" }, "files": [ "dist" diff --git a/plugins/xcmetrics/src/plugin.ts b/plugins/xcmetrics/src/plugin.ts index f6b7dd7e43..ffa72d1ff3 100644 --- a/plugins/xcmetrics/src/plugin.ts +++ b/plugins/xcmetrics/src/plugin.ts @@ -22,6 +22,7 @@ import { import { xcmetricsApiRef, XcmetricsClient } from './api'; import { rootRouteRef } from './routes'; +/** @public */ export const xcmetricsPlugin = createPlugin({ id: 'xcmetrics', routes: { @@ -40,6 +41,7 @@ export const xcmetricsPlugin = createPlugin({ ], }); +/** @public */ export const XcmetricsPage = xcmetricsPlugin.provide( createRoutableExtension({ name: 'XcmetricsPage', diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index 32b27e06ca..f18358cfcc 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -199,62 +199,11 @@ const PACKAGE_ROOTS = ['packages', 'plugins']; const ALLOW_WARNINGS = [ 'packages/core-components', - 'plugins/allure', - 'plugins/apache-airflow', - 'plugins/api-docs', - 'plugins/app-backend', - 'plugins/auth-backend', - 'plugins/azure-devops', - 'plugins/azure-devops-backend', - 'plugins/azure-devops-common', - 'plugins/badges', - 'plugins/badges-backend', - 'plugins/bitrise', 'plugins/catalog', - 'plugins/catalog-graphql', 'plugins/catalog-import', - 'plugins/cicd-statistics', - 'plugins/circleci', - 'plugins/cloudbuild', - 'plugins/code-climate', - 'plugins/config-schema', - 'plugins/cost-insights', - 'plugins/dynatrace', - 'plugins/explore', - 'plugins/explore-react', - 'plugins/firehydrant', - 'plugins/fossa', - 'plugins/gcalendar', - 'plugins/gcp-projects', 'plugins/git-release-manager', - 'plugins/github-actions', - 'plugins/github-deployments', - 'plugins/github-pull-requests-board', - 'plugins/gitops-profiles', - 'plugins/graphql-backend', - 'plugins/home', - 'plugins/ilert', 'plugins/jenkins', - 'plugins/jenkins-backend', - 'plugins/kafka', - 'plugins/kafka-backend', 'plugins/kubernetes', - 'plugins/kubernetes-common', - 'plugins/lighthouse', - 'plugins/newrelic', - 'plugins/newrelic-dashboard', - 'plugins/pagerduty', - 'plugins/proxy-backend', - 'plugins/rollbar', - 'plugins/rollbar-backend', - 'plugins/search-backend-module-pg', - 'plugins/sentry', - 'plugins/shortcuts', - 'plugins/sonarqube', - 'plugins/splunk-on-call', - 'plugins/tech-radar', - 'plugins/user-settings', - 'plugins/xcmetrics', ]; async function resolvePackagePath( diff --git a/storybook/.storybook/main.js b/storybook/.storybook/main.js index ad5fbb5bd6..e523b68337 100644 --- a/storybook/.storybook/main.js +++ b/storybook/.storybook/main.js @@ -52,7 +52,7 @@ module.exports = Object.assign(({ args }) => { // Mirror config in packages/cli/src/lib/bundler config.resolve.mainFields = ['browser', 'module', 'main']; - // Remove the default babel-loader for js files, we're using sucrase instead + // Remove the default babel-loader for js files, we're using swc instead const [jsLoader] = config.module.rules.splice(0, 1); if (!jsLoader.use[0].loader.includes('babel-loader')) { throw new Error( @@ -66,17 +66,41 @@ module.exports = Object.assign(({ args }) => { { test: /\.(tsx?)$/, exclude: /node_modules/, - loader: require.resolve('@sucrase/webpack-loader'), + loader: require.resolve('swc-loader'), options: { - transforms: ['typescript', 'jsx', 'react-hot-loader'], + jsc: { + target: 'es2019', + parser: { + syntax: 'typescript', + tsx: true, + dynamicImport: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, }, }, { test: /\.(jsx?|mjs|cjs)$/, exclude: /node_modules/, - loader: require.resolve('@sucrase/webpack-loader'), + loader: require.resolve('swc-loader'), options: { - transforms: ['jsx', 'react-hot-loader'], + jsc: { + target: 'es2019', + parser: { + syntax: 'ecmascript', + jsx: true, + dynamicImport: true, + }, + transform: { + react: { + runtime: 'automatic', + }, + }, + }, }, }, ); diff --git a/storybook/package.json b/storybook/package.json index bb3f000322..3197a604a2 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -8,11 +8,11 @@ "build-storybook": "build-storybook --output-dir dist" }, "dependencies": { - "@sucrase/webpack-loader": "^2.0.0", + "swc-loader": "^0.2.3", "react": "^17.0.2", "react-dom": "^17.0.2", "react-hot-loader": "^4.13.0", - "sucrase": "^3.21.0" + "@swc/core": "^1.2.239" }, "devDependencies": { "@storybook/addon-a11y": "^6.5.9", diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 364b87607b..7e80518c55 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -66,9 +66,9 @@ semver "^6.3.0" "@babel/generator@^7.12.11", "@babel/generator@^7.12.5", "@babel/generator@^7.18.10": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.18.10.tgz#794f328bfabdcbaf0ebf9bf91b5b57b61fa77a2a" - integrity sha512-0+sW7e3HjQbiHbj1NeU/vN8ornohYlacAfZIaXhdoGweQqgcNy69COVciYYqEXJ/v+9OBA7Frxm4CVAuNqKeNA== + version "7.18.12" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.18.12.tgz#fa58daa303757bd6f5e4bbca91b342040463d9f4" + integrity sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg== dependencies: "@babel/types" "^7.18.10" "@jridgewell/gen-mapping" "^0.3.2" @@ -276,13 +276,13 @@ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helper-wrap-function@^7.18.9": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.10.tgz#a7fcd3ab9b1be4c9b52cf7d7fdc1e88c2ce93396" - integrity sha512-95NLBP59VWdfK2lyLKe6eTMq9xg+yWKzxzxbJ1wcYNi1Auz200+83fMDADjRxBvc2QQor5zja2yTQzXGhk2GtQ== + version "7.18.11" + resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz#bff23ace436e3f6aefb61f85ffae2291c80ed1fb" + integrity sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w== dependencies: "@babel/helper-function-name" "^7.18.9" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.18.10" + "@babel/traverse" "^7.18.11" "@babel/types" "^7.18.10" "@babel/helpers@^7.12.5", "@babel/helpers@^7.18.9": @@ -303,10 +303,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.18.10": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.18.10.tgz#94b5f8522356e69e8277276adf67ed280c90ecc1" - integrity sha512-TYk3OA0HKL6qNryUayb5UUEhM/rkOQozIBEA5ITXh5DWrSp0TlUQXMyZmnWxG/DizSWBeeQ0Zbc5z8UGaaqoeg== +"@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.11": + version "7.18.11" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" + integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -907,9 +907,9 @@ "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-typescript@^7.18.6": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.10.tgz#b23401b32f1f079396bcaed01667a54ebe4f9f85" - integrity sha512-j2HQCJuMbi88QftIb5zlRu3c7PU+sXNnscqsrjqegoGiCgXR569pEdben9vly5QHKL2ilYkfnSwu64zsZo/VYQ== + version "7.18.12" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.12.tgz#712e9a71b9e00fde9f8c0238e0cceee86ab2f8fd" + integrity sha512-2vjjam0cum0miPkenUbQswKowuxs/NjMwIKEq0zwegRxXk12C9YOF9STXnaUptITOtOJHKHpzvvWYOjbm6tc0w== dependencies: "@babel/helper-create-class-features-plugin" "^7.18.9" "@babel/helper-plugin-utils" "^7.18.9" @@ -1079,10 +1079,10 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.10.tgz#37ad97d1cb00efa869b91dd5d1950f8a6cf0cb08" - integrity sha512-J7ycxg0/K9XCtLyHf0cz2DqDihonJeIo+z+HEdRe9YuT8TY4A66i+Ab2/xZCEW7Ro60bPCBBfqqboHSamoV3+g== +"@babel/traverse@^7.1.6", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.10", "@babel/traverse@^7.18.11", "@babel/traverse@^7.18.9": + version "7.18.11" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.11.tgz#3d51f2afbd83ecf9912bcbb5c4d94e3d2ddaa16f" + integrity sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ== dependencies: "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.18.10" @@ -1090,7 +1090,7 @@ "@babel/helper-function-name" "^7.18.9" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.10" + "@babel/parser" "^7.18.11" "@babel/types" "^7.18.10" debug "^4.1.0" globals "^11.1.0" @@ -1174,10 +1174,10 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.14", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.15" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" + integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -1396,23 +1396,6 @@ global "^4.4.0" regenerator-runtime "^0.13.7" -"@storybook/addons@6.5.9": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/addons/-/addons-6.5.9.tgz#5a9d7395c579a9cbc44dfc122362fb3c95dfb9d5" - integrity sha512-adwdiXg+mntfPocLc1KXjZXyLgGk7Aac699Fwe+OUYPEC5tW347Rm/kFatcE556d42o5czcRiq3ZSIGWnm9ieQ== - dependencies: - "@storybook/api" "6.5.9" - "@storybook/channels" "6.5.9" - "@storybook/client-logger" "6.5.9" - "@storybook/core-events" "6.5.9" - "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/router" "6.5.9" - "@storybook/theming" "6.5.9" - "@types/webpack-env" "^1.16.0" - core-js "^3.8.2" - global "^4.4.0" - regenerator-runtime "^0.13.7" - "@storybook/api@6.5.10": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/api/-/api-6.5.10.tgz#215623844648f0da2ac646fdcdd1345c2e1a8490" @@ -1436,29 +1419,6 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/api@6.5.9": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/api/-/api-6.5.9.tgz#303733214c9de0422d162f7c54ae05d088b89bf9" - integrity sha512-9ylztnty4Y+ALU/ehW3BML9czjCAFsWvrwuCi6UgcwNjswwjSX3VRLhfD1KT3pl16ho//95LgZ0LnSwROCcPOA== - dependencies: - "@storybook/channels" "6.5.9" - "@storybook/client-logger" "6.5.9" - "@storybook/core-events" "6.5.9" - "@storybook/csf" "0.0.2--canary.4566f4d.1" - "@storybook/router" "6.5.9" - "@storybook/semver" "^7.3.2" - "@storybook/theming" "6.5.9" - core-js "^3.8.2" - fast-deep-equal "^3.1.3" - global "^4.4.0" - lodash "^4.17.21" - memoizerific "^1.11.3" - regenerator-runtime "^0.13.7" - store2 "^2.12.0" - telejson "^6.0.8" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/builder-webpack4@6.5.10": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/builder-webpack4/-/builder-webpack4-6.5.10.tgz#79e95323577a37349ab3c81193fa249ac5c50173" @@ -1589,15 +1549,6 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/channels@6.5.9": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/channels/-/channels-6.5.9.tgz#abfab89a6587a2688e9926d4aafeb11c9d8b2e79" - integrity sha512-FvGA35nV38UPXWOl9ERapFTJaxwSTamQ339s2Ev7E9riyRG+GRkgTWzf5kECJgS1PAYKd/7m/RqKJT9BVv6A5g== - dependencies: - core-js "^3.8.2" - ts-dedent "^2.0.0" - util-deprecate "^1.0.2" - "@storybook/client-api@6.5.10": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.5.10.tgz#0bc3f68ce014ce1ffd560472a893ba04be370f09" @@ -1624,7 +1575,7 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/client-logger@6.5.10": +"@storybook/client-logger@6.5.10", "@storybook/client-logger@^6.4.0": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.5.10.tgz#cfea823a5b8444409daa74f854c5d05367986b34" integrity sha512-/xA0MHOevXev68hyLMQw8Qo8KczSIdXOxliAgrycMTkDmw5eKeA8TP7B8zP3wGuq/e3MrdD9/8MWhb/IQBNC3w== @@ -1632,14 +1583,6 @@ core-js "^3.8.2" global "^4.4.0" -"@storybook/client-logger@6.5.9", "@storybook/client-logger@^6.4.0": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.5.9.tgz#dc1669abe8c45af1cc38f74c6f4b15ff33e63014" - integrity sha512-DOHL6p0uiDd3gV/Sb2FR+Vh6OiPrrf8BrA06uvXWsMRIIvEEvnparxv9EvPg7FlmUX0T3nq7d3juwjx4F8Wbcg== - dependencies: - core-js "^3.8.2" - global "^4.4.0" - "@storybook/components@6.5.10": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/components/-/components-6.5.10.tgz#268e1269bc3d262f7dcec13f96c3b844919687b8" @@ -1743,13 +1686,6 @@ dependencies: core-js "^3.8.2" -"@storybook/core-events@6.5.9": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.5.9.tgz#5b0783c7d22a586c0f5e927a61fe1b1223e19637" - integrity sha512-tXt7a3ZvJOCeEKpNa/B5rQM5VI7UJLlOh3IHOImWn4HqoBRrZvbourmac+PRZAtXpos0h3c6554Hjapj/Sny5Q== - dependencies: - core-js "^3.8.2" - "@storybook/core-server@6.5.10": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/core-server/-/core-server-6.5.10.tgz#ada3d647833c02cb8c742281c1f314ff866f96f8" @@ -1850,13 +1786,13 @@ regenerator-runtime "^0.13.7" "@storybook/instrumenter@^6.4.0": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-6.5.9.tgz#885d9dec31b7b7fa6ea29b446105480450e527b8" - integrity sha512-I2nu/6H0MAy8d+d3LY/G6oYEFyWlc8f2Qs2DhpYh5FiCgIpzvY0DMN05Lf8oaXdKHL3lPF/YLJH17FttekXs1w== + version "6.5.10" + resolved "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-6.5.10.tgz#5443f5fdb25ddb589ede2e2f0147becaffd405cb" + integrity sha512-3yKJW68wTnGYEts2mJQG6M7ZE+fe54fuy5lBBzRtvWnC15uWTxuaiFp2kxH5b+stSCi4m71ws45RNiEafdBgEQ== dependencies: - "@storybook/addons" "6.5.9" - "@storybook/client-logger" "6.5.9" - "@storybook/core-events" "6.5.9" + "@storybook/addons" "6.5.10" + "@storybook/client-logger" "6.5.10" + "@storybook/core-events" "6.5.10" core-js "^3.8.2" global "^4.4.0" @@ -2054,17 +1990,6 @@ qs "^6.10.0" regenerator-runtime "^0.13.7" -"@storybook/router@6.5.9": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/router/-/router-6.5.9.tgz#4740248f8517425b2056273fb366ace8a17c65e8" - integrity sha512-G2Xp/2r8vU2O34eelE+G5VbEEVFDeHcCURrVJEROh6dq2asFJAPbzslVXSeCqgOTNLSpRDJ2NcN5BckkNqmqJg== - dependencies: - "@storybook/client-logger" "6.5.9" - core-js "^3.8.2" - memoizerific "^1.11.3" - qs "^6.10.0" - regenerator-runtime "^0.13.7" - "@storybook/semver@^7.3.2": version "7.3.2" resolved "https://registry.npmjs.org/@storybook/semver/-/semver-7.3.2.tgz#f3b9c44a1c9a0b933c04e66d0048fcf2fa10dac0" @@ -2149,16 +2074,6 @@ memoizerific "^1.11.3" regenerator-runtime "^0.13.7" -"@storybook/theming@6.5.9": - version "6.5.9" - resolved "https://registry.npmjs.org/@storybook/theming/-/theming-6.5.9.tgz#13f60a3a3cd73ceb5caf9f188e1627e79f1891aa" - integrity sha512-KM0AMP5jMQPAdaO8tlbFCYqx9uYM/hZXGSVUhznhLYu7bhNAIK7ZVmXxyE/z/khM++8eUHzRoZGiO/cwCkg9Xw== - dependencies: - "@storybook/client-logger" "6.5.9" - core-js "^3.8.2" - memoizerific "^1.11.3" - regenerator-runtime "^0.13.7" - "@storybook/ui@6.5.10": version "6.5.10" resolved "https://registry.npmjs.org/@storybook/ui/-/ui-6.5.10.tgz#f56095a1a39ae5a203f2ac7f3dba86341a5927d5" @@ -2179,17 +2094,116 @@ regenerator-runtime "^0.13.7" resolve-from "^5.0.0" -"@sucrase/webpack-loader@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@sucrase/webpack-loader/-/webpack-loader-2.0.0.tgz#b8a70b8d3df3eeb570e6a3315e1a9c6b723e4a37" - integrity sha512-KUfWr83g70Qm+ZqjGL+M4tX01taDP3BldQcI6NSMlDf7WTDfuo0RvLlS0ekF6dPVslNyZhbFFBy2OBTB6Sa6+Q== +"@swc/core-android-arm-eabi@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.239.tgz#4b9848b9dbeefb9c3de413f668d6c5a2b3f74333" + integrity sha512-v316u9E517XQ48YwtkvfwN3nKw6oirJrBOmniA0IM5qhZYOIHDvm3YEhD+hmlEXWbRJ2iwK3ecN3J/HN725I8g== dependencies: - loader-utils "^1.1.0" + "@swc/wasm" "1.2.122" + +"@swc/core-android-arm64@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.239.tgz#6f44c684924a62fb22474af49feabd2d33581ead" + integrity sha512-HZRYhiRpTetnABVZIVEVnDDBSu+O/FP8sD1g+/dnYx8RZzbfbAsxvnauTRRuWDaqr3wcjDxGYCHiNf8Chaf2LQ== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-darwin-arm64@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.239.tgz#c7339507d9ff62dd89d2e0e9c6c12be964ed6e9d" + integrity sha512-qucvHgJ5VQVZNdQacqbloWDYqZyD1pttBqyRWo3Wqr5mC+JAIJl+JsflFpV8QEgY52aMgk/cLVhTa46Si3L3Jw== + +"@swc/core-darwin-x64@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.239.tgz#957d9a6dd4e7ee748c8d76d47e3d91079932b8bf" + integrity sha512-0iunP9diQpjtacY+YQDwWmUANe4nA54aPDcum4O2vnhFeAXWoYX0b7FmYdq7UqxpP5IxcBgQAl7QhEfDnGrvoA== + +"@swc/core-freebsd-x64@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.239.tgz#cb824b681f6efb9456387083990556ac2e2ca16d" + integrity sha512-CA5yf6hd6czwIHlp/89Y03B+19+3EWCAPESjAPmJFjiNv4aGtzkSH+cYljmKYSkkQlYXGdKAc3d5GwL0sUaQgQ== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-linux-arm-gnueabihf@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.239.tgz#c88aca1b8bcb36eff80a3f6668c80e3a97c2a806" + integrity sha512-/GsCHvbPcsFF6kYiWyDan8zq1t/Jc5/ksMTWuENmokMBGdTECffFZAtx44V25Iw6Ip6Oe5Uzo7Mdabh4U6sbmA== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-linux-arm64-gnu@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.239.tgz#3e1d113c57d3b031aff78b140dcf3d5bb0b96ec9" + integrity sha512-VZ/oShno1H+ElO5FuhIacSvSgv5Ftzifkv1iAy9pi8e9cV6Y5RCxIEm6C28nCXNiyrSo5/AqqejGEZKt2pEblA== + +"@swc/core-linux-arm64-musl@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.239.tgz#f7aacbdd2797a35ec5a0c55a128119735f9a0b8e" + integrity sha512-d24/2NEuvRAVFEFNRwwjlzuZhe442oUnhLuWRqh13bRBY7cRde3KIrxl4IMiVd5GvVKUy4JlhClmiV7Su9nVKw== + +"@swc/core-linux-x64-gnu@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.239.tgz#84d64156ccd513319ff30474c5d5feec1f2d30ef" + integrity sha512-OKjj99kfCSrMEvWbWftSAgj29v5TxII+KCAuA284NoGYVcezzaO37C4TfrDjOW5/wtvDfWk97w8FfsOmrWKl0A== + +"@swc/core-linux-x64-musl@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.239.tgz#d40c6b98eab92aea3920c3b63055f661491c1403" + integrity sha512-BsX/ivpDmYFeqOHz5gA5OqtskO5mkEKyBRhhVnzc9AG9tbhz8X5zZMLPV398RCn48lmS/uS8MPXHkJKAlYA1BA== + +"@swc/core-win32-arm64-msvc@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.239.tgz#2aa64338bf111109bef89e42f12e57cb2812edea" + integrity sha512-C5es8Aou6+PnZmk+h+Kay/UCctkwCPRonwRajLDa88x2elhmxE1pdLIPAJVp5RpOlFoPRbJAkc5I+4fV5njZ9g== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-win32-ia32-msvc@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.239.tgz#842d747ec3c864f4f9217f1b1964cb814ee51dc7" + integrity sha512-24VMplxQTtOJk7cxpBViq9HozSc6Pg6MxBMuudTmGh6z3L//VxLn0wpUR9jLEvRUk/2i1p1DKpc6RQ0tYcNf9A== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-win32-x64-msvc@1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.239.tgz#e0bbbedfcebf2dcf876cdfb438318407cbe4b288" + integrity sha512-qktIdFdGS6dpDnOGnImrOA9GpNMsVaGAycGcvoqoUYEkPf8dFCLKthEOzqA1fU01wKn3r1M5mi1eluM1ld5Hng== + +"@swc/core@^1.2.239": + version "1.2.239" + resolved "https://registry.npmjs.org/@swc/core/-/core-1.2.239.tgz#4a28f9962f5e7ae1094368243c52168d36258eef" + integrity sha512-U3tbnOBykfLGIJRQ+bSxVsgyTPQ5l9zTe2YQq3GULnxe6rfsgEYN54Uelp9vr3w7LXfW0k+bteXS6YGLpmnEfw== + optionalDependencies: + "@swc/core-android-arm-eabi" "1.2.239" + "@swc/core-android-arm64" "1.2.239" + "@swc/core-darwin-arm64" "1.2.239" + "@swc/core-darwin-x64" "1.2.239" + "@swc/core-freebsd-x64" "1.2.239" + "@swc/core-linux-arm-gnueabihf" "1.2.239" + "@swc/core-linux-arm64-gnu" "1.2.239" + "@swc/core-linux-arm64-musl" "1.2.239" + "@swc/core-linux-x64-gnu" "1.2.239" + "@swc/core-linux-x64-musl" "1.2.239" + "@swc/core-win32-arm64-msvc" "1.2.239" + "@swc/core-win32-ia32-msvc" "1.2.239" + "@swc/core-win32-x64-msvc" "1.2.239" + +"@swc/wasm@1.2.122": + version "1.2.122" + resolved "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.122.tgz#87a5e654b26a71b2e84b801f41e45f823b856639" + integrity sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ== + +"@swc/wasm@1.2.130": + version "1.2.130" + resolved "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz#88ac26433335d1f957162a9a92f1450b73c176a0" + integrity sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q== "@testing-library/dom@^8.3.0": - version "8.14.0" - resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz#c9830a21006d87b9ef6e1aae306cf49b0283e28e" - integrity sha512-m8FOdUo77iMTwVRCyzWcqxlEIk+GnopbrRI15a0EaLbpZSCinIVI4kSQzWhkShK83GogvEFJSsHF3Ws0z1vrqA== + version "8.17.1" + resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-8.17.1.tgz#2d7af4ff6dad8d837630fecd08835aee08320ad7" + integrity sha512-KnH2MnJUzmFNPW6RIKfd+zf2Wue8mEKX0M3cpX6aKl5ZXrJM1/c/Pc8c2xDNYQCnJO48Sm5ITbMXgqTr3h4jxQ== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" @@ -2221,9 +2235,9 @@ "@types/estree" "*" "@types/eslint@*": - version "8.4.5" - resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz#acdfb7dd36b91cc5d812d7c093811a8f3d9b31e4" - integrity sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ== + version "8.4.6" + resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.6.tgz#7976f054c1bccfcf514bff0564c0c41df5c08207" + integrity sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -2279,9 +2293,9 @@ integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== "@types/lodash@^4.14.167": - version "4.14.182" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" - integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== + version "4.14.184" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.184.tgz#23f96cd2a21a28e106dc24d825d4aa966de7a9fe" + integrity sha512-RoZphVtHbxPZizt4IcILciSWiC6dcn+eZ8oX9IWEYfDMcocdd42f7NPI6fQj+6zI8y4E0L7gu2pcZKLGTRaV9Q== "@types/mdast@^3.0.0": version "3.0.10" @@ -2304,14 +2318,14 @@ form-data "^3.0.0" "@types/node@*": - version "18.6.3" - resolved "https://registry.npmjs.org/@types/node/-/node-18.6.3.tgz#4e4a95b6fe44014563ceb514b2598b3e623d1c98" - integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg== + version "18.7.6" + resolved "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83" + integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A== "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": - version "16.11.47" - resolved "https://registry.npmjs.org/@types/node/-/node-16.11.47.tgz#efa9e3e0f72e7aa6a138055dace7437a83d9f91c" - integrity sha512-fpP+jk2zJ4VW66+wAMFoBJlx1bxmBKx4DUFf68UHgdGCOuyUTDlLWqsaNPJh7xhNDykyJ9eIzAygilP/4WoN8g== + version "16.11.49" + resolved "https://registry.npmjs.org/@types/node/-/node-16.11.49.tgz#560b1ea774b61e19a89c3fc72d2dcaa3863f38b2" + integrity sha512-Abq9fBviLV93OiXMu+f6r0elxCzRwc0RC5f99cU892uBITL44pTvgvEqlRlPRi8EGcO1z7Cp8A4d0s/p3J/+Nw== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -2354,9 +2368,9 @@ integrity sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ== "@types/uglify-js@*": - version "3.16.0" - resolved "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.16.0.tgz#2cf74a0e6ebb6cd54c0d48e509d5bd91160a9602" - integrity sha512-0yeUr92L3r0GLRnBOvtYK1v2SjqMIqQDHMl7GLb+l2L8+6LSFWEEWEIgVsPdMn5ImLM8qzWT8xFPtQYpp8co0g== + version "3.17.0" + resolved "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.0.tgz#95271e7abe0bf7094c60284f76ee43232aef43b9" + integrity sha512-3HO6rm0y+/cqvOyA8xcYLweF0TKXlAxmQASjbOi49Co51A1N4nR4bEwBgRoD9kNM+rqFGArjKr654SLp2CoGmQ== dependencies: source-map "^0.6.1" @@ -2366,9 +2380,9 @@ integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== "@types/webpack-env@^1.16.0": - version "1.17.0" - resolved "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.17.0.tgz#f99ce359f1bfd87da90cc4a57cab0a18f34a48d0" - integrity sha512-eHSaNYEyxRA5IAG0Ym/yCyf86niZUIF/TpWKofQI/CVfh5HsMEUyfE2kwFxha4ow0s5g0LfISQxpDKjbRDrizw== + version "1.18.0" + resolved "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.18.0.tgz#ed6ecaa8e5ed5dfe8b2b3d00181702c9925f13fb" + integrity sha512-56/MAlX5WMsPVbOg7tAxnYvNYMMWr/QJiIp6BxVSW3JJXUVzzOn64qW8TzQyMSqSUFM2+PVI4aUHcHOzIz/1tg== "@types/webpack-sources@*": version "3.2.0" @@ -2659,11 +2673,6 @@ ansi-to-html@^0.6.11: dependencies: entities "^2.0.0" -any-promise@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== - anymatch@^3.0.0, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -3204,9 +3213,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370: - version "1.0.30001373" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001373.tgz#2dc3bc3bfcb5d5a929bec11300883040d7b4b4be" - integrity sha512-pJYArGHrPp3TUqQzFYRmP/lwJlj8RCbVe3Gd3eJQkAV8SAC6b19XS9BjMvRdvaS8RMkaTN8ZhoHP6S1y8zzwEQ== + version "1.0.30001378" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001378.tgz#3d2159bf5a8f9ca093275b0d3ecc717b00f27b67" + integrity sha512-JVQnfoO7FK7WvU4ZkBRbPjaot4+YqxogSDosHv0Hv5mWpUESmN+UubMU6L/hGz8QlQ2aY5U0vR6MOs6j/CXpNA== case-sensitive-paths-webpack-plugin@^2.3.0: version "2.4.0" @@ -3400,7 +3409,7 @@ commander@^2.19.0, commander@^2.20.0: resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.0.0, commander@^4.1.1: +commander@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== @@ -3860,9 +3869,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.202: - version "1.4.210" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.210.tgz#12611fe874b833a3bf3671438b5893aba7858980" - integrity sha512-kSiX4tuyZijV7Cz0MWVmGT8K2siqaOA4Z66K5dCttPPRh0HicOcOAEj1KlC8O8J1aOS/1M8rGofOzksLKaHWcQ== + version "1.4.225" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.225.tgz#3e27bdd157cbaf19768141f2e0f0f45071e52338" + integrity sha512-ICHvGaCIQR3P88uK8aRtx8gmejbVJyC6bB4LEC3anzBrIzdzC7aiZHY4iFfXhN4st6I7lMO0x4sgBHf/7kBvRw== element-resize-detector@^1.2.2: version "1.2.4" @@ -4229,7 +4238,7 @@ fast-json-stable-stringify@^2.0.0: fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.13.0" @@ -4584,18 +4593,6 @@ glob-to-regexp@^0.4.1: resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.6: - version "7.1.6" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -5129,9 +5126,9 @@ is-callable@^1.1.4, is-callable@^1.2.4: integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== is-core-module@^2.9.0: - version "2.9.0" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + version "2.10.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" @@ -6009,15 +6006,6 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mz@^2.7.0: - version "2.7.0" - resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" - integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== - dependencies: - any-promise "^1.0.0" - object-assign "^4.0.1" - thenify-all "^1.0.0" - nanoid@^3.3.1, nanoid@^3.3.4: version "3.3.4" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" @@ -6163,13 +6151,13 @@ object-visit@^1.0.0: isobject "^3.0.0" object.assign@^4.1.0, object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + version "4.1.4" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" object-keys "^1.1.1" object.entries@^1.1.0: @@ -6555,7 +6543,7 @@ pinkie@^2.0.0: resolved "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== -pirates@^4.0.1, pirates@^4.0.5: +pirates@^4.0.5: version "4.0.5" resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== @@ -6701,9 +6689,9 @@ postcss@^7.0.14, postcss@^7.0.26, postcss@^7.0.32, postcss@^7.0.36, postcss@^7.0 source-map "^0.6.1" postcss@^8.2.15: - version "8.4.14" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" - integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + version "8.4.16" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" + integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== dependencies: nanoid "^3.3.4" picocolors "^1.0.0" @@ -6851,11 +6839,6 @@ qs@^6.10.0: dependencies: side-channel "^1.0.4" -querystring@^0.2.0: - version "0.2.1" - resolved "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" - integrity sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg== - queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -7811,18 +7794,6 @@ style-to-object@0.3.0, style-to-object@^0.3.0: dependencies: inline-style-parser "0.1.1" -sucrase@^3.21.0: - version "3.25.0" - resolved "https://registry.npmjs.org/sucrase/-/sucrase-3.25.0.tgz#6dffa34e614b3347877507a4380cc4f022b7b7aa" - integrity sha512-WxTtwEYXSmZArPGStGBicyRsg5TBEFhT5b7N+tF+zauImP0Acy+CoUK0/byJ8JNPK/5lbpWIVuFagI4+0l85QQ== - dependencies: - commander "^4.0.0" - glob "7.1.6" - lines-and-columns "^1.1.6" - mz "^2.7.0" - pirates "^4.0.1" - ts-interface-checker "^0.1.9" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -7849,6 +7820,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +swc-loader@^0.2.3: + version "0.2.3" + resolved "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.3.tgz#6792f1c2e4c9ae9bf9b933b3e010210e270c186d" + integrity sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A== + symbol.prototype.description@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/symbol.prototype.description/-/symbol.prototype.description-1.0.5.tgz#d30e01263b6020fbbd2d2884a6276ce4d49ab568" @@ -7916,15 +7892,15 @@ terser-webpack-plugin@^4.2.3: webpack-sources "^1.4.3" terser-webpack-plugin@^5.0.3, terser-webpack-plugin@^5.1.3: - version "5.3.3" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz#8033db876dd5875487213e87c627bca323e5ed90" - integrity sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ== + version "5.3.5" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz#f7d82286031f915a4f8fb81af4bd35d2e3c011bc" + integrity sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA== dependencies: - "@jridgewell/trace-mapping" "^0.3.7" + "@jridgewell/trace-mapping" "^0.3.14" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.0" - terser "^5.7.2" + terser "^5.14.1" terser@^4.6.3: version "4.8.1" @@ -7935,7 +7911,7 @@ terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.10.0, terser@^5.3.4, terser@^5.7.2: +terser@^5.10.0, terser@^5.14.1, terser@^5.3.4: version "5.14.2" resolved "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== @@ -7954,20 +7930,6 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" -thenify-all@^1.0.0: - version "1.6.0" - resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== - dependencies: - thenify ">= 3.1.0 < 4" - -"thenify@>= 3.1.0 < 4": - version "3.3.1" - resolved "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" - integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== - dependencies: - any-promise "^1.0.0" - throttle-debounce@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb" @@ -8045,11 +8007,6 @@ ts-dedent@^2.0.0, ts-dedent@^2.2.0: resolved "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz#39e4bd297cd036292ae2394eb3412be63f563bb5" integrity sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ== -ts-interface-checker@^0.1.9: - version "0.1.13" - resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" - integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== - ts-pnp@^1.1.6: version "1.2.0" resolved "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" @@ -8091,9 +8048,9 @@ type-is@~1.6.18: mime-types "~2.1.24" uglify-js@^3.1.4: - version "3.16.3" - resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.3.tgz#94c7a63337ee31227a18d03b8a3041c210fd1f1d" - integrity sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw== + version "3.17.0" + resolved "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== unbox-primitive@^1.0.2: version "1.0.2" @@ -8419,13 +8376,12 @@ webpack-filter-warnings-plugin@^1.2.1: integrity sha512-Ez6ytc9IseDMLPo0qCuNNYzgtUl8NovOqjIq4uAU8LTD4uoa1w1KpZyyzFtLTEMZpkkOkLfL9eN+KGYdk1Qtwg== webpack-hot-middleware@^2.25.1: - version "2.25.1" - resolved "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.1.tgz#581f59edf0781743f4ca4c200fd32c9266c6cf7c" - integrity sha512-Koh0KyU/RPYwel/khxbsDz9ibDivmUbrRuKSSQvW42KSDdO4w23WI3SkHpSUKHE76LrFnnM/L7JCrpBwu8AXYw== + version "2.25.2" + resolved "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.25.2.tgz#f7f936f3871d8c4eb95ecdf23a34e9cefe9806e8" + integrity sha512-CVgm3NAQyfdIonRvXisRwPTUYuSbyZ6BY7782tMeUzWOO7RmVI2NaBYuCp41qyD4gYCkJyTneAJdK69A13B0+A== dependencies: ansi-html-community "0.0.8" html-entities "^2.1.0" - querystring "^0.2.0" strip-ansi "^6.0.0" webpack-log@^2.0.0: diff --git a/yarn.lock b/yarn.lock index 8a1f29ae08..1abe2a17c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2040,13 +2040,22 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" -"@backstage/core-components@^0.10.0": - version "0.10.0" - resolved "https://registry.npmjs.org/@backstage/core-components/-/core-components-0.10.0.tgz#d7f802eee82c49677f5d9b63d8c33b7405096caa" - integrity sha512-aG41uf05Jrq44nv8i9WyzRGMEKmQmM1n0MRKz4YUhBksFexXMd+pPST7D9aSFivNm/92o7obPLjcKfx2QYbJqg== +"@backstage/catalog-client@^1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@backstage/catalog-client/-/catalog-client-1.0.4.tgz#205169a3a19be22866ffcc94ec415ca795fe9589" + integrity sha512-N3ko48XX8HnFCEwhFglC+rqIsy1KQpPlsPMhMYEOYeaOgw8H26SPMtv4wyFjcm9/Hadars+L3fnmQdSShECawg== + dependencies: + "@backstage/catalog-model" "^1.1.0" + "@backstage/errors" "^1.1.0" + cross-fetch "^3.1.5" + +"@backstage/core-components@^0.11.0": + version "0.11.0" + resolved "https://registry.npmjs.org/@backstage/core-components/-/core-components-0.11.0.tgz#3e966b4670bca9db228808e41e251f07361580a2" + integrity sha512-Exu7qp5X+vykLFSLwZBKlSHZXXp/goid1Zk+C2pGH/Nil7MH/KI1POsA4AupggJAR910q++oV1MbKZIjUIOHhA== dependencies: "@backstage/config" "^1.0.1" - "@backstage/core-plugin-api" "^1.0.4" + "@backstage/core-plugin-api" "^1.0.5" "@backstage/errors" "^1.1.0" "@backstage/theme" "^0.2.16" "@backstage/version-bridge" "^1.0.1" @@ -2085,6 +2094,155 @@ zen-observable "^0.8.15" zod "^3.11.6" +"@backstage/core-plugin-api@^1.0.0", "@backstage/core-plugin-api@^1.0.5": + version "1.0.5" + resolved "https://registry.npmjs.org/@backstage/core-plugin-api/-/core-plugin-api-1.0.5.tgz#a6d0dd8272e9175f381dee6e1090d758d408cca0" + integrity sha512-4d9X8+nu2n4t7Vu26LNzTKMW3U2peHoC1wWGKVDLwbMdewG0EXrbUIRo7Daon0xwyDrZWBUCrDiFElgLOb61Bg== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/types" "^1.0.0" + "@backstage/version-bridge" "^1.0.1" + history "^5.0.0" + prop-types "^15.7.2" + react-router-dom "6.0.0-beta.0" + zen-observable "^0.8.15" + +"@backstage/integration-react@^1.0.0": + version "1.1.3" + resolved "https://registry.npmjs.org/@backstage/integration-react/-/integration-react-1.1.3.tgz#f69ef35bf64e30cd12edf1c9e072f34dfc3293a0" + integrity sha512-RLXXUR9ICqBw513cJkLhKJn4by4QGBxev5EtMZEQFzZp8NaljEud4BB2WN5qm5yuM0v8n6T55xlNfl3GKpRYyw== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/core-components" "^0.11.0" + "@backstage/core-plugin-api" "^1.0.5" + "@backstage/integration" "^1.3.0" + "@backstage/theme" "^0.2.16" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + react-use "^17.2.4" + +"@backstage/integration@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@backstage/integration/-/integration-1.3.0.tgz#1907c94a58f09aa6881d66d2eb7b9521fff6db76" + integrity sha512-GKGEK1CqOY4nmFSS3QwBze4AsT/MsLlyK/LwYy87p+bicYF3VAcSUddfwqx/20K7GaaWGwkU0DjCI5k5g+kSXg== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/errors" "^1.1.0" + "@octokit/auth-app" "^4.0.0" + "@octokit/rest" "^19.0.3" + cross-fetch "^3.1.5" + git-url-parse "^12.0.0" + lodash "^4.17.21" + luxon "^3.0.0" + +"@backstage/plugin-catalog-common@^1.0.5": + version "1.0.5" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog-common/-/plugin-catalog-common-1.0.5.tgz#0617387e52181ea347b505d00704b791eef2dcda" + integrity sha512-dBKSBHPlohL3aHVGZLKGZfHtEnWzH1bwWCTJlqJLdiyfiRWjwtgRTIlcv2GSizYs4WZ1IW1LfDxkheR0pAW8vg== + dependencies: + "@backstage/plugin-permission-common" "^0.6.3" + "@backstage/plugin-search-common" "^1.0.0" + +"@backstage/plugin-catalog-react@^1.0.0", "@backstage/plugin-catalog-react@^1.1.3": + version "1.1.3" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog-react/-/plugin-catalog-react-1.1.3.tgz#a3a8b2ddd8a8a8a6d8d822ef98ada306a9086eb0" + integrity sha512-VXsrRmNM+s4i8XoJk6TLkKvekVgZvEqVe3nAUUIfwZQwYe4wV/J0WlEeimKdhNMq8pLhJIYeBsna5J10yEZR9w== + dependencies: + "@backstage/catalog-client" "^1.0.4" + "@backstage/catalog-model" "^1.1.0" + "@backstage/core-components" "^0.11.0" + "@backstage/core-plugin-api" "^1.0.5" + "@backstage/errors" "^1.1.0" + "@backstage/integration" "^1.3.0" + "@backstage/plugin-catalog-common" "^1.0.5" + "@backstage/plugin-permission-common" "^0.6.3" + "@backstage/plugin-permission-react" "^0.4.4" + "@backstage/theme" "^0.2.16" + "@backstage/types" "^1.0.0" + "@backstage/version-bridge" "^1.0.1" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + classnames "^2.2.6" + jwt-decode "^3.1.0" + lodash "^4.17.21" + qs "^6.9.4" + react-router "6.0.0-beta.0" + react-use "^17.2.4" + yaml "^2.0.0" + zen-observable "^0.8.15" + +"@backstage/plugin-home@^0.4.19", "@backstage/plugin-home@^0.4.24": + version "0.4.24" + resolved "https://registry.npmjs.org/@backstage/plugin-home/-/plugin-home-0.4.24.tgz#82bb624fdf56c4a2fd06958928813a648d88ca03" + integrity sha512-7cZYNM+4ZohE6MIXzVAMsBW5JpkOPXJP8RjMVsLOIX4FGngS5mK7LFVTuYZ/fLwAsNJIEc0s6zxHM8zyFw1Zow== + dependencies: + "@backstage/catalog-model" "^1.1.0" + "@backstage/config" "^1.0.1" + "@backstage/core-components" "^0.11.0" + "@backstage/core-plugin-api" "^1.0.5" + "@backstage/plugin-catalog-react" "^1.1.3" + "@backstage/plugin-stack-overflow" "^0.1.4" + "@backstage/theme" "^0.2.16" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.57" + lodash "^4.17.21" + react-router "6.0.0-beta.0" + react-use "^17.2.4" + +"@backstage/plugin-permission-common@^0.6.3": + version "0.6.3" + resolved "https://registry.npmjs.org/@backstage/plugin-permission-common/-/plugin-permission-common-0.6.3.tgz#9815dd2dddf224454f55f35710b6a68644e95f00" + integrity sha512-7GL3+9M2wDiG406JSIzTq08KNrSZToAG5PTwKHXD6RFC1jF9X50aRYv+5jVwdmRhSk6r5JqoB4HhcgisseBzoQ== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/errors" "^1.1.0" + cross-fetch "^3.1.5" + uuid "^8.0.0" + zod "^3.11.6" + +"@backstage/plugin-permission-react@^0.4.4": + version "0.4.4" + resolved "https://registry.npmjs.org/@backstage/plugin-permission-react/-/plugin-permission-react-0.4.4.tgz#3032d621cc9259d2d9fd4043ac01ece8b012e6c1" + integrity sha512-dldu0yc1tQTI5SVSlS3jIB8kYd6ntWk3mKyX/8aFUt2BNBajqwBMYUOjAknXnnuNpYqxE1uVsPrZXePC7QQ/1g== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/core-plugin-api" "^1.0.5" + "@backstage/plugin-permission-common" "^0.6.3" + cross-fetch "^3.1.5" + react-router "6.0.0-beta.0" + react-use "^17.2.4" + swr "^1.1.2" + +"@backstage/plugin-search-common@^1.0.0": + version "1.0.0" + resolved "https://registry.npmjs.org/@backstage/plugin-search-common/-/plugin-search-common-1.0.0.tgz#fa9ac1f57d79e7cd9b9ca9a929065979010a5a37" + integrity sha512-Jr+z/cqc60GkY7rrIXifmAIdlRbEFtWesoLx5v4rgLGG/lCgsMzAm0Vxzg1g/9r71raSnKBakPajjhpMEZ5SWA== + dependencies: + "@backstage/plugin-permission-common" "^0.6.3" + "@backstage/types" "^1.0.0" + +"@backstage/plugin-stack-overflow@^0.1.4": + version "0.1.4" + resolved "https://registry.npmjs.org/@backstage/plugin-stack-overflow/-/plugin-stack-overflow-0.1.4.tgz#98f8b78c36fc51ed51934c540b08247b85397b6d" + integrity sha512-JzXs6lMzsBJTP5zLhzBoikzGv3kk47ahj6bDA9KhvHN/ky+rZ8Ue56wZ9oB5rABbH5BnenVkJvy/k7gnXl4s/g== + dependencies: + "@backstage/config" "^1.0.1" + "@backstage/core-components" "^0.11.0" + "@backstage/core-plugin-api" "^1.0.5" + "@backstage/plugin-home" "^0.4.24" + "@backstage/plugin-search-common" "^1.0.0" + "@backstage/theme" "^0.2.16" + "@material-ui/core" "^4.12.2" + "@material-ui/icons" "^4.9.1" + "@testing-library/jest-dom" "^5.10.1" + cross-fetch "^3.1.5" + lodash "^4.17.21" + qs "^6.9.4" + react-use "^17.2.4" + "@balena/dockerignore@^1.0.2": version "1.0.2" resolved "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" @@ -2661,10 +2819,10 @@ teeny-request "^8.0.0" uuid "^8.0.0" -"@graphiql/react@^0.9.0": - version "0.9.0" - resolved "https://registry.npmjs.org/@graphiql/react/-/react-0.9.0.tgz#8450d3ea6dbf096deb16c9b297ff2ed526e793f4" - integrity sha512-JwhHVFS4ZP5lCchaf31NMJ/MVxl//DGrt/WO9XVjtQoL4kkAWMnNOQzZmTAnbEfPwdQUhkMz+xL50Yum3QrIZg== +"@graphiql/react@^0.10.0": + version "0.10.0" + resolved "https://registry.npmjs.org/@graphiql/react/-/react-0.10.0.tgz#8d888949dc6c9ddebe0817aeba3e2c164bfbb1bb" + integrity sha512-8Xo1O6SQps6R+mOozN7Ht85/07RwyXgJcKNeR2dWPkJz/1Lww8wVHIKM/AUpo0Aaoh6Ps3UK9ep8DDRfBT4XrQ== dependencies: "@graphiql/toolkit" "^0.6.1" codemirror "^5.65.3" @@ -3266,25 +3424,6 @@ dependencies: "@hapi/hoek" "^9.0.0" -"@hot-loader/react-dom-v16@npm:@hot-loader/react-dom@^16.0.2": - version "16.14.0" - resolved "https://registry.npmjs.org/@hot-loader/react-dom/-/react-dom-16.14.0.tgz#3cfc64e40bb78fa623e59b582b8f09dcdaad648a" - integrity sha512-EN9czvcLsMYmSDo5yRKZOAq3ZGRlDpad1gPtX0NdMMomJXcPE3yFSeFzE94X/NjOaiSVimB7LuqPYpkWVaIi4Q== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - -"@hot-loader/react-dom-v17@npm:@hot-loader/react-dom@^17.0.2": - version "17.0.2" - resolved "https://registry.npmjs.org/@hot-loader/react-dom/-/react-dom-17.0.2.tgz#0b24e484093e8f97eb5c72bebdda44fc20bc8400" - integrity sha512-G2RZrFhsQClS+bdDh/Ojpk3SgocLPUGnvnJDTQYnmKSSwXtU+Yh+8QMs+Ia3zaAvBiOSpIIDSUxuN69cvKqrWg== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" - "@humanwhocodes/config-array@^0.10.4": version "0.10.4" resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" @@ -3399,6 +3538,13 @@ slash "^3.0.0" strip-ansi "^6.0.0" +"@jest/create-cache-key-function@^27.4.2": + version "27.5.1" + resolved "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz#7448fae15602ea95c828f5eceed35c202a820b31" + integrity sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ== + dependencies: + "@jest/types" "^27.5.1" + "@jest/environment@^27.5.1": version "27.5.1" resolved "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" @@ -4954,18 +5100,6 @@ outvariant "^1.2.1" strict-event-emitter "^0.2.0" -"@mswjs/interceptors@^0.16.3": - version "0.16.6" - resolved "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.16.6.tgz#c1a777ed3f69b55bbbc725b2deb827f160c0107c" - integrity sha512-7ax1sRx5s4ZWl0KvVhhcPOUoPbCCkVh8M8hYaqOyvoAQOiqLVzy+Z6Mh2ywPhYw4zudr5Mo/E8UT/zJBO/Wxrw== - dependencies: - "@open-draft/until" "^1.0.3" - "@xmldom/xmldom" "^0.7.5" - debug "^4.3.3" - headers-polyfill "^3.0.4" - outvariant "^1.2.1" - strict-event-emitter "^0.2.4" - "@mswjs/interceptors@^0.17.2": version "0.17.2" resolved "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.17.2.tgz#a1d1cd8ef98b944c91d9fe202f27a68ec3673b88" @@ -5533,11 +5667,6 @@ resolved "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== -"@octokit/openapi-types@^12.4.0": - version "12.4.0" - resolved "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.4.0.tgz#fd8bf5db72bd566c5ba2cb76754512a9ebe66e71" - integrity sha512-Npcb7Pv30b33U04jvcD7l75yLU0mxhuX2Xqrn51YyZ5WTkF04bpbxLaZ6GcaTqu03WZQHoO/Gbfp95NGRueDUA== - "@octokit/openapi-types@^13.0.0": version "13.0.1" resolved "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-13.0.1.tgz#f655810f0dc0547b771526fea171acffbc7bd4a8" @@ -5706,13 +5835,6 @@ dependencies: "@octokit/openapi-types" "^11.2.0" -"@octokit/types@^6.35.0": - version "6.37.0" - resolved "https://registry.npmjs.org/@octokit/types/-/types-6.37.0.tgz#32eb78edb34cf5cea4ba5753ab8db75b776d617a" - integrity sha512-BXWQhFKRkjX4dVW5L2oYa0hzWOAqsEsujXsQLSdepPoDZfYdubrD1KDGpyNldGXtR8QM/WezDcxcIN1UKJMGPA== - dependencies: - "@octokit/openapi-types" "^12.4.0" - "@octokit/types@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/@octokit/types/-/types-7.0.0.tgz#3ecee92edff53a93ecd75d6b9d6620574d2048ca" @@ -5725,19 +5847,19 @@ resolved "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-3.0.0.tgz#4f4443605233f46abc5f85a857ba105095aa1181" integrity sha512-FAIyAchH9JUKXugKMC17ERAXM/56vVJekwXOON46pmUDYfU7uXB4cFY8yc8nYr5ABqVI7KjRKfFt3mZF7OcyUA== -"@octokit/webhooks-types@6.3.4": - version "6.3.4" - resolved "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-6.3.4.tgz#b553da7479edfb04218160c85f16dbbc68251533" - integrity sha512-9E0HNgHqc5v22+9IzCSEZ9iXnBJ/n+GM9gZye0kp7XmzcOfrnAKZzd4km269n6/vVOkmXwT11DbbQFukWOvbdw== +"@octokit/webhooks-types@6.3.6": + version "6.3.6" + resolved "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-6.3.6.tgz#b211e42386463175ebc652c86d5c7433675986fc" + integrity sha512-x6yBtWobk20OhOiJ4VWsH3iJ/30IG+VoDWSgS4Tiyidi2KOiBS3bL+AJrNuq4OyNuWOM/FbHQTp6KEZs1oPD/g== "@octokit/webhooks@^10.0.0": - version "10.1.3" - resolved "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-10.1.3.tgz#415bb4f826167b15da4dede81c14cb7a8978ac9a" - integrity sha512-c5uQW0HJbI5mcQpUFcM7LVs1gbdEiHD6OLXZcwxLJeNUmI8Cy9uzfCib6HguARKgnz3tSavYX/teHq7brm05iQ== + version "10.1.5" + resolved "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-10.1.5.tgz#ba79b49ef0047a3cae7885387c5f20d4b341cd41" + integrity sha512-sQkxM6l9HdG1vsHFj2T/o8SnCPDDxovcs0rsSd4UR5jJFNPCPIBRmFNVHfM37nncLKuTwIpmMeePphNf1k6Waw== dependencies: "@octokit/request-error" "^3.0.0" "@octokit/webhooks-methods" "^3.0.0" - "@octokit/webhooks-types" "6.3.4" + "@octokit/webhooks-types" "6.3.6" aggregate-error "^3.1.0" "@open-draft/until@^1.0.3": @@ -5816,6 +5938,21 @@ tslib "^2.4.0" webcrypto-core "^1.7.4" +"@pmmmwh/react-refresh-webpack-plugin@^0.5.7": + version "0.5.7" + resolved "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.7.tgz#58f8217ba70069cc6a73f5d7e05e85b458c150e2" + integrity sha512-bcKCAzF0DV2IIROp9ZHkRJa6O4jy7NlnHdWL3GmcUxYWNjLXkK5kfELELwEfSP5hXPfVL/qOGMAROuMQb9GG8Q== + dependencies: + ansi-html-community "^0.0.8" + common-path-prefix "^3.0.0" + core-js-pure "^3.8.1" + error-stack-parser "^2.0.6" + find-up "^5.0.0" + html-entities "^2.1.0" + loader-utils "^2.0.0" + schema-utils "^3.0.0" + source-map "^0.7.3" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -5902,12 +6039,12 @@ integrity sha512-8UiDeDbjCImFSfOegGu13otQ7OdP9FOYpcLjeouppnhs+MPeIEAtYS+jCcBKmi3reyTagC15/KVSRhde1wS1vg== "@roadiehq/backstage-plugin-buildkite@^2.0.0": - version "2.0.6" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-buildkite/-/backstage-plugin-buildkite-2.0.6.tgz#2ef3c7095953d969adc78e1dc84633d822a69bc1" - integrity sha512-rb/oeh2fvM0WUKcJ55N+PN/Gy4Tm6HwQiozboXr8Ap7uwzyBq0j7REICsVpBUJZbMg7MlRaMjBWDKeogG4Rtpg== + version "2.0.7" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-buildkite/-/backstage-plugin-buildkite-2.0.7.tgz#fdd6b3d3c0eb2be09b35b38b207d6a0873147764" + integrity sha512-TTv6S2+ByNG2BFtonwDQ/RiMpbTyQxkSFNdw1ZWQZyiaeMYRdIxlTKsZ8BzvmcGW+Ez6z7zEFT6x2T22GdXvqA== dependencies: "@backstage/catalog-model" "^1.0.0" - "@backstage/core-components" "^0.10.0" + "@backstage/core-components" "^0.11.0" "@backstage/core-plugin-api" "^1.0.0" "@backstage/plugin-catalog-react" "^1.0.0" "@backstage/theme" "^0.2.6" @@ -5921,12 +6058,12 @@ react-use "^17.2.4" "@roadiehq/backstage-plugin-github-insights@^2.0.0": - version "2.0.3" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-2.0.3.tgz#736a55a91df963ecbaa259728b1418d362261479" - integrity sha512-s81O1VKtsJ0Znhjn7Uw17o1aHc8VxSL3kvet7cttcPSjLPlbFGqlF4CuFOEGHw7lsrKMrhWfcFaIWhCitc8wrg== + version "2.0.4" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-2.0.4.tgz#4b90f6081795340922d47d3a6abfe6fa877c0746" + integrity sha512-e+WCgWycfvqwn3cNJ37qD0YOtrinUWhFoQGh7spEsNYba9RUN/dSkUcMP1sSWcnHgWOJKtx1s//YbxeeUc4uXw== dependencies: "@backstage/catalog-model" "^1.0.0" - "@backstage/core-components" "^0.10.0" + "@backstage/core-components" "^0.11.0" "@backstage/core-plugin-api" "^1.0.0" "@backstage/integration-react" "^1.0.0" "@backstage/plugin-catalog-react" "^1.0.0" @@ -5944,12 +6081,12 @@ zustand "3.6.9" "@roadiehq/backstage-plugin-github-pull-requests@^2.0.0": - version "2.2.4" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-2.2.4.tgz#7df512d6f55cfccf448cf3abc58364e2544e7fab" - integrity sha512-oEJLxZ3L+GnWuVLFmxXNjeRthuJEV7u1EFbLthoW3XfR5vQ5oc81Su/3WF2rO2Atng1QkPpSPa7oXWff2NsJJw== + version "2.2.6" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-2.2.6.tgz#844f18fb4e4ca569389aaa57bc5212c0137524d1" + integrity sha512-dddbdXWqknk/FLgkxHRf021zK85XWp3OgN+ZgUUvRSrN6zespiZWWpo05utSK1x2QntuhdcBL8WiUYzpiZ4pEg== dependencies: "@backstage/catalog-model" "^1.0.0" - "@backstage/core-components" "^0.10.0" + "@backstage/core-components" "^0.11.0" "@backstage/core-plugin-api" "^1.0.0" "@backstage/plugin-catalog-react" "^1.0.0" "@backstage/plugin-home" "^0.4.19" @@ -5968,12 +6105,12 @@ react-use "^17.2.4" "@roadiehq/backstage-plugin-travis-ci@^2.0.0": - version "2.0.3" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-2.0.3.tgz#1b49ad4bf1521fdcfcc984236aaf7b2195c0e50a" - integrity sha512-a+dwmVyt4jUcUzYR5vVEAm68t5TPdfitrDH9RLI5vhn0hR/nZbf6LBGjGbbqglj3ettFzb1UFubs6BbMsrFEpA== + version "2.0.4" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-2.0.4.tgz#be6504edfe58e4ae7156397589db7e7c644927bc" + integrity sha512-SpoQf2fSvN3OQKSeZaLBLZSk8+R9kyXONNZMyhLJj2cq/kQwvYeBn/PuURCV4bMxBg/zt21CUnfmAMXDeG1guw== dependencies: "@backstage/catalog-model" "^1.0.0" - "@backstage/core-components" "^0.10.0" + "@backstage/core-components" "^0.11.0" "@backstage/core-plugin-api" "^1.0.0" "@backstage/plugin-catalog-react" "^1.0.0" "@backstage/theme" "^0.2.9" @@ -6306,6 +6443,126 @@ "@svgr/plugin-jsx" "^6.3.1" "@svgr/plugin-svgo" "^6.3.1" +"@swc/core-android-arm-eabi@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.2.242.tgz#3ae5d8b178a0835ae0878094175d943f2d894bec" + integrity sha512-Ukx1LQAUbPRJdREF9FMgeUwIuRtWJNpPyPF7BWl4hIkw024q75mohMbp3S2wgrF1TsSsEGW37q0DkFxPJ2uJbQ== + dependencies: + "@swc/wasm" "1.2.122" + +"@swc/core-android-arm64@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.2.242.tgz#2c1885c08dd5720991a6fa7585d39a93df98e773" + integrity sha512-4E/y+reQWHVCV/0Sn174gsLQyqIKlBWKnwUfPa7MA53VBacp8HTYoPY+iwKPrngsH16gEOC7iByiTJHR/4kirg== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-darwin-arm64@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.2.242.tgz#1b8b16a132cc354ea3b31d26c46908dae2fe41ed" + integrity sha512-nIqtjxdbz0Fe0gFZwCygBwUrGEXj3c4mjHjNeveidVX/6U0HE/EAj+0iXuw8zjJLof8HCMnxq8CzzvhA6gd3ZA== + +"@swc/core-darwin-x64@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.2.242.tgz#cde041d520fcfb0865f49b395bb2c76af8ec3f3a" + integrity sha512-iZKzI76vYYHD/t8wkQ/uIVuIyxN1eift2nLvUU7/jtmoa6b8DH/45ykB/C3vkuvYVNMiGA8HIjJIzw7RJz5XIQ== + +"@swc/core-freebsd-x64@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.2.242.tgz#a95827311424dd86190fdb73bec996d24188c6d3" + integrity sha512-6JNi5/6JDvcTQzBkndELiIlJufWowoI2ZEmXlGIJpiGoj28PEDPwy5LO7KkXa4DnY5L4CSh15idFO/DxV0rGAQ== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-linux-arm-gnueabihf@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.2.242.tgz#1b0bd0ba96c59a9c4b87668521ce8ba55c8c7f55" + integrity sha512-NGL9A3cv8PCbeQ1SvPfApNlHvFbf7Jn305sCAy3iZYsmwm+EU4JNlOWXGgRioP7ABhz2kwLhfYs8UMYCDIVq8Q== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-linux-arm64-gnu@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.2.242.tgz#f97c1b655779788fff9a035f6a80180b1545423b" + integrity sha512-OJ0kAjgeoRDJlo6Rvd2GnJ92tiIndmC/8krD9gfnQEyAgpR+jajOxbKhyBN/QZPyD2q/TG2LPqxhGYZ79q5mWQ== + +"@swc/core-linux-arm64-musl@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.2.242.tgz#ad77a5c7fc79d42d64970ca1886eb9d626388ca2" + integrity sha512-VqnHSYb1a6xW5ARUx9kq88s1S3XvCw9TvQXsPcN4e5qsugrLzxWLnqIM6VnWW06prxN7pYlWo9QtrtdPfbppmA== + +"@swc/core-linux-x64-gnu@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.2.242.tgz#4c7f2c483876a4b0755a263133c25413fa69df88" + integrity sha512-DDqVJh0KpgHb+E0563+6PqAYDzYTSwgZXF/fOULwlHC7Yt50a9+ecisTFSHkWc74zPMtq27kMTuZyyLeD3gu7A== + +"@swc/core-linux-x64-musl@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.2.242.tgz#48f8769094cfde9d78dc32936666575470583b2a" + integrity sha512-P+9sWgd5eZ6kS1WxOJbCeSgWY7mLP742PhwAzpFrJqCq5nx8Q4FYo4L5mOVNAheYDWldsxR1nKXR1RIMK3S2Lw== + +"@swc/core-win32-arm64-msvc@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.2.242.tgz#e421a5a7a49d1effa71a22fea22a65256b447108" + integrity sha512-W5cevrf5aDJzdE++XeQi1BJKuigC3dlG2NaBUyt3inmep7nli6eoBJdj9Vyg5EPfFOdeI6wQiwOpFvQRoAle8Q== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-win32-ia32-msvc@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.2.242.tgz#1b836f5872195fef506a094eae7734b5fd28a1b5" + integrity sha512-XRQcgChvY9333hBre9F53EbiVfVu5MkSH4+XIiNMK14Jg8EqQ1nOcd+jvv2sEdEVbufCmBbWNjofUrCoQey60w== + dependencies: + "@swc/wasm" "1.2.130" + +"@swc/core-win32-x64-msvc@1.2.242": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.2.242.tgz#61a6c7d4da1dec1188b912785bd8e0bb16ff8440" + integrity sha512-Cz1hZOxcfEVgzEr2sYIW9MxT+wEEbYz7aB87ZDmTUpr7vuvBiLMwsYItm8qG847wZeJfa+J7CC+tty5GJOBOOQ== + +"@swc/core@^1.2.239": + version "1.2.242" + resolved "https://registry.npmjs.org/@swc/core/-/core-1.2.242.tgz#4392ef0012fe9667440c6eb5a419b6cc86a0a786" + integrity sha512-JQqSYVoLtHtztCNBgeCKyxmqw6AksHsC4WvVSSErLXJx6JXKaog1HFVuzd6rwx2lLCV+zBnbqJFug5OX0g2knw== + optionalDependencies: + "@swc/core-android-arm-eabi" "1.2.242" + "@swc/core-android-arm64" "1.2.242" + "@swc/core-darwin-arm64" "1.2.242" + "@swc/core-darwin-x64" "1.2.242" + "@swc/core-freebsd-x64" "1.2.242" + "@swc/core-linux-arm-gnueabihf" "1.2.242" + "@swc/core-linux-arm64-gnu" "1.2.242" + "@swc/core-linux-arm64-musl" "1.2.242" + "@swc/core-linux-x64-gnu" "1.2.242" + "@swc/core-linux-x64-musl" "1.2.242" + "@swc/core-win32-arm64-msvc" "1.2.242" + "@swc/core-win32-ia32-msvc" "1.2.242" + "@swc/core-win32-x64-msvc" "1.2.242" + +"@swc/helpers@^0.4.7": + version "0.4.9" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.9.tgz#09ab44feae456adaa1acb00f59254b9d0f89ba72" + integrity sha512-VQBBIInp9++WQaRsXbi05XwnH0qhNCJ99iMzdh5WmA9eXhXKNc4NnMB8GEOL1aaRju+E+vQA4rGYFM1jmb3BXA== + dependencies: + tslib "^2.4.0" + +"@swc/jest@^0.2.22": + version "0.2.22" + resolved "https://registry.npmjs.org/@swc/jest/-/jest-0.2.22.tgz#70d02ac648c21a442016d7a0aa485577335a4c9a" + integrity sha512-PIUIk9IdB1oAVfF9zNIfYoMBoEhahrrSvyryFANas7swC1cF0L5HR0f9X4qfet46oyCHCBtNcSpN0XJEOFIKlw== + dependencies: + "@jest/create-cache-key-function" "^27.4.2" + +"@swc/wasm@1.2.122": + version "1.2.122" + resolved "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.122.tgz#87a5e654b26a71b2e84b801f41e45f823b856639" + integrity sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ== + +"@swc/wasm@1.2.130": + version "1.2.130" + resolved "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz#88ac26433335d1f957162a9a92f1450b73c176a0" + integrity sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q== + "@szmarczak/http-timer@^4.0.5": version "4.0.5" resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz#bfbd50211e9dfa51ba07da58a14cdfd333205152" @@ -7131,14 +7388,14 @@ "@types/node" "*" "@types/lodash@^4.14.151", "@types/lodash@^4.14.173", "@types/lodash@^4.14.175": - version "4.14.182" - resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" - integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== + version "4.14.184" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.184.tgz#23f96cd2a21a28e106dc24d825d4aa966de7a9fe" + integrity sha512-RoZphVtHbxPZizt4IcILciSWiC6dcn+eZ8oX9IWEYfDMcocdd42f7NPI6fQj+6zI8y4E0L7gu2pcZKLGTRaV9Q== "@types/long@^4.0.0", "@types/long@^4.0.1": - version "4.0.1" - resolved "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" - integrity sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w== + version "4.0.2" + resolved "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" + integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== "@types/lru-cache@^5.1.0": version "5.1.1" @@ -7150,20 +7407,15 @@ resolved "https://registry.npmjs.org/@types/lunr/-/lunr-2.3.4.tgz#728f445855818fb17776d10ef4678f278072eb03" integrity sha512-j4x4XJwZvorEUbA519VdQ5b9AOU9TSvfi8tvxMAfP8XzNLtFex7A8vFQwqOx3WACbV0KMXbACV3cZl4/gynQ7g== -"@types/luxon@*": - version "2.4.0" - resolved "https://registry.npmjs.org/@types/luxon/-/luxon-2.4.0.tgz#897d3abc23b68d78b69d76a12c21e01eb5adab95" - integrity sha512-oCavjEjRXuR6URJEtQm0eBdfsBiEcGBZbq21of8iGkeKxU1+1xgKuFPClaBZl2KB8ZZBSWlgk61tH6Mf+nvZVw== - -"@types/luxon@^3.0.0": +"@types/luxon@*", "@types/luxon@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@types/luxon/-/luxon-3.0.0.tgz#47fb7891e41875fce7018a8bd3d09b204c5621f5" integrity sha512-Lx+EZoJxUKw4dp8uei9XiUVNlgkYmax5+ovqt6Xf3LzJOnWhlfJw/jLBmqfGVwOP/pDr4HT8bI1WtxK0IChMLw== "@types/marked@^4.0.0": - version "4.0.3" - resolved "https://registry.npmjs.org/@types/marked/-/marked-4.0.3.tgz#2098f4a77adaba9ce881c9e0b6baf29116e5acc4" - integrity sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg== + version "4.0.6" + resolved "https://registry.npmjs.org/@types/marked/-/marked-4.0.6.tgz#9ca544c1057f3c8b3f649b5e8e56d9241e3ca22d" + integrity sha512-ITAVUzsnVbhy5afxhs4PPPbrv2hKVEDH5BhhaQNQlVG0UNu+9A18XSdYr53nBdHZ0ADEQLl+ciOjXbs7eHdiQQ== "@types/mdast@^3.0.0", "@types/mdast@^3.0.3": version "3.0.10" @@ -7275,9 +7527,9 @@ integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A== "@types/node@^16.0.0", "@types/node@^16.11.26", "@types/node@^16.9.2": - version "16.11.49" - resolved "https://registry.npmjs.org/@types/node/-/node-16.11.49.tgz#560b1ea774b61e19a89c3fc72d2dcaa3863f38b2" - integrity sha512-Abq9fBviLV93OiXMu+f6r0elxCzRwc0RC5f99cU892uBITL44pTvgvEqlRlPRi8EGcO1z7Cp8A4d0s/p3J/+Nw== + version "16.11.52" + resolved "https://registry.npmjs.org/@types/node/-/node-16.11.52.tgz#d797437435455f237800c171d05639f0335c37b9" + integrity sha512-GnstYouCa9kbYokBCWEVrszJ1P2rGAQpKrqACHKuixkaT8XGu8nsqHvEUIGqDs5vwtsJ7LrYqnPDKRD1V+M39A== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -7686,9 +7938,9 @@ "@types/superagent" "*" "@types/svgo@^2.6.2": - version "2.6.3" - resolved "https://registry.npmjs.org/@types/svgo/-/svgo-2.6.3.tgz#0786d8329b67cd48d84e57cb92b79832b85e6c8e" - integrity sha512-5sP0Xgo0dXppY0tbYF6TevB/1+tzFLuu71XXxC/zGvQAn9PW7y+DwtDO81g0ZUPye00K6tPwtsLDOpARa0mFcA== + version "2.6.4" + resolved "https://registry.npmjs.org/@types/svgo/-/svgo-2.6.4.tgz#b7298fc1dd687539fd63fc818b00146d96e68836" + integrity sha512-l4cmyPEckf8moNYHdJ+4wkHvFxjyW6ulm9l4YGaOxeyBWPhBOT0gvni1InpFPdzx1dKf/2s62qGITwxNWnPQng== dependencies: "@types/node" "*" @@ -7867,13 +8119,13 @@ integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== "@typescript-eslint/eslint-plugin@^5.9.0": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz#c0a480d05211660221eda963cc844732fe9b1714" - integrity sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ== + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.34.0.tgz#d690f60e335596f38b01792e8f4b361d9bd0cb35" + integrity sha512-eRfPPcasO39iwjlUAMtjeueRGuIrW3TQ9WseIDl7i5UWuFbf83yYaU7YPs4j8+4CxUMIsj1k+4kV+E+G+6ypDQ== dependencies: - "@typescript-eslint/scope-manager" "5.33.1" - "@typescript-eslint/type-utils" "5.33.1" - "@typescript-eslint/utils" "5.33.1" + "@typescript-eslint/scope-manager" "5.34.0" + "@typescript-eslint/type-utils" "5.34.0" + "@typescript-eslint/utils" "5.34.0" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -7894,13 +8146,13 @@ eslint-utils "^3.0.0" "@typescript-eslint/parser@^5.9.0": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz#e4b253105b4d2a4362cfaa4e184e2d226c440ff3" - integrity sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA== + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.34.0.tgz#ca710858ea85dbfd30c9b416a335dc49e82dbc07" + integrity sha512-SZ3NEnK4usd2CXkoV3jPa/vo1mWX1fqRyIVUQZR4As1vyp4fneknBNJj+OFtV8WAVgGf+rOHMSqQbs2Qn3nFZQ== dependencies: - "@typescript-eslint/scope-manager" "5.33.1" - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/typescript-estree" "5.33.1" + "@typescript-eslint/scope-manager" "5.34.0" + "@typescript-eslint/types" "5.34.0" + "@typescript-eslint/typescript-estree" "5.34.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.20.0": @@ -7911,13 +8163,13 @@ "@typescript-eslint/types" "5.20.0" "@typescript-eslint/visitor-keys" "5.20.0" -"@typescript-eslint/scope-manager@5.33.1": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz#8d31553e1b874210018ca069b3d192c6d23bc493" - integrity sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA== +"@typescript-eslint/scope-manager@5.34.0": + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.34.0.tgz#14efd13dc57602937e25f188fd911f118781e527" + integrity sha512-HNvASMQlah5RsBW6L6c7IJ0vsm+8Sope/wu5sEAf7joJYWNb1LDbJipzmdhdUOnfrDFE6LR1j57x1EYVxrY4ow== dependencies: - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/visitor-keys" "5.33.1" + "@typescript-eslint/types" "5.34.0" + "@typescript-eslint/visitor-keys" "5.34.0" "@typescript-eslint/scope-manager@5.9.0": version "5.9.0" @@ -7927,12 +8179,12 @@ "@typescript-eslint/types" "5.9.0" "@typescript-eslint/visitor-keys" "5.9.0" -"@typescript-eslint/type-utils@5.33.1": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz#1a14e94650a0ae39f6e3b77478baff002cec4367" - integrity sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g== +"@typescript-eslint/type-utils@5.34.0": + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.34.0.tgz#7a324ab9ddd102cd5e1beefc94eea6f3eb32d32d" + integrity sha512-Pxlno9bjsQ7hs1pdWRUv9aJijGYPYsHpwMeCQ/Inavhym3/XaKt1ZKAA8FIw4odTBfowBdZJDMxf2aavyMDkLg== dependencies: - "@typescript-eslint/utils" "5.33.1" + "@typescript-eslint/utils" "5.34.0" debug "^4.3.4" tsutils "^3.21.0" @@ -7941,10 +8193,10 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.20.0.tgz#fa39c3c2aa786568302318f1cb51fcf64258c20c" integrity sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg== -"@typescript-eslint/types@5.33.1": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz#3faef41793d527a519e19ab2747c12d6f3741ff7" - integrity sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ== +"@typescript-eslint/types@5.34.0": + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.34.0.tgz#217bf08049e9e7b86694d982e88a2c1566330c78" + integrity sha512-49fm3xbbUPuzBIOcy2CDpYWqy/X7VBkxVN+DC21e0zIm3+61Z0NZi6J9mqPmSW1BDVk9FIOvuCFyUPjXz93sjA== "@typescript-eslint/types@5.9.0": version "5.9.0" @@ -7964,13 +8216,13 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.33.1": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz#a573bd360790afdcba80844e962d8b2031984f34" - integrity sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA== +"@typescript-eslint/typescript-estree@5.34.0": + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.34.0.tgz#ba7b83f4bf8ccbabf074bbf1baca7a58de3ccb9a" + integrity sha512-mXHAqapJJDVzxauEkfJI96j3D10sd567LlqroyCeJaHnu42sDbjxotGb3XFtGPYKPD9IyLjhsoULML1oI3M86A== dependencies: - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/visitor-keys" "5.33.1" + "@typescript-eslint/types" "5.34.0" + "@typescript-eslint/visitor-keys" "5.34.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -7990,15 +8242,15 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.33.1": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz#171725f924fe1fe82bb776522bb85bc034e88575" - integrity sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ== +"@typescript-eslint/utils@5.34.0": + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.34.0.tgz#0cae98f48d8f9e292e5caa9343611b6faf49e743" + integrity sha512-kWRYybU4Rn++7lm9yu8pbuydRyQsHRoBDIo11k7eqBWTldN4xUdVUMCsHBiE7aoEkFzrUEaZy3iH477vr4xHAQ== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.33.1" - "@typescript-eslint/types" "5.33.1" - "@typescript-eslint/typescript-estree" "5.33.1" + "@typescript-eslint/scope-manager" "5.34.0" + "@typescript-eslint/types" "5.34.0" + "@typescript-eslint/typescript-estree" "5.34.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -8022,12 +8274,12 @@ "@typescript-eslint/types" "5.20.0" eslint-visitor-keys "^3.0.0" -"@typescript-eslint/visitor-keys@5.33.1": - version "5.33.1" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz#0155c7571c8cd08956580b880aea327d5c34a18b" - integrity sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg== +"@typescript-eslint/visitor-keys@5.34.0": + version "5.34.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.34.0.tgz#d0fb3e31033e82ddd5de048371ad39eb342b2d40" + integrity sha512-O1moYjOSrab0a2fUvFpsJe0QHtvTC+cR+ovYpgKrAVXzqQyc74mv76TgY6z+aEtjQE2vgZux3CQVtGryqdcOAw== dependencies: - "@typescript-eslint/types" "5.33.1" + "@typescript-eslint/types" "5.34.0" eslint-visitor-keys "^3.3.0" "@typescript-eslint/visitor-keys@5.9.0": @@ -8038,10 +8290,10 @@ "@typescript-eslint/types" "5.9.0" eslint-visitor-keys "^3.0.0" -"@uiw/codemirror-extensions-basic-setup@4.11.4": - version "4.11.4" - resolved "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.11.4.tgz#c749a66980e18ca6651488712ea3239c82a31cdd" - integrity sha512-pc9pQtCQFmAH5nV9UmX37VB0+yzSFQ2kbSvLHBFST9siYnacaR6HxmkBBBbYYXwVK/n9pGZ6A8ZefAUNTFfo/A== +"@uiw/codemirror-extensions-basic-setup@4.11.5": + version "4.11.5" + resolved "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.11.5.tgz#e66462bda16bb635948a6faa8ee354f5db22f0b5" + integrity sha512-aHtdF1JEzHmBVuWXemr8OH7SQP/LbXXZdiOo/4tcxjFpyTuVGzPteBdfQU0xPOk0m+5Oc1LPqM+HaNPXNzX6aA== dependencies: "@codemirror/autocomplete" "^6.0.0" "@codemirror/commands" "^6.0.0" @@ -8052,13 +8304,13 @@ "@codemirror/view" "^6.0.0" "@uiw/react-codemirror@^4.9.3": - version "4.11.4" - resolved "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.11.4.tgz#76adc757baa0b8b1a9bd30d7081f5622b896d607" - integrity sha512-p7DNBI6kj+DUzTe7MjBJwZ3qo0nSOav7T0MEGRpRNZA9ZO3RnzhPMie6swDA8e3dz1s59l9UdFB1fgyam1vFhQ== + version "4.11.5" + resolved "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.11.5.tgz#9efead5e0f9496bda6eeb1118b67687b3b82861a" + integrity sha512-Bf8l3nVV4ekHbv4U0VrzUibl8+ucAY3UV0gk0xckbFnV1AlUxHcrYFiXSgy/rkyWBD7enHQENtM888B/3qBiwg== dependencies: "@babel/runtime" "^7.18.6" "@codemirror/theme-one-dark" "^6.0.0" - "@uiw/codemirror-extensions-basic-setup" "4.11.4" + "@uiw/codemirror-extensions-basic-setup" "4.11.5" codemirror "^6.0.0" "@webassemblyjs/ast@1.11.1": @@ -8999,9 +9251,9 @@ aws-sdk-mock@^5.2.1: traverse "^0.6.6" aws-sdk@^2.1122.0, aws-sdk@^2.814.0, aws-sdk@^2.840.0, aws-sdk@^2.948.0: - version "2.1195.0" - resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1195.0.tgz#f6f091426934ba1a4f8d5138f568e840f7bdb51a" - integrity sha512-xU7177JhKM+4SsLnoA6/r3qGzSXmbLgw/YC1KRHvZyJCbuTY+vdAGLaldbtNXjjwmE3a6EeoCREANv8GY62VdQ== + version "2.1200.0" + resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1200.0.tgz#79d14b342bed68ea07629bbc06f05f5959e4d491" + integrity sha512-rS16H3j40ba2ZDFNxEdC5qzJ09gpQM0f71rYw47IAOlAycvOkCCAIL/6FqCPRWevmL5X/bkULvM+OG7s31oPrg== dependencies: buffer "4.9.2" events "1.1.1" @@ -10581,6 +10833,11 @@ common-ancestor-path@^1.0.1: resolved "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== + common-tags@1.8.2, common-tags@^1.8.0: version "1.8.2" resolved "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -10941,7 +11198,7 @@ core-js-compat@^3.21.0, core-js-compat@^3.22.1: browserslist "^4.21.2" semver "7.0.0" -core-js-pure@^3.20.2, core-js-pure@^3.6.5: +core-js-pure@^3.20.2, core-js-pure@^3.6.5, core-js-pure@^3.8.1: version "3.21.1" resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.21.1.tgz#8c4d1e78839f5f46208de7230cebfb72bc3bdb51" integrity sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ== @@ -10952,9 +11209,9 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.10: integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== core-js@^3.4.1, core-js@^3.6.5: - version "3.24.1" - resolved "https://registry.npmjs.org/core-js/-/core-js-3.24.1.tgz#cf7724d41724154010a6576b7b57d94c5d66e64f" - integrity sha512-0QTBSYSUZ6Gq21utGzkfITDylE8jWC9Ne1D2MrhvlsZBI1x39OdDIVbzSqtgMndIy6BlHxBXpMGqzZmnztg2rg== + version "3.22.8" + resolved "https://registry.npmjs.org/core-js/-/core-js-3.22.8.tgz#23f860b1fe60797cc4f704d76c93fea8a2f60631" + integrity sha512-UoGQ/cfzGYIuiq6Z7vWL1HfkE9U9IZ4Ub+0XSiJTCzvbZzgPA69oDF2f+lgJ6dFFLEdjW5O6svvoKzXX23xFkA== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -11378,9 +11635,9 @@ cypress-plugin-snapshots@^1.4.4: unidiff "1.0.2" cypress@^10.0.0: - version "10.4.0" - resolved "https://registry.npmjs.org/cypress/-/cypress-10.4.0.tgz#bb5b3b6588ad49eff172fecf5778cc0da2980e4e" - integrity sha512-OM7F8MRE01SHQRVVzunid1ZK1m90XTxYnl+7uZfIrB4CYqUDCrZEeSyCXzIbsS6qcaijVCAhqDL60SxG8N6hew== + version "10.6.0" + resolved "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz#13f46867febf2c3715874ed5dce9c2e946b175fe" + integrity sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -12102,10 +12359,11 @@ docker-modem@^3.0.0: ssh2 "^1.4.0" dockerode@^3.3.1: - version "3.3.3" - resolved "https://registry.npmjs.org/dockerode/-/dockerode-3.3.3.tgz#7504db10d23866c6f267e7b0b7b4a75fc2203e8d" - integrity sha512-lvKV6/NGf2/CYLt5V4c0fd6Fl9XZSCo1Z2HBT9ioKrKLMB2o+gA62Uza8RROpzGvYv57KJx2dKu+ZwSpB//OIA== + version "3.3.4" + resolved "https://registry.npmjs.org/dockerode/-/dockerode-3.3.4.tgz#875de614a1be797279caa9fe27e5637cf0e40548" + integrity sha512-3EUwuXnCU+RUlQEheDjmBE0B7q66PV9Rw5NiH1sXwINq0M9c5ERP9fxgkw36ZHOtzf4AGEEYySnkx/sACC9EgQ== dependencies: + "@balena/dockerignore" "^1.0.2" docker-modem "^3.0.0" tar-fs "~2.0.1" @@ -12271,6 +12529,11 @@ easy-table@1.1.0: optionalDependencies: wcwidth ">=1.0.1" +ebnf@^1.9.0: + version "1.9.0" + resolved "https://registry.npmjs.org/ebnf/-/ebnf-1.9.0.tgz#9c2dd6052f3ed43a69c1f0b07b15bd03cefda764" + integrity sha512-LKK899+j758AgPq00ms+y90mo+2P86fMKUWD28sH0zLKUj7aL6iIH2wy4jejAMM9I2BawJ+2kp6C3mMXj+Ii5g== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -12420,10 +12683,10 @@ engine.io@~3.5.0: engine.io-parser "~2.2.0" ws "~7.4.2" -enhanced-resolve@^5.10.0: - version "5.10.0" - resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" - integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== +enhanced-resolve@^5.9.2: + version "5.9.3" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" + integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -12819,9 +13082,9 @@ eslint-plugin-import@^2.25.4: tsconfig-paths "^3.14.1" eslint-plugin-jest@^26.1.2: - version "26.8.3" - resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.8.3.tgz#f5d9bb162636491c8f6f0cd2743fe67c86569338" - integrity sha512-2roWu1MkEiihQ/qEszPPoaoqVI1x2D8Jtadk5AmoXTdEeNVPMu01Dtz7jIuTOAmdW3L+tSkPZOtEtQroYJDt0A== + version "26.8.7" + resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-26.8.7.tgz#f38f067d0a69483d64578eb43508ca7b29c8a4b7" + integrity sha512-nJJVv3VY6ZZvJGDMC8h1jN/TIGT4We1JkNn1lvstPURicr/eZPVnlFULQ4W2qL9ByCuCr1hPmlBOc2aZ1ktw4Q== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -13119,63 +13382,63 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" "example-app@link:packages/app": - version "0.2.74" + version "0.2.75-next.0" dependencies: - "@backstage/app-defaults" "^1.0.5" + "@backstage/app-defaults" "^1.0.6-next.0" "@backstage/catalog-model" "^1.1.0" - "@backstage/cli" "^0.18.1" + "@backstage/cli" "^0.18.2-next.0" "@backstage/config" "^1.0.1" - "@backstage/core-app-api" "^1.0.5" - "@backstage/core-components" "^0.11.0" - "@backstage/core-plugin-api" "^1.0.5" - "@backstage/integration-react" "^1.1.3" - "@backstage/plugin-airbrake" "^0.3.8" - "@backstage/plugin-apache-airflow" "^0.2.1" - "@backstage/plugin-api-docs" "^0.8.8" - "@backstage/plugin-azure-devops" "^0.1.24" - "@backstage/plugin-badges" "^0.2.32" - "@backstage/plugin-catalog-common" "^1.0.5" - "@backstage/plugin-catalog-graph" "^0.2.20" - "@backstage/plugin-catalog-import" "^0.8.11" - "@backstage/plugin-catalog-react" "^1.1.3" - "@backstage/plugin-circleci" "^0.3.8" - "@backstage/plugin-cloudbuild" "^0.3.8" - "@backstage/plugin-code-coverage" "^0.2.1" - "@backstage/plugin-cost-insights" "^0.11.30" - "@backstage/plugin-dynatrace" "^0.1.2" - "@backstage/plugin-explore" "^0.3.39" - "@backstage/plugin-gcalendar" "^0.3.4" - "@backstage/plugin-gcp-projects" "^0.3.27" - "@backstage/plugin-github-actions" "^0.5.8" - "@backstage/plugin-gocd" "^0.1.14" - "@backstage/plugin-graphiql" "^0.2.40" - "@backstage/plugin-home" "^0.4.24" - "@backstage/plugin-jenkins" "^0.7.7" - "@backstage/plugin-kafka" "^0.3.8" - "@backstage/plugin-kubernetes" "^0.7.1" - "@backstage/plugin-lighthouse" "^0.3.8" - "@backstage/plugin-newrelic" "^0.3.26" - "@backstage/plugin-newrelic-dashboard" "^0.2.1" - "@backstage/plugin-org" "^0.5.8" - "@backstage/plugin-pagerduty" "0.5.1" - "@backstage/plugin-permission-react" "^0.4.4" - "@backstage/plugin-rollbar" "^0.4.8" - "@backstage/plugin-scaffolder" "^1.5.0" - "@backstage/plugin-search" "^1.0.1" - "@backstage/plugin-search-common" "^1.0.0" - "@backstage/plugin-search-react" "^1.0.1" - "@backstage/plugin-sentry" "^0.4.1" - "@backstage/plugin-shortcuts" "^0.3.0" - "@backstage/plugin-stack-overflow" "^0.1.4" - "@backstage/plugin-tech-insights" "^0.2.4" - "@backstage/plugin-tech-radar" "^0.5.15" - "@backstage/plugin-techdocs" "^1.3.1" - "@backstage/plugin-techdocs-module-addons-contrib" "^1.0.3" - "@backstage/plugin-techdocs-react" "^1.0.3" - "@backstage/plugin-todo" "^0.2.10" - "@backstage/plugin-user-settings" "^0.4.7" + "@backstage/core-app-api" "^1.0.6-next.0" + "@backstage/core-components" "^0.11.1-next.0" + "@backstage/core-plugin-api" "^1.0.6-next.0" + "@backstage/integration-react" "^1.1.4-next.0" + "@backstage/plugin-airbrake" "^0.3.9-next.0" + "@backstage/plugin-apache-airflow" "^0.2.2-next.0" + "@backstage/plugin-api-docs" "^0.8.9-next.0" + "@backstage/plugin-azure-devops" "^0.2.0-next.0" + "@backstage/plugin-badges" "^0.2.33-next.0" + "@backstage/plugin-catalog-common" "^1.0.6-next.0" + "@backstage/plugin-catalog-graph" "^0.2.21-next.0" + "@backstage/plugin-catalog-import" "^0.8.12-next.0" + "@backstage/plugin-catalog-react" "^1.1.4-next.0" + "@backstage/plugin-circleci" "^0.3.9-next.0" + "@backstage/plugin-cloudbuild" "^0.3.9-next.0" + "@backstage/plugin-code-coverage" "^0.2.2-next.0" + "@backstage/plugin-cost-insights" "^0.11.31-next.0" + "@backstage/plugin-dynatrace" "^0.2.0-next.0" + "@backstage/plugin-explore" "^0.3.40-next.0" + "@backstage/plugin-gcalendar" "^0.3.5-next.0" + "@backstage/plugin-gcp-projects" "^0.3.28-next.0" + "@backstage/plugin-github-actions" "^0.5.9-next.0" + "@backstage/plugin-gocd" "^0.1.15-next.0" + "@backstage/plugin-graphiql" "^0.2.41-next.0" + "@backstage/plugin-home" "^0.4.25-next.0" + "@backstage/plugin-jenkins" "^0.7.8-next.0" + "@backstage/plugin-kafka" "^0.3.9-next.0" + "@backstage/plugin-kubernetes" "^0.7.2-next.0" + "@backstage/plugin-lighthouse" "^0.3.9-next.0" + "@backstage/plugin-newrelic" "^0.3.27-next.0" + "@backstage/plugin-newrelic-dashboard" "^0.2.2-next.0" + "@backstage/plugin-org" "^0.5.9-next.0" + "@backstage/plugin-pagerduty" "0.5.2-next.0" + "@backstage/plugin-permission-react" "^0.4.5-next.0" + "@backstage/plugin-rollbar" "^0.4.9-next.0" + "@backstage/plugin-scaffolder" "^1.6.0-next.0" + "@backstage/plugin-search" "^1.0.2-next.0" + "@backstage/plugin-search-common" "^1.0.1-next.0" + "@backstage/plugin-search-react" "^1.0.2-next.0" + "@backstage/plugin-sentry" "^0.4.2-next.0" + "@backstage/plugin-shortcuts" "^0.3.1-next.0" + "@backstage/plugin-stack-overflow" "^0.1.5-next.0" + "@backstage/plugin-tech-insights" "^0.2.5-next.0" + "@backstage/plugin-tech-radar" "^0.5.16-next.0" + "@backstage/plugin-techdocs" "^1.3.2-next.0" + "@backstage/plugin-techdocs-module-addons-contrib" "^1.0.4-next.0" + "@backstage/plugin-techdocs-react" "^1.0.4-next.0" + "@backstage/plugin-todo" "^0.2.11-next.0" + "@backstage/plugin-user-settings" "^0.4.8-next.0" "@backstage/theme" "^0.2.16" - "@internal/plugin-catalog-customized" "0.0.1" + "@internal/plugin-catalog-customized" "0.0.2-next.0" "@material-ui/core" "^4.12.2" "@material-ui/icons" "^4.9.1" "@material-ui/lab" "4.0.0-alpha.57" @@ -13188,7 +13451,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: prop-types "^15.7.2" react "^17.0.2" react-dom "^17.0.2" - react-hot-loader "^4.13.0" react-router "6.0.0-beta.0" react-router-dom "6.0.0-beta.0" react-use "^17.2.4" @@ -14425,7 +14687,7 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -global@^4.3.0, global@~4.4.0: +global@~4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== @@ -14477,9 +14739,9 @@ globby@^7.1.1: slash "^1.0.0" google-auth-library@^8.0.0, google-auth-library@^8.0.1, google-auth-library@^8.0.2: - version "8.1.1" - resolved "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.1.1.tgz#4068d2b1512b812d3d3dfbdc848452a0d5a550de" - integrity sha512-eG3pCfrLgVJe19KhAeZwW0m1LplNEo0FX1GboWf3hu18zD2jq8TUH2K8900AB2YRAuJ7A+1aSXDp1BODjwwRzg== + version "8.3.0" + resolved "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.3.0.tgz#9286a613ee089f1d1728c07b9a302a22acf2dc2a" + integrity sha512-rXasaUScggvyD5ELpQC7SIOUOdqyOIifCK9TRDOLFEcuw1JxuyewKAwDs2QiKzMf8uLa0L360W0bVlV+sJDc8g== dependencies: arrify "^2.0.0" base64-js "^1.3.0" @@ -14555,11 +14817,11 @@ grapheme-splitter@^1.0.4: integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== graphiql@^1.5.12, graphiql@^1.8.8: - version "1.11.3" - resolved "https://registry.npmjs.org/graphiql/-/graphiql-1.11.3.tgz#ed14117c1a9b1d93e66a9e5c23b135ba2bd15a6f" - integrity sha512-cvXYU0adFsvCIxbHMTcpi69jR5LZOG6tP00jnoSbgrYvQvGvIDGgRB5Dam+NmubVTqbjiC/SqF8mzh8rZp7AhQ== + version "1.11.5" + resolved "https://registry.npmjs.org/graphiql/-/graphiql-1.11.5.tgz#daf0de27b704f17c9d87ce56eea0fdcd7a370269" + integrity sha512-NI92XdSVwXTsqzJc6ykaAkKVMeC8IRRp3XzkxVQwtqDsZlVKtR2ZnssXNYt05TMGbi1ehoipn9tFywVohOlHjg== dependencies: - "@graphiql/react" "^0.9.0" + "@graphiql/react" "^0.10.0" "@graphiql/toolkit" "^0.6.1" entities "^2.0.0" graphql-language-service "^5.0.6" @@ -14634,14 +14896,14 @@ graphql-type-json@^0.3.2: integrity sha512-J+vjof74oMlCWXSvt0DOf2APEdZOCdubEvGDUAlqH//VBYcOYsGgRW7Xzorr44LvkjiuvecWc8fChxuZZbChtg== graphql-ws@^5.4.1, graphql-ws@^5.9.0: - version "5.10.0" - resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.10.0.tgz#3fb47a4e809e0d2e7c197f1bca754fa9f31b940e" - integrity sha512-ewbPzHQdRZgNCPDH9Yr6xccSeZfk3fmpO/AGGGg4KkM5gc6oAOJQ10Oui1EqprhVOyRbOll9bw2qAkOiOwfTag== + version "5.10.1" + resolved "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.10.1.tgz#c5402a62f1be13e244ab90a6306b94f643577312" + integrity sha512-MKm/3SRd1vj5Km8NaujsgeGRTKZQjUN5HRnIMJ8dL2UznKoxvrtQyJqTmqJt0f6vQd9AooDg/+baXo3huiY4Ew== graphql@^16.0.0, graphql@^16.3.0: - version "16.5.0" - resolved "https://registry.npmjs.org/graphql/-/graphql-16.5.0.tgz#41b5c1182eaac7f3d47164fb247f61e4dfb69c85" - integrity sha512-qbHgh8Ix+j/qY+a/ZcJnFQ+j8ezakqPiHwPiZhV/3PgGlgf96QMBB5/f2rkiC9sgLoy/xvT6TSiaf2nTHJh5iA== + version "16.6.0" + resolved "https://registry.npmjs.org/graphql/-/graphql-16.6.0.tgz#c2dcffa4649db149f6282af726c8c83f1c7c5fdb" + integrity sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw== grouped-queue@^2.0.0: version "2.0.0" @@ -14668,6 +14930,25 @@ grpc-docs@^1.0.6, grpc-docs@^1.1.2: rollup-plugin-smart-asset "^2.1.2" styled-components "^5.3.3" +gson-conform@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/gson-conform/-/gson-conform-1.0.3.tgz#6f982f98ea84199280bd48b6bfbcd0ae7447f1e2" + integrity sha512-gaZQN/5ZbohkLBOs4JKHkg/IdOB9kuuEr5SVLAjHUs+Q+Nl746DRe18GgQy4oxxVXStO//Zga2wg4eWL9Mfshw== + +gson-pointer@4.1.1, gson-pointer@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/gson-pointer/-/gson-pointer-4.1.1.tgz#088d6aa38d52753530288d13b5a75b6a43170e9b" + integrity sha512-rOS/zCLUI8BT0+/U+p5nzI0RfhIyRmzkpwzyCj8gcLoRl3rHuysk6ci1IQ955AQQZDSNN3mVec26Sx9wRZ0EjA== + +gson-query@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/gson-query/-/gson-query-5.1.0.tgz#8f34a062849f8c08be0c35eddaa2ad18a4326a49" + integrity sha512-xKb/90XfmLLKGgX8Y7LRF4yKnMR/ckV5WOQ/Ip0pRXuDh7jUhdY1UYjPvQnF7/UMbNsAo0168j2j0yt9+4QdaA== + dependencies: + ebnf "^1.9.0" + gson-conform "^1.0.3" + gson-pointer "4.1.1" + gtoken@^6.0.0: version "6.0.1" resolved "https://registry.npmjs.org/gtoken/-/gtoken-6.0.1.tgz#1276371d51e93c4eface76e3f30f9e8f1cad3f1a" @@ -14972,7 +15253,7 @@ html-encoding-sniffer@^2.0.1: dependencies: whatwg-encoding "^1.0.5" -html-entities@^2.3.2: +html-entities@^2.1.0, html-entities@^2.3.2: version "2.3.2" resolved "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz#760b404685cb1d794e4f4b744332e3b00dcfe488" integrity sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ== @@ -16204,9 +16485,9 @@ isomorphic-form-data@^2.0.0: form-data "^2.3.2" isomorphic-git@^1.8.0: - version "1.19.1" - resolved "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.19.1.tgz#99e18db18826b07c40a4c4b32484e917a4c4fd31" - integrity sha512-enp69F9dIWtAAB+aEMV83AVDiOoi7zHTMr1kTP2Bzka/PlX0W6C74W2y9b9UToX65oXvipPzhY5An2+F5BXVQw== + version "1.19.2" + resolved "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.19.2.tgz#e8f57443c63a58054f65f42e5cb189a2df31bd0d" + integrity sha512-14Tbf3GRFNoXw+fy6ssK7gpDZQxF+NytHmg7p+5L38IAVUafHnfjzJ0ZnEmLz3SAG20wYYyB+HufkRAFRttYxQ== dependencies: async-lock "^1.1.0" clean-git-ref "^2.0.1" @@ -16801,9 +17082,9 @@ jose@^4.1.4: integrity sha512-GFcVFQwYQKbQTUOo2JlpFGXTkgBw26uzDsRMD2q1WgSKNSnpKS9Ug7bdQ8dS+p4sZHNH6iRPu6WK2jLIjspaMA== jose@^4.6.0: - version "4.8.3" - resolved "https://registry.npmjs.org/jose/-/jose-4.8.3.tgz#5a754fb4aa5f2806608d083f438e6916b11087da" - integrity sha512-7rySkpW78d8LBp4YU70Wb7+OTgE3OwAALNVZxhoIhp4Kscp+p/fBkdpxGAMKxvCAMV4QfXBU9m6l9nX/vGwd2g== + version "4.9.0" + resolved "https://registry.npmjs.org/jose/-/jose-4.9.0.tgz#98ecaf81b13361d1931c0126e3f765549c782f92" + integrity sha512-RgaqEOZLkVO+ViN3KkN44XJt9g7+wMveUv59sVLaTxONcUPc8ZpfqOCeLphVBZyih2dgkvZ0Ap1CNcokvY7Uyw== joycon@^3.0.1: version "3.1.0" @@ -16971,7 +17252,7 @@ json-buffer@3.0.1, json-buffer@^3.0.1, json-buffer@~3.0.1: resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-parse-better-errors@^1.0.1: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -17006,6 +17287,17 @@ json-schema-compare@^0.2.2: dependencies: lodash "^4.17.4" +json-schema-library@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/json-schema-library/-/json-schema-library-7.0.0.tgz#6230a4efba33fe32f9f202298be49c22f981f88f" + integrity sha512-MO3MwDOVhAZU+7k2EZc5Rw5XijdLFZi4T/l7Nhu7HIoopp44JCmCsXD/p73umZhgj3PWhdv3ZqZSukxcvcXhxQ== + dependencies: + deepmerge "^4.2.2" + fast-deep-equal "^3.1.3" + gson-pointer "^4.1.1" + gson-query "^5.1.0" + valid-url "^1.0.9" + json-schema-merge-allof@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.6.0.tgz#64d48820fec26b228db837475ce3338936bf59a5" @@ -18261,9 +18553,9 @@ markdown-table@^3.0.0: integrity sha512-CBbaYXKSGnE1uLRpKA1SWgIRb2PQrpkllNWpZtZe6VojOJ4ysqiq7/2glYcmKsOYN09QgH/HEBX5hIshAeiK6A== marked@^4.0.14: - version "4.0.18" - resolved "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz#cd0ac54b2e5610cfb90e8fd46ccaa8292c9ed569" - integrity sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw== + version "4.0.19" + resolved "https://registry.npmjs.org/marked/-/marked-4.0.19.tgz#d36198d1ac1255525153c351c68c75bc1d7aee46" + integrity sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ== match-sorter@^6.0.2: version "6.3.1" @@ -19220,36 +19512,10 @@ msw@^0.39.2: type-fest "^1.2.2" yargs "^17.3.1" -msw@^0.43.0: - version "0.43.1" - resolved "https://registry.npmjs.org/msw/-/msw-0.43.1.tgz#57cb4af56f07442e8a6d14d76032a0ab41434256" - integrity sha512-wzhPpL6RsiYkyIUlTCg0aZY0aRZa4Eiubd6MOA5oJVgfuapDmvZrI8OMi4h4e+fpHD+Qsy+4unAjv3wpWia5yw== - dependencies: - "@mswjs/cookies" "^0.2.0" - "@mswjs/interceptors" "^0.16.3" - "@open-draft/until" "^1.0.3" - "@types/cookie" "^0.4.1" - "@types/js-levenshtein" "^1.1.1" - chalk "4.1.1" - chokidar "^3.4.2" - cookie "^0.4.2" - graphql "^16.3.0" - headers-polyfill "^3.0.4" - inquirer "^8.2.0" - is-node-process "^1.0.1" - js-levenshtein "^1.1.6" - node-fetch "^2.6.7" - outvariant "^1.3.0" - path-to-regexp "^6.2.0" - statuses "^2.0.0" - strict-event-emitter "^0.2.0" - type-fest "^1.2.2" - yargs "^17.3.1" - -msw@^0.44.0, msw@^0.44.2: - version "0.44.2" - resolved "https://registry.npmjs.org/msw/-/msw-0.44.2.tgz#00a901b6cc9d119fb30f794330d96dca6944afc2" - integrity sha512-u8wjzzcMWouoZtuIShCwx4M3wFF5sBAV1f8K4a0WX8kiihFjzl89IKE1VYmTclLyMIwpOq8qQ1HTpuh2BFX/3A== +msw@^0.45.0: + version "0.45.0" + resolved "https://registry.npmjs.org/msw/-/msw-0.45.0.tgz#7bab4ff0a03875aa17b7fefd5fbeea0b71f95957" + integrity sha512-aZgYsSJWYLHj5wZs/g640GP5AK6gfHC6dKTED8bforKZx10IJ+b0z7Y+0infEKD4gNT3orj7tiUZe4pxgpY0SQ== dependencies: "@mswjs/cookies" "^0.2.2" "@mswjs/interceptors" "^0.17.2" @@ -19259,7 +19525,6 @@ msw@^0.44.0, msw@^0.44.2: chalk "4.1.1" chokidar "^3.4.2" cookie "^0.4.2" - graphql "^16.3.0" headers-polyfill "^3.0.4" inquirer "^8.2.0" is-node-process "^1.0.1" @@ -19973,18 +20238,18 @@ octokit-plugin-create-pull-request@^3.10.0: "@octokit/types" "^6.8.2" octokit@^2.0.0, octokit@^2.0.4: - version "2.0.5" - resolved "https://registry.npmjs.org/octokit/-/octokit-2.0.5.tgz#4091813187f363eff787b89b66aafc273ba3318d" - integrity sha512-Znv9zxhKxl9C11QsAK/RRoIutAsHawVrYplZNf7IqpB+mi3Zu0zBfZ5sFUqMRwemucff+MDHh1RtlpF5946UDA== + version "2.0.7" + resolved "https://registry.npmjs.org/octokit/-/octokit-2.0.7.tgz#7e6658ddcca234d8cc6ca9344403b516d3b2d136" + integrity sha512-Rf+pY3fCphmS4jjLqQ+D0xS1U+Ry/pAZHLJNvsQksuj4aopl7qFLlV4Id2KIlaUpKZrUCPzOkLiZOaoEb47RZQ== dependencies: "@octokit/app" "^13.0.5" "@octokit/core" "^4.0.4" "@octokit/oauth-app" "^4.0.6" - "@octokit/plugin-paginate-rest" "^3.0.0" + "@octokit/plugin-paginate-rest" "^4.0.0" "@octokit/plugin-rest-endpoint-methods" "^6.0.0" "@octokit/plugin-retry" "^3.0.9" "@octokit/plugin-throttling" "^4.0.1" - "@octokit/types" "^6.35.0" + "@octokit/types" "^7.0.0" oidc-token-hash@^5.0.1: version "5.0.1" @@ -20972,14 +21237,14 @@ pino@^5.12.2: quick-format-unescaped "^3.0.3" sonic-boom "^0.7.5" -pirates@^4.0.0, pirates@^4.0.1: +pirates@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== dependencies: node-modules-regexp "^1.0.0" -pirates@^4.0.4: +pirates@^4.0.1, pirates@^4.0.4: version "4.0.5" resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== @@ -20991,13 +21256,6 @@ pixelmatch@^4.0.2: dependencies: pngjs "^3.0.0" -pkg-dir@4.2.0, pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -21005,6 +21263,13 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -21548,7 +21813,7 @@ promzard@^0.3.0: dependencies: read "1" -prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -21717,16 +21982,15 @@ punycode@^2.1.0, punycode@^2.1.1: integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== puppeteer@^16.0.0: - version "16.1.0" - resolved "https://registry.npmjs.org/puppeteer/-/puppeteer-16.1.0.tgz#06a32dc347c94642601017fbf83e1d37379b9651" - integrity sha512-lhykJLbH2bbBaP3NfYI2Vj0T4ctrdfVdEVf8glZITPnLfqrJ0nfUzAYuIz5YcA79k5lmFKANIhEXex+jQChU3g== + version "16.2.0" + resolved "https://registry.npmjs.org/puppeteer/-/puppeteer-16.2.0.tgz#3fc9cc0c461d3166a98562a7dcd0bf3424a0523c" + integrity sha512-7Au6iC98rS6WEAD110V4Bxd0iIbqoFtzz9XzkG1BSofidS1VAJ881E1+GFR7Xn2Yea0hbj8n0ErzRyseMp1Ctg== dependencies: cross-fetch "3.1.5" debug "4.3.4" devtools-protocol "0.0.1019158" extract-zip "2.0.1" https-proxy-agent "5.0.1" - pkg-dir "4.2.0" progress "2.0.3" proxy-from-env "1.1.0" rimraf "3.0.2" @@ -22044,20 +22308,6 @@ react-hook-form@^7.12.2, react-hook-form@^7.13.0: resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.32.2.tgz#58ec2ab0239ce97969baa2faa03ced13fae913ac" integrity sha512-F1A6n762xaRhvtQH5SkQQhMr19cCkHZYesTcKJJeNmrphiZp/cYFTIzC05FnQry0SspM54oPJ9tXFXlzya8VNQ== -react-hot-loader@^4.13.0: - version "4.13.0" - resolved "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.13.0.tgz#c27e9408581c2a678f5316e69c061b226dc6a202" - integrity sha512-JrLlvUPqh6wIkrK2hZDfOyq/Uh/WeVEr8nc7hkn2/3Ul0sx1Kr5y4kOGNacNRoj7RhwLNcQ3Udf1KJXrqc0ZtA== - dependencies: - fast-levenshtein "^2.0.6" - global "^4.3.0" - hoist-non-react-statics "^3.3.0" - loader-utils "^1.1.0" - prop-types "^15.6.1" - react-lifecycles-compat "^3.0.4" - shallowequal "^1.1.0" - source-map "^0.7.3" - react-icons@^4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/react-icons/-/react-icons-4.4.0.tgz#a13a8a20c254854e1ec9aecef28a95cdf24ef703" @@ -22146,6 +22396,11 @@ react-redux@^7.1.1, react-redux@^7.2.4: prop-types "^15.7.2" react-is "^16.13.1" +react-refresh@^0.14.0: + version "0.14.0" + resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" + integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== + react-resize-detector@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/react-resize-detector/-/react-resize-detector-2.3.0.tgz#57bad1ae26a28a62a2ddb678ba6ffdf8fa2b599c" @@ -23316,7 +23571,7 @@ schema-utils@2.7.0: ajv "^6.12.2" ajv-keywords "^3.4.1" -schema-utils@^3.1.0, schema-utils@^3.1.1: +schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== @@ -24662,9 +24917,9 @@ swagger-client@^3.18.5: url "~0.11.0" swagger-ui-react@^4.11.1: - version "4.13.2" - resolved "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-4.13.2.tgz#dee4f42dae9ca8b9ac85e64a46fc12c694100a80" - integrity sha512-U3IarPb0Vyi5/bHb45Q8uWf/7fowPp3B+LeYF0VKB4xhgKNiaPypPHoSJW9oCse/lkFGd4ZKyqBOpYXCsWMcgA== + version "4.14.0" + resolved "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-4.14.0.tgz#c1a26955d8481ad024eada6e1d59c44d0b061ab1" + integrity sha512-Yz3E5a5ujj2jqI4V+OELUjgs04uGNkJxbFLTe9KyrSs37yeMsyoDwLRGWuAAP6BRLhonJzLeZRTbnD2cK+iVew== dependencies: "@babel/runtime-corejs3" "^7.18.9" "@braintree/sanitize-url" "=6.0.0" @@ -24707,6 +24962,11 @@ swap-case@^2.0.2: dependencies: tslib "^2.0.3" +swc-loader@^0.2.3: + version "0.2.3" + resolved "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.3.tgz#6792f1c2e4c9ae9bf9b933b3e010210e270c186d" + integrity sha512-D1p6XXURfSPleZZA/Lipb3A8pZ17fP4NObZvFCDjK/OKljroqDpPmsBdTraWhVBqUNpcWBQY1imWdoPScRlQ7A== + swr@^1.1.2: version "1.3.0" resolved "https://registry.npmjs.org/swr/-/swr-1.3.0.tgz#c6531866a35b4db37b38b72c45a63171faf9f4e8" @@ -24796,20 +25056,20 @@ tdigest@^0.1.1: bintrees "1.0.1" "techdocs-cli-embedded-app@link:packages/techdocs-cli-embedded-app": - version "0.2.73" + version "0.2.74-next.0" dependencies: - "@backstage/app-defaults" "^1.0.5" + "@backstage/app-defaults" "^1.0.6-next.0" "@backstage/catalog-model" "^1.1.0" - "@backstage/cli" "^0.18.1" + "@backstage/cli" "^0.18.2-next.0" "@backstage/config" "^1.0.1" - "@backstage/core-app-api" "^1.0.5" - "@backstage/core-components" "^0.11.0" - "@backstage/core-plugin-api" "^1.0.5" - "@backstage/integration-react" "^1.1.3" - "@backstage/plugin-catalog" "^1.5.0" - "@backstage/plugin-techdocs" "^1.3.1" - "@backstage/plugin-techdocs-react" "^1.0.3" - "@backstage/test-utils" "^1.1.3" + "@backstage/core-app-api" "^1.0.6-next.0" + "@backstage/core-components" "^0.11.1-next.0" + "@backstage/core-plugin-api" "^1.0.6-next.0" + "@backstage/integration-react" "^1.1.4-next.0" + "@backstage/plugin-catalog" "^1.5.1-next.0" + "@backstage/plugin-techdocs" "^1.3.2-next.0" + "@backstage/plugin-techdocs-react" "^1.0.4-next.0" + "@backstage/test-utils" "^1.1.4-next.0" "@backstage/theme" "^0.2.16" "@material-ui/core" "^4.11.0" "@material-ui/icons" "^4.9.1" @@ -24857,9 +25117,9 @@ terminal-link@^2.0.0: supports-hyperlinks "^2.0.0" terser-webpack-plugin@*, terser-webpack-plugin@^5.1.3: - version "5.3.4" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.4.tgz#f4d31e265883d20fda3ca9c0fc6a53f173ae62e3" - integrity sha512-SmnkUhBxLDcBfTIeaq+ZqJXLVEyXxSaNcCeSezECdKjfkMrTTnPvapBILylYwyEvHFZAn2cJ8dtiXel5XnfOfQ== + version "5.3.5" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.5.tgz#f7d82286031f915a4f8fb81af4bd35d2e3c011bc" + integrity sha512-AOEDLDxD2zylUGf/wxHxklEkOe2/r+seuyOWujejFrIxHf11brA1/dWQNIgXa1c6/Wkxgu7zvv0JhOWfc2ELEA== dependencies: "@jridgewell/trace-mapping" "^0.3.14" jest-worker "^27.4.5" @@ -24932,7 +25192,7 @@ textextensions@^5.12.0, textextensions@^5.13.0: thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" - integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== dependencies: thenify ">= 3.1.0 < 4" @@ -25227,9 +25487,9 @@ ts-easing@^0.2.0: integrity sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ== ts-interface-checker@^0.1.9: - version "0.1.10" - resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.10.tgz#b68a49e37e90a05797e590f08494dd528bf383cf" - integrity sha512-UJYuKET7ez7ry0CnvfY6fPIUIZDw+UI3qvTUQeS2MyI4TgEeWAUBqy185LeaHcdJ9zG2dgFpPJU/AecXU0Afug== + version "0.1.13" + resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" + integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== ts-log@^2.2.3: version "2.2.3" @@ -25943,6 +26203,11 @@ v8-to-istanbul@^8.1.0: convert-source-map "^1.6.0" source-map "^0.7.3" +valid-url@^1.0.9: + version "1.0.9" + resolved "https://registry.npmjs.org/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" + integrity sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA== + validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -26132,7 +26397,7 @@ walker@^1.0.7: dependencies: makeerror "1.0.x" -watchpack@^2.0.0-beta.10, watchpack@^2.4.0: +watchpack@^2.0.0-beta.10, watchpack@^2.3.1: version "2.4.0" resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== @@ -26263,34 +26528,34 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5, webpack@^5.66.0: - version "5.74.0" - resolved "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" - integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== +webpack@^5, webpack@^5.70.0: + version "5.70.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz#3461e6287a72b5e6e2f4872700bc8de0d7500e6d" + integrity sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/wasm-edit" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.7.1" + acorn "^8.4.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" + enhanced-resolve "^5.9.2" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" + json-parse-better-errors "^1.0.2" loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" - watchpack "^2.4.0" + watchpack "^2.3.1" webpack-sources "^3.2.3" websocket-driver@>=0.5.1, websocket-driver@^0.7.4: @@ -26540,7 +26805,7 @@ write-pkg@^4.0.0: type-fest "^0.4.1" write-json-file "^3.2.0" -ws@8.8.1, ws@^8.0.0, ws@^8.3.0: +ws@8.8.1, ws@^8.3.0: version "8.8.1" resolved "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== @@ -26551,9 +26816,9 @@ ws@8.8.1, ws@^8.0.0, ws@^8.3.0: integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== ws@^7.3.1, ws@^7.4.6: - version "7.5.7" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" - integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== + version "7.5.6" + resolved "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz#e59fc509fb15ddfb65487ee9765c5a51dec5fe7b" + integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== ws@^8.4.2: version "8.5.0"