diff --git a/.changeset/angry-ghosts-report.md b/.changeset/angry-ghosts-report.md deleted file mode 100644 index dfa83663a9..0000000000 --- a/.changeset/angry-ghosts-report.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Support a `ensureExists` config option to skip ensuring a configured database exists. This allows deployment scenarios where -limited permissions are given for provisioned databases without privileges to create new databases. If set to `false`, the -database connection will not be validated prior to use which means the backend will not attempt to create the database if it -doesn't exist. You can configure this in your app-config.yaml: - -```yaml -backend: - database: - ensureExists: false -``` - -This defaults to `true` if unspecified. You can also configure this per plugin connection and will override the base option. diff --git a/.changeset/angry-rules-fail.md b/.changeset/angry-rules-fail.md deleted file mode 100644 index cc52d4478e..0000000000 --- a/.changeset/angry-rules-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -Add unstable prop for disabling unregister entity menu diff --git a/.changeset/big-pens-train.md b/.changeset/big-pens-train.md deleted file mode 100644 index 5c4f8dc7b0..0000000000 --- a/.changeset/big-pens-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Unsubscribe from broker after response is flushed diff --git a/.changeset/curly-badgers-sit.md b/.changeset/curly-badgers-sit.md deleted file mode 100644 index ca740e907a..0000000000 --- a/.changeset/curly-badgers-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-react': patch ---- - -Store filter values set in `EntityListProvider` in query parameters. This allows selected filters to be restored when returning to pages that list catalog entities. diff --git a/.changeset/green-vans-peel.md b/.changeset/green-vans-peel.md deleted file mode 100644 index cd4d30139a..0000000000 --- a/.changeset/green-vans-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-react': patch ---- - -Fix `EntityTypeFilter` so it produces unique case-insensitive set of available types diff --git a/.changeset/grumpy-dolls-call.md b/.changeset/grumpy-dolls-call.md deleted file mode 100644 index 13d96ecb1f..0000000000 --- a/.changeset/grumpy-dolls-call.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-catalog-react': minor -'@backstage/plugin-scaffolder': patch ---- - -Updated the software templates list page (`ScaffolderPage`) to use the `useEntityListProvider` hook from #5643. This reduces the code footprint, making it easier to customize the display of this page, and consolidates duplicate approaches to querying the catalog with filters. - -- The `useEntityTypeFilter` hook has been updated along with the underlying `EntityTypeFilter` to work with multiple values, to allow more flexibility for different user interfaces. It's unlikely that this change affects you; however, if you're using either of these directly, you'll need to update your usage. -- `SearchToolbar` was renamed to `EntitySearchBar` and moved to `catalog-react` to be usable by other entity list pages -- `UserListPicker` now has an `availableTypes` prop to restrict which user-related options to present diff --git a/.changeset/lemon-crabs-confess.md b/.changeset/lemon-crabs-confess.md deleted file mode 100644 index 0d87843df5..0000000000 --- a/.changeset/lemon-crabs-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Updating fs-extra to 10.0.0 to handle broken symbolic links correctly diff --git a/.changeset/lemon-dancers-taste.md b/.changeset/lemon-dancers-taste.md deleted file mode 100644 index 0542fe4a54..0000000000 --- a/.changeset/lemon-dancers-taste.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -The codeowners processor extracts the username of the primary owner and uses this as the owner field. -Given the kind isn't specified this is assumed to be a group and so the link to the owner in the about card -doesn't work. This change specifies the kind where the entity is a user. e.g: - -`@iain-b` -> `user:iain-b` diff --git a/.changeset/nice-bugs-beg.md b/.changeset/nice-bugs-beg.md deleted file mode 100644 index c41b54b220..0000000000 --- a/.changeset/nice-bugs-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-user-settings': minor ---- - -Exported and renamed components from the `@backstage/plugin-user-settings` plugin , to be able to use it in the consumer side and customize the `SettingPage` diff --git a/.changeset/polite-spies-judge.md b/.changeset/polite-spies-judge.md deleted file mode 100644 index 075bcf1598..0000000000 --- a/.changeset/polite-spies-judge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend-module-rails': patch ---- - -updated paths to consider differences between platform (windows corrected) diff --git a/.changeset/poor-otters-buy.md b/.changeset/poor-otters-buy.md deleted file mode 100644 index b60cbddc1b..0000000000 --- a/.changeset/poor-otters-buy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Add new `fetch:template` action which handles the same responsibilities as `fetch:cookiecutter` without the external dependency on `cookiecutter`. For information on migrating from `fetch:cookiecutter` to `fetch:template`, see the [migration guide](https://backstage.io/docs/features/software-templates/builtin-actions#migrating-from-fetch-cookiecutter-to-fetch-template) in the docs. diff --git a/.changeset/pretty-drinks-serve.md b/.changeset/pretty-drinks-serve.md deleted file mode 100644 index a012aba11f..0000000000 --- a/.changeset/pretty-drinks-serve.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Scaffolder: Added an 'eq' handlebars helper for use in software template YAML files. This can be used to execute a step depending on the value of an input, e.g.: - -```yaml -steps: - id: 'conditional-step' - action: 'custom-action' - if: '{{ eq parameters.myvalue "custom" }}', -``` diff --git a/.changeset/real-plums-vanish.md b/.changeset/real-plums-vanish.md deleted file mode 100644 index a653a6bdf2..0000000000 --- a/.changeset/real-plums-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Add Sign In and Handler resolver for Microsoft provider diff --git a/.changeset/search-mighty-mice-collect.md b/.changeset/search-mighty-mice-collect.md deleted file mode 100644 index bad91ff853..0000000000 --- a/.changeset/search-mighty-mice-collect.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-search-backend-node': minor ---- - -Change return value of `SearchEngine.index` to `Promise` to support -implementation of external search engines. diff --git a/.changeset/short-eggs-confess.md b/.changeset/short-eggs-confess.md deleted file mode 100644 index 3fa240a347..0000000000 --- a/.changeset/short-eggs-confess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend-module-ldap': patch ---- - -Expose missing types used by the custom transformers diff --git a/.changeset/shy-rules-design.md b/.changeset/shy-rules-design.md deleted file mode 100644 index 4f009e5aa8..0000000000 --- a/.changeset/shy-rules-design.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': minor ---- - -Updated inputs for the `publish:github:pull-request` action. - -Now requires a `repoUrl` instead of separate `owner` and `repo` inputs. This aligns with the output of the `RepoUrlPicker` ui field used by the pull-request sample template. diff --git a/.changeset/techdocs-typescript-isnt-fun.md b/.changeset/techdocs-typescript-isnt-fun.md deleted file mode 100644 index 9341c1c14a..0000000000 --- a/.changeset/techdocs-typescript-isnt-fun.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-techdocs-backend': patch ---- - -It is no longer required to provide a generator and a preparer to the TechDocs -router factory when running TechDocs in the "recommended" (e.g. externally -prepared and generated docs) configuration. diff --git a/.changeset/wise-rockets-smoke.md b/.changeset/wise-rockets-smoke.md deleted file mode 100644 index c81d20519d..0000000000 --- a/.changeset/wise-rockets-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Document the default behavior of `statusCheck` option in `createStatusCheckRouter`. diff --git a/.changeset/young-tables-reply.md b/.changeset/young-tables-reply.md deleted file mode 100644 index e08a875c14..0000000000 --- a/.changeset/young-tables-reply.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@backstage/backend-common': patch -'@backstage/cli': patch -'@backstage/config-loader': patch -'@backstage/create-app': patch -'@backstage/techdocs-common': patch -'@backstage/plugin-app-backend': patch -'@backstage/plugin-auth-backend': patch -'@backstage/plugin-catalog-backend': patch -'@backstage/plugin-kubernetes-backend': patch -'@backstage/plugin-rollbar-backend': patch -'@backstage/plugin-scaffolder-backend': patch -'@backstage/plugin-techdocs-backend': patch ---- - -Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. diff --git a/ADOPTERS.md b/ADOPTERS.md index 1dcd4a774f..9845f1a929 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -37,3 +37,4 @@ | [FactSet](https://www.factset.com/) | [@kuangp](https://github.com/kuangp) | Developer portal to provide discoverability to all internal components, APIs, documentation, and scaffold templates with integrations to our internal infrastructure tools. | | [Workrise](https://www.workrise.com/) | [Michael Rode](https://github.com/michaelrode) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. | | [RedVentures](https://www.redventures.com/) | [Chris Diaz](https://github.com/codingdiaz) | Developer portal that brings everything an engineer needs to provide value into a single pane of glass. | +| [MavTek](https://www.mavtek.com/) | [@fgascon](https://github.com/fgascon) | Developer portal focused on standardizing practices, centralizing documentation and streamlining developer practices. | diff --git a/app-config.yaml b/app-config.yaml index b50de963ed..074e28c086 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -101,8 +101,10 @@ organization: # https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach techdocs: builder: 'local' # Alternatives - 'external' - generators: - techdocs: 'docker' # Alternatives - 'local' + generator: + runIn: 'docker' + # dockerImage: my-org/techdocs # use a custom docker image + # pullImage: true # or false to disable automatic pulling of image (e.g. if custom docker login is required) publisher: type: 'local' # Alternatives - 'googleGcs' or 'awsS3' or 'azureBlobStorage' or 'openStackSwift'. Read documentation for using alternatives. @@ -312,13 +314,20 @@ auth: # # scope: saml-login-selector openid profile email oidc: + # Note that you must define a session secret (see above) since the oidc provider requires session support. + # Note that by default, this provider will use the 'none' prompt which assumes that your are already logged on in the IDP. + # You should set prompt to: + # - auto: will let the IDP decide if you need to log on or if you can skip login when you have an active SSO session + # - login: will force the IDP to always present a login form to the user development: metadataUrl: ${AUTH_OIDC_METADATA_URL} clientId: ${AUTH_OIDC_CLIENT_ID} clientSecret: ${AUTH_OIDC_CLIENT_SECRET} authorizationUrl: ${AUTH_OIDC_AUTH_URL} tokenUrl: ${AUTH_OIDC_TOKEN_URL} - tokenSignedResponseAlg: ${AUTH_OIDC_TOKEN_SIGNED_RESPONSE_ALG} + tokenSignedResponseAlg: ${AUTH_OIDC_TOKEN_SIGNED_RESPONSE_ALG} # default='RS256' + scope: ${AUTH_OIDC_SCOPE} # default='openid profile email' + prompt: ${AUTH_OIDC_PROMPT} # default=none (allowed values: auto, none, consent, login) auth0: development: clientId: ${AUTH_AUTH0_CLIENT_ID} @@ -370,3 +379,9 @@ homepage: timezone: 'Asia/Tokyo' pagerduty: eventsBaseUrl: 'https://events.pagerduty.com/v2' +jenkins: + instances: + - name: default + baseUrl: https://jenkins.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md index 67b92bd941..5f474624f9 100644 --- a/docs/features/software-catalog/well-known-annotations.md +++ b/docs/features/software-catalog/well-known-annotations.md @@ -101,18 +101,22 @@ repository itself. If the URL points to a folder, it is important that it is suffixed with a `'/'` in order for relative path resolution to work consistently. -### jenkins.io/github-folder +### jenkins.io/job-full-name ```yaml # Example: metadata: annotations: - jenkins.io/github-folder: folder-name/job-name + jenkins.io/job-full-name: folder-name/job-name ``` The value of this annotation is the path to a job on Jenkins, that builds this entity. +The value can be the format of just `[folder-path]` or +`[instanceName]:[folder-path]`, if multiple instances are configured in +`app-config.yaml` + Specifying this annotation may enable Jenkins related features in Backstage for that entity. @@ -304,6 +308,10 @@ This annotation allowed to load the API definition from another location. Use [substitution](./descriptor-format.md#substitutions-in-the-descriptor-format) instead. +### jenkins.io/github-folder + +Use the `jenkins.io/job-full-name` instead. + ## Links - [Descriptor Format: annotations](descriptor-format.md#annotations-optional) diff --git a/docs/features/software-templates/writing-templates.md b/docs/features/software-templates/writing-templates.md index 7b475f2fa1..02bb698f64 100644 --- a/docs/features/software-templates/writing-templates.md +++ b/docs/features/software-templates/writing-templates.md @@ -227,6 +227,33 @@ spec: inputType: tel ``` +#### Hide or mask sensitive data on Review step + +Sometimes, specially in custom fields, you collect some data on Create form that +must not be shown to the user on Review step. To hide or mask this data, you can +use `ui:widget: password` or set some properties of `ui:backstage`: + +```yaml +- title: Hide or mask values + properties: + password: + title: Password + type: string + ui:widget: password # will print '******' as value for property 'password' on Review Step + masked: + title: Masked + type: string + ui:backstage: + review: + mask: '' # will print '' as value for property 'Masked' on Review Step + hidden: + title: Hidden + type: string + ui:backstage: + review: + show: false # wont print any info about 'hidden' property on Review Step +``` + #### The Repository Picker So in order to make working with repository providers easier, we've built a diff --git a/docs/features/techdocs/configuration.md b/docs/features/techdocs/configuration.md index aa38dd42b1..ef6a80d44c 100644 --- a/docs/features/techdocs/configuration.md +++ b/docs/features/techdocs/configuration.md @@ -13,14 +13,29 @@ configuration options for TechDocs. # File: app-config.yaml techdocs: - # generators.techdocs can have two values: 'docker' or 'local'. This is to determine how to run the generator - whether to - # spin up the techdocs-container docker image or to run mkdocs locally (assuming all the dependencies are taken care of). - # You want to change this to 'local' if you are running Backstage using your own custom Docker setup and want to avoid running - # into Docker in Docker situation. Read more here - # https://backstage.io/docs/features/techdocs/getting-started#disable-docker-in-docker-situation-optional + # techdocs.generator is used to configure how documentation sites are generated using MkDocs. - generators: - techdocs: 'docker' + generator: + # techdocs.generator.runIn can be either 'docker' or 'local'. This is to determine how to run the generator - whether to + # spin up the techdocs-container docker image or to run mkdocs locally (assuming all the dependencies are taken care of). + # You want to change this to 'local' if you are running Backstage using your own custom Docker setup and want to avoid running + # into Docker in Docker situation. Read more here + # https://backstage.io/docs/features/techdocs/getting-started#disable-docker-in-docker-situation-optional + + runIn: 'docker' + + # techdocs.generator.dockerImage can be used to control the docker image used during documentation generation. This can be useful + # if you want to use MkDocs plugins or other packages that are not included in the default techdocs-container (spotify/techdocs). + # NOTE: This setting is only used when techdocs.generator.runIn is set to 'docker'. + + dockerImage: 'spotify/techdocs' + + # techdocs.generator.pullImage can be used to disable pulling the latest docker image by default. This can be useful when you are + # using a custom techdocs.generator.dockerImage and you have a custom docker login requirement. For example, you need to login to + # AWS ECR to pull the docker image. + # NOTE: Disabling this requires the docker image was pulled by other means before running the techdocs generator. + + pullImage: true # techdocs.builder can be either 'local' or 'external. # If builder is set to 'local' and you open a TechDocs page, techdocs-backend will try to generate the docs, publish to storage diff --git a/docs/features/techdocs/using-cloud-storage.md b/docs/features/techdocs/using-cloud-storage.md index 119629915e..159137c879 100644 --- a/docs/features/techdocs/using-cloud-storage.md +++ b/docs/features/techdocs/using-cloud-storage.md @@ -150,6 +150,39 @@ permissions to: - `s3:ListBucket` - To retrieve bucket metadata - `s3:GetObject` - To retrieve files from the bucket +> Note: If you need to migrate documentation objects from an older-style path +> format including case-sensitive entity metadata, you will need to add some +> additional permissions to be able to perform the migration, including: +> +> - `s3:PutBucketAcl` (for copying files, +> [more info here](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAcl.html)) +> - `s3:DeleteObject` and `s3:DeleteObjectVersion` (for deleting migrated files, +> [more info here](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)) +> +> ...And you will need to ensure the permissions apply to the bucket itself, as +> well as all resources under the bucket. See the example policy below. + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "TechDocsWithMigration", + "Effect": "Allow", + "Action": [ + "s3:PutObject", + "s3:GetObject", + "s3:DeleteObjectVersion", + "s3:ListBucket", + "s3:DeleteObject", + "s3:PutObjectAcl" + ], + "Resource": ["arn:aws:s3:::your-bucket", "arn:aws:s3:::your-bucket/*"] + } + ] +} +``` + **4a. (Recommended) Setup authentication the AWS way, using environment variables** diff --git a/docs/integrations/bitbucket/discovery.md b/docs/integrations/bitbucket/discovery.md index fadb7c9f06..1538806e39 100644 --- a/docs/integrations/bitbucket/discovery.md +++ b/docs/integrations/bitbucket/discovery.md @@ -38,7 +38,11 @@ The target is composed of four parts: repositories prefixed with `service-`. - The path within each repository to find the catalog YAML file. This will usually be `/catalog-info.yaml` or a similar variation for catalog files - stored in the root directory of each repository. + stored in the root directory of each repository. If omitted, the default value + `catalog-info.yaml` will be used. E.g. given that `my-project`and `service-a` + exists, `https://bitbucket.mycompany.com/projects/my-project/repos/service-*/` + will result in: + `https://bitbucket.mycompany.com/projects/my-project/repos/service-a/catalog-info.yaml`. ## Custom repository processing diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index cc67b78f44..494e7dbad2 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,35 @@ # example-app +## 0.2.37 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@0.6.7 + - @backstage/plugin-catalog-react@0.3.0 + - @backstage/plugin-scaffolder@0.10.1 + - @backstage/plugin-techdocs@0.10.0 + - @backstage/plugin-jenkins@0.5.0 + - @backstage/plugin-user-settings@0.3.0 + - @backstage/plugin-search@0.4.3 + - @backstage/cli@0.7.4 + - @backstage/plugin-api-docs@0.6.2 + - @backstage/plugin-badges@0.2.5 + - @backstage/plugin-catalog-import@0.5.13 + - @backstage/plugin-circleci@0.2.19 + - @backstage/plugin-cloudbuild@0.2.19 + - @backstage/plugin-code-coverage@0.1.7 + - @backstage/plugin-explore@0.3.10 + - @backstage/plugin-github-actions@0.4.13 + - @backstage/plugin-kafka@0.2.11 + - @backstage/plugin-kubernetes@0.4.8 + - @backstage/plugin-lighthouse@0.2.20 + - @backstage/plugin-org@0.3.17 + - @backstage/plugin-pagerduty@0.3.8 + - @backstage/plugin-rollbar@0.3.9 + - @backstage/plugin-sentry@0.3.15 + - @backstage/plugin-todo@0.1.5 + ## 0.2.36 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index b26e94fc26..d86e0f27e9 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,44 +1,44 @@ { "name": "example-app", - "version": "0.2.36", + "version": "0.2.37", "private": true, "bundled": true, "dependencies": { "@backstage/catalog-model": "^0.9.0", - "@backstage/cli": "^0.7.2", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.3", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-api-docs": "^0.6.1", - "@backstage/plugin-badges": "^0.2.4", - "@backstage/plugin-catalog": "^0.6.6", - "@backstage/plugin-catalog-import": "^0.5.12", - "@backstage/plugin-catalog-react": "^0.2.6", - "@backstage/plugin-circleci": "^0.2.18", - "@backstage/plugin-cloudbuild": "^0.2.18", - "@backstage/plugin-code-coverage": "^0.1.6", + "@backstage/plugin-api-docs": "^0.6.2", + "@backstage/plugin-badges": "^0.2.5", + "@backstage/plugin-catalog": "^0.6.7", + "@backstage/plugin-catalog-import": "^0.5.13", + "@backstage/plugin-catalog-react": "^0.3.0", + "@backstage/plugin-circleci": "^0.2.19", + "@backstage/plugin-cloudbuild": "^0.2.19", + "@backstage/plugin-code-coverage": "^0.1.7", "@backstage/plugin-cost-insights": "^0.11.0", - "@backstage/plugin-explore": "^0.3.9", + "@backstage/plugin-explore": "^0.3.10", "@backstage/plugin-gcp-projects": "^0.3.0", - "@backstage/plugin-github-actions": "^0.4.12", + "@backstage/plugin-github-actions": "^0.4.13", "@backstage/plugin-graphiql": "^0.2.12", - "@backstage/plugin-jenkins": "^0.4.7", - "@backstage/plugin-kafka": "^0.2.10", - "@backstage/plugin-kubernetes": "^0.4.7", - "@backstage/plugin-lighthouse": "^0.2.19", + "@backstage/plugin-jenkins": "^0.5.0", + "@backstage/plugin-kafka": "^0.2.11", + "@backstage/plugin-kubernetes": "^0.4.8", + "@backstage/plugin-lighthouse": "^0.2.20", "@backstage/plugin-newrelic": "^0.3.0", - "@backstage/plugin-org": "^0.3.16", - "@backstage/plugin-pagerduty": "0.3.7", - "@backstage/plugin-rollbar": "^0.3.8", - "@backstage/plugin-scaffolder": "^0.10.0", - "@backstage/plugin-search": "^0.4.2", - "@backstage/plugin-sentry": "^0.3.14", + "@backstage/plugin-org": "^0.3.17", + "@backstage/plugin-pagerduty": "0.3.8", + "@backstage/plugin-rollbar": "^0.3.9", + "@backstage/plugin-scaffolder": "^0.10.1", + "@backstage/plugin-search": "^0.4.3", + "@backstage/plugin-sentry": "^0.3.15", "@backstage/plugin-shortcuts": "^0.1.4", "@backstage/plugin-tech-radar": "^0.4.1", - "@backstage/plugin-techdocs": "^0.9.9", - "@backstage/plugin-todo": "^0.1.4", - "@backstage/plugin-user-settings": "^0.2.12", + "@backstage/plugin-techdocs": "^0.10.0", + "@backstage/plugin-todo": "^0.1.5", + "@backstage/plugin-user-settings": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 93016bd13c..13601fb8b3 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/backend-common +## 0.8.6 + +### Patch Changes + +- 5f6f2fd96: Support a `ensureExists` config option to skip ensuring a configured database exists. This allows deployment scenarios where + limited permissions are given for provisioned databases without privileges to create new databases. If set to `false`, the + database connection will not be validated prior to use which means the backend will not attempt to create the database if it + doesn't exist. You can configure this in your app-config.yaml: + + ```yaml + backend: + database: + ensureExists: false + ``` + + This defaults to `true` if unspecified. You can also configure this per plugin connection and will override the base option. + +- ad93bb035: Document the default behavior of `statusCheck` option in `createStatusCheckRouter`. +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/config-loader@0.6.5 + ## 0.8.5 ### Patch Changes diff --git a/packages/backend-common/api-report.md b/packages/backend-common/api-report.md index 94f1147b5a..571a26e5dc 100644 --- a/packages/backend-common/api-report.md +++ b/packages/backend-common/api-report.md @@ -32,6 +32,8 @@ import { Server } from 'http'; import * as winston from 'winston'; import { Writable } from 'stream'; +// Warning: (ae-missing-release-tag) "AzureUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class AzureUrlReader implements UrlReader { constructor( @@ -40,20 +42,31 @@ export class AzureUrlReader implements UrlReader { treeResponseFactory: ReadTreeResponseFactory; }, ); + // Warning: (ae-forgotten-export) The symbol "ReaderFactory" needs to be exported by the entry point index.d.ts + // // (undocumented) static factory: ReaderFactory; // (undocumented) read(url: string): Promise; + // Warning: (ae-forgotten-export) The symbol "ReadTreeOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) readTree(url: string, options?: ReadTreeOptions): Promise; + // Warning: (ae-forgotten-export) The symbol "ReadUrlOptions" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "ReadUrlResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) readUrl(url: string, _options?: ReadUrlOptions): Promise; + // Warning: (ae-forgotten-export) The symbol "SearchOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) search(url: string, options?: SearchOptions): Promise; // (undocumented) toString(): string; } +// Warning: (ae-missing-release-tag) "BitbucketUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class BitbucketUrlReader implements UrlReader { constructor( @@ -76,60 +89,92 @@ export class BitbucketUrlReader implements UrlReader { toString(): string; } +// Warning: (ae-missing-release-tag) "CacheClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface CacheClient { delete(key: string): Promise; get(key: string): Promise; + // Warning: (ae-forgotten-export) The symbol "CacheSetOptions" needs to be exported by the entry point index.d.ts set(key: string, value: JsonValue, options?: CacheSetOptions): Promise; } +// Warning: (ae-missing-release-tag) "CacheManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class CacheManager { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen forPlugin(pluginId: string): PluginCacheManager; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (ae-forgotten-export) The symbol "CacheManagerOptions" needs to be exported by the entry point index.d.ts static fromConfig( config: Config, options?: CacheManagerOptions, ): CacheManager; } +// Warning: (ae-missing-release-tag) "coloredFormat" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const coloredFormat: winston.Logform.Format; +// Warning: (ae-missing-release-tag) "ContainerRunner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface ContainerRunner { // (undocumented) runContainer(opts: RunContainerOptions): Promise; } +// Warning: (ae-missing-release-tag) "createDatabase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated export const createDatabase: typeof createDatabaseClient; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "createDatabaseClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createDatabaseClient( dbConfig: Config, overrides?: Partial, ): Knex; +// Warning: (ae-missing-release-tag) "createRootLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createRootLogger( options?: winston.LoggerOptions, env?: NodeJS.ProcessEnv, ): winston.Logger; +// Warning: (ae-forgotten-export) The symbol "ServiceBuilderImpl" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createServiceBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createServiceBuilder(_module: NodeModule): ServiceBuilderImpl; +// Warning: (ae-forgotten-export) The symbol "StatusCheckRouterOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createStatusCheckRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createStatusCheckRouter( options: StatusCheckRouterOptions, ): Promise; +// Warning: (ae-missing-release-tag) "DatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DatabaseManager { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen forPlugin(pluginId: string): PluginDatabaseManager; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static fromConfig(config: Config): DatabaseManager; } +// Warning: (ae-missing-release-tag) "DockerContainerRunner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DockerContainerRunner implements ContainerRunner { constructor({ dockerClient }: { dockerClient: Docker }); @@ -142,20 +187,27 @@ export class DockerContainerRunner implements ContainerRunner { mountDirs, workingDir, envVars, + pullImage, }: RunContainerOptions): Promise; } +// Warning: (ae-missing-release-tag) "ensureDatabaseExists" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function ensureDatabaseExists( dbConfig: Config, ...databases: Array ): Promise; +// Warning: (ae-missing-release-tag) "errorHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function errorHandler( options?: ErrorHandlerOptions, ): ErrorRequestHandler; +// Warning: (ae-missing-release-tag) "ErrorHandlerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ErrorHandlerOptions = { showStackTraces?: boolean; @@ -163,12 +215,18 @@ export type ErrorHandlerOptions = { logClientErrors?: boolean; }; +// Warning: (ae-missing-release-tag) "getRootLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getRootLogger(): winston.Logger; +// Warning: (ae-missing-release-tag) "getVoidLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getVoidLogger(): winston.Logger; +// Warning: (ae-missing-release-tag) "Git" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class Git { // (undocumented) @@ -273,6 +331,8 @@ export class Git { resolveRef({ dir, ref }: { dir: string; ref: string }): Promise; } +// Warning: (ae-missing-release-tag) "GithubUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class GithubUrlReader implements UrlReader { constructor( @@ -296,6 +356,8 @@ export class GithubUrlReader implements UrlReader { toString(): string; } +// Warning: (ae-missing-release-tag) "GitlabUrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GitlabUrlReader implements UrlReader { constructor( @@ -320,28 +382,41 @@ export class GitlabUrlReader implements UrlReader { export { isChildPath }; +// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "loadBackendConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function loadBackendConfig(options: Options): Promise; +// Warning: (ae-missing-release-tag) "notFoundHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function notFoundHandler(): RequestHandler; +// Warning: (ae-missing-release-tag) "PluginCacheManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type PluginCacheManager = { getClient: (options?: ClientOptions) => CacheClient; }; +// Warning: (ae-missing-release-tag) "PluginDatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface PluginDatabaseManager { getClient(): Promise; } +// Warning: (ae-missing-release-tag) "PluginEndpointDiscovery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type PluginEndpointDiscovery = { getBaseUrl(pluginId: string): Promise; getExternalBaseUrl(pluginId: string): Promise; }; +// Warning: (ae-missing-release-tag) "ReadTreeResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ReadTreeResponse = { files(): Promise; @@ -350,21 +425,34 @@ export type ReadTreeResponse = { etag: string; }; +// Warning: (ae-missing-release-tag) "ReadTreeResponseFile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ReadTreeResponseFile = { path: string; content(): Promise; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "requestLoggingHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function requestLoggingHandler(logger?: Logger_2): RequestHandler; +// Warning: (ae-missing-release-tag) "resolvePackagePath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function resolvePackagePath(name: string, ...paths: string[]): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "resolveSafeChildPath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function resolveSafeChildPath(base: string, path: string): string; +// Warning: (ae-missing-release-tag) "RunContainerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type RunContainerOptions = { imageName: string; @@ -374,20 +462,27 @@ export type RunContainerOptions = { mountDirs?: Record; workingDir?: string; envVars?: Record; + pullImage?: boolean; }; +// Warning: (ae-missing-release-tag) "SearchResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type SearchResponse = { files: SearchResponseFile[]; etag: string; }; +// Warning: (ae-missing-release-tag) "SearchResponseFile" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type SearchResponseFile = { url: string; content(): Promise; }; +// Warning: (ae-missing-release-tag) "ServiceBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ServiceBuilder = { loadConfig(config: ConfigReader): ServiceBuilder; @@ -400,12 +495,18 @@ export type ServiceBuilder = { start(): Promise; }; +// Warning: (ae-missing-release-tag) "setRootLogger" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function setRootLogger(newLogger: winston.Logger): void; +// Warning: (ae-missing-release-tag) "SingleConnectionDatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated export const SingleConnectionDatabaseManager: typeof DatabaseManager; +// Warning: (ae-missing-release-tag) "SingleHostDiscovery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class SingleHostDiscovery implements PluginEndpointDiscovery { static fromConfig( @@ -420,19 +521,28 @@ export class SingleHostDiscovery implements PluginEndpointDiscovery { getExternalBaseUrl(pluginId: string): Promise; } +// Warning: (ae-missing-release-tag) "StatusCheck" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type StatusCheck = () => Promise; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "statusCheckHandler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function statusCheckHandler( options?: StatusCheckHandlerOptions, ): Promise; +// Warning: (ae-missing-release-tag) "StatusCheckHandlerOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface StatusCheckHandlerOptions { statusCheck?: StatusCheck; } +// Warning: (ae-missing-release-tag) "UrlReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type UrlReader = { read(url: string): Promise; @@ -441,20 +551,48 @@ export type UrlReader = { search(url: string, options?: SearchOptions): Promise; }; +// Warning: (ae-missing-release-tag) "UrlReaders" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class UrlReaders { + // Warning: (ae-forgotten-export) The symbol "CreateOptions" needs to be exported by the entry point index.d.ts static create({ logger, config, factories }: CreateOptions): UrlReader; static default({ logger, config, factories }: CreateOptions): UrlReader; } +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "useHotCleanup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function useHotCleanup( _module: NodeModule, cancelEffect: () => void, ): void; +// Warning: (tsdoc-undefined-tag) The TSDoc tag "@warning" is not defined in this configuration +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "useHotMemoize" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function useHotMemoize(_module: NodeModule, valueFactory: () => T): T; +// Warnings were encountered during analysis: +// +// src/cache/types.d.ts:34:5 - (ae-forgotten-export) The symbol "ClientOptions" needs to be exported by the entry point index.d.ts +// src/middleware/errorHandler.d.ts:17:26 - (tsdoc-malformed-html-name) Invalid HTML element: A space is not allowed here +// src/reading/AzureUrlReader.d.ts:9:9 - (ae-forgotten-export) The symbol "ReadTreeResponseFactory" needs to be exported by the entry point index.d.ts +// src/reading/types.d.ts:106:5 - (ae-forgotten-export) The symbol "ReadTreeResponseDirOptions" needs to be exported by the entry point index.d.ts +// src/service/types.d.ts:12:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:22:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:30:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:38:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:47:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:55:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:57:5 - (ae-forgotten-export) The symbol "HttpsSettings" needs to be exported by the entry point index.d.ts +// src/service/types.d.ts:61:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/service/types.d.ts:62:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 6cf20b8234..739e372857 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.8.5", + "version": "0.8.6", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -31,7 +31,7 @@ "dependencies": { "@backstage/cli-common": "^0.1.2", "@backstage/config": "^0.1.5", - "@backstage/config-loader": "^0.6.4", + "@backstage/config-loader": "^0.6.5", "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", "@google-cloud/storage": "^5.8.0", @@ -76,7 +76,7 @@ } }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/test-utils": "^0.1.12", "@types/archiver": "^5.1.0", "@types/compression": "^1.7.0", diff --git a/packages/backend-common/src/util/ContainerRunner.ts b/packages/backend-common/src/util/ContainerRunner.ts index 80ac4e3954..8a73be42ba 100644 --- a/packages/backend-common/src/util/ContainerRunner.ts +++ b/packages/backend-common/src/util/ContainerRunner.ts @@ -24,6 +24,7 @@ export type RunContainerOptions = { mountDirs?: Record; workingDir?: string; envVars?: Record; + pullImage?: boolean; }; export interface ContainerRunner { diff --git a/packages/backend-common/src/util/DockerContainerRunner.test.ts b/packages/backend-common/src/util/DockerContainerRunner.test.ts index 0ed41d5cd3..8833e4518b 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.test.ts +++ b/packages/backend-common/src/util/DockerContainerRunner.test.ts @@ -58,6 +58,7 @@ describe('DockerContainerRunner', () => { }); afterEach(() => { + jest.clearAllMocks(); mockFs.restore(); }); @@ -86,6 +87,17 @@ describe('DockerContainerRunner', () => { expect(mockDocker.run).toHaveBeenCalled(); }); + it('should not pull the docker container when pullImage is false', async () => { + await containerTaskApi.runContainer({ + imageName, + args, + pullImage: false, + }); + + expect(mockDocker.pull).not.toHaveBeenCalled(); + expect(mockDocker.run).toHaveBeenCalled(); + }); + it('should call the dockerClient run command with the correct arguments passed through', async () => { await containerTaskApi.runContainer({ imageName, diff --git a/packages/backend-common/src/util/DockerContainerRunner.ts b/packages/backend-common/src/util/DockerContainerRunner.ts index 6ec366eb94..8dbc5335c9 100644 --- a/packages/backend-common/src/util/DockerContainerRunner.ts +++ b/packages/backend-common/src/util/DockerContainerRunner.ts @@ -38,6 +38,7 @@ export class DockerContainerRunner implements ContainerRunner { mountDirs = {}, workingDir, envVars = {}, + pullImage = true, }: RunContainerOptions) { // Show a better error message when Docker is unavailable. try { @@ -48,15 +49,17 @@ export class DockerContainerRunner implements ContainerRunner { ); } - await new Promise((resolve, reject) => { - this.dockerClient.pull(imageName, {}, (err, stream) => { - if (err) return reject(err); - stream.pipe(logStream, { end: false }); - stream.on('end', () => resolve()); - stream.on('error', (error: Error) => reject(error)); - return undefined; + if (pullImage) { + await new Promise((resolve, reject) => { + this.dockerClient.pull(imageName, {}, (err, stream) => { + if (err) return reject(err); + stream.pipe(logStream, { end: false }); + stream.on('end', () => resolve()); + stream.on('error', (error: Error) => reject(error)); + return undefined; + }); }); - }); + } const userOptions: UserOptions = {}; if (process.getuid && process.getgid) { diff --git a/packages/backend-test-utils/api-report.md b/packages/backend-test-utils/api-report.md index 184ed74978..411ecc7ddf 100644 --- a/packages/backend-test-utils/api-report.md +++ b/packages/backend-test-utils/api-report.md @@ -5,9 +5,13 @@ ```ts import { Knex } from 'knex'; +// Warning: (ae-missing-release-tag) "isDockerDisabledForTests" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function isDockerDisabledForTests(): boolean; +// Warning: (ae-missing-release-tag) "TestDatabaseId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type TestDatabaseId = | 'POSTGRES_13' @@ -15,6 +19,8 @@ export type TestDatabaseId = | 'MYSQL_8' | 'SQLITE_3'; +// Warning: (ae-missing-release-tag) "TestDatabases" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class TestDatabases { static create(options?: { @@ -23,6 +29,7 @@ export class TestDatabases { }): TestDatabases; // (undocumented) eachSupportedId(): [TestDatabaseId][]; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen init(id: TestDatabaseId): Promise; // (undocumented) supports(id: TestDatabaseId): boolean; diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 47edc5107f..56f6f2da72 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,23 @@ # example-backend +## 0.2.37 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.8.6 + - @backstage/plugin-scaffolder-backend@0.14.0 + - @backstage/plugin-catalog-backend@0.13.0 + - @backstage/plugin-auth-backend@0.3.17 + - @backstage/plugin-scaffolder-backend-module-rails@0.1.3 + - @backstage/plugin-search-backend-node@0.4.0 + - @backstage/plugin-techdocs-backend@0.8.7 + - @backstage/plugin-app-backend@0.3.15 + - @backstage/plugin-kubernetes-backend@0.3.10 + - @backstage/plugin-rollbar-backend@0.1.13 + - example-app@0.2.37 + - @backstage/plugin-search-backend@0.2.3 + ## 0.2.36 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 4338f3e2b7..315c966a07 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.36", + "version": "0.2.37", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -27,32 +27,33 @@ "migrate:create": "knex migrate:make -x ts" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/catalog-client": "^0.3.16", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", "@backstage/integration": "^0.5.8", - "@backstage/plugin-app-backend": "^0.3.13", - "@backstage/plugin-auth-backend": "^0.3.16", + "@backstage/plugin-app-backend": "^0.3.15", + "@backstage/plugin-auth-backend": "^0.3.17", "@backstage/plugin-badges-backend": "^0.1.8", - "@backstage/plugin-catalog-backend": "^0.12.0", + "@backstage/plugin-catalog-backend": "^0.13.0", "@backstage/plugin-code-coverage-backend": "^0.1.8", "@backstage/plugin-graphql-backend": "^0.1.8", - "@backstage/plugin-kubernetes-backend": "^0.3.9", + "@backstage/plugin-jenkins-backend": "^0.1.1", + "@backstage/plugin-kubernetes-backend": "^0.3.10", "@backstage/plugin-kafka-backend": "^0.2.8", "@backstage/plugin-proxy-backend": "^0.2.9", - "@backstage/plugin-rollbar-backend": "^0.1.11", - "@backstage/plugin-scaffolder-backend": "^0.13.0", - "@backstage/plugin-scaffolder-backend-module-rails": "^0.1.2", - "@backstage/plugin-search-backend": "^0.2.2", - "@backstage/plugin-search-backend-node": "^0.3.0", - "@backstage/plugin-techdocs-backend": "^0.8.6", + "@backstage/plugin-rollbar-backend": "^0.1.13", + "@backstage/plugin-scaffolder-backend": "^0.14.0", + "@backstage/plugin-scaffolder-backend-module-rails": "^0.1.3", + "@backstage/plugin-search-backend": "^0.2.3", + "@backstage/plugin-search-backend-node": "^0.4.0", + "@backstage/plugin-techdocs-backend": "^0.8.7", "@backstage/plugin-todo-backend": "^0.1.8", "@gitbeaker/node": "^30.2.0", "@octokit/rest": "^18.5.3", "azure-devops-node-api": "^10.2.2", "dockerode": "^3.2.1", - "example-app": "^0.2.36", + "example-app": "^0.2.37", "express": "^4.17.1", "express-promise-router": "^4.1.0", "knex": "^0.95.1", @@ -62,7 +63,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@types/dockerode": "^3.2.1", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5" diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 168f6aa2d9..aecb233581 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -50,6 +50,7 @@ import todo from './plugins/todo'; import graphql from './plugins/graphql'; import app from './plugins/app'; import badges from './plugins/badges'; +import jenkins from './plugins/jenkins'; import { PluginEnvironment } from './types'; function makeCreateEnv(config: Config) { @@ -101,6 +102,7 @@ async function main() { const graphqlEnv = useHotMemoize(module, () => createEnv('graphql')); const appEnv = useHotMemoize(module, () => createEnv('app')); const badgesEnv = useHotMemoize(module, () => createEnv('badges')); + const jenkinsEnv = useHotMemoize(module, () => createEnv('jenkins')); const apiRouter = Router(); apiRouter.use('/catalog', await catalog(catalogEnv)); @@ -116,6 +118,7 @@ async function main() { apiRouter.use('/proxy', await proxy(proxyEnv)); apiRouter.use('/graphql', await graphql(graphqlEnv)); apiRouter.use('/badges', await badges(badgesEnv)); + apiRouter.use('/jenkins', await jenkins(jenkinsEnv)); apiRouter.use(notFoundHandler()); const service = createServiceBuilder(module) diff --git a/packages/backend/src/plugins/jenkins.ts b/packages/backend/src/plugins/jenkins.ts new file mode 100644 index 0000000000..5420eb0df6 --- /dev/null +++ b/packages/backend/src/plugins/jenkins.ts @@ -0,0 +1,39 @@ +/* + * Copyright 2020 Spotify AB + * + * 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 { + createRouter, + DefaultJenkinsInfoProvider, +} from '@backstage/plugin-jenkins-backend'; +import { Router } from 'express'; +import { PluginEnvironment } from '../types'; +import { CatalogClient } from '@backstage/catalog-client'; + +export default async function createPlugin({ + logger, + config, + discovery, +}: PluginEnvironment): Promise { + const catalog = new CatalogClient({ discoveryApi: discovery }); + + return await createRouter({ + logger, + jenkinsInfoProvider: DefaultJenkinsInfoProvider.fromConfig({ + catalog, + config, + }), + }); +} diff --git a/packages/catalog-client/api-report.md b/packages/catalog-client/api-report.md index 2abdeb8c75..52757614a7 100644 --- a/packages/catalog-client/api-report.md +++ b/packages/catalog-client/api-report.md @@ -7,6 +7,8 @@ import { Entity } from '@backstage/catalog-model'; import { EntityName } from '@backstage/catalog-model'; import { Location as Location_2 } from '@backstage/catalog-model'; +// Warning: (ae-missing-release-tag) "AddLocationRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AddLocationRequest = { type?: string; @@ -15,12 +17,16 @@ export type AddLocationRequest = { presence?: 'optional' | 'required'; }; +// Warning: (ae-missing-release-tag) "AddLocationResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AddLocationResponse = { location: Location_2; entities: Entity[]; }; +// Warning: (ae-missing-release-tag) "CatalogApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface CatalogApi { // (undocumented) @@ -28,6 +34,8 @@ export interface CatalogApi { location: AddLocationRequest, options?: CatalogRequestOptions, ): Promise; + // Warning: (ae-forgotten-export) The symbol "CatalogRequestOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) getEntities( request?: CatalogEntitiesRequest, @@ -65,6 +73,8 @@ export interface CatalogApi { ): Promise; } +// Warning: (ae-missing-release-tag) "CatalogClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class CatalogClient implements CatalogApi { constructor(options: { discoveryApi: DiscoveryApi }); @@ -110,6 +120,8 @@ export class CatalogClient implements CatalogApi { ): Promise; } +// Warning: (ae-missing-release-tag) "CatalogEntitiesRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogEntitiesRequest = { filter?: @@ -119,14 +131,22 @@ export type CatalogEntitiesRequest = { fields?: string[] | undefined; }; +// Warning: (ae-missing-release-tag) "CatalogListResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogListResponse = { items: T[]; }; +// Warning: (ae-missing-release-tag) "ENTITY_STATUS_CATALOG_PROCESSING_TYPE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ENTITY_STATUS_CATALOG_PROCESSING_TYPE = 'backstage.io/catalog-processing'; +// Warnings were encountered during analysis: +// +// src/CatalogClient.d.ts:7:9 - (ae-forgotten-export) The symbol "DiscoveryApi" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/catalog-model/api-report.md b/packages/catalog-model/api-report.md index 74027716de..437a0be02b 100644 --- a/packages/catalog-model/api-report.md +++ b/packages/catalog-model/api-report.md @@ -9,6 +9,9 @@ import { JsonValue } from '@backstage/config'; import { SerializedError } from '@backstage/errors'; import * as yup from 'yup'; +// Warning: (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative +// Warning: (ae-missing-release-tag) "analyzeLocationSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated (undocumented) export const analyzeLocationSchema: yup.ObjectSchema< { @@ -17,6 +20,8 @@ export const analyzeLocationSchema: yup.ObjectSchema< object >; +// Warning: (ae-missing-release-tag) "ApiEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface ApiEntityV1alpha1 extends Entity { // (undocumented) @@ -35,24 +40,43 @@ interface ApiEntityV1alpha1 extends Entity { export { ApiEntityV1alpha1 as ApiEntity }; export { ApiEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "apiEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const apiEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "CommonValidatorFunctions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class CommonValidatorFunctions { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static isJsonSafe(value: unknown): boolean; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static isValidDnsLabel(value: unknown): boolean; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static isValidDnsSubdomain(value: unknown): boolean; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static isValidPrefixAndOrSuffix( value: unknown, separator: string, isValidPrefix: (value: string) => boolean, isValidSuffix: (value: string) => boolean, ): boolean; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static isValidString(value: unknown): boolean; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static isValidUrl(value: unknown): boolean; } +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-forgotten-export) The symbol "EntityRefContext" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "compareEntityToRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function compareEntityToRef( entity: Entity, @@ -60,6 +84,8 @@ export function compareEntityToRef( context?: EntityRefContext, ): boolean; +// Warning: (ae-missing-release-tag) "ComponentEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface ComponentEntityV1alpha1 extends Entity { // (undocumented) @@ -81,9 +107,13 @@ interface ComponentEntityV1alpha1 extends Entity { export { ComponentEntityV1alpha1 as ComponentEntity }; export { ComponentEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "componentEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const componentEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "DefaultNamespaceEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class DefaultNamespaceEntityPolicy implements EntityPolicy { constructor(namespace?: string); @@ -91,6 +121,8 @@ export class DefaultNamespaceEntityPolicy implements EntityPolicy { enforce(entity: Entity): Promise; } +// Warning: (ae-missing-release-tag) "DomainEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface DomainEntityV1alpha1 extends Entity { // (undocumented) @@ -105,12 +137,18 @@ interface DomainEntityV1alpha1 extends Entity { export { DomainEntityV1alpha1 as DomainEntity }; export { DomainEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "domainEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const domainEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "EDIT_URL_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EDIT_URL_ANNOTATION = 'backstage.io/edit-url'; +// Warning: (ae-missing-release-tag) "Entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type Entity = { apiVersion: string; @@ -121,9 +159,13 @@ export type Entity = { status?: UNSTABLE_EntityStatus; }; +// Warning: (ae-missing-release-tag) "ENTITY_DEFAULT_NAMESPACE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ENTITY_DEFAULT_NAMESPACE = 'default'; +// Warning: (ae-missing-release-tag) "ENTITY_META_GENERATED_FIELDS" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ENTITY_META_GENERATED_FIELDS: readonly [ 'uid', @@ -131,6 +173,8 @@ export const ENTITY_META_GENERATED_FIELDS: readonly [ 'generation', ]; +// Warning: (ae-missing-release-tag) "EntityEnvelope" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityEnvelope = { apiVersion: string; @@ -141,19 +185,35 @@ export type EntityEnvelope = { }; }; +// Warning: (ae-missing-release-tag) "entityEnvelopeSchemaValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/catalog-model" does not have an export "TypeError" +// // @public export function entityEnvelopeSchemaValidator< T extends EntityEnvelope = EntityEnvelope >(schema?: unknown): (data: unknown) => T; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "entityHasChanges" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function entityHasChanges(previous: Entity, next: Entity): boolean; +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (ae-missing-release-tag) "entityKindSchemaValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/catalog-model" does not have an export "TypeError" +// // @public export function entityKindSchemaValidator( schema: unknown, ): (data: unknown) => T | false; +// Warning: (ae-missing-release-tag) "EntityLink" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityLink = { url: string; @@ -161,6 +221,8 @@ export type EntityLink = { icon?: string; }; +// Warning: (ae-missing-release-tag) "EntityMeta" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityMeta = JsonObject & { uid?: string; @@ -175,6 +237,8 @@ export type EntityMeta = JsonObject & { links?: EntityLink[]; }; +// Warning: (ae-missing-release-tag) "EntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityName = { kind: string; @@ -182,17 +246,23 @@ export type EntityName = { name: string; }; +// Warning: (ae-missing-release-tag) "EntityPolicies" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityPolicies: { allOf(policies: EntityPolicy[]): AllEntityPolicies; oneOf(policies: EntityPolicy[]): AnyEntityPolicy; }; +// Warning: (ae-missing-release-tag) "EntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityPolicy = { enforce(entity: Entity): Promise; }; +// Warning: (ae-missing-release-tag) "EntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityRef = | string @@ -202,12 +272,16 @@ export type EntityRef = name: string; }; +// Warning: (ae-missing-release-tag) "EntityRelation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityRelation = { type: string; target: EntityName; }; +// Warning: (ae-missing-release-tag) "EntityRelationSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityRelationSpec = { source: EntityName; @@ -215,11 +289,16 @@ export type EntityRelationSpec = { target: EntityName; }; +// Warning: (ae-missing-release-tag) "entitySchemaValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/catalog-model" does not have an export "TypeError" +// // @public export function entitySchemaValidator( schema?: unknown, ): (data: unknown) => T; +// Warning: (ae-missing-release-tag) "FieldFormatEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class FieldFormatEntityPolicy implements EntityPolicy { constructor(validators?: Validators); @@ -227,18 +306,32 @@ export class FieldFormatEntityPolicy implements EntityPolicy { enforce(entity: Entity): Promise; } +// Warning: (ae-missing-release-tag) "generateEntityEtag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function generateEntityEtag(): string; +// Warning: (ae-missing-release-tag) "generateEntityUid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function generateEntityUid(): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "generateUpdatedEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function generateUpdatedEntity(previous: Entity, next: Entity): Entity; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getEntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getEntityName(entity: Entity): EntityName; +// Warning: (tsdoc-characters-after-block-tag) The token "@backstage" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" +// Warning: (ae-missing-release-tag) "getEntitySourceLocation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getEntitySourceLocation( entity: Entity, @@ -247,6 +340,8 @@ export function getEntitySourceLocation( target: string; }; +// Warning: (ae-missing-release-tag) "GroupEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface GroupEntityV1alpha1 extends Entity { // (undocumented) @@ -269,20 +364,28 @@ interface GroupEntityV1alpha1 extends Entity { export { GroupEntityV1alpha1 as GroupEntity }; export { GroupEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "groupEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const groupEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "JSONSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type JSONSchema = JSONSchema7 & { [key in string]?: JsonValue; }; +// Warning: (ae-missing-release-tag) "KindValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type KindValidator = { check(entity: Entity): Promise; }; +// Warning: (ae-missing-release-tag) "KubernetesValidatorFunctions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class KubernetesValidatorFunctions { // (undocumented) @@ -303,15 +406,21 @@ export class KubernetesValidatorFunctions { static isValidObjectName(value: unknown): boolean; } +// Warning: (ae-missing-release-tag) "Location" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type Location_2 = { id: string; } & LocationSpec; export { Location_2 as Location }; +// Warning: (ae-missing-release-tag) "LOCATION_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const LOCATION_ANNOTATION = 'backstage.io/managed-by-location'; +// Warning: (ae-missing-release-tag) "LocationEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface LocationEntityV1alpha1 extends Entity { // (undocumented) @@ -328,12 +437,19 @@ interface LocationEntityV1alpha1 extends Entity { export { LocationEntityV1alpha1 as LocationEntity }; export { LocationEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "locationEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const locationEntityV1alpha1Validator: KindValidator; +// Warning: (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative +// Warning: (ae-missing-release-tag) "locationSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated (undocumented) export const locationSchema: yup.ObjectSchema; +// Warning: (ae-missing-release-tag) "LocationSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LocationSpec = { type: string; @@ -341,12 +457,19 @@ export type LocationSpec = { presence?: 'optional' | 'required'; }; +// Warning: (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative +// Warning: (ae-missing-release-tag) "locationSpecSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated (undocumented) export const locationSpecSchema: yup.ObjectSchema; +// Warning: (ae-missing-release-tag) "makeValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function makeValidator(overrides?: Partial): Validators; +// Warning: (ae-missing-release-tag) "NoForeignRootFieldsEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class NoForeignRootFieldsEntityPolicy implements EntityPolicy { constructor(knownFields?: string[]); @@ -354,16 +477,28 @@ export class NoForeignRootFieldsEntityPolicy implements EntityPolicy { enforce(entity: Entity): Promise; } +// Warning: (ae-missing-release-tag) "ORIGIN_LOCATION_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ORIGIN_LOCATION_ANNOTATION = 'backstage.io/managed-by-origin-location'; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "parseEntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function parseEntityName( ref: EntityRef, context?: EntityRefContext, ): EntityName; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "parseEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "parseEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "parseEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function parseEntityRef( ref: EntityRef, @@ -401,6 +536,11 @@ export function parseEntityRef( name: string; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (ae-missing-release-tag) "parseLocationReference" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function parseLocationReference( ref: string, @@ -409,48 +549,78 @@ export function parseLocationReference( target: string; }; +// Warning: (ae-missing-release-tag) "RELATION_API_CONSUMED_BY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_API_CONSUMED_BY = 'apiConsumedBy'; +// Warning: (ae-missing-release-tag) "RELATION_API_PROVIDED_BY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_API_PROVIDED_BY = 'apiProvidedBy'; +// Warning: (ae-missing-release-tag) "RELATION_CHILD_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_CHILD_OF = 'childOf'; +// Warning: (ae-missing-release-tag) "RELATION_CONSUMES_API" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const RELATION_CONSUMES_API = 'consumesApi'; +// Warning: (ae-missing-release-tag) "RELATION_DEPENDENCY_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_DEPENDENCY_OF = 'dependencyOf'; +// Warning: (ae-missing-release-tag) "RELATION_DEPENDS_ON" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const RELATION_DEPENDS_ON = 'dependsOn'; +// Warning: (ae-missing-release-tag) "RELATION_HAS_MEMBER" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_HAS_MEMBER = 'hasMember'; +// Warning: (ae-missing-release-tag) "RELATION_HAS_PART" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_HAS_PART = 'hasPart'; +// Warning: (ae-missing-release-tag) "RELATION_MEMBER_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const RELATION_MEMBER_OF = 'memberOf'; +// Warning: (ae-missing-release-tag) "RELATION_OWNED_BY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const RELATION_OWNED_BY = 'ownedBy'; +// Warning: (ae-missing-release-tag) "RELATION_OWNER_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_OWNER_OF = 'ownerOf'; +// Warning: (ae-missing-release-tag) "RELATION_PARENT_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const RELATION_PARENT_OF = 'parentOf'; +// Warning: (ae-missing-release-tag) "RELATION_PART_OF" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const RELATION_PART_OF = 'partOf'; +// Warning: (ae-missing-release-tag) "RELATION_PROVIDES_API" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RELATION_PROVIDES_API = 'providesApi'; +// Warning: (ae-missing-release-tag) "ResourceEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface ResourceEntityV1alpha1 extends Entity { // (undocumented) @@ -468,15 +638,22 @@ interface ResourceEntityV1alpha1 extends Entity { export { ResourceEntityV1alpha1 as ResourceEntity }; export { ResourceEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "resourceEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const resourceEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "SchemaValidEntityPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class SchemaValidEntityPolicy implements EntityPolicy { // (undocumented) enforce(entity: Entity): Promise; } +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "serializeEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated export function serializeEntityRef( ref: @@ -488,9 +665,14 @@ export function serializeEntityRef( }, ): EntityRef; +// Warning: (ae-missing-release-tag) "SOURCE_LOCATION_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SOURCE_LOCATION_ANNOTATION = 'backstage.io/source-location'; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "stringifyEntityRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function stringifyEntityRef( ref: @@ -502,12 +684,19 @@ export function stringifyEntityRef( }, ): string; +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "stringifyLocationReference" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function stringifyLocationReference(ref: { type: string; target: string; }): string; +// Warning: (ae-missing-release-tag) "SystemEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface SystemEntityV1alpha1 extends Entity { // (undocumented) @@ -523,9 +712,13 @@ interface SystemEntityV1alpha1 extends Entity { export { SystemEntityV1alpha1 as SystemEntity }; export { SystemEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "systemEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const systemEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "TemplateEntityV1beta2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TemplateEntityV1beta2 extends Entity { // (undocumented) @@ -554,6 +747,8 @@ export interface TemplateEntityV1beta2 extends Entity { }; } +// Warning: (ae-missing-release-tag) "templateEntityV1beta2Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const templateEntityV1beta2Validator: KindValidator; @@ -573,6 +768,8 @@ export type UNSTABLE_EntityStatusItem = { // @alpha export type UNSTABLE_EntityStatusLevel = 'info' | 'warning' | 'error'; +// Warning: (ae-missing-release-tag) "UserEntityV1alpha1" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) interface UserEntityV1alpha1 extends Entity { // (undocumented) @@ -592,9 +789,13 @@ interface UserEntityV1alpha1 extends Entity { export { UserEntityV1alpha1 as UserEntity }; export { UserEntityV1alpha1 }; +// Warning: (ae-missing-release-tag) "userEntityV1alpha1Validator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const userEntityV1alpha1Validator: KindValidator; +// Warning: (ae-missing-release-tag) "Validators" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Validators = { isValidApiVersion(value: unknown): boolean; @@ -608,8 +809,18 @@ export type Validators = { isValidTag(value: unknown): boolean; }; +// Warning: (ae-missing-release-tag) "VIEW_URL_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const VIEW_URL_ANNOTATION = 'backstage.io/view-url'; +// Warnings were encountered during analysis: +// +// src/EntityPolicies.d.ts:13:5 - (ae-forgotten-export) The symbol "AllEntityPolicies" needs to be exported by the entry point index.d.ts +// src/EntityPolicies.d.ts:14:5 - (ae-forgotten-export) The symbol "AnyEntityPolicy" needs to be exported by the entry point index.d.ts +// src/entity/Entity.d.ts:37:5 - (ae-incompatible-release-tags) The symbol "status" is marked as @public, but its signature references "UNSTABLE_EntityStatus" which is marked as @alpha +// src/entity/policies/types.d.ts:10:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/kinds/types.d.ts:9:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/cli-common/api-report.md b/packages/cli-common/api-report.md index 7141d27f3a..d6d1c4fc36 100644 --- a/packages/cli-common/api-report.md +++ b/packages/cli-common/api-report.md @@ -3,26 +3,33 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts - +// Warning: (ae-missing-release-tag) "findPaths" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function findPaths(searchDir: string): Paths; +// Warning: (ae-missing-release-tag) "isChildPath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function isChildPath(base: string, path: string): boolean; +// Warning: (ae-missing-release-tag) "Paths" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Paths = { - ownDir: string; - ownRoot: string; - targetDir: string; - targetRoot: string; - resolveOwn: ResolveFunc; - resolveOwnRoot: ResolveFunc; - resolveTarget: ResolveFunc; - resolveTargetRoot: ResolveFunc; + ownDir: string; + ownRoot: string; + targetDir: string; + targetRoot: string; + resolveOwn: ResolveFunc; + resolveOwnRoot: ResolveFunc; + resolveTarget: ResolveFunc; + resolveTargetRoot: ResolveFunc; }; +// Warnings were encountered during analysis: +// +// src/paths.d.ts:7:5 - (ae-forgotten-export) The symbol "ResolveFunc" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) - ``` diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index a8cacedf22..3dba2e4ec7 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/cli +## 0.7.4 + +### Patch Changes + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/config-loader@0.6.5 + ## 0.7.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index a7032879bc..81d7316dfb 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.7.3", + "version": "0.7.4", "private": false, "publishConfig": { "access": "public" @@ -32,7 +32,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.4.4", "@backstage/cli-common": "^0.1.2", "@backstage/config": "^0.1.5", - "@backstage/config-loader": "^0.6.4", + "@backstage/config-loader": "^0.6.5", "@hot-loader/react-dom": "^16.13.0", "@lerna/package-graph": "^4.0.0", "@lerna/project": "^4.0.0", @@ -118,12 +118,12 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.8.4", + "@backstage/backend-common": "^0.8.6", "@backstage/config": "^0.1.5", "@backstage/core-components": "^0.1.4", "@backstage/core-plugin-api": "^0.1.3", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.0", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@backstage/theme": "^0.2.8", "@types/diff": "^5.0.0", diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index e0be1eebc8..d06568bf47 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/config-loader +## 0.6.5 + +### Patch Changes + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. + ## 0.6.4 ### Patch Changes diff --git a/packages/config-loader/api-report.md b/packages/config-loader/api-report.md index ffd15b0c9a..37b9880448 100644 --- a/packages/config-loader/api-report.md +++ b/packages/config-loader/api-report.md @@ -7,6 +7,8 @@ import { AppConfig } from '@backstage/config'; import { JsonObject } from '@backstage/config'; import { JSONSchema7 } from 'json-schema'; +// Warning: (ae-missing-release-tag) "ConfigSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ConfigSchema = { process( @@ -16,12 +18,19 @@ export type ConfigSchema = { serialize(): JsonObject; }; +// Warning: (ae-forgotten-export) The symbol "CONFIG_VISIBILITIES" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ConfigVisibility" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ConfigVisibility = typeof CONFIG_VISIBILITIES[number]; +// Warning: (ae-missing-release-tag) "loadConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function loadConfig(options: LoadConfigOptions): Promise; +// Warning: (ae-missing-release-tag) "LoadConfigOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LoadConfigOptions = { configRoot: string; @@ -30,16 +39,28 @@ export type LoadConfigOptions = { experimentalEnvFunc?: EnvFunc; }; +// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "loadConfigSchema" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function loadConfigSchema(options: Options): Promise; +// Warning: (ae-missing-release-tag) "mergeConfigSchemas" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function mergeConfigSchemas(schemas: JSONSchema7[]): JSONSchema7; +// Warning: (ae-missing-release-tag) "readEnvConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readEnvConfig(env: { [name: string]: string | undefined; }): AppConfig[]; +// Warnings were encountered during analysis: +// +// src/lib/schema/types.d.ts:77:5 - (ae-forgotten-export) The symbol "ConfigProcessingOptions" needs to be exported by the entry point index.d.ts +// src/loader.d.ts:13:5 - (ae-forgotten-export) The symbol "EnvFunc" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index cff324484a..7eb0a78f3f 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": "0.6.4", + "version": "0.6.5", "private": false, "publishConfig": { "access": "public", diff --git a/packages/config/api-report.md b/packages/config/api-report.md index 0c243aab48..50d2af0f1f 100644 --- a/packages/config/api-report.md +++ b/packages/config/api-report.md @@ -3,12 +3,16 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +// Warning: (ae-missing-release-tag) "AppConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppConfig = { context: string; data: JsonObject; }; +// Warning: (ae-missing-release-tag) "Config" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Config = { has(key: string): boolean; @@ -29,6 +33,8 @@ export type Config = { getOptionalStringArray(key: string): string[] | undefined; }; +// Warning: (ae-missing-release-tag) "ConfigReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class ConfigReader implements Config { constructor( @@ -73,17 +79,25 @@ export class ConfigReader implements Config { keys(): string[]; } +// Warning: (ae-missing-release-tag) "JsonArray" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface JsonArray extends Array {} +// Warning: (ae-missing-release-tag) "JsonObject" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type JsonObject = { [key in string]?: JsonValue; }; +// Warning: (ae-missing-release-tag) "JsonPrimitive" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type JsonPrimitive = number | string | boolean | null; +// Warning: (ae-missing-release-tag) "JsonValue" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type JsonValue = JsonObject | JsonArray | JsonPrimitive; diff --git a/packages/core-app-api/api-report.md b/packages/core-app-api/api-report.md index af86f042a0..a7a3845dd7 100644 --- a/packages/core-app-api/api-report.md +++ b/packages/core-app-api/api-report.md @@ -54,6 +54,8 @@ import { StorageApi } from '@backstage/core-plugin-api'; import { StorageValueChange } from '@backstage/core-plugin-api'; import { SubRouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "AlertApiForwarder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class AlertApiForwarder implements AlertApi { // (undocumented) @@ -62,6 +64,8 @@ export class AlertApiForwarder implements AlertApi { post(alert: AlertMessage): void; } +// Warning: (ae-missing-release-tag) "ApiFactoryHolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ApiFactoryHolder = { get( @@ -77,6 +81,8 @@ export type ApiFactoryHolder = { | undefined; }; +// Warning: (ae-missing-release-tag) "ApiFactoryRegistry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class ApiFactoryRegistry implements ApiFactoryHolder { // (undocumented) @@ -93,6 +99,7 @@ export class ApiFactoryRegistry implements ApiFactoryHolder { | undefined; // (undocumented) getAllApis(): Set; + // Warning: (ae-forgotten-export) The symbol "ApiFactoryScope" needs to be exported by the entry point index.d.ts register< Api, Impl extends Api, @@ -102,6 +109,8 @@ export class ApiFactoryRegistry implements ApiFactoryHolder { >(scope: ApiFactoryScope, factory: ApiFactory): boolean; } +// Warning: (ae-missing-release-tag) "ApiProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ApiProvider: { ({ apis, children }: PropsWithChildren): JSX.Element; @@ -115,19 +124,31 @@ export const ApiProvider: { }; }; +// Warning: (ae-missing-release-tag) "ApiRegistry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class ApiRegistry implements ApiHolder { constructor(apis: Map); + // Warning: (ae-forgotten-export) The symbol "ApiRegistryBuilder" needs to be exported by the entry point index.d.ts + // // (undocumented) static builder(): ApiRegistryBuilder; + // Warning: (ae-forgotten-export) The symbol "ApiImpl" needs to be exported by the entry point index.d.ts + // // (undocumented) static from(apis: ApiImpl[]): ApiRegistry; // (undocumented) get(api: ApiRef): T | undefined; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen static with(api: ApiRef, impl: T): ApiRegistry; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen with(api: ApiRef, impl: T): ApiRegistry; } +// Warning: (ae-missing-release-tag) "ApiResolver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class ApiResolver implements ApiHolder { constructor(factories: ApiFactoryHolder); @@ -139,6 +160,8 @@ export class ApiResolver implements ApiHolder { ): void; } +// Warning: (ae-missing-release-tag) "AppComponents" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppComponents = { NotFoundErrorPage: ComponentType<{}>; @@ -149,9 +172,13 @@ export type AppComponents = { SignInPage?: ComponentType; }; +// Warning: (ae-missing-release-tag) "AppConfigLoader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AppConfigLoader = () => Promise; +// Warning: (ae-missing-release-tag) "AppContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppContext = { getPlugins(): BackstagePlugin[]; @@ -159,6 +186,8 @@ export type AppContext = { getComponents(): AppComponents; }; +// Warning: (ae-missing-release-tag) "AppOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppOptions = { apis?: Iterable; @@ -173,6 +202,11 @@ export type AppOptions = { bindRoutes?(context: { bind: AppRouteBinder }): void; }; +// Warning: (ae-forgotten-export) The symbol "PartialKeys" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "TargetRouteMap" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "KeysWithType" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "AppRouteBinder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppRouteBinder = < ExternalRoutes extends { @@ -186,6 +220,8 @@ export type AppRouteBinder = < >, ) => void; +// Warning: (ae-missing-release-tag) "AppThemeSelector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class AppThemeSelector implements AppThemeApi { constructor(themes: AppTheme[]); @@ -201,8 +237,12 @@ export class AppThemeSelector implements AppThemeApi { setActiveThemeId(themeId?: string): void; } +// Warning: (ae-missing-release-tag) "Auth0Auth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class Auth0Auth { + // Warning: (ae-forgotten-export) The symbol "OAuthApiCreateOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static create({ discoveryApi, @@ -213,6 +253,8 @@ export class Auth0Auth { }: OAuthApiCreateOptions): typeof auth0AuthApiRef.T; } +// Warning: (ae-missing-release-tag) "BackstageApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstageApp = { getPlugins(): BackstagePlugin[]; @@ -221,6 +263,8 @@ export type BackstageApp = { getRouter(): ComponentType<{}>; }; +// Warning: (ae-missing-release-tag) "BackstagePluginWithAnyOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstagePluginWithAnyOutput = Omit< BackstagePlugin, @@ -229,6 +273,8 @@ export type BackstagePluginWithAnyOutput = Omit< output(): (PluginOutput | UnknownPluginOutput)[]; }; +// Warning: (ae-missing-release-tag) "BootErrorPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BootErrorPageProps = { step: 'load-config' | 'load-chunk'; @@ -237,12 +283,19 @@ export type BootErrorPageProps = { export { ConfigReader }; +// Warning: (ae-forgotten-export) The symbol "PrivateAppImpl" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createApp(options?: AppOptions): PrivateAppImpl; +// Warning: (ae-missing-release-tag) "defaultConfigLoader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const defaultConfigLoader: AppConfigLoader; +// Warning: (ae-missing-release-tag) "ErrorAlerter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class ErrorAlerter implements ErrorApi { constructor(alertApi: AlertApi, errorApi: ErrorApi); @@ -259,6 +312,8 @@ export class ErrorAlerter implements ErrorApi { post(error: Error, context?: ErrorContext): void; } +// Warning: (ae-missing-release-tag) "ErrorApiForwarder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class ErrorApiForwarder implements ErrorApi { // (undocumented) @@ -270,6 +325,8 @@ export class ErrorApiForwarder implements ErrorApi { post(error: Error, context?: ErrorContext): void; } +// Warning: (ae-missing-release-tag) "ErrorBoundaryFallbackProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ErrorBoundaryFallbackProps = { plugin?: BackstagePlugin; @@ -277,9 +334,13 @@ export type ErrorBoundaryFallbackProps = { resetError: () => void; }; +// Warning: (ae-missing-release-tag) "FeatureFlagged" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const FeatureFlagged: (props: FeatureFlaggedProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "FeatureFlaggedProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type FeatureFlaggedProps = { children: ReactNode; @@ -292,11 +353,17 @@ export type FeatureFlaggedProps = { } ); +// Warning: (ae-forgotten-export) The symbol "FlatRoutesProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "FlatRoutes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const FlatRoutes: (props: FlatRoutesProps) => JSX.Element | null; +// Warning: (ae-missing-release-tag) "GithubAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GithubAuth implements OAuthApi, SessionApi { + // Warning: (ae-forgotten-export) The symbol "SessionManager" needs to be exported by the entry point index.d.ts constructor(sessionManager: SessionManager); // (undocumented) static create({ @@ -324,6 +391,8 @@ export class GithubAuth implements OAuthApi, SessionApi { signOut(): Promise; } +// Warning: (ae-missing-release-tag) "GithubSession" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GithubSession = { providerInfo: { @@ -335,6 +404,8 @@ export type GithubSession = { backstageIdentity: BackstageIdentity; }; +// Warning: (ae-missing-release-tag) "GitlabAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GitlabAuth { // (undocumented) @@ -347,6 +418,8 @@ export class GitlabAuth { }: OAuthApiCreateOptions): typeof gitlabAuthApiRef.T; } +// Warning: (ae-missing-release-tag) "GoogleAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GoogleAuth { // (undocumented) @@ -359,6 +432,8 @@ export class GoogleAuth { }: OAuthApiCreateOptions): typeof googleAuthApiRef.T; } +// Warning: (ae-missing-release-tag) "LocalStorageFeatureFlags" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class LocalStorageFeatureFlags implements FeatureFlagsApi { // (undocumented) @@ -371,6 +446,8 @@ export class LocalStorageFeatureFlags implements FeatureFlagsApi { save(options: FeatureFlagsSaveOptions): void; } +// Warning: (ae-missing-release-tag) "MicrosoftAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class MicrosoftAuth { // (undocumented) @@ -383,6 +460,8 @@ export class MicrosoftAuth { }: OAuthApiCreateOptions): typeof microsoftAuthApiRef.T; } +// Warning: (ae-missing-release-tag) "OAuth2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class OAuth2 implements @@ -391,7 +470,10 @@ export class OAuth2 ProfileInfoApi, BackstageIdentityApi, SessionApi { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options); + // Warning: (ae-forgotten-export) The symbol "CreateOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static create({ discoveryApi, @@ -422,6 +504,8 @@ export class OAuth2 signOut(): Promise; } +// Warning: (ae-missing-release-tag) "OAuth2Session" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type OAuth2Session = { providerInfo: { @@ -434,6 +518,8 @@ export type OAuth2Session = { backstageIdentity: BackstageIdentity; }; +// Warning: (ae-missing-release-tag) "OAuthRequestManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class OAuthRequestManager implements OAuthRequestApi { // (undocumented) @@ -442,6 +528,8 @@ export class OAuthRequestManager implements OAuthRequestApi { createAuthRequester(options: AuthRequesterOptions): AuthRequester; } +// Warning: (ae-missing-release-tag) "OktaAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class OktaAuth { // (undocumented) @@ -454,8 +542,12 @@ export class OktaAuth { }: OAuthApiCreateOptions): typeof oktaAuthApiRef.T; } +// Warning: (ae-missing-release-tag) "OneLoginAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class OneLoginAuth { + // Warning: (ae-forgotten-export) The symbol "CreateOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static create({ discoveryApi, @@ -465,10 +557,15 @@ export class OneLoginAuth { }: CreateOptions_2): typeof oneloginAuthApiRef.T; } +// Warning: (ae-missing-release-tag) "SamlAuth" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class SamlAuth implements ProfileInfoApi, BackstageIdentityApi, SessionApi { + // Warning: (ae-forgotten-export) The symbol "SamlSession" needs to be exported by the entry point index.d.ts constructor(sessionManager: SessionManager); + // Warning: (ae-forgotten-export) The symbol "AuthApiCreateOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static create({ discoveryApi, @@ -489,11 +586,15 @@ export class SamlAuth signOut(): Promise; } +// Warning: (ae-missing-release-tag) "SignInPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SignInPageProps = { onResult(result: SignInResult): void; }; +// Warning: (ae-missing-release-tag) "SignInResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SignInResult = { userId: string; @@ -502,11 +603,15 @@ export type SignInResult = { signOut?: () => Promise; }; +// Warning: (ae-missing-release-tag) "UnhandledErrorForwarder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class UnhandledErrorForwarder { static forward(errorApi: ErrorApi, errorContext: ErrorContext): void; } +// Warning: (ae-missing-release-tag) "UrlPatternDiscovery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class UrlPatternDiscovery implements DiscoveryApi { static compile(pattern: string): UrlPatternDiscovery; @@ -514,9 +619,13 @@ export class UrlPatternDiscovery implements DiscoveryApi { getBaseUrl(pluginId: string): Promise; } +// Warning: (ae-missing-release-tag) "WebStorage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class WebStorage implements StorageApi { constructor(namespace: string, errorApi: ErrorApi); + // Warning: (ae-forgotten-export) The symbol "CreateStorageApiOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static create(options: CreateStorageApiOptions): WebStorage; // (undocumented) @@ -531,5 +640,11 @@ export class WebStorage implements StorageApi { set(key: string, data: T): Promise; } +// Warnings were encountered during analysis: +// +// src/apis/system/ApiProvider.d.ts:9:5 - (ae-forgotten-export) The symbol "ApiProviderProps" needs to be exported by the entry point index.d.ts +// src/app/types.d.ts:88:5 - (ae-forgotten-export) The symbol "UnknownPluginOutput" needs to be exported by the entry point index.d.ts +// src/app/types.d.ts:99:5 - (ae-forgotten-export) The symbol "AppIcons" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/core-components/api-report.md b/packages/core-components/api-report.md index 3d8e60d4fb..e915e004ee 100644 --- a/packages/core-components/api-report.md +++ b/packages/core-components/api-report.md @@ -47,9 +47,13 @@ import { Theme } from '@material-ui/core'; import { TooltipProps } from '@material-ui/core'; import { WithStyles } from '@material-ui/core'; +// Warning: (ae-missing-release-tag) "AlertDisplay" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const AlertDisplay: () => JSX.Element | null; +// Warning: (ae-missing-release-tag) "Alignment" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) enum Alignment { // (undocumented) @@ -62,6 +66,9 @@ enum Alignment { UP_RIGHT = 'UR', } +// Warning: (ae-forgotten-export) The symbol "AvatarProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Avatar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Avatar: ({ displayName, @@ -69,12 +76,20 @@ export const Avatar: ({ customStyles, }: AvatarProps) => 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) "Breadcrumbs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Breadcrumbs: ({ children, ...props }: Props_25) => JSX.Element; +// Warning: (ae-missing-release-tag) "BrokenImageIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const BrokenImageIcon: IconComponent; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Button" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const Button: React_2.ForwardRefExoticComponent< Pick< @@ -384,18 +399,28 @@ export const Button: React_2.ForwardRefExoticComponent< React_2.RefAttributes >; +// Warning: (ae-forgotten-export) The symbol "CardTabProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "CardTab" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CardTab: ({ children, ...props }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "CatalogIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogIcon: IconComponent; +// Warning: (ae-missing-release-tag) "ChatIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ChatIcon: IconComponent; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "CodeSnippet" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CodeSnippet: ({ text, @@ -406,6 +431,9 @@ export const CodeSnippet: ({ customStyle, }: Props_2) => 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) "Content" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Content: ({ className, @@ -415,6 +443,9 @@ export const Content: ({ ...props }: PropsWithChildren) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "ContentHeaderProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ContentHeader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ContentHeader: ({ description, @@ -424,6 +455,8 @@ export const ContentHeader: ({ textAlign, }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "CopyTextButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CopyTextButton: { (props: Props_3): JSX.Element; @@ -434,9 +467,14 @@ export const CopyTextButton: { }; }; +// Warning: (ae-missing-release-tag) "DashboardIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DashboardIcon: IconComponent; +// Warning: (ae-forgotten-export) The symbol "CustomType" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "DependencyEdge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type DependencyEdge = T & { from: string; @@ -444,6 +482,9 @@ type DependencyEdge = T & { label?: string; }; +// Warning: (ae-forgotten-export) The symbol "DependencyGraphProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "DependencyGraph" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function DependencyGraph({ edges, @@ -486,11 +527,15 @@ declare namespace DependencyGraphTypes { } export { DependencyGraphTypes }; +// Warning: (ae-missing-release-tag) "DependencyNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type DependencyNode = T & { id: string; }; +// Warning: (ae-missing-release-tag) "Direction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) enum Direction { // (undocumented) @@ -503,6 +548,9 @@ enum Direction { TOP_BOTTOM = 'TB', } +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "DismissableBanner" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DismissableBanner: ({ variant, @@ -511,9 +559,13 @@ export const DismissableBanner: ({ fixed, }: Props_4) => JSX.Element; +// Warning: (ae-missing-release-tag) "DocsIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DocsIcon: IconComponent; +// Warning: (ae-missing-release-tag) "EdgeProperties" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type EdgeProperties = { label?: string; @@ -526,9 +578,14 @@ type EdgeProperties = { [customKey: string]: any; }; +// Warning: (ae-missing-release-tag) "EmailIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EmailIcon: IconComponent; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmptyState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EmptyState: ({ title, @@ -537,15 +594,23 @@ export const EmptyState: ({ action, }: Props_5) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "State" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ErrorBoundary" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ErrorBoundary: ComponentClass; +// Warning: (ae-missing-release-tag) "ErrorBoundaryProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ErrorBoundaryProps = { slackChannel?: string | SlackChannel; onError?: (error: Error, errorInfo: string) => null; }; +// Warning: (ae-forgotten-export) The symbol "IErrorPageProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ErrorPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ErrorPage: ({ status, @@ -553,6 +618,8 @@ export const ErrorPage: ({ additionalInfo, }: IErrorPageProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "ErrorPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ErrorPanel: ({ title, @@ -561,6 +628,8 @@ export const ErrorPanel: ({ children, }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "ErrorPanelProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ErrorPanelProps = { error: Error; @@ -568,6 +637,9 @@ export type ErrorPanelProps = { title?: string; }; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "FeatureCalloutCircular" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const FeatureCalloutCircular: ({ featureId, @@ -576,26 +648,43 @@ export const FeatureCalloutCircular: ({ children, }: PropsWithChildren) => 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) "Gauge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Gauge: (props: Props_14) => 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) "GaugeCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GaugeCard: (props: Props_13) => JSX.Element; +// Warning: (ae-missing-release-tag) "GitHubIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GitHubIcon: IconComponent; +// Warning: (ae-missing-release-tag) "GraphEdge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type GraphEdge = DependencyEdge & dagre_2.GraphEdge & EdgeProperties; +// Warning: (ae-missing-release-tag) "GraphNode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type GraphNode = dagre_2.Node>; +// Warning: (ae-missing-release-tag) "GroupIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GroupIcon: IconComponent; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Header" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Header: ({ children, @@ -608,9 +697,15 @@ export const Header: ({ typeLink, }: PropsWithChildren) => 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) "HeaderIconLinkRow" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const HeaderIconLinkRow: ({ links }: Props_8) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "HeaderLabelProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "HeaderLabel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const HeaderLabel: ({ label, @@ -618,6 +713,9 @@ export const HeaderLabel: ({ url, }: HeaderLabelProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "HeaderTabsProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "HeaderTabs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const HeaderTabs: ({ tabs, @@ -625,17 +723,26 @@ export const HeaderTabs: ({ selectedIndex, }: HeaderTabsProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "HelpIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const HelpIcon: IconComponent; +// Warning: (ae-missing-release-tag) "HomepageTimer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const HomepageTimer: () => JSX.Element | null; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "HorizontalScrollGrid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const HorizontalScrollGrid: ( props: PropsWithChildren, ) => JSX.Element; +// Warning: (ae-missing-release-tag) "IconLinkVerticalProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type IconLinkVerticalProps = { color?: 'primary' | 'secondary'; @@ -647,6 +754,9 @@ export type IconLinkVerticalProps = { title?: string; }; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "InfoCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const InfoCard: ({ title, @@ -669,12 +779,22 @@ export const InfoCard: ({ titleTypographyProps, }: Props_20) => JSX.Element; +// Warning: (ae-missing-release-tag) "InfoCardVariants" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem'; +// Warning: (ae-forgotten-export) The symbol "IntroCardProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "IntroCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const IntroCard: (props: IntroCardProps) => JSX.Element; +// Warning: (tsdoc-malformed-html-name) Invalid HTML element: Expecting an HTML name +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// Warning: (ae-forgotten-export) The symbol "ItemCardProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ItemCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated export const ItemCard: ({ description, @@ -687,17 +807,39 @@ export const ItemCard: ({ href, }: ItemCardProps) => JSX.Element; +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-html-tag-missing-string) The HTML element has an invalid attribute: Expecting an HTML string starting with a single-quote or double-quote character +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (ae-missing-release-tag) "ItemCardGrid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ItemCardGrid: (props: ItemCardGridProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "styles" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ItemCardGridProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ItemCardGridProps = Partial> & { children?: React_2.ReactNode; }; +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-html-tag-missing-string) The HTML element has an invalid attribute: Expecting an HTML string starting with a single-quote or double-quote character +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (ae-missing-release-tag) "ItemCardHeader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ItemCardHeader: (props: ItemCardHeaderProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "styles" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ItemCardHeaderProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ItemCardHeaderProps = Partial> & { title?: React_2.ReactNode; @@ -705,6 +847,8 @@ export type ItemCardHeaderProps = Partial> & { children?: React_2.ReactNode; }; +// Warning: (ae-missing-release-tag) "LabelPosition" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) enum LabelPosition { // (undocumented) @@ -715,12 +859,20 @@ enum LabelPosition { RIGHT = 'r', } +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Lifecycle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Lifecycle: (props: Props_10) => 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) "LinearGauge" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const LinearGauge: ({ value }: Props_15) => JSX.Element | null; +// Warning: (ae-missing-release-tag) "Link" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const Link: React_2.ForwardRefExoticComponent< Pick< @@ -1008,37 +1160,57 @@ export const Link: React_2.ForwardRefExoticComponent< React_2.RefAttributes >; +// Warning: (ae-missing-release-tag) "LinkProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LinkProps = LinkProps_2 & LinkProps_3 & { component?: ElementType; }; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "MarkdownContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const MarkdownContent: ({ content, dialect }: Props_11) => 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) "MissingAnnotationEmptyState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const MissingAnnotationEmptyState: ({ annotation, }: Props_6) => JSX.Element; +// Warning: (ae-missing-release-tag) "OAuthRequestDialog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const OAuthRequestDialog: () => 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) "OverflowTooltip" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const OverflowTooltip: (props: Props_12) => 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) "Page" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Page: ({ themeId, children, }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "Progress" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Progress: ( props: PropsWithChildren, ) => JSX.Element; +// Warning: (ae-missing-release-tag) "Ranker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) enum Ranker { // (undocumented) @@ -1049,22 +1221,32 @@ enum Ranker { TIGHT_TREE = 'tight-tree', } +// Warning: (ae-missing-release-tag) "RenderLabelFunction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type RenderLabelFunction = (props: RenderLabelProps) => React.ReactNode; +// Warning: (ae-missing-release-tag) "RenderLabelProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type RenderLabelProps = { edge: DependencyEdge; }; +// Warning: (ae-missing-release-tag) "RenderNodeFunction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type RenderNodeFunction = (props: RenderNodeProps) => React.ReactNode; +// Warning: (ae-missing-release-tag) "RenderNodeProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) type RenderNodeProps = { node: DependencyNode; }; +// Warning: (ae-missing-release-tag) "ResponseErrorPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const ResponseErrorPanel: ({ title, @@ -1072,9 +1254,14 @@ export const ResponseErrorPanel: ({ defaultExpanded, }: ErrorPanelProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "RoutedTabs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RoutedTabs: ({ routes }: { routes: SubRoute_2[] }) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "SelectProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SelectComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Select: ({ multiple, @@ -1086,6 +1273,9 @@ export const Select: ({ triggerReset, }: SelectProps) => 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) "Sidebar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Sidebar: ({ openDelayMs, @@ -1093,10 +1283,14 @@ export const Sidebar: ({ children, }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "SIDEBAR_INTRO_LOCAL_STORAGE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SIDEBAR_INTRO_LOCAL_STORAGE = '@backstage/core/sidebar-intro-dismissed'; +// Warning: (ae-missing-release-tag) "sidebarConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const sidebarConfig: { drawerWidthClosed: number; @@ -1113,14 +1307,20 @@ export const sidebarConfig: { userBadgeDiameter: number; }; +// Warning: (ae-missing-release-tag) "SidebarContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarContext: Context; +// Warning: (ae-missing-release-tag) "SidebarContextType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SidebarContextType = { isOpen: boolean; }; +// Warning: (ae-missing-release-tag) "SidebarDivider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarDivider: React_2.ComponentType< Pick< @@ -1388,26 +1588,39 @@ export const SidebarDivider: React_2.ComponentType< } >; +// Warning: (ae-missing-release-tag) "SidebarIntro" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarIntro: () => JSX.Element | null; +// Warning: (ae-forgotten-export) The symbol "SidebarItemProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SidebarItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarItem: React_2.ForwardRefExoticComponent< SidebarItemProps & React_2.RefAttributes >; +// Warning: (ae-missing-release-tag) "SidebarPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarPage: (props: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "SidebarPinStateContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarPinStateContext: React_2.Context; +// Warning: (ae-missing-release-tag) "SidebarPinStateContextType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SidebarPinStateContextType = { isPinned: boolean; toggleSidebarPinState: () => any; }; +// Warning: (ae-missing-release-tag) "SidebarScrollWrapper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarScrollWrapper: React_2.ComponentType< Pick< @@ -1675,11 +1888,16 @@ export const SidebarScrollWrapper: React_2.ComponentType< } >; +// Warning: (ae-forgotten-export) The symbol "SidebarSearchFieldProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SidebarSearchField" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarSearchField: ( props: SidebarSearchFieldProps, ) => JSX.Element; +// Warning: (ae-missing-release-tag) "SidebarSpace" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarSpace: React_2.ComponentType< Pick< @@ -1947,6 +2165,8 @@ export const SidebarSpace: React_2.ComponentType< } >; +// Warning: (ae-missing-release-tag) "SidebarSpacer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarSpacer: React_2.ComponentType< Pick< @@ -2214,9 +2434,14 @@ export const SidebarSpacer: React_2.ComponentType< } >; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SignInPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SignInPage: (props: Props_23) => JSX.Element; +// Warning: (ae-missing-release-tag) "SignInProviderConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SignInProviderConfig = { id: string; @@ -2225,6 +2450,9 @@ export type SignInProviderConfig = { apiRef: ApiRef; }; +// Warning: (ae-forgotten-export) The symbol "StepperProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SimpleStepper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SimpleStepper: ({ children, @@ -2233,6 +2461,9 @@ export const SimpleStepper: ({ activeStep, }: PropsWithChildren) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "StepProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SimpleStepperStep" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SimpleStepperStep: ({ title, @@ -2242,24 +2473,39 @@ export const SimpleStepperStep: ({ ...muiProps }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "StatusAborted" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StatusAborted: (props: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "StatusError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StatusError: (props: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "StatusOK" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StatusOK: (props: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "StatusPending" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StatusPending: (props: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "StatusRunning" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StatusRunning: (props: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "StatusWarning" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StatusWarning: (props: PropsWithChildren<{}>) => 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) "StructuredMetadataTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StructuredMetadataTable: ({ metadata, @@ -2267,24 +2513,34 @@ export const StructuredMetadataTable: ({ options, }: Props_16) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "SubvalueCellProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SubvalueCell" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SubvalueCell: ({ value, subvalue, }: SubvalueCellProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "SupportButtonProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SupportButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SupportButton: ({ title, children, }: SupportButtonProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "SupportConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SupportConfig = { url: string; items: SupportItem[]; }; +// Warning: (ae-missing-release-tag) "SupportItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SupportItem = { title: string; @@ -2292,12 +2548,16 @@ export type SupportItem = { links: SupportItemLink[]; }; +// Warning: (ae-missing-release-tag) "SupportItemLink" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SupportItemLink = { url: string; title: string; }; +// Warning: (ae-missing-release-tag) "Tab" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Tab = { id: string; @@ -2310,6 +2570,9 @@ export type Tab = { >; }; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "TabbedCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const TabbedCard: ({ slackChannel, @@ -2321,12 +2584,16 @@ export const TabbedCard: ({ onChange, }: PropsWithChildren) => JSX.Element; +// Warning: (ae-missing-release-tag) "TabbedLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const TabbedLayout: { ({ children }: PropsWithChildren<{}>): JSX.Element; Route: (props: SubRoute) => null; }; +// Warning: (ae-missing-release-tag) "Table" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function Table({ columns, @@ -2340,6 +2607,8 @@ export function Table({ ...props }: TableProps): JSX.Element; +// Warning: (ae-missing-release-tag) "TableColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TableColumn extends Column { // (undocumented) @@ -2348,12 +2617,16 @@ export interface TableColumn extends Column { width?: string; } +// Warning: (ae-missing-release-tag) "TableFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type TableFilter = { column: string; type: 'select' | 'multiple-select' | 'checkbox-tree'; }; +// Warning: (ae-missing-release-tag) "TableProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TableProps extends MaterialTableProps { @@ -2371,6 +2644,8 @@ export interface TableProps subtitle?: string; } +// 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 type TableState = { search?: string; @@ -2378,9 +2653,14 @@ export type TableState = { filters?: SelectedFilters; }; +// Warning: (ae-forgotten-export) The symbol "TabsProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Tabs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Tabs: ({ tabs }: TabsProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "TrendLine" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const TrendLine: ( props: SparklinesProps & @@ -2389,23 +2669,55 @@ export const TrendLine: ( }, ) => JSX.Element | null; +// Warning: (ae-forgotten-export) The symbol "SetQueryParams" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "useQueryParamState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useQueryParamState( stateName: string, debounceTime?: number, ): [T | undefined, SetQueryParams]; +// Warning: (ae-missing-release-tag) "UserIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const UserIcon: IconComponent; +// Warning: (ae-missing-release-tag) "useSupportConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useSupportConfig(): SupportConfig; +// Warning: (ae-missing-release-tag) "WarningIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const WarningIcon: IconComponent; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "WarningPanel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const WarningPanel: (props: Props_17) => JSX.Element; +// Warnings were encountered during analysis: +// +// src/components/CopyTextButton/CopyTextButton.d.ts:24:5 - (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// src/components/TabbedLayout/RoutedTabs.d.ts:9:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts +// src/components/TabbedLayout/TabbedLayout.d.ts:29:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts +// src/components/Table/Table.d.ts:15:5 - (ae-forgotten-export) The symbol "SelectedFilters" needs to be exported by the entry point index.d.ts +// src/layout/ErrorBoundary/ErrorBoundary.d.ts:7:5 - (ae-forgotten-export) The symbol "SlackChannel" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/core-plugin-api/api-report.md b/packages/core-plugin-api/api-report.md index f3cb134fe1..f02d3ae140 100644 --- a/packages/core-plugin-api/api-report.md +++ b/packages/core-plugin-api/api-report.md @@ -13,21 +13,29 @@ import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { SvgIconProps } from '@material-ui/core'; +// Warning: (ae-missing-release-tag) "AlertApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AlertApi = { post(alert: AlertMessage): void; alert$(): Observable; }; +// Warning: (ae-missing-release-tag) "alertApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const alertApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "AlertMessage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AlertMessage = { message: string; severity?: 'success' | 'info' | 'warning' | 'error'; }; +// Warning: (ae-missing-release-tag) "AnyApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AnyApiFactory = ApiFactory< unknown, @@ -37,9 +45,13 @@ export type AnyApiFactory = ApiFactory< } >; +// Warning: (ae-missing-release-tag) "AnyApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AnyApiRef = ApiRef; +// Warning: (ae-missing-release-tag) "ApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ApiFactory< Api, @@ -53,17 +65,23 @@ export type ApiFactory< factory(deps: Deps): Impl; }; +// Warning: (ae-missing-release-tag) "ApiHolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ApiHolder = { get(api: ApiRef): T | undefined; }; +// Warning: (ae-missing-release-tag) "ApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ApiRef = { id: string; T: T; }; +// Warning: (ae-missing-release-tag) "ApiRefsToTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ApiRefsToTypes< T extends { @@ -73,9 +91,13 @@ export type ApiRefsToTypes< [key in keyof T]: ApiRefType; }; +// Warning: (ae-missing-release-tag) "ApiRefType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ApiRefType = T extends ApiRef ? U : never; +// Warning: (ae-missing-release-tag) "AppComponents" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppComponents = { NotFoundErrorPage: ComponentType<{}>; @@ -86,6 +108,8 @@ export type AppComponents = { SignInPage?: ComponentType; }; +// Warning: (ae-missing-release-tag) "AppContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AppContext = { getPlugins(): BackstagePlugin[]; @@ -93,6 +117,8 @@ export type AppContext = { getComponents(): AppComponents; }; +// Warning: (ae-missing-release-tag) "AppTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AppTheme = { id: string; @@ -102,6 +128,8 @@ export type AppTheme = { icon?: React.ReactElement; }; +// Warning: (ae-missing-release-tag) "AppThemeApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AppThemeApi = { getInstalledThemes(): AppTheme[]; @@ -110,9 +138,13 @@ export type AppThemeApi = { setActiveThemeId(themeId?: string): void; }; +// Warning: (ae-missing-release-tag) "appThemeApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const appThemeApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "attachComponentData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function attachComponentData

( component: ComponentType

, @@ -120,40 +152,55 @@ export function attachComponentData

( data: unknown, ): void; +// Warning: (ae-missing-release-tag) "auth0AuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const auth0AuthApiRef: ApiRef< OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi >; +// Warning: (ae-missing-release-tag) "AuthProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AuthProvider = { title: string; icon: IconComponent; }; +// Warning: (ae-missing-release-tag) "AuthRequester" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AuthRequester = ( scopes: Set, ) => Promise; +// Warning: (ae-missing-release-tag) "AuthRequesterOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AuthRequesterOptions = { provider: AuthProvider; onAuthRequest(scopes: Set): Promise; }; +// Warning: (ae-missing-release-tag) "AuthRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AuthRequestOptions = { optional?: boolean; instantPopup?: boolean; }; +// Warning: (ae-missing-release-tag) "BackstageIdentity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstageIdentity = { id: string; idToken: string; }; +// Warning: (tsdoc-undefined-tag) The TSDoc tag "@IdentityApi" is not defined in this configuration +// Warning: (ae-missing-release-tag) "BackstageIdentityApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type BackstageIdentityApi = { getBackstageIdentity( @@ -161,6 +208,10 @@ export type BackstageIdentityApi = { ): Promise; }; +// Warning: (ae-forgotten-export) The symbol "AnyRoutes" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "AnyExternalRoutes" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "BackstagePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstagePlugin< Routes extends AnyRoutes = {}, @@ -174,18 +225,27 @@ export type BackstagePlugin< externalRoutes: ExternalRoutes; }; +// Warning: (ae-missing-release-tag) "BootErrorPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BootErrorPageProps = { step: 'load-config' | 'load-chunk'; error: Error; }; +// Warning: (ae-missing-release-tag) "ConfigApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ConfigApi = Config; +// Warning: (ae-missing-release-tag) "configApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const configApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "createApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "createApiFactory" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createApiFactory< Api, @@ -201,14 +261,22 @@ export function createApiFactory( instance: Impl, ): ApiFactory; +// Warning: (ae-forgotten-export) The symbol "ApiRefConfig" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createApiRef(config: ApiRefConfig): ApiRef; +// Warning: (ae-missing-release-tag) "createComponentExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createComponentExtension< T extends (props: any) => JSX.Element | null >(options: { component: ComponentLoader }): Extension; +// Warning: (ae-forgotten-export) The symbol "OptionalParams" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createExternalRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createExternalRouteRef< Params extends { @@ -222,6 +290,8 @@ export function createExternalRouteRef< optional?: Optional; }): ExternalRouteRef, Optional>; +// Warning: (ae-missing-release-tag) "createPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createPlugin< Routes extends AnyRoutes = {}, @@ -230,6 +300,8 @@ export function createPlugin< config: PluginConfig, ): BackstagePlugin; +// Warning: (ae-missing-release-tag) "createReactExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createReactExtension< T extends (props: any) => JSX.Element | null @@ -238,11 +310,15 @@ export function createReactExtension< data?: Record; }): Extension; +// Warning: (ae-missing-release-tag) "createRoutableExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createRoutableExtension< T extends (props: any) => JSX.Element | null >(options: { component: () => Promise; mountPoint: RouteRef }): Extension; +// Warning: (ae-missing-release-tag) "createRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createRouteRef< Params extends { @@ -257,6 +333,11 @@ export function createRouteRef< title?: string; }): RouteRef>; +// Warning: (ae-forgotten-export) The symbol "AnyParams" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "MakeSubRouteRef" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "PathParams" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createSubRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createSubRouteRef< Path extends string, @@ -267,14 +348,20 @@ export function createSubRouteRef< parent: RouteRef; }): MakeSubRouteRef, ParentParams>; +// Warning: (ae-missing-release-tag) "DiscoveryApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type DiscoveryApi = { getBaseUrl(pluginId: string): Promise; }; +// Warning: (ae-missing-release-tag) "discoveryApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const discoveryApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "ElementCollection" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface ElementCollection { findComponentData(query: { key: string }): T[]; @@ -289,6 +376,8 @@ export interface ElementCollection { }): ElementCollection; } +// Warning: (ae-missing-release-tag) "ErrorApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ErrorApi = { post(error: Error_2, context?: ErrorContext): void; @@ -298,9 +387,13 @@ export type ErrorApi = { }>; }; +// Warning: (ae-missing-release-tag) "errorApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const errorApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "ErrorBoundaryFallbackProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ErrorBoundaryFallbackProps = { plugin?: BackstagePlugin; @@ -308,16 +401,22 @@ export type ErrorBoundaryFallbackProps = { resetError: () => void; }; +// Warning: (ae-missing-release-tag) "ErrorContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ErrorContext = { hidden?: boolean; }; +// Warning: (ae-missing-release-tag) "Extension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Extension = { expose(plugin: BackstagePlugin): T; }; +// Warning: (ae-missing-release-tag) "ExternalRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ExternalRouteRef< Params extends AnyParams = any, @@ -328,18 +427,24 @@ export type ExternalRouteRef< optional?: Optional; }; +// Warning: (ae-missing-release-tag) "FeatureFlag" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type FeatureFlag = { name: string; pluginId: string; }; +// Warning: (ae-missing-release-tag) "FeatureFlagOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type FeatureFlagOutput = { type: 'feature-flag'; name: string; }; +// Warning: (ae-missing-release-tag) "FeatureFlagsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface FeatureFlagsApi { getRegisteredFlags(): FeatureFlag[]; @@ -348,20 +453,28 @@ export interface FeatureFlagsApi { save(options: FeatureFlagsSaveOptions): void; } +// Warning: (ae-missing-release-tag) "featureFlagsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const featureFlagsApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "FeatureFlagsHooks" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type FeatureFlagsHooks = { register(name: string): void; }; +// Warning: (ae-missing-release-tag) "FeatureFlagsSaveOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type FeatureFlagsSaveOptions = { states: Record; merge?: boolean; }; +// Warning: (ae-missing-release-tag) "FeatureFlagState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export enum FeatureFlagState { // (undocumented) @@ -370,22 +483,30 @@ export enum FeatureFlagState { None = 0, } +// Warning: (ae-missing-release-tag) "getComponentData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getComponentData( node: ReactNode, type: string, ): T | undefined; +// Warning: (ae-missing-release-tag) "githubAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const githubAuthApiRef: ApiRef< OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi >; +// Warning: (ae-missing-release-tag) "gitlabAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const gitlabAuthApiRef: ApiRef< OAuthApi & ProfileInfoApi & BackstageIdentityApi & SessionApi >; +// Warning: (ae-missing-release-tag) "googleAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const googleAuthApiRef: ApiRef< OAuthApi & @@ -395,11 +516,15 @@ export const googleAuthApiRef: ApiRef< SessionApi >; +// Warning: (ae-missing-release-tag) "IconComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type IconComponent = ComponentType<{ fontSize?: 'default' | 'small' | 'large'; }>; +// Warning: (ae-missing-release-tag) "IdentityApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type IdentityApi = { getUserId(): string; @@ -408,9 +533,13 @@ export type IdentityApi = { signOut(): Promise; }; +// Warning: (ae-missing-release-tag) "identityApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const identityApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "microsoftAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const microsoftAuthApiRef: ApiRef< OAuthApi & @@ -420,6 +549,8 @@ export const microsoftAuthApiRef: ApiRef< SessionApi >; +// Warning: (ae-missing-release-tag) "oauth2ApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const oauth2ApiRef: ApiRef< OAuthApi & @@ -429,6 +560,8 @@ export const oauth2ApiRef: ApiRef< SessionApi >; +// Warning: (ae-missing-release-tag) "OAuthApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type OAuthApi = { getAccessToken( @@ -437,6 +570,8 @@ export type OAuthApi = { ): Promise; }; +// Warning: (ae-missing-release-tag) "OAuthRequestApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type OAuthRequestApi = { createAuthRequester( @@ -445,12 +580,18 @@ export type OAuthRequestApi = { authRequest$(): Observable; }; +// Warning: (ae-missing-release-tag) "oauthRequestApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const oauthRequestApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "OAuthScope" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type OAuthScope = string | string[]; +// Warning: (ae-missing-release-tag) "Observable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type Observable = { [Symbol.observable](): Observable; @@ -462,6 +603,8 @@ export type Observable = { ): Subscription; }; +// Warning: (ae-missing-release-tag) "Observer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type Observer = { next?(value: T): void; @@ -469,6 +612,8 @@ export type Observer = { complete?(): void; }; +// Warning: (ae-missing-release-tag) "oidcAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const oidcAuthApiRef: ApiRef< OAuthApi & @@ -478,6 +623,8 @@ export const oidcAuthApiRef: ApiRef< SessionApi >; +// Warning: (ae-missing-release-tag) "oktaAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const oktaAuthApiRef: ApiRef< OAuthApi & @@ -487,6 +634,8 @@ export const oktaAuthApiRef: ApiRef< SessionApi >; +// Warning: (ae-missing-release-tag) "oneloginAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const oneloginAuthApiRef: ApiRef< OAuthApi & @@ -496,11 +645,15 @@ export const oneloginAuthApiRef: ApiRef< SessionApi >; +// Warning: (ae-missing-release-tag) "OpenIdConnectApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type OpenIdConnectApi = { getIdToken(options?: AuthRequestOptions): Promise; }; +// Warning: (ae-missing-release-tag) "PendingAuthRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type PendingAuthRequest = { provider: AuthProvider; @@ -508,6 +661,8 @@ export type PendingAuthRequest = { trigger(): Promise; }; +// Warning: (ae-missing-release-tag) "PluginConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PluginConfig< Routes extends AnyRoutes, @@ -520,14 +675,20 @@ export type PluginConfig< externalRoutes?: ExternalRoutes; }; +// Warning: (ae-missing-release-tag) "PluginHooks" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PluginHooks = { featureFlags: FeatureFlagsHooks; }; +// Warning: (ae-missing-release-tag) "PluginOutput" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PluginOutput = FeatureFlagOutput; +// Warning: (ae-missing-release-tag) "ProfileInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ProfileInfo = { email?: string; @@ -535,19 +696,27 @@ export type ProfileInfo = { picture?: string; }; +// Warning: (ae-missing-release-tag) "ProfileInfoApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ProfileInfoApi = { getProfile(options?: AuthRequestOptions): Promise; }; +// Warning: (ae-missing-release-tag) "RouteOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type RouteOptions = { exact?: boolean; }; +// Warning: (ae-missing-release-tag) "RoutePath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type RoutePath = string; +// Warning: (ae-missing-release-tag) "RouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type RouteRef = { readonly [routeRefType]: 'absolute'; @@ -557,11 +726,15 @@ export type RouteRef = { title?: string; }; +// Warning: (ae-missing-release-tag) "samlAuthApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const samlAuthApiRef: ApiRef< ProfileInfoApi & BackstageIdentityApi & SessionApi >; +// Warning: (ae-missing-release-tag) "SessionApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type SessionApi = { signIn(): Promise; @@ -569,6 +742,8 @@ export type SessionApi = { sessionState$(): Observable; }; +// Warning: (ae-missing-release-tag) "SessionState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export enum SessionState { // (undocumented) @@ -577,11 +752,15 @@ export enum SessionState { SignedOut = 'SignedOut', } +// Warning: (ae-missing-release-tag) "SignInPageProps" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SignInPageProps = { onResult(result: SignInResult): void; }; +// Warning: (ae-missing-release-tag) "SignInResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SignInResult = { userId: string; @@ -590,24 +769,45 @@ export type SignInResult = { signOut?: () => Promise; }; +// Warning: (ae-missing-release-tag) "StorageApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface StorageApi { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' forBucket(name: string): StorageApi; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration get(key: string): T | undefined; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' observe$(key: string): Observable>; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' remove(key: string): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' set(key: string, data: any): Promise; } +// Warning: (ae-missing-release-tag) "storageApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const storageApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "StorageValueChange" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type StorageValueChange = { key: string; newValue?: T; }; +// Warning: (ae-missing-release-tag) "SubRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SubRouteRef = { readonly [routeRefType]: 'sub'; @@ -616,26 +816,38 @@ export type SubRouteRef = { params: ParamKeys; }; +// Warning: (ae-missing-release-tag) "Subscription" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type Subscription = { unsubscribe(): void; readonly closed: boolean; }; +// Warning: (ae-missing-release-tag) "TypesToApiRefs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type TypesToApiRefs = { [key in keyof T]: ApiRef; }; +// Warning: (ae-missing-release-tag) "useApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useApi(apiRef: ApiRef): T; +// Warning: (ae-missing-release-tag) "useApiHolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useApiHolder(): ApiHolder; +// Warning: (ae-missing-release-tag) "useApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const useApp: () => AppContext; +// Warning: (ae-missing-release-tag) "useElementFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function useElementFilter( node: ReactNode, @@ -643,9 +855,15 @@ export function useElementFilter( dependencies?: any[], ): T; +// Warning: (ae-missing-release-tag) "UserFlags" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type UserFlags = {}; +// Warning: (ae-forgotten-export) The symbol "RouteFunc" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "useRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "useRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useRouteRef( routeRef: ExternalRouteRef, @@ -656,11 +874,15 @@ export function useRouteRef( routeRef: RouteRef | SubRouteRef, ): RouteFunc; +// Warning: (ae-missing-release-tag) "useRouteRefParams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useRouteRefParams( _routeRef: RouteRef | SubRouteRef, ): Params; +// Warning: (ae-missing-release-tag) "withApis" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function withApis( apis: TypesToApiRefs, @@ -671,5 +893,17 @@ export function withApis( displayName: string; }; +// Warnings were encountered during analysis: +// +// src/apis/definitions/ErrorApi.d.ts:37:5 - (ae-forgotten-export) The symbol "Error" needs to be exported by the entry point index.d.ts +// src/apis/definitions/auth.d.ts:29:8 - (tsdoc-undefined-tag) The TSDoc tag "@default" is not defined in this configuration +// src/apis/definitions/auth.d.ts:38:8 - (tsdoc-undefined-tag) The TSDoc tag "@default" is not defined in this configuration +// src/apis/definitions/auth.d.ts:96:68 - (tsdoc-undefined-tag) The TSDoc tag "@AuthRequestOptions" is not defined in this configuration +// src/apis/definitions/auth.d.ts:110:16 - (tsdoc-undefined-tag) The TSDoc tag "@IdentityApi" is not defined in this configuration +// src/apis/definitions/auth.d.ts:113:68 - (tsdoc-undefined-tag) The TSDoc tag "@AuthRequestOptions" is not defined in this configuration +// src/extensions/extensions.d.ts:14:5 - (ae-forgotten-export) The symbol "ComponentLoader" needs to be exported by the entry point index.d.ts +// src/routing/RouteRef.d.ts:34:5 - (ae-forgotten-export) The symbol "OldIconComponent" needs to be exported by the entry point index.d.ts +// src/routing/types.d.ts:30:5 - (ae-forgotten-export) The symbol "ParamKeys" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 91863f51d7..86a7c3e3fe 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/create-app +## 0.3.31 + +### Patch Changes + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. + ## 0.3.30 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index b3f587ac32..52fa3f7237 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "Create app package for Backstage", - "version": "0.3.30", + "version": "0.3.31", "private": false, "publishConfig": { "access": "public" diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 9cd431fba8..af3a283a04 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/dev-utils +## 0.2.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.1 ### Patch Changes diff --git a/packages/dev-utils/api-report.md b/packages/dev-utils/api-report.md index 18bee415ff..6790992ecf 100644 --- a/packages/dev-utils/api-report.md +++ b/packages/dev-utils/api-report.md @@ -13,9 +13,14 @@ import { GridProps } from '@material-ui/core'; import { IconComponent } from '@backstage/core-plugin-api'; import { ReactNode } from 'react'; +// Warning: (ae-forgotten-export) The symbol "DevAppBuilder" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createDevApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createDevApp(): DevAppBuilder; +// Warning: (ae-missing-release-tag) "EntityGridItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityGridItem: ({ entity, diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 1f6833e573..2825a53822 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": "0.2.1", + "version": "0.2.2", "private": false, "publishConfig": { "access": "public", @@ -34,7 +34,7 @@ "@backstage/core-plugin-api": "^0.1.3", "@backstage/catalog-model": "^0.9.0", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/test-utils": "^0.1.14", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", @@ -50,7 +50,7 @@ "react-router-dom": "6.0.0-beta.0" }, "devDependencies": { - "@backstage/cli": "^0.7.2", + "@backstage/cli": "^0.7.4", "@types/jest": "^26.0.7", "@types/node": "^14.14.32" }, diff --git a/packages/errors/api-report.md b/packages/errors/api-report.md index 019b6dd387..6aa69592b7 100644 --- a/packages/errors/api-report.md +++ b/packages/errors/api-report.md @@ -5,12 +5,18 @@ ```ts import { JsonObject } from '@backstage/config'; +// Warning: (ae-missing-release-tag) "AuthenticationError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class AuthenticationError extends CustomErrorBase {} +// Warning: (ae-missing-release-tag) "ConflictError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class ConflictError extends CustomErrorBase {} +// Warning: (ae-missing-release-tag) "CustomErrorBase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class CustomErrorBase extends Error { constructor(message?: string, cause?: Error); @@ -18,11 +24,15 @@ export class CustomErrorBase extends Error { readonly cause?: Error; } +// Warning: (ae-missing-release-tag) "deserializeError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function deserializeError( data: SerializedError, ): T; +// Warning: (ae-missing-release-tag) "ErrorResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ErrorResponse = { error: SerializedError; @@ -35,21 +45,34 @@ export type ErrorResponse = { }; }; +// Warning: (ae-missing-release-tag) "InputError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class InputError extends CustomErrorBase {} +// Warning: (ae-missing-release-tag) "NotAllowedError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class NotAllowedError extends CustomErrorBase {} +// Warning: (ae-missing-release-tag) "NotFoundError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class NotFoundError extends CustomErrorBase {} +// Warning: (ae-missing-release-tag) "NotModifiedError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class NotModifiedError extends CustomErrorBase {} +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "parseErrorResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function parseErrorResponse(response: Response): Promise; +// Warning: (ae-missing-release-tag) "ResponseError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class ResponseError extends Error { constructor(props: { @@ -64,6 +87,8 @@ export class ResponseError extends Error { readonly response: Response; } +// Warning: (ae-missing-release-tag) "SerializedError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type SerializedError = JsonObject & { name: string; @@ -72,6 +97,10 @@ export type SerializedError = JsonObject & { code?: string; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters +// Warning: (ae-missing-release-tag) "serializeError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function serializeError( error: Error, diff --git a/packages/integration-react/api-report.md b/packages/integration-react/api-report.md index e2574196e0..ecd3ae54c3 100644 --- a/packages/integration-react/api-report.md +++ b/packages/integration-react/api-report.md @@ -9,6 +9,8 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { Config } from '@backstage/config'; import { ScmIntegrationRegistry } from '@backstage/integration'; +// Warning: (ae-missing-release-tag) "ScmIntegrationIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ScmIntegrationIcon: ({ type, @@ -16,12 +18,16 @@ export const ScmIntegrationIcon: ({ type?: string | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "ScmIntegrationsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class ScmIntegrationsApi { // (undocumented) static fromConfig(config: Config): ScmIntegrationRegistry; } +// Warning: (ae-missing-release-tag) "scmIntegrationsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const scmIntegrationsApiRef: ApiRef; diff --git a/packages/integration/api-report.md b/packages/integration/api-report.md index fb06ca0de6..160a0a12ca 100644 --- a/packages/integration/api-report.md +++ b/packages/integration/api-report.md @@ -6,11 +6,15 @@ import { Config } from '@backstage/config'; import { RestEndpointMethodTypes } from '@octokit/rest'; +// Warning: (ae-missing-release-tag) "AzureIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class AzureIntegration implements ScmIntegration { constructor(integrationConfig: AzureIntegrationConfig); // (undocumented) get config(): AzureIntegrationConfig; + // Warning: (ae-forgotten-export) The symbol "ScmIntegrationsFactory" needs to be exported by the entry point index.d.ts + // // (undocumented) static factory: ScmIntegrationsFactory; // (undocumented) @@ -27,12 +31,16 @@ export class AzureIntegration implements ScmIntegration { get type(): string; } +// Warning: (ae-missing-release-tag) "AzureIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type AzureIntegrationConfig = { host: string; token?: string; }; +// Warning: (ae-missing-release-tag) "BitbucketIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class BitbucketIntegration implements ScmIntegration { constructor(integrationConfig: BitbucketIntegrationConfig); @@ -54,6 +62,8 @@ export class BitbucketIntegration implements ScmIntegration { get type(): string; } +// Warning: (ae-missing-release-tag) "BitbucketIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type BitbucketIntegrationConfig = { host: string; @@ -63,6 +73,8 @@ export type BitbucketIntegrationConfig = { appPassword?: string; }; +// Warning: (ae-missing-release-tag) "defaultScmResolveUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function defaultScmResolveUrl(options: { url: string; @@ -70,66 +82,125 @@ export function defaultScmResolveUrl(options: { lineNumber?: number; }): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getAzureCommitsUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getAzureCommitsUrl(url: string): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getAzureDownloadUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getAzureDownloadUrl(url: string): string; +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getAzureFileFetchUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getAzureFileFetchUrl(url: string): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getAzureRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getAzureRequestOptions( config: AzureIntegrationConfig, additionalHeaders?: Record, ): RequestInit; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getBitbucketDefaultBranch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getBitbucketDefaultBranch( url: string, config: BitbucketIntegrationConfig, ): Promise; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getBitbucketDownloadUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getBitbucketDownloadUrl( url: string, config: BitbucketIntegrationConfig, ): Promise; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getBitbucketFileFetchUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getBitbucketFileFetchUrl( url: string, config: BitbucketIntegrationConfig, ): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getBitbucketRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getBitbucketRequestOptions( config: BitbucketIntegrationConfig, ): RequestInit; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getGitHubFileFetchUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getGitHubFileFetchUrl( url: string, config: GitHubIntegrationConfig, ): string; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getGitHubRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getGitHubRequestOptions( config: GitHubIntegrationConfig, ): RequestInit; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getGitLabFileFetchUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getGitLabFileFetchUrl( url: string, config: GitLabIntegrationConfig, ): Promise; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "getGitLabRequestOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getGitLabRequestOptions( config: GitLabIntegrationConfig, ): RequestInit; +// Warning: (ae-missing-release-tag) "GithubAppCredentialsMux" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GithubAppCredentialsMux { constructor(config: GitHubIntegrationConfig); @@ -141,16 +212,33 @@ export class GithubAppCredentialsMux { getAppToken(owner: string, repo?: string): Promise; } +// Warning: (ae-missing-release-tag) "GithubCredentialsProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GithubCredentialsProvider { // (undocumented) static create(config: GitHubIntegrationConfig): GithubCredentialsProvider; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (ae-forgotten-export) The symbol "GithubCredentials" needs to be exported by the entry point index.d.ts getCredentials(opts: { url: string }): Promise; } +// Warning: (ae-missing-release-tag) "GithubCredentialType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GithubCredentialType = 'app' | 'token'; +// Warning: (ae-missing-release-tag) "GitHubIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GitHubIntegration implements ScmIntegration { constructor(integrationConfig: GitHubIntegrationConfig); @@ -172,6 +260,8 @@ export class GitHubIntegration implements ScmIntegration { get type(): string; } +// Warning: (ae-missing-release-tag) "GitHubIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type GitHubIntegrationConfig = { host: string; @@ -181,6 +271,8 @@ export type GitHubIntegrationConfig = { apps?: GithubAppConfig[]; }; +// Warning: (ae-missing-release-tag) "GitLabIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GitLabIntegration implements ScmIntegration { constructor(integrationConfig: GitLabIntegrationConfig); @@ -202,6 +294,8 @@ export class GitLabIntegration implements ScmIntegration { get type(): string; } +// Warning: (ae-missing-release-tag) "GitLabIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type GitLabIntegrationConfig = { host: string; @@ -210,60 +304,95 @@ export type GitLabIntegrationConfig = { baseUrl: string; }; +// Warning: (ae-missing-release-tag) "GoogleGcsIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type GoogleGcsIntegrationConfig = { clientEmail?: string; privateKey?: string; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readAzureIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readAzureIntegrationConfig( config: Config, ): AzureIntegrationConfig; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readAzureIntegrationConfigs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readAzureIntegrationConfigs( configs: Config[], ): AzureIntegrationConfig[]; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readBitbucketIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readBitbucketIntegrationConfig( config: Config, ): BitbucketIntegrationConfig; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readBitbucketIntegrationConfigs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readBitbucketIntegrationConfigs( configs: Config[], ): BitbucketIntegrationConfig[]; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readGitHubIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readGitHubIntegrationConfig( config: Config, ): GitHubIntegrationConfig; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readGitHubIntegrationConfigs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readGitHubIntegrationConfigs( configs: Config[], ): GitHubIntegrationConfig[]; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readGitLabIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readGitLabIntegrationConfig( config: Config, ): GitLabIntegrationConfig; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readGitLabIntegrationConfigs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readGitLabIntegrationConfigs( configs: Config[], ): GitLabIntegrationConfig[]; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readGoogleGcsIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readGoogleGcsIntegrationConfig( config: Config, ): GoogleGcsIntegrationConfig; +// Warning: (ae-missing-release-tag) "ScmIntegration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface ScmIntegration { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen resolveEditUrl(url: string): string; + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters resolveUrl(options: { url: string; base: string; @@ -273,6 +402,8 @@ export interface ScmIntegration { type: string; } +// Warning: (ae-missing-release-tag) "ScmIntegrationRegistry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface ScmIntegrationRegistry extends ScmIntegrationsGroup { @@ -284,7 +415,11 @@ export interface ScmIntegrationRegistry github: ScmIntegrationsGroup; // (undocumented) gitlab: ScmIntegrationsGroup; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen resolveEditUrl(url: string): string; + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters resolveUrl(options: { url: string; base: string; @@ -292,8 +427,11 @@ export interface ScmIntegrationRegistry }): string; } +// Warning: (ae-missing-release-tag) "ScmIntegrations" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class ScmIntegrations implements ScmIntegrationRegistry { + // Warning: (ae-forgotten-export) The symbol "IntegrationsByType" needs to be exported by the entry point index.d.ts constructor(integrationsByType: IntegrationsByType); // (undocumented) get azure(): ScmIntegrationsGroup; @@ -321,12 +459,22 @@ export class ScmIntegrations implements ScmIntegrationRegistry { }): string; } +// Warning: (ae-missing-release-tag) "ScmIntegrationsGroup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface ScmIntegrationsGroup { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen byHost(host: string): T | undefined; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen byUrl(url: string | URL): T | undefined; list(): T[]; } +// Warnings were encountered during analysis: +// +// src/github/config.d.ts:41:5 - (ae-forgotten-export) The symbol "GithubAppConfig" needs to be exported by the entry point index.d.ts +// src/gitlab/config.d.ts:27:68 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/gitlab/config.d.ts:27:63 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/search-common/api-report.md b/packages/search-common/api-report.md index 0ba995f673..504f9afb9c 100644 --- a/packages/search-common/api-report.md +++ b/packages/search-common/api-report.md @@ -5,6 +5,8 @@ ```ts import { JsonObject } from '@backstage/config'; +// Warning: (ae-missing-release-tag) "DocumentCollator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface DocumentCollator { // (undocumented) @@ -12,6 +14,8 @@ export interface DocumentCollator { readonly type: string; } +// Warning: (ae-missing-release-tag) "DocumentDecorator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface DocumentDecorator { // (undocumented) @@ -19,6 +23,8 @@ export interface DocumentDecorator { readonly types?: string[]; } +// Warning: (ae-missing-release-tag) "IndexableDocument" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface IndexableDocument { location: string; @@ -26,6 +32,8 @@ export interface IndexableDocument { title: string; } +// Warning: (ae-missing-release-tag) "SearchQuery" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface SearchQuery { // (undocumented) @@ -38,6 +46,8 @@ export interface SearchQuery { types?: string[]; } +// Warning: (ae-missing-release-tag) "SearchResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface SearchResult { // (undocumented) @@ -46,6 +56,8 @@ export interface SearchResult { type: string; } +// Warning: (ae-missing-release-tag) "SearchResultSet" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface SearchResultSet { // (undocumented) diff --git a/packages/techdocs-common/CHANGELOG.md b/packages/techdocs-common/CHANGELOG.md index 02edf9c95f..c26be7fa7c 100644 --- a/packages/techdocs-common/CHANGELOG.md +++ b/packages/techdocs-common/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/techdocs-common +## 0.6.8 + +### Patch Changes + +- d5eaab91d: Adds custom docker image support to the techdocs generator. This change adds a new `techdocs.generator` configuration key and deprecates the existing `techdocs.generators.techdocs` key. + + ```yaml + techdocs: + # recommended, going forward: + generator: + runIn: 'docker' # or 'local' + # New optional settings + dockerImage: my-org/techdocs # use a custom docker image + pullImage: false # disable automatic pulling of image (e.g. if custom docker login is required) + # legacy (deprecated): + generators: + techdocs: 'docker' # or 'local' + ``` + +- c18e8eb91: Provide optional `logger: Logger` and `logStream: Writable` arguments to the `GeneratorBase#run(...)` command. + They receive all log messages that are emitted during the generator run. +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + ## 0.6.7 ### Patch Changes diff --git a/packages/techdocs-common/api-report.md b/packages/techdocs-common/api-report.md index 8cca624e11..7c44dc5484 100644 --- a/packages/techdocs-common/api-report.md +++ b/packages/techdocs-common/api-report.md @@ -18,6 +18,8 @@ import { PluginEndpointDiscovery } from '@backstage/backend-common'; import { UrlReader } from '@backstage/backend-common'; import { Writable } from 'stream'; +// Warning: (ae-missing-release-tag) "checkoutGitRepository" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const checkoutGitRepository: ( repoUrl: string, @@ -25,9 +27,13 @@ export const checkoutGitRepository: ( logger: Logger_2, ) => Promise; +// Warning: (ae-missing-release-tag) "CommonGitPreparer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class CommonGitPreparer implements PreparerBase { constructor(config: Config, logger: Logger_2); + // Warning: (ae-forgotten-export) The symbol "PreparerResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) prepare( entity: Entity, @@ -37,6 +43,8 @@ export class CommonGitPreparer implements PreparerBase { ): Promise; } +// Warning: (ae-missing-release-tag) "DirectoryPreparer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DirectoryPreparer implements PreparerBase { constructor(config: Config, logger: Logger_2, reader: UrlReader); @@ -44,17 +52,49 @@ export class DirectoryPreparer implements PreparerBase { prepare(entity: Entity): Promise; } +// Warning: (ae-missing-release-tag) "GeneratorBase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GeneratorBase = { run(opts: GeneratorRunOptions): Promise; }; +// Warning: (ae-missing-release-tag) "GeneratorBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type GeneratorBuilder = { register(protocol: SupportedGeneratorKey, generator: GeneratorBase): void; get(entity: Entity): GeneratorBase; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. +// Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' +// Warning: (ae-missing-release-tag) "GeneratorRunOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export type GeneratorRunOptions = { + inputDir: string; + outputDir: string; + parsedLocationAnnotation?: ParsedLocationAnnotation; + etag?: string; + logger: Logger_2; + logStream?: Writable; +}; + +// Warning: (ae-missing-release-tag) "Generators" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class Generators implements GeneratorBuilder { // (undocumented) @@ -74,18 +114,24 @@ export class Generators implements GeneratorBuilder { register(generatorKey: SupportedGeneratorKey, generator: GeneratorBase): void; } +// Warning: (ae-missing-release-tag) "getAzureIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getAzureIntegrationConfig: ( config: Config, host: string, ) => AzureIntegrationConfig; +// Warning: (ae-missing-release-tag) "getDefaultBranch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getDefaultBranch: ( repositoryUrl: string, config: Config, ) => Promise; +// Warning: (ae-missing-release-tag) "getDocFilesFromRepository" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getDocFilesFromRepository: ( reader: UrlReader, @@ -98,57 +144,79 @@ export const getDocFilesFromRepository: ( | undefined, ) => Promise; +// Warning: (ae-missing-release-tag) "getGitHost" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getGitHost(url: string): string; +// Warning: (ae-missing-release-tag) "getGitHubIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getGitHubIntegrationConfig: ( config: Config, host: string, ) => GitHubIntegrationConfig; +// Warning: (ae-missing-release-tag) "getGitLabIntegrationConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getGitLabIntegrationConfig: ( config: Config, host: string, ) => GitLabIntegrationConfig; +// Warning: (ae-missing-release-tag) "getGitRepositoryTempFolder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getGitRepositoryTempFolder: ( repositoryUrl: string, config: Config, ) => Promise; +// Warning: (ae-missing-release-tag) "getGitRepoType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getGitRepoType(url: string): string; +// Warning: (ae-missing-release-tag) "getLastCommitTimestamp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getLastCommitTimestamp: ( repositoryLocation: string, logger: Logger_2, ) => Promise; +// Warning: (ae-missing-release-tag) "getLocationForEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getLocationForEntity: (entity: Entity) => ParsedLocationAnnotation; +// Warning: (ae-missing-release-tag) "getTokenForGitRepo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const getTokenForGitRepo: ( repositoryUrl: string, config: Config, ) => Promise; +// Warning: (ae-missing-release-tag) "ParsedLocationAnnotation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ParsedLocationAnnotation = { type: RemoteProtocol; target: string; }; +// Warning: (ae-missing-release-tag) "parseReferenceAnnotation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const parseReferenceAnnotation: ( annotationName: string, entity: Entity, ) => ParsedLocationAnnotation; +// Warning: (ae-missing-release-tag) "PreparerBase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PreparerBase = { prepare( @@ -160,14 +228,20 @@ export type PreparerBase = { ): Promise; }; +// Warning: (ae-missing-release-tag) "PreparerBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PreparerBuilder = { register(protocol: RemoteProtocol, preparer: PreparerBase): void; get(entity: Entity): PreparerBase; }; +// Warning: (ae-missing-release-tag) "Preparers" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class Preparers implements PreparerBuilder { + // Warning: (ae-forgotten-export) The symbol "factoryOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static fromConfig( config: Config, @@ -179,8 +253,12 @@ export class Preparers implements PreparerBuilder { register(protocol: RemoteProtocol, preparer: PreparerBase): void; } +// Warning: (ae-missing-release-tag) "Publisher" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class Publisher { + // Warning: (ae-forgotten-export) The symbol "factoryOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static fromConfig( config: Config, @@ -188,15 +266,31 @@ export class Publisher { ): Promise; } +// Warning: (ae-missing-release-tag) "PublisherBase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface PublisherBase { docsRouter(): express.Handler; fetchTechDocsMetadata(entityName: EntityName): Promise; + // Warning: (ae-forgotten-export) The symbol "ReadinessResponse" needs to be exported by the entry point index.d.ts getReadiness(): Promise; hasDocsBeenGenerated(entityName: Entity): Promise; + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (ae-forgotten-export) The symbol "MigrateRequest" needs to be exported by the entry point index.d.ts + migrateDocsCase?(migrateRequest: MigrateRequest): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (ae-forgotten-export) The symbol "PublishRequest" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "PublishResponse" needs to be exported by the entry point index.d.ts publish(request: PublishRequest): Promise; } +// Warning: (ae-missing-release-tag) "PublisherType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type PublisherType = | 'local' @@ -205,6 +299,8 @@ export type PublisherType = | 'azureBlobStorage' | 'openStackSwift'; +// Warning: (ae-missing-release-tag) "RemoteProtocol" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type RemoteProtocol = | 'url' @@ -214,6 +310,8 @@ export type RemoteProtocol = | 'file' | 'azure/api'; +// Warning: (ae-missing-release-tag) "TechdocsGenerator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class TechdocsGenerator implements GeneratorBase { constructor({ @@ -226,14 +324,30 @@ export class TechdocsGenerator implements GeneratorBase { config: Config; }); // (undocumented) + static fromConfig( + config: Config, + { + containerRunner, + logger, + }: { + containerRunner: ContainerRunner; + logger: Logger_2; + }, + ): Promise; + // (undocumented) run({ inputDir, outputDir, parsedLocationAnnotation, etag, + logger: childLogger, + logStream, }: GeneratorRunOptions): Promise; } +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "TechDocsMetadata" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type TechDocsMetadata = { site_name: string; @@ -241,6 +355,8 @@ export type TechDocsMetadata = { etag: string; }; +// Warning: (ae-missing-release-tag) "UrlPreparer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class UrlPreparer implements PreparerBase { constructor(reader: UrlReader, logger: Logger_2); @@ -253,5 +369,13 @@ export class UrlPreparer implements PreparerBase { ): Promise; } +// Warnings were encountered during analysis: +// +// src/stages/generate/types.d.ts:44:5 - (ae-forgotten-export) The symbol "SupportedGeneratorKey" needs to be exported by the entry point index.d.ts +// src/stages/prepare/types.d.ts:18:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/stages/prepare/types.d.ts:19:8 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters +// src/stages/prepare/types.d.ts:21:33 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/stages/prepare/types.d.ts:21:16 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // (No @packageDocumentation comment for this package) ``` diff --git a/packages/techdocs-common/package.json b/packages/techdocs-common/package.json index de97e9815d..5240e527e7 100644 --- a/packages/techdocs-common/package.json +++ b/packages/techdocs-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/techdocs-common", "description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "0.6.7", + "version": "0.6.8", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -38,7 +38,7 @@ "dependencies": { "@azure/identity": "^1.2.2", "@azure/storage-blob": "^12.4.0", - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", "@backstage/errors": "^0.1.1", @@ -60,7 +60,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@types/fs-extra": "^9.0.5", "@types/git-url-parse": "^9.0.0", "@types/js-yaml": "^4.0.0", diff --git a/packages/techdocs-common/src/stages/generate/index.ts b/packages/techdocs-common/src/stages/generate/index.ts index 382712ccbc..eb015a5c2d 100644 --- a/packages/techdocs-common/src/stages/generate/index.ts +++ b/packages/techdocs-common/src/stages/generate/index.ts @@ -15,4 +15,8 @@ */ export { TechdocsGenerator } from './techdocs'; export { Generators } from './generators'; -export type { GeneratorBuilder, GeneratorBase } from './types'; +export type { + GeneratorBuilder, + GeneratorBase, + GeneratorRunOptions, +} from './types'; diff --git a/packages/techdocs-common/src/stages/generate/techdocs.test.ts b/packages/techdocs-common/src/stages/generate/techdocs.test.ts new file mode 100644 index 0000000000..f8d5128adc --- /dev/null +++ b/packages/techdocs-common/src/stages/generate/techdocs.test.ts @@ -0,0 +1,139 @@ +/* + * Copyright 2020 Spotify AB + * + * 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 { ConfigReader } from '@backstage/config'; +import { readGeneratorConfig } from './techdocs'; + +const mockLogger = { + warn: jest.fn(), +}; + +describe('readGeneratorConfig', () => { + beforeEach(() => { + jest.resetAllMocks(); + }); + + const logger = mockLogger as any; + + it('defaults to runIn docker', () => { + const config = new ConfigReader({ + techdocs: { + generator: {}, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'docker', + dockerImage: undefined, + pullImage: undefined, + }); + }); + + it('should read local config', () => { + const config = new ConfigReader({ + techdocs: { + generator: { + runIn: 'local', + }, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'local', + }); + }); + + it('should read docker config', () => { + const config = new ConfigReader({ + techdocs: { + generator: { + runIn: 'docker', + }, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'docker', + }); + }); + + it('should read custom docker image', () => { + const config = new ConfigReader({ + techdocs: { + generator: { + runIn: 'docker', + dockerImage: 'my-org/techdocs', + }, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'docker', + dockerImage: 'my-org/techdocs', + }); + }); + + it('should read config disabling docker pull', () => { + const config = new ConfigReader({ + techdocs: { + generator: { + runIn: 'docker', + dockerImage: 'my-org/techdocs', + pullImage: false, + }, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'docker', + dockerImage: 'my-org/techdocs', + pullImage: false, + }); + }); + + describe('with legacy techdocs.generators.techdocs config', () => { + it('should read legacy docker option', () => { + const config = new ConfigReader({ + techdocs: { + generators: { + techdocs: 'docker', + }, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'docker', + }); + }); + + it('legacy option should log warning', () => { + const config = new ConfigReader({ + techdocs: { + generators: { + techdocs: 'local', + }, + }, + }); + + expect(readGeneratorConfig(config, logger)).toEqual({ + runIn: 'local', + }); + expect(logger.warn).toHaveBeenCalledWith( + `The 'techdocs.generators.techdocs' configuration key is deprecated and will be removed in the future. Please use 'techdocs.generator' instead.`, + ); + }); + }); +}); diff --git a/packages/techdocs-common/src/stages/generate/techdocs.ts b/packages/techdocs-common/src/stages/generate/techdocs.ts index 041dff1d2f..6847a74300 100644 --- a/packages/techdocs-common/src/stages/generate/techdocs.ts +++ b/packages/techdocs-common/src/stages/generate/techdocs.ts @@ -17,7 +17,6 @@ import { ContainerRunner } from '@backstage/backend-common'; import { Config } from '@backstage/config'; import path from 'path'; -import { PassThrough } from 'stream'; import { Logger } from 'winston'; import { addBuildTimestampMetadata, @@ -26,31 +25,29 @@ import { storeEtagMetadata, validateMkdocsYaml, } from './helpers'; -import { GeneratorBase, GeneratorRunOptions } from './types'; +import { + GeneratorBase, + GeneratorConfig, + GeneratorRunInType, + GeneratorRunOptions, +} from './types'; -type TechdocsGeneratorOptions = { - // This option enables users to configure if they want to use TechDocs container - // or generate without the container. - // This is used to avoid running into Docker in Docker environment. - runGeneratorIn: string; -}; - -const createStream = (): [string[], PassThrough] => { - const log = [] as Array; - - const stream = new PassThrough(); - stream.on('data', chunk => { - const textValue = chunk.toString().trim(); - if (textValue?.length > 1) log.push(textValue); - }); - - return [log, stream]; -}; +const defaultDockerImage = 'spotify/techdocs'; export class TechdocsGenerator implements GeneratorBase { private readonly logger: Logger; private readonly containerRunner: ContainerRunner; - private readonly options: TechdocsGeneratorOptions; + private readonly options: GeneratorConfig; + + static async fromConfig( + config: Config, + { + containerRunner, + logger, + }: { containerRunner: ContainerRunner; logger: Logger }, + ) { + return new TechdocsGenerator({ logger, containerRunner, config }); + } constructor({ logger, @@ -62,10 +59,7 @@ export class TechdocsGenerator implements GeneratorBase { config: Config; }) { this.logger = logger; - this.options = { - runGeneratorIn: - config.getOptionalString('techdocs.generators.techdocs') ?? 'docker', - }; + this.options = readGeneratorConfig(config, logger); this.containerRunner = containerRunner; } @@ -74,9 +68,9 @@ export class TechdocsGenerator implements GeneratorBase { outputDir, parsedLocationAnnotation, etag, + logger: childLogger, + logStream, }: GeneratorRunOptions): Promise { - const [log, logStream] = createStream(); - // TODO: In future mkdocs.yml can be mkdocs.yaml. So, use a config variable here to find out // the correct file name. // Do some updates to mkdocs.yml before generating docs e.g. adding repo_url @@ -84,7 +78,7 @@ export class TechdocsGenerator implements GeneratorBase { if (parsedLocationAnnotation) { await patchMkdocsYmlPreBuild( mkdocsYmlPath, - this.logger, + childLogger, parsedLocationAnnotation, ); } @@ -98,7 +92,7 @@ export class TechdocsGenerator implements GeneratorBase { }; try { - switch (this.options.runGeneratorIn) { + switch (this.options.runIn) { case 'local': await runCommand({ command: 'mkdocs', @@ -108,13 +102,13 @@ export class TechdocsGenerator implements GeneratorBase { }, logStream, }); - this.logger.info( + childLogger.info( `Successfully generated docs from ${inputDir} into ${outputDir} using local mkdocs`, ); break; case 'docker': await this.containerRunner.runContainer({ - imageName: 'spotify/techdocs', + imageName: this.options.dockerImage ?? defaultDockerImage, args: ['build', '-d', '/output'], logStream, mountDirs, @@ -122,21 +116,21 @@ export class TechdocsGenerator implements GeneratorBase { // Set the home directory inside the container as something that applications can // write to, otherwise they will just fail trying to write to / envVars: { HOME: '/tmp' }, + pullImage: this.options.pullImage, }); - this.logger.info( + childLogger.info( `Successfully generated docs from ${inputDir} into ${outputDir} using techdocs-container`, ); break; default: throw new Error( - `Invalid config value "${this.options.runGeneratorIn}" provided in 'techdocs.generators.techdocs'.`, + `Invalid config value "${this.options.runIn}" provided in 'techdocs.generators.techdocs'.`, ); } } catch (error) { this.logger.debug( `Failed to generate docs from ${inputDir} into ${outputDir}`, ); - this.logger.error(`Build failed with error: ${log}`); throw new Error( `Failed to generate docs from ${inputDir} into ${outputDir} with error ${error.message}`, ); @@ -150,7 +144,7 @@ export class TechdocsGenerator implements GeneratorBase { // Creates techdocs_metadata.json if file does not exist. await addBuildTimestampMetadata( path.join(outputDir, 'techdocs_metadata.json'), - this.logger, + childLogger, ); // Add etag of the prepared tree to techdocs_metadata.json @@ -163,3 +157,27 @@ export class TechdocsGenerator implements GeneratorBase { } } } + +export function readGeneratorConfig( + config: Config, + logger: Logger, +): GeneratorConfig { + const legacyGeneratorType = config.getOptionalString( + 'techdocs.generators.techdocs', + ) as GeneratorRunInType; + + if (legacyGeneratorType) { + logger.warn( + `The 'techdocs.generators.techdocs' configuration key is deprecated and will be removed in the future. Please use 'techdocs.generator' instead.`, + ); + } + + return { + runIn: + legacyGeneratorType ?? + config.getOptionalString('techdocs.generator.runIn') ?? + 'docker', + dockerImage: config.getOptionalString('techdocs.generator.dockerImage'), + pullImage: config.getOptionalBoolean('techdocs.generator.pullImage'), + }; +} diff --git a/packages/techdocs-common/src/stages/generate/types.ts b/packages/techdocs-common/src/stages/generate/types.ts index 5ea9721c54..3559716be0 100644 --- a/packages/techdocs-common/src/stages/generate/types.ts +++ b/packages/techdocs-common/src/stages/generate/types.ts @@ -13,10 +13,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Entity } from '@backstage/catalog-model'; import { Writable } from 'stream'; +import { Logger } from 'winston'; import { ParsedLocationAnnotation } from '../../helpers'; +// Determines where the generator will be run +export type GeneratorRunInType = 'docker' | 'local'; + +/** + * The techdocs generator configurations options. + */ +export type GeneratorConfig = { + runIn: GeneratorRunInType; + dockerImage?: string; + pullImage?: boolean; +}; + /** * The values that the generator will receive. * @@ -24,13 +38,15 @@ import { ParsedLocationAnnotation } from '../../helpers'; * @param {string} outputDir Directory to store generated docs in. Usually - a newly created temporary directory. * @param {ParsedLocationAnnotation} parsedLocationAnnotation backstage.io/techdocs-ref annotation of an entity * @param {string} etag A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json. - * @param {Writable} [logStream] A dedicated log stream + * @param {Logger} [logger] A logger that forwards the messages to the caller to be displayed outside of the backend. + * @param {Writable} [logStream] A log stream that can send raw log messages to the caller to be displayed outside of the backend.. */ export type GeneratorRunOptions = { inputDir: string; outputDir: string; parsedLocationAnnotation?: ParsedLocationAnnotation; etag?: string; + logger: Logger; logStream?: Writable; }; diff --git a/packages/techdocs-common/src/stages/publish/awsS3.ts b/packages/techdocs-common/src/stages/publish/awsS3.ts index 15fe5a467f..2942e33380 100644 --- a/packages/techdocs-common/src/stages/publish/awsS3.ts +++ b/packages/techdocs-common/src/stages/publish/awsS3.ts @@ -16,7 +16,7 @@ import { Entity, EntityName } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; import aws, { Credentials } from 'aws-sdk'; -import { ManagedUpload } from 'aws-sdk/clients/s3'; +import { ListObjectsV2Output, ManagedUpload } from 'aws-sdk/clients/s3'; import { CredentialsOptions } from 'aws-sdk/lib/credentials'; import express from 'express'; import fs from 'fs-extra'; @@ -25,7 +25,11 @@ import createLimiter from 'p-limit'; import path from 'path'; import { Readable } from 'stream'; import { Logger } from 'winston'; -import { getFileTreeRecursively, getHeadersForFileExtension } from './helpers'; +import { + getFileTreeRecursively, + getHeadersForFileExtension, + lowerCaseEntityTripletInStoragePath, +} from './helpers'; import { PublisherBase, PublishRequest, @@ -308,4 +312,78 @@ export class AwsS3Publish implements PublisherBase { return Promise.resolve(false); } } + + async migrateDocsCase({ + removeOriginal = false, + concurrency = 25, + }): Promise { + // Iterate through every file in the root of the publisher. + const allObjects = await this.getAllObjectsFromBucket(); + const limiter = createLimiter(concurrency); + await Promise.all( + allObjects.map(f => + limiter(async file => { + let newPath; + try { + newPath = lowerCaseEntityTripletInStoragePath(file); + } catch (e) { + this.logger.warn(e.message); + return; + } + + // If all parts are already lowercase, ignore. + if (file === newPath) { + return; + } + + try { + this.logger.debug(`Migrating ${file}`); + await this.storageClient + .copyObject({ + Bucket: this.bucketName, + CopySource: [this.bucketName, file].join('/'), + Key: newPath, + }) + .promise(); + + if (removeOriginal) { + await this.storageClient + .deleteObject({ + Bucket: this.bucketName, + Key: file, + }) + .promise(); + } + } catch (e) { + this.logger.warn(`Unable to migrate ${file}: ${e.message}`); + } + }, f), + ), + ); + } + + /** + * Returns a list of all object keys from the configured bucket. + */ + protected async getAllObjectsFromBucket(): Promise { + const objects: string[] = []; + let nextContinuation: string | undefined; + let allObjects: ListObjectsV2Output; + + // Iterate through every file in the root of the publisher. + do { + allObjects = await this.storageClient + .listObjectsV2({ + Bucket: this.bucketName, + ContinuationToken: nextContinuation, + }) + .promise(); + objects.push( + ...(allObjects.Contents || []).map(f => f.Key || '').filter(f => !!f), + ); + nextContinuation = allObjects.NextContinuationToken; + } while (nextContinuation); + + return objects; + } } diff --git a/packages/techdocs-common/src/stages/publish/azureBlobStorage.ts b/packages/techdocs-common/src/stages/publish/azureBlobStorage.ts index 3ed75f532e..7ee67a0016 100644 --- a/packages/techdocs-common/src/stages/publish/azureBlobStorage.ts +++ b/packages/techdocs-common/src/stages/publish/azureBlobStorage.ts @@ -25,7 +25,11 @@ import JSON5 from 'json5'; import limiterFactory from 'p-limit'; import { default as path, default as platformPath } from 'path'; import { Logger } from 'winston'; -import { getFileTreeRecursively, getHeadersForFileExtension } from './helpers'; +import { + getFileTreeRecursively, + getHeadersForFileExtension, + lowerCaseEntityTripletInStoragePath, +} from './helpers'; import { PublisherBase, PublishRequest, @@ -289,4 +293,61 @@ export class AzureBlobStoragePublish implements PublisherBase { .getBlockBlobClient(`${entityRootDir}/index.html`) .exists(); } + + protected async renameBlob( + originalName: string, + newName: string, + removeOriginal = false, + ): Promise { + const container = this.storageClient.getContainerClient(this.containerName); + const blob = container.getBlobClient(newName); + const { url } = container.getBlobClient(originalName); + const response = await blob.beginCopyFromURL(url); + await response.pollUntilDone(); + if (removeOriginal) { + await container.deleteBlob(originalName); + } + } + + protected async renameBlobToLowerCase( + originalPath: string, + removeOriginal: boolean, + ) { + let newPath; + try { + newPath = lowerCaseEntityTripletInStoragePath(originalPath); + } catch (e) { + this.logger.warn(e.message); + return; + } + + if (originalPath === newPath) return; + try { + this.logger.debug(`Migrating ${originalPath}`); + await this.renameBlob(originalPath, newPath, removeOriginal); + } catch (e) { + this.logger.warn(`Unable to migrate ${originalPath}: ${e.message}`); + } + } + + async migrateDocsCase({ + removeOriginal = false, + concurrency = 25, + }): Promise { + const promises = []; + const limiter = limiterFactory(concurrency); + const container = this.storageClient.getContainerClient(this.containerName); + + for await (const blob of container.listBlobsFlat()) { + promises.push( + limiter( + this.renameBlobToLowerCase.bind(this), + blob.name, + removeOriginal, + ), + ); + } + + await Promise.all(promises); + } } diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.ts b/packages/techdocs-common/src/stages/publish/googleStorage.ts index bca7b86856..9def24722a 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.ts @@ -24,8 +24,10 @@ import express from 'express'; import JSON5 from 'json5'; import createLimiter from 'p-limit'; import path from 'path'; +import { Readable } from 'stream'; import { Logger } from 'winston'; import { getFileTreeRecursively, getHeadersForFileExtension } from './helpers'; +import { MigrateWriteStream } from './migrations'; import { PublisherBase, PublishRequest, @@ -235,4 +237,23 @@ export class GoogleGCSPublish implements PublisherBase { }); }); } + + migrateDocsCase({ removeOriginal = false, concurrency = 25 }): Promise { + return new Promise((resolve, reject) => { + // Iterate through every file in the root of the publisher. + const allFileMetadata: Readable = this.storageClient + .bucket(this.bucketName) + .getFilesStream(); + const migrateFiles = new MigrateWriteStream( + this.logger, + removeOriginal, + concurrency, + ); + migrateFiles.on('finish', resolve).on('error', reject); + allFileMetadata.pipe(migrateFiles).on('error', error => { + migrateFiles.destroy(); + reject(error); + }); + }); + } } diff --git a/packages/techdocs-common/src/stages/publish/helpers.test.ts b/packages/techdocs-common/src/stages/publish/helpers.test.ts index cfb9c7930d..27a56cd06d 100644 --- a/packages/techdocs-common/src/stages/publish/helpers.test.ts +++ b/packages/techdocs-common/src/stages/publish/helpers.test.ts @@ -16,7 +16,11 @@ import mockFs from 'mock-fs'; import * as os from 'os'; import * as path from 'path'; -import { getFileTreeRecursively, getHeadersForFileExtension } from './helpers'; +import { + getFileTreeRecursively, + getHeadersForFileExtension, + lowerCaseEntityTripletInStoragePath, +} from './helpers'; describe('getHeadersForFileExtension', () => { const correctMapOfExtensions = [ @@ -73,3 +77,25 @@ describe('getFileTreeRecursively', () => { expect(fileList).toContain(path.resolve(root, 'subDirA/file2')); }); }); + +describe('lowerCaseEntityTripletInStoragePath', () => { + it('returns lower-cased entity triplet path', () => { + const originalPath = 'default/Component/backstage/index.html'; + const actualPath = lowerCaseEntityTripletInStoragePath(originalPath); + expect(actualPath).toBe('default/component/backstage/index.html'); + }); + + it('does not lowercase beyond the triplet', () => { + const originalPath = 'default/Component/backstage/assets/IMAGE.png'; + const actualPath = lowerCaseEntityTripletInStoragePath(originalPath); + expect(actualPath).toBe('default/component/backstage/assets/IMAGE.png'); + }); + + it('throws error when there is no triplet', () => { + const originalPath = '/default/component/IMAGE.png'; + const error = `Encountered file unmanaged by TechDocs ${originalPath}. Skipping.`; + expect(() => + lowerCaseEntityTripletInStoragePath(originalPath), + ).toThrowError(error); + }); +}); diff --git a/packages/techdocs-common/src/stages/publish/helpers.ts b/packages/techdocs-common/src/stages/publish/helpers.ts index eac5ba05c8..ed681eb8ba 100644 --- a/packages/techdocs-common/src/stages/publish/helpers.ts +++ b/packages/techdocs-common/src/stages/publish/helpers.ts @@ -82,3 +82,32 @@ export const getFileTreeRecursively = async ( }); return fileList; }; + +/** + * Returns the version of an object's storage path where the first three parts + * of the path (the entity triplet of namespace, kind, and name) are + * lower-cased. + * + * Path must not include a starting slash. + * + * @example + * lowerCaseEntityTripletInStoragePath('default/Component/backstage') + * // return default/component/backstage + */ +export const lowerCaseEntityTripletInStoragePath = ( + originalPath: string, +): string => { + const trimmedPath = + originalPath[0] === '/' ? originalPath.substring(1) : originalPath; + const matches = trimmedPath.match(/\//g) || []; + if (matches.length <= 2) { + throw new Error( + `Encountered file unmanaged by TechDocs ${originalPath}. Skipping.`, + ); + } + const [namespace, kind, name, ...parts] = originalPath.split('/'); + const lowerNamespace = namespace.toLowerCase(); + const lowerKind = kind.toLowerCase(); + const lowerName = name.toLowerCase(); + return [lowerNamespace, lowerKind, lowerName, ...parts].join('/'); +}; diff --git a/packages/techdocs-common/src/stages/publish/local.ts b/packages/techdocs-common/src/stages/publish/local.ts index 3ad0ed65ad..3414d273dd 100644 --- a/packages/techdocs-common/src/stages/publish/local.ts +++ b/packages/techdocs-common/src/stages/publish/local.ts @@ -22,6 +22,7 @@ import { Config } from '@backstage/config'; import express from 'express'; import fs from 'fs-extra'; import os from 'os'; +import createLimiter from 'p-limit'; import path from 'path'; import { Logger } from 'winston'; import { @@ -31,7 +32,11 @@ import { ReadinessResponse, TechDocsMetadata, } from './types'; -import { getHeadersForFileExtension } from './helpers'; +import { + getFileTreeRecursively, + getHeadersForFileExtension, + lowerCaseEntityTripletInStoragePath, +} from './helpers'; // TODO: Use a more persistent storage than node_modules or /tmp directory. // Make it configurable with techdocs.publisher.local.publishDirectory @@ -164,4 +169,45 @@ export class LocalPublish implements PublisherBase { return false; } } + + /** + * This code will never run in practice. It is merely here to illustrate how + * to implement this method for other storage providers. + */ + async migrateDocsCase({ + removeOriginal = false, + concurrency = 25, + }): Promise { + // Iterate through every file in the root of the publisher. + const files = await getFileTreeRecursively(staticDocsDir); + const limit = createLimiter(concurrency); + + await Promise.all( + files.map(f => + limit(async file => { + const relativeFile = file.replace(`${staticDocsDir}${path.sep}`, ''); + const newFile = lowerCaseEntityTripletInStoragePath(relativeFile); + + // If all parts are already lowercase, ignore. + if (relativeFile === newFile) { + return; + } + + // Otherwise, copy or move the file. + await new Promise(resolve => { + const migrate = removeOriginal ? fs.move : fs.copyFile; + this.logger.debug(`Migrating ${relativeFile}`); + migrate(file, newFile, err => { + if (err) { + this.logger.warn( + `Unable to migrate ${relativeFile}: ${err.message}`, + ); + } + resolve(); + }); + }); + }, f), + ), + ); + } } diff --git a/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts b/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts new file mode 100644 index 0000000000..cc35b351ea --- /dev/null +++ b/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts @@ -0,0 +1,79 @@ +/* + * 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 { File } from '@google-cloud/storage'; +import { Writable } from 'stream'; +import { Logger } from 'winston'; +import { lowerCaseEntityTripletInStoragePath } from '../helpers'; + +/** + * Writable stream to handle object copy/move operations. This implementation + * ensures we don't read in files from GCS faster than GCS can copy/move them. + */ +export class MigrateWriteStream extends Writable { + protected logger: Logger; + protected removeOriginal: boolean; + protected maxConcurrency: number; + protected inFlight = 0; + + constructor(logger: Logger, removeOriginal: boolean, concurrency: number) { + super({ objectMode: true }); + this.logger = logger; + this.removeOriginal = removeOriginal; + this.maxConcurrency = concurrency; + } + + _write(file: File, _encoding: BufferEncoding, next: Function) { + let shouldCallNext = true; + let newFile; + try { + newFile = lowerCaseEntityTripletInStoragePath(file.name); + } catch (e) { + this.logger.warn(e.message); + next(); + return; + } + + // If all parts are already lowercase, ignore. + if (newFile === file.name) { + next(); + return; + } + + // Allow up to n-many files to be migrated at a time. + this.inFlight++; + if (this.inFlight < this.maxConcurrency) { + next(); + shouldCallNext = false; + } + + // Otherwise, copy or move the file. + const migrate = this.removeOriginal + ? file.move.bind(file) + : file.copy.bind(file); + this.logger.debug(`Migrating ${file.name}`); + migrate(newFile) + .catch(e => + this.logger.warn(`Unable to migrate ${file.name}: ${e.message}`), + ) + .finally(() => { + this.inFlight--; + if (shouldCallNext) { + next(); + } + }); + } +} diff --git a/packages/techdocs-common/src/stages/publish/migrations/index.ts b/packages/techdocs-common/src/stages/publish/migrations/index.ts new file mode 100644 index 0000000000..f82ab054a4 --- /dev/null +++ b/packages/techdocs-common/src/stages/publish/migrations/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { MigrateWriteStream } from './GoogleMigration'; diff --git a/packages/techdocs-common/src/stages/publish/types.ts b/packages/techdocs-common/src/stages/publish/types.ts index a7f6ff7a45..229c853427 100644 --- a/packages/techdocs-common/src/stages/publish/types.ts +++ b/packages/techdocs-common/src/stages/publish/types.ts @@ -55,6 +55,19 @@ export type TechDocsMetadata = { etag: string; }; +export type MigrateRequest = { + /** + * Whether or not to remove the source file. Defaults to false (acting like a + * copy instead of a move). + */ + removeOriginal?: boolean; + + /** + * Maximum number of files/objects to migrate at once. Defaults to 25. + */ + concurrency?: number; +}; + /** * Base class for a TechDocs publisher (e.g. Local, Google GCS Bucket, AWS S3, etc.) * The publisher handles publishing of the generated static files after the prepare and generate steps of TechDocs. @@ -92,4 +105,14 @@ export interface PublisherBase { * Check if the index.html is present for the Entity at the Storage location. */ hasDocsBeenGenerated(entityName: Entity): Promise; + + /** + * Migrates documentation objects with case sensitive entity triplets to + * lowercase entity triplets. This was (will be) a change introduced in + * techdocs-cli v{0.x.y} and techdocs-backend v{0.x.y}. + * + * Implementation of this method is unnecessary in publishers introduced + * after v{0.x.y} of techdocs-common. + */ + migrateDocsCase?(migrateRequest: MigrateRequest): Promise; } diff --git a/packages/test-utils-core/api-report.md b/packages/test-utils-core/api-report.md index 8eb7ee458a..7cef987174 100644 --- a/packages/test-utils-core/api-report.md +++ b/packages/test-utils-core/api-report.md @@ -6,14 +6,20 @@ import { ReactElement } from 'react'; import { RenderResult } from '@testing-library/react'; +// Warning: (ae-missing-release-tag) "AsyncLogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AsyncLogCollector = () => Promise; +// Warning: (ae-missing-release-tag) "CollectedLogs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CollectedLogs = { [key in T]: string[]; }; +// Warning: (ae-missing-release-tag) "Keyboard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class Keyboard { constructor( @@ -60,18 +66,31 @@ export class Keyboard { static typeDebug(target: any, input: any): Promise; } +// Warning: (ae-missing-release-tag) "LogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LogCollector = AsyncLogCollector | SyncLogCollector; +// Warning: (ae-missing-release-tag) "LogFuncs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LogFuncs = 'log' | 'warn' | 'error'; +// Warning: (ae-missing-release-tag) "renderWithEffects" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function renderWithEffects(nodes: ReactElement): Promise; +// Warning: (ae-missing-release-tag) "SyncLogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type SyncLogCollector = () => void; +// Warning: (ae-missing-release-tag) "withLogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "withLogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "withLogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "withLogCollector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function withLogCollector( callback: AsyncLogCollector, diff --git a/packages/test-utils/api-report.md b/packages/test-utils/api-report.md index 57020e6221..d85db1feb7 100644 --- a/packages/test-utils/api-report.md +++ b/packages/test-utils/api-report.md @@ -15,6 +15,9 @@ import { RouteRef } from '@backstage/core-plugin-api'; import { StorageApi } from '@backstage/core-plugin-api'; import { StorageValueChange } from '@backstage/core-plugin-api'; +// Warning: (ae-forgotten-export) The symbol "Breakpoint" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "mockBreakpoint" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function mockBreakpoint( initialBreakpoint?: Breakpoint, @@ -23,14 +26,19 @@ export function mockBreakpoint( remove(): void; }; +// Warning: (ae-missing-release-tag) "MockErrorApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class MockErrorApi implements ErrorApi { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options?: Options); // (undocumented) error$(): Observable<{ error: Error; context?: ErrorContext; }>; + // Warning: (ae-forgotten-export) The symbol "ErrorWithContext" needs to be exported by the entry point index.d.ts + // // (undocumented) getErrors(): ErrorWithContext[]; // (undocumented) @@ -39,6 +47,8 @@ export class MockErrorApi implements ErrorApi { waitForError(pattern: RegExp, timeoutMs?: number): Promise; } +// Warning: (ae-missing-release-tag) "MockStorageApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class MockStorageApi implements StorageApi { // (undocumented) @@ -55,11 +65,15 @@ export class MockStorageApi implements StorageApi { set(key: string, data: T): Promise; } +// Warning: (ae-missing-release-tag) "MockStorageBucket" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type MockStorageBucket = { [key: string]: any; }; +// Warning: (ae-missing-release-tag) "msw" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const msw: { setupDefaultHandlers: (worker: { @@ -69,12 +83,17 @@ export const msw: { }) => void; }; +// Warning: (ae-forgotten-export) The symbol "TestAppOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "renderInTestApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function renderInTestApp( Component: ComponentType | ReactNode, options?: TestAppOptions, ): Promise; +// Warning: (ae-missing-release-tag) "wrapInTestApp" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function wrapInTestApp( Component: ComponentType | ReactNode, diff --git a/packages/theme/api-report.md b/packages/theme/api-report.md index e09f5838c7..a3f6f6dd43 100644 --- a/packages/theme/api-report.md +++ b/packages/theme/api-report.md @@ -9,12 +9,19 @@ import { PaletteOptions } from '@material-ui/core/styles/createPalette'; import { Theme } from '@material-ui/core'; import { ThemeOptions } from '@material-ui/core'; +// Warning: (ae-forgotten-export) The symbol "PaletteAdditions" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "BackstagePalette" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstagePalette = Palette & PaletteAdditions; +// Warning: (ae-missing-release-tag) "BackstagePaletteOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstagePaletteOptions = PaletteOptions & PaletteAdditions; +// Warning: (ae-missing-release-tag) "BackstageTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface BackstageTheme extends Theme { // (undocumented) @@ -25,6 +32,8 @@ export interface BackstageTheme extends Theme { palette: BackstagePalette; } +// Warning: (ae-missing-release-tag) "BackstageThemeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface BackstageThemeOptions extends ThemeOptions { // (undocumented) @@ -35,29 +44,45 @@ export interface BackstageThemeOptions extends ThemeOptions { palette: BackstagePaletteOptions; } +// Warning: (ae-missing-release-tag) "colorVariants" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const colorVariants: Record; +// Warning: (ae-missing-release-tag) "createTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createTheme(options: SimpleThemeOptions): BackstageTheme; +// Warning: (ae-missing-release-tag) "createThemeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createThemeOptions( options: SimpleThemeOptions, ): BackstageThemeOptions; +// Warning: (ae-missing-release-tag) "createThemeOverrides" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createThemeOverrides(theme: BackstageTheme): Overrides; +// Warning: (ae-missing-release-tag) "darkTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const darkTheme: BackstageTheme; +// Warning: (ae-missing-release-tag) "genPageTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function genPageTheme(colors: string[], shape: string): PageTheme; +// Warning: (ae-missing-release-tag) "lightTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const lightTheme: BackstageTheme; +// Warning: (ae-missing-release-tag) "PageTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PageTheme = { colors: string[]; @@ -65,17 +90,25 @@ export type PageTheme = { backgroundImage: string; }; +// Warning: (ae-missing-release-tag) "pageTheme" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const pageTheme: Record; +// Warning: (ae-missing-release-tag) "PageThemeSelector" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PageThemeSelector = { themeId: string; }; +// Warning: (ae-missing-release-tag) "shapes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const shapes: Record; +// Warning: (ae-missing-release-tag) "SimpleThemeOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type SimpleThemeOptions = { palette: BackstagePaletteOptions; diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index 9135443ac9..bcb21865c1 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-api-docs +## 0.6.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@0.6.7 + - @backstage/plugin-catalog-react@0.3.0 + ## 0.6.1 ### Patch Changes diff --git a/plugins/api-docs/api-report.md b/plugins/api-docs/api-report.md index bb83d4c539..a368cf5675 100644 --- a/plugins/api-docs/api-report.md +++ b/plugins/api-docs/api-report.md @@ -16,9 +16,14 @@ import { RouteRef } from '@backstage/core-plugin-api'; import { TableColumn } from '@backstage/core-components'; import { UserListFilterKind } from '@backstage/plugin-catalog-react'; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// 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: (_: Props) => 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; @@ -27,9 +32,14 @@ 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 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< { @@ -42,12 +52,17 @@ const apiDocsPlugin: BackstagePlugin< export { apiDocsPlugin }; export { apiDocsPlugin as plugin }; +// Warning: (ae-forgotten-export) The symbol "ApiExplorerPageProps" needs to be exported by the entry point index.d.ts +// 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: ({ initiallySelectedFilter, columns, }: ApiExplorerPageProps) => 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, @@ -55,23 +70,38 @@ export const ApiTypeTitle: ({ apiEntity: ApiEntity; }) => 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) "AsyncApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const AsyncApiDefinitionWidget: ({ definition }: Props_5) => 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) "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_2) => 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_6) => JSX.Element; +// 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: (_: { apiEntity?: ApiEntity | undefined; }) => 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, @@ -80,6 +110,8 @@ export const EntityConsumedApisCard: ({ variant?: 'gridItem' | 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, @@ -88,6 +120,8 @@ export const EntityConsumingComponentsCard: ({ variant?: 'gridItem' | 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, @@ -95,6 +129,8 @@ export const EntityHasApisCard: ({ variant?: 'gridItem' | 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, @@ -103,6 +139,8 @@ export const EntityProvidedApisCard: ({ variant?: 'gridItem' | 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, @@ -111,21 +149,36 @@ export const EntityProvidingComponentsCard: ({ variant?: 'gridItem' | 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) "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_3) => 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) "OpenApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const OpenApiDefinitionWidget: ({ definition }: Props_8) => 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) "PlainApiDefinitionWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const PlainApiDefinitionWidget: ({ definition, language, }: Props_9) => 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) "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_4) => 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_7) => JSX.Element; diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 3e667d6528..7d4edc41f8 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-api-docs", - "version": "0.6.1", + "version": "0.6.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,8 +33,8 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog": "^0.6.6", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog": "^0.6.7", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-icons/font": "^1.0.2", "@material-ui/core": "^4.11.0", @@ -51,9 +51,9 @@ "swagger-ui-react": "^3.37.2" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 144d641d2c..34addac443 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-app-backend +## 0.3.15 + +### Patch Changes + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + - @backstage/config-loader@0.6.5 + ## 0.3.14 ### Patch Changes diff --git a/plugins/app-backend/api-report.md b/plugins/app-backend/api-report.md index 7215366ebb..8c674b34e2 100644 --- a/plugins/app-backend/api-report.md +++ b/plugins/app-backend/api-report.md @@ -7,9 +7,13 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger as Logger_2 } 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 { appPackageName: string; diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index cd5b62dfb4..5101913a26 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-app-backend", - "version": "0.3.14", + "version": "0.3.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,8 +29,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.3", - "@backstage/config-loader": "^0.6.4", + "@backstage/backend-common": "^0.8.6", + "@backstage/config-loader": "^0.6.5", "@backstage/config": "^0.1.5", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -40,7 +40,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.7.1", + "@backstage/cli": "^0.7.4", "@types/supertest": "^2.0.8", "msw": "^0.29.0", "supertest": "^6.1.3" diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index dd96bee3cc..362eda35a7 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-backend +## 0.3.17 + +### Patch Changes + +- 40b3c60e2: Configuration updates for the `OpenID Connect` auth provider to allow `prompt` configuration and some sensible defaults. +- f55f9df10: Add Sign In and Handler resolver for Microsoft provider +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + ## 0.3.16 ### Patch Changes diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index 50341c0392..174d640031 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -14,11 +14,15 @@ import { PluginEndpointDiscovery } from '@backstage/backend-common'; import { Profile } from 'passport'; import { UserEntity } from '@backstage/catalog-model'; +// 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: AuthProviderFactoryOptions, ) => AuthProviderRouteHandlers; +// Warning: (ae-missing-release-tag) "AuthProviderFactoryOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AuthProviderFactoryOptions = { providerId: string; @@ -31,14 +35,38 @@ export type AuthProviderFactoryOptions = { identityResolver?: ExperimentalIdentityResolver; }; +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// 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 { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' frameHandler(req: express.Request, res: express.Response): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' logout?(req: express.Request, res: express.Response): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' refresh?(req: express.Request, res: express.Response): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' start(req: express.Request, res: express.Response): Promise; } +// Warning: (ae-missing-release-tag) "AuthResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AuthResponse = { providerInfo: ProviderInfo; @@ -46,6 +74,8 @@ export type AuthResponse = { backstageIdentity?: BackstageIdentity; }; +// Warning: (ae-missing-release-tag) "BackstageIdentity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BackstageIdentity = { id: string; @@ -54,16 +84,22 @@ export type BackstageIdentity = { entity?: Entity; }; +// Warning: (ae-missing-release-tag) "createGoogleProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createGoogleProvider: ( options?: GoogleProviderOptions | undefined, ) => AuthProviderFactory; +// Warning: (ae-missing-release-tag) "createMicrosoftProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createMicrosoftProvider: ( options?: MicrosoftProviderOptions | undefined, ) => AuthProviderFactory; +// 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({ logger, @@ -73,20 +109,31 @@ export function createRouter({ providerFactories, }: RouterOptions): Promise; +// Warning: (ae-missing-release-tag) "factories" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) 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; +// Warning: (ae-forgotten-export) The symbol "SignInResolver" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "googleEmailSignInResolver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const googleEmailSignInResolver: SignInResolver; +// Warning: (ae-missing-release-tag) "GoogleProviderOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GoogleProviderOptions = { authHandler?: AuthHandler; @@ -95,6 +142,8 @@ export type GoogleProviderOptions = { }; }; +// Warning: (ae-missing-release-tag) "IdentityClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class IdentityClient { constructor(options: { discovery: PluginEndpointDiscovery; issuer: string }); @@ -107,9 +156,13 @@ export class IdentityClient { }>; } +// Warning: (ae-missing-release-tag) "microsoftEmailSignInResolver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const microsoftEmailSignInResolver: SignInResolver; +// Warning: (ae-missing-release-tag) "MicrosoftProviderOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type MicrosoftProviderOptions = { authHandler?: AuthHandler; @@ -118,11 +171,15 @@ export type MicrosoftProviderOptions = { }; }; +// 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); // (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, @@ -140,6 +197,8 @@ 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 class OAuthEnvironmentHandler implements AuthProviderRouteHandlers { constructor(handlers: Map); @@ -158,8 +217,12 @@ export class OAuthEnvironmentHandler implements AuthProviderRouteHandlers { start(req: express.Request, res: express.Response): Promise; } +// Warning: (ae-missing-release-tag) "OAuthHandlers" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface OAuthHandlers { + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' handler( req: express.Request, ): Promise<{ @@ -167,10 +230,20 @@ export interface OAuthHandlers { refreshToken?: string; }>; logout?(): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' refresh?(req: OAuthRefreshRequest): Promise>; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (ae-forgotten-export) The symbol "RedirectInfo" needs to be exported by the entry point index.d.ts 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; @@ -180,6 +253,8 @@ export type OAuthProviderInfo = { refreshToken?: 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; @@ -187,15 +262,21 @@ 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; refreshToken: string; }; +// Warning: (ae-missing-release-tag) "OAuthResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type OAuthResponse = AuthResponse; +// 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; @@ -208,18 +289,24 @@ 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 OAuthState = { nonce: string; env: string; }; +// 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, @@ -227,6 +314,8 @@ export const postMessageResponse: ( response: WebMessageResponse, ) => void; +// Warning: (ae-missing-release-tag) "ProfileInfo" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type ProfileInfo = { email?: string; @@ -234,9 +323,13 @@ export type ProfileInfo = { picture?: string; }; +// 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) @@ -247,13 +340,19 @@ export interface RouterOptions { discovery: PluginEndpointDiscovery; // (undocumented) logger: Logger_2; + // Warning: (ae-forgotten-export) The symbol "ProviderFactories" needs to be exported by the entry point index.d.ts + // // (undocumented) providerFactories?: ProviderFactories; } +// 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 = | { @@ -265,5 +364,13 @@ export type WebMessageResponse = error: Error; }; +// Warnings were encountered during analysis: +// +// src/providers/google/provider.d.ts:36:5 - (ae-forgotten-export) The symbol "AuthHandler" needs to be exported by the entry point index.d.ts +// src/providers/types.d.ts:105:5 - (ae-forgotten-export) The symbol "AuthProviderConfig" needs to be exported by the entry point index.d.ts +// src/providers/types.d.ts:108:5 - (ae-forgotten-export) The symbol "TokenIssuer" needs to be exported by the entry point index.d.ts +// src/providers/types.d.ts:111:5 - (ae-forgotten-export) The symbol "ExperimentalIdentityResolver" needs to be exported by the entry point index.d.ts +// src/providers/types.d.ts:128:8 - (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 0b108e11cd..6e2e35997e 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend", - "version": "0.3.16", + "version": "0.3.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/catalog-client": "^0.3.16", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", @@ -68,7 +68,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/express-session": "^1.17.2", diff --git a/plugins/auth-backend/src/providers/oidc/provider.ts b/plugins/auth-backend/src/providers/oidc/provider.ts index 7a13d04a93..306adc70f5 100644 --- a/plugins/auth-backend/src/providers/oidc/provider.ts +++ b/plugins/auth-backend/src/providers/oidc/provider.ts @@ -56,26 +56,33 @@ type AuthResult = { export type Options = OAuthProviderOptions & { metadataUrl: string; scope?: string; + prompt?: string; tokenSignedResponseAlg?: string; }; export class OidcAuthProvider implements OAuthHandlers { private readonly implementation: Promise; private readonly scope?: string; + private readonly prompt?: string; constructor(options: Options) { this.implementation = this.setupStrategy(options); this.scope = options.scope; + this.prompt = options.prompt; } async start(req: OAuthStartRequest): Promise { const { strategy } = await this.implementation; - return await executeRedirectStrategy(req, strategy, { + const options: Record = { accessType: 'offline', - prompt: 'none', - scope: req.scope || this.scope || '', + scope: req.scope || this.scope || 'openid profile email', state: encodeState(req.state), - }); + }; + const prompt = this.prompt || 'none'; + if (prompt !== 'auto') { + options.prompt = prompt; + } + return await executeRedirectStrategy(req, strategy, options); } async handler( @@ -190,10 +197,11 @@ export const createOidcProvider = ( const clientSecret = envConfig.getString('clientSecret'); const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; const metadataUrl = envConfig.getString('metadataUrl'); - const tokenSignedResponseAlg = envConfig.getString( + const tokenSignedResponseAlg = envConfig.getOptionalString( 'tokenSignedResponseAlg', ); const scope = envConfig.getOptionalString('scope'); + const prompt = envConfig.getOptionalString('prompt'); const provider = new OidcAuthProvider({ clientId, @@ -202,6 +210,7 @@ export const createOidcProvider = ( tokenSignedResponseAlg, metadataUrl, scope, + prompt, }); return OAuthAdapter.fromConfig(globalConfig, provider, { diff --git a/plugins/badges-backend/api-report.md b/plugins/badges-backend/api-report.md index 19f5a956e4..5723a3f0b8 100644 --- a/plugins/badges-backend/api-report.md +++ b/plugins/badges-backend/api-report.md @@ -9,6 +9,8 @@ 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; @@ -21,6 +23,8 @@ 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', @@ -30,6 +34,8 @@ 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; @@ -37,6 +43,8 @@ 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) @@ -47,29 +55,39 @@ 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; @@ -78,15 +96,23 @@ 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); @@ -98,6 +124,8 @@ export class DefaultBadgeBuilder implements BadgeBuilder { getBadges(): 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/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index e855201853..c6f4b82596 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-badges +## 0.2.5 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.4 ### Patch Changes diff --git a/plugins/badges/api-report.md b/plugins/badges/api-report.md index 7e70f65b0e..9005e34c43 100644 --- a/plugins/badges/api-report.md +++ b/plugins/badges/api-report.md @@ -7,9 +7,13 @@ 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, diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 67e2ef90e3..2009457705 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-badges", - "version": "0.2.4", + "version": "0.2.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,7 +24,7 @@ "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/errors": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -35,9 +35,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index ab9d842f1f..388f7ecd27 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-bitrise +## 0.1.7 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/bitrise/api-report.md b/plugins/bitrise/api-report.md index 66adb0ec68..4d39353113 100644 --- a/plugins/bitrise/api-report.md +++ b/plugins/bitrise/api-report.md @@ -8,12 +8,18 @@ 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 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 a73fa64797..cf7a5d33e1 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bitrise", - "version": "0.1.6", + "version": "0.1.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -38,9 +38,9 @@ "recharts": "^1.8.5" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index bd090ff847..8974e896ff 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.2.1 + +### Patch Changes + +- afe3e4b54: Expose missing types used by the custom transformers +- Updated dependencies + - @backstage/plugin-catalog-backend@0.13.0 + ## 0.2.0 ### Minor Changes diff --git a/plugins/catalog-backend-module-ldap/api-report.md b/plugins/catalog-backend-module-ldap/api-report.md index f18ace927c..5e713eee09 100644 --- a/plugins/catalog-backend-module-ldap/api-report.md +++ b/plugins/catalog-backend-module-ldap/api-report.md @@ -15,6 +15,8 @@ import { SearchEntry } from 'ldapjs'; import { SearchOptions } from 'ldapjs'; import { UserEntity } from '@backstage/catalog-model'; +// Warning: (ae-missing-release-tag) "defaultGroupTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function defaultGroupTransformer( vendor: LdapVendor, @@ -22,6 +24,8 @@ export function defaultGroupTransformer( entry: SearchEntry, ): Promise; +// Warning: (ae-missing-release-tag) "defaultUserTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function defaultUserTransformer( vendor: LdapVendor, @@ -29,6 +33,8 @@ export function defaultUserTransformer( entry: SearchEntry, ): Promise; +// Warning: (ae-missing-release-tag) "GroupConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type GroupConfig = { dn: string; @@ -49,6 +55,12 @@ export type GroupConfig = { }; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration +// Warning: (ae-missing-release-tag) "GroupTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type GroupTransformer = ( vendor: LdapVendor, @@ -56,18 +68,28 @@ export type GroupTransformer = ( group: SearchEntry, ) => Promise; +// Warning: (ae-missing-release-tag) "LDAP_DN_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const LDAP_DN_ANNOTATION = 'backstage.io/ldap-dn'; +// Warning: (ae-missing-release-tag) "LDAP_RDN_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const LDAP_RDN_ANNOTATION = 'backstage.io/ldap-rdn'; +// Warning: (ae-missing-release-tag) "LDAP_UUID_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const LDAP_UUID_ANNOTATION = 'backstage.io/ldap-uuid'; +// Warning: (ae-missing-release-tag) "LdapClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class LdapClient { constructor(client: Client); + // Warning: (ae-forgotten-export) The symbol "BindConfig" needs to be exported by the entry point index.d.ts + // // (undocumented) static create( logger: Logger_2, @@ -76,9 +98,13 @@ export class LdapClient { ): Promise; getRootDSE(): Promise; getVendor(): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen search(dn: string, options: SearchOptions): Promise; } +// Warning: (ae-missing-release-tag) "LdapOrgReaderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class LdapOrgReaderProcessor implements CatalogProcessor { constructor(options: { @@ -104,6 +130,8 @@ export class LdapOrgReaderProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "LdapProviderConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type LdapProviderConfig = { target: string; @@ -112,6 +140,8 @@ export type LdapProviderConfig = { groups: GroupConfig; }; +// Warning: (ae-missing-release-tag) "LdapVendor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type LdapVendor = { dnAttributeName: string; @@ -119,6 +149,12 @@ export type LdapVendor = { decodeStringAttribute: (entry: SearchEntry, name: string) => string[]; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "mapStringAttr" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function mapStringAttr( entry: SearchEntry, @@ -127,9 +163,18 @@ export function mapStringAttr( setter: (value: string) => void, ): void; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readLdapConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readLdapConfig(config: Config): LdapProviderConfig[]; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "readLdapOrg" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function readLdapOrg( client: LdapClient, @@ -145,6 +190,8 @@ export function readLdapOrg( groups: GroupEntity[]; }>; +// Warning: (ae-missing-release-tag) "UserConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type UserConfig = { dn: string; @@ -163,6 +210,12 @@ export type UserConfig = { }; }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-undefined-tag) The TSDoc tag "@return" is not defined in this configuration +// Warning: (ae-missing-release-tag) "UserTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type UserTransformer = ( vendor: LdapVendor, @@ -170,5 +223,10 @@ export type UserTransformer = ( user: SearchEntry, ) => Promise; +// Warnings were encountered during analysis: +// +// src/ldap/vendors.d.ts:17:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ldap/vendors.d.ts:18:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 27969ca463..7544642f3d 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", - "version": "0.2.0", + "version": "0.2.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,14 +30,14 @@ "dependencies": { "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", - "@backstage/plugin-catalog-backend": "^0.12.0", + "@backstage/plugin-catalog-backend": "^0.13.0", "@types/ldapjs": "^1.0.10", "ldapjs": "^2.2.0", "lodash": "^4.17.15", "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/test-utils": "^0.1.13", "@types/lodash": "^4.14.151", "msw": "^0.29.0" diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index 1f23da520f..a719fd0f46 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.2.2 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-backend@0.13.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/api-report.md b/plugins/catalog-backend-module-msgraph/api-report.md index 1fae2731ad..91f8180e94 100644 --- a/plugins/catalog-backend-module-msgraph/api-report.md +++ b/plugins/catalog-backend-module-msgraph/api-report.md @@ -13,45 +13,63 @@ import * as MicrosoftGraph from '@microsoft/microsoft-graph-types'; import * as msal from '@azure/msal-node'; import { UserEntity } from '@backstage/catalog-model'; +// Warning: (ae-missing-release-tag) "defaultGroupTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function defaultGroupTransformer( group: MicrosoftGraph.Group, groupPhoto?: string, ): Promise; +// Warning: (ae-missing-release-tag) "defaultOrganizationTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function defaultOrganizationTransformer( organization: MicrosoftGraph.Organization, ): Promise; +// Warning: (ae-missing-release-tag) "defaultUserTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function defaultUserTransformer( user: MicrosoftGraph.User, userPhoto?: string, ): Promise; +// Warning: (ae-missing-release-tag) "GroupTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GroupTransformer = ( group: MicrosoftGraph.Group, groupPhoto?: string, ) => Promise; +// Warning: (ae-missing-release-tag) "MICROSOFT_GRAPH_GROUP_ID_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const MICROSOFT_GRAPH_GROUP_ID_ANNOTATION = 'graph.microsoft.com/group-id'; +// Warning: (ae-missing-release-tag) "MICROSOFT_GRAPH_TENANT_ID_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const MICROSOFT_GRAPH_TENANT_ID_ANNOTATION = 'graph.microsoft.com/tenant-id'; +// Warning: (ae-missing-release-tag) "MICROSOFT_GRAPH_USER_ID_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const MICROSOFT_GRAPH_USER_ID_ANNOTATION = 'graph.microsoft.com/user-id'; +// Warning: (ae-missing-release-tag) "MicrosoftGraphClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class MicrosoftGraphClient { constructor(baseUrl: string, pca: msal.ConfidentialClientApplication); // (undocumented) static create(config: MicrosoftGraphProviderConfig): MicrosoftGraphClient; + // Warning: (ae-forgotten-export) The symbol "GroupMember" needs to be exported by the entry point index.d.ts + // // (undocumented) getGroupMembers(groupId: string): AsyncIterable; // (undocumented) @@ -78,12 +96,16 @@ export class MicrosoftGraphClient { getUsers(query?: ODataQuery): AsyncIterable; // (undocumented) requestApi(path: string, query?: ODataQuery): Promise; + // Warning: (ae-forgotten-export) The symbol "ODataQuery" needs to be exported by the entry point index.d.ts + // // (undocumented) requestCollection(path: string, query?: ODataQuery): AsyncIterable; // (undocumented) requestRaw(url: string): Promise; } +// Warning: (ae-missing-release-tag) "MicrosoftGraphOrgReaderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class MicrosoftGraphOrgReaderProcessor implements CatalogProcessor { constructor(options: { @@ -107,6 +129,8 @@ export class MicrosoftGraphOrgReaderProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "MicrosoftGraphProviderConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type MicrosoftGraphProviderConfig = { target: string; @@ -118,19 +142,27 @@ export type MicrosoftGraphProviderConfig = { groupFilter?: string; }; +// Warning: (ae-missing-release-tag) "normalizeEntityName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function normalizeEntityName(name: string): string; +// Warning: (ae-missing-release-tag) "OrganizationTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type OrganizationTransformer = ( organization: MicrosoftGraph.Organization, ) => Promise; +// Warning: (ae-missing-release-tag) "readMicrosoftGraphConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function readMicrosoftGraphConfig( config: Config, ): MicrosoftGraphProviderConfig[]; +// Warning: (ae-missing-release-tag) "readMicrosoftGraphOrg" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function readMicrosoftGraphOrg( client: MicrosoftGraphClient, @@ -146,11 +178,17 @@ export function readMicrosoftGraphOrg( groups: GroupEntity[]; }>; +// Warning: (ae-missing-release-tag) "UserTransformer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type UserTransformer = ( user: MicrosoftGraph.User, userPhoto?: string, ) => Promise; +// Warnings were encountered during analysis: +// +// src/microsoftGraph/config.d.ts:28:8 - (tsdoc-undefined-tag) The TSDoc tag "@visibility" is not defined in this configuration + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 3d24b9efd6..e5b167695f 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", - "version": "0.2.1", + "version": "0.2.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "@azure/msal-node": "^1.1.0", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", - "@backstage/plugin-catalog-backend": "^0.12.0", + "@backstage/plugin-catalog-backend": "^0.13.0", "@microsoft/microsoft-graph-types": "^1.25.0", "cross-fetch": "^3.0.6", "lodash": "^4.17.15", @@ -40,8 +40,8 @@ "qs": "^6.9.4" }, "devDependencies": { - "@backstage/backend-common": "^0.8.5", - "@backstage/cli": "^0.7.3", + "@backstage/backend-common": "^0.8.6", + "@backstage/cli": "^0.7.4", "@backstage/test-utils": "^0.1.14", "@types/lodash": "^4.14.151", "msw": "^0.29.0" diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index bc8de4878d..daa6c5a0e8 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,36 @@ # @backstage/plugin-catalog-backend +## 0.13.0 + +### Minor Changes + +- 8bfc0571c: Add a default catalog value for BitBucketDiscoveryProcessor. This allows to have a target like so: https://bitbucket.mycompany.com/projects/backstage/repos/service-* + which will be expanded to https://bitbucket.mycompany.com/projects/backstage/repos/service-a/catalog-info.yaml given that repository 'service-a' exists. + + ## Migration + + If you are using a custom [Bitbucket parser](https://backstage.io/docs/integrations/bitbucket/discovery#custom-repository-processing) and your `bitbucket-discovery` target (e.g. in your app-config.yaml) omits the catalog path in any of the following ways: + + - https://bitbucket.mycompany.com/projects/backstage/repos/service-* + - https://bitbucket.mycompany.com/projects/backstage/repos/* + - https://bitbucket.mycompany.com/projects/backstage/repos/*/ + + then you will be affected by this change. + The 'target' input to your parser before this commit would be '/', and after this commit it will be '/catalog-info.yaml', and as such needs to be handled to maintain the same functionality. + +### Patch Changes + +- 8b048934b: The codeowners processor extracts the username of the primary owner and uses this as the owner field. + Given the kind isn't specified this is assumed to be a group and so the link to the owner in the about card + doesn't work. This change specifies the kind where the entity is a user. e.g: + + `@iain-b` -> `user:iain-b` + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + - @backstage/plugin-search-backend-node@0.4.0 + ## 0.12.0 ### Minor Changes diff --git a/plugins/catalog-backend/api-report.md b/plugins/catalog-backend/api-report.md index ae7559f5d1..0bf7831c6d 100644 --- a/plugins/catalog-backend/api-report.md +++ b/plugins/catalog-backend/api-report.md @@ -30,25 +30,34 @@ import { ScmIntegrations } from '@backstage/integration'; import { UrlReader } from '@backstage/backend-common'; import { Validators } from '@backstage/catalog-model'; +// Warning: (ae-missing-release-tag) "AddLocationResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AddLocationResult = { location: Location_2; entities: Entity[]; }; +// Warning: (ae-missing-release-tag) "AnalyzeLocationRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AnalyzeLocationRequest = { location: LocationSpec; }; +// Warning: (ae-missing-release-tag) "AnalyzeLocationResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AnalyzeLocationResponse = { existingEntityFiles: AnalyzeLocationExistingEntity[]; generateEntities: AnalyzeLocationGenerateEntity[]; }; +// Warning: (ae-missing-release-tag) "AnnotateLocationEntityProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class AnnotateLocationEntityProcessor implements CatalogProcessor { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options_2); // (undocumented) preProcessEntity( @@ -59,6 +68,8 @@ export class AnnotateLocationEntityProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "AnnotateScmSlugEntityProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class AnnotateScmSlugEntityProcessor implements CatalogProcessor { constructor(opts: { scmIntegrationRegistry: ScmIntegrationRegistry }); @@ -68,6 +79,8 @@ export class AnnotateScmSlugEntityProcessor implements CatalogProcessor { preProcessEntity(entity: Entity, location: LocationSpec): Promise; } +// Warning: (ae-missing-release-tag) "AwsOrganizationCloudAccountProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class AwsOrganizationCloudAccountProcessor implements CatalogProcessor { constructor(options: { @@ -98,6 +111,8 @@ export class AwsOrganizationCloudAccountProcessor implements CatalogProcessor { normalizeName(name: string): string; // (undocumented) organizations: Organizations; + // Warning: (ae-forgotten-export) The symbol "AwsOrganizationProviderConfig" needs to be exported by the entry point index.d.ts + // // (undocumented) provider: AwsOrganizationProviderConfig; // (undocumented) @@ -108,6 +123,8 @@ export class AwsOrganizationCloudAccountProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "BitbucketDiscoveryProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class BitbucketDiscoveryProcessor implements CatalogProcessor { constructor(options: { @@ -131,6 +148,8 @@ export class BitbucketDiscoveryProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "BitbucketRepositoryParser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type BitbucketRepositoryParser = (options: { integration: BitbucketIntegration; @@ -138,6 +157,8 @@ export type BitbucketRepositoryParser = (options: { logger: Logger_2; }) => AsyncIterable; +// Warning: (ae-missing-release-tag) "BuiltinKindsEntityProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class BuiltinKindsEntityProcessor implements CatalogProcessor { // (undocumented) @@ -150,10 +171,14 @@ export class BuiltinKindsEntityProcessor implements CatalogProcessor { validateEntityKind(entity: Entity): Promise; } +// Warning: (ae-missing-release-tag) "CatalogBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class CatalogBuilder { constructor(env: CatalogEnvironment); + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addEntityPolicy(...policies: EntityPolicy[]): CatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addProcessor(...processors: CatalogProcessor[]): CatalogBuilder; build(): Promise<{ entitiesCatalog: EntitiesCatalog; @@ -161,18 +186,28 @@ export class CatalogBuilder { higherOrderOperation: HigherOrderOperation; locationAnalyzer: LocationAnalyzer; }>; + // Warning: (ae-forgotten-export) The symbol "CatalogEnvironment" needs to be exported by the entry point index.d.ts + // // (undocumented) static create(env: CatalogEnvironment): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen replaceEntityPolicies(policies: EntityPolicy[]): CatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen replaceProcessors(processors: CatalogProcessor[]): CatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen setEntityDataParser(parser: CatalogProcessorParser): CatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen setFieldFormatValidators(validators: Partial): CatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen setPlaceholderResolver( key: string, resolver: PlaceholderResolver, ): CatalogBuilder; } +// Warning: (ae-missing-release-tag) "CatalogEntityDocument" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface CatalogEntityDocument extends IndexableDocument { // (undocumented) @@ -187,12 +222,16 @@ export interface CatalogEntityDocument extends IndexableDocument { owner: string; } +// Warning: (ae-missing-release-tag) "CatalogProcessingOrchestrator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface CatalogProcessingOrchestrator { // (undocumented) process(request: EntityProcessingRequest): Promise; } +// Warning: (ae-missing-release-tag) "CatalogProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessor = { readLocation?( @@ -220,9 +259,13 @@ export type CatalogProcessor = { ): Promise; }; +// Warning: (ae-missing-release-tag) "CatalogProcessorEmit" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessorEmit = (generated: CatalogProcessorResult) => void; +// Warning: (ae-missing-release-tag) "CatalogProcessorEntityResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessorEntityResult = { type: 'entity'; @@ -230,6 +273,8 @@ export type CatalogProcessorEntityResult = { location: LocationSpec; }; +// Warning: (ae-missing-release-tag) "CatalogProcessorErrorResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessorErrorResult = { type: 'error'; @@ -237,6 +282,8 @@ export type CatalogProcessorErrorResult = { location: LocationSpec; }; +// Warning: (ae-missing-release-tag) "CatalogProcessorLocationResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessorLocationResult = { type: 'location'; @@ -244,12 +291,16 @@ export type CatalogProcessorLocationResult = { optional: boolean; }; +// Warning: (ae-missing-release-tag) "CatalogProcessorParser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type CatalogProcessorParser = (options: { data: Buffer; location: LocationSpec; }) => AsyncIterable; +// Warning: (ae-missing-release-tag) "CatalogProcessorRelationResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessorRelationResult = { type: 'relation'; @@ -257,6 +308,8 @@ export type CatalogProcessorRelationResult = { entityRef?: string; }; +// Warning: (ae-missing-release-tag) "CatalogProcessorResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogProcessorResult = | CatalogProcessorLocationResult @@ -264,6 +317,8 @@ export type CatalogProcessorResult = | CatalogProcessorRelationResult | CatalogProcessorErrorResult; +// Warning: (ae-missing-release-tag) "CodeOwnersProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class CodeOwnersProcessor implements CatalogProcessor { constructor(options: { @@ -283,6 +338,8 @@ export class CodeOwnersProcessor implements CatalogProcessor { preProcessEntity(entity: Entity, location: LocationSpec): Promise; } +// Warning: (ae-missing-release-tag) "CommonDatabase" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class CommonDatabase implements Database { constructor(database: Knex, logger: Logger_2); @@ -291,11 +348,15 @@ export class CommonDatabase implements Database { txOpaque: Transaction, request: DbEntityRequest[], ): Promise; + // Warning: (ae-forgotten-export) The symbol "DbLocationsRow" needs to be exported by the entry point index.d.ts + // // (undocumented) addLocation( txOpaque: Transaction, location: Location_2, ): Promise; + // Warning: (ae-forgotten-export) The symbol "DatabaseLocationUpdateLogStatus" needs to be exported by the entry point index.d.ts + // // (undocumented) addLocationUpdateLogEvent( locationId: string, @@ -303,6 +364,9 @@ export class CommonDatabase implements Database { entityName?: string | string[], message?: string, ): Promise; + // Warning: (ae-forgotten-export) The symbol "DbEntitiesRequest" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "DbEntitiesResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) entities( txOpaque: Transaction, @@ -318,8 +382,12 @@ export class CommonDatabase implements Database { txOpaque: Transaction, uid: string, ): Promise; + // Warning: (ae-forgotten-export) The symbol "DbLocationsRowWithStatus" needs to be exported by the entry point index.d.ts + // // (undocumented) location(id: string): Promise; + // Warning: (ae-forgotten-export) The symbol "DatabaseLocationUpdateLogEvent" needs to be exported by the entry point index.d.ts + // // (undocumented) locationHistory(id: string): Promise; // (undocumented) @@ -345,14 +413,21 @@ export class CommonDatabase implements Database { ): Promise; } +// Warning: (ae-forgotten-export) The symbol "RouterOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createNextRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createNextRouter( options: RouterOptions_2, ): 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) "Database" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type Database = { transaction(fn: (tx: Transaction) => Promise): Promise; @@ -397,9 +472,14 @@ export type Database = { ): Promise; }; +// Warning: (ae-missing-release-tag) "DatabaseEntitiesCatalog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DatabaseEntitiesCatalog implements EntitiesCatalog { constructor(database: Database, logger: Logger_2); + // Warning: (ae-forgotten-export) The symbol "EntityUpsertRequest" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "EntityUpsertResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) batchAddOrUpdateEntities( requests: EntityUpsertRequest[], @@ -409,12 +489,17 @@ export class DatabaseEntitiesCatalog implements EntitiesCatalog { outputEntities?: boolean; }, ): Promise; + // Warning: (ae-forgotten-export) The symbol "EntitiesRequest" needs to be exported by the entry point index.d.ts + // Warning: (ae-forgotten-export) The symbol "EntitiesResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) entities(request?: EntitiesRequest): Promise; // (undocumented) removeEntityByUid(uid: string): Promise; } +// Warning: (ae-missing-release-tag) "DatabaseLocationsCatalog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DatabaseLocationsCatalog implements LocationsCatalog { constructor(database: Database); @@ -424,6 +509,8 @@ export class DatabaseLocationsCatalog implements LocationsCatalog { location(id: string): Promise; // (undocumented) locationHistory(id: string): Promise; + // Warning: (ae-forgotten-export) The symbol "LocationResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) locations(): Promise; // (undocumented) @@ -441,8 +528,12 @@ export class DatabaseLocationsCatalog implements LocationsCatalog { removeLocation(id: string): Promise; } +// Warning: (ae-missing-release-tag) "DatabaseManager" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DatabaseManager { + // Warning: (ae-forgotten-export) The symbol "CreateDatabaseOptions" needs to be exported by the entry point index.d.ts + // // (undocumented) static createDatabase( knex: Knex, @@ -458,6 +549,8 @@ export class DatabaseManager { static createTestDatabaseConnection(): Promise; } +// Warning: (ae-missing-release-tag) "DbEntityRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type DbEntityRequest = { locationId?: string; @@ -465,12 +558,16 @@ export type DbEntityRequest = { relations: EntityRelationSpec[]; }; +// Warning: (ae-missing-release-tag) "DbEntityResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type DbEntityResponse = { locationId?: string; entity: Entity; }; +// Warning: (ae-missing-release-tag) "DefaultCatalogCollator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DefaultCatalogCollator implements DocumentCollator { constructor({ @@ -495,6 +592,8 @@ export class DefaultCatalogCollator implements DocumentCollator { readonly type: string; } +// Warning: (ae-missing-release-tag) "DefaultCatalogProcessingOrchestrator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class DefaultCatalogProcessingOrchestrator implements CatalogProcessingOrchestrator { @@ -509,9 +608,14 @@ export class DefaultCatalogProcessingOrchestrator process(request: EntityProcessingRequest): Promise; } +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "durationText" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function durationText(startTimestamp: [number, number]): string; +// Warning: (ae-missing-release-tag) "EntitiesCatalog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type EntitiesCatalog = { entities(request?: EntitiesRequest): Promise; @@ -526,18 +630,24 @@ export type EntitiesCatalog = { ): Promise; }; +// Warning: (ae-missing-release-tag) "EntitiesSearchFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntitiesSearchFilter = { key: string; matchValueIn?: string[]; }; +// Warning: (ae-missing-release-tag) "entity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function entity( atLocation: LocationSpec, newEntity: Entity, ): CatalogProcessorResult; +// Warning: (ae-missing-release-tag) "EntityFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityFilter = { anyOf: { @@ -545,6 +655,8 @@ export type EntityFilter = { }[]; }; +// Warning: (ae-missing-release-tag) "EntityPagination" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type EntityPagination = { limit?: number; @@ -552,12 +664,16 @@ export type EntityPagination = { after?: string; }; +// Warning: (ae-missing-release-tag) "EntityProcessingRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type EntityProcessingRequest = { entity: Entity; state: Map; }; +// Warning: (ae-missing-release-tag) "EntityProcessingResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type EntityProcessingResult = | { @@ -573,6 +689,8 @@ export type EntityProcessingResult = errors: Error[]; }; +// Warning: (ae-missing-release-tag) "FileReaderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class FileReaderProcessor implements CatalogProcessor { // (undocumented) @@ -583,12 +701,16 @@ export class FileReaderProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "generalError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function generalError( atLocation: LocationSpec, message: string, ): CatalogProcessorResult; +// Warning: (ae-missing-release-tag) "GithubDiscoveryProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class GithubDiscoveryProcessor implements CatalogProcessor { constructor(options: { integrations: ScmIntegrations; logger: Logger_2 }); @@ -629,6 +751,8 @@ export class GithubMultiOrgReaderProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "GithubOrgReaderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class GithubOrgReaderProcessor implements CatalogProcessor { constructor(options: { integrations: ScmIntegrations; logger: Logger_2 }); @@ -647,6 +771,8 @@ export class GithubOrgReaderProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "HigherOrderOperation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type HigherOrderOperation = { addLocation( @@ -658,6 +784,8 @@ export type HigherOrderOperation = { refreshAllLocations(): Promise; }; +// Warning: (ae-missing-release-tag) "HigherOrderOperations" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class HigherOrderOperations implements HigherOrderOperation { constructor( @@ -666,6 +794,7 @@ export class HigherOrderOperations implements HigherOrderOperation { locationReader: LocationReader, logger: Logger_2, ); + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addLocation( spec: LocationSpec, options?: { @@ -675,18 +804,24 @@ export class HigherOrderOperations implements HigherOrderOperation { refreshAllLocations(): Promise; } +// Warning: (ae-missing-release-tag) "inputError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function inputError( atLocation: LocationSpec, message: string, ): CatalogProcessorResult; +// Warning: (ae-missing-release-tag) "location" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function location_2( newLocation: LocationSpec, optional: boolean, ): CatalogProcessorResult; +// Warning: (ae-missing-release-tag) "LocationAnalyzer" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LocationAnalyzer = { analyzeLocation( @@ -694,8 +829,11 @@ export type LocationAnalyzer = { ): Promise; }; +// Warning: (ae-missing-release-tag) "LocationEntityProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class LocationEntityProcessor implements CatalogProcessor { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options_3); // (undocumented) postProcessEntity( @@ -705,18 +843,25 @@ export class LocationEntityProcessor implements CatalogProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "LocationReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LocationReader = { read(location: LocationSpec): Promise; }; +// Warning: (ae-missing-release-tag) "LocationReaders" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class LocationReaders implements LocationReader { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options); // (undocumented) read(location: LocationSpec): Promise; } +// Warning: (ae-missing-release-tag) "LocationsCatalog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type LocationsCatalog = { addLocation(location: Location_2): Promise; @@ -735,11 +880,18 @@ export type LocationsCatalog = { ): Promise; }; +// Warning: (ae-missing-release-tag) "NextCatalogBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class NextCatalogBuilder { + // Warning: (ae-forgotten-export) The symbol "CatalogEnvironment" needs to be exported by the entry point index.d.ts constructor(env: CatalogEnvironment_2); + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addEntityPolicy(...policies: EntityPolicy[]): NextCatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (ae-forgotten-export) The symbol "EntityProvider" needs to be exported by the entry point index.d.ts addEntityProvider(...providers: EntityProvider[]): NextCatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen addProcessor(...processors: CatalogProcessor[]): NextCatalogBuilder; build(): Promise<{ entitiesCatalog: EntitiesCatalog; @@ -748,10 +900,16 @@ export class NextCatalogBuilder { processingEngine: CatalogProcessingEngine; locationService: LocationService; }>; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen replaceEntityPolicies(policies: EntityPolicy[]): NextCatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen replaceProcessors(processors: CatalogProcessor[]): NextCatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen setEntityDataParser(parser: CatalogProcessorParser): NextCatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen setFieldFormatValidators(validators: Partial): NextCatalogBuilder; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen setPlaceholderResolver( key: string, resolver: PlaceholderResolver, @@ -759,30 +917,42 @@ export class NextCatalogBuilder { setRefreshIntervalSeconds(seconds: number): NextCatalogBuilder; } +// Warning: (ae-missing-release-tag) "notFoundError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function notFoundError( atLocation: LocationSpec, message: string, ): CatalogProcessorResult; +// Warning: (ae-missing-release-tag) "parseEntityYaml" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function parseEntityYaml( data: Buffer, location: LocationSpec, ): Iterable; +// Warning: (ae-missing-release-tag) "PlaceholderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class PlaceholderProcessor implements CatalogProcessor { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options_4); // (undocumented) preProcessEntity(entity: Entity, location: LocationSpec): Promise; } +// Warning: (ae-forgotten-export) The symbol "ResolverParams" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "PlaceholderResolver" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PlaceholderResolver = ( params: ResolverParams, ) => Promise; +// Warning: (ae-missing-release-tag) "ReadLocationEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ReadLocationEntity = { location: LocationSpec; @@ -790,18 +960,24 @@ export type ReadLocationEntity = { relations: EntityRelationSpec[]; }; +// Warning: (ae-missing-release-tag) "ReadLocationError" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ReadLocationError = { location: LocationSpec; error: Error; }; +// Warning: (ae-missing-release-tag) "ReadLocationResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ReadLocationResult = { entities: ReadLocationEntity[]; errors: ReadLocationError[]; }; +// Warning: (ae-missing-release-tag) "RecursivePartial" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] @@ -811,6 +987,8 @@ export type RecursivePartial = { : T[P]; }; +// Warning: (ae-missing-release-tag) "relation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function relation(spec: EntityRelationSpec): CatalogProcessorResult; @@ -826,6 +1004,8 @@ declare namespace results { } export { results }; +// 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) @@ -844,9 +1024,15 @@ export interface RouterOptions { logger: Logger_2; } +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-missing-release-tag) "runPeriodically" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function runPeriodically(fn: () => any, delayMs: number): () => void; +// Warning: (ae-missing-release-tag) "StaticLocationProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class StaticLocationProcessor implements StaticLocationProcessor { constructor(staticLocations: LocationSpec[]); @@ -860,13 +1046,18 @@ export class StaticLocationProcessor implements StaticLocationProcessor { ): Promise; } +// Warning: (ae-missing-release-tag) "Transaction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export type Transaction = { rollback(): Promise; }; +// Warning: (ae-missing-release-tag) "UrlReaderProcessor" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class UrlReaderProcessor implements CatalogProcessor { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options_5); // (undocumented) readLocation( @@ -877,5 +1068,48 @@ export class UrlReaderProcessor implements CatalogProcessor { ): Promise; } +// Warnings were encountered during analysis: +// +// src/catalog/types.d.ts:30:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/catalog/types.d.ts:36:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/catalog/types.d.ts:42:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/catalog/types.d.ts:43:8 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters +// src/catalog/types.d.ts:44:8 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters +// src/catalog/types.d.ts:45:8 - (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters +// src/catalog/types.d.ts:75:5 - (ae-forgotten-export) The symbol "LocationUpdateLogEvent" needs to be exported by the entry point index.d.ts +// src/database/types.d.ts:121:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:127:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:128:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:142:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:143:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:144:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:146:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:159:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:160:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/database/types.d.ts:161:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/GithubMultiOrgReaderProcessor.d.ts:23:9 - (ae-forgotten-export) The symbol "GithubMultiOrgConfig" needs to be exported by the entry point index.d.ts +// src/ingestion/processors/types.d.ts:7:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:8:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:9:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:10:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:23:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:24:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:25:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:26:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:36:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:47:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:48:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:49:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:56:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:57:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/processors/types.d.ts:58:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/types.d.ts:17:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/types.d.ts:41:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/ingestion/types.d.ts:49:5 - (ae-forgotten-export) The symbol "AnalyzeLocationExistingEntity" needs to be exported by the entry point index.d.ts +// src/ingestion/types.d.ts:50:5 - (ae-forgotten-export) The symbol "AnalyzeLocationGenerateEntity" needs to be exported by the entry point index.d.ts +// src/next/NextCatalogBuilder.d.ts:140:9 - (ae-forgotten-export) The symbol "CatalogProcessingEngine" needs to be exported by the entry point index.d.ts +// src/next/NextCatalogBuilder.d.ts:141:9 - (ae-forgotten-export) The symbol "LocationService" needs to be exported by the entry point index.d.ts +// src/next/processing/types.d.ts:11:5 - (ae-forgotten-export) The symbol "DeferredEntity" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index a3d0ff14da..10d89c41f2 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend", - "version": "0.12.0", + "version": "0.13.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,13 +29,13 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/catalog-client": "^0.3.16", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", - "@backstage/plugin-search-backend-node": "^0.3.0", + "@backstage/plugin-search-backend-node": "^0.4.0", "@backstage/search-common": "^0.1.2", "@octokit/graphql": "^4.5.8", "@types/express": "^4.17.6", @@ -62,7 +62,7 @@ }, "devDependencies": { "@backstage/backend-test-utils": "^0.1.4", - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/test-utils": "^0.1.14", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.test.ts b/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.test.ts index d33ea7ab26..e2b295e7ff 100644 --- a/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.test.ts @@ -225,6 +225,34 @@ describe('BitbucketDiscoveryProcessor', () => { optional: true, }); }); + + it.each` + target + ${'https://bitbucket.mycompany.com/projects/backstage/repos/*'} + ${'https://bitbucket.mycompany.com/projects/backstage/repos/*/'} + ${'https://bitbucket.mycompany.com/projects/backstage/repos/techdocs-*/'} + `("target '$target' adds default path to catalog", async ({ target }) => { + setupStubs([{ key: 'backstage', repos: ['techdocs-cli'] }]); + + const location: LocationSpec = { + type: 'bitbucket-discovery', + target: target, + }; + + const emitter = jest.fn(); + await processor.readLocation(location, false, emitter); + + expect(emitter).toHaveBeenCalledTimes(1); + expect(emitter).toHaveBeenCalledWith({ + type: 'location', + location: { + type: 'url', + target: + 'https://bitbucket.mycompany.com/projects/backstage/repos/techdocs-cli/browse/catalog-info.yaml', + }, + optional: true, + }); + }); }); describe('Custom repository parser', () => { diff --git a/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts b/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts index 877cd08a3e..9d53b7e5b5 100644 --- a/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts +++ b/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts @@ -84,13 +84,15 @@ export class BitbucketDiscoveryProcessor implements CatalogProcessor { this.logger.info(`Reading Bitbucket repositories from ${location.target}`); const { catalogPath } = parseUrl(location.target); + const expandedCatalogPath = + catalogPath === '/' ? '/catalog-info.yaml' : catalogPath; const result = await readBitbucketOrg(client, location.target); for (const repository of result.matches) { for await (const entity of this.parser({ integration: integration, - target: `${repository.links.self[0].href}${catalogPath}`, + target: `${repository.links.self[0].href}${expandedCatalogPath}`, logger: this.logger, })) { emit(entity); diff --git a/plugins/catalog-graphql/api-report.md b/plugins/catalog-graphql/api-report.md index 67beee09da..ac64559f13 100644 --- a/plugins/catalog-graphql/api-report.md +++ b/plugins/catalog-graphql/api-report.md @@ -7,9 +7,13 @@ import { Config } from '@backstage/config'; import { GraphQLModule } from '@graphql-modules/core'; import { Logger as Logger_2 } from 'winston'; +// 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-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index fb9ae20305..df4bd02cb9 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-catalog-import +## 0.5.13 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.5.12 ### Patch Changes diff --git a/plugins/catalog-import/api-report.md b/plugins/catalog-import/api-report.md index 808d8f1909..ac4360f463 100644 --- a/plugins/catalog-import/api-report.md +++ b/plugins/catalog-import/api-report.md @@ -27,6 +27,8 @@ import { UseControllerOptions } from 'react-hook-form'; import { UseFormMethods } from 'react-hook-form'; import { UseFormOptions } from 'react-hook-form'; +// Warning: (ae-missing-release-tag) "AnalyzeResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type AnalyzeResult = | { @@ -43,6 +45,9 @@ export type AnalyzeResult = generatedEntities: PartialEntity[]; }; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "AutocompleteTextField" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const AutocompleteTextField: ({ name, @@ -58,6 +63,8 @@ export const AutocompleteTextField: ({ textFieldProps, }: Props_4) => JSX.Element; +// Warning: (ae-missing-release-tag) "CatalogImportApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface CatalogImportApi { // (undocumented) @@ -74,9 +81,13 @@ export interface CatalogImportApi { }>; } +// Warning: (ae-missing-release-tag) "catalogImportApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const catalogImportApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "CatalogImportClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class CatalogImportClient implements CatalogImportApi { constructor(options: { @@ -105,9 +116,14 @@ export class CatalogImportClient implements CatalogImportApi { }>; } +// Warning: (ae-forgotten-export) The symbol "StepperProviderOpts" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "CatalogImportPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogImportPage: (opts: StepperProviderOpts) => JSX.Element; +// Warning: (ae-missing-release-tag) "catalogImportPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const catalogImportPlugin: BackstagePlugin< { @@ -118,12 +134,21 @@ const catalogImportPlugin: BackstagePlugin< export { catalogImportPlugin }; export { catalogImportPlugin as plugin }; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-forgotten-export) The symbol "ImportFlows" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "StepperProvider" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "defaultGenerateStepper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function defaultGenerateStepper( flow: ImportFlows, defaults: StepperProvider, ): StepperProvider; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityListComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityListComponent: ({ locations, @@ -134,6 +159,9 @@ export const EntityListComponent: ({ withLinks, }: Props_2) => 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) "ImportStepper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ImportStepper: ({ initialUrl, @@ -142,6 +170,12 @@ export const ImportStepper: ({ opts, }: Props) => JSX.Element; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "PreparePullRequestForm" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const PreparePullRequestForm: < TFieldValues extends Record @@ -151,6 +185,9 @@ export const PreparePullRequestForm: < render, }: Props_5) => 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) "PreviewCatalogInfoComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const PreviewCatalogInfoComponent: ({ repositoryUrl, @@ -158,6 +195,9 @@ export const PreviewCatalogInfoComponent: ({ classes, }: Props_6) => 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) "PreviewPullRequestComponent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const PreviewPullRequestComponent: ({ title, @@ -165,9 +205,17 @@ export const PreviewPullRequestComponent: ({ classes, }: Props_7) => 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: (opts: StepperProviderOpts) => JSX.Element; +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "StepInitAnalyzeUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const StepInitAnalyzeUrl: ({ onAnalysis, @@ -175,6 +223,9 @@ export const StepInitAnalyzeUrl: ({ disablePullRequest, }: Props_3) => 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) "StepPrepareCreatePullRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const StepPrepareCreatePullRequest: ({ analyzeResult, @@ -185,5 +236,9 @@ export const StepPrepareCreatePullRequest: ({ defaultBody, }: Props_8) => JSX.Element; +// Warnings were encountered during analysis: +// +// src/api/CatalogImportApi.d.ts:14:5 - (ae-forgotten-export) The symbol "PartialEntity" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 3b3f441e8a..857dc0a837 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-import", - "version": "0.5.12", + "version": "0.5.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,7 +36,7 @@ "@backstage/core-plugin-api": "^0.1.3", "@backstage/integration": "^0.5.8", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -54,9 +54,9 @@ "yaml": "^1.10.0" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index bffefc4936..aa2636df02 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-react +## 0.3.0 + +### Minor Changes + +- 976b61080: Updated the software templates list page (`ScaffolderPage`) to use the `useEntityListProvider` hook from #5643. This reduces the code footprint, making it easier to customize the display of this page, and consolidates duplicate approaches to querying the catalog with filters. + + - The `useEntityTypeFilter` hook has been updated along with the underlying `EntityTypeFilter` to work with multiple values, to allow more flexibility for different user interfaces. It's unlikely that this change affects you; however, if you're using either of these directly, you'll need to update your usage. + - `SearchToolbar` was renamed to `EntitySearchBar` and moved to `catalog-react` to be usable by other entity list pages + - `UserListPicker` now has an `availableTypes` prop to restrict which user-related options to present + +### Patch Changes + +- d84778c25: Store filter values set in `EntityListProvider` in query parameters. This allows selected filters to be restored when returning to pages that list catalog entities. +- e13f0fb9d: Fix `EntityTypeFilter` so it produces unique case-insensitive set of available types + ## 0.2.6 ### Patch Changes diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 4cc6a017aa..03ee9a391a 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -24,15 +24,23 @@ import { UserEntity } from '@backstage/catalog-model'; export { CatalogApi }; +// Warning: (ae-missing-release-tag) "catalogApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const catalogApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "catalogRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const catalogRouteRef: RouteRef; +// Warning: (ae-missing-release-tag) "createDomainColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createDomainColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createEntityRefColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createEntityRefColumn({ defaultKind, @@ -40,6 +48,8 @@ function createEntityRefColumn({ defaultKind?: string; }): TableColumn; +// Warning: (ae-missing-release-tag) "createEntityRelationColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createEntityRelationColumn({ title, @@ -55,21 +65,33 @@ function createEntityRelationColumn({ }; }): TableColumn; +// Warning: (ae-missing-release-tag) "createMetadataDescriptionColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createMetadataDescriptionColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createOwnerColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createOwnerColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createSpecLifecycleColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createSpecLifecycleColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createSpecTypeColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createSpecTypeColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createSystemColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) function createSystemColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "DefaultEntityFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type DefaultEntityFilters = { kind?: EntityKindFilter; @@ -81,9 +103,14 @@ export type DefaultEntityFilters = { text?: EntityTextFilter; }; +// Warning: (ae-forgotten-export) The symbol "EntityLoadingStatus" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityContext: Context; +// Warning: (ae-missing-release-tag) "EntityFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type EntityFilter = { getCatalogFilters?: () => Record; @@ -91,6 +118,8 @@ export type EntityFilter = { toQueryValue?: () => string | string[]; }; +// Warning: (ae-missing-release-tag) "EntityKindFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class EntityKindFilter implements EntityFilter { constructor(value: string); @@ -102,12 +131,17 @@ export class EntityKindFilter implements EntityFilter { readonly value: string; } +// Warning: (ae-forgotten-export) The symbol "EntityKindFilterProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityKindPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityKindPicker: ({ initialFilter, hidden, }: EntityKindFilterProps) => JSX.Element | null; +// Warning: (ae-missing-release-tag) "EntityLifecycleFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class EntityLifecycleFilter implements EntityFilter { constructor(values: string[]); @@ -119,19 +153,28 @@ export class EntityLifecycleFilter implements EntityFilter { readonly values: string[]; } +// Warning: (ae-missing-release-tag) "EntityLifecyclePicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityLifecyclePicker: () => JSX.Element | null; +// Warning: (ae-forgotten-export) The symbol "EntityListContextProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityListContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityListContext: React_2.Context< EntityListContextProps | undefined >; +// Warning: (ae-missing-release-tag) "EntityListProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityListProvider: ({ children, }: PropsWithChildren<{}>) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityOwnerFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class EntityOwnerFilter implements EntityFilter { constructor(values: string[]); @@ -143,15 +186,23 @@ export class EntityOwnerFilter implements EntityFilter { readonly values: string[]; } +// Warning: (ae-missing-release-tag) "EntityOwnerPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityOwnerPicker: () => JSX.Element | null; +// Warning: (ae-forgotten-export) The symbol "EntityProviderProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityProvider: ({ entity, children, }: EntityProviderProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "EntityRefLinkProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityRefLink" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityRefLink: React_2.ForwardRefExoticComponent< Pick< @@ -440,6 +491,9 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent< React_2.RefAttributes >; +// Warning: (ae-forgotten-export) The symbol "EntityRefLinksProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityRefLinks" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityRefLinks: ({ entityRefs, @@ -447,6 +501,8 @@ export const EntityRefLinks: ({ ...linkProps }: EntityRefLinksProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "entityRoute" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const entityRoute: RouteRef<{ name: string; @@ -454,6 +510,8 @@ export const entityRoute: RouteRef<{ namespace: string; }>; +// Warning: (ae-missing-release-tag) "entityRouteParams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function entityRouteParams( entity: Entity, @@ -463,6 +521,8 @@ export function entityRouteParams( readonly name: string; }; +// Warning: (ae-missing-release-tag) "entityRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const entityRouteRef: RouteRef<{ name: string; @@ -470,15 +530,23 @@ export const entityRouteRef: RouteRef<{ namespace: string; }>; +// Warning: (ae-missing-release-tag) "EntitySearchBar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntitySearchBar: () => JSX.Element; +// Warning: (ae-missing-release-tag) "EntitySourceLocation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type EntitySourceLocation = { locationTargetUrl: string; integrationType?: string; }; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntityTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// Warning: (ae-missing-release-tag) "EntityTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function EntityTable({ entities, @@ -490,7 +558,9 @@ export function EntityTable({ // @public (undocumented) export namespace EntityTable { - var // (undocumented) + 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) systemEntityColumns: TableColumn[]; @@ -498,6 +568,8 @@ export namespace EntityTable { componentEntityColumns: TableColumn[]; } +// Warning: (ae-missing-release-tag) "EntityTagFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class EntityTagFilter implements EntityFilter { constructor(values: string[]); @@ -509,9 +581,13 @@ export class EntityTagFilter implements EntityFilter { readonly values: string[]; } +// Warning: (ae-missing-release-tag) "EntityTagPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityTagPicker: () => JSX.Element | null; +// Warning: (ae-missing-release-tag) "EntityTextFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class EntityTextFilter implements EntityFilter { constructor(value: string); @@ -521,6 +597,8 @@ export class EntityTextFilter implements EntityFilter { readonly value: string; } +// Warning: (ae-missing-release-tag) "EntityTypeFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class EntityTypeFilter implements EntityFilter { constructor(value: string | string[]); @@ -534,9 +612,13 @@ export class EntityTypeFilter implements EntityFilter { readonly value: string | string[]; } +// Warning: (ae-missing-release-tag) "EntityTypePicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityTypePicker: () => JSX.Element | null; +// Warning: (ae-missing-release-tag) "formatEntityRefTitle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function formatEntityRefTitle( entityRef: Entity | EntityName, @@ -545,12 +627,18 @@ export function formatEntityRefTitle( }, ): string; +// Warning: (ae-missing-release-tag) "getEntityMetadataEditUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getEntityMetadataEditUrl(entity: Entity): string | undefined; +// Warning: (ae-missing-release-tag) "getEntityMetadataViewUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getEntityMetadataViewUrl(entity: Entity): string | undefined; +// Warning: (ae-missing-release-tag) "getEntityRelations" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function getEntityRelations( entity: Entity | undefined, @@ -560,15 +648,21 @@ export function getEntityRelations( }, ): EntityName[]; +// Warning: (ae-missing-release-tag) "getEntitySourceLocation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function getEntitySourceLocation( entity: Entity, scmIntegrationsApi: ScmIntegrationRegistry, ): EntitySourceLocation | undefined; +// Warning: (ae-missing-release-tag) "isOwnerOf" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function isOwnerOf(owner: Entity, owned: Entity): boolean; +// Warning: (ae-missing-release-tag) "MockEntityListContextProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const MockEntityListContextProvider: ({ children, @@ -577,19 +671,27 @@ export const MockEntityListContextProvider: ({ value: Partial; }>) => JSX.Element; +// Warning: (ae-missing-release-tag) "reduceCatalogFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function reduceCatalogFilters( filters: EntityFilter[], ): Record; +// Warning: (ae-missing-release-tag) "reduceEntityFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function reduceEntityFilters( filters: EntityFilter[], ): (entity: Entity) => boolean; +// Warning: (ae-missing-release-tag) "rootRoute" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const rootRoute: RouteRef; +// Warning: (ae-missing-release-tag) "useEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function useEntity(): { entity: T; @@ -597,6 +699,8 @@ export function useEntity(): { error: Error | undefined; }; +// Warning: (ae-missing-release-tag) "useEntityCompoundName" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const useEntityCompoundName: () => { kind: string; @@ -604,20 +708,31 @@ export const useEntityCompoundName: () => { name: string; }; +// Warning: (ae-missing-release-tag) "useEntityFromUrl" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const useEntityFromUrl: () => EntityLoadingStatus; +// Warning: (ae-missing-release-tag) "useEntityListProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useEntityListProvider< EntityFilters extends DefaultEntityFilters = DefaultEntityFilters >(): EntityListContextProps; +// Warning: (ae-forgotten-export) The symbol "EntityTypeReturn" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "useEntityTypeFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function useEntityTypeFilter(): EntityTypeReturn; +// Warning: (ae-missing-release-tag) "useOwnUser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function useOwnUser(): AsyncState; +// Warning: (ae-missing-release-tag) "useRelatedEntities" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function useRelatedEntities( entity: Entity, @@ -634,6 +749,8 @@ export function useRelatedEntities( error: Error | undefined; }; +// Warning: (ae-missing-release-tag) "UserListFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class UserListFilter implements EntityFilter { constructor( @@ -653,15 +770,22 @@ export class UserListFilter implements EntityFilter { readonly value: UserListFilterKind; } +// Warning: (ae-missing-release-tag) "UserListFilterKind" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type UserListFilterKind = 'owned' | 'starred' | 'all'; +// Warning: (ae-forgotten-export) The symbol "UserListPickerProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "UserListPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const UserListPicker: ({ initialFilter, availableFilters, }: UserListPickerProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "useStarredEntities" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const useStarredEntities: () => { starredEntities: Set; @@ -669,5 +793,16 @@ export const useStarredEntities: () => { isStarredEntity: (entity: Entity) => boolean; }; +// Warnings were encountered during analysis: +// +// src/types.d.ts:6:49 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/types.d.ts:6:10 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/types.d.ts:7:75 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/types.d.ts:7:10 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/types.d.ts:15:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/types.d.ts:16:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/types.d.ts:22:68 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +// src/types.d.ts:22:88 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index c65e06df29..e1b3beda4e 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-react", - "version": "0.2.6", + "version": "0.3.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -46,8 +46,8 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", - "@backstage/dev-utils": "^0.2.1", + "@backstage/cli": "^0.7.4", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 0faa012cf3..2255aae527 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog +## 0.6.7 + +### Patch Changes + +- 75a532fbe: Add unstable prop for disabling unregister entity menu +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.6.6 ### Patch Changes diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index 86b2322246..a85954906a 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -20,12 +20,21 @@ import { TableProps } from '@backstage/core-components'; import { TabProps } from '@material-ui/core'; import { UserListFilterKind } from '@backstage/plugin-catalog-react'; +// Warning: (ae-forgotten-export) The symbol "AboutCardProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "AboutCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function AboutCard({ variant }: AboutCardProps): 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) "AboutContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const AboutContent: ({ entity }: Props_2) => 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) "AboutField" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const AboutField: ({ label, @@ -34,9 +43,14 @@ export const AboutField: ({ children, }: Props_3) => JSX.Element; +// Warning: (ae-missing-release-tag) "CatalogEntityPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogEntityPage: () => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "CatalogPageProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "CatalogIndexPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogIndexPage: ({ initiallySelectedFilter, @@ -44,9 +58,14 @@ export const CatalogIndexPage: ({ actions, }: CatalogPageProps) => 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) "CatalogLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogLayout: ({ children }: Props) => JSX.Element; +// Warning: (ae-missing-release-tag) "catalogPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const catalogPlugin: BackstagePlugin< { @@ -64,15 +83,21 @@ const catalogPlugin: BackstagePlugin< export { catalogPlugin }; export { catalogPlugin as plugin }; +// Warning: (ae-missing-release-tag) "CatalogResultListItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogResultListItem: ({ result }: any) => JSX.Element; +// Warning: (ae-missing-release-tag) "CatalogTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CatalogTable: { ({ columns, actions }: CatalogTableProps): JSX.Element; columns: typeof columnFactories; }; +// Warning: (ae-missing-release-tag) "EntityRow" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CatalogTableRow = { entity: Entity; @@ -85,35 +110,56 @@ export type CatalogTableRow = { }; }; +// Warning: (ae-missing-release-tag) "CreateComponentButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const CreateComponentButton: () => JSX.Element | null; +// Warning: (ae-missing-release-tag) "createMetadataDescriptionColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createMetadataDescriptionColumn(): TableColumn; +// Warning: (ae-forgotten-export) The symbol "NameColumnProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createNameColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createNameColumn( props?: NameColumnProps, ): TableColumn; +// Warning: (ae-missing-release-tag) "createOwnerColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createOwnerColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createSpecLifecycleColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createSpecLifecycleColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createSpecTypeColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createSpecTypeColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createSystemColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createSystemColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "createTagsColumn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createTagsColumn(): TableColumn; +// Warning: (ae-missing-release-tag) "EntityAboutCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityAboutCard: AboutCard; +// Warning: (ae-missing-release-tag) "EntityDependencyOfComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityDependencyOfComponentsCard: ({ variant, @@ -123,6 +169,8 @@ export const EntityDependencyOfComponentsCard: ({ title?: string | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityDependsOnComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityDependsOnComponentsCard: ({ variant, @@ -132,6 +180,8 @@ export const EntityDependsOnComponentsCard: ({ title?: string | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityDependsOnResourcesCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityDependsOnResourcesCard: ({ variant, @@ -139,6 +189,8 @@ export const EntityDependsOnResourcesCard: ({ variant?: 'gridItem' | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityHasComponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityHasComponentsCard: ({ variant, @@ -146,6 +198,8 @@ export const EntityHasComponentsCard: ({ variant?: 'gridItem' | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityHasResourcesCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityHasResourcesCard: ({ variant, @@ -153,6 +207,8 @@ export const EntityHasResourcesCard: ({ variant?: 'gridItem' | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityHasSubcomponentsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityHasSubcomponentsCard: ({ variant, @@ -160,6 +216,8 @@ export const EntityHasSubcomponentsCard: ({ variant?: 'gridItem' | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityHasSystemsCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityHasSystemsCard: ({ variant, @@ -167,6 +225,8 @@ export const EntityHasSystemsCard: ({ variant?: 'gridItem' | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const EntityLayout: { ({ @@ -177,6 +237,8 @@ export const EntityLayout: { Route: (props: SubRoute) => null; }; +// Warning: (ae-missing-release-tag) "EntityLinksCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityLinksCard: ({ cols, @@ -187,9 +249,13 @@ export const EntityLinksCard: ({ variant?: 'gridItem' | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityOrphanWarning" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export const EntityOrphanWarning: () => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityPageLayout" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityPageLayout: { ({ @@ -204,6 +270,8 @@ export const EntityPageLayout: { }) => null; }; +// Warning: (ae-missing-release-tag) "EntitySwitch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntitySwitch: { ({ children }: PropsWithChildren<{}>): JSX.Element | null; @@ -213,21 +281,34 @@ export const EntitySwitch: { }) => null; }; +// Warning: (ae-forgotten-export) The symbol "SystemDiagramCard" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EntitySystemDiagramCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntitySystemDiagramCard: SystemDiagramCard; +// Warning: (ae-missing-release-tag) "isComponentType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function isComponentType(type: string): (entity: Entity) => boolean; +// Warning: (ae-missing-release-tag) "isKind" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function isKind(kind: string): (entity: Entity) => boolean; +// Warning: (ae-missing-release-tag) "isNamespace" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function isNamespace(namespace: string): (entity: Entity) => boolean; +// Warning: (ae-missing-release-tag) "isOrphan" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const isOrphan: (entity: Entity) => boolean; +// 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: ({ EntityPage, @@ -235,5 +316,14 @@ export const Router: ({ EntityPage?: React_2.ComponentType<{}> | undefined; }) => JSX.Element; +// Warnings were encountered during analysis: +// +// src/components/CatalogTable/CatalogTable.d.ts:10:5 - (ae-forgotten-export) The symbol "CatalogTableProps" needs to be exported by the entry point index.d.ts +// src/components/CatalogTable/CatalogTable.d.ts:11:5 - (ae-forgotten-export) The symbol "columnFactories" needs to be exported by the entry point index.d.ts +// src/components/EntityLayout/EntityLayout.d.ts:43:5 - (ae-forgotten-export) The symbol "EntityLayoutProps" needs to be exported by the entry point index.d.ts +// src/components/EntityLayout/EntityLayout.d.ts:44:5 - (ae-forgotten-export) The symbol "SubRoute" needs to be exported by the entry point index.d.ts +// src/components/EntityPageLayout/EntityPageLayout.d.ts:17:5 - (ae-forgotten-export) The symbol "EntityPageLayoutProps" needs to be exported by the entry point index.d.ts +// src/plugin.d.ts:17:5 - (ae-forgotten-export) The symbol "ColumnBreakpoints" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 2c5065755d..e89b368474 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog", - "version": "0.6.6", + "version": "0.6.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -37,7 +37,7 @@ "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -54,9 +54,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index 7dbaea83e4..015bd04ca8 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-circleci +## 0.2.19 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.18 ### Patch Changes diff --git a/plugins/circleci/api-report.md b/plugins/circleci/api-report.md index 7bb1b7766a..76426d8385 100644 --- a/plugins/circleci/api-report.md +++ b/plugins/circleci/api-report.md @@ -24,11 +24,16 @@ 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); // (undocumented) getBuild( @@ -55,20 +60,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: RouteRef; +// 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: (_props: { entity?: Entity | undefined; @@ -76,11 +91,16 @@ export const EntityCircleCIContent: (_props: { 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-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; diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index f03debe9ac..caee4585f3 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-circleci", - "version": "0.2.18", + "version": "0.2.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,7 +34,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -50,9 +50,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 4e837d532b..d0c5a647d8 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-cloudbuild +## 0.2.19 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.18 ### Patch Changes diff --git a/plugins/cloudbuild/api-report.md b/plugins/cloudbuild/api-report.md index 8c2d7876b2..8c0ee26539 100644 --- a/plugins/cloudbuild/api-report.md +++ b/plugins/cloudbuild/api-report.md @@ -11,6 +11,8 @@ 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; @@ -35,12 +37,16 @@ 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) @@ -49,9 +55,13 @@ 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: { @@ -80,9 +90,13 @@ export type CloudbuildApi = { }) => 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); @@ -120,6 +134,8 @@ export class CloudbuildClient implements CloudbuildApi { }): 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< { @@ -130,11 +146,15 @@ 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: (_props: { entity?: Entity | undefined; }) => 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, @@ -143,6 +163,8 @@ export const EntityLatestCloudbuildRunCard: ({ 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, @@ -151,6 +173,8 @@ export const EntityLatestCloudbuildsForBranchCard: ({ 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) @@ -159,11 +183,15 @@ 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, @@ -172,6 +200,8 @@ export const LatestWorkflowRunCard: ({ 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, @@ -180,6 +210,8 @@ export const LatestWorkflowsForBranchCard: ({ 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) @@ -192,6 +224,8 @@ 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) @@ -200,6 +234,8 @@ 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) @@ -210,6 +246,8 @@ 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) @@ -218,15 +256,22 @@ export interface Results { buildStepOutputs: string[]; } +// 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; +// 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) @@ -235,6 +280,8 @@ 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) @@ -259,6 +306,8 @@ 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) @@ -267,6 +316,8 @@ 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) @@ -281,6 +332,8 @@ 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) @@ -289,6 +342,8 @@ 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) @@ -297,6 +352,8 @@ 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 4fa32a8200..da5c749378 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-cloudbuild", - "version": "0.2.18", + "version": "0.2.19", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -48,9 +48,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/code-coverage-backend/api-report.md b/plugins/code-coverage-backend/api-report.md index fb7e844f13..8d92686f2c 100644 --- a/plugins/code-coverage-backend/api-report.md +++ b/plugins/code-coverage-backend/api-report.md @@ -10,18 +10,26 @@ import { PluginDatabaseManager } from '@backstage/backend-common'; import { PluginEndpointDiscovery } from '@backstage/backend-common'; import { UrlReader } from '@backstage/backend-common'; +// Warning: (ae-missing-release-tag) "CodeCoverageApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface CodeCoverageApi { // (undocumented) name: string; } +// 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) "makeRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const makeRouter: (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/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index 4064ba3f1a..a0b44e590f 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-code-coverage +## 0.1.7 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/code-coverage/api-report.md b/plugins/code-coverage/api-report.md index cd69066d4f..19c1a8b1d5 100644 --- a/plugins/code-coverage/api-report.md +++ b/plugins/code-coverage/api-report.md @@ -9,6 +9,8 @@ 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) "codeCoveragePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const codeCoveragePlugin: BackstagePlugin< { @@ -17,14 +19,20 @@ export const codeCoveragePlugin: BackstagePlugin< {} >; +// Warning: (ae-missing-release-tag) "EntityCodeCoverageContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityCodeCoverageContent: () => JSX.Element; +// Warning: (ae-missing-release-tag) "isCodeCoverageAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const isCodeCoverageAvailable: (entity: Entity) => boolean; export { isCodeCoverageAvailable }; export { isCodeCoverageAvailable 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/code-coverage/package.json b/plugins/code-coverage/package.json index 2a4f7f4bf6..11844beebb 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-code-coverage", - "version": "0.1.6", + "version": "0.1.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,7 +25,7 @@ "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/errors": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ "recharts": "^1.8.5" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/config-schema/api-report.md b/plugins/config-schema/api-report.md index e01cc67888..6b0ef9a964 100644 --- a/plugins/config-schema/api-report.md +++ b/plugins/config-schema/api-report.md @@ -11,18 +11,28 @@ import { Observable } from '@backstage/core-plugin-api'; 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< { @@ -31,6 +41,8 @@ export const configSchemaPlugin: BackstagePlugin< {} >; +// Warning: (ae-missing-release-tag) "StaticSchemaLoader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class StaticSchemaLoader implements ConfigSchemaApi { constructor({ url }?: { url?: string }); diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index ae88de45b4..5fe1d3a612 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -35,9 +35,9 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/cost-insights/api-report.md b/plugins/cost-insights/api-report.md index 2c32f09c53..541c2af9e0 100644 --- a/plugins/cost-insights/api-report.md +++ b/plugins/cost-insights/api-report.md @@ -22,6 +22,8 @@ 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; @@ -38,6 +40,8 @@ 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) @@ -46,6 +50,8 @@ 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) @@ -56,6 +62,8 @@ 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) @@ -64,9 +72,13 @@ 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) @@ -83,6 +95,8 @@ 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, @@ -91,6 +105,8 @@ 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; @@ -98,6 +114,8 @@ 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) @@ -106,21 +124,29 @@ 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) @@ -131,6 +157,8 @@ 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, @@ -142,9 +170,13 @@ export const BarChart: ({ onMouseMove, }: 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 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, @@ -153,6 +185,8 @@ export const BarChartLegend: ({ children, }: 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; @@ -162,6 +196,8 @@ 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; @@ -169,6 +205,8 @@ 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) @@ -181,6 +219,8 @@ 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[]; @@ -192,6 +232,8 @@ 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, @@ -202,16 +244,22 @@ export const BarChartTooltip: ({ children, }: 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; +// 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; @@ -221,6 +269,8 @@ 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 (undocumented) export interface ChangeStatistic { // (undocumented) @@ -229,6 +279,8 @@ export interface ChangeStatistic { ratio?: number; } +// 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) @@ -237,6 +289,8 @@ export enum ChangeThreshold { upper = 0.05, } +// Warning: (ae-missing-release-tag) "ChartData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ChartData = { date: number; @@ -245,6 +299,8 @@ 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 interface Cost { // (undocumented) @@ -259,9 +315,13 @@ export interface Cost { trendline?: Trendline; } +// 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; +// 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, @@ -270,18 +330,24 @@ 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; formatter?: (change: ChangeStatistic) => 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; @@ -294,23 +360,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 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< { @@ -323,21 +402,29 @@ 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; } +// Warning: (ae-missing-release-tag) "Currency" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface Currency { // (undocumented) @@ -352,6 +439,8 @@ 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 enum CurrencyType { // (undocumented) @@ -364,6 +453,8 @@ 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) @@ -374,15 +465,21 @@ 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 (undocumented) export type DateAggregation = { date: string; amount: number; }; +// 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'; +// Warning: (ae-missing-release-tag) "Duration" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export enum Duration { // (undocumented) @@ -395,9 +492,13 @@ 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 (undocumented) export interface Entity { // (undocumented) @@ -410,6 +511,8 @@ export interface Entity { id: Maybe; } +// 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) @@ -430,11 +533,15 @@ 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 (undocumented) export type Group = { id: string; }; +// 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) @@ -445,12 +552,16 @@ 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) @@ -467,6 +578,8 @@ 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, @@ -475,6 +588,8 @@ export const LegendItem: ({ children, }: 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; @@ -482,12 +597,18 @@ 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 (undocumented) export type Maybe = T | null; +// Warning: (ae-missing-release-tag) "Metric" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Metric = { kind: string; @@ -495,6 +616,8 @@ export type Metric = { default: boolean; }; +// Warning: (ae-missing-release-tag) "MetricData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface MetricData { // (undocumented) @@ -507,18 +630,26 @@ export interface MetricData { id: string; } +// 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; +// 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; +// Warning: (ae-missing-release-tag) "PageFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface PageFilters { // (undocumented) @@ -531,6 +662,8 @@ export interface PageFilters { project: Maybe; } +// Warning: (ae-missing-release-tag) "Product" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface Product { // (undocumented) @@ -539,9 +672,13 @@ export interface Product { name: string; } +// Warning: (ae-missing-release-tag) "ProductFilters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @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; @@ -550,6 +687,8 @@ export type ProductInsightsOptions = { project: Maybe; }; +// Warning: (ae-missing-release-tag) "ProductPeriod" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface ProductPeriod { // (undocumented) @@ -558,6 +697,8 @@ 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 (undocumented) export interface Project { // (undocumented) @@ -566,6 +707,8 @@ export interface Project { name?: string; } +// 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); @@ -581,6 +724,8 @@ 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) @@ -597,6 +742,8 @@ 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) @@ -607,6 +754,8 @@ 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; @@ -614,12 +763,16 @@ 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 (undocumented) export type Trendline = { slope: number; intercept: number; }; +// 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); @@ -637,6 +790,8 @@ 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) @@ -647,6 +802,8 @@ 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) @@ -661,5 +818,17 @@ export interface UnlabeledDataflowData { unlabeledCost: number; } +// Warnings were encountered during analysis: +// +// src/api/CostInsightsApi.d.ts:34:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:42:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:56:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:57:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:73:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:74:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:83:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:84:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen +// src/api/CostInsightsApi.d.ts:100:8 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 13b9c9d85a..feb6d4122c 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -54,9 +54,9 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/explore-react/api-report.md b/plugins/explore-react/api-report.md index 530c6eedaf..06d7565559 100644 --- a/plugins/explore-react/api-report.md +++ b/plugins/explore-react/api-report.md @@ -5,6 +5,8 @@ ```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; @@ -15,12 +17,16 @@ 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/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 7049978f85..2cb7e849d3 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-explore +## 0.3.10 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.3.9 ### Patch Changes diff --git a/plugins/explore/api-report.md b/plugins/explore/api-report.md index 4084c6a203..6ed2be6cde 100644 --- a/plugins/explore/api-report.md +++ b/plugins/explore/api-report.md @@ -12,6 +12,8 @@ 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 (undocumented) export const catalogEntityRouteRef: ExternalRouteRef< { name: string; @@ -19,20 +21,28 @@ kind: string; namespace: string; }, false>; +// 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, }: { 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; 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 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< { explore: RouteRef; @@ -46,19 +56,30 @@ namespace: string; 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, }: { 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 }: { 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 + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 9a4d3b2d88..7da4fe89fd 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-explore", - "version": "0.3.9", + "version": "0.3.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/plugin-explore-react": "^0.0.6", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", @@ -48,9 +48,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index e0f30ed179..8d7faa87f9 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-fossa +## 0.2.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.10 ### Patch Changes diff --git a/plugins/fossa/api-report.md b/plugins/fossa/api-report.md index 2a18f74f1b..e1b2cb0cf2 100644 --- a/plugins/fossa/api-report.md +++ b/plugins/fossa/api-report.md @@ -9,6 +9,8 @@ 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, @@ -16,9 +18,13 @@ export const EntityFossaCard: ({ 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: () => JSX.Element; +// 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 8f6d32eb70..7cb5b5febf 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-fossa", - "version": "0.2.10", + "version": "0.2.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/errors": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -48,9 +48,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/gcp-projects/api-report.md b/plugins/gcp-projects/api-report.md index b2347b42ad..9464a5af6a 100644 --- a/plugins/gcp-projects/api-report.md +++ b/plugins/gcp-projects/api-report.md @@ -10,6 +10,8 @@ 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; @@ -20,9 +22,13 @@ 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); @@ -39,9 +45,13 @@ 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< { @@ -52,6 +62,8 @@ 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; @@ -61,6 +73,8 @@ 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; @@ -70,11 +84,15 @@ 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 539e9151f5..3e37832e46 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -42,9 +42,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/git-release-manager/api-report.md b/plugins/git-release-manager/api-report.md index 3039bb033f..2497fed470 100644 --- a/plugins/git-release-manager/api-report.md +++ b/plugins/git-release-manager/api-report.md @@ -9,12 +9,20 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-forgotten-export) The symbol "GitReleaseApi" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "gitReleaseManagerApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const gitReleaseManagerApiRef: ApiRef; +// Warning: (ae-forgotten-export) The symbol "GitReleaseManager" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "GitReleaseManagerPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GitReleaseManagerPage: GitReleaseManager; +// Warning: (ae-missing-release-tag) "gitReleaseManagerPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const gitReleaseManagerPlugin: BackstagePlugin< { diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 19328c4ebd..35c5056904 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -37,9 +37,9 @@ "recharts": "^1.8.5" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index 96ec437188..88bc9d08df 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-github-actions +## 0.4.13 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.4.12 ### Patch Changes diff --git a/plugins/github-actions/api-report.md b/plugins/github-actions/api-report.md index e9fb9e09dc..22b5d57d45 100644 --- a/plugins/github-actions/api-report.md +++ b/plugins/github-actions/api-report.md @@ -14,6 +14,8 @@ 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) @@ -26,11 +28,15 @@ 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: (_props: { entity?: Entity | undefined; }) => 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, @@ -41,6 +47,8 @@ export const EntityLatestGithubActionRunCard: ({ 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, @@ -51,6 +59,9 @@ export const EntityLatestGithubActionsForBranchCard: ({ 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, @@ -59,9 +70,13 @@ export const EntityRecentGithubActionsRunsCard: ({ variant, }: Props) => 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'; +// Warning: (ae-missing-release-tag) "GithubActionsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GithubActionsApi = { listWorkflowRuns: ({ @@ -150,9 +165,13 @@ 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; +// Warning: (ae-missing-release-tag) "GithubActionsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GithubActionsClient implements GithubActionsApi { constructor(options: { configApi: ConfigApi; githubAuthApi: OAuthApi }); @@ -248,6 +267,8 @@ 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< { @@ -258,11 +279,15 @@ 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; @@ -275,24 +300,33 @@ 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_3) => 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_3) => 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, @@ -301,9 +335,14 @@ export const RecentWorkflowRunsCard: ({ variant, }: Props) => 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) "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_2) => 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 11262a91bc..383f880f2b 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-actions", - "version": "0.4.12", + "version": "0.4.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,7 +36,7 @@ "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/integration": "^0.5.8", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -51,9 +51,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 4c525a63dc..524c1bd86b 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-github-deployments +## 0.1.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.1.10 ### Patch Changes diff --git a/plugins/github-deployments/api-report.md b/plugins/github-deployments/api-report.md index 3cdf9f0316..fcc5022d7c 100644 --- a/plugins/github-deployments/api-report.md +++ b/plugins/github-deployments/api-report.md @@ -9,21 +9,34 @@ 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: ({ last, @@ -35,9 +48,15 @@ export const EntityGithubDeploymentsCard: ({ 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 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({ deployments, @@ -48,15 +67,21 @@ export function GithubDeploymentsTable({ // @public (undocumented) export namespace GithubDeploymentsTable { - var // (undocumented) + 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: ({ state }: { 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; diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index 754f1d73bc..07973b1a03 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-deployments", - "version": "0.1.10", + "version": "0.1.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -26,7 +26,7 @@ "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -38,9 +38,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/gitops-profiles/api-report.md b/plugins/gitops-profiles/api-report.md index f38f660c77..aacdaff966 100644 --- a/plugins/gitops-profiles/api-report.md +++ b/plugins/gitops-profiles/api-report.md @@ -9,6 +9,8 @@ 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) @@ -23,6 +25,8 @@ 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) @@ -37,6 +41,8 @@ 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) @@ -56,6 +62,8 @@ 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) @@ -70,6 +78,8 @@ 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) @@ -78,18 +88,24 @@ 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; @@ -101,18 +117,28 @@ 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< { @@ -128,6 +154,8 @@ 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); @@ -147,6 +175,8 @@ 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) @@ -155,12 +185,16 @@ 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) @@ -173,6 +207,8 @@ 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) @@ -183,6 +219,8 @@ 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 f9d029b6d6..246a703d95 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -43,9 +43,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/graphiql/api-report.md b/plugins/graphiql/api-report.md index 673f508e03..110d3b315d 100644 --- a/plugins/graphiql/api-report.md +++ b/plugins/graphiql/api-report.md @@ -12,6 +12,8 @@ import { IconComponent } from '@backstage/core-plugin-api'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "EndpointConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type EndpointConfig = { id: string; @@ -23,6 +25,8 @@ export type EndpointConfig = { }; }; +// Warning: (ae-missing-release-tag) "GithubEndpointConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GithubEndpointConfig = { id: string; @@ -32,28 +36,42 @@ export type GithubEndpointConfig = { githubAuthApi: OAuthApi; }; +// Warning: (ae-missing-release-tag) "GraphiQLIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GraphiQLIcon: IconComponent; +// Warning: (ae-missing-release-tag) "GraphiQLPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GraphiQLPage: () => JSX.Element; +// Warning: (ae-missing-release-tag) "graphiqlPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const graphiqlPlugin: BackstagePlugin<{}, {}>; export { graphiqlPlugin }; export { graphiqlPlugin as plugin }; +// Warning: (ae-missing-release-tag) "graphiQLRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const graphiQLRouteRef: RouteRef; +// Warning: (ae-missing-release-tag) "GraphQLBrowseApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GraphQLBrowseApi = { getEndpoints(): Promise; }; +// Warning: (ae-missing-release-tag) "graphQlBrowseApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const graphQlBrowseApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "GraphQLEndpoint" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type GraphQLEndpoint = { id: string; @@ -61,6 +79,8 @@ export type GraphQLEndpoint = { fetcher: (body: any) => Promise; }; +// Warning: (ae-missing-release-tag) "GraphQLEndpoints" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class GraphQLEndpoints implements GraphQLBrowseApi { // (undocumented) @@ -72,6 +92,8 @@ export class GraphQLEndpoints implements GraphQLBrowseApi { static github(config: GithubEndpointConfig): GraphQLEndpoint; } +// Warning: (ae-missing-release-tag) "GraphiQLPage" 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/graphiql/package.json b/plugins/graphiql/package.json index 22eab92ba4..c289761bc3 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -44,9 +44,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/graphql/api-report.md b/plugins/graphql/api-report.md index c50312ddf6..c09feb7bcc 100644 --- a/plugins/graphql/api-report.md +++ b/plugins/graphql/api-report.md @@ -7,9 +7,13 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger as Logger_2 } 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/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index 9521e1dfc4..b7eef7ed31 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-ilert +## 0.1.6 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/ilert/api-report.md b/plugins/ilert/api-report.md index 94a3657e04..3c6965b2c4 100644 --- a/plugins/ilert/api-report.md +++ b/plugins/ilert/api-report.md @@ -13,14 +13,20 @@ 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 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 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; @@ -29,6 +35,8 @@ 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) @@ -43,6 +51,8 @@ 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) @@ -51,30 +61,48 @@ 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) @@ -107,14 +135,21 @@ 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); // (undocumented) acceptIncident(incident: Incident, userName: string): Promise; @@ -197,12 +232,18 @@ 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< { @@ -213,22 +254,34 @@ 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) 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 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 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 + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index e40f6ae310..e5bde7eca7 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-ilert", - "version": "0.1.5", + "version": "0.1.6", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -24,7 +24,7 @@ "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/errors": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@date-io/luxon": "2.x", "@material-ui/core": "^4.11.0", @@ -38,9 +38,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/jenkins-backend/.eslintrc.js b/plugins/jenkins-backend/.eslintrc.js new file mode 100644 index 0000000000..16a033dbc6 --- /dev/null +++ b/plugins/jenkins-backend/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: [require.resolve('@backstage/cli/config/eslint.backend')], +}; diff --git a/plugins/jenkins-backend/README.md b/plugins/jenkins-backend/README.md new file mode 100644 index 0000000000..bac56b6eaf --- /dev/null +++ b/plugins/jenkins-backend/README.md @@ -0,0 +1,209 @@ +# Jenkins Plugin (Alpha) + +Welcome to the Jenkins backend plugin! Website: [https://jenkins.io/](https://jenkins.io/) + +This is the backend half of the 2 Jenkins plugins and is responsible for: + +- finding an appropriate instance of Jenkins for an entity +- finding the appropriate job(s) on that instance for an entity +- connecting to Jenkins and gathering data to present to the frontend + +## Integrating into a backstage instance + +This plugin needs to be added to an existing backstage instance. + +Typically, this means creating a `src/plugins/jenkins.ts` file and adding a reference to it to `src/index.ts` + +### jenkins.ts + +```typescript +import { + createRouter, + DefaultJenkinsInfoProvider, +} from '@backstage/plugin-jenkins-backend'; +import { CatalogClient } from '@backstage/catalog-client'; +import { Router } from 'express'; +import { PluginEnvironment } from '../types'; + +export default async function createPlugin({ + logger, + config, + discovery, +}: PluginEnvironment): Promise { + const catalog = new CatalogClient({ discoveryApi: discovery }); + + return await createRouter({ + logger, + jenkinsInfoProvider: DefaultJenkinsInfoProvider.fromConfig({ + config, + catalog, + }), + }); +} +``` + +This plugin must be provided with a JenkinsInfoProvider, this is a strategy object for finding the Jenkins instance and job for an entity. + +There is a standard one provided, but the Integrator is free to build their own. + +### DefaultJenkinsInfoProvider + +Allows configuration of either a single or multiple global Jenkins instances and annotating entities with the job name on that instance (and optionally the name of the instance). + +#### Example - Single global instance + +The following will look for jobs for this entity at `https://jenkins.example.com/job/teamA/job/artistLookup-build` + +Config + +```yaml +jenkins: + baseUrl: https://jenkins.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 +``` + +Catalog + +```yaml +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: artist-lookup + annotations: + 'jenkins.io/job-full-name': teamA/artistLookup-build +``` + +The old annotation name of `jenkins.io/github-folder` is equivalent to `jenkins.io/job-full-name` + +#### Example - Multiple global instances + +The following will look for jobs for this entity at `https://jenkins-foo.example.com/job/teamA/job/artistLookup-build` + +Config + +```yaml +jenkins: + instances: + - name: default + baseUrl: https://jenkins.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 + - name: departmentFoo + baseUrl: https://jenkins-foo.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 +``` + +Catalog + +```yaml +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: artist-lookup + annotations: + 'jenkins.io/job-full-name': departmentFoo:teamA/artistLookup-build +``` + +If the `departmentFoo:` part is omitted, the default instance will be assumed. + +The following config is an equivalent (but less clear) version of the above: + +```yaml +jenkins: + baseUrl: https://jenkins.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 + instances: + - name: departmentFoo + baseUrl: https://jenkins-foo.example.com + username: backstage-bot + apiKey: 123456789abcdef0123456789abcedf012 +``` + +### Custom JenkinsInfoProvider + +An example of a bespoke JenkinsInfoProvider which uses an organisation specific annotation to look up the Jenkins info (including jobFullName): + +```typescript +class AcmeJenkinsInfoProvider implements JenkinsInfoProvider { + constructor(private readonly catalog: CatalogClient) {} + + async getInstance(opt: { + entityRef: EntityName; + jobFullName?: string; + }): Promise { + const PAAS_ANNOTATION = 'acme.example.com/paas-project-name'; + + // lookup pass-project-name from entity annotation + const entity = await this.catalog.getEntityByName(opt.entityRef); + if (!entity) { + throw new Error( + `Couldn't find entity with name: ${stringifyEntityRef(opt.entityRef)}`, + ); + } + + const paasProjectName = entity.metadata.annotations?.[PAAS_ANNOTATION]; + if (!paasProjectName) { + throw new Error( + `Couldn't find paas annotation (${PAAS_ANNOTATION}) on entity with name: ${stringifyEntityRef( + opt.entityRef, + )}`, + ); + } + + // lookup department and team for paas project name + const { team, dept } = this.lookupPaasInfo(paasProjectName); + + const baseUrl = `https://jenkins-${dept}.example.com/`; + const jobFullName = `${team}/${paasProjectName}`; + const username = 'backstage-bot'; + const apiKey = this.getJenkinsApiKey(paasProjectName); + const creds = btoa(`${username}:${apiKey}`); + + return { + baseUrl, + headers: { + Authorization: `Basic ${creds}`, + }, + jobFullName, + }; + } + + private lookupPaasInfo(_: string): { team: string; dept: string } { + // Mock implementation, this would get info from the paas system somehow in reality. + return { + team: 'teamA', + dept: 'DepartmentFoo', + }; + } + + private getJenkinsApiKey(_: string): string { + // Mock implementation, this would get info from the paas system somehow in reality. + return '123456789abcdef0123456789abcedf012'; + } +} +``` + +No config would be needed if using this JenkinsInfoProvider + +A Catalog entity of the following will look for jobs for this entity at `https://jenkins-departmentFoo.example.com/job/teamA/job/artistLookupService` + +```yaml +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: artist-lookup + annotations: + 'acme.example.com/paas-project-name': artistLookupService +``` + +## Jenkins' terminology notes + +The domain model for Jenkins is not particularly clear but for the purposes of this plugin the following model has been assumed: + +Jenkins contains a tree of *job*s which have children of either; other *job*s (making it a _folder_) or *build*s (making it a _project_). +Concepts like _pipeline_ and *view*s are meaningless (pipelines are just jobs for our purposes, views are (as the name suggests) just views of subsets of jobs) + +A _job full name_ is a slash separated list of the names of the job, and the folders which contain it. For example `teamA/artistLookupService/develop`, and the same way that a filesystem path has folders and file names. diff --git a/plugins/jenkins-backend/api-report.md b/plugins/jenkins-backend/api-report.md new file mode 100644 index 0000000000..b94931e000 --- /dev/null +++ b/plugins/jenkins-backend/api-report.md @@ -0,0 +1,71 @@ +## API Report File for "@backstage/plugin-jenkins-backend" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts +import { CatalogClient } from '@backstage/catalog-client'; +import { Config } from '@backstage/config'; +import { EntityName } from '@backstage/catalog-model'; +import express from 'express'; +import { Logger as Logger_2 } 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) "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) + static fromConfig(options: { + config: Config; + catalog: CatalogClient; + }): DefaultJenkinsInfoProvider; + // (undocumented) + getInstance(opt: { + entityRef: EntityName; + jobFullName?: string; + }): Promise; + // (undocumented) + static readonly NEW_JENKINS_ANNOTATION = 'jenkins.io/job-full-name'; + // (undocumented) + static readonly OLD_JENKINS_ANNOTATION = 'jenkins.io/github-folder'; +} + +// 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) + baseUrl: string; + // (undocumented) + headers?: Record; + // (undocumented) + 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) + getInstance(options: { + entityRef: EntityName; + jobFullName?: string; + }): 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) + jenkinsInfoProvider: JenkinsInfoProvider; + // (undocumented) + logger: Logger_2; +} + +// (No @packageDocumentation comment for this package) +``` diff --git a/plugins/jenkins-backend/config.d.ts b/plugins/jenkins-backend/config.d.ts new file mode 100644 index 0000000000..bfb519bb58 --- /dev/null +++ b/plugins/jenkins-backend/config.d.ts @@ -0,0 +1,51 @@ +/* + * Copyright 2020 Spotify AB + * + * 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 interface Config { + jenkins?: { + /** + * Default instance baseUrl, can be specified on a named instance called "default" + * @pattern "^https?://" + */ + baseUrl?: string; + /** + * Default instance username, can be specified on a named instance called "default" + */ + username?: string; + /** + * Default Instance apiKey, can be specified on a named instance called "default" + * @visibility secret + */ + apiKey?: string; + + instances?: { + /** + * Name of the instance, this will be used in an annotation on catalog entities to refer to jobs on this instance. + * + * Use a name of "default" to specify the jenkins instance details if the annotation doesn't explicitly name an + * instance. + */ + name: string; + + /** + * @pattern "^https?://" + */ + baseUrl: string; + username: string; + /** @visibility secret */ + apiKey: string; + }[]; + }; +} diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json new file mode 100644 index 0000000000..408d714aaa --- /dev/null +++ b/plugins/jenkins-backend/package.json @@ -0,0 +1,47 @@ +{ + "name": "@backstage/plugin-jenkins-backend", + "version": "0.1.1", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "private": false, + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "types": "dist/index.d.ts" + }, + "configSchema": "config.d.ts", + "scripts": { + "start": "backstage-cli backend:dev", + "build": "backstage-cli backend:build", + "lint": "backstage-cli lint", + "test": "backstage-cli test", + "prepack": "backstage-cli prepack", + "postpack": "backstage-cli postpack", + "clean": "backstage-cli clean" + }, + "dependencies": { + "@backstage/backend-common": "^0.8.5s", + "@backstage/catalog-client": "^0.3.16", + "@backstage/catalog-model": "^0.9.0", + "@backstage/config": "^0.1.5", + "@types/express": "^4.17.6", + "cross-fetch": "^3.0.6", + "express": "^4.17.1", + "express-promise-router": "^4.1.0", + "jenkins": "^0.28.1", + "winston": "^3.2.1", + "yn": "^4.0.0" + }, + "devDependencies": { + "@backstage/cli": "^0.7.3", + "@types/jenkins": "^0.23.1", + "@types/supertest": "^2.0.8", + "msw": "^0.29.0", + "supertest": "^4.0.2" + }, + "files": [ + "dist", + "config.d.ts" + ] +} diff --git a/plugins/jenkins/src/components/useProjectSlugFromEntity.ts b/plugins/jenkins-backend/src/index.ts similarity index 69% rename from plugins/jenkins/src/components/useProjectSlugFromEntity.ts rename to plugins/jenkins-backend/src/index.ts index 10789b383a..c5c541db2b 100644 --- a/plugins/jenkins/src/components/useProjectSlugFromEntity.ts +++ b/plugins/jenkins-backend/src/index.ts @@ -13,11 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { useEntity } from '@backstage/plugin-catalog-react'; -import { JENKINS_ANNOTATION } from '../constants'; -export const useProjectSlugFromEntity = () => { - const { entity } = useEntity(); - - return entity.metadata.annotations?.[JENKINS_ANNOTATION] ?? ''; -}; +export * from './service'; diff --git a/plugins/jenkins-backend/src/run.ts b/plugins/jenkins-backend/src/run.ts new file mode 100644 index 0000000000..b96989e4b8 --- /dev/null +++ b/plugins/jenkins-backend/src/run.ts @@ -0,0 +1,33 @@ +/* + * Copyright 2020 Spotify AB + * + * 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 { getRootLogger } from '@backstage/backend-common'; +import yn from 'yn'; +import { startStandaloneServer } from './service/standaloneServer'; + +const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000; +const enableCors = yn(process.env.PLUGIN_CORS, { default: false }); +const logger = getRootLogger(); + +startStandaloneServer({ port, enableCors, logger }).catch(err => { + logger.error(err); + process.exit(1); +}); + +process.on('SIGINT', () => { + logger.info('CTRL+C pressed; exiting.'); + process.exit(0); +}); diff --git a/plugins/jenkins-backend/src/service/index.ts b/plugins/jenkins-backend/src/service/index.ts new file mode 100644 index 0000000000..329092e881 --- /dev/null +++ b/plugins/jenkins-backend/src/service/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2020 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export type { RouterOptions } from './router'; +export { createRouter } from './router'; +export type { JenkinsInfo, JenkinsInfoProvider } from './jenkinsInfoProvider'; +export { DefaultJenkinsInfoProvider } from './jenkinsInfoProvider'; diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.test.ts b/plugins/jenkins-backend/src/service/jenkinsApi.test.ts new file mode 100644 index 0000000000..380a65f895 --- /dev/null +++ b/plugins/jenkins-backend/src/service/jenkinsApi.test.ts @@ -0,0 +1,397 @@ +/* + * Copyright 2021 Spotify AB + * + * 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 { JenkinsApiImpl } from './jenkinsApi'; +import jenkins from 'jenkins'; +import { JenkinsInfo } from './jenkinsInfoProvider'; +import { JenkinsBuild, JenkinsProject } from '../types'; + +jest.mock('jenkins'); +const mockedJenkinsClient = { + job: { + get: jest.fn(), + build: jest.fn(), + }, + build: { + get: jest.fn(), + }, +}; +const mockedJenkins = jenkins as jest.Mocked; +mockedJenkins.mockReturnValue(mockedJenkinsClient); + +const jobFullName = 'example-jobName/foo'; +const buildNumber = 19; +const jenkinsInfo: JenkinsInfo = { + baseUrl: 'https://jenkins.example.com', + headers: { headerName: 'headerValue' }, + jobFullName: 'example-jobName', +}; + +describe('JenkinsApi', () => { + const jenkinsApi = new JenkinsApiImpl(); + + describe('getProjects', () => { + const project: JenkinsProject = { + actions: [], + displayName: 'Example Build', + fullDisplayName: 'Example jobName » Example Build', + fullName: 'example-jobName/exampleBuild', + inQueue: false, + lastBuild: { + actions: [], + timestamp: 1, + building: false, + duration: 10, + result: 'success', + displayName: '#7', + fullDisplayName: 'Example jobName » Example Build #7', + url: 'https://jenkins.example.com/job/example-jobName/job/exampleBuild', + number: 7, + }, + }; + + describe('unfiltered', () => { + it('standard github layout', async () => { + mockedJenkinsClient.job.get.mockResolvedValueOnce({ jobs: [project] }); + + const result = await jenkinsApi.getProjects(jenkinsInfo); + + expect(mockedJenkins).toHaveBeenCalledWith({ + baseUrl: jenkinsInfo.baseUrl, + headers: jenkinsInfo.headers, + promisify: true, + }); + expect(mockedJenkinsClient.job.get).toBeCalledWith({ + name: jenkinsInfo.jobFullName, + tree: expect.anything(), + }); + expect(result).toHaveLength(1); + expect(result[0]).toEqual({ + actions: [], + displayName: 'Example Build', + fullDisplayName: 'Example jobName » Example Build', + fullName: 'example-jobName/exampleBuild', + inQueue: false, + lastBuild: { + actions: [], + timestamp: 1, + building: false, + duration: 10, + result: 'success', + displayName: '#7', + fullDisplayName: 'Example jobName » Example Build #7', + url: + 'https://jenkins.example.com/job/example-jobName/job/exampleBuild', + number: 7, + status: 'success', + source: {}, + }, + status: 'success', + }); + }); + }); + describe('filtered by branch', () => { + it('standard github layout', async () => { + mockedJenkinsClient.job.get.mockResolvedValueOnce(project); + + const result = await jenkinsApi.getProjects( + jenkinsInfo, + 'testBranchName', + ); + + expect(mockedJenkins).toHaveBeenCalledWith({ + baseUrl: jenkinsInfo.baseUrl, + headers: jenkinsInfo.headers, + promisify: true, + }); + expect(mockedJenkinsClient.job.get).toBeCalledWith({ + name: `${jenkinsInfo.jobFullName}/testBranchName`, + tree: expect.anything(), + }); + expect(result).toHaveLength(1); + }); + }); + describe('augmented', () => { + const projectWithScmActions: JenkinsProject = { + actions: [ + {}, + {}, + {}, + {}, + { + _class: 'jenkins.scm.api.metadata.ContributorMetadataAction', + contributor: 'testuser', + contributorDisplayName: 'Mr. T User', + contributorEmail: null, + }, + {}, + { + _class: 'jenkins.scm.api.metadata.ObjectMetadataAction', + objectDescription: '', + objectDisplayName: 'Add LICENSE, CoC etc', + objectUrl: 'https://github.com/backstage/backstage/pull/1', + }, + {}, + {}, + { + _class: 'com.cloudbees.plugins.credentials.ViewCredentialsAction', + stores: {}, + }, + ], + displayName: 'Example Build', + fullDisplayName: 'Example jobName » Example Build', + fullName: 'example-jobName/exampleBuild', + inQueue: false, + lastBuild: { + actions: [ + { + _class: 'hudson.model.CauseAction', + causes: [ + { + _class: 'jenkins.branch.BranchIndexingCause', + shortDescription: 'Branch indexing', + }, + ], + }, + {}, + {}, + {}, + { + _class: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl', + environment: {}, + }, + {}, + {}, + {}, + {}, + {}, + { + _class: 'hudson.plugins.git.util.BuildData', + buildsByBranchName: { + 'PR-1': { + _class: 'hudson.plugins.git.util.Build', + buildNumber: 5, + buildResult: null, + marked: { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + branch: [ + { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + name: 'PR-1', + }, + ], + }, + revision: { + SHA1: '6c6b34c0fb91cf077a01fe62d3e8e996b4ea5861', + branch: [ + { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + name: 'PR-1', + }, + ], + }, + }, + }, + lastBuiltRevision: { + SHA1: '6c6b34c0fb91cf077a01fe62d3e8e996b4ea5861', + branch: [ + { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + name: 'PR-1', + }, + ], + }, + remoteUrls: ['https://github.com/backstage/backstage.git'], + scmName: '', + }, + { + _class: 'hudson.plugins.git.util.BuildData', + buildsByBranchName: { + master: { + _class: 'hudson.plugins.git.util.Build', + buildNumber: 5, + buildResult: null, + marked: { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + branch: [ + { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + name: 'master', + }, + ], + }, + revision: { + SHA1: '6c6b34c0fb91cf077a01fe62d3e8e996b4ea5861', + branch: [ + { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + name: 'master', + }, + ], + }, + }, + }, + lastBuiltRevision: { + SHA1: '6c6b34c0fb91cf077a01fe62d3e8e996b4ea5861', + branch: [ + { + SHA1: '14d31bde346fcad64ab939f82d195db36701cfcb', + name: 'master', + }, + ], + }, + remoteUrls: ['https://github.com/backstage/backstage.git'], + scmName: '', + }, + {}, + {}, + { + _class: 'hudson.tasks.junit.TestResultAction', + failCount: 2, + skipCount: 1, + totalCount: 635, + urlName: 'testReport', + }, + {}, + {}, + { + _class: + 'org.jenkinsci.plugins.pipeline.modeldefinition.actions.RestartDeclarativePipelineAction', + restartEnabled: false, + restartableStages: [], + }, + {}, + ], + timestamp: 1, + building: false, + duration: 10, + result: 'success', + displayName: '#7', + fullDisplayName: 'Example jobName » Example Build #7', + url: + 'https://jenkins.example.com/job/example-jobName/job/exampleBuild/7/', + number: 7, + }, + }; + + it('augments project', async () => { + mockedJenkinsClient.job.get.mockResolvedValueOnce({ + jobs: [projectWithScmActions], + }); + + const result = await jenkinsApi.getProjects(jenkinsInfo); + + expect(result).toHaveLength(1); + expect(result[0].status).toEqual('success'); + }); + it('augments build', async () => { + mockedJenkinsClient.job.get.mockResolvedValueOnce({ + jobs: [projectWithScmActions], + }); + + const result = await jenkinsApi.getProjects(jenkinsInfo); + + expect(result).toHaveLength(1); + // TODO: I am really just asserting the previous behaviour wth no understanding here. + // In my 2 Jenkins instances, 1 returns a lot of different and confusing BuildData sections and 1 returns none ☹️ + expect(result[0].lastBuild.source).toEqual({ + branchName: 'master', + commit: { + hash: '14d31bde', + }, + url: 'https://github.com/backstage/backstage/pull/1', + displayName: 'Add LICENSE, CoC etc', + author: 'Mr. T User', + }); + }); + it('finds test report', async () => { + mockedJenkinsClient.job.get.mockResolvedValueOnce({ + jobs: [projectWithScmActions], + }); + + const result = await jenkinsApi.getProjects(jenkinsInfo); + + expect(result).toHaveLength(1); + expect(result[0].lastBuild.tests).toEqual({ + total: 635, + passed: 632, + skipped: 1, + failed: 2, + testUrl: + 'https://jenkins.example.com/job/example-jobName/job/exampleBuild/7/testReport/', + }); + }); + }); + }); + it('getBuild', async () => { + const project: JenkinsProject = { + actions: [], + displayName: 'Example Build', + fullDisplayName: 'Example jobName » Example Build', + fullName: 'example-jobName/exampleBuild', + inQueue: false, + lastBuild: { + actions: [], + timestamp: 1, + building: false, + duration: 10, + result: 'success', + displayName: '#7', + fullDisplayName: 'Example jobName » Example Build #7', + url: 'https://jenkins.example.com/job/example-jobName/job/exampleBuild', + number: 7, + }, + }; + const build: JenkinsBuild = { + actions: [], + timestamp: 1, + building: false, + duration: 10, + result: 'success', + fullDisplayName: 'example-jobName/exampleBuild', + displayName: 'exampleBuild', + url: `https://jenkins.example.com/job/example-jobName/job/exampleBuild/build/${buildNumber}`, + number: buildNumber, + }; + mockedJenkinsClient.job.get.mockResolvedValueOnce(project); + mockedJenkinsClient.build.get.mockResolvedValueOnce(build); + + await jenkinsApi.getBuild(jenkinsInfo, jobFullName, buildNumber); + + expect(mockedJenkins).toHaveBeenCalledWith({ + baseUrl: jenkinsInfo.baseUrl, + headers: jenkinsInfo.headers, + promisify: true, + }); + expect(mockedJenkinsClient.job.get).toBeCalledWith({ + name: jobFullName, + depth: 1, + }); + expect(mockedJenkinsClient.build.get).toBeCalledWith( + jobFullName, + buildNumber, + ); + }); + it('buildProject', async () => { + await jenkinsApi.buildProject(jenkinsInfo, jobFullName); + + expect(mockedJenkins).toHaveBeenCalledWith({ + baseUrl: jenkinsInfo.baseUrl, + headers: jenkinsInfo.headers, + promisify: true, + }); + expect(mockedJenkinsClient.job.build).toBeCalledWith(jobFullName); + }); +}); diff --git a/plugins/jenkins-backend/src/service/jenkinsApi.ts b/plugins/jenkins-backend/src/service/jenkinsApi.ts new file mode 100644 index 0000000000..7df5c5db1d --- /dev/null +++ b/plugins/jenkins-backend/src/service/jenkinsApi.ts @@ -0,0 +1,283 @@ +/* + * Copyright 2021 Spotify AB + * + * 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 { JenkinsInfo } from './jenkinsInfoProvider'; +import jenkins from 'jenkins'; +import { + BackstageBuild, + BackstageProject, + JenkinsBuild, + JenkinsProject, + ScmDetails, +} from '../types'; + +export class JenkinsApiImpl { + private static readonly lastBuildTreeSpec = `lastBuild[ + number, + url, + fullDisplayName, + displayName, + building, + result, + timestamp, + duration, + actions[ + *[ + *[ + *[ + * + ] + ] + ] + ] + ],`; + + private static readonly jobTreeSpec = `actions[*], + ${JenkinsApiImpl.lastBuildTreeSpec} + jobs{0,1}, + name, + fullName, + displayName, + fullDisplayName, + inQueue`; + + private static readonly jobsTreeSpec = `jobs[ + ${JenkinsApiImpl.jobTreeSpec} + ]{0,50}`; + + /** + * Get a list of projects for the given JenkinsInfo. + * @see ../../../jenkins/src/api/JenkinsApi.ts#getProjects + */ + async getProjects(jenkinsInfo: JenkinsInfo, branch?: string) { + const client = await JenkinsApiImpl.getClient(jenkinsInfo); + const projects: BackstageProject[] = []; + + if (branch) { + // we have been asked to filter to a single branch. + // Assume jenkinsInfo.jobFullName is a folder which contains one job per branch. + // TODO: extract a strategy interface for this + const job = await client.job.get({ + name: `${jenkinsInfo.jobFullName}/${branch}`, + tree: JenkinsApiImpl.jobTreeSpec.replace(/\s/g, ''), + }); + projects.push(this.augmentProject(job)); + } else { + // We aren't filtering + // Assume jenkinsInfo.jobFullName is a folder which contains one job per branch. + const folder = await client.job.get({ + name: jenkinsInfo.jobFullName, + // Filter only be the information we need, instead of loading all fields. + // Limit to only show the latest build for each job and only load 50 jobs + // at all. + // Whitespaces are only included for readablity here and stripped out + // before sending to Jenkins + tree: JenkinsApiImpl.jobsTreeSpec.replace(/\s/g, ''), + }); + + // TODO: support this being a project itself. + for (const jobDetails of folder.jobs) { + // for each branch (we assume) + if (jobDetails?.jobs) { + // skipping folders inside folders for now + // TODO: recurse + } else { + projects.push(this.augmentProject(jobDetails)); + } + } + } + return projects; + } + + /** + * Get a single build. + * @see ../../../jenkins/src/api/JenkinsApi.ts#getBuild + */ + async getBuild( + jenkinsInfo: JenkinsInfo, + jobFullName: string, + buildNumber: number, + ) { + const client = await JenkinsApiImpl.getClient(jenkinsInfo); + + const project = await client.job.get({ + name: jobFullName, + depth: 1, + }); + + const build = await client.build.get(jobFullName, buildNumber); + const jobScmInfo = JenkinsApiImpl.extractScmDetailsFromJob(project); + + return this.augmentBuild(build, jobScmInfo); + } + + /** + * Trigger a build of a project + * @see ../../../jenkins/src/api/JenkinsApi.ts#retry + */ + async buildProject(jenkinsInfo: JenkinsInfo, jobFullName: string) { + const client = await JenkinsApiImpl.getClient(jenkinsInfo); + + // looks like the current SDK only supports triggering a new build + // can't see any support for replay (re-running the specific build with the same SCM info) + + // Note Jenkins itself has concepts of rebuild and replay on a job. + // The latter should be possible to trigger with a POST to /replay/rebuild + await client.job.build(jobFullName); + } + + // private helper methods + + private static async getClient(jenkinsInfo: JenkinsInfo) { + // The typings for the jenkins library are out of date so just cast to any + return jenkins({ + baseUrl: jenkinsInfo.baseUrl, + headers: jenkinsInfo.headers, + promisify: true, + }) as any; + } + + private augmentProject(project: JenkinsProject): BackstageProject { + let status: string; + if (project.inQueue) { + status = 'queued'; + } else if (project.lastBuild.building) { + status = 'running'; + } else if (!project.lastBuild.result) { + status = 'unknown'; + } else { + status = project.lastBuild.result; + } + + const jobScmInfo = JenkinsApiImpl.extractScmDetailsFromJob(project); + + return { + ...project, + lastBuild: this.augmentBuild(project.lastBuild, jobScmInfo), + status, + // actions: undefined, + }; + } + + private augmentBuild( + build: JenkinsBuild, + jobScmInfo: ScmDetails | undefined, + ): BackstageBuild { + const source = + build.actions + .filter( + (action: any) => + action._class === 'hudson.plugins.git.util.BuildData', + ) + .map((action: any) => { + const [first]: any = Object.values(action.buildsByBranchName); + const branch = first.revision.branch[0]; + return { + branchName: branch.name, + commit: { + hash: branch.SHA1.substring(0, 8), + }, + }; + }) + .pop() || {}; + + if (jobScmInfo) { + source.url = jobScmInfo.url; + source.displayName = jobScmInfo.displayName; + source.author = jobScmInfo.author; + } + + let status: string; + if (build.building) { + status = 'running'; + } else if (!build.result) { + status = 'unknown'; + } else { + status = build.result; + } + return { + ...build, + status, + source: source, + tests: this.getTestReport(build), + }; + } + + private static extractScmDetailsFromJob( + project: JenkinsProject, + ): ScmDetails | undefined { + const scmInfo: ScmDetails | undefined = project.actions + .filter( + (action: any) => + action._class === 'jenkins.scm.api.metadata.ObjectMetadataAction', + ) + .map((action: any) => { + return { + url: action?.objectUrl, + // https://javadoc.jenkins.io/plugin/scm-api/jenkins/scm/api/metadata/ObjectMetadataAction.html + // branch name for regular builds, pull request title on pull requests + displayName: action?.objectDisplayName, + }; + }) + .pop(); + + if (!scmInfo) { + return undefined; + } + + const author = project.actions + .filter( + (action: any) => + action._class === + 'jenkins.scm.api.metadata.ContributorMetadataAction', + ) + .map((action: any) => { + return action.contributorDisplayName; + }) + .pop(); + + if (author) { + scmInfo.author = author; + } + + return scmInfo; + } + + private getTestReport( + build: JenkinsBuild, + ): { + total: number; + passed: number; + skipped: number; + failed: number; + testUrl: string; + } { + return build.actions + .filter( + (action: any) => + action._class === 'hudson.tasks.junit.TestResultAction', + ) + .map((action: any) => { + return { + total: action.totalCount, + passed: action.totalCount - action.failCount - action.skipCount, + skipped: action.skipCount, + failed: action.failCount, + testUrl: `${build.url}${action.urlName}/`, + }; + }) + .pop(); + } +} diff --git a/plugins/jenkins-backend/src/service/jenkinsInfoProvider.test.ts b/plugins/jenkins-backend/src/service/jenkinsInfoProvider.test.ts new file mode 100644 index 0000000000..7c4761a19a --- /dev/null +++ b/plugins/jenkins-backend/src/service/jenkinsInfoProvider.test.ts @@ -0,0 +1,269 @@ +/* + * Copyright 2021 Spotify AB + * + * 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 { DefaultJenkinsInfoProvider, JenkinsInfo } from './jenkinsInfoProvider'; +import { CatalogClient } from '@backstage/catalog-client'; +import { ConfigReader } from '@backstage/config'; +import { Entity, EntityName } from '@backstage/catalog-model'; + +describe('DefaultJenkinsInfoProvider', () => { + const mockCatalog: jest.Mocked = ({ + getEntityByName: jest.fn(), + } as any) as jest.Mocked; + + const entityRef: EntityName = { + kind: 'Component', + namespace: 'foo', + name: 'bar', + }; + + function configureProvider(configData: any, entityData: any) { + const config = new ConfigReader(configData); + mockCatalog.getEntityByName.mockReturnValueOnce( + Promise.resolve(entityData as Entity), + ); + + return DefaultJenkinsInfoProvider.fromConfig({ + config, + catalog: mockCatalog, + }); + } + + it('Handles entity not found', async () => { + const provider = configureProvider({ jenkins: {} }, undefined); + await expect(provider.getInstance({ entityRef })).rejects.toThrowError(); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + }); + + it('Reads simple config and annotation', async () => { + const provider = configureProvider( + { + jenkins: { + baseUrl: 'https://jenkins.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/job-full-name': 'teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toStrictEqual({ + baseUrl: 'https://jenkins.example.com', + headers: { + Authorization: + 'Basic YmFja3N0YWdlIC0gYm90OjEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNlZGYwMTI=', + }, + jobFullName: 'teamA/artistLookup-build', + }); + }); + + it('Reads named default config and annotation', async () => { + const provider = configureProvider( + { + jenkins: { + instances: [ + { + name: 'default', + baseUrl: 'https://jenkins.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + ], + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/job-full-name': 'teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toMatchObject({ + baseUrl: 'https://jenkins.example.com', + jobFullName: 'teamA/artistLookup-build', + }); + }); + + it('Reads named default config (amongst named other configs) and annotation', async () => { + const provider = configureProvider( + { + jenkins: { + instances: [ + { + name: 'default', + baseUrl: 'https://jenkins.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + { + name: 'other', + baseUrl: 'https://jenkins-other.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + ], + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/job-full-name': 'teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toMatchObject({ + baseUrl: 'https://jenkins.example.com', + jobFullName: 'teamA/artistLookup-build', + }); + }); + + it('Reads named other config and named annotation', async () => { + const provider = configureProvider( + { + jenkins: { + instances: [ + { + name: 'default', + baseUrl: 'https://jenkins.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + { + name: 'other', + baseUrl: 'https://jenkins-other.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + ], + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/job-full-name': 'other:teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toMatchObject({ + baseUrl: 'https://jenkins-other.example.com', + jobFullName: 'teamA/artistLookup-build', + }); + }); + + it('Reads simple config and default named annotation', async () => { + const provider = configureProvider( + { + jenkins: { + baseUrl: 'https://jenkins.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/job-full-name': 'default:teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toMatchObject({ + baseUrl: 'https://jenkins.example.com', + jobFullName: 'teamA/artistLookup-build', + }); + }); + + it('Reads simple config and old annotation', async () => { + const provider = configureProvider( + { + jenkins: { + baseUrl: 'https://jenkins.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/github-folder': 'teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toMatchObject({ + baseUrl: 'https://jenkins.example.com', + jobFullName: 'teamA/artistLookup-build', + }); + }); + + it('Reads named other config (with on default config) and named annotation', async () => { + const provider = configureProvider( + { + jenkins: { + instances: [ + { + name: 'other', + baseUrl: 'https://jenkins-other.example.com', + username: 'backstage - bot', + apiKey: '123456789abcdef0123456789abcedf012', + }, + ], + }, + }, + { + metadata: { + annotations: { + 'jenkins.io/job-full-name': 'other:teamA/artistLookup-build', + }, + }, + }, + ); + const info: JenkinsInfo = await provider.getInstance({ entityRef }); + + expect(mockCatalog.getEntityByName).toBeCalledWith(entityRef); + expect(info).toMatchObject({ + baseUrl: 'https://jenkins-other.example.com', + jobFullName: 'teamA/artistLookup-build', + }); + }); +}); diff --git a/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts b/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts new file mode 100644 index 0000000000..1f316aa6bc --- /dev/null +++ b/plugins/jenkins-backend/src/service/jenkinsInfoProvider.ts @@ -0,0 +1,232 @@ +/* + * Copyright 2021 Spotify AB + * + * 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 { + Entity, + EntityName, + stringifyEntityRef, +} from '@backstage/catalog-model'; +import { CatalogClient } from '@backstage/catalog-client'; +import { Config } from '@backstage/config'; + +export interface JenkinsInfoProvider { + getInstance(options: { + /** + * The entity to get the info about. + */ + entityRef: EntityName; + /** + * A specific job to get. This is only passed in when we know about a job name we are interested in. + */ + jobFullName?: string; + }): Promise; +} + +export interface JenkinsInfo { + baseUrl: string; + headers?: Record; + jobFullName: string; // TODO: make this an array +} + +/** + * Use default config and annotations, build using fromConfig static function. + * + * This will fallback through various deprecated config and annotation schemes. + */ +export class DefaultJenkinsInfoProvider implements JenkinsInfoProvider { + static readonly OLD_JENKINS_ANNOTATION = 'jenkins.io/github-folder'; + static readonly NEW_JENKINS_ANNOTATION = 'jenkins.io/job-full-name'; + + private constructor( + private readonly config: { + name: string; + baseUrl: string; + username: string; + apiKey: string; + }[], + private readonly catalog: CatalogClient, + ) {} + + static fromConfig(options: { + config: Config; + catalog: CatalogClient; + }): DefaultJenkinsInfoProvider { + return new DefaultJenkinsInfoProvider( + this.loadConfig(options.config), + options.catalog, + ); + } + + async getInstance(opt: { + entityRef: EntityName; + jobFullName?: string; + }): Promise { + // load entity + const entity = await this.catalog.getEntityByName(opt.entityRef); + if (!entity) { + throw new Error( + `Couldn't find entity with name: ${stringifyEntityRef(opt.entityRef)}`, + ); + } + + // lookup `[jenkinsName#]jobFullName` from entity annotation + const jenkinsAndJobName = DefaultJenkinsInfoProvider.getEntityAnnotationValue( + entity, + ); + if (!jenkinsAndJobName) { + throw new Error( + `Couldn't find jenkins annotation (${ + DefaultJenkinsInfoProvider.NEW_JENKINS_ANNOTATION + }) on entity with name: ${stringifyEntityRef(opt.entityRef)}`, + ); + } + + let jobFullName; + let jenkinsName: string | undefined; + const splitIndex = jenkinsAndJobName.indexOf(':'); + if (splitIndex === -1) { + // no jenkinsName specified, use default + jobFullName = jenkinsAndJobName; + } else { + // There is a jenkinsName specified + jenkinsName = jenkinsAndJobName.substring(0, splitIndex); + jobFullName = jenkinsAndJobName.substring( + splitIndex + 1, + jenkinsAndJobName.length, + ); + } + + // lookup baseURL + creds from config + const instanceConfig = DefaultJenkinsInfoProvider.getInstanceConfig( + jenkinsName, + this.config, + ); + + const creds = Buffer.from( + `${instanceConfig.username}:${instanceConfig.apiKey}`, + 'binary', + ).toString('base64'); + + return { + baseUrl: instanceConfig.baseUrl, + headers: { + Authorization: `Basic ${creds}`, + }, + jobFullName, + }; + } + + private static getEntityAnnotationValue(entity: Entity) { + return ( + entity.metadata.annotations?.[ + DefaultJenkinsInfoProvider.OLD_JENKINS_ANNOTATION + ] || + entity.metadata.annotations?.[ + DefaultJenkinsInfoProvider.NEW_JENKINS_ANNOTATION + ] + ); + } + + private static getInstanceConfig( + jenkinsName: string | undefined, + config: { + name: string; + baseUrl: string; + username: string; + apiKey: string; + }[], + ): { name: string; baseUrl: string; username: string; apiKey: string } { + const DEFAULT_JENKINS_NAME = 'default'; + + if (!jenkinsName || jenkinsName === DEFAULT_JENKINS_NAME) { + // no name provided, use default + const instanceConfig = config.find(c => c.name === DEFAULT_JENKINS_NAME); + + if (!instanceConfig) { + throw new Error( + `Couldn't find a default jenkins instance in the config. Either configure an instance with name ${DEFAULT_JENKINS_NAME} or add a prefix to your annotation value.`, + ); + } + + return instanceConfig; + } + + // A name is provided, look it up. + const instanceConfig = config.find(c => c.name === jenkinsName); + + if (!instanceConfig) { + throw new Error( + `Couldn't find a jenkins instance in the config with name ${jenkinsName}`, + ); + } + return instanceConfig; + } + + private static loadConfig( + rootConfig: Config, + ): { name: string; baseUrl: string; username: string; apiKey: string }[] { + const DEFAULT_JENKINS_NAME = 'default'; + + const jenkinsConfig = rootConfig.getConfig('jenkins'); + + // load all named instance config + const namedInstanceConfig = + jenkinsConfig.getOptionalConfigArray('instances')?.map(c => ({ + name: c.getString('name'), + baseUrl: c.getString('baseUrl'), + username: c.getString('username'), + apiKey: c.getString('apiKey'), + })) || []; + + // load unnamed default config + const hasNamedDefault = namedInstanceConfig.some( + x => x.name === DEFAULT_JENKINS_NAME, + ); + + // Get these as optional strings and check to give a better error message + const baseUrl = jenkinsConfig.getOptionalString('baseUrl'); + const username = jenkinsConfig.getOptionalString('username'); + const apiKey = jenkinsConfig.getOptionalString('apiKey'); + + if (hasNamedDefault && (baseUrl || username || apiKey)) { + throw new Error( + `Found both a named jenkins instance with name ${DEFAULT_JENKINS_NAME} and top level baseUrl, username or apiKey config. Use only one style of config.`, + ); + } + + const unnamedNonePresent = !baseUrl && !username && !apiKey; + const unnamedAllPresent = baseUrl && username && apiKey; + if (!(unnamedAllPresent || unnamedNonePresent)) { + throw new Error( + `Found partial default jenkins config. All (or none) of baseUrl, username ans apiKey must be provided.`, + ); + } + + if (unnamedAllPresent) { + const unnamedInstanceConfig = [ + { name: DEFAULT_JENKINS_NAME, baseUrl, username, apiKey }, + ] as { + name: string; + baseUrl: string; + username: string; + apiKey: string; + }[]; + + return [...namedInstanceConfig, ...unnamedInstanceConfig]; + } + + return namedInstanceConfig; + } +} diff --git a/plugins/jenkins-backend/src/service/router.ts b/plugins/jenkins-backend/src/service/router.ts new file mode 100644 index 0000000000..cd250aea31 --- /dev/null +++ b/plugins/jenkins-backend/src/service/router.ts @@ -0,0 +1,128 @@ +/* + * Copyright 2020 Spotify AB + * + * 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 { errorHandler } from '@backstage/backend-common'; +import express from 'express'; +import Router from 'express-promise-router'; +import { Logger } from 'winston'; +import { JenkinsInfoProvider } from './jenkinsInfoProvider'; +import { JenkinsApiImpl } from './jenkinsApi'; + +export interface RouterOptions { + logger: Logger; + jenkinsInfoProvider: JenkinsInfoProvider; +} + +export async function createRouter( + options: RouterOptions, +): Promise { + const { jenkinsInfoProvider } = options; + + const jenkinsApi = new JenkinsApiImpl(); + + const router = Router(); + router.use(express.json()); + + router.get( + '/v1/entity/:namespace/:kind/:name/projects', + async (request, response) => { + const { namespace, kind, name } = request.params; + const branch = request.query.branch; + let branchStr: string | undefined; + + if (branch === undefined) { + branchStr = undefined; + } else if (typeof branch === 'string') { + branchStr = branch; + } else { + // this was passed in as something weird -> 400 + // https://evanhahn.com/gotchas-with-express-query-parsing-and-how-to-avoid-them/ + response + .status(400) + .send('Something was unexpected about the branch queryString'); + + return; + } + + const jenkinsInfo = await jenkinsInfoProvider.getInstance({ + entityRef: { + kind, + namespace, + name, + }, + }); + const projects = await jenkinsApi.getProjects(jenkinsInfo, branchStr); + + response.json({ + projects: projects, + }); + }, + ); + + router.get( + '/v1/entity/:namespace/:kind/:name/job/:jobFullName/:buildNumber', + async (request, response) => { + const { + namespace, + kind, + name, + jobFullName, + buildNumber, + } = request.params; + + const jenkinsInfo = await jenkinsInfoProvider.getInstance({ + entityRef: { + kind, + namespace, + name, + }, + jobFullName, + }); + + const build = await jenkinsApi.getBuild( + jenkinsInfo, + jobFullName, + parseInt(buildNumber, 10), + ); + + response.json({ + build: build, + }); + }, + ); + + router.post( + '/v1/entity/:namespace/:kind/:name/job/:jobFullName/:buildNumber::rebuild', + async (request, response) => { + const { namespace, kind, name, jobFullName } = request.params; + + const jenkinsInfo = await jenkinsInfoProvider.getInstance({ + entityRef: { + kind, + namespace, + name, + }, + jobFullName, + }); + + await jenkinsApi.buildProject(jenkinsInfo, jobFullName); + response.json({}); + }, + ); + + router.use(errorHandler()); + return router; +} diff --git a/plugins/jenkins-backend/src/service/standaloneServer.ts b/plugins/jenkins-backend/src/service/standaloneServer.ts new file mode 100644 index 0000000000..a1bc5dd256 --- /dev/null +++ b/plugins/jenkins-backend/src/service/standaloneServer.ts @@ -0,0 +1,57 @@ +/* + * Copyright 2021 Spotify AB + * + * 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 { createServiceBuilder } from '@backstage/backend-common'; +import { Server } from 'http'; +import { Logger } from 'winston'; +import { createRouter } from './router'; +import { EntityRef } from '@backstage/catalog-model'; +import { JenkinsInfo } from './jenkinsInfoProvider'; + +export interface ServerOptions { + port: number; + enableCors: boolean; + logger: Logger; +} + +export async function startStandaloneServer( + options: ServerOptions, +): Promise { + const logger = options.logger.child({ service: 'jenkins-backend' }); + logger.debug('Starting application server...'); + const router = await createRouter({ + logger, + jenkinsInfoProvider: { + async getInstance(_: { entityRef: EntityRef }): Promise { + return { baseUrl: 'https://example.com/', jobFullName: 'build-foo' }; + }, + }, + }); + + let service = createServiceBuilder(module) + .setPort(options.port) + .addRouter('/jenkins', router); + if (options.enableCors) { + service = service.enableCors({ origin: 'http://localhost:3000' }); + } + + return await service.start().catch(err => { + logger.error(err); + process.exit(1); + }); +} + +module.hot?.accept(); diff --git a/plugins/jenkins-backend/src/setupTests.ts b/plugins/jenkins-backend/src/setupTests.ts new file mode 100644 index 0000000000..ba33cf996b --- /dev/null +++ b/plugins/jenkins-backend/src/setupTests.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export {}; diff --git a/plugins/jenkins-backend/src/types.ts b/plugins/jenkins-backend/src/types.ts new file mode 100644 index 0000000000..2a0c5ae7f9 --- /dev/null +++ b/plugins/jenkins-backend/src/types.ts @@ -0,0 +1,87 @@ +/* + * Copyright 2021 Spotify AB + * + * 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 interface ScmDetails { + url?: string; + displayName?: string; + author?: string; +} + +interface CommonBuild { + // standard Jenkins + timestamp: number; + building: boolean; + duration: number; + result?: string; + fullDisplayName: string; + displayName: string; + url: string; + number: number; +} + +export interface JenkinsBuild extends CommonBuild { + // read by us from jenkins but not passed to frontend + actions: any; +} + +/** + * A build as presented by this plugin to the backstage jenkins plugin + */ +export interface BackstageBuild extends CommonBuild { + // added by us + source?: { + branchName: string; + displayName: string; + url: string; + commit: { + hash: string; + }; + author: string; + }; + tests: { + passed: number; + skipped: number; + failed: number; + total: number; + testUrl: string; + }; + status: string; // == building ? 'running' : result, +} + +export interface CommonProject { + // standard Jenkins + lastBuild: CommonBuild; + displayName: string; + fullDisplayName: string; + fullName: string; + inQueue: boolean; +} + +export interface JenkinsProject extends CommonProject { + // standard Jenkins + lastBuild: JenkinsBuild; + + // read by us from jenkins but not passed to frontend + actions: object[]; +} + +export interface BackstageProject extends CommonProject { + // standard Jenkins + lastBuild: BackstageBuild; + + // added by us + status: string; // == inQueue ? 'queued' : lastBuild.building ? 'running' : lastBuild.result, +} diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index fbfb17926b..db61a470f7 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,85 @@ # @backstage/plugin-jenkins +## 0.5.0 + +### Minor Changes + +- 6c7f00eb0: ## Extract an entity-oriented Jenkins Backend + + Change the Jenkins plugin from talking directly with a single Jenkins instance (via the proxy) to having a specific + backend plugin which talks to the Jenkins instances. + + Existing users of the Jenkins plugin will need to configure a Jenkins backend instead of a proxy. + Typically, this means creating a `src/plugins/jenkins.ts` file, adding a reference to it to `src/index.ts` and changing app-config.yaml + + ### jenkins.ts + + ```typescript + import { + createRouter, + DefaultJenkinsInfoProvider, + } from '@backstage/plugin-jenkins-backend'; + import { CatalogClient } from '@backstage/catalog-client'; + import { Router } from 'express'; + import { PluginEnvironment } from '../types'; + + export default async function createPlugin({ + logger, + config, + discovery, + }: PluginEnvironment): Promise { + const catalogClient = new CatalogClient({ discoveryApi: discovery }); + + return await createRouter({ + logger, + jenkinsInfoProvider: new DefaultJenkinsInfoProvider( + catalogClient, + config, + ), + }); + } + ``` + + ### app-config.yaml + + For example + + ```yaml + proxy: + '/jenkins/api': + target: 'https://jenkins.example.com:8080' # your Jenkins URL + changeOrigin: true + headers: + Authorization: Basic ${JENKINS_BASIC_AUTH_HEADER} + ``` + + Would become: + + ```yaml + jenkins: + baseUrl: https://jenkins.example.com:8080 + username: backstage-bot + apiKey: ${JENKINS_PASSWORD} + ``` + + ## Change JavaScript API + + As part of the above change, the JavaScript API exposed by the plugin as a possible place for customisation has changed. + The ApiRef now has an id of `plugin.jenkins.service2` and has entity-based functions to match the endpoints exposed by + the new backend plugin + + ## Change BuildWithStepsPage route + + The plugin originally provided a route to view a particular build of a particular branch so that if you wanted to view + the master branch of an entity annotated with `'jenkins.io/github-folder': teamA/artistLookup-build` you could typically + access `/catalog/default/component/artist-lookup/ci-cd/run/master/7` but would now have to access + `/catalog/default/component/artist-lookup/ci-cd/build/teamA%2FartistLookup-build%2Fmaster/7` + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.4.7 ### Patch Changes diff --git a/plugins/jenkins/README.md b/plugins/jenkins/README.md index 69304cb847..1af511b16f 100644 --- a/plugins/jenkins/README.md +++ b/plugins/jenkins/README.md @@ -16,45 +16,54 @@ cd packages/app yarn add @backstage/plugin-jenkins ``` -2. Add the `EntityJenkinsContent` extension to the entity page in the app: +2. Add and configure the backend plugin according to it's instructions + +3. Add the `EntityJenkinsContent` extension to the `CI/CD` page and `EntityLatestJenkinsRunCard` to the `overview` page in the app (or wherever you'd prefer): + +Note that if you configured a custom JenkinsInfoProvider in step 2, you may need a custom isJenkinsAvailable. ```tsx // In packages/app/src/components/catalog/EntityPage.tsx -import { EntityJenkinsContent } from '@backstage/plugin-jenkins'; +import { + EntityJenkinsContent, + EntityLatestJenkinsRunCard, + isJenkinsAvailable, +} from '@backstage/plugin-jenkins'; // You can add the tab to any number of pages, the service page is shown as an // example here const serviceEntityPage = ( - {/* other tabs... */} - - + + {/* ... */} + + + + + + + {/* ... */} + + {/* other tabs... */} + + + + + + {/* ... */} + + + {/* ... */} + +); ``` -3. Add proxy configuration to `app-config.yaml` +4. Run app with `yarn start` +5. Add the Jenkins folder annotation to your `catalog-info.yaml`. -```yaml -proxy: - '/jenkins/api': - target: 'http://localhost:8080' # your Jenkins URL - changeOrigin: true - headers: - Authorization: Basic ${JENKINS_BASIC_AUTH_HEADER} -``` - -4. Add an environment variable which contains the Jenkins credentials (NOTE: - use an API token, not your password). Here `user` is the name of the user - created in Jenkins. - -```shell -export JENKINS_BASIC_AUTH_HEADER=$(echo -n user:api-token | base64) -``` - -5. Run the app with `yarn start` - -6. Add the Jenkins folder annotation to your `catalog-info.yaml`, (NOTE: - currently this plugin only supports folders and Git SCM) +Currently, this plugin only supports folders and Git SCM. +Note that if you configured a custom JenkinsInfoProvider in step 2, you may need to use a different annotation scheme here ```yaml apiVersion: backstage.io/v1alpha1 @@ -75,21 +84,6 @@ spec: 8. Click the component in the catalog. You should now see Jenkins builds, and a last build result for your master build. -Note: If you are not using environment variables, you can directly type the API -token into `app-config.yaml`. - -```yaml -proxy: - '/jenkins/api': - target: 'http://localhost:8080' # your Jenkins URL - changeOrigin: true - headers: - Authorization: Basic YWRtaW46MTFlYzI1NmU0Mzg1MDFjM2Y1Yzc2Yjc1MWE3ZTQ3YWY4Mw== -``` - -The string starting with `YWR...` is the base64 encoding of the user and their -API token, e.g. `admin:11ec256e438501c3f5c76b751a7e47af83`. - ## Features - View all runs inside a folder diff --git a/plugins/jenkins/api-report.md b/plugins/jenkins/api-report.md index 47ec8d655f..883e74071d 100644 --- a/plugins/jenkins/api-report.md +++ b/plugins/jenkins/api-report.md @@ -9,14 +9,21 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; +import { EntityName } from '@backstage/catalog-model'; +import { EntityRef } from '@backstage/catalog-model'; +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: { entity?: Entity | undefined; }) => 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, @@ -26,46 +33,95 @@ export const EntityLatestJenkinsRunCard: ({ 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 }; export { isJenkinsAvailable as isPluginApplicableToEntity }; +// Warning: (ae-missing-release-tag) "JENKINS_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const JENKINS_ANNOTATION = 'jenkins.io/github-folder'; +// Warning: (ae-missing-release-tag) "JenkinsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) -export class JenkinsApi { - constructor(options: Options); +export interface JenkinsApi { + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (ae-forgotten-export) The symbol "Build" needs to be exported by the entry point index.d.ts + getBuild(options: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise; + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (tsdoc-param-tag-with-invalid-name) The @param block should be followed by a valid parameter name: The identifier cannot non-word characters + // Warning: (ae-forgotten-export) The symbol "Project" needs to be exported by the entry point index.d.ts + getProjects(options: { + entity: EntityRef; + filter: { + branch?: string; + }; + }): Promise; // (undocumented) - extractJobDetailsFromBuildName( - buildName: string, - ): { - jobName: string; - buildNumber: number; - }; - // (undocumented) - extractScmDetailsFromJob(jobDetails: any): any | undefined; - // (undocumented) - getBuild(buildName: string): Promise; - // (undocumented) - getFolder(folderName: string): Promise; - // (undocumented) - getJob(jobName: string): Promise; - // (undocumented) - getLastBuild(jobName: string): Promise; - // (undocumented) - mapJenkinsBuildToCITable( - jenkinsResult: any, - jobScmInfo?: any, - ): CITableBuildInfo; - // (undocumented) - retry(buildName: string): Promise; + retry(options: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise; } +// Warning: (ae-missing-release-tag) "jenkinsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const jenkinsApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "JenkinsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public (undocumented) +export class JenkinsClient implements JenkinsApi { + constructor(options: { + discoveryApi: DiscoveryApi; + identityApi: IdentityApi; + }); + // (undocumented) + getBuild({ + entity, + jobFullName, + buildNumber, + }: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise; + // (undocumented) + getProjects({ + entity, + filter, + }: { + entity: EntityName; + filter: { + branch?: string; + }; + }): Promise; + // (undocumented) + retry({ + entity, + jobFullName, + buildNumber, + }: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): 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< { @@ -76,6 +132,8 @@ const jenkinsPlugin: BackstagePlugin< export { jenkinsPlugin }; 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, @@ -85,6 +143,9 @@ export const LatestRunCard: ({ 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) "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; diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 6cc5436574..e4f3c6e9d8 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins", - "version": "0.4.7", + "version": "0.5.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,12 +34,11 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", - "jenkins": "^0.28.0", "luxon": "^1.25.0", "react": "^16.13.1", "react-dom": "^16.13.1", @@ -48,9 +47,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/jenkins/src/api/JenkinsApi.ts b/plugins/jenkins/src/api/JenkinsApi.ts index c378e15693..4b23fb4292 100644 --- a/plugins/jenkins/src/api/JenkinsApi.ts +++ b/plugins/jenkins/src/api/JenkinsApi.ts @@ -14,246 +14,205 @@ * limitations under the License. */ -import { CITableBuildInfo } from '../components/BuildsPage/lib/CITable'; -import { createApiRef, DiscoveryApi } from '@backstage/core-plugin-api'; - -const jenkins = require('jenkins'); +import { + createApiRef, + DiscoveryApi, + IdentityApi, +} from '@backstage/core-plugin-api'; +import { EntityName, EntityRef } from '@backstage/catalog-model'; export const jenkinsApiRef = createApiRef({ - id: 'plugin.jenkins.service', + id: 'plugin.jenkins.service2', description: 'Used by the Jenkins plugin to make requests', }); -const DEFAULT_PROXY_PATH = '/jenkins/api'; +export interface Build { + // standard Jenkins + timestamp: number; + building: boolean; + duration: number; + result?: string; + fullDisplayName: string; + displayName: string; + url: string; + number: number; -type Options = { - discoveryApi: DiscoveryApi; - /** - * Path to use for requests via the proxy, defaults to /jenkins/api - */ - proxyPath?: string; -}; - -export class JenkinsApi { - private readonly discoveryApi: DiscoveryApi; - private readonly proxyPath: string; - - constructor(options: Options) { - this.discoveryApi = options.discoveryApi; - this.proxyPath = options.proxyPath ?? DEFAULT_PROXY_PATH; - } - - private async getClient() { - const proxyUrl = await this.discoveryApi.getBaseUrl('proxy'); - return jenkins({ baseUrl: proxyUrl + this.proxyPath, promisify: true }); - } - - async retry(buildName: string) { - const client = await this.getClient(); - // looks like the current SDK only supports triggering a new build - // can't see any support for replay (re-running the specific build with the same SCM info) - return await client.job.build(buildName); - } - - async getLastBuild(jobName: string) { - const client = await this.getClient(); - const job = await client.job.get(jobName); - - const lastBuild = await client.build.get(jobName, job.lastBuild.number); - return lastBuild; - } - - extractScmDetailsFromJob(jobDetails: any): any | undefined { - const scmInfo = jobDetails.actions - .filter( - (action: any) => - action._class === 'jenkins.scm.api.metadata.ObjectMetadataAction', - ) - .map((action: any) => { - return { - url: action?.objectUrl, - // https://javadoc.jenkins.io/plugin/scm-api/jenkins/scm/api/metadata/ObjectMetadataAction.html - // branch name for regular builds, pull request title on pull requests - displayName: action?.objectDisplayName, - }; - }) - .pop(); - - if (!scmInfo) { - return undefined; - } - - const author = jobDetails.actions - .filter( - (action: any) => - action._class === - 'jenkins.scm.api.metadata.ContributorMetadataAction', - ) - .map((action: any) => { - return action.contributorDisplayName; - }) - .pop(); - - if (author) { - scmInfo.author = author; - } - - return scmInfo; - } - - async getJob(jobName: string) { - const client = await this.getClient(); - return client.job.get({ - name: jobName, - depth: 1, - }); - } - - async getFolder(folderName: string) { - const client = await this.getClient(); - const folder = await client.job.get({ - name: folderName, - // Filter only be the information we need, instead of loading all fields. - // Limit to only show the latest build for each job and only load 50 jobs - // at all. - // Whitespaces are only included for readablity here and stripped out - // before sending to Jenkins - tree: `jobs[ - actions[*], - builds[ - number, - url, - fullDisplayName, - building, - result, - actions[ - *[ - *[ - *[ - * - ] - ] - ] - ] - ]{0,1}, - jobs{0,1}, - name - ]{0,50} - `.replace(/\s/g, ''), - }); - const results = []; - - for (const jobDetails of folder.jobs) { - const jobScmInfo = this.extractScmDetailsFromJob(jobDetails); - if (jobDetails?.jobs) { - // skipping folders inside folders for now - } else { - for (const buildDetails of jobDetails.builds) { - const ciTable = this.mapJenkinsBuildToCITable( - buildDetails, - jobScmInfo, - ); - results.push(ciTable); - } - } - } - return results; - } - - private getTestReport( - jenkinsResult: any, - ): { - total: number; + // added by us + source?: { + branchName: string; + displayName: string; + url: string; + commit: { + hash: string; + }; + author: string; + }; + tests: { passed: number; skipped: number; failed: number; + total: number; testUrl: string; - } { - return jenkinsResult.actions - .filter( - (action: any) => - action._class === 'hudson.tasks.junit.TestResultAction', - ) - .map((action: any) => { - return { - total: action.totalCount, - passed: action.totalCount - action.failCount - action.skipCount, - skipped: action.skipCount, - failed: action.failCount, - testUrl: `${jenkinsResult.url}${action.urlName}/`, - }; - }) - .pop(); + }; + status: string; // == building ? 'running' : result, +} + +export interface Project { + // standard Jenkins + lastBuild: Build; + displayName: string; + fullDisplayName: string; + fullName: string; + inQueue: string; + // added by us + status: string; // == inQueue ? 'queued' : lastBuild.building ? 'running' : lastBuild.result, + onRestartClick: () => Promise; // TODO rename to handle.* ? also, should this be on lastBuild? +} + +export interface JenkinsApi { + /** + * Get the projects (jobs which have builds, not folders) including info about their lastBuild. + * + * Deciding what jobs are for an entity can be configured by the backstage _Integrator_ in the plugin-jenkins-backend setup + * and by the _Software Engineer_ using annotations agreed with the _Integrator_. + * + * Typically, a folder job will be identified and the backend plugin will recursively look for projects (jobs with builds) within that folder. + * + * @param options.entity the entity whose jobs should be retrieved. + * @param options.filter a filter on jobs. Currently this just takes a branch (and assumes certain structures in jenkins) + */ + getProjects(options: { + entity: EntityRef; + filter: { branch?: string }; + }): Promise; + + /** + * Get a single build. + * + * This takes an entity to support selecting between multiple jenkins instances. + * + * TODO: abstract jobFullName (so we could support differentiating between the same named job on multiple instances). + * @param options.entity + * @param options.jobFullName + * @param options.buildNumber + */ + getBuild(options: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise; + + retry(options: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise; +} + +export class JenkinsClient implements JenkinsApi { + private readonly discoveryApi: DiscoveryApi; + private readonly identityApi: IdentityApi; + + constructor(options: { + discoveryApi: DiscoveryApi; + identityApi: IdentityApi; + }) { + this.discoveryApi = options.discoveryApi; + this.identityApi = options.identityApi; } - mapJenkinsBuildToCITable( - jenkinsResult: any, - jobScmInfo?: any, - ): CITableBuildInfo { - const source = - jenkinsResult.actions - .filter( - (action: any) => - action._class === 'hudson.plugins.git.util.BuildData', - ) - .map((action: any) => { - const [first]: any = Object.values(action.buildsByBranchName); - const branch = first.revision.branch[0]; - return { - branchName: branch.name, - commit: { - hash: branch.SHA1.substring(0, 8), - }, - }; - }) - .pop() || {}; + async getProjects({ + entity, + filter, + }: { + entity: EntityName; + filter: { branch?: string }; + }): Promise { + const url = new URL( + `${await this.discoveryApi.getBaseUrl( + 'jenkins', + )}/v1/entity/${encodeURIComponent(entity.namespace)}/${encodeURIComponent( + entity.kind, + )}/${encodeURIComponent(entity.name)}/projects`, + ); - if (jobScmInfo) { - source.url = jobScmInfo?.url; - source.displayName = jobScmInfo?.displayName; - source.author = jobScmInfo?.author; + if (filter.branch) { + url.searchParams.append('branch', filter.branch); } - const path = new URL(jenkinsResult.url).pathname; - - return { - id: path, - buildNumber: jenkinsResult.number, - buildUrl: jenkinsResult.url, - buildName: jenkinsResult.fullDisplayName, - status: jenkinsResult.building ? 'running' : jenkinsResult.result, - onRestartClick: () => { - // TODO: this won't handle non root context path, need a better way to get the job name - const { jobName } = this.extractJobDetailsFromBuildName(path); - return this.retry(jobName); + const idToken = await this.identityApi.getIdToken(); + const response = await fetch(url.href, { + method: 'GET', + headers: { + ...(idToken && { Authorization: `Bearer ${idToken}` }), }, - source: source, - tests: this.getTestReport(jenkinsResult), - }; + }); + + return ( + (await response.json()).projects?.map((p: Project) => ({ + ...p, + onRestartClick: async () => { + await this.retry({ + entity, + jobFullName: p.fullName, + buildNumber: String(p.lastBuild.number), + }); + }, + })) || [] + ); } - async getBuild(buildName: string) { - const client = await this.getClient(); - const { jobName, buildNumber } = this.extractJobDetailsFromBuildName( - buildName, - ); - const buildResult = await client.build.get(jobName, buildNumber); - return buildResult; + async getBuild({ + entity, + jobFullName, + buildNumber, + }: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise { + const url = `${await this.discoveryApi.getBaseUrl( + 'jenkins', + )}/v1/entity/${encodeURIComponent(entity.namespace)}/${encodeURIComponent( + entity.kind, + )}/${encodeURIComponent(entity.name)}/job/${encodeURIComponent( + jobFullName, + )}/${encodeURIComponent(buildNumber)}`; + + const idToken = await this.identityApi.getIdToken(); + const response = await fetch(url, { + method: 'GET', + headers: { + ...(idToken && { Authorization: `Bearer ${idToken}` }), + }, + }); + + return (await response.json()).build; } - extractJobDetailsFromBuildName(buildName: string) { - const trimmedBuild = buildName.replace(/\/job/g, '').replace(/\/$/, ''); + async retry({ + entity, + jobFullName, + buildNumber, + }: { + entity: EntityName; + jobFullName: string; + buildNumber: string; + }): Promise { + const url = `${await this.discoveryApi.getBaseUrl( + 'jenkins', + )}/v1/entity/${encodeURIComponent(entity.namespace)}/${encodeURIComponent( + entity.kind, + )}/${encodeURIComponent(entity.name)}/job/${encodeURIComponent( + jobFullName, + )}/${encodeURIComponent(buildNumber)}:rebuild`; - const split = trimmedBuild.split('/'); - const buildNumber = parseInt(split[split.length - 1], 10); - const jobName = trimmedBuild.slice( - 0, - trimmedBuild.length - buildNumber.toString(10).length - 1, - ); - - return { - jobName, - buildNumber, - }; + const idToken = await this.identityApi.getIdToken(); + await fetch(url, { + method: 'POST', + headers: { + ...(idToken && { Authorization: `Bearer ${idToken}` }), + }, + }); } } diff --git a/plugins/jenkins/src/api/index.ts b/plugins/jenkins/src/api/index.ts index 7bf664fbed..af1829c0b4 100644 --- a/plugins/jenkins/src/api/index.ts +++ b/plugins/jenkins/src/api/index.ts @@ -14,4 +14,6 @@ * limitations under the License. */ -export { JenkinsApi, jenkinsApiRef } from './JenkinsApi'; +export { JenkinsClient, jenkinsApiRef } from './JenkinsApi'; + +export type { JenkinsApi } from './JenkinsApi'; diff --git a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx index 0bfd2bb5d8..e06332f8f0 100644 --- a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx +++ b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx @@ -30,7 +30,6 @@ import React from 'react'; import { buildRouteRef } from '../../plugin'; import { JenkinsRunStatus } from '../BuildsPage/lib/Status'; import { useBuildWithSteps } from '../useBuildWithSteps'; -import { useProjectSlugFromEntity } from '../useProjectSlugFromEntity'; import { Breadcrumbs, Content, Link } from '@backstage/core-components'; import { useRouteRefParams } from '@backstage/core-plugin-api'; @@ -49,17 +48,16 @@ const useStyles = makeStyles(theme => ({ })); const BuildWithStepsView = () => { - const projectName = useProjectSlugFromEntity(); - const { branch, buildNumber } = useRouteRefParams(buildRouteRef); + // TODO: Add a test that react-router decodes this (even though `generatePath` doesn't encode it for you!) + const { jobFullName, buildNumber } = useRouteRefParams(buildRouteRef); const classes = useStyles(); - const buildPath = `${projectName}/${encodeURIComponent( - branch, - )}/${buildNumber}`; - const [{ value }] = useBuildWithSteps(buildPath); + + const [{ value }] = useBuildWithSteps({ jobFullName, buildNumber }); return (

+ {/* TODO: don't hardcode this link */} Projects Run @@ -104,7 +102,7 @@ const BuildWithStepsView = () => { Jenkins - + View on Jenkins{' '} @@ -112,10 +110,11 @@ const BuildWithStepsView = () => { + {/* TODO: be SCM agnostic */} GitHub - + View on GitHub{' '} diff --git a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx index 6e456bd281..3e5eeffdaa 100644 --- a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -20,34 +20,9 @@ import JenkinsLogo from '../../../../assets/JenkinsLogo.svg'; import { generatePath, Link as RouterLink } from 'react-router-dom'; import { JenkinsRunStatus } from '../Status'; import { useBuilds } from '../../../useBuilds'; -import { useProjectSlugFromEntity } from '../../../useProjectSlugFromEntity'; import { buildRouteRef } from '../../../../plugin'; import { Table, TableColumn } from '@backstage/core-components'; - -export type CITableBuildInfo = { - id: string; - buildName: string; - buildNumber: number; - buildUrl: string; - source: { - branchName: string; - url: string; - displayName: string; - author?: string; - commit: { - hash: string; - }; - }; - status: string; - tests?: { - total: number; - passed: number; - skipped: number; - failed: number; - testUrl: string; - }; - onRestartClick: () => void; -}; +import { Project } from '../../../../api/JenkinsApi'; const FailCount = ({ count }: { count: number }): JSX.Element | null => { if (count !== 0) { @@ -107,44 +82,51 @@ const FailSkippedWidget = ({ const generatedColumns: TableColumn[] = [ { title: 'Build', - field: 'buildName', + field: 'fullName', highlight: true, - render: (row: Partial) => { - if (!row.source?.branchName || !row.buildNumber) { - return <>{row.buildName}; + render: (row: Partial) => { + if (!row.fullName || !row.lastBuild?.number) { + return ( + <> + {row.fullName || + row.fullDisplayName || + row.displayName || + 'Unknown'} + + ); } return ( - {row.buildName} + {row.fullDisplayName} ); }, }, { title: 'Source', - field: 'source.branchName', - render: (row: Partial) => ( + field: 'lastBuild.source.branchName', + render: (row: Partial) => ( <>

- - {row.source?.branchName} + + {row.lastBuild?.source?.branchName}

-

{row.source?.commit?.hash}

+

{row.lastBuild?.source?.commit?.hash}

), }, { title: 'Status', field: 'status', - render: (row: Partial) => { + render: (row: Partial) => { return ( @@ -155,21 +137,22 @@ const generatedColumns: TableColumn[] = [ { title: 'Tests', sorting: false, - render: (row: Partial) => { + render: (row: Partial) => { return ( <>

- {row.tests && ( - - {row.tests.passed} / {row.tests.total} passed + {row.lastBuild?.tests && ( + + {row.lastBuild?.tests.passed} / {row.lastBuild?.tests.total}{' '} + passed )} - {!row.tests && 'n/a'} + {!row.lastBuild?.tests && 'n/a'}

); @@ -178,7 +161,7 @@ const generatedColumns: TableColumn[] = [ { title: 'Actions', sorting: false, - render: (row: Partial) => ( + render: (row: Partial) => ( @@ -192,8 +175,7 @@ const generatedColumns: TableColumn[] = [ type Props = { loading: boolean; retry: () => void; - builds: CITableBuildInfo[]; - projectName: string; + projects?: Project[]; page: number; onChangePage: (page: number) => void; total: number; @@ -202,12 +184,11 @@ type Props = { }; export const CITableView = ({ - projectName, loading, pageSize, page, retry, - builds, + projects, onChangePage, onChangePageSize, total, @@ -226,14 +207,14 @@ export const CITableView = ({ onClick: () => retry(), }, ]} - data={builds ?? []} + data={projects ?? []} onChangePage={onChangePage} onChangeRowsPerPage={onChangePageSize} title={ Jenkins logo - Project: {projectName} + Projects } columns={generatedColumns} @@ -242,9 +223,7 @@ export const CITableView = ({ }; export const CITable = () => { - const projectName = useProjectSlugFromEntity(); - - const [tableProps, { setPage, retry, setPageSize }] = useBuilds(projectName); + const [tableProps, { setPage, retry, setPageSize }] = useBuilds(); return ( ', () => { const entity = { @@ -33,7 +34,10 @@ describe('', () => { }; const jenkinsApi: Partial = { - getLastBuild: () => Promise.resolve({ timestamp: 0, result: 'success' }), + getProjects: () => + Promise.resolve([ + { lastBuild: { timestamp: 0, status: 'success' } }, + ] as Project[]), }; it('should show success status of latest build', async () => { @@ -52,7 +56,7 @@ describe('', () => { it('should show the appropriate error in case of a connection error', async () => { const jenkinsApiWithError: Partial = { - getLastBuild: () => Promise.reject(new Error('Unauthorized')), + getProjects: () => Promise.reject(new Error('Unauthorized')), }; const apis = ApiRegistry.from([[jenkinsApiRef, jenkinsApiWithError]]); @@ -71,7 +75,7 @@ describe('', () => { it('should show the appropriate error in case Jenkins project is not found', async () => { const jenkinsApiWithError: Partial = { - getLastBuild: () => + getProjects: () => Promise.reject({ notFound: true, message: 'jenkins-project not found', diff --git a/plugins/jenkins/src/components/Cards/Cards.tsx b/plugins/jenkins/src/components/Cards/Cards.tsx index 21044a194d..f0b1ff2bca 100644 --- a/plugins/jenkins/src/components/Cards/Cards.tsx +++ b/plugins/jenkins/src/components/Cards/Cards.tsx @@ -19,13 +19,13 @@ import { DateTime, Duration } from 'luxon'; import React from 'react'; import { JenkinsRunStatus } from '../BuildsPage/lib/Status'; import { ErrorType, useBuilds } from '../useBuilds'; -import { useProjectSlugFromEntity } from '../useProjectSlugFromEntity'; import { InfoCard, InfoCardVariants, StructuredMetadataTable, WarningPanel, } from '@backstage/core-components'; +import { Project } from '../../api/JenkinsApi'; const useStyles = makeStyles({ externalLinkIcon: { @@ -39,16 +39,18 @@ const WidgetContent = ({ latestRun, }: { loading?: boolean; - latestRun: any; + latestRun?: Project; branch: string; }) => { const classes = useStyles(); if (loading || !latestRun) return ; - const displayDate = DateTime.fromMillis(latestRun.timestamp).toRelative(); + const displayDate = DateTime.fromMillis( + latestRun.lastBuild.timestamp, + ).toRelative(); const displayDuration = - (latestRun.building ? 'Running for ' : '') + + (latestRun.lastBuild.building ? 'Running for ' : '') + DateTime.local() - .minus(Duration.fromMillis(latestRun.duration)) + .minus(Duration.fromMillis(latestRun.lastBuild.duration)) .toRelative({ locale: 'en' }) ?.replace(' ago', ''); @@ -57,16 +59,14 @@ const WidgetContent = ({ metadata={{ status: ( <> - + ), build: latestRun.fullDisplayName, 'latest run': displayDate, duration: displayDuration, link: ( - + See more on Jenkins{' '} @@ -100,9 +100,8 @@ export const LatestRunCard = ({ branch: string; variant?: InfoCardVariants; }) => { - const projectName = useProjectSlugFromEntity(); - const [{ builds, loading, error }] = useBuilds(projectName, branch); - const latestRun = builds ?? {}; + const [{ projects, loading, error }] = useBuilds({ branch }); + const latestRun = projects?.[0]; return ( {!error ? ( diff --git a/plugins/jenkins/src/components/useBuildWithSteps.ts b/plugins/jenkins/src/components/useBuildWithSteps.ts index 9625d8abbb..c73a116aae 100644 --- a/plugins/jenkins/src/components/useBuildWithSteps.ts +++ b/plugins/jenkins/src/components/useBuildWithSteps.ts @@ -18,34 +18,36 @@ import { useAsyncRetry } from 'react-use'; import { jenkinsApiRef } from '../api'; import { useAsyncPolling } from './useAsyncPolling'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; +import { useEntity } from '@backstage/plugin-catalog-react'; +import { getEntityName } from '@backstage/catalog-model'; const INTERVAL_AMOUNT = 1500; -export function useBuildWithSteps(buildName: string) { + +/** + * Hook to expose a specific build. + * @param jobFullName the full name of the project (job with builds, not a folder). e.g. "department-A/team-1/project-foo/master" + * @param buildNumber the number of the build. e.g. "13" + */ +export function useBuildWithSteps({ + jobFullName, + buildNumber, +}: { + jobFullName: string; + buildNumber: string; +}) { const api = useApi(jenkinsApiRef); const errorApi = useApi(errorApiRef); + const { entity } = useEntity(); const getBuildWithSteps = useCallback(async () => { try { - const build = await api.getBuild(buildName); - - const { jobName } = api.extractJobDetailsFromBuildName(buildName); - const job = await api.getJob(jobName); - const jobInfo = api.extractScmDetailsFromJob(job); - - return Promise.resolve(api.mapJenkinsBuildToCITable(build, jobInfo)); + const entityName = await getEntityName(entity); + return api.getBuild({ entity: entityName, jobFullName, buildNumber }); } catch (e) { errorApi.post(e); return Promise.reject(e); } - }, [buildName, api, errorApi]); - - const restartBuild = async () => { - try { - await api.retry(buildName); - } catch (e) { - errorApi.post(e); - } - }; + }, [buildNumber, jobFullName, entity, api, errorApi]); const { loading, value, retry } = useAsyncRetry(() => getBuildWithSteps(), [ getBuildWithSteps, @@ -59,7 +61,6 @@ export function useBuildWithSteps(buildName: string) { return [ { loading, value, retry }, { - restartBuild, getBuildWithSteps, startPolling, stopPolling, diff --git a/plugins/jenkins/src/components/useBuilds.ts b/plugins/jenkins/src/components/useBuilds.ts index 49be4893a7..820cb099a1 100644 --- a/plugins/jenkins/src/components/useBuilds.ts +++ b/plugins/jenkins/src/components/useBuilds.ts @@ -17,13 +17,23 @@ import { useState } from 'react'; import { useAsyncRetry } from 'react-use'; import { jenkinsApiRef } from '../api'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; +import { useEntity } from '@backstage/plugin-catalog-react'; +import { getEntityName } from '@backstage/catalog-model'; export enum ErrorType { CONNECTION_ERROR, NOT_FOUND, } -export function useBuilds(projectName: string, branch?: string) { +/** + * Hook to expose the latest build for all the pipelines/projects for an entity. + * If `branch` is provided, the latest build for only that branch will be given (but still as a list) + * + * TODO: deprecate branch and add a generic filter concept. + */ +export function useBuilds({ branch }: { branch?: string } = {}) { + const { entity } = useEntity(); + const entityName = getEntityName(entity); const api = useApi(jenkinsApiRef); const errorApi = useApi(errorApiRef); @@ -35,27 +45,24 @@ export function useBuilds(projectName: string, branch?: string) { errorType: ErrorType; }>(); - const restartBuild = async (buildName: string) => { + const restartBuild = async (jobFullName: string, buildNumber: string) => { try { - await api.retry(buildName); + await api.retry({ entity: entityName, jobFullName, buildNumber }); } catch (e) { errorApi.post(e); } }; - const { loading, value: builds, retry } = useAsyncRetry(async () => { + const { loading, value: projects, retry } = useAsyncRetry(async () => { try { - let build; - if (branch) { - build = await api.getLastBuild(`${projectName}/${branch}`); - } else { - build = await api.getFolder(`${projectName}`); - } + const build = await api.getProjects({ + entity: getEntityName(entity), + filter: { branch }, + }); - const size = Array.isArray(build) ? build?.[0].build_num! : 1; - setTotal(size); + setTotal(build.length); - return build || []; + return build; } catch (e) { const errorType = e.notFound ? ErrorType.NOT_FOUND @@ -63,24 +70,22 @@ export function useBuilds(projectName: string, branch?: string) { setError({ message: e.message, errorType }); throw e; } - }, [api, errorApi, projectName, branch]); + }, [api, errorApi, entity, branch]); return [ { page, pageSize, loading, - builds, - projectName, + projects, total, error, }, { - builds, setPage, setPageSize, restartBuild, - retry, + retry, // fetch data again }, ] as const; } diff --git a/plugins/jenkins/src/plugin.ts b/plugins/jenkins/src/plugin.ts index 2548612896..e975361da2 100644 --- a/plugins/jenkins/src/plugin.ts +++ b/plugins/jenkins/src/plugin.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { JenkinsApi, jenkinsApiRef } from './api'; import { createApiFactory, createComponentExtension, @@ -22,7 +21,9 @@ import { createRoutableExtension, createRouteRef, discoveryApiRef, + identityApiRef, } from '@backstage/core-plugin-api'; +import { JenkinsClient, jenkinsApiRef } from './api'; export const rootRouteRef = createRouteRef({ path: '', @@ -30,9 +31,9 @@ export const rootRouteRef = createRouteRef({ }); export const buildRouteRef = createRouteRef({ - path: 'run/:branch/:buildNumber', - params: ['branch', 'buildNumber'], - title: 'Jenkins run', + path: 'build/:jobFullName/:buildNumber', + params: ['jobFullName', 'buildNumber'], + title: 'Jenkins build', }); export const jenkinsPlugin = createPlugin({ @@ -40,8 +41,9 @@ export const jenkinsPlugin = createPlugin({ apis: [ createApiFactory({ api: jenkinsApiRef, - deps: { discoveryApi: discoveryApiRef }, - factory: ({ discoveryApi }) => new JenkinsApi({ discoveryApi }), + deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef }, + factory: ({ discoveryApi, identityApi }) => + new JenkinsClient({ discoveryApi, identityApi }), }), ], routes: { diff --git a/plugins/kafka-backend/api-report.md b/plugins/kafka-backend/api-report.md index f817da4a3b..4065244e6a 100644 --- a/plugins/kafka-backend/api-report.md +++ b/plugins/kafka-backend/api-report.md @@ -7,6 +7,9 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger as Logger_2 } 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; diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index c7cb9c99ad..e81a64ef58 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kafka +## 0.2.11 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.10 ### Patch Changes diff --git a/plugins/kafka/api-report.md b/plugins/kafka/api-report.md index 2a1001773e..6bc169dd24 100644 --- a/plugins/kafka/api-report.md +++ b/plugins/kafka/api-report.md @@ -9,20 +9,28 @@ 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: { entity?: Entity | undefined; }) => 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< { @@ -33,6 +41,9 @@ 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; diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 882edcd462..3e74e9e374 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kafka", - "version": "0.2.10", + "version": "0.2.11", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -34,9 +34,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index dff8e1833d..7925c8bf4e 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-kubernetes-backend +## 0.3.10 + +### Patch Changes + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + ## 0.3.9 ### Patch Changes diff --git a/plugins/kubernetes-backend/api-report.md b/plugins/kubernetes-backend/api-report.md index bd8a7038c5..1592f20880 100644 --- a/plugins/kubernetes-backend/api-report.md +++ b/plugins/kubernetes-backend/api-report.md @@ -10,6 +10,8 @@ import { KubernetesFetchError } from '@backstage/plugin-kubernetes-common'; import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-common'; import { Logger as Logger_2 } from 'winston'; +// Warning: (ae-missing-release-tag) "ClusterDetails" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface ClusterDetails { // (undocumented) @@ -24,9 +26,13 @@ export interface ClusterDetails { url: string; } +// 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) "CustomResource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface CustomResource { // (undocumented) @@ -37,6 +43,8 @@ export interface CustomResource { plural: string; } +// Warning: (ae-missing-release-tag) "FetchResponseWrapper" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface FetchResponseWrapper { // (undocumented) @@ -45,12 +53,16 @@ export interface FetchResponseWrapper { responses: FetchResponse[]; } +// Warning: (ae-missing-release-tag) "KubernetesClustersSupplier" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface KubernetesClustersSupplier { // (undocumented) getClusters(): Promise; } +// Warning: (ae-missing-release-tag) "KubernetesFetcher" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface KubernetesFetcher { // (undocumented) @@ -59,6 +71,8 @@ export interface KubernetesFetcher { ): Promise; } +// Warning: (ae-missing-release-tag) "KubernetesObjectTypes" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type KubernetesObjectTypes = | 'pods' @@ -70,12 +84,17 @@ export type KubernetesObjectTypes = | 'ingresses' | 'customresources'; +// Warning: (ae-missing-release-tag) "KubernetesServiceLocator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface KubernetesServiceLocator { // (undocumented) getClustersByServiceId(serviceId: string): Promise; } +// Warning: (ae-forgotten-export) The symbol "KubernetesFanOutHandler" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "makeRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const makeRouter: ( logger: Logger_2, @@ -83,6 +102,8 @@ export const makeRouter: ( clusterDetails: ClusterDetails[], ) => express.Router; +// Warning: (ae-missing-release-tag) "ObjectFetchParams" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface ObjectFetchParams { // (undocumented) @@ -97,6 +118,8 @@ export interface ObjectFetchParams { serviceId: 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) @@ -107,6 +130,8 @@ export interface RouterOptions { logger: Logger_2; } +// Warning: (ae-missing-release-tag) "ServiceLocatorMethod" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ServiceLocatorMethod = 'multiTenant' | 'http'; diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 9888447464..6bc7382f54 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-backend", - "version": "0.3.9", + "version": "0.3.10", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -31,7 +31,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", "@backstage/plugin-kubernetes-common": "^0.1.2", @@ -53,7 +53,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.7.0", + "@backstage/cli": "^0.7.4", "@types/aws4": "^1.5.1", "supertest": "^6.1.3" }, diff --git a/plugins/kubernetes-common/api-report.md b/plugins/kubernetes-common/api-report.md index 34d6bd8414..04f54b1f1a 100644 --- a/plugins/kubernetes-common/api-report.md +++ b/plugins/kubernetes-common/api-report.md @@ -12,9 +12,13 @@ import { V1Pod } from '@kubernetes/client-node'; import { V1ReplicaSet } from '@kubernetes/client-node'; import { V1Service } 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'; +// 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) @@ -27,6 +31,8 @@ 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) @@ -35,6 +41,8 @@ export interface ConfigMapFetchResponse { type: 'configmaps'; } +// 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) @@ -43,6 +51,8 @@ export interface CustomResourceFetchResponse { type: 'customresources'; } +// 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) @@ -51,6 +61,8 @@ 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 @@ -62,6 +74,8 @@ export type FetchResponse = | IngressesFetchResponse | CustomResourceFetchResponse; +// 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) @@ -70,6 +84,8 @@ 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) @@ -78,6 +94,8 @@ export interface IngressesFetchResponse { type: 'ingresses'; } +// 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' @@ -85,6 +103,8 @@ 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) @@ -95,6 +115,8 @@ export interface KubernetesFetchError { statusCode?: number; } +// 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) @@ -105,12 +127,16 @@ export interface KubernetesRequestBody { entity: Entity; } +// 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) @@ -119,6 +145,8 @@ 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) @@ -127,6 +155,8 @@ 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) diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index dd9f4d8bfa..a370dd9af5 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kubernetes +## 0.4.8 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.4.7 ### Patch Changes diff --git a/plugins/kubernetes/api-report.md b/plugins/kubernetes/api-report.md index 9fe56bc5ca..0a3b466942 100644 --- a/plugins/kubernetes/api-report.md +++ b/plugins/kubernetes/api-report.md @@ -12,11 +12,16 @@ import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-common'; import { OAuthApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "EntityKubernetesContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityKubernetesContent: (_props: { entity?: Entity | undefined; }) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "KubernetesAuthProvidersApi" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "KubernetesAuthProviders" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class KubernetesAuthProviders implements KubernetesAuthProvidersApi { constructor(options: { googleAuthApi: OAuthApi }); @@ -27,9 +32,13 @@ export class KubernetesAuthProviders implements KubernetesAuthProvidersApi { ): Promise; } +// Warning: (ae-missing-release-tag) "kubernetesAuthProvidersApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const kubernetesAuthProvidersApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "kubernetesPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const kubernetesPlugin: BackstagePlugin< { @@ -40,6 +49,9 @@ const kubernetesPlugin: BackstagePlugin< export { kubernetesPlugin }; export { kubernetesPlugin 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; diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index fdfb2a3431..2319f08087 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes", - "version": "0.4.7", + "version": "0.4.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,7 +34,7 @@ "@backstage/config": "^0.1.5", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/plugin-kubernetes-common": "^0.1.2", "@backstage/theme": "^0.2.8", "@kubernetes/client-node": "^0.14.0", @@ -50,9 +50,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index 9bee12436d..ea2d2efac5 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-lighthouse +## 0.2.20 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.19 ### Patch Changes diff --git a/plugins/lighthouse/api-report.md b/plugins/lighthouse/api-report.md index 840daa3987..dca8f80471 100644 --- a/plugins/lighthouse/api-report.md +++ b/plugins/lighthouse/api-report.md @@ -12,9 +12,14 @@ import { Entity } from '@backstage/catalog-model'; import { InfoCardVariants } from '@backstage/core-components'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "Audit" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type Audit = AuditRunning | AuditFailed | AuditCompleted; +// Warning: (ae-forgotten-export) The symbol "AuditBase" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "AuditCompleted" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface AuditCompleted extends AuditBase { // (undocumented) @@ -27,6 +32,8 @@ export interface AuditCompleted extends AuditBase { timeCompleted: string; } +// Warning: (ae-missing-release-tag) "AuditFailed" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface AuditFailed extends AuditBase { // (undocumented) @@ -35,15 +42,22 @@ export interface AuditFailed extends AuditBase { timeCompleted: string; } +// Warning: (ae-missing-release-tag) "AuditRunning" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface AuditRunning extends AuditBase { // (undocumented) status: 'RUNNING'; } +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddedRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EmbeddedRouter: (_props: Props) => 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, @@ -53,11 +67,15 @@ export const EntityLastLighthouseAuditCard: ({ 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: { entity?: Entity | undefined; }) => 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) @@ -66,11 +84,15 @@ 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) @@ -79,6 +101,8 @@ 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) @@ -91,6 +115,8 @@ 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, @@ -100,6 +126,8 @@ export const LastLighthouseAuditCard: ({ variant?: InfoCardVariants | undefined; }) => 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; @@ -109,9 +137,13 @@ 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) @@ -122,6 +154,8 @@ 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' @@ -130,9 +164,13 @@ 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< { @@ -144,6 +182,8 @@ 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); @@ -164,9 +204,13 @@ export class LighthouseRestApi implements LighthouseApi { 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) @@ -181,6 +225,8 @@ 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) @@ -191,6 +237,8 @@ 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 f648041655..f66ea35cff 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-lighthouse", - "version": "0.2.19", + "version": "0.2.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "@backstage/config": "^0.1.4", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -47,9 +47,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/newrelic/api-report.md b/plugins/newrelic/api-report.md index 005097c442..94c3278df1 100644 --- a/plugins/newrelic/api-report.md +++ b/plugins/newrelic/api-report.md @@ -8,9 +8,13 @@ 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 dc5dbecf19..e3fa37faeb 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -42,9 +42,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index f6042fc618..ecf570b6b8 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-org +## 0.3.17 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.3.16 ### Patch Changes diff --git a/plugins/org/api-report.md b/plugins/org/api-report.md index d541505265..78a2f82561 100644 --- a/plugins/org/api-report.md +++ b/plugins/org/api-report.md @@ -11,6 +11,8 @@ import { GroupEntity } from '@backstage/catalog-model'; import { InfoCardVariants } from '@backstage/core-components'; import { UserEntity } from '@backstage/catalog-model'; +// Warning: (ae-missing-release-tag) "EntityGroupProfileCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityGroupProfileCard: ({ variant, @@ -19,11 +21,15 @@ export const EntityGroupProfileCard: ({ variant?: InfoCardVariants | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityMembersListCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityMembersListCard: (_props: { entity?: GroupEntity | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityOwnershipCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityOwnershipCard: ({ variant, @@ -32,6 +38,8 @@ export const EntityOwnershipCard: ({ variant?: InfoCardVariants | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityUserProfileCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityUserProfileCard: ({ variant, @@ -40,6 +48,8 @@ export const EntityUserProfileCard: ({ variant?: InfoCardVariants | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "GroupProfileCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const GroupProfileCard: ({ variant, @@ -48,14 +58,20 @@ export const GroupProfileCard: ({ variant?: InfoCardVariants | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "MembersListCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const MembersListCard: (_props: { entity?: GroupEntity }) => JSX.Element; +// Warning: (ae-missing-release-tag) "orgPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const orgPlugin: BackstagePlugin<{}, {}>; export { orgPlugin }; export { orgPlugin as plugin }; +// Warning: (ae-missing-release-tag) "OwnershipCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const OwnershipCard: ({ variant, @@ -64,6 +80,8 @@ export const OwnershipCard: ({ variant?: InfoCardVariants | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "UserProfileCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const UserProfileCard: ({ variant, diff --git a/plugins/org/package.json b/plugins/org/package.json index 3962121289..2fa17a28de 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org", - "version": "0.3.16", + "version": "0.3.17", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -35,9 +35,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index 9cb7fe11b4..a83afa09f3 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-pagerduty +## 0.3.8 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.3.7 ### Patch Changes diff --git a/plugins/pagerduty/api-report.md b/plugins/pagerduty/api-report.md index e0278c5d27..0740b440ee 100644 --- a/plugins/pagerduty/api-report.md +++ b/plugins/pagerduty/api-report.md @@ -12,34 +12,54 @@ import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { PropsWithChildren } 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 const pagerDutyApiRef: ApiRef; +// 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) "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 { + // 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, ): PagerDutyClient; + // Warning: (ae-forgotten-export) The symbol "Incident" needs to be exported by the entry point index.d.ts + // // (undocumented) getIncidentsByServiceId(serviceId: string): Promise; + // Warning: (ae-forgotten-export) The symbol "OnCall" needs to be exported by the entry point index.d.ts + // // (undocumented) getOnCallByPolicyId(policyId: string): Promise; + // Warning: (ae-forgotten-export) The symbol "Service" needs to be exported by the entry point index.d.ts + // // (undocumented) getServiceByIntegrationKey(integrationKey: string): Promise; + // Warning: (ae-forgotten-export) The symbol "TriggerAlarmRequest" needs to be exported by the entry point index.d.ts + // // (undocumented) triggerAlarm({ integrationKey, @@ -49,16 +69,23 @@ export class PagerDutyClient implements PagerDutyApi { }: TriggerAlarmRequest): Promise; } +// 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-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({ children, }: PropsWithChildren): 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 9cb95c25d7..2f02cce9b3 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-pagerduty", - "version": "0.3.7", + "version": "0.3.8", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -47,9 +47,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/proxy-backend/api-report.md b/plugins/proxy-backend/api-report.md index 812c3f7221..eb7fbec12e 100644 --- a/plugins/proxy-backend/api-report.md +++ b/plugins/proxy-backend/api-report.md @@ -8,6 +8,9 @@ import express from 'express'; import { Logger as Logger_2 } 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; diff --git a/plugins/register-component/CHANGELOG.md b/plugins/register-component/CHANGELOG.md index 642f465f54..083f45c321 100644 --- a/plugins/register-component/CHANGELOG.md +++ b/plugins/register-component/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-register-component +## 0.2.20 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.2.19 ### Patch Changes diff --git a/plugins/register-component/api-report.md b/plugins/register-component/api-report.md index a150f4be2c..39aeb39505 100644 --- a/plugins/register-component/api-report.md +++ b/plugins/register-component/api-report.md @@ -8,6 +8,8 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "RegisterComponentPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RegisterComponentPage: ({ catalogRouteRef, @@ -15,6 +17,8 @@ export const RegisterComponentPage: ({ catalogRouteRef: RouteRef; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "registerComponentPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const registerComponentPlugin: BackstagePlugin< { @@ -25,6 +29,8 @@ const registerComponentPlugin: BackstagePlugin< export { registerComponentPlugin as plugin }; export { registerComponentPlugin }; +// 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 export const Router: ({ catalogRouteRef, diff --git a/plugins/register-component/package.json b/plugins/register-component/package.json index 5996b865fd..d763924b69 100644 --- a/plugins/register-component/package.json +++ b/plugins/register-component/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-register-component", - "version": "0.2.19", + "version": "0.2.20", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -46,9 +46,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index 7f4a7e1b8e..f7172844ae 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar-backend +## 0.1.13 + +### Patch Changes + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + ## 0.1.12 ### Patch Changes diff --git a/plugins/rollbar-backend/api-report.md b/plugins/rollbar-backend/api-report.md index 02a79fa267..ecac80237f 100644 --- a/plugins/rollbar-backend/api-report.md +++ b/plugins/rollbar-backend/api-report.md @@ -7,9 +7,13 @@ import { Config } from '@backstage/config'; import express from 'express'; import { Logger as Logger_2 } 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, @@ -19,6 +23,8 @@ export function getRequestHeaders( }; }; +// 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_2); @@ -30,8 +36,12 @@ export class RollbarApi { item_id?: number; }, ): Promise; + // Warning: (ae-forgotten-export) The symbol "RollbarProject" needs to be exported by the entry point index.d.ts + // // (undocumented) getAllProjects(): Promise; + // Warning: (ae-forgotten-export) The symbol "RollbarItemCount" needs to be exported by the entry point index.d.ts + // // (undocumented) getOccuranceCounts( projectName: string, @@ -42,8 +52,12 @@ export class RollbarApi { ): 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(projectName: string): Promise; + // Warning: (ae-forgotten-export) The symbol "RollbarTopActiveItem" needs to be exported by the entry point index.d.ts + // // (undocumented) getTopActiveItems( projectName: string, @@ -54,6 +68,8 @@ export class RollbarApi { ): 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/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 6f6d87e30e..5ab7b1cf4a 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-rollbar-backend", - "version": "0.1.12", + "version": "0.1.13", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.3", + "@backstage/backend-common": "^0.8.6", "@backstage/config": "^0.1.5", "@types/express": "^4.17.6", "axios": "^0.21.1", @@ -47,7 +47,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.7.1", + "@backstage/cli": "^0.7.4", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index 5ba8a5fee2..5d04f96d6e 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-rollbar +## 0.3.9 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.3.8 ### Patch Changes diff --git a/plugins/rollbar/api-report.md b/plugins/rollbar/api-report.md index c2ea5bb364..4009702da4 100644 --- a/plugins/rollbar/api-report.md +++ b/plugins/rollbar/api-report.md @@ -12,30 +12,47 @@ import { Entity } from '@backstage/catalog-model'; import { IdentityApi } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// 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: (_props: Props) => 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: { entity?: Entity | undefined; }) => 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, @@ -43,9 +60,13 @@ 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: { @@ -66,6 +87,8 @@ 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) const rollbarPlugin: BackstagePlugin< { @@ -76,6 +99,9 @@ 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_2) => JSX.Element; diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 4cbffe3fff..92a338079c 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-rollbar", - "version": "0.3.8", + "version": "0.3.9", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,7 +34,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -48,9 +48,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 45ba753e34..857667bc6d 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.1.3 + +### Patch Changes + +- e114cc7e0: updated paths to consider differences between platform (windows corrected) +- Updated dependencies + - @backstage/backend-common@0.8.6 + - @backstage/plugin-scaffolder-backend@0.14.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/api-report.md b/plugins/scaffolder-backend-module-rails/api-report.md index dc26d22fe4..7d1576c7f1 100644 --- a/plugins/scaffolder-backend-module-rails/api-report.md +++ b/plugins/scaffolder-backend-module-rails/api-report.md @@ -8,6 +8,8 @@ import { ScmIntegrations } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-backend'; import { UrlReader } from '@backstage/backend-common'; +// Warning: (ae-missing-release-tag) "createFetchRailsAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createFetchRailsAction(options: { reader: UrlReader; diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 4d734f8440..3062136a76 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", - "version": "0.1.2", + "version": "0.1.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", - "@backstage/plugin-scaffolder-backend": "^0.13.0", + "@backstage/backend-common": "^0.8.6", + "@backstage/plugin-scaffolder-backend": "^0.14.0", "@backstage/config": "^0.1.5", "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", @@ -29,7 +29,7 @@ "fs-extra": "^9.0.0" }, "devDependencies": { - "@backstage/cli": "^0.7.1", + "@backstage/cli": "^0.7.4", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "@types/command-exists": "^1.2.0", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 5563bb0570..39d68a6f1d 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-scaffolder-backend +## 0.14.0 + +### Minor Changes + +- 96fc27698: Updated inputs for the `publish:github:pull-request` action. + + Now requires a `repoUrl` instead of separate `owner` and `repo` inputs. This aligns with the output of the `RepoUrlPicker` ui field used by the pull-request sample template. + +### Patch Changes + +- e75506fe7: Unsubscribe from broker after response is flushed +- ea1d956ef: Updating fs-extra to 10.0.0 to handle broken symbolic links correctly +- 31de5f27f: Add new `fetch:template` action which handles the same responsibilities as `fetch:cookiecutter` without the external dependency on `cookiecutter`. For information on migrating from `fetch:cookiecutter` to `fetch:template`, see the [migration guide](https://backstage.io/docs/features/software-templates/builtin-actions#migrating-from-fetch-cookiecutter-to-fetch-template) in the docs. +- 84d329e2a: Scaffolder: Added an 'eq' handlebars helper for use in software template YAML files. This can be used to execute a step depending on the value of an input, e.g.: + + ```yaml + steps: + id: 'conditional-step' + action: 'custom-action' + if: '{{ eq parameters.myvalue "custom" }}', + ``` + +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + ## 0.13.0 ### Minor Changes diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index d6aa1e4e75..f29274cc24 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -21,6 +21,9 @@ import { TemplateEntityV1beta2 } from '@backstage/catalog-model'; import { UrlReader } from '@backstage/backend-common'; import { Writable } from 'stream'; +// Warning: (ae-forgotten-export) The symbol "InputBase" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "ActionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ActionContext = { baseUrl?: string; @@ -33,6 +36,8 @@ export type ActionContext = { createTemporaryDirectory(): Promise; }; +// Warning: (ae-missing-release-tag) "CatalogEntityClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class CatalogEntityClient { constructor(catalogClient: CatalogApi); @@ -44,6 +49,8 @@ export class CatalogEntityClient { ): Promise; } +// Warning: (ae-missing-release-tag) "createBuiltinActions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createBuiltinActions: (options: { reader: UrlReader; @@ -53,18 +60,26 @@ export const createBuiltinActions: (options: { config: Config; }) => TemplateAction[]; +// Warning: (ae-missing-release-tag) "createCatalogRegisterAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createCatalogRegisterAction(options: { catalogClient: CatalogApi; integrations: ScmIntegrations; }): TemplateAction; +// Warning: (ae-missing-release-tag) "createCatalogWriteAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createCatalogWriteAction(): TemplateAction; +// Warning: (ae-missing-release-tag) "createDebugLogAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createDebugLogAction(): TemplateAction; +// Warning: (ae-missing-release-tag) "createFetchCookiecutterAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createFetchCookiecutterAction(options: { reader: UrlReader; @@ -72,60 +87,85 @@ export function createFetchCookiecutterAction(options: { containerRunner: ContainerRunner; }): TemplateAction; +// Warning: (ae-missing-release-tag) "createFetchPlainAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createFetchPlainAction(options: { reader: UrlReader; integrations: ScmIntegrations; }): TemplateAction; +// Warning: (ae-missing-release-tag) "createFetchTemplateAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createFetchTemplateAction(options: { reader: UrlReader; integrations: ScmIntegrations; }): TemplateAction; +// Warning: (ae-missing-release-tag) "createFilesystemDeleteAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createFilesystemDeleteAction: () => TemplateAction; +// Warning: (ae-missing-release-tag) "createFilesystemRenameAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createFilesystemRenameAction: () => TemplateAction; +// Warning: (ae-missing-release-tag) "createPublishAzureAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createPublishAzureAction(options: { integrations: ScmIntegrationRegistry; config: Config; }): TemplateAction; +// Warning: (ae-missing-release-tag) "createPublishBitbucketAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createPublishBitbucketAction(options: { integrations: ScmIntegrationRegistry; config: Config; }): TemplateAction; +// Warning: (ae-missing-release-tag) "createPublishFileAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export function createPublishFileAction(): TemplateAction; +// Warning: (ae-missing-release-tag) "createPublishGithubAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createPublishGithubAction(options: { integrations: ScmIntegrationRegistry; config: Config; }): TemplateAction; +// Warning: (ae-forgotten-export) The symbol "CreateGithubPullRequestActionOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createPublishGithubPullRequestAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createPublishGithubPullRequestAction: ({ integrations, clientFactory, }: CreateGithubPullRequestActionOptions) => TemplateAction; +// Warning: (ae-missing-release-tag) "createPublishGitlabAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createPublishGitlabAction(options: { integrations: ScmIntegrationRegistry; config: Config; }): TemplateAction; +// 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) "createTemplateAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const createTemplateAction: < Input extends Partial<{ @@ -135,6 +175,8 @@ export const createTemplateAction: < templateAction: TemplateAction, ) => TemplateAction; +// Warning: (ae-missing-release-tag) "fetchContents" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function fetchContents({ reader, @@ -150,6 +192,8 @@ export function fetchContents({ outputPath: string; }): 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) @@ -170,6 +214,9 @@ export interface RouterOptions { taskWorkers?: number; } +// Warning: (ae-forgotten-export) The symbol "RunCommandOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "runCommand" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const runCommand: ({ command, @@ -177,6 +224,8 @@ export const runCommand: ({ logStream, }: RunCommandOptions) => Promise; +// Warning: (ae-missing-release-tag) "TemplateAction" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type TemplateAction = { id: string; @@ -188,6 +237,8 @@ export type TemplateAction = { handler: (ctx: ActionContext) => Promise; }; +// Warning: (ae-missing-release-tag) "TemplateActionRegistry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class TemplateActionRegistry { // (undocumented) diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index d31e6c0d5f..8f10c9fa53 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "0.13.0", + "version": "0.14.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/catalog-client": "^0.3.16", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", @@ -65,7 +65,7 @@ "yaml": "^1.10.0" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/test-utils": "^0.1.14", "@types/command-exists": "^1.2.0", "@types/fs-extra": "^9.0.1", diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 53a2043456..3e80dc993e 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder +## 0.10.1 + +### Patch Changes + +- 73951fc44: Add options to mask or hide values on review state +- 976b61080: Updated the software templates list page (`ScaffolderPage`) to use the `useEntityListProvider` hook from #5643. This reduces the code footprint, making it easier to customize the display of this page, and consolidates duplicate approaches to querying the catalog with filters. + + - The `useEntityTypeFilter` hook has been updated along with the underlying `EntityTypeFilter` to work with multiple values, to allow more flexibility for different user interfaces. It's unlikely that this change affects you; however, if you're using either of these directly, you'll need to update your usage. + - `SearchToolbar` was renamed to `EntitySearchBar` and moved to `catalog-react` to be usable by other entity list pages + - `UserListPicker` now has an `availableTypes` prop to restrict which user-related options to present + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.10.0 ### Minor Changes diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 2f9d10b7ac..1be7e8fec8 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -23,11 +23,15 @@ import { default as React_2 } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; import { ScmIntegrationRegistry } from '@backstage/integration'; +// Warning: (ae-missing-release-tag) "createScaffolderFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createScaffolderFieldExtension( options: FieldExtensionOptions, ): Extension<() => null>; +// Warning: (ae-missing-release-tag) "CustomFieldValidator" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type CustomFieldValidator = | ((data: T, field: FieldValidation) => void) @@ -39,9 +43,13 @@ export type CustomFieldValidator = }, ) => void); +// Warning: (ae-missing-release-tag) "EntityPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityPickerFieldExtension: () => null; +// Warning: (ae-missing-release-tag) "FieldExtensionOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type FieldExtensionOptions = { name: string; @@ -49,12 +57,18 @@ export type FieldExtensionOptions = { validation?: CustomFieldValidator; }; +// Warning: (ae-missing-release-tag) "OwnerPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const OwnerPickerFieldExtension: () => null; +// Warning: (ae-missing-release-tag) "RepoUrlPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const RepoUrlPickerFieldExtension: () => null; +// Warning: (ae-missing-release-tag) "ScaffolderApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface ScaffolderApi { // (undocumented) @@ -67,15 +81,25 @@ export interface ScaffolderApi { host: string; }[] >; + // Warning: (ae-forgotten-export) The symbol "ScaffolderTask" needs to be exported by the entry point index.d.ts + // // (undocumented) getTask(taskId: string): Promise; + // Warning: (ae-forgotten-export) The symbol "TemplateParameterSchema" needs to be exported by the entry point index.d.ts + // // (undocumented) getTemplateParameterSchema( templateName: EntityName, ): Promise; + // Warning: (ae-forgotten-export) The symbol "ListActionsResponse" needs to be exported by the entry point index.d.ts + // // (undocumented) listActions(): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen scaffold(templateName: string, values: Record): Promise; + // Warning: (ae-forgotten-export) The symbol "LogEvent" needs to be exported by the entry point index.d.ts + // // (undocumented) streamLogs({ taskId, @@ -86,9 +110,13 @@ export interface ScaffolderApi { }): Observable; } +// Warning: (ae-missing-release-tag) "scaffolderApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const scaffolderApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "ScaffolderClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class ScaffolderClient implements ScaffolderApi { constructor(options: { @@ -114,6 +142,8 @@ export class ScaffolderClient implements ScaffolderApi { ): Promise; // (undocumented) listActions(): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen scaffold(templateName: string, values: Record): Promise; // (undocumented) streamLogs({ @@ -125,12 +155,18 @@ export class ScaffolderClient implements ScaffolderApi { }): Observable; } +// Warning: (ae-missing-release-tag) "ScaffolderFieldExtensions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ScaffolderFieldExtensions: React_2.ComponentType; +// Warning: (ae-missing-release-tag) "ScaffolderPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const ScaffolderPage: () => JSX.Element; +// Warning: (ae-missing-release-tag) "scaffolderPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const scaffolderPlugin: BackstagePlugin< { diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 24b48e7fd1..78f9c269d9 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder", - "version": "0.10.0", + "version": "0.10.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,7 +38,7 @@ "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -63,9 +63,9 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.test.tsx b/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.test.tsx new file mode 100644 index 0000000000..5f7091832f --- /dev/null +++ b/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.test.tsx @@ -0,0 +1,88 @@ +/* + * 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 { getReviewData } from './MultistepJsonForm'; + +describe('MultistepJsonForm', () => { + const formDataMock = { + password: 'password', + masked: 'Some info to mask', + open: 'Some open info', + hidden: 'Some info to hide', + 'other-open': 'Other open info', + }; + + const stepsMock = [ + { + title: 'The test template', + schema: { + title: 'The test template', + properties: { + password: { + title: 'Password', + type: 'string', + 'ui:widget': 'password', + }, + masked: { + title: 'Masked', + type: 'string', + 'ui:backstage': { + review: { + show: true, + mask: '******', + }, + }, + }, + open: { + title: 'Open info', + type: 'string', + }, + }, + }, + }, + { + title: 'Other fields', + schema: { + title: 'Other fields', + properties: { + hidden: { + title: 'Hidden', + type: 'string', + 'ui:backstage': { + review: { + show: false, + }, + }, + }, + 'other-open': { + title: 'Other Open Info', + type: 'string', + }, + }, + }, + }, + ]; + + test('Fields are defined to be hidden or masked', () => { + const reviewData = getReviewData(formDataMock, stepsMock); + + expect(reviewData.password).toBe('******'); + expect(reviewData.masked).toBe('******'); + expect(reviewData.open).toBe('Some open info'); + expect(reviewData.hidden).toBeUndefined(); + expect(reviewData['other-open']).toBe('Other open info'); + }); +}); diff --git a/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx b/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx index 0fc998f82e..cdcc22da29 100644 --- a/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx +++ b/plugins/scaffolder/src/components/MultistepJsonForm/MultistepJsonForm.tsx @@ -24,7 +24,7 @@ import { Stepper, Typography, } from '@material-ui/core'; -import { FormProps, IChangeEvent, withTheme } from '@rjsf/core'; +import { FormProps, IChangeEvent, UiSchema, withTheme } from '@rjsf/core'; import { Theme as MuiTheme } from '@rjsf/material-ui'; import React, { useState } from 'react'; import { transformSchemaToProps } from './schema'; @@ -49,6 +49,59 @@ type Props = { fields?: FormProps['fields']; }; +export function getUiSchemasFromSteps(steps: Step[]): UiSchema[] { + const uiSchemas: Array = []; + steps.forEach(step => { + const schemaProps = step.schema.properties as JsonObject; + for (const key in schemaProps) { + if (schemaProps.hasOwnProperty(key)) { + const uiSchema = schemaProps[key] as UiSchema; + uiSchema.name = key; + uiSchemas.push(uiSchema); + } + } + }); + return uiSchemas; +} + +export function getReviewData(formData: Record, steps: Step[]) { + const uiSchemas = getUiSchemasFromSteps(steps); + const reviewData: Record = {}; + for (const key in formData) { + if (formData.hasOwnProperty(key)) { + const uiSchema = uiSchemas.find(us => us.name === key); + + if (!uiSchema) { + reviewData[key] = formData[key]; + continue; + } + + if (uiSchema['ui:widget'] === 'password') { + reviewData[key] = '******'; + continue; + } + + if (!uiSchema['ui:backstage'] || !uiSchema['ui:backstage'].review) { + reviewData[key] = formData[key]; + continue; + } + + const review = uiSchema['ui:backstage'].review as JsonObject; + if (!review.show) { + continue; + } + + if (review.mask) { + reviewData[key] = review.mask; + continue; + } + reviewData[key] = formData[key]; + } + } + + return reviewData; +} + export const MultistepJsonForm = ({ steps, formData, @@ -64,8 +117,9 @@ export const MultistepJsonForm = ({ setActiveStep(0); onReset(); }; - const handleNext = () => + const handleNext = () => { setActiveStep(Math.min(activeStep + 1, steps.length)); + }; const handleBack = () => setActiveStep(Math.max(activeStep - 1, 0)); return ( @@ -113,7 +167,10 @@ export const MultistepJsonForm = ({ Review and create - + diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index 1a231c252e..3aa1ca4e56 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-search-backend-node +## 0.4.0 + +### Minor Changes + +- 97b2eb37b: Change return value of `SearchEngine.index` to `Promise` to support + implementation of external search engines. + ## 0.3.0 ### Minor Changes diff --git a/plugins/search-backend-node/api-report.md b/plugins/search-backend-node/api-report.md index d327dee01b..4418c4c590 100644 --- a/plugins/search-backend-node/api-report.md +++ b/plugins/search-backend-node/api-report.md @@ -11,13 +11,18 @@ import { default as lunr_2 } from 'lunr'; import { SearchQuery } from '@backstage/search-common'; import { SearchResultSet } from '@backstage/search-common'; +// Warning: (ae-missing-release-tag) "IndexBuilder" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class IndexBuilder { + // Warning: (ae-forgotten-export) The symbol "IndexBuilderOptions" needs to be exported by the entry point index.d.ts constructor({ logger, searchEngine }: IndexBuilderOptions); + // Warning: (ae-forgotten-export) The symbol "RegisterCollatorParameters" needs to be exported by the entry point index.d.ts addCollator({ collator, defaultRefreshIntervalSeconds, }: RegisterCollatorParameters): void; + // Warning: (ae-forgotten-export) The symbol "RegisterDecoratorParameters" needs to be exported by the entry point index.d.ts addDecorator({ decorator }: RegisterDecoratorParameters): void; build(): Promise<{ scheduler: Scheduler; @@ -26,6 +31,8 @@ export class IndexBuilder { getSearchEngine(): SearchEngine; } +// Warning: (ae-missing-release-tag) "LunrSearchEngine" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class LunrSearchEngine implements SearchEngine { constructor({ logger }: { logger: Logger_2 }); @@ -39,12 +46,18 @@ export class LunrSearchEngine implements SearchEngine { protected lunrIndices: Record; // (undocumented) query(query: SearchQuery): Promise; + // Warning: (ae-forgotten-export) The symbol "LunrQueryTranslator" needs to be exported by the entry point index.d.ts + // // (undocumented) setTranslator(translator: LunrQueryTranslator): void; + // Warning: (ae-forgotten-export) The symbol "QueryTranslator" needs to be exported by the entry point index.d.ts + // // (undocumented) protected translator: QueryTranslator; } +// Warning: (ae-missing-release-tag) "Scheduler" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class Scheduler { constructor({ logger }: { logger: Logger_2 }); @@ -53,6 +66,8 @@ export class Scheduler { stop(): void; } +// Warning: (ae-missing-release-tag) "SearchEngine" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export interface SearchEngine { index(type: string, documents: IndexableDocument[]): Promise; diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index f889c10188..c30cf252da 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend-node", - "version": "0.3.0", + "version": "0.4.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -25,8 +25,8 @@ "@types/lunr": "^2.3.3" }, "devDependencies": { - "@backstage/backend-common": "^0.8.5", - "@backstage/cli": "^0.7.2" + "@backstage/backend-common": "^0.8.6", + "@backstage/cli": "^0.7.4" }, "files": [ "dist" diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index 678bcc8169..637a1f02db 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search-backend +## 0.2.3 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.8.6 + - @backstage/plugin-search-backend-node@0.4.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/search-backend/api-report.md b/plugins/search-backend/api-report.md index b4202a1916..2a7457eb81 100644 --- a/plugins/search-backend/api-report.md +++ b/plugins/search-backend/api-report.md @@ -7,6 +7,9 @@ import express from 'express'; import { Logger as Logger_2 } from 'winston'; import { SearchEngine } from '@backstage/plugin-search-backend-node'; +// 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({ engine, diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index d7e163198f..982c5a9ae7 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-backend", - "version": "0.2.2", + "version": "0.2.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,9 +19,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", "@backstage/search-common": "^0.1.2", - "@backstage/plugin-search-backend-node": "^0.3.0", + "@backstage/plugin-search-backend-node": "^0.4.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", @@ -29,7 +29,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.7.1", + "@backstage/cli": "^0.7.4", "@types/supertest": "^2.0.8", "supertest": "^6.1.3" }, diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 18fe34c720..af6cd39e94 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search +## 0.4.3 + +### Patch Changes + +- 078d4973e: Handle request errors properly and display them in the results list. +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.4.2 ### Patch Changes diff --git a/plugins/search/api-report.md b/plugins/search/api-report.md index 27ecf213bb..505a8989b6 100644 --- a/plugins/search/api-report.md +++ b/plugins/search/api-report.md @@ -17,6 +17,8 @@ import { SearchQuery } from '@backstage/search-common'; import { SearchResult as SearchResult_2 } from '@backstage/search-common'; import { SearchResultSet } from '@backstage/search-common'; +// Warning: (ae-missing-release-tag) "DefaultResultListItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DefaultResultListItem: ({ result, @@ -24,6 +26,9 @@ export const DefaultResultListItem: ({ result: IndexableDocument; }) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "FiltersProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Filters" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Filters: ({ filters, @@ -33,27 +38,42 @@ export const Filters: ({ updateChecked, }: FiltersProps) => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "FiltersButtonProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "FiltersButton" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const FiltersButton: ({ numberOfSelectedFilters, handleToggleFilters, }: FiltersButtonProps) => JSX.Element; +// Warning: (ae-missing-release-tag) "FiltersState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type FiltersState = { selected: string; checked: Array; }; +// Warning: (ae-missing-release-tag) "SearchPage" 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-forgotten-export) The symbol "SearchApi" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "searchApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const searchApiRef: ApiRef; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "SearchBar" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SearchBar: ({ className, debounceTime }: Props) => JSX.Element; +// Warning: (ae-missing-release-tag) "SearchBarNext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated (undocumented) export const SearchBarNext: ({ className, @@ -63,6 +83,8 @@ export const SearchBarNext: ({ debounceTime?: number | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "SearchContextProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SearchContextProvider: ({ initialState, @@ -71,6 +93,8 @@ export const SearchContextProvider: ({ initialState?: SettableSearchContext | undefined; }>) => JSX.Element; +// Warning: (ae-missing-release-tag) "SearchFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SearchFilter: { ({ component: Element, ...props }: Props_2): JSX.Element; @@ -78,6 +102,8 @@ export const SearchFilter: { Select(props: Omit & Component): JSX.Element; }; +// Warning: (ae-missing-release-tag) "SearchFilterNext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated (undocumented) export const SearchFilterNext: { ({ component: Element, ...props }: Props_2): JSX.Element; @@ -85,12 +111,18 @@ export const SearchFilterNext: { Select(props: Omit & Component): JSX.Element; }; +// Warning: (ae-missing-release-tag) "SearchPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SearchPage: () => JSX.Element; +// Warning: (ae-missing-release-tag) "SearchPageNext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public @deprecated (undocumented) export const SearchPageNext: () => JSX.Element; +// Warning: (ae-missing-release-tag) "searchPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const searchPlugin: BackstagePlugin< { @@ -102,6 +134,8 @@ const searchPlugin: BackstagePlugin< export { searchPlugin as plugin }; export { searchPlugin }; +// Warning: (ae-missing-release-tag) "SearchResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SearchResult: ({ children, @@ -109,11 +143,22 @@ export const SearchResult: ({ children: (results: { results: SearchResult_2[] }) => JSX.Element; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "SidebarSearch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const SidebarSearch: () => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "SearchContextValue" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "useSearch" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const useSearch: () => SearchContextValue; +// Warnings were encountered during analysis: +// +// src/components/SearchContext/SearchContext.d.ts:18:5 - (ae-forgotten-export) The symbol "SettableSearchContext" needs to be exported by the entry point index.d.ts +// src/components/SearchFilter/SearchFilter.d.ts:13:5 - (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// src/components/SearchFilter/SearchFilter.d.ts:14:5 - (ae-forgotten-export) The symbol "Component" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/search/package.json b/plugins/search/package.json index c40885e357..9f394f616b 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search", - "version": "0.4.2", + "version": "0.4.3", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,8 @@ "@backstage/config": "^0.1.5", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/errors": "^0.1.1", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/search-common": "^0.1.2", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", @@ -48,9 +49,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/search/src/apis.test.ts b/plugins/search/src/apis.test.ts index 43b77e4927..cc59ca1a77 100644 --- a/plugins/search/src/apis.test.ts +++ b/plugins/search/src/apis.test.ts @@ -44,7 +44,7 @@ describe('apis', () => { const json = jest.fn(); const originalFetch = window.fetch; - window.fetch = jest.fn().mockResolvedValue({ json }); + window.fetch = jest.fn().mockResolvedValue({ json, ok: true }); afterAll(() => { window.fetch = originalFetch; diff --git a/plugins/search/src/apis.ts b/plugins/search/src/apis.ts index da8332bd44..fa6d9ce908 100644 --- a/plugins/search/src/apis.ts +++ b/plugins/search/src/apis.ts @@ -14,13 +14,14 @@ * limitations under the License. */ -import { SearchQuery, SearchResultSet } from '@backstage/search-common'; -import qs from 'qs'; import { createApiRef, DiscoveryApi, IdentityApi, } from '@backstage/core-plugin-api'; +import { ResponseError } from '@backstage/errors'; +import { SearchQuery, SearchResultSet } from '@backstage/search-common'; +import qs from 'qs'; export const searchApiRef = createApiRef({ id: 'plugin.search.queryservice', @@ -52,6 +53,11 @@ export class SearchClient implements SearchApi { const response = await fetch(url, { headers: token ? { Authorization: `Bearer ${token}` } : {}, }); + + if (!response.ok) { + throw await ResponseError.fromResponse(response); + } + return response.json(); } } diff --git a/plugins/search/src/components/SearchResult/SearchResult.test.tsx b/plugins/search/src/components/SearchResult/SearchResult.test.tsx index 9508eec259..bb8f393d67 100644 --- a/plugins/search/src/components/SearchResult/SearchResult.test.tsx +++ b/plugins/search/src/components/SearchResult/SearchResult.test.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ +import { renderInTestApp } from '@backstage/test-utils'; +import { waitFor } from '@testing-library/react'; import React from 'react'; -import { render, waitFor } from '@testing-library/react'; - -import { SearchResult } from './SearchResult'; import { useSearch } from '../SearchContext'; +import { SearchResult } from './SearchResult'; jest.mock('../SearchContext', () => ({ ...jest.requireActual('../SearchContext'), @@ -33,7 +33,9 @@ describe('SearchResult', () => { result: { loading: true }, }); - const { getByRole } = render({() => <>}); + const { getByRole } = await renderInTestApp( + {() => <>}, + ); await waitFor(() => { expect(getByRole('progressbar')).toBeInTheDocument(); @@ -41,16 +43,18 @@ describe('SearchResult', () => { }); it('Alert rendered on Error state', async () => { - const error = 'error'; + const error = new Error('some error'); (useSearch as jest.Mock).mockReturnValueOnce({ result: { loading: false, error }, }); - const { getByRole } = render({() => <>}); + const { getByRole } = await renderInTestApp( + {() => <>}, + ); await waitFor(() => { expect(getByRole('alert')).toHaveTextContent( - `Error encountered while fetching search results. ${error}`, + new RegExp(`Error encountered while fetching search results.*${error}`), ); }); }); @@ -60,7 +64,9 @@ describe('SearchResult', () => { result: { loading: false, error: '', value: undefined }, }); - const { getByRole } = render({() => <>}); + const { getByRole } = await renderInTestApp( + {() => <>}, + ); await waitFor(() => { expect( @@ -74,7 +80,9 @@ describe('SearchResult', () => { result: { loading: false, error: '', value: { results: [] } }, }); - const { getByRole } = render({() => <>}); + const { getByRole } = await renderInTestApp( + {() => <>}, + ); await waitFor(() => { expect( @@ -83,12 +91,12 @@ describe('SearchResult', () => { }); }); - it('Calls children with results set to result.value', () => { + it('Calls children with results set to result.value', async () => { (useSearch as jest.Mock).mockReturnValueOnce({ result: { loading: false, error: '', value: { results: [] } }, }); - render( + await renderInTestApp( {({ results }) => { expect(results).toEqual([]); diff --git a/plugins/search/src/components/SearchResult/SearchResult.tsx b/plugins/search/src/components/SearchResult/SearchResult.tsx index 7ca5964d21..26a2484a86 100644 --- a/plugins/search/src/components/SearchResult/SearchResult.tsx +++ b/plugins/search/src/components/SearchResult/SearchResult.tsx @@ -14,13 +14,15 @@ * limitations under the License. */ -import React from 'react'; +import { + EmptyState, + Progress, + ResponseErrorPanel, +} from '@backstage/core-components'; import { SearchResult } from '@backstage/search-common'; -import { Alert } from '@material-ui/lab'; +import React from 'react'; import { useSearch } from '../SearchContext'; -import { EmptyState, Progress } from '@backstage/core-components'; - type Props = { children: (results: { results: SearchResult[] }) => JSX.Element; }; @@ -35,9 +37,10 @@ const SearchResultComponent = ({ children }: Props) => { } if (error) { return ( - - Error encountered while fetching search results. {error.toString()} - + ); } diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index 5153be2b93..d341c1803e 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-sentry +## 0.3.15 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.3.14 ### Patch Changes diff --git a/plugins/sentry/api-report.md b/plugins/sentry/api-report.md index ebb4cfa357..92ea326f87 100644 --- a/plugins/sentry/api-report.md +++ b/plugins/sentry/api-report.md @@ -12,18 +12,26 @@ import { Entity } from '@backstage/catalog-model'; import { InfoCardVariants } from '@backstage/core-components'; import { RouteRef } from '@backstage/core-plugin-api'; +// 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: () => 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: () => JSX.Element; +// 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(discoveryApi: DiscoveryApi, organization: string); @@ -31,18 +39,26 @@ export class ProductionSentryApi implements SentryApi { fetchIssues(project: string, statsFor: string): 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; +// 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) fetchIssues(project: string, statsFor: string): 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 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; @@ -77,6 +93,8 @@ 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, @@ -88,6 +106,8 @@ export const SentryIssuesWidget: ({ variant?: InfoCardVariants | undefined; }) => 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) const sentryPlugin: BackstagePlugin< { @@ -98,5 +118,12 @@ 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 + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 4d670a8a7f..cfc10baf24 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sentry", - "version": "0.3.14", + "version": "0.3.15", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -34,7 +34,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -47,9 +47,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/shortcuts/api-report.md b/plugins/shortcuts/api-report.md index 7aa54b8c3b..3d6a56244a 100644 --- a/plugins/shortcuts/api-report.md +++ b/plugins/shortcuts/api-report.md @@ -11,6 +11,8 @@ import { Observable } from '@backstage/core-plugin-api'; import ObservableImpl from 'zen-observable'; import { StorageApi } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "LocalStoredShortcuts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class LocalStoredShortcuts implements ShortcutApi { constructor(storageApi: StorageApi); @@ -26,6 +28,8 @@ export class LocalStoredShortcuts implements ShortcutApi { update(shortcut: Shortcut): Promise; } +// 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; @@ -33,6 +37,8 @@ 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; @@ -42,12 +48,18 @@ 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: () => 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 1dbbbb1a18..b3b03c4205 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -36,9 +36,9 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 390d8e4a68..0da72704da 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-sonarqube +## 0.1.22 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.1.21 ### Patch Changes diff --git a/plugins/sonarqube/api-report.md b/plugins/sonarqube/api-report.md index 92d0cfa476..642e1d956f 100644 --- a/plugins/sonarqube/api-report.md +++ b/plugins/sonarqube/api-report.md @@ -9,6 +9,8 @@ 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, @@ -24,9 +26,13 @@ export const EntitySonarQubeCard: ({ | undefined; }) => JSX.Element; +// 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, @@ -37,10 +43,16 @@ export const SonarQubeCard: ({ 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) const sonarQubePlugin: BackstagePlugin<{}, {}>; export { sonarQubePlugin as plugin }; export { sonarQubePlugin }; +// Warnings were encountered during analysis: +// +// src/components/SonarQubeCard/SonarQubeCard.d.ts:11:5 - (ae-forgotten-export) The symbol "DuplicationRating" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 3d120abf49..34e70fe1e1 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sonarqube", - "version": "0.1.21", + "version": "0.1.22", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -35,7 +35,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -48,9 +48,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index a3a60c1b9d..083d5b5749 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-splunk-on-call +## 0.3.5 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.3.4 ### Patch Changes diff --git a/plugins/splunk-on-call/api-report.md b/plugins/splunk-on-call/api-report.md index d17eb01564..02ebcc324f 100644 --- a/plugins/splunk-on-call/api-report.md +++ b/plugins/splunk-on-call/api-report.md @@ -12,33 +12,55 @@ import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; +// 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 const EntitySplunkOnCallCard: () => 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 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 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 "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, @@ -50,6 +72,8 @@ 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; @@ -60,6 +84,8 @@ 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) const splunkOnCallPlugin: BackstagePlugin< { @@ -70,8 +96,14 @@ 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 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 + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index b553c4510d..ed2ce923b0 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-splunk-on-call", - "version": "0.3.4", + "version": "0.3.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -33,7 +33,7 @@ "@backstage/catalog-model": "^0.9.0", "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -46,9 +46,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/tech-radar/api-report.md b/plugins/tech-radar/api-report.md index 4087e0d196..c93c10cb47 100644 --- a/plugins/tech-radar/api-report.md +++ b/plugins/tech-radar/api-report.md @@ -9,6 +9,8 @@ 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) "RadarEntry" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface RadarEntry { // (undocumented) @@ -27,18 +29,24 @@ 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 (undocumented) export interface RadarEntrySnapshot { // (undocumented) date: Date; // (undocumented) description?: string; + // Warning: (ae-forgotten-export) The symbol "MovedState" needs to be exported by the entry point index.d.ts + // // (undocumented) moved?: MovedState; // (undocumented) ringId: string; } +// Warning: (ae-missing-release-tag) "RadarQuadrant" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface RadarQuadrant { // (undocumented) @@ -47,6 +55,8 @@ export interface RadarQuadrant { 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 (undocumented) export interface RadarRing { // (undocumented) @@ -57,6 +67,8 @@ export interface RadarRing { name: 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 (undocumented) export const Router: { ({ title, subtitle, pageTitle, ...props }: TechRadarPageProps): JSX.Element; @@ -67,19 +79,27 @@ export const Router: { }; }; +// Warning: (ae-missing-release-tag) "TechRadarApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) 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 (undocumented) 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 (undocumented) export const 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 (undocumented) export interface TechRadarComponentProps { // (undocumented) @@ -92,6 +112,8 @@ 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 (undocumented) export interface TechRadarLoaderResponse { // (undocumented) @@ -102,6 +124,8 @@ 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 (undocumented) export const TechRadarPage: { ({ title, subtitle, pageTitle, ...props }: TechRadarPageProps): JSX.Element; @@ -112,6 +136,8 @@ export const TechRadarPage: { }; }; +// Warning: (ae-missing-release-tag) "techRadarPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const techRadarPlugin: BackstagePlugin< { @@ -122,5 +148,9 @@ const techRadarPlugin: BackstagePlugin< export { techRadarPlugin as plugin }; export { techRadarPlugin }; +// Warnings were encountered during analysis: +// +// src/components/RadarPage.d.ts:9:5 - (ae-forgotten-export) The symbol "TechRadarPageProps" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index b6e9ccacc8..05b6689100 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -44,9 +44,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index c6dc26cb63..85acec31f9 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-techdocs-backend +## 0.8.7 + +### Patch Changes + +- f1200f44c: Rewrite the `/sync/:namespace/:kind/:name` endpoint to support an event-stream as response. + This change allows the sync process to take longer than a normal HTTP timeout. + The stream also emits log events, so the caller can follow the build process in the frontend. +- 35a67722b: It is no longer required to provide a generator and a preparer to the TechDocs + router factory when running TechDocs in the "recommended" (e.g. externally + prepared and generated docs) configuration. +- ae84b20cf: Revert the upgrade to `fs-extra@10.0.0` as that seemed to have broken all installs inexplicably. +- Updated dependencies + - @backstage/backend-common@0.8.6 + - @backstage/techdocs-common@0.6.8 + ## 0.8.6 ### Patch Changes diff --git a/plugins/techdocs-backend/api-report.md b/plugins/techdocs-backend/api-report.md index 5777a3fd56..3d1738cb12 100644 --- a/plugins/techdocs-backend/api-report.md +++ b/plugins/techdocs-backend/api-report.md @@ -12,6 +12,9 @@ import { PluginEndpointDiscovery } from '@backstage/backend-common'; import { PreparerBuilder } from '@backstage/techdocs-common'; import { PublisherBase } from '@backstage/techdocs-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; diff --git a/plugins/techdocs-backend/config.d.ts b/plugins/techdocs-backend/config.d.ts index b19e7af175..7f2fdf8b26 100644 --- a/plugins/techdocs-backend/config.d.ts +++ b/plugins/techdocs-backend/config.d.ts @@ -29,7 +29,31 @@ export interface Config { /** * Techdocs generator information */ + generator?: { + /** + * Where to run the techdocs (mkdocs) generator + */ + runIn: 'local' | 'docker'; + + /** + * Override the default techdocs docker image + */ + dockerImage?: string; + + /** + * Pull the latest docker image + */ + pullImage?: boolean; + }; + + /** + * Techdocs generator information + * @deprecated Replaced with techdocs.generator + */ generators?: { + /** + * @deprecated Use techdocs.generator.runIn + */ techdocs: 'local' | 'docker'; }; diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 714f3ad442..76aadc79cf 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-backend", - "version": "0.8.6", + "version": "0.8.7", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,11 +30,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.8.5", + "@backstage/backend-common": "^0.8.6", + "@backstage/catalog-client": "^0.3.16", "@backstage/catalog-model": "^0.9.0", "@backstage/config": "^0.1.5", "@backstage/errors": "^0.1.1", - "@backstage/techdocs-common": "^0.6.7", + "@backstage/techdocs-common": "^0.6.8", "@types/express": "^4.17.6", "cross-fetch": "^3.0.6", "dockerode": "^3.2.1", @@ -45,8 +46,9 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@types/dockerode": "^3.2.1", + "msw": "^0.29.0", "supertest": "^6.1.3" }, "files": [ diff --git a/plugins/techdocs-backend/src/DocsBuilder/builder.ts b/plugins/techdocs-backend/src/DocsBuilder/builder.ts index e9df0b8400..2cd6f57154 100644 --- a/plugins/techdocs-backend/src/DocsBuilder/builder.ts +++ b/plugins/techdocs-backend/src/DocsBuilder/builder.ts @@ -18,6 +18,7 @@ import { ENTITY_DEFAULT_NAMESPACE, stringifyEntityRef, } from '@backstage/catalog-model'; +import { Config } from '@backstage/config'; import { NotModifiedError } from '@backstage/errors'; import { GeneratorBase, @@ -31,8 +32,8 @@ import { import fs from 'fs-extra'; import os from 'os'; import path from 'path'; +import { Writable } from 'stream'; import { Logger } from 'winston'; -import { Config } from '@backstage/config'; import { BuildMetadataStorage } from './BuildMetadataStorage'; type DocsBuilderArguments = { @@ -42,6 +43,7 @@ type DocsBuilderArguments = { entity: Entity; logger: Logger; config: Config; + logStream?: Writable; }; export class DocsBuilder { @@ -51,6 +53,7 @@ export class DocsBuilder { private entity: Entity; private logger: Logger; private config: Config; + private logStream: Writable | undefined; constructor({ preparers, @@ -59,6 +62,7 @@ export class DocsBuilder { entity, logger, config, + logStream, }: DocsBuilderArguments) { this.preparer = preparers.get(entity); this.generator = generators.get(entity); @@ -66,6 +70,7 @@ export class DocsBuilder { this.entity = entity; this.logger = logger; this.config = config; + this.logStream = logStream; } /** @@ -115,6 +120,7 @@ export class DocsBuilder { try { const preparerResponse = await this.preparer.prepare(this.entity, { etag: storedEtag, + logger: this.logger, }); preparedDir = preparerResponse.preparedDir; @@ -159,12 +165,15 @@ export class DocsBuilder { const outputDir = await fs.mkdtemp( path.join(tmpdirResolvedPath, 'techdocs-tmp-'), ); + const parsedLocationAnnotation = getLocationForEntity(this.entity); await this.generator.run({ inputDir: preparedDir, outputDir, parsedLocationAnnotation, etag: newEtag, + logger: this.logger, + logStream: this.logStream, }); // Remove Prepared directory since it is no longer needed. diff --git a/plugins/techdocs-backend/src/index.ts b/plugins/techdocs-backend/src/index.ts index afbf04aba9..6d1e551629 100644 --- a/plugins/techdocs-backend/src/index.ts +++ b/plugins/techdocs-backend/src/index.ts @@ -14,5 +14,5 @@ * limitations under the License. */ -export * from './service/router'; +export { createRouter } from './service/router'; export * from '@backstage/techdocs-common'; diff --git a/plugins/techdocs-backend/src/service/DocsSynchronizer.test.ts b/plugins/techdocs-backend/src/service/DocsSynchronizer.test.ts new file mode 100644 index 0000000000..409dc6e128 --- /dev/null +++ b/plugins/techdocs-backend/src/service/DocsSynchronizer.test.ts @@ -0,0 +1,194 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + getVoidLogger, + PluginEndpointDiscovery, +} from '@backstage/backend-common'; +import { ConfigReader } from '@backstage/config'; +import { + GeneratorBuilder, + PreparerBuilder, + PublisherBase, +} from '@backstage/techdocs-common'; +import { DocsBuilder, shouldCheckForUpdate } from '../DocsBuilder'; +import { DocsSynchronizer, DocsSynchronizerSyncOpts } from './DocsSynchronizer'; + +jest.mock('../DocsBuilder'); + +const MockedDocsBuilder = DocsBuilder as jest.MockedClass; + +describe('DocsSynchronizer', () => { + const preparers: jest.Mocked = { + register: jest.fn(), + get: jest.fn(), + }; + const generators: jest.Mocked = { + register: jest.fn(), + get: jest.fn(), + }; + const publisher: jest.Mocked = { + docsRouter: jest.fn(), + fetchTechDocsMetadata: jest.fn(), + getReadiness: jest.fn(), + hasDocsBeenGenerated: jest.fn(), + publish: jest.fn(), + }; + const discovery: jest.Mocked = { + getBaseUrl: jest.fn(), + getExternalBaseUrl: jest.fn(), + }; + + let docsSynchronizer: DocsSynchronizer; + const mockResponseHandler: jest.Mocked = { + log: jest.fn(), + finish: jest.fn(), + error: jest.fn(), + }; + + beforeEach(async () => { + publisher.docsRouter.mockReturnValue(() => {}); + discovery.getBaseUrl.mockImplementation(async type => { + return `http://backstage.local/api/${type}`; + }); + + docsSynchronizer = new DocsSynchronizer({ + publisher, + config: new ConfigReader({}), + logger: getVoidLogger(), + }); + }); + + afterEach(() => { + jest.resetAllMocks(); + }); + + describe('doSync', () => { + it('should execute an update', async () => { + (shouldCheckForUpdate as jest.Mock).mockReturnValue(true); + + const entity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + uid: '0', + name: 'test', + namespace: 'default', + }, + }; + + MockedDocsBuilder.prototype.build.mockImplementation(async () => { + // extract the logStream from the constructor call + const logStream = MockedDocsBuilder.mock.calls[0][0].logStream; + + logStream?.write('Some log'); + logStream?.write('Another log'); + + const logger = MockedDocsBuilder.mock.calls[0][0].logger; + + logger.info('Some more log'); + + return true; + }); + + publisher.hasDocsBeenGenerated.mockResolvedValue(true); + + await docsSynchronizer.doSync({ + responseHandler: mockResponseHandler, + entity, + preparers, + generators, + }); + + expect(mockResponseHandler.log).toBeCalledTimes(3); + expect(mockResponseHandler.log).toBeCalledWith('Some log'); + expect(mockResponseHandler.log).toBeCalledWith('Another log'); + expect(mockResponseHandler.log).toBeCalledWith( + expect.stringMatching(/info.*Some more log/), + ); + + expect(mockResponseHandler.finish).toBeCalledWith({ updated: true }); + + expect(mockResponseHandler.error).toBeCalledTimes(0); + + expect(shouldCheckForUpdate).toBeCalledTimes(1); + expect(DocsBuilder.prototype.build).toBeCalledTimes(1); + }); + + it('should not check for an update too often', async () => { + (shouldCheckForUpdate as jest.Mock).mockReturnValue(false); + + const entity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + uid: '0', + name: 'test', + namespace: 'default', + }, + }; + + await docsSynchronizer.doSync({ + responseHandler: mockResponseHandler, + entity, + preparers, + generators, + }); + + expect(mockResponseHandler.finish).toBeCalledWith({ updated: false }); + + expect(mockResponseHandler.log).toBeCalledTimes(0); + expect(mockResponseHandler.error).toBeCalledTimes(0); + + expect(shouldCheckForUpdate).toBeCalledTimes(1); + expect(DocsBuilder.prototype.build).toBeCalledTimes(0); + }); + + it('should forward build errors', async () => { + (shouldCheckForUpdate as jest.Mock).mockReturnValue(true); + + const entity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + uid: '0', + name: 'test', + namespace: 'default', + }, + }; + + const error = new Error('Some random error'); + MockedDocsBuilder.prototype.build.mockRejectedValue(error); + + await docsSynchronizer.doSync({ + responseHandler: mockResponseHandler, + entity, + preparers, + generators, + }); + + expect(mockResponseHandler.log).toBeCalledTimes(1); + expect(mockResponseHandler.log).toBeCalledWith( + expect.stringMatching( + /error.*: Failed to build the docs page: Some random error/, + ), + ); + expect(mockResponseHandler.finish).toBeCalledTimes(0); + expect(mockResponseHandler.error).toBeCalledTimes(1); + expect(mockResponseHandler.error).toBeCalledWith(error); + }); + }); +}); diff --git a/plugins/techdocs-backend/src/service/DocsSynchronizer.ts b/plugins/techdocs-backend/src/service/DocsSynchronizer.ts new file mode 100644 index 0000000000..9b51381748 --- /dev/null +++ b/plugins/techdocs-backend/src/service/DocsSynchronizer.ts @@ -0,0 +1,141 @@ +/* + * 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 { Entity } from '@backstage/catalog-model'; +import { Config } from '@backstage/config'; +import { NotFoundError } from '@backstage/errors'; +import { + GeneratorBuilder, + PreparerBuilder, + PublisherBase, +} from '@backstage/techdocs-common'; +import { PassThrough } from 'stream'; +import * as winston from 'winston'; +import { DocsBuilder, shouldCheckForUpdate } from '../DocsBuilder'; + +export type DocsSynchronizerSyncOpts = { + log: (message: string) => void; + error: (e: Error) => void; + finish: (result: { updated: boolean }) => void; +}; + +export class DocsSynchronizer { + private readonly publisher: PublisherBase; + private readonly logger: winston.Logger; + private readonly config: Config; + + constructor({ + publisher, + logger, + config, + }: { + publisher: PublisherBase; + logger: winston.Logger; + config: Config; + }) { + this.config = config; + this.logger = logger; + this.publisher = publisher; + } + + async doSync({ + responseHandler: { log, error, finish }, + entity, + preparers, + generators, + }: { + responseHandler: DocsSynchronizerSyncOpts; + entity: Entity; + preparers: PreparerBuilder; + generators: GeneratorBuilder; + }) { + // create a new logger to log data to the caller + const taskLogger = winston.createLogger({ + level: process.env.LOG_LEVEL || 'info', + format: winston.format.combine( + winston.format.colorize(), + winston.format.timestamp(), + winston.format.simple(), + ), + defaultMeta: {}, + }); + + // create an in-memory stream to forward logs to the event-stream + const logStream = new PassThrough(); + logStream.on('data', async data => { + log(data.toString().trim()); + }); + + taskLogger.add(new winston.transports.Stream({ stream: logStream })); + + // check if the last update check was too recent + if (!shouldCheckForUpdate(entity.metadata.uid!)) { + finish({ updated: false }); + return; + } + + const docsBuilder = new DocsBuilder({ + preparers, + generators, + publisher: this.publisher, + logger: taskLogger, + entity, + config: this.config, + logStream, + }); + + let foundDocs = false; + + try { + const updated = await docsBuilder.build(); + + if (!updated) { + finish({ updated: false }); + return; + } + } catch (e) { + const msg = `Failed to build the docs page: ${e.message}`; + taskLogger.error(msg); + this.logger.error(msg, e); + error(e); + return; + } + + // With a maximum of ~5 seconds wait, check if the files got published and if docs will be fetched + // on the user's page. If not, respond with a message asking them to check back later. + // The delay here is to make sure GCS/AWS/etc. registers newly uploaded files which is usually <1 second + for (let attempt = 0; attempt < 5; attempt++) { + if (await this.publisher.hasDocsBeenGenerated(entity)) { + foundDocs = true; + break; + } + await new Promise(r => setTimeout(r, 1000)); + } + if (!foundDocs) { + this.logger.error( + 'Published files are taking longer to show up in storage. Something went wrong.', + ); + error( + new NotFoundError( + 'Sorry! It took too long for the generated docs to show up in storage. Check back later.', + ), + ); + return; + } + + finish({ updated: true }); + } +} diff --git a/plugins/techdocs-backend/src/service/router.test.ts b/plugins/techdocs-backend/src/service/router.test.ts new file mode 100644 index 0000000000..84ab0c6d88 --- /dev/null +++ b/plugins/techdocs-backend/src/service/router.test.ts @@ -0,0 +1,469 @@ +/* + * 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 { + errorHandler, + getVoidLogger, + PluginEndpointDiscovery, +} from '@backstage/backend-common'; +import { CatalogClient } from '@backstage/catalog-client'; +import { ConfigReader } from '@backstage/config'; +import { NotModifiedError } from '@backstage/errors'; +import { + GeneratorBuilder, + PreparerBuilder, + PublisherBase, +} from '@backstage/techdocs-common'; +import express, { Response } from 'express'; +import request from 'supertest'; +import { DocsSynchronizer, DocsSynchronizerSyncOpts } from './DocsSynchronizer'; +import { createEventStream, createHttpResponse, createRouter } from './router'; + +jest.mock('@backstage/catalog-client'); +jest.mock('@backstage/config'); +jest.mock('./DocsSynchronizer'); + +const MockedConfigReader = ConfigReader as jest.MockedClass< + typeof ConfigReader +>; +const MockCatalogClient = CatalogClient as jest.MockedClass< + typeof CatalogClient +>; +const MockDocsSynchronizer = DocsSynchronizer as jest.MockedClass< + typeof DocsSynchronizer +>; + +describe('createRouter', () => { + const entity = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + uid: '0', + name: 'test', + }, + }; + const entityWithoutMetadata = { + ...entity, + metadata: { + ...entity.metadata, + uid: undefined, + }, + }; + + const preparers: jest.Mocked = { + register: jest.fn(), + get: jest.fn(), + }; + const generators: jest.Mocked = { + register: jest.fn(), + get: jest.fn(), + }; + const publisher: jest.Mocked = { + docsRouter: jest.fn(), + fetchTechDocsMetadata: jest.fn(), + getReadiness: jest.fn(), + hasDocsBeenGenerated: jest.fn(), + publish: jest.fn(), + }; + const discovery: jest.Mocked = { + getBaseUrl: jest.fn(), + getExternalBaseUrl: jest.fn(), + }; + + let app: express.Express; + + beforeEach(() => { + jest.resetAllMocks(); + }); + + beforeEach(async () => { + publisher.docsRouter.mockReturnValue(() => {}); + discovery.getBaseUrl.mockImplementation(async type => { + return `http://backstage.local/api/${type}`; + }); + + const outOfTheBoxRouter = await createRouter({ + preparers, + generators, + publisher, + config: new ConfigReader({}), + logger: getVoidLogger(), + discovery, + }); + const recommendedRouter = await createRouter({ + publisher, + config: new ConfigReader({}), + logger: getVoidLogger(), + discovery, + }); + + app = express(); + app.use(outOfTheBoxRouter); + app.use('/recommended', recommendedRouter); + app.use(errorHandler()); + }); + + describe('GET /sync/:namespace/:kind/:name', () => { + describe('accept application/json', () => { + it('should return not found if entity is not found', async () => { + MockCatalogClient.prototype.getEntityByName.mockResolvedValue( + undefined, + ); + + const response = await request(app) + .get('/sync/default/Component/test') + .send(); + + expect(response.status).toBe(404); + }); + + it('should return not found if entity has no uid', async () => { + MockCatalogClient.prototype.getEntityByName.mockResolvedValue( + entityWithoutMetadata, + ); + + const response = await request(app) + .get('/sync/default/Component/test') + .send(); + + expect(response.status).toBe(404); + }); + + it('should not check for an update without local builder', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('external'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + + const response = await request(app) + .get('/sync/default/Component/test') + .send(); + + expect(response.status).toBe(304); + }); + + it('should error if missing builder', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('local'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + + const response = await request(app) + .get('/recommended/sync/default/Component/test') + .send(); + + expect(response.status).toBe(500); + expect(response.text).toMatch( + /Invalid configuration\. 'techdocs\.builder' was set to 'local' but no 'preparer' was provided to the router initialization/, + ); + + expect(MockDocsSynchronizer.prototype.doSync).toBeCalledTimes(0); + }); + + it('should execute synchronization', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('local'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + MockDocsSynchronizer.prototype.doSync.mockImplementation( + async ({ responseHandler }) => + responseHandler.finish({ updated: true }), + ); + + await request(app).get('/sync/default/Component/test').send(); + + expect(MockDocsSynchronizer.prototype.doSync).toBeCalledTimes(1); + expect(MockDocsSynchronizer.prototype.doSync).toBeCalledWith({ + responseHandler: { + log: expect.any(Function), + error: expect.any(Function), + finish: expect.any(Function), + }, + entity, + generators, + preparers, + }); + }); + + it('should return on updated', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('local'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + MockDocsSynchronizer.prototype.doSync.mockImplementation( + async ({ responseHandler }) => { + const { log, finish } = responseHandler; + + log('Some log'); + + finish({ updated: true }); + }, + ); + + const response = await request(app) + .get('/sync/default/Component/test') + .send(); + + expect(response.status).toBe(201); + expect(response.get('content-type')).toMatch(/application\/json/); + expect(response.text).toEqual( + '{"message":"Docs updated or did not need updating"}', + ); + }); + }); + + describe('accept text/event-stream', () => { + it('should return not found if entity is not found', async () => { + MockCatalogClient.prototype.getEntityByName.mockResolvedValue( + undefined, + ); + + const response = await request(app) + .get('/sync/default/Component/test') + .set('accept', 'text/event-stream') + .send(); + + expect(response.status).toBe(404); + }); + + it('should return not found if entity has no uid', async () => { + MockCatalogClient.prototype.getEntityByName.mockResolvedValue( + entityWithoutMetadata, + ); + + const response = await request(app) + .get('/sync/default/Component/test') + .set('accept', 'text/event-stream') + .send(); + + expect(response.status).toBe(404); + }); + + it('should not check for an update without local builder', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('external'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + + const response = await request(app) + .get('/sync/default/Component/test') + .set('accept', 'text/event-stream') + .send(); + + expect(response.status).toBe(200); + expect(response.get('content-type')).toBe('text/event-stream'); + expect(response.text).toEqual( + `event: finish +data: {"updated":false} + +`, + ); + }); + + it('should error if missing builder', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('local'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + + const response = await request(app) + .get('/recommended/sync/default/Component/test') + .set('accept', 'text/event-stream') + .send(); + + expect(response.status).toBe(200); + expect(response.get('content-type')).toBe('text/event-stream'); + expect(response.text).toEqual( + `event: error +data: "Invalid configuration. 'techdocs.builder' was set to 'local' but no 'preparer' was provided to the router initialization." + +`, + ); + + expect(MockDocsSynchronizer.prototype.doSync).toBeCalledTimes(0); + }); + + it('should execute synchronization', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('local'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + MockDocsSynchronizer.prototype.doSync.mockImplementation( + async ({ responseHandler }) => + responseHandler.finish({ updated: true }), + ); + + await request(app) + .get('/sync/default/Component/test') + .set('accept', 'text/event-stream') + .send(); + + expect(MockDocsSynchronizer.prototype.doSync).toBeCalledTimes(1); + expect(MockDocsSynchronizer.prototype.doSync).toBeCalledWith({ + responseHandler: { + log: expect.any(Function), + error: expect.any(Function), + finish: expect.any(Function), + }, + entity, + generators, + preparers, + }); + }); + + it('should return an event-stream', async () => { + MockedConfigReader.prototype.getString.mockReturnValue('local'); + MockCatalogClient.prototype.getEntityByName.mockResolvedValue(entity); + MockDocsSynchronizer.prototype.doSync.mockImplementation( + async ({ responseHandler }) => { + const { log, finish } = responseHandler; + + log('Some log'); + log('Another log'); + + finish({ updated: true }); + }, + ); + + const response = await request(app) + .get('/sync/default/Component/test') + .set('accept', 'text/event-stream') + .send(); + + expect(response.status).toBe(200); + expect(response.get('content-type')).toBe('text/event-stream'); + expect(response.text).toEqual( + `event: log +data: "Some log" + +event: log +data: "Another log" + +event: finish +data: {"updated":true} + +`, + ); + }); + }); + }); +}); + +describe('createEventStream', () => { + const res: jest.Mocked = { + writeHead: jest.fn(), + write: jest.fn(), + end: jest.fn(), + } as any; + + let handlers: DocsSynchronizerSyncOpts; + + beforeEach(() => { + handlers = createEventStream(res); + }); + afterEach(() => { + jest.resetAllMocks(); + }); + + it('should return correct event stream', async () => { + // called in beforeEach + + expect(res.writeHead).toBeCalledTimes(1); + expect(res.writeHead).toBeCalledWith(200, { + 'Cache-Control': 'no-cache', + Connection: 'keep-alive', + 'Content-Type': 'text/event-stream', + }); + }); + + it('should flush after write if defined', async () => { + res.flush = jest.fn(); + + handlers.log('A Message'); + + expect(res.write).toBeCalledTimes(1); + expect(res.write).toBeCalledWith(`event: log +data: "A Message" + +`); + expect(res.flush).toBeCalledTimes(1); + }); + + it('should write log', async () => { + handlers.log('A Message'); + + expect(res.write).toBeCalledTimes(1); + expect(res.write).toBeCalledWith(`event: log +data: "A Message" + +`); + expect(res.end).toBeCalledTimes(0); + }); + + it('should write error and end the connection', async () => { + handlers.error(new Error('Some Error')); + + expect(res.write).toBeCalledTimes(1); + expect(res.write).toBeCalledWith(`event: error +data: "Some Error" + +`); + expect(res.end).toBeCalledTimes(1); + }); + + it('should finish and end the connection', async () => { + handlers.finish({ updated: true }); + + expect(res.write).toBeCalledTimes(1); + expect(res.write).toBeCalledWith(`event: finish +data: {"updated":true} + +`); + + expect(res.end).toBeCalledTimes(1); + }); +}); + +describe('createHttpResponse', () => { + const res: jest.Mocked = { + status: jest.fn(), + json: jest.fn(), + } as any; + + let handlers: DocsSynchronizerSyncOpts; + + beforeEach(() => { + res.status.mockImplementation(() => res); + handlers = createHttpResponse(res); + }); + afterEach(() => { + jest.resetAllMocks(); + }); + + it('should return CREATED if updated', async () => { + handlers.finish({ updated: true }); + + expect(res.status).toBeCalledTimes(1); + expect(res.status).toBeCalledWith(201); + + expect(res.json).toBeCalledTimes(1); + expect(res.json).toBeCalledWith({ + message: 'Docs updated or did not need updating', + }); + }); + + it('should return NOT_MODIFIED if not updated', async () => { + expect(() => handlers.finish({ updated: false })).toThrowError( + NotModifiedError, + ); + }); + + it('should throw custom error', async () => { + expect(() => handlers.error(new Error('Some Error'))).toThrowError( + /Some Error/, + ); + }); + + it('should ignore logs', async () => { + expect(() => handlers.log('Some Message')).not.toThrow(); + }); +}); diff --git a/plugins/techdocs-backend/src/service/router.ts b/plugins/techdocs-backend/src/service/router.ts index 7563dfa2f9..b889312abd 100644 --- a/plugins/techdocs-backend/src/service/router.ts +++ b/plugins/techdocs-backend/src/service/router.ts @@ -14,6 +14,7 @@ * limitations under the License. */ import { PluginEndpointDiscovery } from '@backstage/backend-common'; +import { CatalogClient } from '@backstage/catalog-client'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; import { NotFoundError, NotModifiedError } from '@backstage/errors'; @@ -24,12 +25,11 @@ import { PublisherBase, } from '@backstage/techdocs-common'; import fetch from 'cross-fetch'; -import express from 'express'; +import express, { Response } from 'express'; import Router from 'express-promise-router'; import { Knex } from 'knex'; import { Logger } from 'winston'; -import { DocsBuilder } from '../DocsBuilder'; -import { shouldCheckForUpdate } from '../DocsBuilder/BuildMetadataStorage'; +import { DocsSynchronizer, DocsSynchronizerSyncOpts } from './DocsSynchronizer'; /** * All of the required dependencies for running TechDocs in the "out-of-the-box" @@ -78,6 +78,12 @@ export async function createRouter( ): Promise { const router = Router(); const { publisher, config, logger, discovery } = options; + const catalogClient = new CatalogClient({ discoveryApi: discovery }); + const docsSynchronizer = new DocsSynchronizer({ + publisher: publisher, + logger: logger, + config: config, + }); router.get('/metadata/techdocs/:namespace/:kind/:name', async (req, res) => { const { kind, namespace, name } = req.params; @@ -136,114 +142,58 @@ export async function createRouter( }); // Check if docs are the latest version and trigger rebuilds if not - // Responds with immediate success if rebuild not needed + // Responds with an event-stream that closes after the build finished + // Responds with an immediate success if rebuild not needed // If a build is required, responds with a success when finished router.get('/sync/:namespace/:kind/:name', async (req, res) => { const { kind, namespace, name } = req.params; - const catalogUrl = await discovery.getBaseUrl('catalog'); - const triple = [kind, namespace, name].map(encodeURIComponent).join('/'); - const token = getBearerToken(req.headers.authorization); - const catalogRes = await fetch(`${catalogUrl}/entities/by-name/${triple}`, { - headers: token ? { Authorization: `Bearer ${token}` } : {}, - }); - if (!catalogRes.ok) { - const catalogResText = await catalogRes.text(); - res.status(catalogRes.status); - res.send(catalogResText); - return; - } - const entity: Entity = await catalogRes.json(); + const entity = await catalogClient.getEntityByName( + { kind, namespace, name }, + { token }, + ); - if (!entity.metadata.uid) { + if (!entity?.metadata?.uid) { throw new NotFoundError('Entity metadata UID missing'); } - if (!shouldCheckForUpdate(entity.metadata.uid)) { - res.status(200).json({ - message: `Last check for documentation update is recent, did not retry.`, - }); - return; + + let responseHandler: DocsSynchronizerSyncOpts; + if (req.header('accept') !== 'text/event-stream') { + console.warn( + "The call to /sync/:namespace/:kind/:name wasn't done by an EventSource. This behavior is deprecated and will be removed soon. Make sure to update the @backstage/plugin-techdocs package in the frontend to the latest version.", + ); + responseHandler = createHttpResponse(res); + } else { + responseHandler = createEventStream(res); } - let publisherType = ''; - try { - publisherType = config.getString('techdocs.publisher.type'); - } catch (err) { - throw new Error( - 'Unable to get techdocs.publisher.type in your app config. Set it to either ' + - "'local', 'googleGcs' or other support storage providers. Read more here " + - 'https://backstage.io/docs/features/techdocs/architecture', - ); - } // techdocs-backend will only try to build documentation for an entity if techdocs.builder is set to 'local' // If set to 'external', it will assume that an external process (e.g. CI/CD pipeline // of the repository) is responsible for building and publishing documentation to the storage provider if (config.getString('techdocs.builder') !== 'local') { - res.status(200).json({ - message: - '`techdocs.builder` app config is not set to `local`, so docs will not be generated locally and sync is not required.', + responseHandler.finish({ updated: false }); + return; + } + + // Set the synchronization and build process if "out-of-the-box" configuration is provided. + if (isOutOfTheBoxOption(options)) { + const { preparers, generators } = options; + + await docsSynchronizer.doSync({ + responseHandler, + entity, + preparers, + generators, }); return; } - // Set up a DocsBuilder if "out-of-the-box" configuration is provided. - if (isOutOfTheBoxOption(options)) { - const { preparers, generators } = options; - const docsBuilder = new DocsBuilder({ - preparers, - generators, - publisher, - logger, - entity, - config, - }); - let foundDocs = false; - switch (publisherType) { - case 'local': - case 'awsS3': - case 'azureBlobStorage': - case 'openStackSwift': - case 'googleGcs': { - // This block should be valid for all storage implementations. So no need to duplicate in future, - // add the publisher type in the list here. - const updated = await docsBuilder.build(); - - if (!updated) { - throw new NotModifiedError(); - } - - // With a maximum of ~5 seconds wait, check if the files got published and if docs will be fetched - // on the user's page. If not, respond with a message asking them to check back later. - // The delay here is to make sure GCS/AWS/etc. registers newly uploaded files which is usually <1 second - for (let attempt = 0; attempt < 5; attempt++) { - if (await publisher.hasDocsBeenGenerated(entity)) { - foundDocs = true; - break; - } - await new Promise(r => setTimeout(r, 1000)); - } - if (!foundDocs) { - logger.error( - 'Published files are taking longer to show up in storage. Something went wrong.', - ); - throw new NotFoundError( - 'Sorry! It took too long for the generated docs to show up in storage. Check back later.', - ); - } - - res - .status(201) - .json({ message: 'Docs updated or did not need updating' }); - break; - } - - default: - throw new NotFoundError( - `Publisher type ${publisherType} is not supported by techdocs-backend docs builder.`, - ); - } - } + responseHandler.error( + new Error( + "Invalid configuration. 'techdocs.builder' was set to 'local' but no 'preparer' was provided to the router initialization.", + ), + ); }); // Route middleware which serves files from the storage set in the publisher. @@ -255,3 +205,79 @@ export async function createRouter( function getBearerToken(header?: string): string | undefined { return header?.match(/(?:Bearer)\s+(\S+)/i)?.[1]; } + +/** + * Create an event-stream response that emits the events 'log', 'error', and 'finish'. + * + * @param res the response to write the event-stream to + * @returns A tuple of callbacks to emit messages. A call to 'error' or 'finish' + * will close the event-stream. + */ +export function createEventStream( + res: Response, +): DocsSynchronizerSyncOpts { + // Mandatory headers and http status to keep connection open + res.writeHead(200, { + Connection: 'keep-alive', + 'Cache-Control': 'no-cache', + 'Content-Type': 'text/event-stream', + }); + + // client closes connection + res.socket?.on('close', () => { + res.end(); + }); + + // write the event to the stream + const send = (type: 'error' | 'finish' | 'log', data: any) => { + res.write(`event: ${type}\ndata: ${JSON.stringify(data)}\n\n`); + + // res.flush() is only available with the compression middleware + if (res.flush) { + res.flush(); + } + }; + + return { + log: data => { + send('log', data); + }, + + error: e => { + send('error', e.message); + res.end(); + }, + + finish: result => { + send('finish', result); + res.end(); + }, + }; +} + +/** + * Create a HTTP response. This is used for the legacy non-event-stream implementation of the sync endpoint. + * + * @param res the response to write the event-stream to + * @returns A tuple of callbacks to emit messages. A call to 'error' or 'finish' + * will close the event-stream. + */ +export function createHttpResponse( + res: Response, +): DocsSynchronizerSyncOpts { + return { + log: () => {}, + error: e => { + throw e; + }, + finish: ({ updated }) => { + if (!updated) { + throw new NotModifiedError(); + } + + res + .status(201) + .json({ message: 'Docs updated or did not need updating' }); + }, + }; +} diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index d0419ffd58..c89f9dc01c 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/plugin-techdocs +## 0.10.0 + +### Minor Changes + +- 94a54dd47: Added a `migrateDocsCase()` method to TechDocs publishers, along with + implementations for AWS, Azure, and GCS. + + This change is in support of a future update to TechDocs that will allow for + case-insensitive entity triplet URL access to documentation pages which will + require a migration of existing documentation objects in external storage + solutions. + + See [#4367](https://github.com/backstage/backstage/issues/4367) for details. + +### Patch Changes + +- 537c37b0f: Fix displaying owned documents list by fetching associated entity relations +- 136a91974: Show a "Refresh" button to if the content is stale. + This removes the need to do a full page-reload to display more recent TechDocs content. +- f1200f44c: Rewrite the `/sync/:namespace/:kind/:name` endpoint to support an event-stream as response. + This change allows the sync process to take longer than a normal HTTP timeout. + The stream also emits log events, so the caller can follow the build process in the frontend. +- 3af126cdd: Provide a Drawer component to follow a running build. + This can be used to debug the rendering and get build logs in case an error occurs. +- 2a4a3b32d: Techdocs: fix sidebars not adjusting position automatically +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.9.9 ### Patch Changes diff --git a/plugins/techdocs/api-report.md b/plugins/techdocs/api-report.md index 943831d91c..d63303c134 100644 --- a/plugins/techdocs/api-report.md +++ b/plugins/techdocs/api-report.md @@ -16,6 +16,8 @@ import { IdentityApi } from '@backstage/core-plugin-api'; import { Location as Location_2 } from '@backstage/catalog-model'; import { RouteRef } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "DocsCardGrid" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DocsCardGrid: ({ entities, @@ -23,6 +25,8 @@ export const DocsCardGrid: ({ entities: Entity[] | undefined; }) => JSX.Element | null; +// Warning: (ae-missing-release-tag) "DocsTable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DocsTable: ({ entities, @@ -32,39 +36,66 @@ export const DocsTable: ({ title?: string | undefined; }) => JSX.Element | null; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "EmbeddedDocsRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EmbeddedDocsRouter: (_props: Props) => JSX.Element; +// Warning: (ae-missing-release-tag) "EntityTechdocsContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityTechdocsContent: (_props: { entity?: Entity | undefined; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "PanelType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type PanelType = 'DocsCardGrid' | 'DocsTable'; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "Reader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const Reader: ({ entityId, onReady }: Props_2) => 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) "SyncResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) -export type SyncResult = 'cached' | 'updated' | 'timeout'; +export type SyncResult = 'cached' | 'updated'; +// Warning: (ae-missing-release-tag) "TechDocsApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TechDocsApi { // (undocumented) getApiOrigin(): Promise; + // Warning: (ae-forgotten-export) The symbol "TechDocsEntityMetadata" needs to be exported by the entry point index.d.ts + // // (undocumented) getEntityMetadata(entityId: EntityName): Promise; + // Warning: (ae-forgotten-export) The symbol "TechDocsMetadata" needs to be exported by the entry point index.d.ts + // // (undocumented) getTechDocsMetadata(entityId: EntityName): Promise; } +// Warning: (ae-missing-release-tag) "techdocsApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const techdocsApiRef: ApiRef; +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-undefined-tag) The TSDoc tag "@property" is not defined in this configuration +// Warning: (ae-missing-release-tag) "TechDocsClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class TechDocsClient implements TechDocsApi { constructor({ @@ -82,12 +113,18 @@ export class TechDocsClient implements TechDocsApi { discoveryApi: DiscoveryApi; // (undocumented) getApiOrigin(): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' getEntityMetadata(entityId: EntityName): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' getTechDocsMetadata(entityId: EntityName): Promise; // (undocumented) identityApi: IdentityApi; } +// Warning: (ae-missing-release-tag) "TechDocsCustomHome" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const TechDocsCustomHome: ({ tabsConfig, @@ -95,9 +132,13 @@ export const TechDocsCustomHome: ({ tabsConfig: TabsConfig; }) => JSX.Element; +// Warning: (ae-missing-release-tag) "TechdocsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const TechdocsPage: () => JSX.Element; +// Warning: (ae-missing-release-tag) "techdocsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const techdocsPlugin: BackstagePlugin< { @@ -109,9 +150,13 @@ const techdocsPlugin: BackstagePlugin< export { techdocsPlugin as plugin }; export { techdocsPlugin }; +// Warning: (ae-missing-release-tag) "TechDocsReaderPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const TechDocsReaderPage: () => JSX.Element; +// Warning: (ae-missing-release-tag) "TechDocsStorageApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TechDocsStorageApi { // (undocumented) @@ -129,12 +174,22 @@ export interface TechDocsStorageApi { // (undocumented) getStorageUrl(): Promise; // (undocumented) - syncEntityDocs(entityId: EntityName): Promise; + syncEntityDocs( + entityId: EntityName, + logHandler?: (line: string) => void, + ): Promise; } +// Warning: (ae-missing-release-tag) "techdocsStorageApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const techdocsStorageApiRef: ApiRef; +// Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// Warning: (tsdoc-undefined-tag) The TSDoc tag "@property" is not defined in this configuration +// Warning: (ae-missing-release-tag) "TechDocsStorageClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public export class TechDocsStorageClient implements TechDocsStorageApi { constructor({ @@ -160,13 +215,36 @@ export class TechDocsStorageClient implements TechDocsStorageApi { ): Promise; // (undocumented) getBuilder(): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" getEntityDocs(entityId: EntityName, path: string): Promise; // (undocumented) getStorageUrl(): Promise; // (undocumented) identityApi: IdentityApi; - syncEntityDocs(entityId: EntityName): Promise; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + // Warning: (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + // Warning: (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag + // Warning: (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" + syncEntityDocs( + entityId: EntityName, + logHandler?: (line: string) => void, + ): Promise; } +// Warnings were encountered during analysis: +// +// src/plugin.d.ts:18:5 - (ae-forgotten-export) The symbol "TabsConfig" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/techdocs/dev/index.tsx b/plugins/techdocs/dev/index.tsx index cdc81caa5a..659a4e2caf 100644 --- a/plugins/techdocs/dev/index.tsx +++ b/plugins/techdocs/dev/index.tsx @@ -17,6 +17,7 @@ import { createDevApp } from '@backstage/dev-utils'; import { NotFoundError } from '@backstage/errors'; import React from 'react'; +import { EntityName } from '@backstage/catalog-model'; import { Reader, SyncResult, @@ -81,9 +82,18 @@ function createPage({ }); } - async syncEntityDocs() { + async syncEntityDocs(_: EntityName, logHandler?: (line: string) => void) { if (syncDocsDelay) { - await new Promise(resolve => setTimeout(resolve, syncDocsDelay)); + for (let i = 0; i < 10; i++) { + setTimeout( + () => logHandler?.call(this, `Log line ${i}`), + ((i + 1) * syncDocsDelay) / 10, + ); + } + + await new Promise(resolve => { + setTimeout(resolve, syncDocsDelay); + }); } return syncDocs(); @@ -138,6 +148,11 @@ createDevApp() {createPage({ + entityDocs: ({ called, content }) => { + return called === 0 + ? content + : content.replace(/World/, 'New World'); + }, syncDocs: () => 'updated', syncDocsDelay: 2000, })} @@ -195,13 +210,6 @@ createDevApp() syncDocsDelay: 2000, })} - - - {createPage({ - syncDocs: () => 'timeout', - syncDocsDelay: 2000, - })} - ), diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 3b348873aa..140be7d886 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs", - "version": "0.9.9", + "version": "0.10.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,28 +38,31 @@ "@backstage/errors": "^0.1.1", "@backstage/integration": "^0.5.8", "@backstage/integration-react": "^0.1.4", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", "@material-ui/styles": "^4.10.0", + "eventsource": "^1.1.0", "react": "^16.13.1", "react-dom": "^16.13.1", + "react-lazylog": "^4.5.2", "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", "react-use": "^17.2.4", "sanitize-html": "^2.3.2" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^3.4.2", "@testing-library/user-event": "^13.1.8", + "@types/eventsource": "^1.1.5", "@types/jest": "^26.0.7", "@types/node": "^14.14.32", "@types/react": "^16.9", diff --git a/plugins/techdocs/src/api.ts b/plugins/techdocs/src/api.ts index 739c5fc133..a23d9fc7f0 100644 --- a/plugins/techdocs/src/api.ts +++ b/plugins/techdocs/src/api.ts @@ -28,14 +28,17 @@ export const techdocsApiRef = createApiRef({ description: 'Used to make requests towards techdocs API', }); -export type SyncResult = 'cached' | 'updated' | 'timeout'; +export type SyncResult = 'cached' | 'updated'; export interface TechDocsStorageApi { getApiOrigin(): Promise; getStorageUrl(): Promise; getBuilder(): Promise; getEntityDocs(entityId: EntityName, path: string): Promise; - syncEntityDocs(entityId: EntityName): Promise; + syncEntityDocs( + entityId: EntityName, + logHandler?: (line: string) => void, + ): Promise; getBaseUrl( oldBaseUrl: string, entityId: EntityName, diff --git a/plugins/techdocs/src/client.test.ts b/plugins/techdocs/src/client.test.ts index 329d3cbcb6..982c9496b2 100644 --- a/plugins/techdocs/src/client.test.ts +++ b/plugins/techdocs/src/client.test.ts @@ -13,9 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { Config } from '@backstage/config'; -import { TechDocsStorageClient } from './client'; import { UrlPatternDiscovery } from '@backstage/core-app-api'; +import { IdentityApi } from '@backstage/core-plugin-api'; +import { NotFoundError } from '@backstage/errors'; +import EventSource from 'eventsource'; +import { TechDocsStorageClient } from './client'; + +const MockedEventSource: jest.MockedClass< + typeof EventSource +> = EventSource as any; + +jest.mock('eventsource'); const mockEntity = { kind: 'Component', @@ -29,6 +39,16 @@ describe('TechDocsStorageClient', () => { getOptionalString: () => 'http://backstage:9191/api/techdocs', } as Partial; const discoveryApi = UrlPatternDiscovery.compile(mockBaseUrl); + const identityApi: jest.Mocked = { + getIdToken: jest.fn(), + getProfile: jest.fn(), + getUserId: jest.fn(), + signOut: jest.fn(), + }; + + beforeEach(() => { + jest.resetAllMocks(); + }); it('should return correct base url based on defined storage', async () => { // @ts-ignore Partial not assignable to Config. @@ -51,4 +71,183 @@ describe('TechDocsStorageClient', () => { `${mockBaseUrl}/static/docs/${mockEntity.namespace}/${mockEntity.kind}/${mockEntity.name}/test/`, ); }); + + describe('syncEntityDocs', () => { + it('should create eventsource without headers', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + MockedEventSource.prototype.addEventListener.mockImplementation( + (type, fn) => { + if (type === 'finish') { + fn({ data: '{"updated": false}' } as any); + } + }, + ); + + await storageApi.syncEntityDocs(mockEntity); + + expect( + MockedEventSource, + ).toBeCalledWith( + 'http://backstage:9191/api/techdocs/sync/default/Component/test-component', + { withCredentials: true, headers: {} }, + ); + }); + + it('should create eventsource with headers', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + MockedEventSource.prototype.addEventListener.mockImplementation( + (type, fn) => { + if (type === 'finish') { + fn({ data: '{"updated": false}' } as any); + } + }, + ); + + identityApi.getIdToken.mockResolvedValue('token'); + + await storageApi.syncEntityDocs(mockEntity); + + expect( + MockedEventSource, + ).toBeCalledWith( + 'http://backstage:9191/api/techdocs/sync/default/Component/test-component', + { withCredentials: true, headers: { Authorization: 'Bearer token' } }, + ); + }); + + it('should resolve to cached', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + MockedEventSource.prototype.addEventListener.mockImplementation( + (type, fn) => { + if (type === 'finish') { + fn({ data: '{"updated": false}' } as any); + } + }, + ); + + await expect(storageApi.syncEntityDocs(mockEntity)).resolves.toEqual( + 'cached', + ); + }); + + it('should resolve to updated', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + MockedEventSource.prototype.addEventListener.mockImplementation( + (type, fn) => { + if (type === 'finish') { + fn({ data: '{"updated": true}' } as any); + } + }, + ); + + await expect(storageApi.syncEntityDocs(mockEntity)).resolves.toEqual( + 'updated', + ); + }); + + it('should log values', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + MockedEventSource.prototype.addEventListener.mockImplementation( + (type, fn) => { + if (type === 'log') { + fn({ data: '"A log message"' } as any); + } + + if (type === 'finish') { + fn({ data: '{"updated": false}' } as any); + } + }, + ); + + const logHandler = jest.fn(); + await expect( + storageApi.syncEntityDocs(mockEntity, logHandler), + ).resolves.toEqual('cached'); + + expect(logHandler).toBeCalledTimes(1); + expect(logHandler).toBeCalledWith('A log message'); + }); + + it('should throw NotFoundError', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + // we await later after we emitted the error + const promise = storageApi.syncEntityDocs(mockEntity).then(); + + // flush the event loop + await new Promise(setImmediate); + + const instance = MockedEventSource.mock + .instances[0] as jest.Mocked; + + instance.onerror({ + status: 404, + message: 'Some not found warning', + } as any); + + await expect(promise).rejects.toThrow(NotFoundError); + await expect(promise).rejects.toThrowError('Some not found warning'); + }); + + it('should throw generic errors', async () => { + const storageApi = new TechDocsStorageClient({ + // @ts-ignore Partial not assignable to Config. + configApi, + discoveryApi, + identityApi, + }); + + // we await later after we emitted the error + const promise = storageApi.syncEntityDocs(mockEntity).then(); + + // flush the event loop + await new Promise(setImmediate); + + const instance = MockedEventSource.mock + .instances[0] as jest.Mocked; + + instance.onerror({ + type: 'error', + data: 'Some other error', + } as any); + + await expect(promise).rejects.toThrow(Error); + await expect(promise).rejects.toThrowError('Some other error'); + }); + }); }); diff --git a/plugins/techdocs/src/client.ts b/plugins/techdocs/src/client.ts index 19fc565a2f..afbf4b74a0 100644 --- a/plugins/techdocs/src/client.ts +++ b/plugins/techdocs/src/client.ts @@ -16,10 +16,11 @@ import { EntityName } from '@backstage/catalog-model'; import { Config } from '@backstage/config'; +import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; import { NotFoundError } from '@backstage/errors'; +import EventSource from 'eventsource'; import { SyncResult, TechDocsApi, TechDocsStorageApi } from './api'; import { TechDocsEntityMetadata, TechDocsMetadata } from './types'; -import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; /** * API to talk to techdocs-backend. @@ -192,44 +193,59 @@ export class TechDocsStorageClient implements TechDocsStorageApi { * Check if docs are on the latest version and trigger rebuild if not * * @param {EntityName} entityId Object containing entity data like name, namespace, etc. + * @param {Function} logHandler Callback to receive log messages from the build process * @returns {SyncResult} Whether documents are currently synchronized to newest version * @throws {Error} Throws error on error from sync endpoint in Techdocs Backend */ - async syncEntityDocs(entityId: EntityName): Promise { + async syncEntityDocs( + entityId: EntityName, + logHandler: (line: string) => void = () => {}, + ): Promise { const { kind, namespace, name } = entityId; const apiOrigin = await this.getApiOrigin(); const url = `${apiOrigin}/sync/${namespace}/${kind}/${name}`; const token = await this.identityApi.getIdToken(); - let request; - let attempts: number = 0; - // retry if request times out, up to 5 times - // can happen due to docs taking too long to generate - while (!request || (request.status === 408 && attempts < 5)) { - attempts++; - request = await fetch(url, { + + return new Promise((resolve, reject) => { + const source = new EventSource(url, { + withCredentials: true, headers: token ? { Authorization: `Bearer ${token}` } : {}, }); - } - switch (request.status) { - case 404: - throw new NotFoundError((await request.json()).error); + source.addEventListener('log', (e: any) => { + if (e.data) { + logHandler(JSON.parse(e.data)); + } + }); - case 200: - case 304: - return 'cached'; + source.addEventListener('finish', (e: any) => { + let updated: boolean = false; - case 201: - return 'updated'; + if (e.data) { + ({ updated } = JSON.parse(e.data)); + } - // for timeout and misc errors, handle without error to allow viewing older docs - // if older docs not available, - // Reader will show 404 error coming from getEntityDocs - case 408: - default: - return 'timeout'; - } + resolve(updated ? 'updated' : 'cached'); + }); + + source.onerror = (e: any) => { + source.close(); + + switch (e.status) { + // the endpoint returned a 404 status + case 404: + reject(new NotFoundError(e.message)); + return; + + // also handles the event-stream close. the reject is ignored if the Promise was already + // resolved by a finish event. + default: + reject(new Error(e.data)); + return; + } + }; + }); } async getBaseUrl( diff --git a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx index 90b968de6c..c5d05f1474 100644 --- a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx +++ b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx @@ -125,7 +125,14 @@ export const TechDocsCustomHome = ({ const { value: entities, loading, error } = useAsync(async () => { const response = await catalogApi.getEntities({ - fields: ['apiVersion', 'kind', 'metadata', 'spec.owner', 'spec.type'], + fields: [ + 'apiVersion', + 'kind', + 'metadata', + 'relations', + 'spec.owner', + 'spec.type', + ], }); return response.items.filter((entity: Entity) => { return !!entity.metadata.annotations?.['backstage.io/techdocs-ref']; diff --git a/plugins/techdocs/src/reader/components/Reader.tsx b/plugins/techdocs/src/reader/components/Reader.tsx index 294f81378f..d63ddf8125 100644 --- a/plugins/techdocs/src/reader/components/Reader.tsx +++ b/plugins/techdocs/src/reader/components/Reader.tsx @@ -15,9 +15,11 @@ */ import { EntityName } from '@backstage/catalog-model'; +import { Progress } from '@backstage/core-components'; +import { useApi } from '@backstage/core-plugin-api'; import { scmIntegrationsApiRef } from '@backstage/integration-react'; import { BackstageTheme } from '@backstage/theme'; -import { useTheme } from '@material-ui/core'; +import { Button, CircularProgress, useTheme } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; @@ -34,10 +36,9 @@ import { simplifyMkdocsFooter, transform as transformer, } from '../transformers'; +import { TechDocsBuildLogs } from './TechDocsBuildLogs'; import { TechDocsNotFound } from './TechDocsNotFound'; -import TechDocsProgressBar from './TechDocsProgressBar'; import { useReaderState } from './useReaderState'; -import { useApi } from '@backstage/core-plugin-api'; type Props = { entityId: EntityName; @@ -49,12 +50,14 @@ export const Reader = ({ entityId, onReady }: Props) => { const { '*': path } = useParams(); const theme = useTheme(); - const { state, content: rawPage, errorMessage } = useReaderState( - kind, - namespace, - name, - path, - ); + const { + state, + contentReload, + content: rawPage, + contentErrorMessage, + syncErrorMessage, + buildLog, + } = useReaderState(kind, namespace, name, path); const techdocsStorageApi = useApi(techdocsStorageApiRef); const [sidebars, setSidebars] = useState(); @@ -82,10 +85,10 @@ export const Reader = ({ entityId, onReady }: Props) => { useEffect(() => { updateSidebarPosition(); - window.addEventListener('scroll', updateSidebarPosition); + window.addEventListener('scroll', updateSidebarPosition, true); window.addEventListener('resize', updateSidebarPosition); return () => { - window.removeEventListener('scroll', updateSidebarPosition); + window.removeEventListener('scroll', updateSidebarPosition, true); window.removeEventListener('resize', updateSidebarPosition); }; // an update to "state" might lead to an updated UI so we include it as a trigger @@ -324,34 +327,67 @@ export const Reader = ({ entityId, onReady }: Props) => { return ( <> - {(state === 'CHECKING' || state === 'INITIAL_BUILD') && ( - + {state === 'CHECKING' && } + {state === 'INITIAL_BUILD' && ( + } + action={} + > + Documentation is accessed for the first time and is being prepared. + The subsequent loads are much faster. + )} {state === 'CONTENT_STALE_REFRESHING' && ( - + } + action={} + > A newer version of this documentation is being prepared and will be available shortly. )} {state === 'CONTENT_STALE_READY' && ( - + contentReload()}> + Refresh + + } + > A newer version of this documentation is now available, please refresh to view. )} - {state === 'CONTENT_STALE_TIMEOUT' && ( - - Building a newer version of this documentation took longer than - expected. Please refresh to try again. - - )} {state === 'CONTENT_STALE_ERROR' && ( - - Building a newer version of this documentation failed. {errorMessage} + } + > + Building a newer version of this documentation failed.{' '} + {syncErrorMessage} )} {state === 'CONTENT_NOT_FOUND' && ( - + <> + {syncErrorMessage && ( + } + > + Building a newer version of this documentation failed.{' '} + {syncErrorMessage} + + )} + + )}
diff --git a/plugins/techdocs/src/reader/components/TechDocsBuildLogs.test.tsx b/plugins/techdocs/src/reader/components/TechDocsBuildLogs.test.tsx new file mode 100644 index 0000000000..d1bb99b76c --- /dev/null +++ b/plugins/techdocs/src/reader/components/TechDocsBuildLogs.test.tsx @@ -0,0 +1,87 @@ +/* + * 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 { render } from '@testing-library/react'; +import React from 'react'; +import { + TechDocsBuildLogs, + TechDocsBuildLogsDrawerContent, +} from './TechDocsBuildLogs'; + +// react-lazylog is based on a react-virtualized component which doesn't +// write the content to the dom, so we mock it. +jest.mock('react-lazylog', () => { + return { + LazyLog: ({ text }: { text: string }) => { + return

{text}

; + }, + }; +}); + +describe('', () => { + it('should render with button', () => { + const rendered = render(); + expect(rendered.getByText(/Show Build Logs/i)).toBeInTheDocument(); + expect(rendered.queryByText(/Build Details/i)).not.toBeInTheDocument(); + }); + + it('should open drawer', () => { + const rendered = render(); + rendered.getByText(/Show Build Logs/i).click(); + expect(rendered.getByText(/Build Details/i)).toBeInTheDocument(); + }); +}); + +describe('', () => { + it('should render with empty log', () => { + const onClose = jest.fn(); + const rendered = render( + , + ); + expect(rendered.getByText(/Build Details/i)).toBeInTheDocument(); + expect(rendered.getByText(/Waiting for logs.../i)).toBeInTheDocument(); + + expect(onClose).toBeCalledTimes(0); + }); + + it('should render with empty logs', () => { + const onClose = jest.fn(); + const rendered = render( + , + ); + expect(rendered.getByText(/Build Details/i)).toBeInTheDocument(); + expect( + rendered.queryByText(/Waiting for logs.../i), + ).not.toBeInTheDocument(); + expect(rendered.getByText(/Line 1/i)).toBeInTheDocument(); + expect(rendered.getByText(/Line 2/i)).toBeInTheDocument(); + + expect(onClose).toBeCalledTimes(0); + }); + + it('should call onClose', () => { + const onClose = jest.fn(); + const rendered = render( + , + ); + rendered.getByRole('button').click(); + + expect(onClose).toBeCalledTimes(1); + }); +}); diff --git a/plugins/techdocs/src/reader/components/TechDocsBuildLogs.tsx b/plugins/techdocs/src/reader/components/TechDocsBuildLogs.tsx new file mode 100644 index 0000000000..d9da954152 --- /dev/null +++ b/plugins/techdocs/src/reader/components/TechDocsBuildLogs.tsx @@ -0,0 +1,121 @@ +/* + * 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 { + Button, + createStyles, + Drawer, + Grid, + IconButton, + makeStyles, + Theme, + Typography, +} from '@material-ui/core'; +import Close from '@material-ui/icons/Close'; +import * as React from 'react'; +import { useState } from 'react'; +import { LazyLog } from 'react-lazylog'; + +const useDrawerStyles = makeStyles((theme: Theme) => + createStyles({ + paper: { + width: '100%', + [theme.breakpoints.up('sm')]: { + width: '75%', + }, + [theme.breakpoints.up('md')]: { + width: '50%', + }, + padding: theme.spacing(2.5), + }, + root: { + height: '100%', + overflow: 'hidden', + }, + }), +); + +export const TechDocsBuildLogsDrawerContent = ({ + buildLog, + onClose, +}: { + buildLog: string[]; + onClose: () => void; +}) => { + const classes = useDrawerStyles(); + return ( + + + Build Details + + + + + + + + ); +}; + +export const TechDocsBuildLogs = ({ buildLog }: { buildLog: string[] }) => { + const classes = useDrawerStyles(); + const [open, setOpen] = useState(false); + + return ( + <> + + setOpen(false)} + > + setOpen(false)} + /> + + + ); +}; diff --git a/plugins/techdocs/src/reader/components/TechDocsProgressBar.test.tsx b/plugins/techdocs/src/reader/components/TechDocsProgressBar.test.tsx deleted file mode 100644 index f33ed62b97..0000000000 --- a/plugins/techdocs/src/reader/components/TechDocsProgressBar.test.tsx +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import TechDocsProgressBar from './TechDocsProgressBar'; -import React from 'react'; -import { render } from '@testing-library/react'; -import { wrapInTestApp } from '@backstage/test-utils'; -import { act } from 'react-dom/test-utils'; - -jest.useFakeTimers(); - -describe('', () => { - it('should render a message if techdocs page takes more time to load', () => { - const rendered = render(wrapInTestApp()); - act(() => { - jest.advanceTimersByTime(250); - }); - expect(rendered.getByTestId('progress')).toBeInTheDocument(); - expect(rendered.queryByTestId('delay-reason')).toBeNull(); - act(() => { - jest.advanceTimersByTime(5000); - }); - expect(rendered.getByTestId('delay-reason')).toBeInTheDocument(); - }); -}); diff --git a/plugins/techdocs/src/reader/components/TechDocsProgressBar.tsx b/plugins/techdocs/src/reader/components/TechDocsProgressBar.tsx deleted file mode 100644 index 7089f5ae08..0000000000 --- a/plugins/techdocs/src/reader/components/TechDocsProgressBar.tsx +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import React, { useState, useEffect } from 'react'; -import { useMountedState } from 'react-use'; -import { Typography } from '@material-ui/core'; -import { Progress } from '@backstage/core-components'; - -const TechDocsProgressBar = () => { - const isMounted = useMountedState(); - const [hasBeenDelayed, setHasBeenDelayed] = useState(false); - - const delayReason = `Docs are still loading...Backstage takes some extra time to load docs - for the first time. The subsequent loads are much faster.`; - - // Allowed time that docs can take to load (in milliseconds) - const allowedDelayTime = 5000; - - useEffect(() => { - setTimeout(() => { - if (isMounted()) { - setHasBeenDelayed(true); - } - }, allowedDelayTime); - }); - - return ( - <> - {hasBeenDelayed ? ( - {delayReason} - ) : null} - - - ); -}; - -export default TechDocsProgressBar; diff --git a/plugins/techdocs/src/reader/components/useReaderState.test.tsx b/plugins/techdocs/src/reader/components/useReaderState.test.tsx index 1edf41af30..9d9a8e2b1a 100644 --- a/plugins/techdocs/src/reader/components/useReaderState.test.tsx +++ b/plugins/techdocs/src/reader/components/useReaderState.test.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import { ApiProvider, ApiRegistry } from '@backstage/core-app-api'; import { NotFoundError } from '@backstage/errors'; import { act, renderHook } from '@testing-library/react-hooks'; import React from 'react'; @@ -23,7 +24,6 @@ import { reducer, useReaderState, } from './useReaderState'; -import { ApiProvider, ApiRegistry } from '@backstage/core-app-api'; describe('useReaderState', () => { let Wrapper: React.ComponentType; @@ -55,14 +55,12 @@ describe('useReaderState', () => { ${false} | ${undefined} | ${'BUILDING'} | ${'INITIAL_BUILD'} ${false} | ${undefined} | ${'BUILD_READY'} | ${'CONTENT_NOT_FOUND'} ${false} | ${undefined} | ${'BUILD_READY_RELOAD'} | ${'CHECKING'} - ${false} | ${undefined} | ${'BUILD_TIMED_OUT'} | ${'CONTENT_NOT_FOUND'} ${false} | ${undefined} | ${'UP_TO_DATE'} | ${'CONTENT_NOT_FOUND'} ${false} | ${undefined} | ${'ERROR'} | ${'CONTENT_NOT_FOUND'} ${false} | ${'asdf'} | ${'CHECKING'} | ${'CONTENT_FRESH'} ${false} | ${'asdf'} | ${'BUILDING'} | ${'CONTENT_STALE_REFRESHING'} ${false} | ${'asdf'} | ${'BUILD_READY'} | ${'CONTENT_STALE_READY'} ${false} | ${'asdf'} | ${'BUILD_READY_RELOAD'} | ${'CHECKING'} - ${false} | ${'asdf'} | ${'BUILD_TIMED_OUT'} | ${'CONTENT_STALE_TIMEOUT'} ${false} | ${'asdf'} | ${'UP_TO_DATE'} | ${'CONTENT_FRESH'} ${false} | ${'asdf'} | ${'ERROR'} | ${'CONTENT_STALE_ERROR'} `( @@ -84,6 +82,7 @@ describe('useReaderState', () => { activeSyncState: 'CHECKING', contentLoading: false, path: '', + buildLog: ['1', '2'], }; it('should return a copy of the state', () => { @@ -91,12 +90,14 @@ describe('useReaderState', () => { activeSyncState: 'CHECKING', contentLoading: false, path: '/', + buildLog: ['1', '2'], }); expect(oldState).toEqual({ activeSyncState: 'CHECKING', contentLoading: false, path: '', + buildLog: ['1', '2'], }); }); @@ -210,6 +211,33 @@ describe('useReaderState', () => { activeSyncState: 'BUILDING', }); }); + + it('should clear buildLog on "CHECKING"', () => { + expect( + reducer(oldState, { + type: 'sync', + state: 'CHECKING', + }), + ).toEqual({ + ...oldState, + activeSyncState: 'CHECKING', + buildLog: [], + }); + }); + }); + + describe('"buildLog" action', () => { + it('should work', () => { + expect( + reducer(oldState, { + type: 'buildLog', + log: 'Another Line', + }), + ).toEqual({ + ...oldState, + buildLog: ['1', '2', 'Another Line'], + }); + }); }); }); @@ -229,7 +257,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CHECKING', content: undefined, - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); await waitForValueToChange(() => result.current.state); @@ -237,18 +268,24 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CONTENT_FRESH', content: 'my content', - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); expect(techdocsStorageApi.getEntityDocs).toBeCalledWith( { kind: 'Component', namespace: 'default', name: 'backstage' }, '/example', ); - expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith({ - kind: 'Component', - namespace: 'default', - name: 'backstage', - }); + expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith( + { + kind: 'Component', + namespace: 'default', + name: 'backstage', + }, + expect.any(Function), + ); }); }); @@ -259,10 +296,14 @@ describe('useReaderState', () => { await new Promise(resolve => setTimeout(resolve, 500)); return 'my content'; }); - techdocsStorageApi.syncEntityDocs.mockImplementation(async () => { - await new Promise(resolve => setTimeout(resolve, 1100)); - return 'updated'; - }); + techdocsStorageApi.syncEntityDocs.mockImplementation( + async (_, logHandler) => { + logHandler?.call(this, 'Line 1'); + logHandler?.call(this, 'Line 2'); + await new Promise(resolve => setTimeout(resolve, 1100)); + return 'updated'; + }, + ); await act(async () => { const { result, waitForValueToChange } = await renderHook( @@ -273,7 +314,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CHECKING', content: undefined, - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); await waitForValueToChange(() => result.current.state); @@ -281,7 +325,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'INITIAL_BUILD', content: undefined, - errorMessage: ' Load error: NotFoundError: Page Not Found', + contentErrorMessage: 'NotFoundError: Page Not Found', + syncErrorMessage: undefined, + buildLog: ['Line 1', 'Line 2'], + contentReload: expect.any(Function), }); await waitForValueToChange(() => result.current.state); @@ -289,7 +336,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CHECKING', content: undefined, - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); await waitForValueToChange(() => result.current.state); @@ -297,7 +347,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CONTENT_FRESH', content: 'my content', - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); expect(techdocsStorageApi.getEntityDocs).toBeCalledTimes(2); @@ -306,20 +359,32 @@ describe('useReaderState', () => { '/example', ); expect(techdocsStorageApi.syncEntityDocs).toBeCalledTimes(1); - expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith({ - kind: 'Component', - namespace: 'default', - name: 'backstage', - }); + expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith( + { + kind: 'Component', + namespace: 'default', + name: 'backstage', + }, + expect.any(Function), + ); }); }); it('should handle stale content', async () => { - techdocsStorageApi.getEntityDocs.mockResolvedValue('my content'); - techdocsStorageApi.syncEntityDocs.mockImplementation(async () => { - await new Promise(resolve => setTimeout(resolve, 1100)); - return 'updated'; - }); + techdocsStorageApi.getEntityDocs + .mockResolvedValueOnce('my content') + .mockImplementationOnce(async () => { + await new Promise(resolve => setTimeout(resolve, 1100)); + return 'my new content'; + }); + techdocsStorageApi.syncEntityDocs.mockImplementation( + async (_, logHandler) => { + logHandler?.call(this, 'Line 1'); + logHandler?.call(this, 'Line 2'); + await new Promise(resolve => setTimeout(resolve, 1100)); + return 'updated'; + }, + ); await act(async () => { const { result, waitForValueToChange } = await renderHook( @@ -330,7 +395,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CHECKING', content: undefined, - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); // the content is returned but the sync is in progress @@ -338,7 +406,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CONTENT_FRESH', content: 'my content', - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: ['Line 1', 'Line 2'], + contentReload: expect.any(Function), }); // the sync takes longer than 1 seconds so the refreshing state starts @@ -346,62 +417,61 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CONTENT_STALE_REFRESHING', content: 'my content', - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: ['Line 1', 'Line 2'], + contentReload: expect.any(Function), }); - // the content is up-to-date + // the content is updated but not yet displayed await waitForValueToChange(() => result.current.state); expect(result.current).toEqual({ state: 'CONTENT_STALE_READY', content: 'my content', - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: ['Line 1', 'Line 2'], + contentReload: expect.any(Function), }); - expect(techdocsStorageApi.getEntityDocs).toBeCalledWith( - { kind: 'Component', namespace: 'default', name: 'backstage' }, - '/example', - ); - expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith({ - kind: 'Component', - namespace: 'default', - name: 'backstage', - }); - }); - }); - - it('should handle timed-out refresh', async () => { - techdocsStorageApi.getEntityDocs.mockResolvedValue('my content'); - techdocsStorageApi.syncEntityDocs.mockResolvedValue('timeout'); - - await act(async () => { - const { result, waitForValueToChange } = await renderHook( - () => useReaderState('Component', 'default', 'backstage', '/example'), - { wrapper: Wrapper }, - ); + // reload the content + result.current.contentReload(); + // the new content refresh is triggered + await waitForValueToChange(() => result.current.state); expect(result.current).toEqual({ state: 'CHECKING', content: undefined, - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); - // the content is returned but the sync is in progress + // the new content is loaded await waitForValueToChange(() => result.current.state); expect(result.current).toEqual({ - state: 'CONTENT_STALE_TIMEOUT', - content: 'my content', - errorMessage: '', + state: 'CONTENT_FRESH', + content: 'my new content', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); + expect(techdocsStorageApi.getEntityDocs).toBeCalledTimes(2); expect(techdocsStorageApi.getEntityDocs).toBeCalledWith( { kind: 'Component', namespace: 'default', name: 'backstage' }, '/example', ); - expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith({ - kind: 'Component', - namespace: 'default', - name: 'backstage', - }); + expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith( + { + kind: 'Component', + namespace: 'default', + name: 'backstage', + }, + expect.any(Function), + ); }); }); @@ -420,7 +490,10 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CHECKING', content: undefined, - errorMessage: '', + contentErrorMessage: undefined, + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); // the content loading threw an error @@ -428,18 +501,24 @@ describe('useReaderState', () => { expect(result.current).toEqual({ state: 'CONTENT_NOT_FOUND', content: undefined, - errorMessage: ' Load error: NotFoundError: Some error description', + contentErrorMessage: 'NotFoundError: Some error description', + syncErrorMessage: undefined, + buildLog: [], + contentReload: expect.any(Function), }); expect(techdocsStorageApi.getEntityDocs).toBeCalledWith( { kind: 'Component', namespace: 'default', name: 'backstage' }, '/example', ); - expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith({ - kind: 'Component', - namespace: 'default', - name: 'backstage', - }); + expect(techdocsStorageApi.syncEntityDocs).toBeCalledWith( + { + kind: 'Component', + namespace: 'default', + name: 'backstage', + }, + expect.any(Function), + ); }); }); }); diff --git a/plugins/techdocs/src/reader/components/useReaderState.ts b/plugins/techdocs/src/reader/components/useReaderState.ts index ac5145ee49..178c0746bf 100644 --- a/plugins/techdocs/src/reader/components/useReaderState.ts +++ b/plugins/techdocs/src/reader/components/useReaderState.ts @@ -14,10 +14,10 @@ * limitations under the License. */ +import { useApi } from '@backstage/core-plugin-api'; import { useEffect, useMemo, useReducer, useRef } from 'react'; import { useAsync, useAsyncRetry } from 'react-use'; import { techdocsStorageApiRef } from '../../api'; -import { useApi } from '@backstage/core-plugin-api'; /** * A state representation that is used to configure the UI of @@ -35,9 +35,6 @@ type ContentStateTypes = /** There is content, but after a reload, the content will be different */ | 'CONTENT_STALE_READY' - /** There is content, the backend tried to update it, but it took too long */ - | 'CONTENT_STALE_TIMEOUT' - /** There is content, the backend tried to update it, but failed */ | 'CONTENT_STALE_ERROR' @@ -93,11 +90,6 @@ export function calculateDisplayState({ return 'CONTENT_STALE_READY'; } - // the build timed out, but the content is still stale - if (activeSyncState === 'BUILD_TIMED_OUT') { - return 'CONTENT_STALE_TIMEOUT'; - } - // the build failed, but the content is still stale if (activeSyncState === 'ERROR') { return 'CONTENT_STALE_ERROR'; @@ -127,9 +119,6 @@ type SyncStates = */ | 'BUILD_READY_RELOAD' - /** Building the documentation timed out */ - | 'BUILD_TIMED_OUT' - /** No need for a sync. The content was already up-to-date. */ | 'UP_TO_DATE' @@ -148,7 +137,8 @@ type ReducerActions = contentLoading?: true; contentError?: Error; } - | { type: 'navigate'; path: string }; + | { type: 'navigate'; path: string } + | { type: 'buildLog'; log: string }; type ReducerState = { /** @@ -172,6 +162,11 @@ type ReducerState = { contentError?: Error; syncError?: Error; + + /** + * A list of log messages that were emitted by the build process. + */ + buildLog: string[]; }; export function reducer( @@ -182,6 +177,11 @@ export function reducer( switch (action.type) { case 'sync': + // reset the build log when a new check starts + if (action.state === 'CHECKING') { + newState.buildLog = []; + } + newState.activeSyncState = action.state; newState.syncError = action.syncError; break; @@ -196,6 +196,10 @@ export function reducer( newState.path = action.path; break; + case 'buildLog': + newState.buildLog = newState.buildLog.concat(action.log); + break; + default: throw new Error(); } @@ -206,6 +210,7 @@ export function reducer( ['content', 'navigate'].includes(action.type) ) { newState.activeSyncState = 'UP_TO_DATE'; + newState.buildLog = []; } return newState; @@ -216,11 +221,19 @@ export function useReaderState( namespace: string, name: string, path: string, -): { state: ContentStateTypes; content?: string; errorMessage?: string } { +): { + state: ContentStateTypes; + contentReload: () => void; + content?: string; + contentErrorMessage?: string; + syncErrorMessage?: string; + buildLog: string[]; +} { const [state, dispatch] = useReducer(reducer, { activeSyncState: 'CHECKING', path, contentLoading: true, + buildLog: [], }); const techdocsStorageApi = useApi(techdocsStorageApiRef); @@ -268,24 +281,38 @@ export function useReaderState( }, 1000); try { - const result = await techdocsStorageApi.syncEntityDocs({ - kind, - namespace, - name, - }); + const result = await techdocsStorageApi.syncEntityDocs( + { + kind, + namespace, + name, + }, + log => { + dispatch({ type: 'buildLog', log }); + }, + ); - if (result === 'updated') { - // if there was no content prior to building, retry the loading - if (!contentRef.current.content) { - contentRef.current.reload(); - dispatch({ type: 'sync', state: 'BUILD_READY_RELOAD' }); - } else { - dispatch({ type: 'sync', state: 'BUILD_READY' }); - } - } else if (result === 'cached') { - dispatch({ type: 'sync', state: 'UP_TO_DATE' }); - } else { - dispatch({ type: 'sync', state: 'BUILD_TIMED_OUT' }); + switch (result) { + case 'updated': + // if there was no content prior to building, retry the loading + if (!contentRef.current.content) { + contentRef.current.reload(); + dispatch({ type: 'sync', state: 'BUILD_READY_RELOAD' }); + } else { + dispatch({ type: 'sync', state: 'BUILD_READY' }); + } + break; + case 'cached': + dispatch({ type: 'sync', state: 'UP_TO_DATE' }); + break; + + default: + dispatch({ + type: 'sync', + state: 'ERROR', + syncError: new Error('Unexpected return state'), + }); + break; } } catch (e) { dispatch({ type: 'sync', state: 'ERROR', syncError: e }); @@ -305,19 +332,12 @@ export function useReaderState( [state.activeSyncState, state.content, state.contentLoading], ); - const errorMessage = useMemo(() => { - let errMessage = ''; - if (state.contentError) { - errMessage += ` Load error: ${state.contentError}`; - } - if (state.syncError) errMessage += ` Build error: ${state.syncError}`; - - return errMessage; - }, [state.syncError, state.contentError]); - return { state: displayState, + contentReload, content: state.content, - errorMessage, + contentErrorMessage: state.contentError?.toString(), + syncErrorMessage: state.syncError?.toString(), + buildLog: state.buildLog, }; } diff --git a/plugins/todo-backend/api-report.md b/plugins/todo-backend/api-report.md index 92e133a481..592a912c11 100644 --- a/plugins/todo-backend/api-report.md +++ b/plugins/todo-backend/api-report.md @@ -11,12 +11,21 @@ import { Logger as Logger_2 } from 'winston'; import { ScmIntegrations } from '@backstage/integration'; import { UrlReader } 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; +// Warning: (ae-forgotten-export) The symbol "TodoParserOptions" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "TodoParser" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "createTodoParser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export function createTodoParser(options?: TodoParserOptions): TodoParser; +// Warning: (ae-missing-release-tag) "ListTodosRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ListTodosRequest = { entity?: EntityName; @@ -32,6 +41,8 @@ export type ListTodosRequest = { }[]; }; +// Warning: (ae-missing-release-tag) "ListTodosResponse" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ListTodosResponse = { items: TodoItem[]; @@ -40,16 +51,22 @@ export type ListTodosResponse = { limit: number; }; +// Warning: (ae-missing-release-tag) "ReadTodosOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ReadTodosOptions = { url: string; }; +// Warning: (ae-missing-release-tag) "ReadTodosResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type ReadTodosResult = { items: TodoItem[]; }; +// Warning: (ae-missing-release-tag) "TodoItem" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export type TodoItem = { text: string; @@ -60,13 +77,18 @@ export type TodoItem = { repoFilePath?: string; }; +// Warning: (ae-missing-release-tag) "TodoReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TodoReader { readTodos(options: ReadTodosOptions): Promise; } +// Warning: (ae-missing-release-tag) "TodoReaderService" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class TodoReaderService implements TodoService { + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts constructor(options: Options_2); // (undocumented) listTodos( @@ -77,9 +99,13 @@ export class TodoReaderService implements TodoService { ): Promise; } +// Warning: (ae-missing-release-tag) "TodoScmReader" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export class TodoScmReader implements TodoReader { constructor(options: Options); + // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts + // // (undocumented) static fromConfig( config: Config, @@ -89,6 +115,8 @@ export class TodoScmReader implements TodoReader { readTodos({ url }: ReadTodosOptions): Promise; } +// Warning: (ae-missing-release-tag) "TodoService" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export interface TodoService { // (undocumented) @@ -100,5 +128,9 @@ export interface TodoService { ): Promise; } +// Warnings were encountered during analysis: +// +// src/service/types.d.ts:9:9 - (ae-forgotten-export) The symbol "Fields" needs to be exported by the entry point index.d.ts + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index e8a079880d..ef5ad352f4 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-todo +## 0.1.5 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@0.3.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/todo/api-report.md b/plugins/todo/api-report.md index 1fc8e8f99f..548d55accb 100644 --- a/plugins/todo/api-report.md +++ b/plugins/todo/api-report.md @@ -9,12 +9,19 @@ import { ApiRef } from '@backstage/core-plugin-api'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; +// Warning: (ae-missing-release-tag) "EntityTodoContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const EntityTodoContent: () => JSX.Element; +// Warning: (ae-forgotten-export) The symbol "TodoApi" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "todoApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const todoApiRef: ApiRef; +// Warning: (ae-missing-release-tag) "todoPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const todoPlugin: BackstagePlugin<{}, {}>; diff --git a/plugins/todo/package.json b/plugins/todo/package.json index df719ef10e..cac45bcd0a 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-todo", - "version": "0.1.4", + "version": "0.1.5", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -30,7 +30,7 @@ "@backstage/core-components": "^0.1.5", "@backstage/core-plugin-api": "^0.1.3", "@backstage/errors": "^0.1.1", - "@backstage/plugin-catalog-react": "^0.2.6", + "@backstage/plugin-catalog-react": "^0.3.0", "@backstage/theme": "^0.2.8", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -40,9 +40,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index 95344dd0a5..0a4194cc29 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/plugin-user-settings +## 0.3.0 + +### Minor Changes + +- 71afed7f3: Exported and renamed components from the `@backstage/plugin-user-settings` plugin , to be able to use it in the consumer side and customize the `SettingPage` + ## 0.2.12 ### Patch Changes diff --git a/plugins/user-settings/api-report.md b/plugins/user-settings/api-report.md index 2f3b9b2fed..af542e22d9 100644 --- a/plugins/user-settings/api-report.md +++ b/plugins/user-settings/api-report.md @@ -12,11 +12,17 @@ import { ProfileInfo } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; import { SessionApi } from '@backstage/core-plugin-api'; +// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts +// Warning: (ae-missing-release-tag) "DefaultProviderSettings" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const DefaultProviderSettings: ({ configuredProviders, }: Props_3) => 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, @@ -25,29 +31,47 @@ export const ProviderSettingsItem: ({ apiRef, }: Props_4) => 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; +// 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: () => JSX.Element; +// 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; +// 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) "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, @@ -55,9 +79,13 @@ export const UserSettingsPage: ({ 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< { @@ -68,15 +96,24 @@ 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; +// 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: () => { profile: ProfileInfo; diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 941116b0bb..8a6480182e 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings", - "version": "0.2.12", + "version": "0.3.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -42,10 +42,10 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", "@backstage/core-plugin-api": "^0.1.3", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/welcome/api-report.md b/plugins/welcome/api-report.md index 49ccd46994..f3096482de 100644 --- a/plugins/welcome/api-report.md +++ b/plugins/welcome/api-report.md @@ -7,9 +7,13 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; +// Warning: (ae-missing-release-tag) "WelcomePage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) export const WelcomePage: () => JSX.Element; +// Warning: (ae-missing-release-tag) "welcomePlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// // @public (undocumented) const welcomePlugin: BackstagePlugin<{}, {}>; export { welcomePlugin as plugin }; diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index a04d3cf9dd..50ab900e7f 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -42,9 +42,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/plugins/xcmetrics/api-report.md b/plugins/xcmetrics/api-report.md index 3509fec523..9eb9a16f8b 100644 --- a/plugins/xcmetrics/api-report.md +++ b/plugins/xcmetrics/api-report.md @@ -8,9 +8,13 @@ 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 e617d12e85..07275dbba7 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -33,9 +33,9 @@ "react-use": "^17.2.4" }, "devDependencies": { - "@backstage/cli": "^0.7.3", + "@backstage/cli": "^0.7.4", "@backstage/core-app-api": "^0.1.4", - "@backstage/dev-utils": "^0.2.1", + "@backstage/dev-utils": "^0.2.2", "@backstage/test-utils": "^0.1.14", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^11.2.5", diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index f88b30d1fd..21c61599a4 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -150,16 +150,11 @@ async function runApiExtraction({ for (const packageDir of packageDirs) { console.log(`## Processing ${packageDir}`); const projectFolder = resolvePath(__dirname, '..', packageDir); - const packagePath = resolvePath(__dirname, `../${packageDir}/package.json`); + const packageFolder = resolvePath(__dirname, '../dist-types', packageDir); const extractorConfig = ExtractorConfig.prepare({ configObject: { - mainEntryPointFilePath: resolvePath( - __dirname, - '../dist-types', - packageDir, - 'src/index.d.ts', - ), + mainEntryPointFilePath: resolvePath(packageFolder, 'src/index.d.ts'), bundledPackages: [], compiler: { @@ -190,7 +185,7 @@ async function runApiExtraction({ }, messages: { - // Silence warnings, as these will prevent the CI build to work + // Silence compiler warnings, as these will prevent the CI build to work compilerMessageReporting: { default: { logLevel: 'none' as ExtractorLogLevel.None, @@ -200,14 +195,14 @@ async function runApiExtraction({ }, extractorMessageReporting: { default: { - logLevel: 'none' as ExtractorLogLevel.Warning, - // addToApiReportFile: true, + logLevel: 'warning' as ExtractorLogLevel.Warning, + addToApiReportFile: true, }, }, tsdocMessageReporting: { default: { - logLevel: 'none' as ExtractorLogLevel.Warning, - // addToApiReportFile: true, + logLevel: 'warning' as ExtractorLogLevel.Warning, + addToApiReportFile: true, }, }, }, @@ -217,9 +212,16 @@ async function runApiExtraction({ projectFolder, }, configObjectFullPath: projectFolder, - packageJsonFullPath: packagePath, + packageJsonFullPath: resolvePath(projectFolder, 'package.json'), }); + // The `packageFolder` needs to point to the location within `dist-types` in order for relative + // paths to be logged. Unfortunately the `prepare` method above derives it from the `packageJsonFullPath`, + // which needs to point to the actual file, so we override `packageFolder` afterwards. + (extractorConfig as { + packageFolder: string; + }).packageFolder = packageFolder; + if (!compilerState) { compilerState = CompilerState.create(extractorConfig, { additionalEntryPoints: entryPoints, diff --git a/yarn.lock b/yarn.lock index a8e6f4a167..bc34978977 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1425,6 +1425,27 @@ remark-gfm "^1.0.0" zen-observable "^0.8.15" +"@backstage/plugin-catalog-react@^0.2.0", "@backstage/plugin-catalog-react@^0.2.4": + version "0.2.6" + resolved "https://registry.npmjs.org/@backstage/plugin-catalog-react/-/plugin-catalog-react-0.2.6.tgz#4e3a0ea9394f163c95df97b72511f2bd2277f40a" + integrity sha512-loSYkm6aZKFn5gJ0xy9A3Ii3czSgA5ZRhCchqcN3ViSsipJLUbQt2TtMc8Tyk2h0e8AyRhyteEkcrnPGQqGXlQ== + dependencies: + "@backstage/catalog-client" "^0.3.16" + "@backstage/catalog-model" "^0.9.0" + "@backstage/core-app-api" "^0.1.4" + "@backstage/core-components" "^0.1.5" + "@backstage/core-plugin-api" "^0.1.3" + "@backstage/integration" "^0.5.8" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.45" + "@types/react" "^16.9" + lodash "^4.17.15" + react "^16.13.1" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-use "^17.2.4" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -5625,10 +5646,15 @@ resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/eventsource@^1.1.5": + version "1.1.5" + resolved "https://registry.npmjs.org/@types/eventsource/-/eventsource-1.1.5.tgz#408e9b45efb176c8bea672ab58c81e7ab00d24bc" + integrity sha512-BA9q9uC2PAMkUS7DunHTxWZZaVpeNzDG8lkBxcKwzKJClfDQ4Z59/Csx7HSH/SIqFN2JWh0tAKAM6k/wRR0OZg== + "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18", "@types/express-serve-static-core@^4.17.21", "@types/express-serve-static-core@^4.17.5": - version "4.17.21" - resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.21.tgz#a427278e106bca77b83ad85221eae709a3414d42" - integrity sha512-gwCiEZqW6f7EoR8TTEfalyEhb1zA5jQJnRngr97+3pzMaO1RKoI1w2bw07TK72renMUVWcWS5mLI6rk1NqN0nA== + version "4.17.24" + resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz#ea41f93bf7e0d59cd5a76665068ed6aab6815c07" + integrity sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA== dependencies: "@types/node" "*" "@types/qs" "*" @@ -5828,6 +5854,13 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jenkins@^0.23.1": + version "0.23.1" + resolved "https://registry.npmjs.org/@types/jenkins/-/jenkins-0.23.1.tgz#d0f0ef5511beff975c91cbd2365e580d700ca7f9" + integrity sha512-3oGxVCq+5esbjb0BQXUv0Iz0/7ogJxmzaxKtxwwMik5vGtRvfjWf/sXGA1RzkVAG0+rJUZNKStjKRdtqJfEyRg== + dependencies: + "@types/node" "*" + "@types/jest-when@^2.7.2": version "2.7.2" resolved "https://registry.npmjs.org/@types/jest-when/-/jest-when-2.7.2.tgz#619fbc5f623bcd0b29efde0e4993c7f0d50d026d" @@ -6055,10 +6088,10 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>= 8", "@types/node@>=12.12.47", "@types/node@>=13.7.0": - version "14.17.0" - resolved "https://registry.npmjs.org/@types/node/-/node-14.17.0.tgz#3ba770047723b3eeb8dc9fca02cce8a7fb6378da" - integrity sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA== +"@types/node@*", "@types/node@>= 8", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^14.14.31", "@types/node@^14.14.32", "@types/node@^14.14.33": + version "14.17.3" + resolved "https://registry.npmjs.org/@types/node/-/node-14.17.3.tgz#6d327abaa4be34a74e421ed6409a0ae2f47f4c3d" + integrity sha512-e6ZowgGJmTuXa3GyaPbTGxX17tnThl2aSSizrFthQ7m9uLGZBXiGhgE55cjRZTF5kjZvYn9EOPOMljdjwbflxw== "@types/node@10.17.13": version "10.17.13" @@ -6075,11 +6108,6 @@ resolved "https://registry.npmjs.org/@types/node/-/node-12.12.58.tgz#46dae9b2b9ee5992818c8f7cee01ff4ce03ab44c" integrity sha512-Be46CNIHWAagEfINOjmriSxuv7IVcqbGe+sDSg2SYCEz/0CRBy7LRASGfRbD8KZkqoePU73Wsx3UvOSFcq/9hA== -"@types/node@^14.14.31", "@types/node@^14.14.32", "@types/node@^14.14.33": - version "14.17.3" - resolved "https://registry.npmjs.org/@types/node/-/node-14.17.3.tgz#6d327abaa4be34a74e421ed6409a0ae2f47f4c3d" - integrity sha512-e6ZowgGJmTuXa3GyaPbTGxX17tnThl2aSSizrFthQ7m9uLGZBXiGhgE55cjRZTF5kjZvYn9EOPOMljdjwbflxw== - "@types/normalize-package-data@^2.4.0": version "2.4.0" resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" @@ -6091,9 +6119,9 @@ integrity sha512-4QQmOF5KlwfxJ5IGXFIudkeLCdMABz03RcUXu+LCb24zmln8QW6aDjuGl4d4XPVLf2j+FnjelHTP7dvceAFbhA== "@types/nunjucks@^3.1.4": - version "3.1.4" - resolved "https://registry.npmjs.org/@types/nunjucks/-/nunjucks-3.1.4.tgz#2f80e2fa5e7982b2131201d0b4474ab4d03d9de1" - integrity sha512-cR65PLlHKW/qxxj840dbNb3ICO+iAVQzaNKJ8TcKOVKFi+QcAkhw9SCY8VFAyU41SmJMs+2nrIN2JGhX+jYb7A== + version "3.1.5" + resolved "https://registry.npmjs.org/@types/nunjucks/-/nunjucks-3.1.5.tgz#e0782333b75b4ff9ac9213aa160ca8c5132eaf57" + integrity sha512-0zEdmQNNvQ+xyV9kqQvAV93UVroTwhE78toVUDT0GBnGcW2jQBZnB4al9qq2LqI5qHOqROy/DvvAY/UwrbvV1A== "@types/oauth@*": version "0.9.1" @@ -6163,9 +6191,9 @@ "@types/passport" "*" "@types/passport@*", "@types/passport@^1.0.3": - version "1.0.6" - resolved "https://registry.npmjs.org/@types/passport/-/passport-1.0.6.tgz#72343e49d65efa98cb328163cff5f127981947d7" - integrity sha512-9oKfrJXuAxvyxdrtMCxKkHgmd6DMO8NDOLvMJ1LvIWd6/xP+i81PAkpTaEca7VhJX9S009RciwZL/j6dsLsHrA== + version "1.0.7" + resolved "https://registry.npmjs.org/@types/passport/-/passport-1.0.7.tgz#85892f14932168158c86aecafd06b12f5439467a" + integrity sha512-JtswU8N3kxBYgo+n9of7C97YQBT+AYPP2aBfNGTzABqPAZnK/WOAaKfh3XesUYMZRrXFuoPc2Hv0/G/nQFveHw== dependencies: "@types/express" "*" @@ -12302,6 +12330,13 @@ eventsource@^1.0.5, eventsource@^1.0.7: dependencies: original "^1.0.0" +eventsource@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz#00e8ca7c92109e94b0ddf32dac677d841028cfaf" + integrity sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg== + dependencies: + original "^1.0.0" + evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -15766,7 +15801,7 @@ jake@^10.6.1: filelist "^1.0.1" minimatch "^3.0.4" -jenkins@^0.28.0: +jenkins@^0.28.1: version "0.28.1" resolved "https://registry.npmjs.org/jenkins/-/jenkins-0.28.1.tgz#f7951798ee5d2bb501a831979b6b5ecc1a922a64" integrity sha512-gcC4QUrP4VzdqOMHoVzh36XlJprxJkI2HGLQSY7w84KoCTVNDcR/8O00tYyXp9vrZOx4wl5zCXLVKMgH2IoyJQ==