Merge branch 'backstage:master' into update-custom-permission-rule-doc

This commit is contained in:
Stanley Nicholl
2023-12-13 13:51:08 +00:00
committed by GitHub
727 changed files with 17598 additions and 3014 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-plugin-api': patch
---
Update alpha component ref type to be more specific than any, delete boot page component and use new plugin type for error boundary component extensions.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-app-api': patch
---
Add support for translation extensions.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Enable the `tsx` loader to work on Node 18.19 and up
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-gitlab': patch
---
Extract some more actions to this library
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Bumped create-app version.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/theme': patch
---
Align Material UI v5 `Paper` component background color in dark mode to v4.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-user-settings-backend': patch
'@backstage/plugin-home': patch
---
Change user settings backend plugin id and fix when using user setting backend home page first will cause edit page loop render
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/config-loader': minor
---
Add "path" to `TransformFunc` context
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-test-utils': patch
---
Migrate `renderInTestApp` to `@backstage/frontend-test-utils` for testing individual React components in an app.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Includes templates in @backstage/repo-tools package and use them in the CLI
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org': patch
---
Fix issue where members inside of `<EntityMembersListCard>` would be rendered as squished when the card itself was shrunk down.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Updates the `schema openapi generate-client` command to export all generated types from the generated directory.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-app-api': patch
---
Use the new plugin type for error boundary components.
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/repo-tools': patch
---
The `api-reports` command now checks for api report files that no longer apply.
If it finds such files, it's treated basically the same as report errors do, and
the check fails.
For example, if you had an `api-report-alpha.md` but then removed the alpha
export, the reports generator would now report that this file needs to be
deleted.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-azure-devops-backend': patch
'@backstage/plugin-azure-devops-common': patch
'@backstage/plugin-azure-devops': patch
---
Added multi-org support
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-scaffolder-node': patch
---
Refactor some methods to `-node` instead and use the new external modules
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Fixed a bug where `schema openapi init` created an invalid test command.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-compat-api': patch
---
Added `compatWrapper`, which can be used to wrap any React element to provide bi-directional interoperability between the `@backstage/core-*-api` and `@backstage/frontend-*-api` APIs.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Updating template generation for scaffolder module
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-compat-api': minor
---
Discover plugins and routes recursively beneath the root routes in `collectLecacyRoutes`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
Fixed the AwsS3UrlReader host regex and host to allow the S3 reading for CN AWS domain
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-azure-devops': patch
---
Added support for annotations that use a subpath for the host. Also validated that the annotations have the correct number of slashes.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-azure-devops-backend': patch
---
Updated encoding of Org to use `encodeURIComponent` when building URL used to get credentials from credential provider
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-user-settings': patch
'@backstage/plugin-tech-radar': patch
'@backstage/plugin-graphiql': patch
'@backstage/plugin-techdocs': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-search': patch
'@backstage/plugin-home': patch
---
Wrap `/alpha` export extension elements in backwards compatibility wrapper.
+71 -2
View File
@@ -257,7 +257,11 @@
"@backstage/plugin-auth-backend-module-atlassian-provider": "0.0.0",
"@backstage/plugin-auth-backend-module-okta-provider": "0.0.0",
"@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "0.0.0",
"@backstage/plugin-auth-backend-module-vmware-cloud-provider": "0.0.0"
"@backstage/plugin-auth-backend-module-vmware-cloud-provider": "0.0.0",
"@backstage/plugin-scaffolder-backend-module-azure": "0.0.0",
"@backstage/plugin-scaffolder-backend-module-bitbucket": "0.0.0",
"@backstage/plugin-scaffolder-backend-module-gerrit": "0.0.0",
"@backstage/plugin-scaffolder-backend-module-github": "0.0.0"
},
"changesets": [
"angry-eagles-end",
@@ -266,8 +270,10 @@
"angry-walls-juggle",
"big-swans-guess",
"blue-meals-chew",
"brave-beers-happen",
"brave-parents-stare",
"brave-socks-raise",
"breezy-houses-eat",
"breezy-pans-glow",
"bright-eyes-film",
"brown-books-carry",
@@ -275,56 +281,88 @@
"chilled-buses-love",
"chilled-terms-breathe",
"chilly-bikes-kick",
"chilly-lies-collect",
"clean-clouds-fry",
"clever-rats-smoke",
"clever-wombats-sneeze",
"cold-pans-crash",
"cool-knives-argue",
"create-app-1700579510",
"create-app-1700607979",
"create-app-1702395837",
"curly-walls-relate",
"dirty-turkeys-reflect",
"dry-readers-raise",
"dull-rings-melt",
"eighty-dodos-sing",
"eighty-phones-peel",
"eleven-ants-pretend",
"empty-dingos-grow",
"empty-fireants-study",
"fair-plants-attack",
"famous-flies-kick",
"famous-peas-reflect",
"fifty-cameras-share",
"fifty-seas-grab",
"five-feet-call",
"forty-clocks-hug",
"forty-insects-drop",
"forty-mirrors-carry",
"four-foxes-juggle",
"four-needles-watch",
"fresh-seahorses-glow",
"funny-bobcats-try",
"gentle-lies-greet",
"gentle-timers-fail",
"giant-files-fry",
"gold-humans-tease",
"gold-shirts-yell",
"good-wolves-leave",
"gorgeous-snails-admire",
"great-rings-type",
"green-seals-play",
"healthy-feet-kick",
"healthy-poets-search",
"hip-berries-begin",
"hip-cars-repair",
"honest-houses-hide",
"hot-wolves-flash",
"hungry-buckets-compare",
"itchy-camels-cough",
"khaki-clocks-happen",
"khaki-hounds-think",
"khaki-singers-film",
"kind-badgers-rush",
"kind-cycles-happen",
"kind-eels-sing",
"large-weeks-accept",
"late-eyes-serve",
"late-hats-beam",
"light-beers-cheer",
"little-suits-collect",
"long-cycles-grow",
"long-trainers-matter",
"long-wolves-return",
"lovely-terms-search",
"lucky-kids-cough",
"metal-eggs-smile",
"mighty-beans-wink",
"modern-mails-live",
"nasty-rockets-bathe",
"nasty-tips-exercise",
"nervous-dancers-wait",
"nervous-ladybugs-end",
"nervous-penguins-sort",
"ninety-otters-report",
"ninety-suns-accept",
"odd-bats-kick",
"orange-boats-hunt",
"perfect-apes-sing",
"perfect-crabs-help",
"pink-dryers-repair",
"plenty-numbers-enjoy",
"plenty-plums-talk",
"polite-crabs-build",
"polite-knives-build",
"poor-pandas-dream",
"pretty-onions-knock",
@@ -332,53 +370,84 @@
"proud-flies-travel",
"proud-seahorses-explain",
"quick-horses-reply",
"quick-lions-care",
"real-bees-thank",
"red-readers-search",
"renovate-0392ef9",
"renovate-07b1766",
"renovate-0c44581",
"renovate-1252136",
"renovate-12c95fb",
"renovate-169bdc2",
"renovate-19742c3",
"renovate-1ed81a0",
"renovate-240982c",
"renovate-2613384",
"renovate-4891ee7",
"renovate-4b1eded",
"renovate-522261c",
"renovate-5644299",
"renovate-6075f87",
"renovate-6c0fb81",
"renovate-6e5c790",
"renovate-796bd6f",
"renovate-8d8b90d",
"renovate-9d2d52e",
"renovate-a277605",
"renovate-a6399d6",
"renovate-b193efa",
"renovate-c4e012c",
"renovate-c7270d5",
"renovate-c727667",
"renovate-ccaf2c8",
"renovate-dee7ad1",
"renovate-ead3ba6",
"renovate-f5b18be",
"rich-bees-breathe",
"rich-singers-join",
"rude-beans-drop",
"rude-ears-greet",
"sharp-dingos-learn",
"shiny-books-search",
"shiny-cheetahs-vanish",
"short-buttons-cover",
"shy-boxes-sleep",
"silent-rats-reflect",
"silly-numbers-wash",
"silver-rocks-deliver",
"six-cooks-attack",
"sixty-adults-kiss",
"sixty-houses-agree",
"slow-bottles-cross",
"slow-trees-warn",
"smooth-frogs-decide",
"sour-pumas-reply",
"spotty-olives-share",
"spotty-terms-occur",
"stale-bats-end",
"stale-frogs-agree",
"stale-walls-cross",
"strange-brooms-poke",
"strange-suits-glow",
"stupid-wasps-fold",
"tame-pants-end",
"tasty-dolphins-unite",
"ten-snakes-wait",
"tender-peas-smoke",
"thick-snails-travel",
"thirty-fireants-cheer",
"tiny-cobras-look",
"tiny-coins-raise",
"tricky-donkeys-do",
"tricky-islands-wonder",
"twenty-beans-laugh",
"unlucky-clouds-build",
"violet-zebras-thank",
"warm-plums-beg",
"wicked-elephants-think"
"wet-bananas-agree",
"wicked-elephants-think",
"wicked-pants-end",
"wild-knives-wait",
"witty-cars-wash"
]
}
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/create-app': patch
---
Include the `<EntityLinksCard />` for group entities by default
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Updated dependency `bfj` to `^8.0.0`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-api-docs': patch
---
Updated dependency `@asyncapi/react-component` to `1.2.6`.
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/plugin-home-react': patch
'@backstage/plugin-home': patch
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder': patch
---
Updated dependency `@rjsf/utils` to `5.15.0`.
Updated dependency `@rjsf/core` to `5.15.0`.
Updated dependency `@rjsf/material-ui` to `5.15.0`.
Updated dependency `@rjsf/validator-ajv8` to `5.15.0`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-compat-api': patch
---
Delete alpha DI compatibility helper for components, migrating components should be simple without a helper.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-app-api': minor
---
The app no longer provides the `AppContext` from `@backstage/core-plugin-api`. Components that require this context to be available should use the `compatWrapper` helper from `@backstage/core-compat-api`.
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/plugin-scaffolder-backend-module-bitbucket': minor
'@backstage/plugin-scaffolder-backend-module-gerrit': minor
'@backstage/plugin-scaffolder-backend-module-github': minor
'@backstage/plugin-scaffolder-backend-module-azure': minor
---
Create new scaffolder module for external integrations
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fixed an issue where the `onChange` prop within `HeaderTabs` was triggering twice upon tab-switching.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-home': patch
---
StarredEntities component calls `getEntitiesByRefs` instead of `getEntities` to improve performance since we have the `entityRefs`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-plugin-api': patch
---
Added translation APIs as well as `createTranslationExtension`.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/frontend-plugin-api': patch
'@backstage/frontend-app-api': patch
---
Forward ` node`` instead of `extensionId` to resolved extension inputs.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Execute `openapi-generator-cli` from `@backstage/repo-tools` directory to force it to use our openapitools.json config file.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Fixes a bug where some query parameters were double URL encoded.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-home': patch
---
Use new option from RJSF 5.15
+1
View File
@@ -323,6 +323,7 @@ reusability
Reusability
roadmaps
rollbar
Roboto
Rollbar
Rollup
routable
+1 -1
View File
@@ -51,7 +51,7 @@ jobs:
- run: yarn build-storybook
- uses: chromaui/action@010142709398e03cee64f3351ed7503618093d9f # v1
- uses: chromaui/action@2f12dc37555ffc9ed980d883e96b6d03724a2d6a # v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# projectToken intentionally shared to allow collaborators to run Chromatic on forks
+11 -7
View File
@@ -78,7 +78,6 @@ Scope: The Permission Framework and plugins integrating with the permission fram
| Name | Organization | Team | GitHub | Discord |
| -------------------- | ------------ | --------------- | ----------------------------------------------- | ---------------- |
| Ainhoa Larumbe | Spotify | Imaginary Goats | [ainhoaL](http://github.com/ainhoaL) | ainhoa#8085 |
| Aramis Sennyey | Spotify | Imaginary Goats | [sennyeya](https://github.com/sennyeya) | Aramis#7984 |
| Claire Casey | Spotify | Imaginary Goats | [clairelcasey](http://github.com/clairelcasey) | clairecasey#2710 |
| Eric Peterson | Spotify | Imaginary Goats | [iamEAP](http://github.com/iamEAP) | iamEAP#3058 |
| Harry Hogg | Spotify | Imaginary Goats | [HHogg](http://github.com/HHogg) | simplex#3451 |
@@ -118,7 +117,7 @@ Scope: Tooling for frontend and backend schema-first OpenAPI development.
| Name | Organization | GitHub | Discord |
| -------------- | ------------ | --------------------------------------- | ------------- |
| Aramis Sennyey | Spotify | [sennyeya](https://github.com/sennyeya) | `Aramis#7984` |
| Aramis Sennyey | | [sennyeya](https://github.com/sennyeya) | `Aramis#7984` |
### Scaffolder
@@ -126,10 +125,9 @@ Team: @backstage/scaffolder-maintainers
Scope: The Scaffolder frontend and backend plugins, and related tooling.
| Name | Organization | GitHub | Discord |
| ------------------- | -------------- | ------------------------------------- | ---------------- |
| Bogdan Nechyporenko | Bol.com | [acierto](https://github.com/acierto) | `bogdan_haarlem` |
| Paul Cowan | frontendrescue | [dagda1](https://github.com/dagda1) | `dagda1` |
| Name | Organization | GitHub | Discord |
| ------------------- | ------------ | ------------------------------------- | ---------------- |
| Bogdan Nechyporenko | Bol.com | [acierto](https://github.com/acierto) | `bogdan_haarlem` |
## Sponsors
@@ -147,7 +145,7 @@ Scope: The Scaffolder frontend and backend plugins, and related tooling.
| Alex Crome | | [afscrome](https://github.com/afscrome) | `afscrome` |
| Andre Wanlin | Spotify | [awanlin](https://github.com/awanlin) | `ahhhndre` |
| Andrew Thauer | Wealthsimple | [andrewthauer](https://github.com/andrewthauer) | `andrewthauer#3060` |
| Aramis Sennyey | Spotify | [sennyeya](https://github.com/sennyeya) | `Aramis#7984` |
| Aramis Sennyey | | [sennyeya](https://github.com/sennyeya) | `Aramis#7984` |
| Brian Fletcher | Roadie.io | [punkle](https://github.com/punkle) | `Brian Fletcher#7051` |
| Carlos Esteban Lopez Jaramillo | VMWare | [luchillo17](https://github.com/luchillo17) | `luchillo17#8777` |
| David Tuite | Roadie.io | [dtuite](https://github.com/dtuite) | `David Tuite (roadie.io)#1010` |
@@ -173,3 +171,9 @@ Scope: The Scaffolder frontend and backend plugins, and related tooling.
| Name | Organization | GitHub | Discord |
| --------- | ------------ | ------------------------------------------- | -------------- |
| Lee Mills | Spotify | [leemills83](https://github.com/leemills83) | `.binarypoint` |
## Emeritus Project Area Maintainers
| Maintainer | Organization | GitHub | Discord |
| ---------- | -------------- | ----------------------------------- | -------- |
| Paul Cowan | frontendrescue | [dagda1](https://github.com/dagda1) | `dagda1` |
+2
View File
@@ -27,6 +27,8 @@ To add Okta authentication, you must create an Application from Okta:
- `Controlled access`: (select as appropriate)
- Click Save
The configuration examples provided above are suitable for local development. For a production deployment, substitute `http://localhost:7007` with the url that your Backstage instance is available at.
# Configuration
The provider configuration can then be added to your `app-config.yaml` under the
@@ -330,7 +330,7 @@ depends on the appropriate extension point and interacts with it.
```ts title="packages/backend/src/index.ts"
/* highlight-add-start */
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node';
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
import { createBackendModule } from '@backstage/backend-plugin-api';
/* highlight-add-end */
@@ -344,7 +344,7 @@ const catalogModuleCustomExtensions = createBackendModule({
catalog: catalogProcessingExtensionPoint,
// ... and other dependencies as needed
},
init({ catalog /* ..., other dependencies */ }) {
async init({ catalog /* ..., other dependencies */ }) {
// Here you have the opportunity to interact with the extension
// point before the plugin itself gets instantiated
catalog.addEntityProvider(new MyEntityProvider()); // just an example
@@ -399,7 +399,7 @@ depends on the appropriate extension point and interacts with it.
```ts title="packages/backend/src/index.ts"
/* highlight-add-start */
import { eventsExtensionPoint } from '@backstage/plugin-events-node';
import { eventsExtensionPoint } from '@backstage/plugin-events-node/alpha';
import { createBackendModule } from '@backstage/backend-plugin-api';
/* highlight-add-end */
@@ -413,7 +413,7 @@ const eventsModuleCustomExtensions = createBackendModule({
events: eventsExtensionPoint,
// ... and other dependencies as needed
},
init({ events /* ..., other dependencies */ }) {
async init({ events /* ..., other dependencies */ }) {
// Here you have the opportunity to interact with the extension
// point before the plugin itself gets instantiated
events.addSubscribers(new MySubscriber()); // just an example
@@ -464,7 +464,7 @@ depends on the appropriate extension point and interacts with it.
```ts title="packages/backend/src/index.ts"
/* highlight-add-start */
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node';
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha';
import { createBackendModule } from '@backstage/backend-plugin-api';
/* highlight-add-end */
@@ -478,7 +478,7 @@ const scaffolderModuleCustomExtensions = createBackendModule({
scaffolder: scaffolderActionsExtensionPoint,
// ... and other dependencies as needed
},
init({ scaffolder /* ..., other dependencies */ }) {
async init({ scaffolder /* ..., other dependencies */ }) {
// Here you have the opportunity to interact with the extension
// point before the plugin itself gets instantiated
scaffolder.addActions(new MyAction()); // just an example
@@ -9,8 +9,8 @@ This section will guide you through how to:
- [Create a basic documentation setup](#create-a-basic-documentation-setup)
- [Use any software template](#use-any-software-template)
- [Use the documentation template](#use-the-documentation-template)
- [Enable documentation for an already existing entity](#enable-documentation-for-an-already-existing-entity)
- [Create a standalone documentation](#create-a-standalone-documentation)
- [Writing and previewing your documentation](#writing-and-previewing-your-documentation)
## Prerequisites
@@ -41,23 +41,6 @@ default, we highly recommend you to set that up. Follow our how-to guide
[How to add documentation setup to your software templates](./how-to-guides.md#how-to-add-the-documentation-setup-to-your-software-templates)
to get started.
### Use the documentation template
There could be _some_ situations where you don't want to keep your docs close to
your code, but still want to publish documentation - for example, an onboarding
tutorial. For this use case, we have put together a documentation template. Your
Backstage instance should by default have a documentation template added. If
not, copy the catalog locations from the
[create-app template](https://github.com/backstage/backstage/blob/master/packages/create-app/templates/default-app/app-config.yaml.hbs)
to add the documentation template. The template creates a component with
**only** TechDocs configuration and default markdown files, and is otherwise
empty.
![Documentation Template](../../assets/techdocs/documentation-template.png)
Create an entity from the documentation template and you will get the needed
setup for free.
### Enable documentation for an already existing entity
Prerequisites:
@@ -115,6 +98,56 @@ This is a basic example of documentation.
Commit your changes, open a pull request and merge. You will now get your
updated documentation next time you run Backstage!
### Create a standalone documentation
There could be _some_ situations where you don't want to keep your docs close to
your code, but still want to publish documentation - for example, an onboarding
tutorial. For this case, you can create a documentation component, which will be
published as a standalone part of TechDocs.
First, create an entity for your documentation. A minimal example could look like
this:
```yaml title="catalog-info.yaml"
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: a-unique-name-for-your-docs
annotations:
# this could also be `url:<url>` if the documentation isn't in the same location
backstage.io/techdocs-ref: dir:.
spec:
type: documentation
lifecycle: experimental
owner: user-or-team-name
```
Next, create the config file for [mkdocs](https://www.mkdocs.org/), which will be
used to parse your docs:
```yaml title="mkdocs.yml"
site_name: a-unique-name-for-your-docs
site_description: An informative description
plugins:
- techdocs-core
nav:
- Getting Started: index.md
```
Finally, add your index.md Markdown file, in a folder named `docs/` with your desired
documentation in Markdown. Your file structure should now look like this:
```
your-great-documentation/
docs/
index.md
catalog-info.yaml
mkdocs.yml
```
Last but not least, register your component in the software catalog using
[one of several options](../software-catalog/index.md#adding-components-to-the-catalog).
## Writing and previewing your documentation
Using the [techdocs-cli](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) you can
+12
View File
@@ -504,6 +504,18 @@ folder (/docs) or replace the content in this file.
Done! You now have support for TechDocs in your own software template!
### Prevent download of Google fonts
If your Backstage instance does not have internet access, the generation will fail. TechDocs tries to download the Roboto font from Google. You can disable it by adding the following lines to mkdocs.yaml:
```yaml
theme:
name: material
font: false
```
> Note: The addition `name: material` is necessary. Otherwise it will not work
## How to enable iframes in TechDocs
TechDocs uses the [DOMPurify](https://github.com/cure53/DOMPurify) library to
@@ -18,6 +18,10 @@ Each extensions has a number of different properties that define how it behaves
### ID
<!--
Update this to be 3 different sections: name, kind and namespace
-->
The ID of an extension is used to uniquely identity it, and it should ideally by unique across the entire Backstage ecosystem. For each frontend app instance there can only be a single extension for any given ID. Installing multiple extensions with the same ID will either result in an error or one of the extensions will override the others. The ID is also used to reference the extensions from other extensions, in configuration, and in other places such as developer tools and analytics.
### Output
@@ -85,20 +89,64 @@ TODO
## Extension Inputs
TODO
<!--
## Configuration
Introduce the concept of extension inputs and how they use extension data to reference types just like outputs
TODO
Show how to use the `createExtensionInput` API to create an input for an extension.
## Configuration Schema
- Example of creating a single input
TODO
Talk about different types of inputs, singleton vs array + optional vs required.
- Example of creating an optional singleton input - not the value is no longer an array
Talk about the shape of the input values and that you have access to the AppNode node in addition to the data, but discourage use of AppNode.
- Example of how to access the AppNode next to the input data
-->
## Extension Configuration
<!--
Introduce the concept of extension configuration, highlight that it's different from app config
Show how to define a configuration schema for an extension, talk about it using zod (link to zod), in general explain everything there is to know about the schema
- Example that creates a configuration schema for an extension
Show how to provide configuration for an extension - keep this part short, and instead link to the architecture section that talks about writing configuration
- One example of a YAML configurations for the above extension
-->
## Extension Creators
TODO
<!--
Introduce the concept of extension creators, talk about how they are used to provide an opinionated way of creating extensions for specific use cases. Mention a few of the built-in creators, link to the reference section on built-in extension kinds (TBD).
- Example of using an existing extension creator to create an extension
Explain that each extension creator creates a specific "kind" of extensions - introduce the concept of extension kinds. Show an example of how the kind is used to build up the ID.
- Example of creating a new extension creator for creating a specific kind of extension
Explain that extension creators should be exported from library packages (`-react`) rather than plugin packages.
-->
## Extension Boundary
TODO
<!--
Introduce the need for extension specific React contexts, for example error boundaries and analytics.
Any React elements that are rendered by extension creators should be wrapped in the `ExtensionBoundary`
- Example of how to use the `ExtensionBoundary` in an extension creator
-->
@@ -7,3 +7,87 @@ description: Frontend plugins
---
> **NOTE: The new frontend system is in a highly experimental phase**
## Introduction
<!--
Introduce frontend plugins and how each of them is shipped as a separate package. Highlight that each package should only export a single plugin instance.
-->
## Creating a Plugin
<!--
How to create a simple plugin
-->
```ts
export const myPlugin = createPlugin({
id: 'my-plugin',
});
```
<!--
Note that this plugin is useless in itself, and you need to provide extra options to make it useful, in particular extensions.
-->
### Plugin ID
<!--
link to relevant docs
-->
### Plugin Extensions
<!--
- Example of how this option is used in `createPlugin`
link to relevant docs
-->
### Plugin Routes
<!--
- Example of how this option is used in `createPlugin`
link to relevant docs
-->
### Plugin External Routes
<!--
- Example of how this option is used in `createPlugin`
link to relevant docs
-->
### Plugin Feature Flags
<!--
- Example of how this option is used in `createPlugin`
link to relevant docs
-->
## Installing a Plugin in an App
<!--
Quick intro, but link back to app docs for more details
-->
@@ -7,3 +7,41 @@ description: Frontend extension overrides
---
> **NOTE: The new frontend system is in a highly experimental phase**
## Introduction
<!--
Introduce extension overrides and how they can be shipped in separate packages but also internally within a project too.
Talk about how extension overrides
-->
## Creating a Extension Override
<!--
How to create an extension override and export it from a package.A
- Example using the default exports
You can also create them directly withing the app for local overrides.
- Example of installing an override directly into an app
Mention that in can still be a good idea to split your overrides out into separate packages in large projects. But it's up to you to decide how to group the extensions into extension overrides.
-->
## Overriding Existing Extensions
<!--
To override an existing extension you need to provide an extension through an extension override that has the same ID as the existing extension. That is, all of kind, namespace and name must match the extension you want to override.
This means that you typically need to provide an explicit namespace when overriding extensions from a plugin.
- Example of how to create an extension override for an existing extension from some plugin
-->
@@ -9,3 +9,142 @@ description: Frontend routes
> **NOTE: The new frontend system is in a highly experimental phase**
See [routing system docs](../../plugins/composability.md#routing-system)
## Introduction
<!--
Routing system of backstage - what's the prupose
Explain the indirection needed to route between plugins. For example what do we do if plugin A want to link to plugin B, but plugin B is not installed? How can we support this in an app?
How can we let an integrator decice whether plugin A should link to plugin B or plugin C? (with some good real-work examples, e.g. catalog -> scaffolder create page / catalog-import plugin)
-->
## Route References
<!--
Explain what a route reference is - then explain how it solves the problem outlined above.
Explain that we use route references to represent a path in an app. Each referenced path is unique for each app, but in different apps the same route ref might point to different paths.
-->
### Creating a Route Reference
<!--
Example using `createRouteRef` + passing it to a page extension
-->
### Using a Route Reference
<!--
Example using `useRouteRef` in a component
-->
### Route Path Parameters
<!--
Example using path parameters, both createRouteRef and useRouteRef
-->
### Providing Route References to Plugins
<!--
Show how to provide routes through createPlugin({ routes: })
-->
## External Router References
<!--
Explain the need for external route refs
Explain all of create, use and provide
-->
### Binding External Route References
<!--
Example using `createApp`
Example using config
-->
### Optional External Route References
<!--
Talk about how external routes must be bound or app will crash, but you can make them optional too
useRouteRef can return undefined for optional external routes
-->
## Sub Route References
<!--
Explain the need for external route refs - both as a tool for routing within a plugin, but also allow external routes to point to sub routes
Talk about how sub routes declare an explicit path - can't be decided by the app/integrator. They are hard-coded in the plugin in parallel to the internal routing structure of the plugin itself.
Explain all of create, use and provide
-->
```ts
/*
Some examples
export const indexPageRouteRef = createRouteRef()
export const catalogPlugin = createPlugin({
id: 'catalog,
routes: {
index: indexPageRouteRef,
},
})
// in catalog plugin
import {indexPageRouteRef} from '../../routes
const link = useRouteRef(indexPageRouteRef)
// scaffolder
export const catalogIndexPageRouteRef = createExternalRouteRef({
defaultTarget: 'catalog/index',
})
export const scaffolderPlugin = createPlugin({
id: 'scaffolder,
externalRoutes: {
catalogIndex: catalogIndexPageRouteRef,
},
})
import {catalogIndexPageRouteRef} from '../../routes
const link = useRouteRef(catalogIndexPageRouteRef)
// app
import {catalogPlugin} from '@backstage/plugin-catalog'
const app = createApp({
bindRoutes({bind}) {
bind(scaffolderPlugin, {
catalogIndex: catalogPlugin.routes.index,
})
},
})
*/
```
@@ -0,0 +1,17 @@
---
id: references
title: Value References
sidebar_label: Value References
# prettier-ignore
description: Value References
---
> **NOTE: The new frontend system is in a highly experimental phase**
<!--
Describe the generic concept of references as used for ApiRef, ExtensionDataRef, RouteRef, ComponentRef, etc.
Talk about the usage and how helper functions allows type-safe access to the values that the references represent.
-->
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+69
View File
@@ -0,0 +1,69 @@
---
id: setup-opentelemetry
title: Setup OpenTelemetry
description: Tutorial to setup OpenTelemetry metrics and traces exporters in Backstage
---
Backstage uses [OpenTelemetery](https://opentelemetry.io/) to instrument its components by reporting traces and metrics.
This tutorial shows how to setup exporters in your Backstage backend package. For demonstration purposes we will use the simple console exporters.
## Install dependencies
We will use the OpenTelemetry Node SDK and the `auto-instrumentations-node` packages.
Backstage packages, such as the catalog, uses the OpenTelemetry API to send custom traces and metrics.
The `auto-instrumentations-node` will automatically create spans for code called in libraries like Express.
```bash
yarn --cwd packages/backend add @opentelemetry/sdk-node \
@opentelemetry/auto-instrumentations-node \
@opentelemetry/sdk-metrics
```
## Configure
In your `packages/backend/src` folder, create an `instrumentation.ts` file.
```typescript
import { NodeSDK } from '@opentelemetry/sdk-node';
import { ConsoleSpanExporter } from '@opentelemetry/sdk-trace-node';
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
import {
PeriodicExportingMetricReader,
ConsoleMetricExporter,
} from '@opentelemetry/sdk-metrics';
const sdk = new NodeSDK({
traceExporter: new ConsoleSpanExporter(),
metricReader: new PeriodicExportingMetricReader({
exporter: new ConsoleMetricExporter(),
}),
instrumentations: [getNodeAutoInstrumentations()],
});
sdk.start();
```
In the `index.ts`, import this file **at the beginning**:
```typescript
import './instrumentation'; // Setup the OpenTelemetry instrumentation
// other imports and backend init...
```
It's important to setup the NodeSDK and the automatic instrumentation **before** importing any library.
## Run Backstage
You can now start your Backstage instance as usual, using `yarn dev`.
When the backend is started, you should see in your console traces and metrics emitted by OpenTelemetry.
Of course in production you probably won't use the console exporters but instead send traces and metrics to an OpenTelemetry Collector using [OTLP exporters](https://opentelemetry.io/docs/instrumentation/js/exporters/).
## References
- [Getting started with OpenTelemetry Node.js](https://opentelemetry.io/docs/instrumentation/js/getting-started/nodejs/)
- [OpenTelemetry NodeSDK API](https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_sdk_node.NodeSDK.html)
@@ -3,8 +3,8 @@ title: Jira Dashboard
author: AxisCommunications
authorUrl: https://github.com/AxisCommunications
category: Agile Planning
description: Allows you to fetch and display Jira issues for your entity. You get quickly access to issue summaries to achieve better task visibility and more efficient project management.
description: Allows you to fetch and display Jira issues for your entity. You get quickly access to issue summaries to achieve better task visibility and more efficient project management.
documentation: https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/jira-dashboard/README.md
iconUrl: https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/jira-dashboard/media/jira-logo.png
iconUrl: https://raw.githubusercontent.com/AxisCommunications/backstage-plugins/main/plugins/jira-dashboard/media/jira-logo.png
npmPackageName: '@axis-backstage/plugin-jira-dashboard'
addedDate: '2023-11-29'
addedDate: '2023-12-07'
+10
View File
@@ -0,0 +1,10 @@
---
title: OpenDORA
author: Devoteam
authorUrl: https://www.devoteam.com/
category: Monitoring
description: View DORA metrics within Backstage using DevLake.
documentation: https://github.com/DevoteamNL/opendora/tree/main/backstage-plugin/plugins/open-dora#readme
iconUrl: /img/open-dora-icon.png
npmPackageName: '@devoteam-nl/open-dora-backstage-plugin'
addedDate: '2023-11-29'
+10
View File
@@ -0,0 +1,10 @@
---
title: Readme
author: AxisCommunications
authorUrl: https://github.com/AxisCommunications
category: Metadata
description: The Readme-plugin enables easy access and viewing of the README.md file in your entity overview.
documentation: https://github.com/AxisCommunications/backstage-plugins/blob/main/plugins/readme/README.md
iconUrl: https://raw.githubusercontent.com/AxisCommunications/backstage-plugins/main/plugins/readme/media/readme.png
npmPackageName: '@axis-backstage/plugin-readme'
addedDate: '2023-12-07'
+1 -1
View File
@@ -33,7 +33,7 @@
"@docusaurus/plugin-client-redirects": "0.0.0-5703",
"@docusaurus/preset-classic": "0.0.0-5703",
"@swc/core": "^1.3.46",
"clsx": "^1.1.1",
"clsx": "^2.0.0",
"docusaurus-plugin-sass": "^0.2.3",
"luxon": "^3.0.0",
"prism-react-renderer": "^1.3.5",
+2 -1
View File
@@ -409,7 +409,8 @@
"tutorials/switching-sqlite-postgres",
"tutorials/using-backstage-proxy-within-plugin",
"tutorials/yarn-migration",
"tutorials/migrate-to-mui5"
"tutorials/migrate-to-mui5",
"tutorials/setup-opentelemetry"
],
"Architecture Decision Records (ADRs)": [
"architecture-decisions/adrs-overview",
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

+51 -44
View File
@@ -2701,82 +2701,82 @@ __metadata:
languageName: node
linkType: hard
"@swc/core-darwin-arm64@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-darwin-arm64@npm:1.3.99"
"@swc/core-darwin-arm64@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-darwin-arm64@npm:1.3.100"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@swc/core-darwin-x64@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-darwin-x64@npm:1.3.99"
"@swc/core-darwin-x64@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-darwin-x64@npm:1.3.100"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@swc/core-linux-arm64-gnu@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.99"
"@swc/core-linux-arm64-gnu@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-linux-arm64-gnu@npm:1.3.100"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-arm64-musl@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-linux-arm64-musl@npm:1.3.99"
"@swc/core-linux-arm64-musl@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-linux-arm64-musl@npm:1.3.100"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@swc/core-linux-x64-gnu@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-linux-x64-gnu@npm:1.3.99"
"@swc/core-linux-x64-gnu@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-linux-x64-gnu@npm:1.3.100"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@swc/core-linux-x64-musl@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-linux-x64-musl@npm:1.3.99"
"@swc/core-linux-x64-musl@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-linux-x64-musl@npm:1.3.100"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@swc/core-win32-arm64-msvc@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.99"
"@swc/core-win32-arm64-msvc@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-win32-arm64-msvc@npm:1.3.100"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@swc/core-win32-ia32-msvc@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.99"
"@swc/core-win32-ia32-msvc@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-win32-ia32-msvc@npm:1.3.100"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@swc/core-win32-x64-msvc@npm:1.3.99":
version: 1.3.99
resolution: "@swc/core-win32-x64-msvc@npm:1.3.99"
"@swc/core-win32-x64-msvc@npm:1.3.100":
version: 1.3.100
resolution: "@swc/core-win32-x64-msvc@npm:1.3.100"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@swc/core@npm:^1.3.46":
version: 1.3.99
resolution: "@swc/core@npm:1.3.99"
version: 1.3.100
resolution: "@swc/core@npm:1.3.100"
dependencies:
"@swc/core-darwin-arm64": 1.3.99
"@swc/core-darwin-x64": 1.3.99
"@swc/core-linux-arm64-gnu": 1.3.99
"@swc/core-linux-arm64-musl": 1.3.99
"@swc/core-linux-x64-gnu": 1.3.99
"@swc/core-linux-x64-musl": 1.3.99
"@swc/core-win32-arm64-msvc": 1.3.99
"@swc/core-win32-ia32-msvc": 1.3.99
"@swc/core-win32-x64-msvc": 1.3.99
"@swc/core-darwin-arm64": 1.3.100
"@swc/core-darwin-x64": 1.3.100
"@swc/core-linux-arm64-gnu": 1.3.100
"@swc/core-linux-arm64-musl": 1.3.100
"@swc/core-linux-x64-gnu": 1.3.100
"@swc/core-linux-x64-musl": 1.3.100
"@swc/core-win32-arm64-msvc": 1.3.100
"@swc/core-win32-ia32-msvc": 1.3.100
"@swc/core-win32-x64-msvc": 1.3.100
"@swc/counter": ^0.1.1
"@swc/types": ^0.1.5
peerDependencies:
@@ -2803,7 +2803,7 @@ __metadata:
peerDependenciesMeta:
"@swc/helpers":
optional: true
checksum: a4d51e650913045fe3100195b053dafb55dc06fcadd4a9381712c64f09a75d548596bb1a96e8ed84ba0199f701e821a381a25db82c1016cdd731e0077a83192e
checksum: b68553db388c36b1859f0e8b5231a608277e17ae7fd7a928ea8b448432532176914f84675426d40aa9710617b2e7fb626aaa8358b6b2506b3c43f82db725c41e
languageName: node
linkType: hard
@@ -3045,9 +3045,9 @@ __metadata:
linkType: hard
"@types/luxon@npm:^3.0.0":
version: 3.3.6
resolution: "@types/luxon@npm:3.3.6"
checksum: 44fd3e617fb5d9e370a8d5529de3e703b295bfe225936e786e0b5e7fce662ef82012a6ec29cd2763afbd59bf9a9ab43186bad5c51aa552d963cd5e8c8f4e1d4f
version: 3.3.7
resolution: "@types/luxon@npm:3.3.7"
checksum: 97026557e92bcba308a5592f981591cd200d493fc8997874d79acecf6a2ec41debeded3ac5cd80c371ef7f6f56cc0d1be0a5aca846e03d3e6b4a2be37256fe2f
languageName: node
linkType: hard
@@ -3887,7 +3887,7 @@ __metadata:
"@tsconfig/docusaurus": ^2.0.0
"@types/luxon": ^3.0.0
"@types/webpack-env": ^1.18.0
clsx: ^1.1.1
clsx: ^2.0.0
docusaurus-plugin-sass: ^0.2.3
js-yaml: ^4.1.0
luxon: ^3.0.0
@@ -4365,13 +4365,20 @@ __metadata:
languageName: node
linkType: hard
"clsx@npm:^1.1.1, clsx@npm:^1.2.1":
"clsx@npm:^1.2.1":
version: 1.2.1
resolution: "clsx@npm:1.2.1"
checksum: 30befca8019b2eb7dbad38cff6266cf543091dae2825c856a62a8ccf2c3ab9c2907c4d12b288b73101196767f66812365400a227581484a05f968b0307cfaf12
languageName: node
linkType: hard
"clsx@npm:^2.0.0":
version: 2.0.0
resolution: "clsx@npm:2.0.0"
checksum: a2cfb2351b254611acf92faa0daf15220f4cd648bdf96ce369d729813b85336993871a4bf6978ddea2b81b5a130478339c20d9d0b5c6fc287e5147f0c059276e
languageName: node
linkType: hard
"color-convert@npm:^1.9.0":
version: 1.9.3
resolution: "color-convert@npm:1.9.3"
+1
View File
@@ -194,6 +194,7 @@ nav:
- Using the Backstage Proxy from Within a Plugin: 'tutorials/using-backstage-proxy-within-plugin.md'
- Migration to Yarn 3: 'tutorials/yarn-migration.md'
- Migration to Material UI v5: 'tutorials/migrate-to-mui5.md'
- Setup OpenTelemetry: 'tutorials/setup-opentelemetry.md'
- Architecture Decision Records (ADRs):
- Overview: 'architecture-decisions/index.md'
- ADR001 - Architecture Decision Record (ADR) log: 'architecture-decisions/adr001-add-adr-log.md'
+1 -1
View File
@@ -54,7 +54,7 @@
"@material-ui/pickers@^3.3.10": "patch:@material-ui/pickers@npm%3A3.3.11#./.yarn/patches/@material-ui-pickers-npm-3.3.11-1c8f68ea20.patch",
"@material-ui/pickers@^3.2.10": "patch:@material-ui/pickers@npm%3A3.3.11#./.yarn/patches/@material-ui-pickers-npm-3.3.11-1c8f68ea20.patch"
},
"version": "1.21.0-next.2",
"version": "1.21.0-next.4",
"dependencies": {
"@backstage/errors": "workspace:^",
"@manypkg/get-packages": "^1.1.3",
+22
View File
@@ -1,5 +1,27 @@
# @backstage/app-defaults
## 1.4.6-next.3
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.13.9-next.3
- @backstage/core-app-api@1.11.2-next.1
- @backstage/core-plugin-api@1.8.1-next.1
- @backstage/theme@0.5.0-next.1
- @backstage/plugin-permission-react@0.4.18-next.1
## 1.4.6-next.2
### Patch Changes
- Updated dependencies
- @backstage/theme@0.5.0-next.1
- @backstage/core-app-api@1.11.2-next.1
- @backstage/core-components@0.13.9-next.2
- @backstage/core-plugin-api@1.8.1-next.1
- @backstage/plugin-permission-react@0.4.18-next.1
## 1.4.6-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/app-defaults",
"description": "Provides the default wiring of a Backstage App",
"version": "1.4.6-next.1",
"version": "1.4.6-next.3",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
@@ -1,5 +1,21 @@
# app-next-example-plugin
## 0.0.4-next.3
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.13.9-next.3
- @backstage/frontend-plugin-api@0.4.0-next.3
## 0.0.4-next.2
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.4.0-next.2
- @backstage/core-components@0.13.9-next.2
## 0.0.4-next.1
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "app-next-example-plugin",
"description": "Backstage internal example plugin",
"version": "0.0.4-next.1",
"version": "0.0.4-next.3",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
+152
View File
@@ -1,5 +1,157 @@
# example-app-next
## 0.0.4-next.4
### Patch Changes
- Updated dependencies
- @backstage/plugin-home@0.6.0-next.3
- @backstage/plugin-org@0.6.18-next.3
- @backstage/plugin-azure-devops@0.3.10-next.3
- @backstage/cli@0.25.0-next.3
- @backstage/plugin-api-docs@0.10.2-next.4
- @backstage/plugin-scaffolder-react@1.6.2-next.3
- @backstage/plugin-scaffolder@1.16.2-next.3
- @backstage/core-components@0.13.9-next.3
- @backstage/app-defaults@1.4.6-next.3
- app-next-example-plugin@0.0.4-next.3
- @backstage/catalog-model@1.4.3
- @backstage/config@1.1.1
- @backstage/core-app-api@1.11.2-next.1
- @backstage/core-compat-api@0.1.0-next.3
- @backstage/core-plugin-api@1.8.1-next.1
- @backstage/frontend-app-api@0.4.0-next.3
- @backstage/frontend-plugin-api@0.4.0-next.3
- @backstage/integration-react@1.1.22-next.1
- @backstage/theme@0.5.0-next.1
- @backstage/plugin-adr@0.6.11-next.3
- @backstage/plugin-airbrake@0.3.28-next.3
- @backstage/plugin-apache-airflow@0.2.18-next.3
- @backstage/plugin-azure-sites@0.1.17-next.3
- @backstage/plugin-badges@0.2.52-next.3
- @backstage/plugin-catalog@1.16.0-next.4
- @backstage/plugin-catalog-common@1.0.18
- @backstage/plugin-catalog-graph@0.3.2-next.3
- @backstage/plugin-catalog-import@0.10.4-next.4
- @backstage/plugin-catalog-react@1.9.2-next.3
- @backstage/plugin-catalog-unprocessed-entities@0.1.6-next.3
- @backstage/plugin-cloudbuild@0.3.28-next.3
- @backstage/plugin-code-coverage@0.2.21-next.3
- @backstage/plugin-cost-insights@0.12.17-next.3
- @backstage/plugin-devtools@0.1.7-next.3
- @backstage/plugin-dynatrace@8.0.2-next.3
- @backstage/plugin-entity-feedback@0.2.11-next.3
- @backstage/plugin-explore@0.4.14-next.3
- @backstage/plugin-gcalendar@0.3.21-next.3
- @backstage/plugin-gcp-projects@0.3.44-next.3
- @backstage/plugin-github-actions@0.6.9-next.3
- @backstage/plugin-gocd@0.1.34-next.3
- @backstage/plugin-graphiql@0.3.1-next.4
- @backstage/plugin-jenkins@0.9.3-next.3
- @backstage/plugin-kafka@0.3.28-next.3
- @backstage/plugin-kubernetes@0.11.3-next.3
- @backstage/plugin-lighthouse@0.4.13-next.3
- @backstage/plugin-linguist@0.1.13-next.3
- @backstage/plugin-linguist-common@0.1.2
- @backstage/plugin-microsoft-calendar@0.1.10-next.3
- @backstage/plugin-newrelic@0.3.43-next.3
- @backstage/plugin-newrelic-dashboard@0.3.3-next.3
- @backstage/plugin-octopus-deploy@0.2.10-next.3
- @backstage/plugin-pagerduty@0.7.0-next.3
- @backstage/plugin-permission-react@0.4.18-next.1
- @backstage/plugin-playlist@0.2.2-next.3
- @backstage/plugin-puppetdb@0.1.11-next.3
- @backstage/plugin-rollbar@0.4.28-next.3
- @backstage/plugin-search@1.4.4-next.4
- @backstage/plugin-search-common@1.2.8
- @backstage/plugin-search-react@1.7.4-next.3
- @backstage/plugin-sentry@0.5.13-next.3
- @backstage/plugin-shortcuts@0.3.17-next.3
- @backstage/plugin-stackstorm@0.1.9-next.3
- @backstage/plugin-tech-insights@0.3.20-next.3
- @backstage/plugin-tech-radar@0.6.11-next.4
- @backstage/plugin-techdocs@1.9.2-next.4
- @backstage/plugin-techdocs-module-addons-contrib@1.1.3-next.3
- @backstage/plugin-techdocs-react@1.1.14-next.3
- @backstage/plugin-todo@0.2.32-next.3
- @backstage/plugin-user-settings@0.7.14-next.4
## 0.0.4-next.3
### Patch Changes
- Updated dependencies
- @backstage/frontend-plugin-api@0.4.0-next.2
- @backstage/frontend-app-api@0.4.0-next.2
- @backstage/cli@0.25.0-next.2
- @backstage/theme@0.5.0-next.1
- @backstage/plugin-kubernetes@0.11.3-next.2
- @backstage/core-compat-api@0.1.0-next.2
- @backstage/plugin-lighthouse@0.4.13-next.2
- @backstage/plugin-catalog-import@0.10.4-next.3
- @backstage/plugin-user-settings@0.7.14-next.3
- @backstage/plugin-tech-radar@0.6.11-next.3
- @backstage/plugin-graphiql@0.3.1-next.3
- @backstage/plugin-techdocs@1.9.2-next.3
- @backstage/plugin-catalog@1.16.0-next.3
- @backstage/plugin-search@1.4.4-next.3
- @backstage/plugin-home@0.6.0-next.2
- @backstage/plugin-catalog-react@1.9.2-next.2
- @backstage/plugin-search-react@1.7.4-next.2
- @backstage/plugin-explore@0.4.14-next.2
- @backstage/plugin-adr@0.6.11-next.2
- @backstage/plugin-scaffolder-react@1.6.2-next.2
- app-next-example-plugin@0.0.4-next.2
- @backstage/app-defaults@1.4.6-next.2
- @backstage/catalog-model@1.4.3
- @backstage/config@1.1.1
- @backstage/core-app-api@1.11.2-next.1
- @backstage/core-components@0.13.9-next.2
- @backstage/core-plugin-api@1.8.1-next.1
- @backstage/integration-react@1.1.22-next.1
- @backstage/plugin-airbrake@0.3.28-next.2
- @backstage/plugin-apache-airflow@0.2.18-next.2
- @backstage/plugin-api-docs@0.10.2-next.3
- @backstage/plugin-azure-devops@0.3.10-next.2
- @backstage/plugin-azure-sites@0.1.17-next.2
- @backstage/plugin-badges@0.2.52-next.2
- @backstage/plugin-catalog-common@1.0.18
- @backstage/plugin-catalog-graph@0.3.2-next.2
- @backstage/plugin-catalog-unprocessed-entities@0.1.6-next.2
- @backstage/plugin-cloudbuild@0.3.28-next.2
- @backstage/plugin-code-coverage@0.2.21-next.2
- @backstage/plugin-cost-insights@0.12.17-next.2
- @backstage/plugin-devtools@0.1.7-next.2
- @backstage/plugin-dynatrace@8.0.2-next.2
- @backstage/plugin-entity-feedback@0.2.11-next.2
- @backstage/plugin-gcalendar@0.3.21-next.2
- @backstage/plugin-gcp-projects@0.3.44-next.2
- @backstage/plugin-github-actions@0.6.9-next.2
- @backstage/plugin-gocd@0.1.34-next.2
- @backstage/plugin-jenkins@0.9.3-next.2
- @backstage/plugin-kafka@0.3.28-next.2
- @backstage/plugin-linguist@0.1.13-next.2
- @backstage/plugin-linguist-common@0.1.2
- @backstage/plugin-microsoft-calendar@0.1.10-next.2
- @backstage/plugin-newrelic@0.3.43-next.2
- @backstage/plugin-newrelic-dashboard@0.3.3-next.2
- @backstage/plugin-octopus-deploy@0.2.10-next.2
- @backstage/plugin-org@0.6.18-next.2
- @backstage/plugin-pagerduty@0.7.0-next.2
- @backstage/plugin-permission-react@0.4.18-next.1
- @backstage/plugin-playlist@0.2.2-next.2
- @backstage/plugin-puppetdb@0.1.11-next.2
- @backstage/plugin-rollbar@0.4.28-next.2
- @backstage/plugin-scaffolder@1.16.2-next.2
- @backstage/plugin-search-common@1.2.8
- @backstage/plugin-sentry@0.5.13-next.2
- @backstage/plugin-shortcuts@0.3.17-next.2
- @backstage/plugin-stackstorm@0.1.9-next.2
- @backstage/plugin-tech-insights@0.3.20-next.2
- @backstage/plugin-techdocs-module-addons-contrib@1.1.3-next.2
- @backstage/plugin-techdocs-react@1.1.14-next.2
- @backstage/plugin-todo@0.2.32-next.2
## 0.0.4-next.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app-next",
"version": "0.0.4-next.2",
"version": "0.0.4-next.4",
"private": true,
"backstage": {
"role": "frontend"
+3 -10
View File
@@ -17,7 +17,7 @@
import React from 'react';
import { createApp } from '@backstage/frontend-app-api';
import { pagesPlugin } from './examples/pagesPlugin';
import { CustomNotFoundErrorPage } from './examples/notFoundErrorPageExtension';
import notFoundErrorPage from './examples/notFoundErrorPageExtension';
import graphiqlPlugin from '@backstage/plugin-graphiql/alpha';
import techRadarPlugin from '@backstage/plugin-tech-radar/alpha';
import userSettingsPlugin from '@backstage/plugin-user-settings/alpha';
@@ -33,10 +33,7 @@ import {
} from '@backstage/frontend-plugin-api';
import techdocsPlugin from '@backstage/plugin-techdocs/alpha';
import { homePage } from './HomePage';
import {
collectLegacyComponents,
collectLegacyRoutes,
} from '@backstage/core-compat-api';
import { collectLegacyRoutes } from '@backstage/core-compat-api';
import { FlatRoutes } from '@backstage/core-app-api';
import { Route } from 'react-router';
import { CatalogImportPage } from '@backstage/plugin-catalog-import';
@@ -118,10 +115,6 @@ const collectedLegacyPlugins = collectLegacyRoutes(
</FlatRoutes>,
);
const legacyAppComponents = collectLegacyComponents({
NotFoundErrorPage: CustomNotFoundErrorPage,
});
const app = createApp({
features: [
graphiqlPlugin,
@@ -137,7 +130,7 @@ const app = createApp({
scmAuthExtension,
scmIntegrationApi,
signInPage,
...legacyAppComponents,
notFoundErrorPage,
],
}),
],
@@ -17,7 +17,7 @@
import React from 'react';
import {
createComponentExtension,
coreComponentsRefs,
coreComponentRefs,
} from '@backstage/frontend-plugin-api';
import { Box, Typography } from '@material-ui/core';
import { Button } from '@backstage/core-components';
@@ -36,15 +36,9 @@ export function CustomNotFoundErrorPage() {
>
<Typography variant="h1">404</Typography>
<Typography color="textSecondary" paragraph style={{ width: 300 }}>
Bowie was unable to locate this page. Please contact your support team
if this page used to exist.
Unable to locate this page. Please contact your support team if this
page used to exist.
</Typography>
<img
alt="Backstage bowie"
src="https://info.backstage.spotify.com/hs-fs/hubfs/Call%20Bowie%202.png"
width="200"
style={{ filter: 'grayscale(50%)' }}
/>
<Button
variant="contained"
to="/"
@@ -57,6 +51,6 @@ export function CustomNotFoundErrorPage() {
}
export default createComponentExtension({
ref: coreComponentsRefs.notFoundErrorPage,
ref: coreComponentRefs.notFoundErrorPage,
component: { sync: () => CustomNotFoundErrorPage },
});
+152
View File
@@ -1,5 +1,157 @@
# example-app
## 0.2.90-next.4
### Patch Changes
- Updated dependencies
- @backstage/plugin-home@0.6.0-next.3
- @backstage/plugin-org@0.6.18-next.3
- @backstage/plugin-azure-devops@0.3.10-next.3
- @backstage/cli@0.25.0-next.3
- @backstage/plugin-api-docs@0.10.2-next.4
- @backstage/plugin-scaffolder-react@1.6.2-next.3
- @backstage/plugin-scaffolder@1.16.2-next.3
- @backstage/core-components@0.13.9-next.3
- @backstage/app-defaults@1.4.6-next.3
- @backstage/catalog-model@1.4.3
- @backstage/config@1.1.1
- @backstage/core-app-api@1.11.2-next.1
- @backstage/core-plugin-api@1.8.1-next.1
- @backstage/frontend-app-api@0.4.0-next.3
- @backstage/integration-react@1.1.22-next.1
- @backstage/theme@0.5.0-next.1
- @backstage/plugin-adr@0.6.11-next.3
- @backstage/plugin-airbrake@0.3.28-next.3
- @backstage/plugin-apache-airflow@0.2.18-next.3
- @backstage/plugin-azure-sites@0.1.17-next.3
- @backstage/plugin-badges@0.2.52-next.3
- @backstage/plugin-catalog@1.16.0-next.4
- @backstage/plugin-catalog-common@1.0.18
- @backstage/plugin-catalog-graph@0.3.2-next.3
- @backstage/plugin-catalog-import@0.10.4-next.4
- @backstage/plugin-catalog-react@1.9.2-next.3
- @backstage/plugin-catalog-unprocessed-entities@0.1.6-next.3
- @backstage/plugin-cloudbuild@0.3.28-next.3
- @backstage/plugin-code-coverage@0.2.21-next.3
- @backstage/plugin-cost-insights@0.12.17-next.3
- @backstage/plugin-devtools@0.1.7-next.3
- @backstage/plugin-dynatrace@8.0.2-next.3
- @backstage/plugin-entity-feedback@0.2.11-next.3
- @backstage/plugin-explore@0.4.14-next.3
- @backstage/plugin-gcalendar@0.3.21-next.3
- @backstage/plugin-gcp-projects@0.3.44-next.3
- @backstage/plugin-github-actions@0.6.9-next.3
- @backstage/plugin-gocd@0.1.34-next.3
- @backstage/plugin-graphiql@0.3.1-next.4
- @backstage/plugin-jenkins@0.9.3-next.3
- @backstage/plugin-kafka@0.3.28-next.3
- @backstage/plugin-kubernetes@0.11.3-next.3
- @backstage/plugin-kubernetes-cluster@0.0.4-next.3
- @backstage/plugin-lighthouse@0.4.13-next.3
- @backstage/plugin-linguist@0.1.13-next.3
- @backstage/plugin-linguist-common@0.1.2
- @backstage/plugin-microsoft-calendar@0.1.10-next.3
- @backstage/plugin-newrelic@0.3.43-next.3
- @backstage/plugin-newrelic-dashboard@0.3.3-next.3
- @backstage/plugin-nomad@0.1.9-next.3
- @backstage/plugin-octopus-deploy@0.2.10-next.3
- @backstage/plugin-pagerduty@0.7.0-next.3
- @backstage/plugin-permission-react@0.4.18-next.1
- @backstage/plugin-playlist@0.2.2-next.3
- @backstage/plugin-puppetdb@0.1.11-next.3
- @backstage/plugin-rollbar@0.4.28-next.3
- @backstage/plugin-search@1.4.4-next.4
- @backstage/plugin-search-common@1.2.8
- @backstage/plugin-search-react@1.7.4-next.3
- @backstage/plugin-sentry@0.5.13-next.3
- @backstage/plugin-shortcuts@0.3.17-next.3
- @backstage/plugin-stack-overflow@0.1.23-next.3
- @backstage/plugin-stackstorm@0.1.9-next.3
- @backstage/plugin-tech-insights@0.3.20-next.3
- @backstage/plugin-tech-radar@0.6.11-next.4
- @backstage/plugin-techdocs@1.9.2-next.4
- @backstage/plugin-techdocs-module-addons-contrib@1.1.3-next.3
- @backstage/plugin-techdocs-react@1.1.14-next.3
- @backstage/plugin-todo@0.2.32-next.3
- @backstage/plugin-user-settings@0.7.14-next.4
## 0.2.90-next.3
### Patch Changes
- Updated dependencies
- @backstage/frontend-app-api@0.4.0-next.2
- @backstage/cli@0.25.0-next.2
- @backstage/theme@0.5.0-next.1
- @backstage/plugin-kubernetes@0.11.3-next.2
- @backstage/plugin-lighthouse@0.4.13-next.2
- @backstage/plugin-catalog-import@0.10.4-next.3
- @backstage/plugin-user-settings@0.7.14-next.3
- @backstage/plugin-tech-radar@0.6.11-next.3
- @backstage/plugin-graphiql@0.3.1-next.3
- @backstage/plugin-techdocs@1.9.2-next.3
- @backstage/plugin-catalog@1.16.0-next.3
- @backstage/plugin-search@1.4.4-next.3
- @backstage/plugin-home@0.6.0-next.2
- @backstage/plugin-catalog-react@1.9.2-next.2
- @backstage/plugin-stack-overflow@0.1.23-next.2
- @backstage/plugin-search-react@1.7.4-next.2
- @backstage/plugin-explore@0.4.14-next.2
- @backstage/plugin-adr@0.6.11-next.2
- @backstage/plugin-scaffolder-react@1.6.2-next.2
- @backstage/app-defaults@1.4.6-next.2
- @backstage/catalog-model@1.4.3
- @backstage/config@1.1.1
- @backstage/core-app-api@1.11.2-next.1
- @backstage/core-components@0.13.9-next.2
- @backstage/core-plugin-api@1.8.1-next.1
- @backstage/integration-react@1.1.22-next.1
- @backstage/plugin-airbrake@0.3.28-next.2
- @backstage/plugin-apache-airflow@0.2.18-next.2
- @backstage/plugin-api-docs@0.10.2-next.3
- @backstage/plugin-azure-devops@0.3.10-next.2
- @backstage/plugin-azure-sites@0.1.17-next.2
- @backstage/plugin-badges@0.2.52-next.2
- @backstage/plugin-catalog-common@1.0.18
- @backstage/plugin-catalog-graph@0.3.2-next.2
- @backstage/plugin-catalog-unprocessed-entities@0.1.6-next.2
- @backstage/plugin-cloudbuild@0.3.28-next.2
- @backstage/plugin-code-coverage@0.2.21-next.2
- @backstage/plugin-cost-insights@0.12.17-next.2
- @backstage/plugin-devtools@0.1.7-next.2
- @backstage/plugin-dynatrace@8.0.2-next.2
- @backstage/plugin-entity-feedback@0.2.11-next.2
- @backstage/plugin-gcalendar@0.3.21-next.2
- @backstage/plugin-gcp-projects@0.3.44-next.2
- @backstage/plugin-github-actions@0.6.9-next.2
- @backstage/plugin-gocd@0.1.34-next.2
- @backstage/plugin-jenkins@0.9.3-next.2
- @backstage/plugin-kafka@0.3.28-next.2
- @backstage/plugin-kubernetes-cluster@0.0.4-next.2
- @backstage/plugin-linguist@0.1.13-next.2
- @backstage/plugin-linguist-common@0.1.2
- @backstage/plugin-microsoft-calendar@0.1.10-next.2
- @backstage/plugin-newrelic@0.3.43-next.2
- @backstage/plugin-newrelic-dashboard@0.3.3-next.2
- @backstage/plugin-nomad@0.1.9-next.2
- @backstage/plugin-octopus-deploy@0.2.10-next.2
- @backstage/plugin-org@0.6.18-next.2
- @backstage/plugin-pagerduty@0.7.0-next.2
- @backstage/plugin-permission-react@0.4.18-next.1
- @backstage/plugin-playlist@0.2.2-next.2
- @backstage/plugin-puppetdb@0.1.11-next.2
- @backstage/plugin-rollbar@0.4.28-next.2
- @backstage/plugin-scaffolder@1.16.2-next.2
- @backstage/plugin-search-common@1.2.8
- @backstage/plugin-sentry@0.5.13-next.2
- @backstage/plugin-shortcuts@0.3.17-next.2
- @backstage/plugin-stackstorm@0.1.9-next.2
- @backstage/plugin-tech-insights@0.3.20-next.2
- @backstage/plugin-techdocs-module-addons-contrib@1.1.3-next.2
- @backstage/plugin-techdocs-react@1.1.14-next.2
- @backstage/plugin-todo@0.2.32-next.2
## 0.2.90-next.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app",
"version": "0.2.90-next.2",
"version": "0.2.90-next.4",
"private": true,
"backstage": {
"role": "frontend"
@@ -798,9 +798,12 @@ const groupPage = (
entityFilterKind={customEntityFilterKind}
/>
</Grid>
<Grid item xs={12}>
<Grid item xs={12} md={6}>
<EntityMembersListCard />
</Grid>
<Grid item xs={12} md={6}>
<EntityLinksCard />
</Grid>
<Grid item xs={12}>
<EntityLikeDislikeRatingsCard />
</Grid>
+34
View File
@@ -1,5 +1,39 @@
# @backstage/backend-app-api
## 0.5.9-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.20.0-next.3
- @backstage/backend-plugin-api@0.6.8-next.3
- @backstage/backend-tasks@0.5.13-next.3
- @backstage/cli-common@0.1.13
- @backstage/cli-node@0.2.0
- @backstage/config@1.1.1
- @backstage/config-loader@1.6.0-next.0
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
- @backstage/plugin-auth-node@0.4.2-next.3
- @backstage/plugin-permission-node@0.7.19-next.3
## 0.5.9-next.2
### Patch Changes
- Updated dependencies
- @backstage/config-loader@1.6.0-next.0
- @backstage/backend-common@0.20.0-next.2
- @backstage/plugin-auth-node@0.4.2-next.2
- @backstage/backend-plugin-api@0.6.8-next.2
- @backstage/backend-tasks@0.5.13-next.2
- @backstage/cli-common@0.1.13
- @backstage/cli-node@0.2.0
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
- @backstage/plugin-permission-node@0.7.19-next.2
## 0.5.9-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-app-api",
"description": "Core API used by Backstage backend apps",
"version": "0.5.9-next.1",
"version": "0.5.9-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+35
View File
@@ -1,5 +1,40 @@
# @backstage/backend-common
## 0.20.0-next.3
### Patch Changes
- d86a007: Fixed the AwsS3UrlReader host regex and host to allow the S3 reading for CN AWS domain
- Updated dependencies
- @backstage/backend-app-api@0.5.9-next.3
- @backstage/backend-dev-utils@0.1.2
- @backstage/backend-plugin-api@0.6.8-next.3
- @backstage/cli-common@0.1.13
- @backstage/config@1.1.1
- @backstage/config-loader@1.6.0-next.0
- @backstage/errors@1.2.3
- @backstage/integration@1.8.0-next.1
- @backstage/integration-aws-node@0.1.8
- @backstage/types@1.1.1
## 0.20.0-next.2
### Patch Changes
- bc67498: Updated dependency `archiver` to `^6.0.0`.
Updated dependency `@types/archiver` to `^6.0.0`.
- Updated dependencies
- @backstage/config-loader@1.6.0-next.0
- @backstage/backend-app-api@0.5.9-next.2
- @backstage/backend-dev-utils@0.1.2
- @backstage/backend-plugin-api@0.6.8-next.2
- @backstage/cli-common@0.1.13
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/integration@1.8.0-next.1
- @backstage/integration-aws-node@0.1.8
- @backstage/types@1.1.1
## 0.20.0-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.20.0-next.1",
"version": "0.20.0-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
@@ -53,6 +53,39 @@ describe('parseUrl', () => {
bucket: 'my.bucket-3',
region: 'us-east-1',
});
expect(
parseUrl('https://s3.amazonaws.com.cn/my.bucket-3/a/puppy.jpg', {
host: 'amazonaws.com',
}),
).toEqual({
path: 'a/puppy.jpg',
bucket: 'my.bucket-3',
region: 'us-east-1',
});
expect(
parseUrl(
'https://ec-backstage-staging.s3.cn-north-1.amazonaws.com.cn/payments-prod-oas30.json',
{
host: 'amazonaws.com',
},
),
).toEqual({
path: 'payments-prod-oas30.json',
bucket: 'ec-backstage-staging',
region: 'cn-north-1',
});
expect(
parseUrl(
'https://ec-backstage-staging.s3.cn-north-1.amazonaws.com.cn/payments-prod-oas30.json',
{
host: 'amazonaws.com.cn',
},
),
).toEqual({
path: 'payments-prod-oas30.json',
bucket: 'ec-backstage-staging',
region: 'cn-north-1',
});
expect(
parseUrl('https://s3.us-west-2.amazonaws.com/my.bucket-3/a/puppy.jpg', {
host: 'amazonaws.com',
@@ -69,9 +69,9 @@ export function parseUrl(
const host = parsedUrl.host;
// Treat Amazon hosted separately because it has special region logic
if (config.host === 'amazonaws.com') {
if (config.host === 'amazonaws.com' || config.host === 'amazonaws.com.cn') {
const match = host.match(
/^(?:([a-z0-9.-]+)\.)?s3(?:[.-]([a-z0-9-]+))?\.amazonaws\.com$/,
/^(?:([a-z0-9.-]+)\.)?s3(?:[.-]([a-z0-9-]+))?\.amazonaws\.com(\.cn)?$/,
);
if (!match) {
throw new Error(`Invalid AWS S3 URL ${url}`);
+18
View File
@@ -1,5 +1,23 @@
# @backstage/backend-defaults
## 0.2.8-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.20.0-next.3
- @backstage/backend-app-api@0.5.9-next.3
- @backstage/backend-plugin-api@0.6.8-next.3
## 0.2.8-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.20.0-next.2
- @backstage/backend-app-api@0.5.9-next.2
- @backstage/backend-plugin-api@0.6.8-next.2
## 0.2.8-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-defaults",
"description": "Backend defaults used by Backstage backend apps",
"version": "0.2.8-next.1",
"version": "0.2.8-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+82
View File
@@ -1,5 +1,87 @@
# example-backend-next
## 0.0.18-next.3
### Patch Changes
- Updated dependencies
- @backstage/plugin-azure-devops-backend@0.5.0-next.3
- @backstage/plugin-scaffolder-backend@1.19.2-next.3
- @backstage/backend-defaults@0.2.8-next.3
- @backstage/backend-plugin-api@0.6.8-next.3
- @backstage/backend-tasks@0.5.13-next.3
- @backstage/plugin-adr-backend@0.4.5-next.3
- @backstage/plugin-app-backend@0.3.56-next.3
- @backstage/plugin-auth-node@0.4.2-next.3
- @backstage/plugin-badges-backend@0.3.5-next.3
- @backstage/plugin-catalog-backend@1.16.0-next.3
- @backstage/plugin-catalog-backend-module-backstage-openapi@0.1.1-next.3
- @backstage/plugin-catalog-backend-module-openapi@0.1.25-next.3
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.5-next.3
- @backstage/plugin-catalog-backend-module-unprocessed@0.3.5-next.3
- @backstage/plugin-devtools-backend@0.2.5-next.3
- @backstage/plugin-entity-feedback-backend@0.2.5-next.3
- @backstage/plugin-jenkins-backend@0.3.2-next.3
- @backstage/plugin-kubernetes-backend@0.14.0-next.3
- @backstage/plugin-lighthouse-backend@0.4.0-next.3
- @backstage/plugin-linguist-backend@0.5.5-next.3
- @backstage/plugin-nomad-backend@0.1.10-next.3
- @backstage/plugin-permission-backend@0.5.31-next.3
- @backstage/plugin-permission-backend-module-allow-all-policy@0.1.5-next.3
- @backstage/plugin-permission-common@0.7.10
- @backstage/plugin-permission-node@0.7.19-next.3
- @backstage/plugin-playlist-backend@0.3.12-next.3
- @backstage/plugin-proxy-backend@0.4.6-next.3
- @backstage/plugin-search-backend@1.4.8-next.3
- @backstage/plugin-search-backend-module-catalog@0.1.12-next.3
- @backstage/plugin-search-backend-module-explore@0.1.12-next.3
- @backstage/plugin-search-backend-module-techdocs@0.1.12-next.3
- @backstage/plugin-search-backend-node@1.2.12-next.3
- @backstage/plugin-sonarqube-backend@0.2.10-next.3
- @backstage/plugin-techdocs-backend@1.9.1-next.3
- @backstage/plugin-todo-backend@0.3.6-next.3
## 0.0.18-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog-backend@1.16.0-next.2
- @backstage/plugin-lighthouse-backend@0.4.0-next.2
- @backstage/plugin-auth-node@0.4.2-next.2
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.5-next.2
- @backstage/plugin-permission-backend-module-allow-all-policy@0.1.5-next.2
- @backstage/plugin-catalog-backend-module-unprocessed@0.3.5-next.2
- @backstage/plugin-search-backend-module-techdocs@0.1.12-next.2
- @backstage/plugin-search-backend-module-catalog@0.1.12-next.2
- @backstage/plugin-search-backend-module-explore@0.1.12-next.2
- @backstage/backend-defaults@0.2.8-next.2
- @backstage/backend-plugin-api@0.6.8-next.2
- @backstage/backend-tasks@0.5.13-next.2
- @backstage/plugin-adr-backend@0.4.5-next.2
- @backstage/plugin-app-backend@0.3.56-next.2
- @backstage/plugin-azure-devops-backend@0.5.0-next.2
- @backstage/plugin-badges-backend@0.3.5-next.2
- @backstage/plugin-catalog-backend-module-backstage-openapi@0.1.1-next.2
- @backstage/plugin-catalog-backend-module-openapi@0.1.25-next.2
- @backstage/plugin-devtools-backend@0.2.5-next.2
- @backstage/plugin-entity-feedback-backend@0.2.5-next.2
- @backstage/plugin-jenkins-backend@0.3.2-next.2
- @backstage/plugin-kubernetes-backend@0.14.0-next.2
- @backstage/plugin-linguist-backend@0.5.5-next.2
- @backstage/plugin-nomad-backend@0.1.10-next.2
- @backstage/plugin-permission-backend@0.5.31-next.2
- @backstage/plugin-permission-common@0.7.10
- @backstage/plugin-permission-node@0.7.19-next.2
- @backstage/plugin-playlist-backend@0.3.12-next.2
- @backstage/plugin-proxy-backend@0.4.6-next.2
- @backstage/plugin-scaffolder-backend@1.19.2-next.2
- @backstage/plugin-search-backend@1.4.8-next.2
- @backstage/plugin-search-backend-node@1.2.12-next.2
- @backstage/plugin-sonarqube-backend@0.2.10-next.2
- @backstage/plugin-techdocs-backend@1.9.1-next.2
- @backstage/plugin-todo-backend@0.3.6-next.2
## 0.0.18-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend-next",
"version": "0.0.18-next.1",
"version": "0.0.18-next.3",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -1,5 +1,23 @@
# @backstage/backend-openapi-utils
## 0.1.1-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-plugin-api@0.6.8-next.3
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
## 0.1.1-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-plugin-api@0.6.8-next.2
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
## 0.1.1-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-openapi-utils",
"description": "OpenAPI typescript support.",
"version": "0.1.1-next.1",
"version": "0.1.1-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
+22
View File
@@ -1,5 +1,27 @@
# @backstage/backend-plugin-api
## 0.6.8-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-tasks@0.5.13-next.3
- @backstage/config@1.1.1
- @backstage/types@1.1.1
- @backstage/plugin-auth-node@0.4.2-next.3
- @backstage/plugin-permission-common@0.7.10
## 0.6.8-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-auth-node@0.4.2-next.2
- @backstage/backend-tasks@0.5.13-next.2
- @backstage/config@1.1.1
- @backstage/types@1.1.1
- @backstage/plugin-permission-common@0.7.10
## 0.6.8-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-plugin-api",
"description": "Core API used by Backstage backend plugins",
"version": "0.6.8-next.1",
"version": "0.6.8-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
@@ -1,5 +1,51 @@
# @backstage/backend-plugin-manager
## 0.0.4-next.3
### Patch Changes
- Updated dependencies
- @backstage/plugin-scaffolder-node@0.2.9-next.3
- @backstage/backend-common@0.20.0-next.3
- @backstage/backend-plugin-api@0.6.8-next.3
- @backstage/backend-tasks@0.5.13-next.3
- @backstage/cli-common@0.1.13
- @backstage/cli-node@0.2.0
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
- @backstage/plugin-auth-node@0.4.2-next.3
- @backstage/plugin-catalog-backend@1.16.0-next.3
- @backstage/plugin-events-backend@0.2.17-next.3
- @backstage/plugin-events-node@0.2.17-next.3
- @backstage/plugin-permission-common@0.7.10
- @backstage/plugin-permission-node@0.7.19-next.3
- @backstage/plugin-search-backend-node@1.2.12-next.3
- @backstage/plugin-search-common@1.2.8
## 0.0.4-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog-backend@1.16.0-next.2
- @backstage/backend-common@0.20.0-next.2
- @backstage/plugin-auth-node@0.4.2-next.2
- @backstage/plugin-events-backend@0.2.17-next.2
- @backstage/backend-plugin-api@0.6.8-next.2
- @backstage/backend-tasks@0.5.13-next.2
- @backstage/cli-common@0.1.13
- @backstage/cli-node@0.2.0
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
- @backstage/plugin-events-node@0.2.17-next.2
- @backstage/plugin-permission-common@0.7.10
- @backstage/plugin-permission-node@0.7.19-next.2
- @backstage/plugin-scaffolder-node@0.2.9-next.2
- @backstage/plugin-search-backend-node@1.2.12-next.2
- @backstage/plugin-search-common@1.2.8
## 0.0.4-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-plugin-manager",
"description": "Backstage plugin management backend",
"version": "0.0.4-next.1",
"version": "0.0.4-next.3",
"private": true,
"main": "src/index.ts",
"types": "src/index.ts",
+20
View File
@@ -1,5 +1,25 @@
# @backstage/backend-tasks
## 0.5.13-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.20.0-next.3
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
## 0.5.13-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.20.0-next.2
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
## 0.5.13-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-tasks",
"description": "Common distributed task management library for Backstage backends",
"version": "0.5.13-next.1",
"version": "0.5.13-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+27
View File
@@ -1,5 +1,32 @@
# @backstage/backend-test-utils
## 0.2.9-next.3
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.20.0-next.3
- @backstage/backend-app-api@0.5.9-next.3
- @backstage/backend-plugin-api@0.6.8-next.3
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
- @backstage/plugin-auth-node@0.4.2-next.3
## 0.2.9-next.2
### Patch Changes
- cc4228e: Switched module ID to use kebab-case.
- Updated dependencies
- @backstage/backend-common@0.20.0-next.2
- @backstage/plugin-auth-node@0.4.2-next.2
- @backstage/backend-app-api@0.5.9-next.2
- @backstage/backend-plugin-api@0.6.8-next.2
- @backstage/config@1.1.1
- @backstage/errors@1.2.3
- @backstage/types@1.1.1
## 0.2.9-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.2.9-next.1",
"version": "0.2.9-next.3",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+116
View File
@@ -1,5 +1,121 @@
# example-backend
## 0.2.90-next.3
### Patch Changes
- Updated dependencies
- @backstage/plugin-azure-devops-backend@0.5.0-next.3
- @backstage/plugin-scaffolder-backend@1.19.2-next.3
- @backstage/backend-common@0.20.0-next.3
- example-app@0.2.90-next.4
- @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.9-next.3
- @backstage/plugin-scaffolder-backend-module-rails@0.4.25-next.3
- @backstage/backend-tasks@0.5.13-next.3
- @backstage/catalog-client@1.5.0-next.1
- @backstage/catalog-model@1.4.3
- @backstage/config@1.1.1
- @backstage/integration@1.8.0-next.1
- @backstage/plugin-adr-backend@0.4.5-next.3
- @backstage/plugin-app-backend@0.3.56-next.3
- @backstage/plugin-auth-backend@0.20.1-next.3
- @backstage/plugin-auth-node@0.4.2-next.3
- @backstage/plugin-azure-sites-backend@0.1.18-next.3
- @backstage/plugin-badges-backend@0.3.5-next.3
- @backstage/plugin-catalog-backend@1.16.0-next.3
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.5-next.3
- @backstage/plugin-catalog-backend-module-unprocessed@0.3.5-next.3
- @backstage/plugin-catalog-node@1.6.0-next.3
- @backstage/plugin-code-coverage-backend@0.2.22-next.3
- @backstage/plugin-devtools-backend@0.2.5-next.3
- @backstage/plugin-entity-feedback-backend@0.2.5-next.3
- @backstage/plugin-events-backend@0.2.17-next.3
- @backstage/plugin-events-node@0.2.17-next.3
- @backstage/plugin-explore-backend@0.0.18-next.3
- @backstage/plugin-jenkins-backend@0.3.2-next.3
- @backstage/plugin-kafka-backend@0.3.6-next.3
- @backstage/plugin-kubernetes-backend@0.14.0-next.3
- @backstage/plugin-lighthouse-backend@0.4.0-next.3
- @backstage/plugin-linguist-backend@0.5.5-next.3
- @backstage/plugin-nomad-backend@0.1.10-next.3
- @backstage/plugin-permission-backend@0.5.31-next.3
- @backstage/plugin-permission-common@0.7.10
- @backstage/plugin-permission-node@0.7.19-next.3
- @backstage/plugin-playlist-backend@0.3.12-next.3
- @backstage/plugin-proxy-backend@0.4.6-next.3
- @backstage/plugin-rollbar-backend@0.1.53-next.3
- @backstage/plugin-search-backend@1.4.8-next.3
- @backstage/plugin-search-backend-module-catalog@0.1.12-next.3
- @backstage/plugin-search-backend-module-elasticsearch@1.3.11-next.3
- @backstage/plugin-search-backend-module-explore@0.1.12-next.3
- @backstage/plugin-search-backend-module-pg@0.5.17-next.3
- @backstage/plugin-search-backend-module-techdocs@0.1.12-next.3
- @backstage/plugin-search-backend-node@1.2.12-next.3
- @backstage/plugin-search-common@1.2.8
- @backstage/plugin-tech-insights-backend@0.5.22-next.3
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.40-next.3
- @backstage/plugin-tech-insights-node@0.4.14-next.3
- @backstage/plugin-techdocs-backend@1.9.1-next.3
- @backstage/plugin-todo-backend@0.3.6-next.3
## 0.2.90-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog-node@1.6.0-next.2
- @backstage/plugin-catalog-backend@1.16.0-next.2
- @backstage/plugin-auth-backend@0.20.1-next.2
- @backstage/plugin-lighthouse-backend@0.4.0-next.2
- @backstage/backend-common@0.20.0-next.2
- @backstage/plugin-auth-node@0.4.2-next.2
- @backstage/catalog-client@1.5.0-next.1
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.5-next.2
- @backstage/plugin-search-backend-module-elasticsearch@1.3.11-next.2
- @backstage/plugin-catalog-backend-module-unprocessed@0.3.5-next.2
- @backstage/plugin-search-backend-module-techdocs@0.1.12-next.2
- @backstage/plugin-search-backend-module-catalog@0.1.12-next.2
- @backstage/plugin-search-backend-module-explore@0.1.12-next.2
- @backstage/plugin-search-backend-module-pg@0.5.17-next.2
- @backstage/plugin-events-backend@0.2.17-next.2
- example-app@0.2.90-next.3
- @backstage/backend-tasks@0.5.13-next.2
- @backstage/catalog-model@1.4.3
- @backstage/config@1.1.1
- @backstage/integration@1.8.0-next.1
- @backstage/plugin-adr-backend@0.4.5-next.2
- @backstage/plugin-app-backend@0.3.56-next.2
- @backstage/plugin-azure-devops-backend@0.5.0-next.2
- @backstage/plugin-azure-sites-backend@0.1.18-next.2
- @backstage/plugin-badges-backend@0.3.5-next.2
- @backstage/plugin-code-coverage-backend@0.2.22-next.2
- @backstage/plugin-devtools-backend@0.2.5-next.2
- @backstage/plugin-entity-feedback-backend@0.2.5-next.2
- @backstage/plugin-events-node@0.2.17-next.2
- @backstage/plugin-explore-backend@0.0.18-next.2
- @backstage/plugin-jenkins-backend@0.3.2-next.2
- @backstage/plugin-kafka-backend@0.3.6-next.2
- @backstage/plugin-kubernetes-backend@0.14.0-next.2
- @backstage/plugin-linguist-backend@0.5.5-next.2
- @backstage/plugin-nomad-backend@0.1.10-next.2
- @backstage/plugin-permission-backend@0.5.31-next.2
- @backstage/plugin-permission-common@0.7.10
- @backstage/plugin-permission-node@0.7.19-next.2
- @backstage/plugin-playlist-backend@0.3.12-next.2
- @backstage/plugin-proxy-backend@0.4.6-next.2
- @backstage/plugin-rollbar-backend@0.1.53-next.2
- @backstage/plugin-scaffolder-backend@1.19.2-next.2
- @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.9-next.2
- @backstage/plugin-scaffolder-backend-module-rails@0.4.25-next.2
- @backstage/plugin-search-backend@1.4.8-next.2
- @backstage/plugin-search-backend-node@1.2.12-next.2
- @backstage/plugin-search-common@1.2.8
- @backstage/plugin-tech-insights-backend@0.5.22-next.2
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.40-next.2
- @backstage/plugin-tech-insights-node@0.4.14-next.2
- @backstage/plugin-techdocs-backend@1.9.1-next.2
- @backstage/plugin-todo-backend@0.3.6-next.2
## 0.2.90-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.90-next.1",
"version": "0.2.90-next.3",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/catalog-client
## 1.5.0-next.1
### Patch Changes
- 82fa88b: Fixes a bug where some query parameters were double URL encoded.
- Updated dependencies
- @backstage/catalog-model@1.4.3
- @backstage/errors@1.2.3
## 1.5.0-next.0
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-client",
"description": "An isomorphic client for the catalog backend",
"version": "1.5.0-next.0",
"version": "1.5.0-next.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -86,9 +86,12 @@ describe('CatalogClient', () => {
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(decodeURIComponent(req.url.search)).toBe(
'?filter=a=1,b=2,b=3,%C3%B6=%3D&filter=a=2&filter=c',
);
const queryParams = new URLSearchParams(req.url.search);
expect(queryParams.getAll('filter')).toEqual([
'a=1,b=2,b=3,ö==',
'a=2',
'c',
]);
return res(ctx.json([]));
}),
);
@@ -120,9 +123,8 @@ describe('CatalogClient', () => {
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(decodeURIComponent(req.url.search)).toBe(
'?filter=a=1,b=2,b=3,%C3%B6=%3D,c',
);
const queryParams = new URLSearchParams(req.url.search);
expect(queryParams.getAll('filter')).toEqual(['a=1,b=2,b=3,ö==,c']);
return res(ctx.json([]));
}),
);
@@ -142,12 +144,45 @@ describe('CatalogClient', () => {
expect(response.items).toEqual([]);
});
it('builds search filters property even those with URL unsafe values', async () => {
const mockedEndpoint = jest
.fn()
.mockImplementation((_req, res, ctx) =>
res(ctx.json({ items: [], totalItems: 0 })),
);
server.use(rest.get(`${mockBaseUrl}/entities/by-query`, mockedEndpoint));
const response = await client.queryEntities(
{
filter: [
{
'!@#$%': 't?i=1&a:2',
'^&*(){}[]': ['t%^url*encoded2', 'url'],
},
],
},
{ token },
);
expect(response).toEqual({ items: [], totalItems: 0 });
expect(mockedEndpoint).toHaveBeenCalledTimes(1);
const queryParams = new URLSearchParams(
mockedEndpoint.mock.calls[0][0].url.search,
);
expect(queryParams.getAll('filter')).toEqual([
'!@#$%=t?i=1&a:2,^&*(){}[]=t%^url*encoded2,^&*(){}[]=url',
]);
});
it('builds entity field selectors properly', async () => {
expect.assertions(2);
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(decodeURIComponent(req.url.search)).toBe('?fields=a.b,%C3%B6');
const queryParams = new URLSearchParams(req.url.search);
expect(queryParams.getAll('fields')).toEqual(['a.b,ö']);
return res(ctx.json([]));
}),
);
@@ -205,9 +240,11 @@ describe('CatalogClient', () => {
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(decodeURIComponent(req.url.search)).toBe(
'?order=asc:kind&order=desc:metadata.name',
);
const queryParams = new URLSearchParams(req.url.search);
expect(queryParams.getAll('order')).toEqual([
'asc:kind',
'desc:metadata.name',
]);
return res(ctx.json([]));
}),
);
@@ -328,9 +365,46 @@ describe('CatalogClient', () => {
expect(response).toEqual({ items: [], totalItems: 0 });
expect(mockedEndpoint).toHaveBeenCalledTimes(1);
expect(
decodeURIComponent(mockedEndpoint.mock.calls[0][0].url.search),
).toBe('?filter=a=1,b=2,b=3,%C3%B6=%3D&filter=a=2&filter=c');
const queryParams = new URLSearchParams(
mockedEndpoint.mock.calls[0][0].url.search,
);
expect(queryParams.getAll('filter')).toEqual([
'a=1,b=2,b=3,ö==',
'a=2',
'c',
]);
});
it('builds search filters property even those with URL unsafe values', async () => {
const mockedEndpoint = jest
.fn()
.mockImplementation((_req, res, ctx) =>
res(ctx.json({ items: [], totalItems: 0 })),
);
server.use(rest.get(`${mockBaseUrl}/entities/by-query`, mockedEndpoint));
const response = await client.queryEntities(
{
filter: [
{
'!@#$%': 't?i=1&a:2',
'^&*(){}[]': ['t%^url*encoded2', 'url'],
},
],
},
{ token },
);
expect(response).toEqual({ items: [], totalItems: 0 });
expect(mockedEndpoint).toHaveBeenCalledTimes(1);
const queryParams = new URLSearchParams(
mockedEndpoint.mock.calls[0][0].url.search,
);
expect(queryParams.getAll('filter')).toEqual([
'!@#$%=t?i=1&a:2,^&*(){}[]=t%^url*encoded2,^&*(){}[]=url',
]);
});
it('should send query params correctly on initial request', async () => {
@@ -353,11 +427,17 @@ describe('CatalogClient', () => {
{ field: 'metadata.uid', order: 'desc' },
],
});
expect(
decodeURIComponent(mockedEndpoint.mock.calls[0][0].url.search),
).toBe(
'?fields=a,b&limit=100&orderField=metadata.name%2Casc&orderField=metadata.uid%2Cdesc&fullTextFilterTerm=query',
const queryParams = new URLSearchParams(
mockedEndpoint.mock.calls[0][0].url.search,
);
expect(queryParams.getAll('fields')).toEqual(['a,b']);
expect(queryParams.getAll('limit')).toEqual(['100']);
expect(queryParams.getAll('fullTextFilterTerm')).toEqual(['query']);
expect(queryParams.getAll('orderField')).toEqual([
'metadata.name,asc',
'metadata.uid,desc',
]);
});
it('should ignore initial query params if cursor is passed', async () => {
+7 -13
View File
@@ -107,11 +107,7 @@ export class CatalogClient implements CatalogApi {
if (order) {
for (const directive of [order].flat()) {
if (directive) {
encodedOrder.push(
`${encodeURIComponent(directive.order)}:${encodeURIComponent(
directive.field,
)}`,
);
encodedOrder.push(`${directive.order}:${directive.field}`);
}
}
}
@@ -120,7 +116,7 @@ export class CatalogClient implements CatalogApi {
await this.apiClient.getEntities(
{
query: {
fields: fields.map(encodeURIComponent),
fields,
limit,
filter: this.getFilterValue(filter),
offset,
@@ -209,10 +205,10 @@ export class CatalogClient implements CatalogApi {
if (orderFields !== undefined) {
params.orderField = (
Array.isArray(orderFields) ? orderFields : [orderFields]
).map(({ field, order }) => encodeURIComponent(`${field},${order}`));
).map(({ field, order }) => `${field},${order}`);
}
if (fields.length) {
params.fields = fields.map(encodeURIComponent);
params.fields = fields;
}
const normalizedFullTextFilterTerm = fullTextFilter?.term?.trim();
@@ -230,7 +226,7 @@ export class CatalogClient implements CatalogApi {
params.limit = limit;
}
if (fields.length) {
params.fields = fields.map(encodeURIComponent);
params.fields = fields;
}
}
@@ -452,11 +448,9 @@ export class CatalogClient implements CatalogApi {
for (const [key, value] of Object.entries(filterItem)) {
for (const v of [value].flat()) {
if (v === CATALOG_FILTER_EXISTS) {
filterParts.push(encodeURIComponent(key));
filterParts.push(key);
} else if (typeof v === 'string') {
filterParts.push(
`${encodeURIComponent(key)}=${encodeURIComponent(v)}`,
);
filterParts.push(`${key}=${v}`);
}
}
}

Some files were not shown because too many files have changed in this diff Show More