+);
```
## Consequences
diff --git a/docs/architecture-decisions/adr010-luxon-date-library.md b/docs/architecture-decisions/adr010-luxon-date-library.md
new file mode 100644
index 0000000000..b4c1ddedba
--- /dev/null
+++ b/docs/architecture-decisions/adr010-luxon-date-library.md
@@ -0,0 +1,38 @@
+---
+id: adrs-adr010
+title: ADR010: Use the Luxon Date Library
+description: Architecture Decision Record (ADR) for Luxon Date Library
+---
+
+# ADR010: Use the Luxon Date Library
+
+## Context
+
+Date formatting (e.g. `a day ago`) and calculations are common within Backstage.
+Some of these useful features are not supported by the standard JavaScript
+`Date` object. The popular [Moment.js](https://momentjs.com/) library has been
+commonly used to fill this gap but suffers from large bundle sizes and mutable
+state issues. On top of this, `momentjs` is
+[being sunset](https://momentjs.com/docs/#/-project-status/) and the project
+recommends using one of the more modern alternative libraries.
+
+See
+[[RFC] Standardized Date & Time Library](https://github.com/backstage/backstage/issues/3401).
+
+## Decision
+
+We will use [Luxon](https://moment.github.io/luxon/index.html) as the standard
+date library within Backstage.
+
+`Luxon` provides a similar feature set and API to `Moment.js`, but improves on
+its design through immutability and the usage of modern JavaScript APIs (e.g.
+`Intl`). This results in smaller bundle sizes while providing a full feature set
+and avoids the need for using additional libraries for common date & time tasks.
+
+## Consequences
+
+- All core packages and plugins within Backstage should use `Luxon` for any date
+ manipulation or formatting that cannot be easily accomplished with the native
+ JavaScript `Date` object.
+- Using a single date library avoids having to learn multiple library APIs
+- Having a single date library will reduce bundle sizes
diff --git a/docs/architecture-decisions/index.md b/docs/architecture-decisions/index.md
index 3211f37550..f852170b1e 100644
--- a/docs/architecture-decisions/index.md
+++ b/docs/architecture-decisions/index.md
@@ -18,8 +18,9 @@ Records should be stored under the `architecture-decisions` directory.
### Creating an ADR
-- Copy `0000-template.md` to `docs/architecture-decisions/0000-my-decision.md`
- (my-decision should be descriptive. Do not assign an ADR number.)
+- Copy `docs/architecture-decisions/adr000-template.md` to
+ `docs/architecture-decisions/adr000-my-decision.md` (my-decision should be
+ descriptive. Do not assign an ADR number.)
- Fill in the ADR following the guidelines in the template
- Submit a pull request
- Address and integrate feedback from the community
diff --git a/docs/assets/search/architecture.drawio.svg b/docs/assets/search/architecture.drawio.svg
new file mode 100644
index 0000000000..af04ab63e8
--- /dev/null
+++ b/docs/assets/search/architecture.drawio.svg
@@ -0,0 +1,541 @@
+
diff --git a/docs/assets/software-catalog/bsc-register-2.png b/docs/assets/software-catalog/bsc-register-2.png
index 18a6c5a4f0..c3460f98db 100644
Binary files a/docs/assets/software-catalog/bsc-register-2.png and b/docs/assets/software-catalog/bsc-register-2.png differ
diff --git a/docs/assets/software-catalog/software-model-core-entities.drawio.svg b/docs/assets/software-catalog/software-model-core-entities.drawio.svg
new file mode 100644
index 0000000000..2260e5502e
--- /dev/null
+++ b/docs/assets/software-catalog/software-model-core-entities.drawio.svg
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/docs/assets/software-catalog/software-model-core-entities.png b/docs/assets/software-catalog/software-model-core-entities.png
deleted file mode 100644
index 60cb283802..0000000000
Binary files a/docs/assets/software-catalog/software-model-core-entities.png and /dev/null differ
diff --git a/docs/assets/software-catalog/software-model-entities.drawio.svg b/docs/assets/software-catalog/software-model-entities.drawio.svg
new file mode 100644
index 0000000000..7b8b88f224
--- /dev/null
+++ b/docs/assets/software-catalog/software-model-entities.drawio.svg
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/docs/assets/techdocs/aws-s3.drawio.svg b/docs/assets/techdocs/aws-s3.drawio.svg
new file mode 100644
index 0000000000..3bb730f91e
--- /dev/null
+++ b/docs/assets/techdocs/aws-s3.drawio.svg
@@ -0,0 +1,144 @@
+
diff --git a/docs/auth/auth-backend-classes.md b/docs/auth/auth-backend-classes.md
index 8dbae0daa7..424869196d 100644
--- a/docs/auth/auth-backend-classes.md
+++ b/docs/auth/auth-backend-classes.md
@@ -61,6 +61,19 @@ If your authentication provider is any of the above mentioned providers, you can
configure them by setting the right variables in `app-config.yaml` under the
`auth` section.
+### SAML
+
+The SAML Provider is currently under development. Additional validation and
+profile handling is still required before use in production.
+
+To configure the SAML Auth provider, look at the configuration parameters
+supported by
+[Passport-SAML](https://github.com/node-saml/passport-saml#config-parameter-details)
+under the `auth.providers.saml` key
+
+For security reasons, validate that the response from the IdP is indeed signed
+by also providing the `cert` configuration.
+
### Configuration
Each authentication provider (except SAML) needs five parameters: an OAuth
@@ -96,6 +109,11 @@ auth:
development:
clientId:
$env:
+ saml:
+ entryPoint:
+ $env: AUTH_SAML_ENTRY_POINT
+ issuer:
+ $env: AUTH_SAML_ISSUER
...
```
diff --git a/docs/auth/oauth.md b/docs/auth/oauth.md
index 0655175b58..4209b81279 100644
--- a/docs/auth/oauth.md
+++ b/docs/auth/oauth.md
@@ -1,9 +1,8 @@
---
id: oauth
title: OAuth and OpenID Connect
-description: This section describes how Backstage allows plugins to request
-OAuth Access Tokens and OpenID Connect ID Tokens on behalf of the user, to be
-used for auth to various third party APIs
+# prettier-ignore
+description: This section describes how Backstage allows plugins to request OAuth Access Tokens and OpenID Connect ID Tokens on behalf of the user, to be used for auth to various third party APIs
---
This section describes how Backstage allows plugins to request OAuth Access
diff --git a/docs/cli/commands.md b/docs/cli/commands.md
index c505bf8ae7..726f2a922c 100644
--- a/docs/cli/commands.md
+++ b/docs/cli/commands.md
@@ -28,6 +28,7 @@ app:diff Diff an existing app with the creation template
app:serve Serve an app for local development
backend:build Build a backend plugin
+backend:bundle Bundle the backend into a deployment archive
backend:build-image Bundles the package into a docker image
backend:dev Start local development server with HMR for the backend
@@ -166,7 +167,7 @@ Options:
## backend:build
-Scope: `backend`, `backend-plugin`
+Scope: `backend-plugin`
This builds a backend package for publishing and use in production. The build
output is written to `dist/`. Be sure to list any additional file that the
@@ -180,6 +181,52 @@ Options:
-h, --help display help for command
```
+## backend:bundle
+
+Scope: `backend`
+
+Bundle the backend and all of its local dependencies into a deployment archive.
+The archive is written to `dist/bundle.tar.gz`, and contains the packaged
+version of all dependencies of the target package, along with the target package
+itself. The layout of the packages in the archive is the same as the directory
+layout in the target monorepo, and the bundle also contains the root
+`package.json` and `yarn.lock`.
+
+To use the bundle, extract it into a target directory, run
+`yarn install --production`, and then start the target backend package using for
+example `node package/backend`.
+
+The `dist/bundle.tar.gz` is accompanied by a `dist/skeleton.tar.gz`, which has
+the same layout, but only contains `package.json` files and `yarn.lock`. This
+can be used to run a `yarn install` in environments that will benefit from the
+caching that this enables, such as Docker image builds. To use the skeleton
+archive, simply extract it first, run install, and then extract the main bundle.
+
+The following is an example of a `Dockerfile` that can be used to package the
+output of `backstage-cli backend:bundle` into an image:
+
+```Dockerfile
+FROM node:14-buster
+WORKDIR /app
+
+ADD yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
+RUN yarn install --production --network-timeout 600000 && rm -rf "$(yarn cache dir)"
+
+ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./
+
+CMD node packages/backend
+```
+
+```text
+Usage: backstage-cli backend:bundle [options]
+
+Bundle the backend into a deployment archive
+
+Options:
+ --build-dependencies Build all local package dependencies before bundling the backend
+ -h, --help display help for command
+```
+
## backend:build-image
Scope: `backend`
diff --git a/docs/conf/defining.md b/docs/conf/defining.md
index 358498929a..34b9b11977 100644
--- a/docs/conf/defining.md
+++ b/docs/conf/defining.md
@@ -36,6 +36,10 @@ export interface Config {
* @visibility frontend
*/
baseUrl: string;
+
+ // Use @items. to assign annotations to primitive array items
+ /** @items.visibility frontend */
+ myItems: string[];
};
}
```
diff --git a/docs/conf/index.md b/docs/conf/index.md
index a6f1d1f6f7..ef6faffd8b 100644
--- a/docs/conf/index.md
+++ b/docs/conf/index.md
@@ -18,8 +18,8 @@ allowing for customization.
Configuration is stored in YAML files where the defaults are `app-config.yaml`
and `app-config.local.yaml` for local overrides. Other sets of files can by
loaded by passing `--config ` flags. The configuration files themselves
-contain plain YAML, but with support for loading in secrets from various sources
-using for example `$env` and `$file` keys.
+contain plain YAML, but with support for loading in data and secrets from
+various sources using for example `$env` and `$file` keys.
It is also possible to supply configuration through environment variables, for
example `APP_CONFIG_app_baseUrl=https://staging.example.com`. However these
diff --git a/docs/conf/writing.md b/docs/conf/writing.md
index f28dd5b2d3..057675c98e 100644
--- a/docs/conf/writing.md
+++ b/docs/conf/writing.md
@@ -97,13 +97,13 @@ order:
- If no config flags are provided, `app-config.local.yaml` has higher priority
than `app-config.yaml`.
-## Secrets and Dynamic Data
+## Includes and Dynamic Data
-Secrets are supported via special data loading keys that are prefixed with `$`,
-which in turn provide a number of different ways to read in secrets. To load a
-configuration value as a secret, supply an object with one of the special secret
-keys, for example `$env` or `$file`. A full list of supported secret keys can be
-found below. For example, the following will read the config key
+Includes are supported via special data loading keys that are prefixed with `$`,
+which in turn provide a number of different ways to read in data. To load in an
+external configuration value, supply an object with one of the special include
+keys, for example `$env` or `$file`. A full list of supported include keys can
+be found below. For example, the following will read the config key
`backend.mySecretKey` from the environment variable `MY_SECRET_KEY`:
```yaml
@@ -114,43 +114,42 @@ backend:
With the above configuration, calling `config.getString('backend.mySecretKey')`
will return the value of the environment variable `MY_SECRET_KEY` when the
-backend started up. All secrets are loaded at startup, so changing the contents
-of secret files or environment variables will not be reflected at runtime.
+backend started up. All includes are loaded at startup, so changing the contents
+of files or environment variables will not be reflected at runtime.
-As hinted at, secrets can be loaded from a bunch of different sources, and can
-be extended with more. Below is a list of the currently supported methods for
-loading secrets.
+Below is a list of the currently supported methods for loading includes.
-### Env Secrets
+### Env Includes
-This reads a secret from an environment variable. For example, the following
-config loads the secret from the `MY_SECRET` env var.
+This reads a string value from an environment variable. For example, the
+following configuration loads the string value from the `MY_SECRET` environment
+variable.
```yaml
$env: MY_SECRET
```
-### File Secrets
+### File Includes
-This reads a secret from the entire contents of a file. The file path is
-relative to the `app-config.yaml` the defines the secrets. For example, the
-following reads the contents of `my-secret.txt` relative to the config file
-itself:
+This reads a string value from the entire contents of a text file. The file path
+is relative to the source config file. For example, the following reads the
+contents of `my-secret.txt` relative to the config file itself:
```yaml
$file: ./my-secret.txt
```
-### Data File Secrets
+### Including Files
-This reads secrets from a path within a JSON-like data file. The file path
-behaves similar to file secrets, but with the addition of a url fragment that is
-used to point to a specific value inside the file. Supported file extensions are
-`.json`, `.yaml`, and `.yml`. For example, the following would read out
-`my-secret-key` from `my-secrets.json`:
+The `$include` keyword can be used to load configuration values from an external
+file. It's able to load and parse data from `.json`, `.yml`, and `.yaml` files.
+It's also possible to include a url fragment (`#`) to point to a value at the
+given path in the file, using a dot-separated list of keys.
+
+For example, the following would read `my-secret-key` from `my-secrets.json`:
```yaml
-$data: ./my-secrets.json#deployment.key
+$include: ./my-secrets.json#deployment.key
```
Example `my-secrets.json` file:
@@ -162,3 +161,19 @@ Example `my-secrets.json` file:
}
}
```
+
+## Environment Variable Substitution
+
+Configuration files support environment variable substitution via a `${MY_VAR}`
+syntax. For example:
+
+```yaml
+app:
+ baseUrl: https://${HOST}
+```
+
+Note that all environment variables must be available, or the entire
+configuration value will evaluate to `undefined`.
+
+The substitution syntax can be escaped using `$${...}`, which will be resolved
+as `${...}`.
diff --git a/docs/dls/figma.md b/docs/dls/figma.md
index c5a33d15c2..21a05d2818 100644
--- a/docs/dls/figma.md
+++ b/docs/dls/figma.md
@@ -1,8 +1,8 @@
---
id: figma
title: Figma
-description: Documentation on using Figma to build your own plugins for
-Backstage
+# prettier-ignore
+description: Documentation on using Figma to build your own plugins for Backstage
---
We have a [Figma component library](https://www.figma.com/@backstage) that you
diff --git a/docs/features/kubernetes/index.md b/docs/features/kubernetes/index.md
new file mode 100644
index 0000000000..c468fdb116
--- /dev/null
+++ b/docs/features/kubernetes/index.md
@@ -0,0 +1,127 @@
+---
+id: overview
+title: Kubernetes
+sidebar_label: Overview
+description: Monitoring Kubernetes based services with the service catalog
+---
+
+Kubernetes in Backstage is a way to monitor your service's current status when
+it is deployed on Kubernetes.
+
+## Configuration
+
+Example:
+
+```yaml
+kubernetes:
+ serviceLocatorMethod: 'multiTenant'
+ clusterLocatorMethods:
+ - 'config'
+ clusters:
+ - url: http://127.0.0.1:9999
+ name: minikube
+ authProvider: 'serviceAccount'
+ serviceAccountToken:
+ $env: K8S_MINIKUBE_TOKEN
+ - url: http://127.0.0.2:9999
+ name: gke-cluster-1
+ authProvider: 'google'
+```
+
+### serviceLocatorMethod
+
+This configures how to determine which clusters a component is running in.
+
+Currently, the only valid value is:
+
+- `multiTenant` - This configuration assumes that all components run on all the
+ provided clusters.
+
+### clusterLocatorMethods
+
+This is an array used to determine where to retrieve cluster configuration from.
+
+Currently, the only valid cluster locator method is:
+
+- `config` - This cluster locator method will read cluster information from your
+ app-config (see below).
+
+### clusters
+
+Used by the `config` cluster locator method to construct Kubernetes clients.
+
+### clusters.\*.url
+
+The base URL to the Kubernetes control plane. Can be found by using the
+"Kubernetes master" result from running the `kubectl cluster-info` command.
+
+### clusters.\*.name
+
+A name to represent this cluster, this must be unique within the `clusters`
+array. Users will see this value in the Service Catalog Kubernetes plugin.
+
+### clusters.\*.authProvider
+
+This determines how the Kubernetes client authenticates with the Kubernetes
+cluster. Valid values are:
+
+| Value | Description |
+| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `serviceAccount` | This will use a Kubernetes [service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to access the Kubernetes API. When this is used the `serviceAccountToken` field should also be set. |
+| `google` | This will use a user's Google auth token from the [Google auth plugin](https://backstage.io/docs/auth/) to access the Kubernetes API. |
+
+### clusters.\*.serviceAccount (optional)
+
+The service account token to be used when using the `serviceAccount` auth
+provider.
+
+## Role Based Access Control
+
+The current RBAC permissions required are read-only cluster wide, for the
+following objects:
+
+- pods
+- services
+- configmaps
+- deployments
+- replicasets
+- horizontalpodautoscalers
+- ingresses
+
+## Surfacing your Kubernetes components as part of an entity
+
+There are two ways to surface your Kubernetes components as part of an entity.
+The label selector takes precedence over the annotation/service id.
+
+### Common `backstage.io/kubernetes-id` label
+
+#### Adding the entity annotation
+
+In order for Backstage to detect that an entity has Kubernetes components, the
+following annotation should be added to the entity's `catalog-info.yaml`:
+
+```yaml
+annotations:
+ 'backstage.io/kubernetes-id': dice-roller
+```
+
+#### Labeling Kubernetes components
+
+In order for Kubernetes components to show up in the service catalog as a part
+of an entity, Kubernetes components themselves can have the following label:
+
+```yaml
+'backstage.io/kubernetes-id':
+```
+
+### Label selector query annotation
+
+You can write your own custom label selector query that Backstage will use to
+lookup the objects (similar to `kubectl --selector="your query here"`). Review
+the
+[labels and selectors Kubernetes documentation](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
+for more info.
+
+```yaml
+'backstage.io/kubernetes-label-selector': 'app=my-app,component=front-end'
+```
diff --git a/docs/features/search/README.md b/docs/features/search/README.md
new file mode 100644
index 0000000000..0b13b47979
--- /dev/null
+++ b/docs/features/search/README.md
@@ -0,0 +1,100 @@
+---
+id: search-overview
+title: Search Documentation
+sidebar_label: Overview
+# prettier-ignore
+description: Backstage Search lets you find the right information you are looking for in the Backstage ecosystem.
+---
+
+# Backstage Search
+
+## What is it?
+
+Backstage Search lets you find the right information you are looking for in the
+Backstage ecosystem.
+
+## Features
+
+- A federated, faceted search, searching across all entities registered in your
+ Backstage instance.
+
+- A search that lets you plug in your own search engine of choice.
+
+- A standardized search API where you can choose to index other plugins data.
+
+## Project roadmap
+
+| Version | Description |
+| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Backstage Search V.0 ✅ | Search Frontend letting you search through the entities of the software catalog. [See V.0 Use Cases.](#backstage-search-v0) |
+| Backstage Search V.1 ⌛ | Basic “out-of-the-box” in-memory indexing process of entities, and their metadata, registered to the Software Catalog. [See V.1 Use Cases.](#backstage-search-v1) |
+| Backstage Search V.2 ⌛ | Search Backend responsible for the indexing process of entities, and their metadata, registered to the Software Catalog. [See V.2 Use Cases.](#backstage-search-v2) |
+| Backstage Search V.3 ⌛ | Standardized Search API lets you index other plugins data to the search engine of choice. [See V.3 Use Cases.](#backstage-search-v3) |
+
+## Use Cases
+
+#### Backstage Search V.0
+
+- As a software engineer I should be able to navigate to a search page and
+ search for entities registered in the Software Catalog.
+- As a software engineer I should be able to use the search input field in the
+ sidebar to search for entities registered in the Software Catalog.
+- As a software engineer I should be able to see the number of results my search
+ returned.
+- As a software engineer I should be able to filter on metadata (kind,
+ lifecycle) when I’ve performed a search.
+- As a software engineer I should be able to hide the filters if I don’t need to
+ use them.
+
+#### Backstage Search V.1
+
+- As a software engineer I should be able to get a match of a search on all
+ entity metadata (e.g. owner, name, description, kind).
+- As an integrator I should not have to plug in any search engine, instead I can
+ use the out of the box in-memory indexing process to index entities and their
+ metadata registered in the Software Catalog.
+
+#### Backstage Search V.2
+
+- As an integrator I should be able to spin up an instance of ElasticSearch.
+- As an integrator I should be able to define a ElasticSearch cluster in my
+ app_config.yaml where my data gets indexed to.
+
+more to come...
+
+#### Backstage Search V.3
+
+- As a contributor I should be able to integrate plugin data to the indexing
+ process of Backstage Search by using the standardized API.
+- As a software engineer I should be able to search for all content (for
+ example, entities, metadata, documentation) in backstage search.
+
+more to come...
+
+## Search Engines Supported
+
+See [Backstage Search Architecture](architecture.md) to get an overview of how
+the search engines are used.
+
+| Search Engine | Support Status |
+| ------------- | -------------- |
+| ElasticSearch | Not yet ❌ |
+
+[Reach out to us](#feedback) if you want to chat about support for more search
+engines.
+
+## Tech Stack
+
+| Stack | Location |
+| --------------- | ------------------------ |
+| Frontend Plugin | @backstage/plugin-search |
+| Backend Plugin | ⌛ |
+
+## Feedback
+
+For any questions of feedback, reach out to us in the `#search` channel of our
+[Discord chatroom](https://github.com/backstage/backstage#community).
+
+We are still looking for feedback to improve the architecture to fit your
+use-case, see
+[this open issue](https://github.com/backstage/backstage/issues/4078).
diff --git a/docs/features/search/architecture.md b/docs/features/search/architecture.md
new file mode 100644
index 0000000000..3075719b9d
--- /dev/null
+++ b/docs/features/search/architecture.md
@@ -0,0 +1,39 @@
+---
+id: architecture
+title: Search Architecture
+description: Documentation on Search Architecture
+---
+
+# Search Architecture
+
+> _This is a proposed architecture which has not been implemented yet. We are
+> still looking for feedback to improve the architecture to fit your use-case,
+> see [this open issue](https://github.com/backstage/backstage/issues/4078)._
+
+Below you can explore the Search Architecture. Our aim with this architecture is
+to support a wide variety of search engines, while providing a simple developer
+experience for plugin developers, and a good out-of-the-box experience for
+Backstage end-users.
+
+
+
+At a base-level, we want to support the following:
+
+- We aim to enable the capability to search across the entire Backstage
+ ecosystem by decoupling search from content management.
+- We aim to enable the capability to deploy Backstage using any search engine,
+ by providing an integration and translation layer between the core search
+ plugin and search engine specific logic that can be extended for different
+ search engines. We may also introduce the ability to replace the backend API
+ endpoint with a custom endpoint for simpler customization.
+
+More advanced use-cases we hope to support with this architecture include:
+
+- It should be easy for any plugin to expose new content to search. (e.g. entity
+ metadata, documentation from TechDocs)
+- It should be easy for any plugin to append relevant metadata to existing
+ content in search. (e.g. location (path) for TechDocs page)
+- It should be easy to refine search queries (e.g. ranking, scoring, etc.)
+- It should be easy to customize the search UI
+- It should be easy to add search functionality to any Backstage plugin or
+ deployment
diff --git a/docs/features/software-catalog/configuration.md b/docs/features/software-catalog/configuration.md
index d10fb29e30..d5ad240dde 100644
--- a/docs/features/software-catalog/configuration.md
+++ b/docs/features/software-catalog/configuration.md
@@ -60,7 +60,7 @@ data from. Each entry is a structure with up to four elements:
and raw. If it is not supplied, anonymous access will be used.
- `apiBaseUrl` (optional): If you want to communicate using the APIv3 method
with this provider, specify the base URL for its endpoint here, with no
- trailing slash. Specifically when the target is github, you can leave it out
+ trailing slash. Specifically when the target is GitHub, you can leave it out
to be inferred automatically. For a GitHub Enterprise installation, it is
commonly at `https://api.` or `https:///api/v3`.
- `rawBaseUrl` (optional): If you want to communicate using the raw HTTP method
diff --git a/docs/features/software-catalog/descriptor-format.md b/docs/features/software-catalog/descriptor-format.md
index 763acd2261..2b173c4b3e 100644
--- a/docs/features/software-catalog/descriptor-format.md
+++ b/docs/features/software-catalog/descriptor-format.md
@@ -60,7 +60,7 @@ software catalog API.
},
"spec": {
"lifecycle": "production",
- "owner": "artist-relations@example.com",
+ "owner": "artist-relations-team",
"type": "website"
}
}
@@ -84,7 +84,7 @@ metadata:
spec:
type: website
lifecycle: production
- owner: artist-relations@example.com
+ owner: artist-relations-team
```
The root fields `apiVersion`, `kind`, `metadata`, and `spec` are part of the
@@ -131,6 +131,19 @@ spec:
$text: https://petstore.swagger.io/v2/swagger.json
```
+Note that to be able to read from targets that are outside of the normal
+integration points such as `github.com`, you'll need to explicitly allow it by
+adding an entry in the `backend.reading.allow` list. For example:
+
+```yml
+backend:
+ baseUrl: ...
+ reading:
+ allow:
+ - host: example.com
+ - host: '*.examples.org'
+```
+
## Common to All Kinds: The Envelope
The root envelope object has the following structure.
@@ -268,7 +281,7 @@ identical in use to
Their purpose is mainly, but not limited, to reference into external systems.
This could for example be a reference to the git ref the entity was ingested
-from, to monitoring and logging systems, to pagerduty schedules, etc. Users may
+from, to monitoring and logging systems, to PagerDuty schedules, etc. Users may
add these to descriptor YAML files, but in addition to this automated systems
may also add annotations, either during ingestion into the catalog, or at a
later time.
@@ -381,7 +394,8 @@ metadata:
spec:
type: website
lifecycle: production
- owner: artist-relations@example.com
+ owner: artist-relations-team
+ system: artist-engagement-portal
providesApis:
- artist-api
```
@@ -427,8 +441,8 @@ The current set of well-known and common values for this field is:
### `spec.owner` [required]
-The owner of the component, e.g. `artist-relations@example.com`. This field is
-required.
+An [entity reference](#string-references) to the owner of the component, e.g.
+`artist-relations-team`. This field is required.
In Backstage, the owner of a component is the singular entity (commonly a team)
that bears ultimate responsibility for the component, and has the authority and
@@ -440,25 +454,45 @@ not to be used by automated processes to for example assign authorization in
runtime systems. There may be others that also develop or otherwise touch the
component, but there will always be one ultimate owner.
-Apart from being a string, the software catalog leaves the format of this field
-open to implementers to choose. Most commonly, it is set to the ID or email of a
-group of people in an organizational structure.
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| ------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default), [`User`](#kind-user) | Same as this entity, typically `default` | [`ownerOf`, and reverse `ownedBy`](well-known-relations.md#ownedby-and-ownerof) |
+
+### `spec.system` [optional]
+
+An [entity reference](#string-references) to the system that the component
+belongs to, e.g. `artist-engagement-portal`. This field is optional.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------- |
+| [`System`](#kind-system) (default) | Same as this entity, typically `default` | [`partOf`, and reverse `hasPart`](well-known-relations.md#partof-and-haspart) |
+
+### `spec.subcomponentOf` [optional]
+
+An [entity reference](#string-references) to another component of which the
+component is a part, e.g. `spotify-ios-app`. This field is optional.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| ---------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------- |
+| [`Component`](#kind-component) (default) | Same as this entity, typically `default` | [`partOf`, and reverse `hasPart`](well-known-relations.md#partof-and-haspart) |
### `spec.providesApis` [optional]
-Links APIs that are provided by the component, e.g. `artist-api`. This field is
-optional.
+An array of [entity references](#string-references) to the APIs that are
+provided by the component, e.g. `artist-api`. This field is optional.
-The software catalog expects a list of one or more strings that references the
-names of other entities of the `kind` `API`.
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------- |
+| [`API`](#kind-api) (default) | Same as this entity, typically `default` | [`providesApi`, and reverse `apiProvidedBy`](well-known-relations.md#providesapi-and-apiprovidedby) |
### `spec.consumesApis` [optional]
-Links APIs that are consumed by the component, e.g. `artist-api`. This field is
-optional.
+An array of [entity references](#string-references) to the APIs that are
+consumed by the component, e.g. `artist-api`. This field is optional.
-The software catalog expects a list of one or more strings that references the
-names of other entities of the `kind` `API`.
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------- |
+| [`API`](#kind-api) (default) | Same as this entity, typically `default` | [`consumesApi`, and reverse `apiConsumedBy`](well-known-relations.md#consumesapi-and-apiconsumedby) |
## Kind: Template
@@ -597,7 +631,8 @@ metadata:
spec:
type: openapi
lifecycle: production
- owner: artist-relations@example.com
+ owner: artist-relations-team
+ system: artist-engagement-portal
definition: |
openapi: "3.0.0"
info:
@@ -663,8 +698,8 @@ The current set of well-known and common values for this field is:
### `spec.owner` [required]
-The owner of the API, e.g. `artist-relations@example.com`. This field is
-required.
+An [entity reference](#string-references) to the owner of the component, e.g.
+`artist-relations-team`. This field is required.
In Backstage, the owner of an API is the singular entity (commonly a team) that
bears ultimate responsibility for the API, and has the authority and capability
@@ -676,9 +711,18 @@ processes to for example assign authorization in runtime systems. There may be
others that also develop or otherwise touch the API, but there will always be
one ultimate owner.
-Apart from being a string, the software catalog leaves the format of this field
-open to implementers to choose. Most commonly, it is set to the ID or email of a
-group of people in an organizational structure.
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| ------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default), [`User`](#kind-user) | Same as this entity, typically `default` | [`ownerOf`, and reverse `ownedBy`](well-known-relations.md#ownedby-and-ownerof) |
+
+### `spec.system` [optional]
+
+An [entity reference](#string-references) to the system that the API belongs to,
+e.g. `artist-engagement-portal`. This field is optional.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------- |
+| [`System`](#kind-system) (default) | Same as this entity, typically `default` | [`partOf`, and reverse `hasPart`](well-known-relations.md#partof-and-haspart) |
### `spec.definition` [required]
@@ -751,11 +795,11 @@ parent; the catalog supports multi-root hierarchies. Groups may however not have
more than one parent.
This field is an
-[entity reference](https://backstage.io/docs/features/software-catalog/references),
-with the default kind `Group` and the default namespace equal to the same
-namespace as the user. Only `Group` entities may be referenced. Most commonly,
-this field points to a group in the same namespace, so in those cases it is
-sufficient to enter only the `metadata.name` field of that group.
+[entity reference](https://backstage.io/docs/features/software-catalog/references).
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default) | Same as this entity, typically `default` | [`childOf`, and reverse `parentOf`](well-known-relations.md#parentof-and-childof) |
### `spec.children` [required]
@@ -765,11 +809,11 @@ no child groups. The items are not guaranteed to be ordered in any particular
way.
The entries of this array are
-[entity references](https://backstage.io/docs/features/software-catalog/references),
-with the default kind `Group` and the default namespace equal to the same
-namespace as the user. Only `Group` entities may be referenced. Most commonly,
-these entries point to groups in the same namespace, so in those cases it is
-sufficient to enter only the `metadata.name` field of those groups.
+[entity references](https://backstage.io/docs/features/software-catalog/references).
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default) | Same as this entity, typically `default` | [`hasMember`, and reverse `memberOf`](well-known-relations.md#memberof-and-hasmember) |
## Kind: User
@@ -825,23 +869,200 @@ user is not member of any groups. The items are not guaranteed to be ordered in
any particular way.
The entries of this array are
-[entity references](https://backstage.io/docs/features/software-catalog/references),
-with the default kind `Group` and the default namespace equal to the same
-namespace as the user. Only `Group` entities may be referenced. Most commonly,
-these entries point to groups in the same namespace, so in those cases it is
-sufficient to enter only the `metadata.name` field of those groups.
+[entity references](https://backstage.io/docs/features/software-catalog/references).
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default) | Same as this entity, typically `default` | [`memberOf`, and reverse `hasMember`](well-known-relations.md#memberof-and-hasmember) |
## Kind: Resource
-This kind is not yet defined, but is reserved [for future use](system-model.md).
+Describes the following entity kind:
+
+| Field | Value |
+| ------------ | ----------------------- |
+| `apiVersion` | `backstage.io/v1alpha1` |
+| `kind` | `Resource` |
+
+A resource describes the infrastructure a system needs to operate, like BigTable
+databases, Pub/Sub topics, S3 buckets or CDNs. Modelling them together with
+components and systems allows to visualize resource footprint, and create
+tooling around them.
+
+Descriptor files for this kind may look as follows.
+
+```yaml
+apiVersion: backstage.io/v1alpha1
+kind: Resource
+metadata:
+ name: artists-db
+ description: Stores artist details
+spec:
+ type: database
+ owner: artist-relations-team
+ system: artist-engagement-portal
+```
+
+In addition to the [common envelope metadata](#common-to-all-kinds-the-metadata)
+shape, this kind has the following structure.
+
+### `apiVersion` and `kind` [required]
+
+Exactly equal to `backstage.io/v1alpha1` and `Resource`, respectively.
+
+### `spec.owner` [required]
+
+An [entity reference](#string-references) to the owner of the resource, e.g.
+`artist-relations-team`. This field is required.
+
+In Backstage, the owner of a resource is the singular entity (commonly a team)
+that bears ultimate responsibility for the resource, and has the authority and
+capability to develop and maintain it. They will be the point of contact if
+something goes wrong, or if features are to be requested. The main purpose of
+this field is for display purposes in Backstage, so that people looking at
+catalog items can get an understanding of to whom this resource belongs. It is
+not to be used by automated processes to for example assign authorization in
+runtime systems. There may be others that also manage or otherwise touch the
+resource, but there will always be one ultimate owner.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| ------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default), [`User`](#kind-user) | Same as this entity, typically `default` | [`ownerOf`, and reverse `ownedBy`](well-known-relations.md#ownedby-and-ownerof) |
+
+### `spec.type` [required]
+
+The type of resource as a string, e.g. `database`. This field is required. There
+is currently no enforced set of values for this field, so it is left up to the
+adopting organization to choose a nomenclature that matches the resources used
+in their tech stack.
+
+Some common values for this field could be:
+
+- `database`
+- `s3-bucket`
+- `cluster`
+
+### `spec.system` [optional]
+
+An [entity reference](#string-references) to the system that the resource
+belongs to, e.g. `artist-engagement-portal`. This field is optional.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------- |
+| [`System`](#kind-system) (default) | Same as this entity, typically `default` | [`partOf`, and reverse `hasPart`](well-known-relations.md#partof-and-haspart) |
## Kind: System
-This kind is not yet defined, but is reserved [for future use](system-model.md).
+Describes the following entity kind:
+
+| Field | Value |
+| ------------ | ----------------------- |
+| `apiVersion` | `backstage.io/v1alpha1` |
+| `kind` | `System` |
+
+A system is a collection of resources and components. The system may expose or
+consume one or several APIs. It is viewed as abstraction level that provides
+potential consumers insights into exposed features without needing a too
+detailed view into the details of all components. This also gives the owning
+team the possibility to decide about published artifacts and APIs.
+
+Descriptor files for this kind may look as follows.
+
+```yaml
+apiVersion: backstage.io/v1alpha1
+kind: System
+metadata:
+ name: artist-engagement-portal
+ description: Handy tools to keep artists in the loop
+spec:
+ owner: artist-relations-team
+ domain: artists
+```
+
+In addition to the [common envelope metadata](#common-to-all-kinds-the-metadata)
+shape, this kind has the following structure.
+
+### `apiVersion` and `kind` [required]
+
+Exactly equal to `backstage.io/v1alpha1` and `System`, respectively.
+
+### `spec.owner` [required]
+
+An [entity reference](#string-references) to the owner of the system, e.g.
+`artist-relations-team`. This field is required.
+
+In Backstage, the owner of a system is the singular entity (commonly a team)
+that bears ultimate responsibility for the system, and has the authority and
+capability to develop and maintain it. They will be the point of contact if
+something goes wrong, or if features are to be requested. The main purpose of
+this field is for display purposes in Backstage, so that people looking at
+catalog items can get an understanding of to whom this system belongs. It is not
+to be used by automated processes to for example assign authorization in runtime
+systems. There may be others that also develop or otherwise touch the system,
+but there will always be one ultimate owner.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| ------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default), [`User`](#kind-user) | Same as this entity, typically `default` | [`ownerOf`, and reverse `ownedBy`](well-known-relations.md#ownedby-and-ownerof) |
+
+### `spec.domain` [optional]
+
+An [entity reference](#string-references) to the domain that the system belongs
+to, e.g. `artists`. This field is optional.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| --------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------- |
+| [`Domain`](#kind-domain) (default) | Same as this entity, typically `default` | [`partOf`, and reverse `hasPart`](well-known-relations.md#partof-and-haspart) |
## Kind: Domain
-This kind is not yet defined, but is reserved [for future use](system-model.md).
+Describes the following entity kind:
+
+| Field | Value |
+| ------------ | ----------------------- |
+| `apiVersion` | `backstage.io/v1alpha1` |
+| `kind` | `Domain` |
+
+A Domain groups a collection of systems that share terminology, domain models,
+business purpose, or documentation, i.e. form a bounded context.
+
+Descriptor files for this kind may look as follows.
+
+```yaml
+apiVersion: backstage.io/v1alpha1
+kind: Domain
+metadata:
+ name: artists
+ description: Everything about artists
+spec:
+ owner: artist-relations-team
+```
+
+In addition to the [common envelope metadata](#common-to-all-kinds-the-metadata)
+shape, this kind has the following structure.
+
+### `apiVersion` and `kind` [required]
+
+Exactly equal to `backstage.io/v1alpha1` and `Domain`, respectively.
+
+### `spec.owner` [required]
+
+An [entity reference](#string-references) to the owner of the domain, e.g.
+`artist-relations-team`. This field is required.
+
+In Backstage, the owner of a domain is the singular entity (commonly a team)
+that bears ultimate responsibility for the domain, and has the authority and
+capability to develop and maintain it. They will be the point of contact if
+something goes wrong, or if features are to be requested. The main purpose of
+this field is for display purposes in Backstage, so that people looking at
+catalog items can get an understanding of to whom this domain belongs. It is not
+to be used by automated processes to for example assign authorization in runtime
+systems. There may be others that also develop or otherwise touch the domain,
+but there will always be one ultimate owner.
+
+| [`kind`](#apiversion-and-kind-required) | Default [`namespace`](#namespace-optional) | Generated [relation](well-known-relations.md) type |
+| ------------------------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------- |
+| [`Group`](#kind-group) (default), [`User`](#kind-user) | Same as this entity, typically `default` | [`ownerOf`, and reverse `ownedBy`](well-known-relations.md#ownedby-and-ownerof) |
## Kind: Location
diff --git a/docs/features/software-catalog/external-integrations.md b/docs/features/software-catalog/external-integrations.md
index e7d253f11e..e278bc7a1a 100644
--- a/docs/features/software-catalog/external-integrations.md
+++ b/docs/features/software-catalog/external-integrations.md
@@ -94,7 +94,7 @@ The recommended way of instantiating the catalog backend classes is to use the
as illustrated in the
[example backend here](https://github.com/backstage/backstage/blob/master/packages/backend/src/plugins/catalog.ts).
We will create a new
-[`CatalogProcessor`](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/src/ingestion/types.ts)
+[`CatalogProcessor`](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/src/ingestion/processors/types.ts)
subclass that can be added to this catalog builder.
It is up to you where you put the code for this new processor class. For quick
diff --git a/docs/features/software-catalog/system-model.md b/docs/features/software-catalog/system-model.md
index 53f49d5df9..f0ead20664 100644
--- a/docs/features/software-catalog/system-model.md
+++ b/docs/features/software-catalog/system-model.md
@@ -23,7 +23,7 @@ We model software in the Backstage catalogue using these three core entities
- **Resources** are physical or virtual infrastructure needed to operate a
component
-
+
### Component
@@ -44,8 +44,8 @@ Backstage model and the primary way to discover existing functionality in the
ecosystem.
APIs are implemented by components and form boundaries between components. They
-might be defined using an RPC IDL (eg Protobuf, GraphQL, ...), a data schema (eg
-Avro, TFRecord, ...), or as code interfaces. In any case, APIs exposed by
+might be defined using an RPC IDL (e.g., Protobuf, GraphQL, ...), a data schema
+(e.g., Avro, TFRecord, ...), or as code interfaces. In any case, APIs exposed by
components need to be in a known machine-readable format so we can build further
tooling and analysis on top.
@@ -73,6 +73,8 @@ these entities using the following (optional) concepts:
function
- **Domains** relate entities and systems to part of the business
+
+
### System
With increasing complexity in software, systems form an important abstraction
@@ -107,10 +109,6 @@ product or use-case, share the same entity types in their APIs, and integrate
well with each other. Other domains could be “Content Ingestion”, “Ads” or
“Search”.
-## Current status
-
-Backstage currently supports Components and APIs.
-
## Links
- [Original RFC](https://github.com/backstage/backstage/issues/390)
diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md
index 3627c74b9a..2cbb829554 100644
--- a/docs/features/software-catalog/well-known-annotations.md
+++ b/docs/features/software-catalog/well-known-annotations.md
@@ -22,7 +22,7 @@ use.
# Example:
metadata:
annotations:
- backstage.io/managed-by-location: github:http://github.com/backstage/backstage/catalog-info.yaml
+ backstage.io/managed-by-location: url:http://github.com/backstage/backstage/blob/master/catalog-info.yaml
```
The value of this annotation is a so called location reference string, that
@@ -30,8 +30,8 @@ points to the source from which the entity was originally fetched. This
annotation is added automatically by the catalog as it fetches the data from a
registered location, and is not meant to normally be written by humans. The
annotation may point to any type of generic location that the catalog supports,
-so it cannot be relied on to always be specifically of type `github`, nor that
-it even represents a single file. Note also that a single location can be the
+so it cannot be relied on to always be specifically of type `url`, nor that it
+even represents a single file. Note also that a single location can be the
source of many entities, so it represents a many-to-one relationship.
The format of the value is `:`. Note that the target may also
@@ -40,13 +40,30 @@ expecting a two-item array out of it. The format of the target part is
type-dependent and could conceivably even be an empty string, but the separator
colon is always present.
+### backstage.io/managed-by-origin-location
+
+```yaml
+# Example:
+metadata:
+ annotations:
+ backstage.io/managed-by-origin-location: url:http://github.com/backstage/backstage/blob/master/catalog-info.yaml
+```
+
+The value of this annotation is a location reference string (see above). It
+points to the location, whose registration lead to the creation of the entity.
+In most cases, the `backstage.io/managed-by-location` and
+`backstage.io/managed-by-origin-location` will be equal. They will be different
+if the original location delegates to another location. A common case is, that a
+location is registered as `bootstrap:bootstrap` which means that it is part of
+the `app-config.yaml` of a Backstage installation.
+
### backstage.io/techdocs-ref
```yaml
# Example:
metadata:
annotations:
- backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git
+ backstage.io/techdocs-ref: url:https://github.com/backstage/backstage/tree/master
```
The value of this annotation is a location reference string (see above). If this
diff --git a/docs/features/software-catalog/well-known-relations.md b/docs/features/software-catalog/well-known-relations.md
index 54f7833d1b..6fb7ae2fea 100644
--- a/docs/features/software-catalog/well-known-relations.md
+++ b/docs/features/software-catalog/well-known-relations.md
@@ -48,11 +48,10 @@ where present.
### `providesApi` and `apiProvidedBy`
A relation with an [API](descriptor-format.md#kind-api) entity, typically from a
-[Component](descriptor-format.md#kind-component) or
-[System](descriptor-format.md#kind-system).
+[Component](descriptor-format.md#kind-component).
-These relations express that a component or system exposes an API - meaning that
-it hosts callable endpoints from which you can consume that API.
+These relations express that a component exposes an API - meaning that it hosts
+callable endpoints from which you can consume that API.
This relation is commonly generated based on `spec.providesApis` of the
component or system in question.
@@ -60,11 +59,10 @@ component or system in question.
### `consumesApi` and `apiConsumedBy`
A relation with an [API](descriptor-format.md#kind-api) entity, typically from a
-[Component](descriptor-format.md#kind-component) or
-[System](descriptor-format.md#kind-system).
+[Component](descriptor-format.md#kind-component).
-These relations express that a component or system consumes an API - meaning
-that it depends on endpoints of the API.
+These relations express that a component consumes an API - meaning that it
+depends on endpoints of the API.
This relation is commonly generated based on `spec.consumesApis` of the
component or system in question.
@@ -91,3 +89,18 @@ A membership relation, typically for [Users](descriptor-format.md#kind-user) in
[Groups](descriptor-format.md#kind-group).
This relation is commonly based on `spec.memberOf`.
+
+### `partOf` and `hasPart`
+
+A relation with a [Domain](descriptor-format.md#kind-domain),
+[System](descriptor-format.md#kind-system) or
+[Component](descriptor-format.md#kind-component) entity, typically from a
+[Component](descriptor-format.md#kind-component),
+[API](descriptor-format.md#kind-api), or
+[System](descriptor-format.md#kind-system).
+
+These relations express that a component belongs to a larger component; a
+component, API or resource belongs to a system; or that a system is grouped
+under a domain.
+
+This relation is commonly based on `spec.system` or `spec.domain`.
diff --git a/docs/features/software-templates/extending/create-your-own-publisher.md b/docs/features/software-templates/extending/create-your-own-publisher.md
index 97854c999a..5e2809e006 100644
--- a/docs/features/software-templates/extending/create-your-own-publisher.md
+++ b/docs/features/software-templates/extending/create-your-own-publisher.md
@@ -57,7 +57,7 @@ That type looks like the following:
export type PublisherBase = {
publish(opts: {
entity: TemplateEntityV1alpha1;
- values: RequiredTemplateValues & Record;
+ values: TemplaterValues;
directory: string;
}): Promise<{ remoteUrl: string }>;
};
diff --git a/docs/features/software-templates/extending/create-your-own-templater.md b/docs/features/software-templates/extending/create-your-own-templater.md
index 63acd38286..37e68c4153 100644
--- a/docs/features/software-templates/extending/create-your-own-templater.md
+++ b/docs/features/software-templates/extending/create-your-own-templater.md
@@ -61,7 +61,7 @@ That type looks like the following:
```ts
export type TemplaterRunOptions = {
directory: string;
- values: RequiredTemplateValues & Record;
+ values: TemplaterValues;
logStream?: Writable;
dockerClient: Docker;
};
@@ -86,10 +86,11 @@ follows:
_note_ Currently the templaters that we provide are basically Docker action
containers that are run on top of the skeleton folder. This keeps dependencies
-to a minimal for running backstage scaffolder, but you don't /have/ to use
-Docker. You could create your own templater that spins up an EC2 instance and
-downloads the folder and does everything using an AMI if you want. It's entirely
-up to you!
+to a minimum for running backstage scaffolder, but you don't _have_ to use
+Docker. You can `pip install cookiecutter` to run it locally in your backend.
+You could create your own templater that spins up an EC2 instance and downloads
+the folder and does everything using an AMI if you want. It's entirely up to
+you!
Now it's up to you to implement the `run` function, and then return a
`TemplaterRunResult` which is `{ resultDir: string }`.
diff --git a/docs/features/software-templates/index.md b/docs/features/software-templates/index.md
index 3ebb426466..1034ffef0f 100644
--- a/docs/features/software-templates/index.md
+++ b/docs/features/software-templates/index.md
@@ -2,8 +2,8 @@
id: software-templates-index
title: Backstage Software Templates
sidebar_label: Overview
-description: The Software Templates part of Backstage is a tool that can help
-you create Components inside Backstage
+# prettier-ignore
+description: The Software Templates part of Backstage is a tool that can help you create Components inside Backstage
---
The Software Templates part of Backstage is a tool that can help you create
diff --git a/docs/features/techdocs/README.md b/docs/features/techdocs/README.md
index 50cadc7b27..c43d6d978d 100644
--- a/docs/features/techdocs/README.md
+++ b/docs/features/techdocs/README.md
@@ -2,8 +2,8 @@
id: techdocs-overview
title: TechDocs Documentation
sidebar_label: Overview
-description: TechDocs is Spotify’s homegrown docs-like-code solution built
-directly into Backstage
+# prettier-ignore
+description: TechDocs is Spotify’s homegrown docs-like-code solution built directly into Backstage
---
## What is it?
@@ -45,8 +45,6 @@ about TechDocs and the philosophy in its
[v2]: https://github.com/backstage/backstage/milestone/22
[v3]: https://github.com/backstage/backstage/milestone/17
-
-
## Use Cases
#### TechDocs V.0
@@ -110,12 +108,12 @@ providers are used.
| GitLab | Yes ✅ |
| GitLab Enterprise | Yes ✅ |
-| File Storage Provider | Support Status | Track status |
-| --------------------------------- | -------------- | ----------------------------------------------------------- |
-| Local Filesystem of Backstage app | Yes ✅ | |
-| Google Cloud Storage (GCS) | Yes ✅ | |
-| Amazon Web Services (AWS) S3 | No ❌ | [#3714](https://github.com/backstage/backstage/issues/3714) |
-| Azure Storage | No ❌ | |
+| File Storage Provider | Support Status |
+| --------------------------------- | ----------------------------------------------------------------- |
+| Local Filesystem of Backstage app | Yes ✅ |
+| Google Cloud Storage (GCS) | Yes ✅ |
+| Amazon Web Services (AWS) S3 | Yes ✅ |
+| Azure Storage | No ❌ [#3938](https://github.com/backstage/backstage/issues/3938) |
[Reach out to us](#feedback) if you want to request more platforms.
diff --git a/docs/features/techdocs/architecture.md b/docs/features/techdocs/architecture.md
index 7c35fbc943..92cd78b071 100644
--- a/docs/features/techdocs/architecture.md
+++ b/docs/features/techdocs/architecture.md
@@ -123,6 +123,20 @@ a cache for the generated static content. TechDocs is also currently built on
MkDocs which does not allow us to generate docs per-page, so we would have to
build all docs for a entity on every request.
+**Q. Can you use the techdocs plugin without the techdocs-backend plugin?**
+
+A: `techdocs` and `techdocs-backend` plugins are designed to be used together,
+like any other Backstage plugin with a frontend and its backend (catalog,
+scaffolder, etc.). If you set your Backstage instance to generate docs on the
+server, `techdocs-backend` will be responsible for managing the whole build
+process, making sure it's scalable. It is responsible for securely communicating
+with the cloud storage provider, for both fetching static generated sites and
+publishing the updates. There are other planned features like an authentication
+layer for users to determine whether they have the permission to view a
+particular docs site. There are a handful of features which are extremely hard
+to develop without a tightly integrated backend in place. Hence, support for
+`techdocs` without `techdocs-backend` is limited and challenging to develop.
+
# Future work
_Ideas here are far fetched and not in the project's milestone for near future
@@ -142,12 +156,11 @@ Status of all the features mentioned above.
- Basic setup with techdocs-backend file server as storage.
- Basic setup with cloud storage solution.
-
-**Work in progress 🚧**
-
- `techdocs-cli` is able to generate docs in CI/CD environment.
- `techdocs-cli` is able to publish docs site to any storage.
+**Work in progress 🚧**
+
**Not implemented yet ❌**
- `techdocs-backend` integration with Backstage access control management.
diff --git a/docs/features/techdocs/concepts.md b/docs/features/techdocs/concepts.md
index 26254a7e12..408f092ebd 100644
--- a/docs/features/techdocs/concepts.md
+++ b/docs/features/techdocs/concepts.md
@@ -1,8 +1,8 @@
---
id: concepts
title: Concepts
-description: Documentation on concepts that are introduced with
-Spotify's docs-like-code solution in Backstage
+# prettier-ignore
+description: Documentation on concepts that are introduced with Spotify's docs-like-code solution in Backstage
---
This page describes concepts that are introduced with Spotify's docs-like-code
diff --git a/docs/features/techdocs/configuration.md b/docs/features/techdocs/configuration.md
index b3cb349778..1580abe69e 100644
--- a/docs/features/techdocs/configuration.md
+++ b/docs/features/techdocs/configuration.md
@@ -1,8 +1,8 @@
---
id: configuration
title: TechDocs Configuration Options
-description:
- Reference documentation for configuring TechDocs using app-config.yaml
+# prettier-ignore
+description: Reference documentation for configuring TechDocs using app-config.yaml
---
Using the `app-config.yaml` in the Backstage app, you can configure TechDocs
@@ -13,18 +13,15 @@ configuration options for TechDocs.
# File: app-config.yaml
techdocs:
-
# TechDocs makes API calls to techdocs-backend using this URL. e.g. get docs of an entity, get metadata, etc.
requestUrl: http://localhost:7000/api/techdocs
-
# Just another route in techdocs-backend where TechDocs requests the static files from. This URL uses an HTTP middleware
# to serve files from either a local directory or an External storage provider.
storageUrl: http://localhost:7000/api/techdocs/static/docs
-
# 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
@@ -34,7 +31,6 @@ techdocs:
generators:
techdocs: 'docker'
-
# 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
# and show the generated docs afterwords. This is the "Basic" setup of the TechDocs Architecture.
@@ -44,30 +40,48 @@ techdocs:
builder: 'local'
-
# techdocs.publisher is used to configure the Storage option, whether you want to use the local filesystem to store generated docs
# or you want to use External storage providers like Google Cloud Storage, AWS S3, etc.
publisher:
-
- # techdocs.publisher.type can be - 'local' or 'googleGcs' (awsS3, azureStorage, etc. to be available as well).
+ # techdocs.publisher.type can be - 'local' or 'googleGcs' or 'awsS3' (azureStorage to be available in future).
# When set to 'local', techdocs-backend will create a 'static' directory at its root to store generated documentation files.
# When set to 'googleGcs', techdocs-backend will use a Google Cloud Storage Bucket to store generated documentation files.
+ # When set to 'awsS3', techdocs-backend will use an Amazon Web Service (AWS) S3 bucket to store generated documentation files.
type: 'local'
-
# Required when techdocs.publisher.type is set to 'googleGcs'. Skip otherwise.
googleGcs:
- # An API key is required to write to a storage bucket.
+ # (Required) Cloud Storage Bucket Name
+ bucketName: 'techdocs-storage'
+
+ # (Optional) An API key is required to write to a storage bucket.
+ # If missing, GOOGLE_APPLICATION_CREDENTIALS environment variable will be used.
+ # https://cloud.google.com/docs/authentication/production
credentials:
- $file: '/path/to/google_application_credentials.json',
+ $file: '/path/to/google_application_credentials.json'
- # Your GCP Project ID where the Cloud Storage Bucket is hosted.
- projectId: 'gcp-project-id'
+ # Required when techdocs.publisher.type is set to 'awsS3'. Skip otherwise.
- # Cloud Storage Bucket Name
- bucketName: 'techdocs-storage',
+ awsS3:
+ # (Required) AWS S3 Bucket Name
+ bucketName: 'techdocs-storage'
+ # (Optional) An API key is required to write to a storage bucket.
+ # If not set, environment variables or aws config file will be used to authenticate.
+ # https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html
+ # https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html
+ credentials:
+ accessKeyId:
+ $env: TECHDOCS_AWSS3_ACCESS_KEY_ID_CREDENTIAL
+ secretAccessKey:
+ $env: TECHDOCS_AWSS3_SECRET_ACCESS_KEY_CREDENTIAL
+
+ # (Optional) AWS Region of the bucket.
+ # If not set, AWS_REGION environment variable or aws config file will be used.
+ # https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html
+ region:
+ $env: AWS_REGION
```
diff --git a/docs/features/techdocs/configuring-ci-cd.md b/docs/features/techdocs/configuring-ci-cd.md
new file mode 100644
index 0000000000..5841a02fa8
--- /dev/null
+++ b/docs/features/techdocs/configuring-ci-cd.md
@@ -0,0 +1,98 @@
+---
+id: configuring-ci-cd
+title: Configuring CI/CD to generate and publish TechDocs sites
+# prettier-ignore
+description: Configuring CI/CD to generate and publish TechDocs sites to cloud storage
+---
+
+In the [Recommended deployment setup](./architecture.md#recommended-deployment),
+TechDocs reads the static generated documentation files from a cloud storage
+bucket (GCS, AWS S3, etc.). The documentation site is generated on the CI/CD
+workflow associated with the repository containing the documentation files. This
+document explains the steps needed to generate docs on CI and publish to a cloud
+storage using [`techdocs-cli`](https://github.com/backstage/techdocs-cli).
+
+The steps here target all kinds of CI providers (GitHub Actions, CircleCI,
+Jenkins, etc.). Specific tools for individual providers will also be made
+available here for simplicity (e.g. a GitHub Actions runner, CircleCI orb,
+etc.).
+
+A summary of the instructions below looks like this -
+
+```sh
+# This is an example script
+
+# Prepare
+REPOSITORY_URL='https://github.com/org/repo'
+git clone $REPOSITORY_URL
+cd repo
+
+# Generate
+npx @techdocs/cli generate
+
+# Publish
+npx @techdocs/cli publish --publisher-type awsS3 --storage-name --entity
+```
+
+That's it!
+
+Take a look at
+[`techdocs-cli` README](https://github.com/backstage/techdocs-cli) for the
+complete command reference, details, and options.
+
+## 1. Setup a workflow
+
+The TechDocs workflow should trigger on CI when any changes are made in the
+repository containing the documentation files. You can be specific and configure
+the workflow to be triggered only when files inside the `docs/` directory or
+`mkdocs.yml` are changed.
+
+## 2. Prepare step
+
+The first step on the CI is to clone your documentation source repository in a
+working directory. This is almost always the first step in most CI workflows.
+
+On GitHub Actions, you can add a step
+
+[`- uses: actions@checkout@v2`](https://github.com/actions/checkout).
+
+On CircleCI, you can add a special
+[`checkout`](https://circleci.com/docs/2.0/configuration-reference/#checkout)
+step.
+
+Eventually we are trying to do a `git clone `.
+
+## 3. Generate step
+
+Install [`npx`](https://www.npmjs.com/package/npx) to use it for running
+`techdocs-cli`. Or you can install using `npm install -g @techdocs/cli`.
+
+We are going to use the
+[`techdocs-cli generate`](https://github.com/backstage/techdocs-cli#generate-techdocs-site-from-a-documentation-project)
+command in this step.
+
+```sh
+npx @techdocs/cli generate --no-docker --source-dir PATH_TO_REPO --output-dir ./site
+```
+
+`PATH_TO_REPO` should be the location in the file path where the prepare step
+above clones the repository.
+
+## 4. Publish step
+
+Depending on your cloud storage provider (AWS, Google Cloud, or Azure), set the
+necessary authentication environment variables.
+
+- [Google Cloud authentication](https://cloud.google.com/storage/docs/authentication#libauth)
+- [AWS authentication](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html)
+
+And then run the
+[`techdocs-cli publish`](https://github.com/backstage/techdocs-cli#publish-generated-techdocs-sites)
+command.
+
+```sh
+npx @techdocs/cli publish --publisher-type --storage-name --entity --directory ./site
+```
+
+The updated TechDocs site built in this workflow is now ready to be served by
+the TechDocs plugin in your Backstage app.
diff --git a/docs/features/techdocs/creating-and-publishing.md b/docs/features/techdocs/creating-and-publishing.md
index 38f452dcf3..187fe97aed 100644
--- a/docs/features/techdocs/creating-and-publishing.md
+++ b/docs/features/techdocs/creating-and-publishing.md
@@ -41,7 +41,7 @@ setup for free.
### Manually add documentation setup to already existing repository
-Prerequisities:
+Prerequisites:
- An existing component
[registered in backstage](../software-catalog/index.md#adding-components-to-the-catalog)
diff --git a/docs/features/techdocs/how-to-guides.md b/docs/features/techdocs/how-to-guides.md
new file mode 100644
index 0000000000..b32ff40589
--- /dev/null
+++ b/docs/features/techdocs/how-to-guides.md
@@ -0,0 +1,54 @@
+---
+id: how-to-guides
+title: TechDocs "HOW TO" guides
+sidebar_label: "HOW TO" guides
+description: TechDocs "HOW TO" guides related to TechDocs
+---
+
+## How to use URL Reader in TechDocs Prepare step?
+
+If TechDocs is configured to generate docs, it will first download the
+repository associated with the `backstage.io/techdocs-ref` annotation defined in
+the Entity's `catalog-info.yaml` file. This is also called the
+[Prepare](./concepts.md#techdocs-preparer) step.
+
+There are two kinds of preparers or two ways of downloading these source files
+
+- Preparer 1: Doing a `git clone` of the repository (also known as Common Git
+ Preparer)
+- Preparer 2: Downloading an archive.zip or equivalent of the repository (also
+ known as URL Reader)
+
+If `backstage.io/techdocs-ref` is equal to any of these -
+
+1. `github:https://githubhost.com/org/repo`
+2. `gitlab:https://gitlabhost.com/org/repo`
+3. `bitbucket:https://bitbuckethost.com/project/repo`
+4. `azure/api:https://azurehost.com/org/project`
+
+Then Common Git Preparer will be used i.e. a `git clone`. But the URL Reader is
+a much faster way to do this step. Convert the `backstage.io/techdocs-ref`
+values to the following -
+
+1. `url:https://githubhost.com/org/repo/tree/`
+2. `url:https://gitlabhost.com/org/repo/tree/`
+3. `url:https://bitbuckethost.com/project/repo/src/`
+4. `url:https://azurehost.com/organization/project/_git/repository`
+
+Note that you can also provide a path to a non-root directory inside the
+repository which contains the `docs/` directory.
+
+e.g.
+`url:https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend/examples/documented-component`
+
+### Why is URL Reader faster than a git clone?
+
+URL Reader uses the source code hosting provider to download a zip or tarball of
+the repository. The archive does not have any git history attached to it. Also
+it is a compressed file. Hence the file size is significantly smaller than how
+much data git clone has to transfer.
+
+Caveat: Currently TechDocs sites built using URL Reader will be cached for 30
+minutes which means they will not be re-built if new changes are made within 30
+minutes. This cache invalidation will be replaced by commit timestamp based
+implementation very soon.
diff --git a/docs/features/techdocs/troubleshooting.md b/docs/features/techdocs/troubleshooting.md
index 3a9b2fcfd0..e6efefc578 100644
--- a/docs/features/techdocs/troubleshooting.md
+++ b/docs/features/techdocs/troubleshooting.md
@@ -5,6 +5,53 @@ sidebar_label: Troubleshooting
description: Troubleshooting for TechDocs
---
-- TechDocs will fail to clone your docs if you have a git config which overrides
- the `https` protocol with `ssh` or something else. Make sure to remove your
- git config locally when you try TechDocs.
+## Failure to clone
+
+TechDocs will fail to clone your docs if you have a git config which overrides
+the `https` protocol with `ssh` or something else. Make sure to remove your git
+config locally when you try TechDocs.
+
+## MkDocs Build Errors
+
+Using the [TechDocs CLI](https://github.com/backstage/techdocs-cli), you can
+troubleshoot MkDocs build issues locally. Note this requires you have Docker
+available to launch images. First, `git clone` the target repository locally,
+then in the root of the repository, run:
+
+```
+npx @techdocs/cli serve
+```
+
+For example, if you have forgotten to put an MkDocs configuration file in your
+repo, the resulting error will be:
+
+```
+npx: installed 278 in 9.089s
+[techdocs-preview-bundle] Running local version of Backstage at http://localhost:3000
+INFO - Building documentation...
+
+Config file '/content/mkdocs.yml' does not exist.
+```
+
+When it works, a local copy of both Backstage and your site will be launched
+locally:
+
+```
+npx: installed 278 in 9.682s
+[techdocs-preview-bundle] Running local version of Backstage at http://localhost:3000
+INFO - Building documentation...
+WARNING - Config value: 'dev_addr'. Warning: The use of the IP address '0.0.0.0'
+ suggests a production environment or the use of a proxy to connect to the MkDocs
+ server. However, the MkDocs' server is intended for local development purposes only.
+ Please use a third party production-ready server instead.
+INFO - Cleaning site directory
+DEBUG - Successfully imported extension module "plantuml_markdown".
+DEBUG - Successfully loaded extension "plantuml_markdown.PlantUMLMarkdownExtension".
+INFO - Documentation built in 0.23 seconds
+[I 210115 19:00:45 server:335] Serving on http://0.0.0.0:8000
+INFO - Serving on http://0.0.0.0:8000
+[I 210115 19:00:45 handlers:62] Start watching changes
+INFO - Start watching changes
+[I 210115 19:00:45 handlers:64] Start detecting changes
+INFO - Start detecting changes
+```
diff --git a/docs/features/techdocs/using-cloud-storage.md b/docs/features/techdocs/using-cloud-storage.md
index c7b5ec9a9f..21206dede5 100644
--- a/docs/features/techdocs/using-cloud-storage.md
+++ b/docs/features/techdocs/using-cloud-storage.md
@@ -30,20 +30,35 @@ techdocs:
type: 'googleGcs'
```
-**2. GCP (Google Cloud Platform) Project**
+**2. Create a GCS Bucket**
-Create or choose a dedicated GCP project. Set
-`techdocs.publisher.googleGcs.projectId` to the project ID.
+Create a dedicated Google Cloud Storage bucket for TechDocs sites.
+techdocs-backend will publish documentation to this bucket. TechDocs will fetch
+files from here to serve documentation in Backstage. Note that the bucket names
+are globally unique.
+
+Set the config `techdocs.publisher.googleGcs.bucketName` in your
+`app-config.yaml` to the name of the bucket you just created.
```yaml
techdocs:
publisher:
type: 'googleGcs'
- googleGcs:
- projectId: 'gcp-project-id'
+ googleGcs:
+ bucketName: 'name-of-techdocs-storage-bucket'
```
-**3. Service account API key**
+**3a. (Recommended) Authentication using environment variable**
+
+The GCS Node.js client will automatically use the environment variable
+`GOOGLE_APPLICATION_CREDENTIALS` to authenticate with Google Cloud. It might
+already be set in Compute Engine, Google Kubernetes Engine, etc. Read
+https://cloud.google.com/docs/authentication/production for more details.
+
+**3b. Authentication using app-config.yaml**
+
+If you do not prefer (3a) and optionally like to use a service account, you can
+follow these steps.
Create a new Service Account and a key associated with it. In roles of the
service account, use "Storage Admin".
@@ -65,31 +80,118 @@ techdocs:
publisher:
type: 'googleGcs'
googleGcs:
- projectId: 'gcp-project-id'
+ bucketName: 'name-of-techdocs-storage-bucket'
credentials:
$file: '/path/to/google_application_credentials.json'
```
-**4. GCS Bucket**
-
-Create a dedicated bucket for TechDocs sites. techdocs-backend will publish
-documentation to this bucket. TechDocs will fetch files from here to serve
-documentation in Backstage.
-
-Set the name of the bucket to `techdocs.publisher.googleGcs.bucketName`.
+Note: If you are finding it difficult to make the file
+`google_application_credentials.json` available on a server, you could use the
+file's content and set as an environment variable. And then use
```yaml
techdocs:
publisher:
type: 'googleGcs'
googleGcs:
- projectId: 'gcp-project-id'
+ bucketName: 'name-of-techdocs-storage-bucket'
credentials:
- $file: '/path/to/google_application_credentials.json'
+ $env: GOOGLE_APPLICATION_CREDENTIALS
+```
+
+**4. That's it!**
+
+Your Backstage app is now ready to use Google Cloud Storage for TechDocs, to
+store and read the static generated documentation files.
+
+## Configuring AWS S3 Bucket with TechDocs
+
+**1. Set `techdocs.publisher.type` config in your `app-config.yaml`**
+
+Set `techdocs.publisher.type` to `'awsS3'`.
+
+```yaml
+techdocs:
+ publisher:
+ type: 'awsS3'
+```
+
+**2. Create an S3 Bucket**
+
+Create a dedicated AWS S3 bucket for the storage of TechDocs sites.
+[Refer to the official documentation](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html).
+
+TechDocs will publish documentation to this bucket and will fetch files from
+here to serve documentation in Backstage. Note that the bucket names are
+globally unique.
+
+Set the config `techdocs.publisher.awsS3.bucketName` in your `app-config.yaml`
+to the name of the bucket you just created.
+
+```yaml
+techdocs:
+ publisher:
+ type: 'awsS3'
+ awsS3:
bucketName: 'name-of-techdocs-storage-bucket'
```
-**5. That's it!**
+**3a. (Recommended) Setup authentication the AWS way, using environment
+variables**
-Your Backstage app is now ready to use Google Cloud Storage for TechDocs, to
-store the static generated documentation files.
+You should follow the
+[AWS security best practices guide for authentication](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
+
+If the environment variables
+
+- `AWS_ACCESS_KEY_ID`
+- `AWS_SECRET_ACCESS_KEY`
+- `AWS_REGION`
+
+are set and can be used to access the bucket you created in step 2, they will be
+used by the AWS SDK v3 Node.js client for authentication.
+[Refer to the official documentation.](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html)
+
+If the environment variables are missing, the AWS SDK tries to read the
+`~/.aws/credentials` file for credentials.
+[Refer to the official documentation.](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html)
+
+Note that the region of the bucket has to be set for the AWS SDK to work.
+[See this](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html).
+
+**3b. Authentication using app-config.yaml**
+
+AWS credentials and region can be provided to the AWS SDK via `app-config.yaml`.
+If the configs below are present, they will be used over existing `AWS_*`
+environment variables and the `~/.aws/credentials` config file.
+
+```yaml
+techdocs:
+ publisher:
+ type: 'awsS3'
+ awsS3:
+ bucketName: 'name-of-techdocs-storage-bucket'
+ region:
+ $env: AWS_REGION
+ credentials:
+ accessKeyId:
+ $env: AWS_ACCESS_KEY_ID
+ secretAccessKey:
+ $env: AWS_SECRET_ACCESS_KEY
+```
+
+Refer to the
+[official AWS documentation for obtaining the credentials](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/getting-your-credentials.html).
+
+Note: If you are using Amazon EC2 instance to deploy Backstage, you do not need
+to obtain the access keys separately. They can be made available in the
+environment automatically by defining appropriate IAM role with access to the
+bucket. Read more
+[here](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html#use-roles).
+
+**4. That's it!**
+
+Your Backstage app is now ready to use AWS S3 for TechDocs, to store and read
+the static generated documentation files. When you start the backend of the app,
+you should be able to see
+`techdocs info Successfully connected to the AWS S3 bucket` in the logs.
diff --git a/docs/getting-started/create-an-app.md b/docs/getting-started/create-an-app.md
index 52ea90db5b..0663d3faa1 100644
--- a/docs/getting-started/create-an-app.md
+++ b/docs/getting-started/create-an-app.md
@@ -74,6 +74,22 @@ those plugins in your backend. This is because the transformation of backend
module tree stops whenever a non-local package is encountered, and from that
point node will `require` packages directly for that entire module subtree.
+Type checking can also have issues when linking in external packages, since the
+linked in packages will use the types in the external project and dependency
+version mismatches between the two projects may cause errors. To fix any of
+those errors you need to sync versions of the dependencies in the two projects.
+A simple way to do this can be to copy over `yarn.lock` from the external
+project and run `yarn install`, although this is quite intrusive and can cause
+other issues in existing projects, so use this method with care. It can often be
+best to simply ignore the type errors, as app serving will work just fine
+anyway.
+
+Another issue with type checking is that the incremental type cache doesn't
+invalidate correctly for the linked in packages, causing type checking to not
+reflect changes made to types. You can work around this by either setting
+`compilerOptions.incremental = false` in `tsconfig.json`, or by deleting the
+types cache folder `dist-types` before running `yarn tsc`.
+
### Troubleshooting
The create app command doesn't always work as expected, this is a collection of
diff --git a/docs/getting-started/deployment-other.md b/docs/getting-started/deployment-other.md
index cfd2e903d9..65d9947dca 100644
--- a/docs/getting-started/deployment-other.md
+++ b/docs/getting-started/deployment-other.md
@@ -13,10 +13,10 @@ Run the following commands if you have Docker environment
```bash
$ yarn install
$ yarn docker-build
-$ docker run --rm -it -p 7000:7000 -e APP_ENV=production -e NODE_ENV=development example-backend:latest
+$ docker run --rm -it -p 7000:7000 -e NODE_ENV=development example-backend:latest
```
-Then open http://localhost/ on your browser.
+Then open http://localhost:7000 on your browser.
## Heroku
diff --git a/docs/getting-started/development-environment.md b/docs/getting-started/development-environment.md
index c5275114ce..b5ff3885b3 100644
--- a/docs/getting-started/development-environment.md
+++ b/docs/getting-started/development-environment.md
@@ -1,8 +1,8 @@
---
id: development-environment
title: Development Environment
-description: Documentation on how to get set up for doing development on
-the Backstage repository
+# prettier-ignore
+description: Documentation on how to get set up for doing development on the Backstage repository
---
This section describes how to get set up for doing development on the Backstage
diff --git a/docs/glossary.md b/docs/glossary.md
new file mode 100644
index 0000000000..e5a9882909
--- /dev/null
+++ b/docs/glossary.md
@@ -0,0 +1,21 @@
+---
+id: glossary
+title: Backstage Glossary
+# prettier-ignore
+description: List of all the terms, abbreviations, and phrases used in Backstage, together with their explanations.
+---
+
+The Backstage Glossary lists all the terms, abbreviations, and phrases used in
+Backstage, together with their explanations. We encourage you to use the
+terminology below for clarity and consistency when discussing Backstage.
+
+### Backstage User Profiles
+
+There are three main user profiles for Backstage: the integrator, the
+contributor, and the software engineer.
+
+| Term | Explanation |
+| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Integrator | The **integrator** hosts the Backstage app and configures which plugins are available to use in the app. |
+| Contributor | The **contributor** adds functionality to the app by writing plugins. |
+| Software Engineer | The **software engineer** uses the app's functionality and interacts with its plugins. In practice, this profile covers the various roles that help deliver software, from the Software Engineer themselves, to Designers, Data Scientists, Product Owners, Engineering Managers, etc. |
diff --git a/docs/overview/adopting.md b/docs/overview/adopting.md
index 0d404d5cb4..152be21a2c 100644
--- a/docs/overview/adopting.md
+++ b/docs/overview/adopting.md
@@ -1,8 +1,8 @@
---
id: adopting
title: Strategies for adopting
-description: Documentation on some general best practices that have been key
-to Backstage's success inside Spotify
+# prettier-ignore
+description: Documentation on some general best practices that have been key to Backstage's success inside Spotify
---
This document outlines some general best practices that have been key to
diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md
index d8069c8665..f2f2bc72c8 100644
--- a/docs/overview/architecture-overview.md
+++ b/docs/overview/architecture-overview.md
@@ -185,17 +185,6 @@ separate Docker images.

-The frontend container can be built with a provided command.
-
-```bash
-yarn install
-yarn tsc
-yarn run docker-build:app
-```
-
-Running this will simply generate a Docker container containing the contents of
-the UIs `dist` directory.
-
The backend container can be built by running the following command:
```bash
diff --git a/docs/overview/background.md b/docs/overview/background.md
index aca46614c2..0c22396e72 100644
--- a/docs/overview/background.md
+++ b/docs/overview/background.md
@@ -1,8 +1,8 @@
---
id: background
title: The Spotify Story
-description: Backstage was born out of necessity at Spotify. We found that as we grew, our
-infrastructure was becoming more fragmented, our engineers less productive.
+# prettier-ignore
+description: Backstage was born out of necessity at Spotify. We found that as we grew, our infrastructure was becoming more fragmented, our engineers less productive.
---
Backstage was born out of necessity at Spotify. We found that as we grew, our
diff --git a/docs/overview/roadmap.md b/docs/overview/roadmap.md
index b0c031689d..cd319c4ade 100644
--- a/docs/overview/roadmap.md
+++ b/docs/overview/roadmap.md
@@ -8,9 +8,9 @@ description: Roadmap of Backstage Project
> Backstage is currently under rapid development. This means that you can expect
> APIs and features to evolve. It is also recommended that teams who adopt
-> Backstage today upgrade their installation as new
-> [releases](https://github.com/backstage/backstage/releases) become available,
-> as Backwards compatibility is not yet guaranteed.
+> Backstage today [upgrade their installation](../cli/commands.md#versionsbump)
+> as new [releases](https://github.com/backstage/backstage/releases) become
+> available, as Backwards compatibility is not yet guaranteed.
## Phases
@@ -57,8 +57,10 @@ guidelines to get started.
see and manage their services running in K8s, regardless if that's locally, in
AWS, GCS, Azure, or elsewhere.
-- **Global search** - Extend the basic search functionality currently available
- in the Backstage Service Catalog to become a global search experience.
+- **[Search platform](../features/search/README.md)** - Evolve the basic search
+ functionality currently available into a platform that **a)** enables search
+ across the software catalog, TechDocs, and any other information exposed by
+ plugins, and **b)** supports a variety of search engine technologies.
- **[Software Templates V2](https://github.com/backstage/backstage/issues/2771)** -
Expand the templates to make the steps more composable by adding the ability
diff --git a/docs/overview/stability-index.md b/docs/overview/stability-index.md
index c53193f063..3304913f87 100644
--- a/docs/overview/stability-index.md
+++ b/docs/overview/stability-index.md
@@ -1,9 +1,8 @@
---
id: stability-index
title: Stability Index
-description:
- An overview of the commitment to stability for different parts of the
- Backstage codebase.
+# prettier-ignore
+description: An overview of the commitment to stability for different parts of the Backstage codebase.
---
## Overview
@@ -291,7 +290,7 @@ Stability: `1`. There are plans to rework parts of the Processor interface.
### `catalog-graphql` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/catalog-graphql/)
-Provides the catalog schema and resolvers for the graphql backend.
+Provides the catalog schema and resolvers for the GraphQL backend.
Stability: `0`. Under heavy development and subject to change.
diff --git a/docs/overview/vision.md b/docs/overview/vision.md
index c17e2b17ba..f6d6af90dd 100644
--- a/docs/overview/vision.md
+++ b/docs/overview/vision.md
@@ -1,8 +1,8 @@
---
id: vision
title: Vision
-description: Goal is to provide engineers with the best developer experience in
-the world
+# prettier-ignore
+description: Goal is to provide engineers with the best developer experience in the world
---
Our goal is to provide engineers with the best developer experience in the
diff --git a/docs/overview/what-is-backstage.md b/docs/overview/what-is-backstage.md
index 5439b838bd..ec824a1e11 100644
--- a/docs/overview/what-is-backstage.md
+++ b/docs/overview/what-is-backstage.md
@@ -1,15 +1,15 @@
---
id: what-is-backstage
title: What is Backstage?
-description: Backstage is an open platform for building developer portals.
-Powered by a centralized service catalog, Backstage restores order to your microservices and infrastructure
+# prettier-ignore
+description: Backstage is an open platform for building developer portals. Powered by a centralized service catalog, Backstage restores order to your microservices and infrastructure
---

[Backstage](https://backstage.io/) is an open platform for building developer
portals. Powered by a centralized service catalog, Backstage restores order to
-your microservices and infrastructure. So your product teams can ship
+your microservices and infrastructure and enables your product teams to ship
high-quality code quickly — without compromising autonomy.
Backstage unifies all your infrastructure tooling, services, and documentation
diff --git a/docs/plugins/call-existing-api.md b/docs/plugins/call-existing-api.md
index 75e054d2b9..5dbf7988c9 100644
--- a/docs/plugins/call-existing-api.md
+++ b/docs/plugins/call-existing-api.md
@@ -1,8 +1,8 @@
---
id: call-existing-api
title: Call Existing API
-description: Describes the various options that Backstage frontend plugins have,
-in communicating with service APIs that already exist
+# prettier-ignore
+description: Describes the various options that Backstage frontend plugins have, in communicating with service APIs that already exist
---
This article describes the various options that Backstage frontend plugins have,
diff --git a/docs/plugins/composability.md b/docs/plugins/composability.md
new file mode 100644
index 0000000000..a496217875
--- /dev/null
+++ b/docs/plugins/composability.md
@@ -0,0 +1,585 @@
+---
+id: composability
+title: Composability System Migration
+# prettier-ignore
+description: Documentation and migration instructions for new composability APIs.
+---
+
+## Summary
+
+This page describes the new composability system that was recently introduced in
+Backstage, and it does so from the perspective of the existing patterns and
+APIs. As the new system is solidified and existing code is ported, this page
+will be removed and replaced with a more direct description of the composability
+system. For now, the primary purpose of this documentation is to aid in the
+migration of existing plugins, but it does cover the migration of apps as well.
+
+The core principle of the new composability system is that plugins should have
+clear boundaries and connections. It should isolate crashes within a plugin, but
+allow navigation between them. It should allow for plugins to be loaded only
+when needed, and enable plugins to provide extension points for other plugins to
+build upon. The composability system is also built with an app-first mindset,
+prioritizing simplicity and clarity in the app over that in the plugins and core
+APIs.
+
+The new composability system isn't a single new API surface. It is a collection
+of patterns, primitives, new APIs, and old APIs used in new ways. At the core is
+the new concept of extensions, which are exported by plugins for use in the app.
+There is also a new primitive called component data, which assists in the
+conversion to a more declarative app. The `RouteRef`s now have a clear purpose
+as well, and can be used route to pages in a flexible way.
+
+## New Concepts
+
+This section is a brief look into all the new and updated concepts that were put
+in place to support the new composability system.
+
+### Component Data
+
+Component data is a new composability primitive that is introduced as a way to
+provide a new data dimension for React components. Data is attached to React
+components using a key, and is then readable from any JSX elements created with
+those components, using the same key, as illustrated by the following example:
+
+```tsx
+const MyComponent = () =>
This is my component
;
+attachComponentData(MyComponent, 'my.data', 5);
+
+const element = ;
+const myData = getComponentData(element, 'my.data');
+// myData === 5
+```
+
+The purpose of component data is to provide a method for embedding data that can
+be inspected before rendering elements. Element inspection is a pattern that is
+quite common among React libraries, and used for example by `react-router` and
+`material-ui` to discover properties of the child elements before rendering.
+Although in those libraries only the element type and props are typically
+inspected, while our component data adds more structured access and simplifies
+evolution by allowing for multiple different versions of a piece of data to be
+used and interpreted at once.
+
+The initial use-case for component data is to support route and plugin discovery
+through elements in the app. Through this we allow for the React element tree in
+the app to be the source of truth, both for which plugins are used, as well as
+all top-level plugin routes in the app. The use of component data is not limited
+to these use-cases though, as it can be used as a primitive to create new
+abstractions as well.
+
+### Extensions
+
+Extensions are what plugins export for use in an app. Most typically they are
+React components, but in practice they can be any kind of JavaScript value. They
+are created using `create*Extension` functions, and wrapped with
+`plugin.provide()` in order to create the actual exported extension.
+
+The extension type is a simple one:
+
+```ts
+export type Extension = {
+ expose(plugin: BackstagePlugin): T;
+};
+```
+
+The power of extensions comes from the ability of various actors to hook into
+their usage. The creation and plugin wrapping is controlled by whoever owns the
+creation function, the Backstage core is able to hook into the process of
+exposing the extension outside the plugin, and in the end the app controls the
+usage of the extension.
+
+The Backstage core API currently provides two different types of extension
+creators, `createComponentExtension`, and `createRoutableExtension`. Component
+extensions are plain React component with no particular requirements, for
+example a card for an entity overview page. The component will be exported more
+or less as is, but is wrapped to provide things like an error boundary, lazy
+loading, and a plugin context.
+
+Routable extensions build on top of component extensions and are used for any
+component that should be rendered at a specific route path, such as top-level
+pages or entity page tab content. When creating a routable extension you need to
+supply a `RouteRef` as `mountPoint`. The mount point will be the handle of the
+component for the outside world, and is used by other components and plugins
+that wish to link to the routable component.
+
+As of now there are only two extension creation functions, but it is possible to
+add more of them in the future, both in the core library and in plugins that
+wish to provide an extension point for other plugins to build upon. Extensions
+are also not tied to React, and can both be used to model generic JavaScript
+concepts, as well as potentially bridge to rendering libraries and web
+frameworks other than React.
+
+### Extensions from a Plugin's Point of View
+
+Extensions are one of the primary methods to traverse the plugin boundary, and
+the way that plugins provide concrete content for use within an app. They
+replace existing component export concepts such as `Router` or `*Card`s for
+display on entity overview pages.
+
+It is recommended to create the exported extensions either in the top-level
+`plugin.ts` file, or in a dedicated `extensions.ts` (or `.tsx`) file. That file
+should not contain the bulk of the implementation though, and in fact, if the
+extension is a React component it is recommended to lazy-load the actual
+component. Component extensions support lazy loading out of the box using the
+`lazy` component declaration, for example:
+
+```ts
+export const EntityFooCard = plugin.provide(
+ createComponentExtension({
+ component: {
+ lazy: () => import('./components/FooCard').then(m => m.FooCard),
+ },
+ }),
+);
+```
+
+Routable extensions even enforce lazy loading, as it is the only way to provide
+a component:
+
+```ts
+export const FooPage = plugin.provide(
+ createRoutableExtension({
+ component: () => import('./components/FooPage').then(m => m.FooPage),
+ mountPoint: fooPageRouteRef,
+ }),
+);
+```
+
+### Using Extensions in an App
+
+Right now all extensions are modelled as React components. The usage of these
+extension is like regular usage of any React components, with one important
+difference. Extensions must all be part of a single React element tree spanning
+from the root `AppProvider`.
+
+For example, the following app code does **NOT** work:
+
+```tsx
+const AppRoutes = () => (
+
+ } />
+ } />
+
+);
+
+const App = () => (
+
+
+
+
+
+
+
+);
+```
+
+But in this case it is simple to fix! Simply be sure to not create any
+intermediate components in the app, for example like this:
+
+```tsx
+const appRoutes = (
+
+ } />
+ } />
+
+);
+
+const App = () => (
+
+
+ {appRoutes}
+
+
+);
+```
+
+### New Routing System
+
+A big piece of what is enabled by moving over to this new composability system
+is to make `RouteRef`s useful. The `RouteRef`s no longer have their own path, in
+fact the only required parameter is currently a `title`. Instead of assigning a
+path to each `RouteRef` and possibly overriding these paths in the app, the
+concrete `path` for each `RouteRef` is discovered based on the element tree in
+the app. Let's consider the following example:
+
+```tsx
+const appRoutes = (
+
+ } />
+ } />
+
+);
+```
+
+We'll assume that `FooPage` and `BarPage` are routable extensions, exported by
+the `fooPlugin` and `barPlugin` respectively. Since the `FooPage` is a routable
+extension it has a `RouteRef` assigned as its mount point, which we'll refer to
+as `fooPageRouteRef`.
+
+Given the above example, the `fooPageRouteRef` will be associated with the
+`'/foo'` route. The path is no longer accessible via the `path` property of the
+`RouteRef` though, as the routing structure is tied to the app's react tree. We
+instead use the new `useRouteRef` hook if we want to create a concrete link to
+the page. The `useRouteRef` hook takes a single `RouteRef` as its only
+parameter, and returns a function that is called to create the URL. For example
+like this:
+
+```tsx
+const MyComponent = () => {
+ const fooRoute = useRouteRef(fooPageRouteRef);
+ return Link to Foo;
+};
+```
+
+Now let's assume that we want to link from the `BarPage` to the `FooPage`.
+Before the introduction of the new composability system, we would do this by
+importing the `fooPageRouteRef` exported by the `fooPlugin`. This created an
+unnecessary dependency on the plugin, and also provided little flexibility in
+allowing the app to tie plugins together, with the links instead being dictated
+by the plugins themselves. To solve this, we introduce `ExternalRouteRef`s. Much
+like regular route references, they can be passed to `useRouteRef` to create
+concrete URLs, but they can not be used as mount points in routable component
+and instead have to be associated with a target route using route bindings in
+the app.
+
+We create a new `ExternalRouteRef` inside the `barPlugin`, using a neutral name
+that describes its role in the plugin rather than a specific plugin page that it
+might be linking to, allowing the app to decide the final target. If the
+`BarPage` for example wants to link to an external page in the header, it might
+declare an `ExternalRouteRef` similar to this:
+
+```ts
+const headerLinkRouteRef = createExternalRouteRef();
+```
+
+### Binding External Routes in the App
+
+The association of external routes is controlled by the app. Each
+`ExternalRouteRef` of a plugin should be bound to an actual `RouteRef`, usually
+from another plugin. The binding process happens once at app startup, and is
+then used through the lifetime of the app to help resolve concrete route paths.
+
+Using the above example of the `BarPage` linking to the `FooPage`, we might do
+something like this in the app:
+
+```ts
+createApp({
+ bindRoutes({ bind }) {
+ bind(barPlugin.externalRoutes, {
+ headerLink: fooPlugin.routes.root,
+ });
+ },
+});
+```
+
+Given the above binding, using `useRouteRef(headerLinkRouteRef)` within the
+`barPlugin` will let us create a link to whatever path the `FooPage` is mounted
+at.
+
+Note that we are not importing and using the `RouteRef`s directly in the app,
+and instead rely on the plugin instance to access routes of the plugins. This is
+a new convention that was introduced to provide better namespacing and
+discoverability of routes, as well as reduce the number of separate exports from
+each plugin package. The route references would be supplied to `createPlugin`
+like this:
+
+```ts
+// In foo-plugin
+export const fooPlugin = createPlugin({
+ routes: {
+ root: fooPageRouteRef,
+ },
+ ...
+})
+
+// In bar-plugin
+export const barPlugin = createPlugin({
+ externalRoutes: {
+ headerLink: headerLinkRouteRef,
+ },
+ ...
+})
+```
+
+Also note that you almost always want to create the route references themselves
+in a different file than the one that creates the plugin instance, for example a
+top-level `routes.ts`. This is to avoid circular imports when you use the route
+references from other parts of the same plugin.
+
+### Parameterized Routes
+
+A new addition to `RouteRef`s is the possibility of adding named and typed
+parameters. Parameters are declared at creation, and will enforce presence of
+the parameters in the path in the app, and require them as a parameter when
+using `useRouteRef`.
+
+The following is an example of creation and usage of a parameterized route:
+
+```tsx
+// Creation of a parameterized route
+const myRouteRef = createRouteRef({
+ title: 'My Named Route',
+ params: ['name']
+})
+
+// In the app, where MyPage is a routable extension with myRouteRef set as mountPoint
+}/>
+
+// Usage within a component
+const myRoute = useRouteRef(myRouteRef)
+return (
+
+)
+```
+
+It is currently not possible to have parameterized `ExternalRouteRef`s, or to
+bind an external route to a parameterized route, although this may be added in
+the future if needed.
+
+### New Catalog Components
+
+The established pattern for selecting what plugins should be available on each
+catalog page is to use custom components in the app, with logic embedded in the
+render function. Typically this takes form as a component that either receives
+the entity via props or uses the `useEntity` hook to retrieve the selected
+entity. A `switch` or `if` / `else if` chain is then used to select what
+children should be rendered based on information in the entity.
+
+This pattern will no longer work with the new composability system, and in
+general is very difficult to build any form of declarative model around, as it
+depends on runtime execution. To help replace existing code, a new
+`EntitySwitch` component has been added to the `@backstage/catalog` plugin,
+which grabs the selected entity from a context, and selects at most one element
+to render using a list of `EntitySwitch.Case` children.
+
+For example, if you want all entities of kind `"Template"` to be rendered with a
+`MyTemplate` component, and all other entities to be rendered with a `MyOther`
+component, you would do the following:
+
+```tsx
+
+
+
+
+
+
+
+
+
+
+// Shorter form if desired:
+
+ }/>
+ }/>
+
+```
+
+The `EntitySwitch` component will render the children of the first
+`EntitySwitch.Case` that returns `true` when the selected entity is passed to
+the function of the `if` prop. If none of the cases match, no children will be
+rendered, and if a case doesn't specify an `if` filter function, it will always
+match. The `if` property is simply a function of the type
+`(entity: Entity) => boolean`, for example, `isKind` can be implemented like
+this:
+
+```ts
+function isKind(kind: string) {
+ return (entity: Entity) => entity.kind.toLowerCase() === kind.toLowerCase();
+}
+```
+
+The `@backstage/catalog` plugin provides a couple of built-in conditions,
+`isKind`, `isComponentType`, and `isNamespace`.
+
+In addition to the `EntitySwitch` component, the catalog plugin also exports a
+new `EntityLayout` component. It is a tweaked version and replacement for the
+`EntityPageLayout` component, and is introduced more in depth in the app
+migration section below.
+
+## Porting Existing Plugins
+
+There are a couple of high-level steps to porting an existing plugin to the new
+composability system:
+
+- Remove usage of `router.addRoute` or `router.registerRoute` within
+ `createPlugin`, and export the page components as routable extensions instead.
+- Switch any `Router` export to instead be a routable extension.
+- Change any plain component exports, such as catalog overview cards, to be
+ component extensions.
+- Stop exporting `RouteRef`s and instead pass them to `createPlugin`.
+- Stop accepting `RouteRef`s as props or importing them from other plugins,
+ instead create an `ExternalRouteRef` as a replacement, and pass it to
+ `createPlugin.`
+- Rename any other exported symbols according to the naming pattern table below.
+
+Note that removing the existing exports and configuration is a breaking change
+in any plugin. If backwards compatibility is needed the existing code be
+deprecated while making the new additions, to then be removed at a later point.
+
+### Naming Patterns
+
+Many export naming patterns have been changed to avoid import aliases and to
+clarify intent. Refer to the following table to formulate the new name:
+
+| Description | Existing Pattern | New Pattern | Examples |
+| -------------------- | -------------------------- | --------------- | ---------------------------------------------- |
+| Top-level Pages | Router | \*Page | CatalogIndexPage, SettingsPage, LighthousePage |
+| Entity Tab Content | Router | Entity\*Content | EntityJenkinsContent, EntityKubernetesContent |
+| Entity Overview Card | \*Card | Entity\*Card | EntitySentryCard, EntityPagerDutyCard |
+| Entity Conditional | isPluginApplicableToEntity | is\*Available | isPagerDutyAvailable, isJenkinsAvailable |
+| Plugin Instance | plugin | \*Plugin | jenkinsPlugin, catalogPlugin |
+
+## Porting Existing Apps
+
+The first step of porting any app is to replace the root `Routes` component with
+`FlatRoutes` from `@backstage/core`. As opposed to the `Routes` component,
+`FlatRoutes` only considers the first level of `Route` components in its
+children, and provides any additional children to the outlet of the route. It
+also removes the need to append `"/*"` to paths, as it is added automatically.
+
+```diff
+const AppRoutes = () => (
+-
++
+ ...
+- } />
++ } />
+ ...
+-
++
+);
+```
+
+The next step should be to switch from using `EntityPageLayout` to
+`EntityLayout`, as this can also be done without waiting for plugins to be
+ported. You should also replace the top-level `Router` from the catalog plugin
+with the separate `CatalogIndexPage` and `CatalogEntityPage` extensions that
+have been added to the catalog:
+
+```diff
+-}
+-/>
++} />
++}
++>
++
++
+```
+
+At that point you should flatten out the element tree as much as possible in the
+app, removing any intermediate components. At the top level this should usually
+be straightforward, but when reaching the catalog entity pages you may need to
+wait for some plugins to be migrated. This is because it is no longer possible
+to pass in the selected entity through component props, and it should be picked
+up from context inside the plugin instead. See the sections below for how to
+carry out migrations of some common entity page patterns.
+
+Once the app element tree doesn't contain any intermediate components, and all
+plugin imports have been switched to extensions rather than plain components,
+the app has been fully ported.
+
+### Switching from EntityPageLayout to EntityLayout
+
+The existing `EntityPageLayout` is replaced by the new `EntityLayout` component,
+which has a slightly different pattern for expressing the contents and paths.
+
+Porting from the old to the new API is just a matter of moving some things
+around. For example, given the following existing code:
+
+```tsx
+
+ }
+ />
+ }
+ />
+ }
+ />
+
+```
+
+It would be ported to this:
+
+```tsx
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+In addition to the renaming, the `element` prop has been moved to `children`.
+Also note that the `/*` suffix has been removed from the `"/kubernetes"` path,
+as it's now added automatically.
+
+Usage of the `EntityLayout` component is required to be able to properly
+discover routes, and so it is required to apply this change before you can start
+using routable entity content extensions from plugins.
+
+### Porting Entity Pages
+
+The established pattern in the app is to use custom components in order to
+select what plugin components to render for a given entity. The new
+`EntitySwitch` component introduced above is what is intended to replace this
+pattern, now that the entire app needs to be rendered as a single element tree.
+For example, given the following existing code:
+
+```tsx
+export const EntityPage = () => {
+ const { entity } = useEntity();
+
+ switch (entity?.kind?.toLowerCase()) {
+ case 'component':
+ return ;
+ case 'api':
+ return ;
+ case 'group':
+ return ;
+ case 'user':
+ return ;
+ default:
+ return ;
+ }
+};
+```
+
+It would be migrated to this:
+
+```tsx
+export const entityPage = (
+
+
+
+
+
+
+
+);
+```
+
+Note that for example `` has been changed to simply
+`componentPage`, that is because just like the `EntityPage` component, the
+`ComponentEntityPage` also needs to be ported to be an element rather a
+component in a similar way.
diff --git a/docs/plugins/github-apps.md b/docs/plugins/github-apps.md
new file mode 100644
index 0000000000..d3b0e36cd9
--- /dev/null
+++ b/docs/plugins/github-apps.md
@@ -0,0 +1,82 @@
+# Using GitHub Apps for Backend Authentication
+
+Backstage can be configured to use GitHub Apps for backend authentication. This
+comes with advantages such as higher rate limits and that Backstage can act as
+an application instead of a user or bot account.
+
+It also provides a much clearer and better authorization model as a opposed to
+the OAuth apps and their respective scopes.
+
+## Caveats
+
+- It's not possible to have multiple Backstage GitHub Apps installed in the same
+ GitHub organization, to be handled by Backstage. We currently don't check
+ through all the registered GitHub Apps to see which ones are installed for a
+ particular repository. We only respect global Organization installs right now.
+- App permissions is not managed by Backstage. They're created with some simple
+ default permissions which you are free to change as you need, but you will
+ need to update them in the GitHub web console, not in Backstage right now. The
+ permissions that are defaulted are `metadata:read` and `contents:read`.
+- The created GitHub App is private by default, this is most likely what you
+ want for github.com but it's recommended to make your application public for
+ GitHub Enterprise in order to share application across your GHE organizations.
+
+A GitHub app created with `backstage-cli create-github-app` will have read
+access by default. You have to manually update the GitHub App settings in GitHub
+to grant the app more permissions if needed.
+
+### Using the CLI (public GitHub only)
+
+You can use the `backstage-cli` to create GitHub App' using a manifest file that
+we provide. This gives us a way to automate some of the work required to create
+a GitHub app.
+
+You can read more about the `backstage-cli create-github-app` method
+[here](../cli/commands.md#create-github-app)
+
+Once you've gone through the CLI command, it should produce a `yaml` file in the
+root of the project which you can then use as an `include` in your
+`app-config.yaml`. You can go ahead and skip to
+[here](#including-in-integrations-config) if you've got to this part.
+
+### GitHub Enterprise
+
+You have to create the GitHub Application manually using these
+[instructions](https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-a-github-app)
+as GitHub Enterprise does not support creation of apps from manifests.
+
+Once the application is created you have to generate a private key for the
+application it in a `yaml` file.
+
+The yaml file must include the following information. Please note that the
+indentation for the `privateKey` is required.
+
+```yaml
+appId: 1
+clientId: client id
+clientSecret: client secret
+webhookSecret: webhook secret
+privateKey: |
+ -----BEGIN RSA PRIVATE KEY-----
+ ...Key content...
+ -----END RSA PRIVATE KEY-----
+```
+
+### Including in Integrations Config
+
+Once the credentials are stored in a yaml file generated by `create-github-app`
+or manually by following the [GitHub Enterprise](#gitHub-enterprise)
+instructions, they can be included in the `app-config.yaml` under the
+`integrations` section.
+
+Please note that the credentials file is highly sensitive and should NOT be
+checked into any kind of version control. Instead use your preferred secure
+method of distributing secrets.
+
+```yaml
+integrations:
+ github:
+ - host: github.com
+ apps:
+ - $include: example-backstage-app-credentials.yaml
+```
diff --git a/docs/plugins/plugin-development.md b/docs/plugins/plugin-development.md
index c5d9763f7d..109f6ed6ba 100644
--- a/docs/plugins/plugin-development.md
+++ b/docs/plugins/plugin-development.md
@@ -54,13 +54,4 @@ addRoute(
Component: ComponentType,
options?: RouteOptions,
): void;
-
-/**
- * @deprecated See the `addRoute` method
- */
-registerRoute(
- path: RoutePath,
- Component: ComponentType,
- options?: RouteOptions,
-): void;
```
diff --git a/docs/plugins/publishing.md b/docs/plugins/publishing.md
index efea02ee23..06fae0533e 100644
--- a/docs/plugins/publishing.md
+++ b/docs/plugins/publishing.md
@@ -7,7 +7,7 @@ description: Documentation on Publishing npm packages
## npm
npm packages are published through CI/CD in the
-[.github/workflows/master.yml](https://github.com/backstage/backstage/blob/master/.github/workflows/master.yml)
+[`.github/workflows/master.yml`](https://github.com/backstage/backstage/blob/master/.github/workflows/master.yml)
workflow. Every commit that is merged to master will be checked for new versions
of all public packages, and any new versions will automatically be published to
npm.
diff --git a/docs/plugins/testing.md b/docs/plugins/testing.md
index b564fd732c..30c3bf0ecc 100644
--- a/docs/plugins/testing.md
+++ b/docs/plugins/testing.md
@@ -16,15 +16,15 @@ frameworks and libraries like [Mocha](https://mochajs.org/),
Running all tests:
- yarn test-react
+ yarn test
Running an individual test (e.g. `MyComponent.test.js`):
- yarn test-react MyComponent
+ yarn test MyComponent
To run both `MyComponent.test.js` and `MyControl.test.js` suite of tests:
- yarn test-react MyCo
+ yarn test MyCo
Note: if `console.logs` are not appearing, run only the individual test you are
working on.
@@ -52,12 +52,12 @@ render React components.
TODO.
-# Writing Unit Tests
+## Writing Unit Tests
The following principles are good guides for determining if you are writing high
quality frontend unit tests.
-## Bad Unit Test Principle
+### Bad Unit Test Principle
> No unit test is better than a bad one.
@@ -69,7 +69,7 @@ Writing a poor unit test:
- Adds to future work by requiring updates to the unit test for irrelevant code
changes.
-## Input/Output Principle
+### Input/Output Principle
> A unit test verifies an output matches an expected input.
@@ -77,7 +77,7 @@ For backend, this would be that when you provide configuration X, then the
object responds with Y. For frontend, this would be that when you provide
properties X to a component, then the visual functionality responds with Y.
-## Blackbox Principle
+### Blackbox Principle
> A good unit test does not tell the object how it should do its job but should
> only compare inputs to outputs.
@@ -86,7 +86,7 @@ Consider a unit test for a form. A good unit test would not test the order of
the form fields. Instead, it would verify that the inputs to the form fields
lead to a certain backend call when submit is clicked.
-## Scalability Principle
+### Scalability Principle
> Unit test quality is directly proportionate to how much code can change
> without having to touch the unit test.
@@ -97,7 +97,7 @@ to the code, you have to update the unit test. A good unit test suite allows a
lot of flexibility in _how_ the code is written so that future refactoring can
occur without having to touch the original unit tests.
-## Increasing Complexity Principle
+### Increasing Complexity Principle
> The ordering of unit tests in a suite should proceed from least specific to
> most specific.
@@ -116,7 +116,7 @@ throwing an error saying that output was incorrect will lead the next developer
into thinking they may have broken the entire functionality of the object rather
than simply letting them know they had an invalid input.
-## Broken Functionality Principle
+### Broken Functionality Principle
> Generally, a unit test should not test exactly how the output appears, it
> should test that the functionality has an expected _general_ response to an
@@ -131,7 +131,7 @@ test a slightly different color on the button the unit test will break. A better
unit test would verify that the button's CSS classname is assigned properly on
hover or test for something completely different.
-## Example: Loading Indicator
+### Example: Loading Indicator
A classic unit test on frontends is verifying a loading indicator displays when
a backend request is being made.
@@ -192,11 +192,14 @@ returns a result or displays an error or console message, like so:
**`StringUtil ellipsis`**
- export function ellipsis(text, maxLength, midCharIx = 0, ellipsis = '...') {
- // Do something blackbox. We should not care about the internals, only inputs and outputs.
- ...
- return someFinalValue;
- }
+```js
+export function ellipsis(text, maxLength, midCharIx = 0, ellipsis = '...') {
+ // Do something blackbox. We should not care about the internals,
+ // only inputs and outputs.
+ ...
+ return someFinalValue;
+}
+```
There are four things to test for in a utility function:
@@ -207,30 +210,36 @@ There are four things to test for in a utility function:
> Handle Invalid Input (handle thrown errors):
- it('Throws an error on improper arguments', () => {
- expect(() => {
- ellipsis();
- }).toThrowError('Expected \'text\' to be defined');
- });
+```js
+it('Throws an error on improper arguments', () => {
+ expect(() => {
+ ellipsis();
+ }).toThrowError("Expected 'text' to be defined");
+});
+```
> Verify default input arguments:
- it('Works with defaults', () => {
- expect(ellipsis('Hello world', 3)).toBe('Hel...');
- expect(ellipsis('', 3)).toBe('');
- expect(ellipsis('H', 3)).toBe('H');
- expect(ellipsis('Hello', 5)).toBe('Hello');
- });
+```js
+it('Works with defaults', () => {
+ expect(ellipsis('Hello world', 3)).toBe('Hel...');
+ expect(ellipsis('', 3)).toBe('');
+ expect(ellipsis('H', 3)).toBe('H');
+ expect(ellipsis('Hello', 5)).toBe('Hello');
+});
+```
> Verify output for expected input arguments:
This is especially true for edge cases!
- it('Works with midCharIx', () => {
- expect(ellipsis('Hello world', 3, 6)).toBe('...o w...');
- expect(ellipsis('', 3, 6)).toBe('');
- expect(ellipsis('Backstage is amazing', 4, 10)).toBe('...e is...');
- });
+```js
+it('Works with midCharIx', () => {
+ expect(ellipsis('Hello world', 3, 6)).toBe('...o w...');
+ expect(ellipsis('', 3, 6)).toBe('');
+ expect(ellipsis('Backstage is amazing', 4, 10)).toBe('...e is...');
+});
+```
## Non-React Classes
@@ -372,4 +381,4 @@ IDE.
In most cases, we have found that using `console.log` works well.
Note: if your console.logs are not being displayed, focus your specific unit
-test from the command line by running them like so `yarn test-react MyTest`.
+test from the command line by running them like so `yarn test MyTest`.
diff --git a/docs/reference/createPlugin-router.md b/docs/reference/createPlugin-router.md
index 89ee44e558..0ef5bdbd0f 100644
--- a/docs/reference/createPlugin-router.md
+++ b/docs/reference/createPlugin-router.md
@@ -15,15 +15,6 @@ addRoute(
Component: ComponentType,
options?: RouteOptions,
): void;
-
-/**
- * @deprecated See the `addRoute` method
- */
-registerRoute(
- path: RoutePath,
- Component: ComponentType,
- options?: RouteOptions,
-): void;
```
## RouteRef
diff --git a/docs/reference/utility-apis/ErrorApi.md b/docs/reference/utility-apis/ErrorApi.md
index 93f4f9cd48..9bba0c76c6 100644
--- a/docs/reference/utility-apis/ErrorApi.md
+++ b/docs/reference/utility-apis/ErrorApi.md
@@ -29,7 +29,7 @@ These types are part of the API declaration, but may not be unique to this API.
### Error
-Mirrors the javascript Error class, for the purpose of providing documentation
+Mirrors the JavaScript Error class, for the purpose of providing documentation
and optional fields.
diff --git a/docs/support/project-structure.md b/docs/support/project-structure.md
index a30288e85e..5c8a8cd3bb 100644
--- a/docs/support/project-structure.md
+++ b/docs/support/project-structure.md
@@ -1,8 +1,8 @@
---
id: project-structure
title: Backstage Project Structure
-description:
- Introduction to files and folders in the Backstage Project repository
+# prettier-ignore
+description: Introduction to files and folders in the Backstage Project repository
---
Backstage is a complex project, and the GitHub repository contains many
@@ -32,10 +32,6 @@ the code.
better control over our `yarn.lock` file and hopefully avoid problems due to
yarn versioning differences.
-- [`docker/`](https://github.com/backstage/backstage/tree/master/docker) - Files
- related to our root Dockerfile. We are planning to refactor this, so expect
- this folder to be moved in the future.
-
- [`contrib/`](https://github.com/backstage/backstage/tree/master/contrib) -
Collection of examples or resources provided by the community. We really
appreciate contributions in here and encourage them being kept up to date.
diff --git a/docs/tutorials/quickstart-app-auth.md b/docs/tutorials/quickstart-app-auth.md
index 1dcca9d7e0..1c661d274c 100644
--- a/docs/tutorials/quickstart-app-auth.md
+++ b/docs/tutorials/quickstart-app-auth.md
@@ -3,20 +3,18 @@ id: quickstart-app-auth
title: Monorepo App Setup With Authentication
---
-###### September 15th 2020 - @backstage/create-app - v0.1.1-alpha.21
+###### January 8th 2021 - @backstage/create-app - v0.4.5
> This document takes you through setting up a Backstage app that runs in your
> own environment. It starts with a skeleton install and verifying of the
-> monorepo's functionality. Next, GitHub authentication is added and tested.
+> monorepo's functionality. Next, authentication is added and tested.
>
-> This document assumes you have Node.js 12 active along with Yarn and Python.
-> Please note, that at the time of this writing, the current version is
-> 0.1.1-alpha.21. This guide can still be used with future versions, just,
-> verify as you go. If you run into issues, you can compare your setup with mine
-> here >
-> [simple-backstage-app](https://github.com/johnson-jesse/simple-backstage-app).
+> This document assumes you have Node.js 12 or 14 active along with Yarn and
+> Python. Please note, that at the time of this writing, the current version is
+> v0.4.5. This guide can still be used with future versions, just, verify as you
+> go.
# The Skeleton Application
@@ -55,7 +53,17 @@ guest. Let's fix that now and add auth.
# The Auth Configuration
-1. Open `app-config.yaml` and change it as follows
+A default Backstage installation includes multiple authentication providers out
+of the box. The steps to enable new authentication providers in Backstage are
+very similar to each other, the biggest difference is usually configuring the
+external authentication provider. Please see a subset of possible providers and
+instructions to integrate them below. Steps 1 & 2 are described separately for
+each provider and steps beyond that are common for all.
+
+GitHub
+
+
+### 1. Open `app-config.yaml` and change it as follows
_from:_
@@ -75,23 +83,229 @@ auth:
$env: AUTH_GITHUB_CLIENT_ID
clientSecret:
$env: AUTH_GITHUB_CLIENT_SECRET
- ## uncomment the following three lines if using enterprise
+ ## uncomment the following two lines if using enterprise
# enterpriseInstanceUrl:
# $env: AUTH_GITHUB_ENTERPRISE_INSTANCE_URL
```
-2. Set environment variables in whatever fashion is easiest for you. I chose to
- add mine to my `.zshrc` profile.
+### 2. Generate a GitHub client ID and secret
+
+- Log into http://github.com
+- Navigate to (Settings > Developer Settings > OAuth Apps > New OAuth
+ App)[https://github.com/settings/applications/new]
+- Set Homepage URL = `http://localhost:3000`
+- Set Callback URL = `http://localhost:7000/api/auth/github`
+- Click [Register application]
+- On the next page, copy and paste your new Client ID and Client Secret to
+ environment variables defined in the `app-config.yaml` file,
+ `AUTH_GITHUB_CLIENT_ID` & `AUTH_GITHUB_CLIENT_SECRET`
+
+
+
+
+GitLab
+
+
+### 1. Open `app-config.yaml` and change it as follows
+
+_from:_
+
+```yaml
+auth:
+ providers: {}
+```
+
+_to:_
+
+```yaml
+auth:
+ providers:
+ gitlab:
+ development:
+ clientId:
+ $env: AUTH_GITLAB_CLIENT_ID
+ clientSecret:
+ $env: AUTH_GITLAB_CLIENT_SECRET
+ audience: https://gitlab.com # Or your self-hosted GitLab instance URL
+```
+
+### 2. Generate a GitLab Application client ID and secret
+
+- Log into GitLab
+- Navigate to (Profile > Settings >
+ Applications)[https://gitlab.com/-/profile/applications]
+- Name your application
+- Set Callback URL = `http://localhost:7000/api/auth/gitlab/handler/frame`
+- Select the following values:
+ - `read_user` (Read the authenticated user's personal information)
+ - `read_repository` (Allows read-only access to the repository)
+ - `write_repository` (Allows read-write access to the repository)
+ - `openid` (Authenticate using OpenID Connect)
+ - `profile` (Allows read-only access to the user's personal information using
+ OpenID Connect)
+ - `email` (Allows read-only access to the user's primary email address using
+ OpenID Connect)
+- Click [Save application]
+- On the next page, copy and paste your new Application ID and Secret to
+ environment variables defined in the `app-config.yaml` file,
+ `AUTH_GITLAB_CLIENT_ID` & `AUTH_GITLAB_CLIENT_SECRET`
+
+
+
+
+Google
+
+
+### 1. Open `app-config.yaml` and change it as follows
+
+_from:_
+
+```yaml
+auth:
+ providers: {}
+```
+
+_to:_
+
+```yaml
+auth:
+ providers:
+ google:
+ development:
+ clientId:
+ $env: AUTH_GOOGLE_CLIENT_ID
+ clientSecret:
+ $env: AUTH_GOOGLE_CLIENT_SECRET
+```
+
+### 2. Generate Google Credentials in Google Cloud console
+
+- Log into https://console.cloud.google.com
+- Select or create a new project from the dropdown on the top bar
+- Navigate to (APIs & Services >
+ Credentials)[https://console.cloud.google.com/apis/credentials]
+- Click Create Credentials and select [OAuth client ID]
+- Select Web Application as the application type
+- Add new Authorised JavaScript origin = `http://localhost:3000`
+- Add new Authorised redirect URI =
+ `http://localhost:7000/api/auth/google/handler/frame`
+- Click [Save application]
+- Google should display a modal with your Client ID and Secret. Copy and paste
+ those to environment variables defined in the `app-config.yaml` file,
+ `AUTH_GOOGLE_CLIENT_ID` & `AUTH_GOOGLE_CLIENT_SECRET`
+
+
+
+
+Microsoft
+
+
+### 1. Open `app-config.yaml` and change it as follows
+
+_from:_
+
+```yaml
+auth:
+ providers: {}
+```
+
+_to:_
+
+```yaml
+auth:
+ providers:
+ microsoft:
+ development:
+ clientId:
+ $env: AUTH_MICROSOFT_CLIENT_ID
+ clientSecret:
+ $env: AUTH_MICROSOFT_CLIENT_SECRET
+ tenantId:
+ $env: AUTH_MICROSOFT_TENANT_ID
+```
+
+### 2. Create a Microsoft App Registration in Microsoft Portal
+
+- Log into https://portal.azure.com
+- Navigate to (Azure Active Directory > App
+ Registrations)[https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps]
+- Create a New Registration
+- Add new Redirect URI = `http://localhost:3000`
+- Add new Authorised redirect URI =
+ `http://localhost:7000/api/auth/microsoft/handler/frame`
+- Click [Save application]
+- Set environment variable `AUTH_MICROSOFT_CLIENT_ID` from
+ `Application (client) Id` displayed on the directory page
+- Set environment variable `AUTH_MICROSOFT_TENANT_ID` from
+ `Directory (tenant) ID` displayed on the directory page
+- Navigate to Certificates & Secrets section and click [Create a new secret]
+- Set environment variable `AUTH_MICROSOFT_CLIENT_SECRET` from the `value` field
+ created.
+
+
+
+
+Auth0
+
+
+### 1. Open `app-config.yaml` and change it as follows
+
+_from:_
+
+```yaml
+auth:
+ providers: {}
+```
+
+_to:_
+
+```yaml
+auth:
+ providers:
+ auth0:
+ development:
+ clientId:
+ $env: AUTH_AUTH0_CLIENT_ID
+ clientSecret:
+ $env: AUTH_AUTH0_CLIENT_SECRET
+ domain:
+ $env: AUTH_AUTH0_DOMAIN_ID
+```
+
+### 2. Create an Auth0 application in the Auth0 management console
+
+- Log into https://manage.auth0.com/dashboard/
+- Navigate to Applications
+- Create a New Application
+ - Select Single Page Web Application
+- Go to Settings tab
+- Add new line to Allowed Callback URLs =
+ `http://localhost:7000/api/auth/auth0/handler/frame`
+- Click [Save Changes]
+- Set environment variables displayed on the Basic Information page
+ - `AUTH_AUTH0_CLIENT_ID` from `Client ID` displayed on Auth0 application page
+ - `AUTH_AUTH0_CLIENT_SECRET` from `Client Secret` displayed on Auth0
+ application page
+ - `AUTH_AUTH0_DOMAIN_ID` from `Domain` displayed on Auth0 application page
+
+
+
+
+### 3. Set environment variables in whatever fashion is easiest for you. I chose to
+
+add mine to my `.zshrc` profile.
```zsh
# For macOS Catalina & Z Shell
# ------ simple-backstage-app GitHub
+#
+# (Change the name of the environment variables based on your auth setup above)
export AUTH_GITHUB_CLIENT_ID=xxx
export AUTH_GITHUB_CLIENT_SECRET=xxx
# export AUTH_GITHUB_ENTERPRISE_INSTANCE_URL=https://github.{MY_BIZ}.com
```
-3. And of course I need to source that file.
+### 4. And of course I need to source that file.
```zsh
# Loading the new variables
@@ -107,26 +321,28 @@ export AUTH_GITHUB_CLIENT_SECRET=xxx
> ...
```
-4. The values to replace `xxx` above come from your oauth app setup.
+### 5. Open and change _root > packages > app > src >_ `App.tsx` to use correct
-```
-> Log into http://github.com
-> Navigate to (Settings > Developer Settings > OAuth Apps > New OAuth App)[https://github.com/settings/applications/new]
-> Set Homepage URL = http://localhost:3000
-> Set Callback URL = http://localhost:7000/api/auth/github
-> Click [Register application]
-> On the next page, copy and paste your new Client ID and Client Secret to the environment variables above, `AUTH_GITHUB_CLIENT_ID` & `AUTH_GITHUB_CLIENT_SECRET`
-> Don't forget to `source` that profile file again if necessary.
-```
-
-5. Open and change _root > packages > app > src >_`App.tsx` as follows
+authentication provider reference
```tsx
-// Add the following imports to the existing list from core
import { githubAuthApiRef, SignInPage } from '@backstage/core';
```
-6. In the same file, change the createApp function as follows
+Modify the imported reference based on the authentication method you selected
+above:
+
+| Auth Provider | Import Name |
+| ------------- | ------------------- |
+| GitHub | githubAuthApiRef |
+| GitLab | gitlabAuthApiRef |
+| Google | googleAuthApiRef |
+| Microsoft | microsoftAuthApiRef |
+| Auth0 | auth0AuthApiRef |
+
+### 6. In the same file, modify createApp
+
+Remember to modify the provider information based on the table above.
```tsx
const app = createApp({
@@ -153,12 +369,18 @@ const app = createApp({
});
```
-7. Start the backend and frontend as before
+After finishing setting up one (or multiple) authentication providers defined
+above you can start the backend and frontend as before
When the browser loads, you should be presented with a login page for GitHub.
Login as usual with your GitHub account. If this is your first time, you will be
asked to authorize and then are redirected to the catalog page if all is well.
+For more information you can clone
+[the backstage-auth-example repository](https://github.com/RoadieHQ/backstage-auth-example).
+Each authentication setting is set up there on a branch named after the
+authentication provider.
+
# Where to go from here
> You're probably eager to write your first custom plugin. Follow this next
diff --git a/docs/tutorials/quickstart-app-plugin.md b/docs/tutorials/quickstart-app-plugin.md
index 0f8d9bb84b..6208fbe30d 100644
--- a/docs/tutorials/quickstart-app-plugin.md
+++ b/docs/tutorials/quickstart-app-plugin.md
@@ -59,7 +59,7 @@ import GitHubIcon from '@material-ui/icons/GitHub';
```
Simple! The App will reload with your changes automatically. You should now see
-a github icon displayed in the sidebar. Clicking that will link to our new
+a GitHub icon displayed in the sidebar. Clicking that will link to our new
plugin. And now, the API fun begins.
# The Identity
@@ -72,8 +72,7 @@ Our first modification will be to extract information from the Identity API.
```tsx
// Add identityApiRef to the list of imported from core
-import { identityApiRef } from '@backstage/core';
-import { useApi } from '@backstage/core-api';
+import { identityApiRef, useApi } from '@backstage/core';
```
3. Adjust the ExampleComponent from inline to block
@@ -143,8 +142,8 @@ import {
TableColumn,
Progress,
githubAuthApiRef,
+ useApi,
} from '@backstage/core';
-import { useApi } from '@backstage/core-api';
import { graphql } from '@octokit/graphql';
const ExampleFetchComponent = () => {
diff --git a/microsite/blog/2020-09-08-announcing-tech-docs.md b/microsite/blog/2020-09-08-announcing-tech-docs.md
index f09c73fd83..98fbad57c5 100644
--- a/microsite/blog/2020-09-08-announcing-tech-docs.md
+++ b/microsite/blog/2020-09-08-announcing-tech-docs.md
@@ -6,7 +6,7 @@ authorURL: https://github.com/garyniemen
Since we [open sourced Backstage](https://backstage.io/blog/2020/03/16/announcing-backstage), one of the most requested features has been for a technical documentation plugin. Well, good news. The first open source version of TechDocs is here. Now let’s start collaborating and making it better, together.
-
@@ -135,9 +135,9 @@ const Background = props => {
width="560"
height="315"
src="https://www.youtube.com/embed/mOLCgdPw1iA"
- frameborder="0"
+ frameBorder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
- allowfullscreen
+ allowFullScreen
>
diff --git a/microsite/pages/en/docs/features/software-catalog/index.js b/microsite/pages/en/docs/features/software-catalog/index.js
new file mode 100644
index 0000000000..cffc91af21
--- /dev/null
+++ b/microsite/pages/en/docs/features/software-catalog/index.js
@@ -0,0 +1,15 @@
+const React = require('react');
+const Redirect = require('../../../../../core/Redirect.js');
+
+const siteConfig = require(process.cwd() + '/siteConfig.js');
+
+function Docs() {
+ return (
+
+ );
+}
+
+module.exports = Docs;
diff --git a/microsite/pages/en/docs/features/software-templates/index.js b/microsite/pages/en/docs/features/software-templates/index.js
new file mode 100644
index 0000000000..79d3f0659e
--- /dev/null
+++ b/microsite/pages/en/docs/features/software-templates/index.js
@@ -0,0 +1,15 @@
+const React = require('react');
+const Redirect = require('../../../../../core/Redirect.js');
+
+const siteConfig = require(process.cwd() + '/siteConfig.js');
+
+function Docs() {
+ return (
+
+ );
+}
+
+module.exports = Docs;
diff --git a/microsite/pages/en/docs/features/techdocs/index.js b/microsite/pages/en/docs/features/techdocs/index.js
new file mode 100644
index 0000000000..c45cde24f5
--- /dev/null
+++ b/microsite/pages/en/docs/features/techdocs/index.js
@@ -0,0 +1,15 @@
+const React = require('react');
+const Redirect = require('../../../../../core/Redirect.js');
+
+const siteConfig = require(process.cwd() + '/siteConfig.js');
+
+function Docs() {
+ return (
+
+ );
+}
+
+module.exports = Docs;
diff --git a/microsite/pages/en/index.js b/microsite/pages/en/index.js
index 0422bfab63..47f9568d9b 100644
--- a/microsite/pages/en/index.js
+++ b/microsite/pages/en/index.js
@@ -11,6 +11,7 @@ const Block = Components.Block;
const ActionBlock = Components.ActionBlock;
const Breakpoint = Components.Breakpoint;
const BulletLine = Components.BulletLine;
+const Banner = Components.Banner;
class Index extends React.Component {
render() {
@@ -27,8 +28,8 @@ class Index extends React.Component {
Powered by a centralized service catalog, Backstage restores
- order to your infrastructure. So your product teams can ship
- high-quality code quickly — without compromising autonomy.
+ order to your infrastructure and enables your product teams to
+ ship high-quality code quickly — without compromising autonomy.
+
+
+ 🎉 New feature: Kubernetes for service owners.{' '}
+
+ Learn more.
+
+
+
+
@@ -379,6 +389,72 @@ class Index extends React.Component {
+
+
+
+
+
+ Backstage Kubernetes
+
+ Manage your services, not clusters
+
+
+
+
+
+
+ Kubernetes made just for service owners
+
+
+ Backstage features the first Kubernetes monitoring tool designed
+ around the needs of service owners, not cluster admins
+
+
+
+
+
+
+ Your service at a glance
+
+
+ Get all your service's deployments in one, aggregated view — no
+ more digging through cluster logs in a CLI, no more combing
+ through lists of services you don't own
+
+
+
+
+
+ Pick a cloud, any cloud
+
+ Since Backstage uses the Kubernetes API, it's cloud agnostic —
+ so it works no matter which cloud provide or managed Kubernetes
+ service you use, and even works in multi-cloud orgs
+
+
+
+
+
+ Any K8s, one UI
+
+ Now you don't have to switch dashboards when you move from local
+ testing to production, or from one cloud provider to another
+
+
+
+
+
+ Learn more about the K8s plugin
+
+ Read
+
+
+
diff --git a/microsite/pages/en/plugins.js b/microsite/pages/en/plugins.js
index b1854135dc..9ee54173f1 100644
--- a/microsite/pages/en/plugins.js
+++ b/microsite/pages/en/plugins.js
@@ -16,7 +16,7 @@ const {
const pluginsDirectory = require('path').join(process.cwd(), 'data/plugins');
const pluginMetadata = fs
.readdirSync(pluginsDirectory)
- .map(file => yaml.safeLoad(fs.readFileSync(`./data/plugins/${file}`, 'utf8')))
+ .map(file => yaml.load(fs.readFileSync(`./data/plugins/${file}`, 'utf8')))
.sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()));
const truncate = text =>
text.length > 170 ? text.substr(0, 170) + '...' : text;
@@ -97,14 +97,14 @@ const Plugins = () => (
- See what plugins are already{' '}
+ See what plugins are already
in progress
- {' '}
- and 👍. Missing a plugin for your favorite tool? Please{' '}
+
+ and 👍. Missing a plugin for your favorite tool? Please
suggest
- {' '}
+
a new one.
diff --git a/microsite/sidebars.json b/microsite/sidebars.json
index b31f0ccdf3..c2ccea8740 100644
--- a/microsite/sidebars.json
+++ b/microsite/sidebars.json
@@ -36,6 +36,11 @@
],
"CLI": ["cli/index", "cli/commands"],
"Core Features": [
+ {
+ "type": "subcategory",
+ "label": "Kubernetes",
+ "ids": ["features/kubernetes/overview"]
+ },
{
"type": "subcategory",
"label": "Software Catalog",
@@ -50,6 +55,7 @@
"features/software-catalog/well-known-relations",
"features/software-catalog/extending-the-model",
"features/software-catalog/external-integrations",
+ "features/software-catalog/kubernetes-in-backstage",
"features/software-catalog/software-catalog-api"
]
},
@@ -66,6 +72,14 @@
"features/software-templates/extending/extending-preparer"
]
},
+ {
+ "type": "subcategory",
+ "label": "Backstage Search",
+ "ids": [
+ "features/search/search-overview",
+ "features/search/architecture"
+ ]
+ },
{
"type": "subcategory",
"label": "TechDocs",
@@ -77,6 +91,8 @@
"features/techdocs/creating-and-publishing",
"features/techdocs/configuration",
"features/techdocs/using-cloud-storage",
+ "features/techdocs/configuring-ci-cd",
+ "features/techdocs/how-to-guides",
"features/techdocs/troubleshooting",
"features/techdocs/faqs"
]
@@ -89,6 +105,7 @@
"plugins/plugin-development",
"plugins/structure-of-a-plugin",
"plugins/integrating-plugin-into-service-catalog",
+ "plugins/composability",
{
"type": "subcategory",
"label": "Backends and APIs",
@@ -166,10 +183,12 @@
"architecture-decisions/adrs-adr006",
"architecture-decisions/adrs-adr007",
"architecture-decisions/adrs-adr008",
- "architecture-decisions/adrs-adr009"
+ "architecture-decisions/adrs-adr009",
+ "architecture-decisions/adrs-adr010"
],
"Contribute": ["../CONTRIBUTING"],
"Support": ["support/support", "support/project-structure"],
+ "Glossary": ["glossary"],
"FAQ": ["FAQ"]
}
}
diff --git a/microsite/siteConfig.js b/microsite/siteConfig.js
index 39ba05bcad..8d0c4ea57c 100644
--- a/microsite/siteConfig.js
+++ b/microsite/siteConfig.js
@@ -82,6 +82,7 @@ const siteConfig = {
'https://buttons.github.io/buttons.js',
'https://unpkg.com/medium-zoom@1.0.6/dist/medium-zoom.min.js',
'/js/medium-zoom.js',
+ '/js/dismissable-banner.js',
],
// On page navigation for the current documentation page.
diff --git a/microsite/static/animations/backstage-kubernetes-icon-1.gif b/microsite/static/animations/backstage-kubernetes-icon-1.gif
new file mode 100644
index 0000000000..a7a653a3a3
Binary files /dev/null and b/microsite/static/animations/backstage-kubernetes-icon-1.gif differ
diff --git a/microsite/static/css/custom.css b/microsite/static/css/custom.css
index 46b2aa3470..c947c88e66 100644
--- a/microsite/static/css/custom.css
+++ b/microsite/static/css/custom.css
@@ -48,6 +48,11 @@ h6 {
color: $textColor;
}
+summary {
+ color: $textColor;
+ cursor: pointer;
+}
+
h2:hover .hash-link {
opacity: 1;
}
@@ -1030,6 +1035,55 @@ code {
}
}
+.Banner {
+ position: relative;
+ padding: 14px;
+ margin: 14px 20px;
+ border-radius: 4px;
+ background-color: $primaryColor;
+ font-family: Helvetica Neue, sans-serif;
+ color: #000;
+}
+
+.Banner--hidden {
+ opacity: 0;
+ transition: opacity 200ms ease-in-out;
+}
+
+.Banner a {
+ color: #000;
+ text-decoration: underline;
+}
+
+.Banner__Container {
+ position: relative;
+ overflow: visible;
+ z-index: 100;
+
+ max-width: 1430px;
+ height: 0;
+ margin: -14px auto 14px auto;
+}
+
+.Banner__DismissButton {
+ position: absolute;
+ display: flex;
+ right: 8px;
+ top: 0;
+ bottom: 0;
+ margin: auto;
+
+ border-radius: 50%;
+ padding: 6px;
+ width: 36px;
+ height: 36px;
+ cursor: pointer;
+}
+
+.Banner__DismissButton:hover {
+ background: rgba(0, 0, 0, 0.2);
+}
+
.logos-mobile-background {
position: absolute;
width: 200vw;
diff --git a/microsite/static/js/dismissable-banner.js b/microsite/static/js/dismissable-banner.js
new file mode 100644
index 0000000000..2fcdbe5692
--- /dev/null
+++ b/microsite/static/js/dismissable-banner.js
@@ -0,0 +1,18 @@
+window.addEventListener('DOMContentLoaded', () => {
+ const banners = document.querySelectorAll('[data-banner]');
+ banners.forEach(banner => {
+ const storageKey = `hideBanner/${banner.getAttribute('data-banner')}`;
+
+ if (!localStorage.getItem(storageKey)) {
+ banner.classList.remove('Banner--hidden');
+ }
+
+ const dismissButton = banner.querySelector('[data-banner-dismiss]');
+ if (dismissButton) {
+ dismissButton.addEventListener('click', () => {
+ banner.classList.add('Banner--hidden');
+ localStorage.setItem(storageKey, 'true');
+ });
+ }
+ });
+});
diff --git a/microsite/yarn.lock b/microsite/yarn.lock
index e41db2a665..898fd69ad2 100644
--- a/microsite/yarn.lock
+++ b/microsite/yarn.lock
@@ -9,55 +9,54 @@
dependencies:
"@babel/highlight" "^7.0.0"
-"@babel/code-frame@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
- integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
+"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
+ integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
dependencies:
"@babel/highlight" "^7.10.4"
"@babel/compat-data@^7.12.5", "@babel/compat-data@^7.12.7":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41"
+ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41"
integrity sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==
"@babel/core@^7.12.3":
- version "7.12.9"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.9.tgz#fd450c4ec10cdbb980e2928b7aa7a28484593fc8"
- integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd"
+ integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==
dependencies:
"@babel/code-frame" "^7.10.4"
- "@babel/generator" "^7.12.5"
+ "@babel/generator" "^7.12.10"
"@babel/helper-module-transforms" "^7.12.1"
"@babel/helpers" "^7.12.5"
- "@babel/parser" "^7.12.7"
+ "@babel/parser" "^7.12.10"
"@babel/template" "^7.12.7"
- "@babel/traverse" "^7.12.9"
- "@babel/types" "^7.12.7"
+ "@babel/traverse" "^7.12.10"
+ "@babel/types" "^7.12.10"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.1"
json5 "^2.1.2"
lodash "^4.17.19"
- resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"
-"@babel/generator@^7.12.5":
- version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de"
- integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==
+"@babel/generator@^7.12.10", "@babel/generator@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af"
+ integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==
dependencies:
- "@babel/types" "^7.12.5"
+ "@babel/types" "^7.12.11"
jsesc "^2.5.1"
source-map "^0.5.0"
-"@babel/helper-annotate-as-pure@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3"
- integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==
+"@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.10":
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d"
+ integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ==
dependencies:
- "@babel/types" "^7.10.4"
+ "@babel/types" "^7.12.10"
"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4":
version "7.10.4"
@@ -67,26 +66,9 @@
"@babel/helper-explode-assignable-expression" "^7.10.4"
"@babel/types" "^7.10.4"
-"@babel/helper-builder-react-jsx-experimental@^7.12.4":
- version "7.12.4"
- resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.12.4.tgz#55fc1ead5242caa0ca2875dcb8eed6d311e50f48"
- integrity sha512-AjEa0jrQqNk7eDQOo0pTfUOwQBMF+xVqrausQwT9/rTKy0g04ggFNaJpaE09IQMn9yExluigWMJcj0WC7bq+Og==
- dependencies:
- "@babel/helper-annotate-as-pure" "^7.10.4"
- "@babel/helper-module-imports" "^7.12.1"
- "@babel/types" "^7.12.1"
-
-"@babel/helper-builder-react-jsx@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz#8095cddbff858e6fa9c326daee54a2f2732c1d5d"
- integrity sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg==
- dependencies:
- "@babel/helper-annotate-as-pure" "^7.10.4"
- "@babel/types" "^7.10.4"
-
"@babel/helper-compilation-targets@^7.12.5":
version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz#cb470c76198db6a24e9dbc8987275631e5d29831"
+ resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz#cb470c76198db6a24e9dbc8987275631e5d29831"
integrity sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==
dependencies:
"@babel/compat-data" "^7.12.5"
@@ -96,7 +78,7 @@
"@babel/helper-create-class-features-plugin@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e"
+ resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e"
integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==
dependencies:
"@babel/helper-function-name" "^7.10.4"
@@ -105,18 +87,9 @@
"@babel/helper-replace-supers" "^7.12.1"
"@babel/helper-split-export-declaration" "^7.10.4"
-"@babel/helper-create-regexp-features-plugin@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8"
- integrity sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==
- dependencies:
- "@babel/helper-annotate-as-pure" "^7.10.4"
- "@babel/helper-regex" "^7.10.4"
- regexpu-core "^4.7.0"
-
"@babel/helper-create-regexp-features-plugin@^7.12.1":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz#2084172e95443fa0a09214ba1bb328f9aea1278f"
+ resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz#2084172e95443fa0a09214ba1bb328f9aea1278f"
integrity sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==
dependencies:
"@babel/helper-annotate-as-pure" "^7.10.4"
@@ -132,27 +105,27 @@
lodash "^4.17.19"
"@babel/helper-explode-assignable-expression@^7.10.4":
- version "7.11.4"
- resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz#2d8e3470252cc17aba917ede7803d4a7a276a41b"
- integrity sha512-ux9hm3zR4WV1Y3xXxXkdG/0gxF9nvI0YVmKVhvK9AfMoaQkemL3sJpXw+Xbz65azo8qJiEz2XVDUpK3KYhH3ZQ==
+ version "7.12.1"
+ resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz#8006a466695c4ad86a2a5f2fb15b5f2c31ad5633"
+ integrity sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==
dependencies:
- "@babel/types" "^7.10.4"
+ "@babel/types" "^7.12.1"
-"@babel/helper-function-name@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a"
- integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==
+"@babel/helper-function-name@^7.10.4", "@babel/helper-function-name@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42"
+ integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==
dependencies:
- "@babel/helper-get-function-arity" "^7.10.4"
- "@babel/template" "^7.10.4"
- "@babel/types" "^7.10.4"
+ "@babel/helper-get-function-arity" "^7.12.10"
+ "@babel/template" "^7.12.7"
+ "@babel/types" "^7.12.11"
-"@babel/helper-get-function-arity@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2"
- integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==
+"@babel/helper-get-function-arity@^7.12.10":
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf"
+ integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==
dependencies:
- "@babel/types" "^7.10.4"
+ "@babel/types" "^7.12.10"
"@babel/helper-hoist-variables@^7.10.4":
version "7.10.4"
@@ -161,23 +134,23 @@
dependencies:
"@babel/types" "^7.10.4"
-"@babel/helper-member-expression-to-functions@^7.12.1":
+"@babel/helper-member-expression-to-functions@^7.12.1", "@babel/helper-member-expression-to-functions@^7.12.7":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855"
+ resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855"
integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==
dependencies:
"@babel/types" "^7.12.7"
"@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.5":
version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb"
+ resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb"
integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==
dependencies:
"@babel/types" "^7.12.5"
"@babel/helper-module-transforms@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c"
+ resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c"
integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==
dependencies:
"@babel/helper-module-imports" "^7.12.1"
@@ -190,28 +163,21 @@
"@babel/types" "^7.12.1"
lodash "^4.17.19"
-"@babel/helper-optimise-call-expression@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673"
- integrity sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==
+"@babel/helper-optimise-call-expression@^7.10.4", "@babel/helper-optimise-call-expression@^7.12.10":
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d"
+ integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==
dependencies:
- "@babel/types" "^7.10.4"
+ "@babel/types" "^7.12.10"
"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
version "7.10.4"
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375"
integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==
-"@babel/helper-regex@^7.10.4":
- version "7.10.5"
- resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0"
- integrity sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==
- dependencies:
- lodash "^4.17.19"
-
"@babel/helper-remap-async-to-generator@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz#8c4dbbf916314f6047dc05e6a2217074238347fd"
+ resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz#8c4dbbf916314f6047dc05e6a2217074238347fd"
integrity sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==
dependencies:
"@babel/helper-annotate-as-pure" "^7.10.4"
@@ -219,50 +185,50 @@
"@babel/types" "^7.12.1"
"@babel/helper-replace-supers@^7.12.1":
- version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz#f009a17543bbbbce16b06206ae73b63d3fca68d9"
- integrity sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d"
+ integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==
dependencies:
- "@babel/helper-member-expression-to-functions" "^7.12.1"
- "@babel/helper-optimise-call-expression" "^7.10.4"
- "@babel/traverse" "^7.12.5"
- "@babel/types" "^7.12.5"
+ "@babel/helper-member-expression-to-functions" "^7.12.7"
+ "@babel/helper-optimise-call-expression" "^7.12.10"
+ "@babel/traverse" "^7.12.10"
+ "@babel/types" "^7.12.11"
"@babel/helper-simple-access@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136"
+ resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136"
integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==
dependencies:
"@babel/types" "^7.12.1"
"@babel/helper-skip-transparent-expression-wrappers@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf"
+ resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf"
integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==
dependencies:
"@babel/types" "^7.12.1"
-"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0":
- version "7.11.0"
- resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f"
- integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==
+"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a"
+ integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==
dependencies:
- "@babel/types" "^7.11.0"
+ "@babel/types" "^7.12.11"
-"@babel/helper-validator-identifier@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
- integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
+"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
+ integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
-"@babel/helper-validator-option@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9"
- integrity sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==
+"@babel/helper-validator-option@^7.12.1", "@babel/helper-validator-option@^7.12.11":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f"
+ integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==
"@babel/helper-wrap-function@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87"
- integrity sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==
+ version "7.12.3"
+ resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz#3332339fc4d1fbbf1c27d7958c27d34708e990d9"
+ integrity sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==
dependencies:
"@babel/helper-function-name" "^7.10.4"
"@babel/template" "^7.10.4"
@@ -271,7 +237,7 @@
"@babel/helpers@^7.12.5":
version "7.12.5"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e"
+ resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e"
integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==
dependencies:
"@babel/template" "^7.10.4"
@@ -287,20 +253,15 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
-"@babel/parser@^7.10.4":
- version "7.11.5"
- resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037"
- integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==
-
-"@babel/parser@^7.12.7":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056"
- integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==
+"@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7":
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79"
+ integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==
"@babel/plugin-proposal-async-generator-functions@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e"
- integrity sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==
+ version "7.12.12"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz#04b8f24fd4532008ab4e79f788468fd5a8476566"
+ integrity sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/helper-remap-async-to-generator" "^7.12.1"
@@ -308,7 +269,7 @@
"@babel/plugin-proposal-class-properties@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de"
integrity sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.12.1"
@@ -316,7 +277,7 @@
"@babel/plugin-proposal-dynamic-import@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc"
integrity sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -324,7 +285,7 @@
"@babel/plugin-proposal-export-namespace-from@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz#8b9b8f376b2d88f5dd774e4d24a5cc2e3679b6d4"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz#8b9b8f376b2d88f5dd774e4d24a5cc2e3679b6d4"
integrity sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -332,7 +293,7 @@
"@babel/plugin-proposal-json-strings@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c"
integrity sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -340,7 +301,7 @@
"@babel/plugin-proposal-logical-assignment-operators@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz#f2c490d36e1b3c9659241034a5d2cd50263a2751"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz#f2c490d36e1b3c9659241034a5d2cd50263a2751"
integrity sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -348,7 +309,7 @@
"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c"
integrity sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -356,7 +317,7 @@
"@babel/plugin-proposal-numeric-separator@^7.12.7":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz#8bf253de8139099fea193b297d23a9d406ef056b"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz#8bf253de8139099fea193b297d23a9d406ef056b"
integrity sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -364,7 +325,7 @@
"@babel/plugin-proposal-object-rest-spread@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069"
integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -373,7 +334,7 @@
"@babel/plugin-proposal-optional-catch-binding@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz#ccc2421af64d3aae50b558a71cede929a5ab2942"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz#ccc2421af64d3aae50b558a71cede929a5ab2942"
integrity sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -381,7 +342,7 @@
"@babel/plugin-proposal-optional-chaining@^7.12.7":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c"
integrity sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -390,28 +351,20 @@
"@babel/plugin-proposal-private-methods@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz#86814f6e7a21374c980c10d38b4493e703f4a389"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz#86814f6e7a21374c980c10d38b4493e703f4a389"
integrity sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.12.1"
"@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-proposal-unicode-property-regex@^7.12.1":
+"@babel/plugin-proposal-unicode-property-regex@^7.12.1", "@babel/plugin-proposal-unicode-property-regex@^7.4.4":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz#2a183958d417765b9eae334f47758e5d6a82e072"
+ resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz#2a183958d417765b9eae334f47758e5d6a82e072"
integrity sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==
dependencies:
"@babel/helper-create-regexp-features-plugin" "^7.12.1"
"@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-proposal-unicode-property-regex@^7.4.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz#4483cda53041ce3413b7fe2f00022665ddfaa75d"
- integrity sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==
- dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.10.4"
- "@babel/helper-plugin-utils" "^7.10.4"
-
"@babel/plugin-syntax-async-generators@^7.8.0":
version "7.8.4"
resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
@@ -421,7 +374,7 @@
"@babel/plugin-syntax-class-properties@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978"
+ resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978"
integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -449,7 +402,7 @@
"@babel/plugin-syntax-jsx@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926"
+ resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926"
integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -498,21 +451,21 @@
"@babel/plugin-syntax-top-level-await@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0"
+ resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0"
integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-arrow-functions@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz#8083ffc86ac8e777fbe24b5967c4b2521f3cb2b3"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz#8083ffc86ac8e777fbe24b5967c4b2521f3cb2b3"
integrity sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-async-to-generator@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz#3849a49cc2a22e9743cbd6b52926d30337229af1"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz#3849a49cc2a22e9743cbd6b52926d30337229af1"
integrity sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==
dependencies:
"@babel/helper-module-imports" "^7.12.1"
@@ -521,21 +474,21 @@
"@babel/plugin-transform-block-scoped-functions@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz#f2a1a365bde2b7112e0a6ded9067fdd7c07905d9"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz#f2a1a365bde2b7112e0a6ded9067fdd7c07905d9"
integrity sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-block-scoping@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz#f0ee727874b42a208a48a586b84c3d222c2bbef1"
- integrity sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==
+"@babel/plugin-transform-block-scoping@^7.12.11":
+ version "7.12.12"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz#d93a567a152c22aea3b1929bb118d1d0a175cdca"
+ integrity sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-classes@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz#65e650fcaddd3d88ddce67c0f834a3d436a32db6"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz#65e650fcaddd3d88ddce67c0f834a3d436a32db6"
integrity sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==
dependencies:
"@babel/helper-annotate-as-pure" "^7.10.4"
@@ -549,44 +502,36 @@
"@babel/plugin-transform-computed-properties@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz#d68cf6c9b7f838a8a4144badbe97541ea0904852"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz#d68cf6c9b7f838a8a4144badbe97541ea0904852"
integrity sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-destructuring@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz#b9a570fe0d0a8d460116413cb4f97e8e08b2f847"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz#b9a570fe0d0a8d460116413cb4f97e8e08b2f847"
integrity sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-dotall-regex@^7.12.1":
+"@babel/plugin-transform-dotall-regex@^7.12.1", "@babel/plugin-transform-dotall-regex@^7.4.4":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz#a1d16c14862817b6409c0a678d6f9373ca9cd975"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz#a1d16c14862817b6409c0a678d6f9373ca9cd975"
integrity sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==
dependencies:
"@babel/helper-create-regexp-features-plugin" "^7.12.1"
"@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-dotall-regex@^7.4.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz#469c2062105c1eb6a040eaf4fac4b488078395ee"
- integrity sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==
- dependencies:
- "@babel/helper-create-regexp-features-plugin" "^7.10.4"
- "@babel/helper-plugin-utils" "^7.10.4"
-
"@babel/plugin-transform-duplicate-keys@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz#745661baba295ac06e686822797a69fbaa2ca228"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz#745661baba295ac06e686822797a69fbaa2ca228"
integrity sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-exponentiation-operator@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz#b0f2ed356ba1be1428ecaf128ff8a24f02830ae0"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz#b0f2ed356ba1be1428ecaf128ff8a24f02830ae0"
integrity sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==
dependencies:
"@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4"
@@ -594,14 +539,14 @@
"@babel/plugin-transform-for-of@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa"
integrity sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-function-name@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz#2ec76258c70fe08c6d7da154003a480620eba667"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz#2ec76258c70fe08c6d7da154003a480620eba667"
integrity sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==
dependencies:
"@babel/helper-function-name" "^7.10.4"
@@ -609,21 +554,21 @@
"@babel/plugin-transform-literals@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz#d73b803a26b37017ddf9d3bb8f4dc58bfb806f57"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz#d73b803a26b37017ddf9d3bb8f4dc58bfb806f57"
integrity sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-member-expression-literals@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz#496038602daf1514a64d43d8e17cbb2755e0c3ad"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz#496038602daf1514a64d43d8e17cbb2755e0c3ad"
integrity sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-modules-amd@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz#3154300b026185666eebb0c0ed7f8415fefcf6f9"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz#3154300b026185666eebb0c0ed7f8415fefcf6f9"
integrity sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==
dependencies:
"@babel/helper-module-transforms" "^7.12.1"
@@ -632,7 +577,7 @@
"@babel/plugin-transform-modules-commonjs@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648"
integrity sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==
dependencies:
"@babel/helper-module-transforms" "^7.12.1"
@@ -642,7 +587,7 @@
"@babel/plugin-transform-modules-systemjs@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz#663fea620d593c93f214a464cd399bf6dc683086"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz#663fea620d593c93f214a464cd399bf6dc683086"
integrity sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==
dependencies:
"@babel/helper-hoist-variables" "^7.10.4"
@@ -653,7 +598,7 @@
"@babel/plugin-transform-modules-umd@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz#eb5a218d6b1c68f3d6217b8fa2cc82fec6547902"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz#eb5a218d6b1c68f3d6217b8fa2cc82fec6547902"
integrity sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==
dependencies:
"@babel/helper-module-transforms" "^7.12.1"
@@ -661,21 +606,21 @@
"@babel/plugin-transform-named-capturing-groups-regex@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz#b407f5c96be0d9f5f88467497fa82b30ac3e8753"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz#b407f5c96be0d9f5f88467497fa82b30ac3e8753"
integrity sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==
dependencies:
"@babel/helper-create-regexp-features-plugin" "^7.12.1"
"@babel/plugin-transform-new-target@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz#80073f02ee1bb2d365c3416490e085c95759dec0"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz#80073f02ee1bb2d365c3416490e085c95759dec0"
integrity sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-object-super@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz#4ea08696b8d2e65841d0c7706482b048bed1066e"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz#4ea08696b8d2e65841d0c7706482b048bed1066e"
integrity sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -683,61 +628,46 @@
"@babel/plugin-transform-parameters@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz#d2e963b038771650c922eff593799c96d853255d"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz#d2e963b038771650c922eff593799c96d853255d"
integrity sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-property-literals@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz#41bc81200d730abb4456ab8b3fbd5537b59adecd"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz#41bc81200d730abb4456ab8b3fbd5537b59adecd"
integrity sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-react-display-name@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.1.tgz#1cbcd0c3b1d6648c55374a22fc9b6b7e5341c00d"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.1.tgz#1cbcd0c3b1d6648c55374a22fc9b6b7e5341c00d"
integrity sha512-cAzB+UzBIrekfYxyLlFqf/OagTvHLcVBb5vpouzkYkBclRPraiygVnafvAoipErZLI8ANv8Ecn6E/m5qPXD26w==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-react-jsx-development@^7.12.7":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.7.tgz#4c2a647de79c7e2b16bfe4540677ba3121e82a08"
- integrity sha512-Rs3ETtMtR3VLXFeYRChle5SsP/P9Jp/6dsewBQfokDSzKJThlsuFcnzLTDRALiUmTC48ej19YD9uN1mupEeEDg==
+ version "7.12.12"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.12.12.tgz#bccca33108fe99d95d7f9e82046bfe762e71f4e7"
+ integrity sha512-i1AxnKxHeMxUaWVXQOSIco4tvVvvCxMSfeBMnMM06mpaJt3g+MpxYQQrDfojUQldP1xxraPSJYSMEljoWM/dCg==
dependencies:
- "@babel/helper-builder-react-jsx-experimental" "^7.12.4"
- "@babel/helper-plugin-utils" "^7.10.4"
- "@babel/plugin-syntax-jsx" "^7.12.1"
-
-"@babel/plugin-transform-react-jsx-self@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.12.1.tgz#ef43cbca2a14f1bd17807dbe4376ff89d714cf28"
- integrity sha512-FbpL0ieNWiiBB5tCldX17EtXgmzeEZjFrix72rQYeq9X6nUK38HCaxexzVQrZWXanxKJPKVVIU37gFjEQYkPkA==
- dependencies:
- "@babel/helper-plugin-utils" "^7.10.4"
-
-"@babel/plugin-transform-react-jsx-source@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.12.1.tgz#d07de6863f468da0809edcf79a1aa8ce2a82a26b"
- integrity sha512-keQ5kBfjJNRc6zZN1/nVHCd6LLIHq4aUKcVnvE/2l+ZZROSbqoiGFRtT5t3Is89XJxBQaP7NLZX2jgGHdZvvFQ==
- dependencies:
- "@babel/helper-plugin-utils" "^7.10.4"
-
-"@babel/plugin-transform-react-jsx@^7.12.7":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.7.tgz#8b14d45f6eccd41b7f924bcb65c021e9f0a06f7f"
- integrity sha512-YFlTi6MEsclFAPIDNZYiCRbneg1MFGao9pPG9uD5htwE0vDbPaMUMeYd6itWjw7K4kro4UbdQf3ljmFl9y48dQ==
- dependencies:
- "@babel/helper-builder-react-jsx" "^7.10.4"
- "@babel/helper-builder-react-jsx-experimental" "^7.12.4"
+ "@babel/plugin-transform-react-jsx" "^7.12.12"
+
+"@babel/plugin-transform-react-jsx@^7.12.10", "@babel/plugin-transform-react-jsx@^7.12.12":
+ version "7.12.12"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.12.12.tgz#b0da51ffe5f34b9a900e9f1f5fb814f9e512d25e"
+ integrity sha512-JDWGuzGNWscYcq8oJVCtSE61a5+XAOos+V0HrxnDieUus4UMnBEosDnY1VJqU5iZ4pA04QY7l0+JvHL1hZEfsw==
+ dependencies:
+ "@babel/helper-annotate-as-pure" "^7.12.10"
+ "@babel/helper-module-imports" "^7.12.5"
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-syntax-jsx" "^7.12.1"
+ "@babel/types" "^7.12.12"
"@babel/plugin-transform-react-pure-annotations@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz#05d46f0ab4d1339ac59adf20a1462c91b37a1a42"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.12.1.tgz#05d46f0ab4d1339ac59adf20a1462c91b37a1a42"
integrity sha512-RqeaHiwZtphSIUZ5I85PEH19LOSzxfuEazoY7/pWASCAIBuATQzpSVD+eT6MebeeZT2F4eSL0u4vw6n4Nm0Mjg==
dependencies:
"@babel/helper-annotate-as-pure" "^7.10.4"
@@ -745,28 +675,28 @@
"@babel/plugin-transform-regenerator@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz#5f0a28d842f6462281f06a964e88ba8d7ab49753"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz#5f0a28d842f6462281f06a964e88ba8d7ab49753"
integrity sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==
dependencies:
regenerator-transform "^0.14.2"
"@babel/plugin-transform-reserved-words@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz#6fdfc8cc7edcc42b36a7c12188c6787c873adcd8"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz#6fdfc8cc7edcc42b36a7c12188c6787c873adcd8"
integrity sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-shorthand-properties@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz#0bf9cac5550fce0cfdf043420f661d645fdc75e3"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz#0bf9cac5550fce0cfdf043420f661d645fdc75e3"
integrity sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-spread@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz#527f9f311be4ec7fdc2b79bb89f7bf884b3e1e1e"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz#527f9f311be4ec7fdc2b79bb89f7bf884b3e1e1e"
integrity sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
@@ -774,35 +704,35 @@
"@babel/plugin-transform-sticky-regex@^7.12.7":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz#560224613ab23987453948ed21d0b0b193fa7fad"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz#560224613ab23987453948ed21d0b0b193fa7fad"
integrity sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-template-literals@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz#b43ece6ed9a79c0c71119f576d299ef09d942843"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz#b43ece6ed9a79c0c71119f576d299ef09d942843"
integrity sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
-"@babel/plugin-transform-typeof-symbol@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz#9ca6be343d42512fbc2e68236a82ae64bc7af78a"
- integrity sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q==
+"@babel/plugin-transform-typeof-symbol@^7.12.10":
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz#de01c4c8f96580bd00f183072b0d0ecdcf0dec4b"
+ integrity sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-unicode-escapes@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709"
integrity sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-unicode-regex@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz#cc9661f61390db5c65e3febaccefd5c6ac3faecb"
+ resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz#cc9661f61390db5c65e3febaccefd5c6ac3faecb"
integrity sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==
dependencies:
"@babel/helper-create-regexp-features-plugin" "^7.12.1"
@@ -810,22 +740,22 @@
"@babel/polyfill@^7.12.1":
version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96"
+ resolved "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96"
integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==
dependencies:
core-js "^2.6.5"
regenerator-runtime "^0.13.4"
"@babel/preset-env@^7.12.1":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.7.tgz#54ea21dbe92caf6f10cb1a0a576adc4ebf094b55"
- integrity sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew==
+ version "7.12.11"
+ resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz#55d5f7981487365c93dbbc84507b1c7215e857f9"
+ integrity sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==
dependencies:
"@babel/compat-data" "^7.12.7"
"@babel/helper-compilation-targets" "^7.12.5"
"@babel/helper-module-imports" "^7.12.5"
"@babel/helper-plugin-utils" "^7.10.4"
- "@babel/helper-validator-option" "^7.12.1"
+ "@babel/helper-validator-option" "^7.12.11"
"@babel/plugin-proposal-async-generator-functions" "^7.12.1"
"@babel/plugin-proposal-class-properties" "^7.12.1"
"@babel/plugin-proposal-dynamic-import" "^7.12.1"
@@ -854,7 +784,7 @@
"@babel/plugin-transform-arrow-functions" "^7.12.1"
"@babel/plugin-transform-async-to-generator" "^7.12.1"
"@babel/plugin-transform-block-scoped-functions" "^7.12.1"
- "@babel/plugin-transform-block-scoping" "^7.12.1"
+ "@babel/plugin-transform-block-scoping" "^7.12.11"
"@babel/plugin-transform-classes" "^7.12.1"
"@babel/plugin-transform-computed-properties" "^7.12.1"
"@babel/plugin-transform-destructuring" "^7.12.1"
@@ -880,12 +810,12 @@
"@babel/plugin-transform-spread" "^7.12.1"
"@babel/plugin-transform-sticky-regex" "^7.12.7"
"@babel/plugin-transform-template-literals" "^7.12.1"
- "@babel/plugin-transform-typeof-symbol" "^7.12.1"
+ "@babel/plugin-transform-typeof-symbol" "^7.12.10"
"@babel/plugin-transform-unicode-escapes" "^7.12.1"
"@babel/plugin-transform-unicode-regex" "^7.12.1"
"@babel/preset-modules" "^0.1.3"
- "@babel/types" "^7.12.7"
- core-js-compat "^3.7.0"
+ "@babel/types" "^7.12.11"
+ core-js-compat "^3.8.0"
semver "^5.5.0"
"@babel/preset-modules@^0.1.3":
@@ -900,22 +830,20 @@
esutils "^2.0.2"
"@babel/preset-react@^7.12.5":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.12.7.tgz#36d61d83223b07b6ac4ec55cf016abb0f70be83b"
- integrity sha512-wKeTdnGUP5AEYCYQIMeXMMwU7j+2opxrG0WzuZfxuuW9nhKvvALBjl67653CWamZJVefuJGI219G591RSldrqQ==
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.12.10.tgz#4fed65f296cbb0f5fb09de6be8cddc85cc909be9"
+ integrity sha512-vtQNjaHRl4DUpp+t+g4wvTHsLQuye+n0H/wsXIZRn69oz/fvNC7gQ4IK73zGJBaxvHoxElDvnYCthMcT7uzFoQ==
dependencies:
"@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-react-display-name" "^7.12.1"
- "@babel/plugin-transform-react-jsx" "^7.12.7"
+ "@babel/plugin-transform-react-jsx" "^7.12.10"
"@babel/plugin-transform-react-jsx-development" "^7.12.7"
- "@babel/plugin-transform-react-jsx-self" "^7.12.1"
- "@babel/plugin-transform-react-jsx-source" "^7.12.1"
"@babel/plugin-transform-react-pure-annotations" "^7.12.1"
"@babel/register@^7.12.1":
- version "7.12.1"
- resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.1.tgz#cdb087bdfc4f7241c03231f22e15d211acf21438"
- integrity sha512-XWcmseMIncOjoydKZnWvWi0/5CUCD+ZYKhRwgYlWOrA8fGZ/FjuLRpqtIhLOVD/fvR1b9DQHtZPn68VvhpYf+Q==
+ version "7.12.10"
+ resolved "https://registry.npmjs.org/@babel/register/-/register-7.12.10.tgz#19b87143f17128af4dbe7af54c735663b3999f60"
+ integrity sha512-EvX/BvMMJRAA3jZgILWgbsrHwBQvllC5T8B29McyME8DvkdOxk4ujESfrMvME8IHSDvWXrmMXxPvA/lx2gqPLQ==
dependencies:
find-cache-dir "^2.0.0"
lodash "^4.17.19"
@@ -924,51 +852,42 @@
source-map-support "^0.5.16"
"@babel/runtime@^7.8.4":
- version "7.11.2"
- resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736"
- integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==
+ version "7.12.5"
+ resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e"
+ integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==
dependencies:
regenerator-runtime "^0.13.4"
-"@babel/template@^7.10.4":
- version "7.10.4"
- resolved "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
- integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==
- dependencies:
- "@babel/code-frame" "^7.10.4"
- "@babel/parser" "^7.10.4"
- "@babel/types" "^7.10.4"
-
-"@babel/template@^7.12.7":
+"@babel/template@^7.10.4", "@babel/template@^7.12.7":
version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc"
+ resolved "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc"
integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==
dependencies:
"@babel/code-frame" "^7.10.4"
"@babel/parser" "^7.12.7"
"@babel/types" "^7.12.7"
-"@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.5", "@babel/traverse@^7.12.9":
- version "7.12.9"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f"
- integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==
+"@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5":
+ version "7.12.12"
+ resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376"
+ integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==
dependencies:
- "@babel/code-frame" "^7.10.4"
- "@babel/generator" "^7.12.5"
- "@babel/helper-function-name" "^7.10.4"
- "@babel/helper-split-export-declaration" "^7.11.0"
- "@babel/parser" "^7.12.7"
- "@babel/types" "^7.12.7"
+ "@babel/code-frame" "^7.12.11"
+ "@babel/generator" "^7.12.11"
+ "@babel/helper-function-name" "^7.12.11"
+ "@babel/helper-split-export-declaration" "^7.12.11"
+ "@babel/parser" "^7.12.11"
+ "@babel/types" "^7.12.12"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.19"
-"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.4.4":
- version "7.12.7"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13"
- integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==
+"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.4.4":
+ version "7.12.12"
+ resolved "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299"
+ integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==
dependencies:
- "@babel/helper-validator-identifier" "^7.10.4"
+ "@babel/helper-validator-identifier" "^7.12.11"
lodash "^4.17.19"
to-fast-properties "^2.0.0"
@@ -996,21 +915,16 @@
integrity sha512-In1q0tIiqTYKAGe3KOHDcFDdZRFISyQeSeipeTHGfki23ebHRZcjxvqj5SSdBkw65D4VpSREMi0s9i5iJiMcTw==
"@types/cheerio@^0.22.8":
- version "0.22.21"
- resolved "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.21.tgz#5e37887de309ba11b2e19a6e14cad7874b31a8a3"
- integrity sha512-aGI3DfswwqgKPiEOTaiHV2ZPC9KEhprpgEbJnv0fZl3SGX0cGgEva1126dGrMC6AJM6v/aihlUgJn9M5DbDZ/Q==
+ version "0.22.23"
+ resolved "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.23.tgz#74bcfee9c5ee53f619711dca953a89fe5cfa4eb4"
+ integrity sha512-QfHLujVMlGqcS/ePSf3Oe5hK3H8wi/yN2JYuxSB1U10VvW1fO3K8C+mURQesFYS1Hn7lspOsTT75SKq/XtydQg==
dependencies:
"@types/node" "*"
-"@types/color-name@^1.1.1":
- version "1.1.1"
- resolved "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
- integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
-
"@types/node@*":
- version "14.6.4"
- resolved "https://registry.npmjs.org/@types/node/-/node-14.6.4.tgz#a145cc0bb14ef9c4777361b7bbafa5cf8e3acb5a"
- integrity sha512-Wk7nG1JSaMfMpoMJDKUsWYugliB2Vy55pdjLpmLixeyMi7HizW2I/9QoxsPCkXl3dO+ZOVqPumKaDUv5zJu2uQ==
+ version "14.14.20"
+ resolved "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz#f7974863edd21d1f8a494a73e8e2b3658615c340"
+ integrity sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==
"@types/q@^1.5.1":
version "1.5.4"
@@ -1031,9 +945,9 @@ address@1.1.2, address@^1.0.1:
integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==
ajv@^6.12.3:
- version "6.12.4"
- resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234"
- integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==
+ version "6.12.6"
+ resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
+ integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
@@ -1085,11 +999,10 @@ ansi-styles@^3.2.1:
color-convert "^1.9.0"
ansi-styles@^4.1.0:
- version "4.2.1"
- resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
- integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
+ version "4.3.0"
+ resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+ integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
dependencies:
- "@types/color-name" "^1.1.1"
color-convert "^2.0.1"
ansi-wrap@0.1.0:
@@ -1106,9 +1019,9 @@ anymatch@^2.0.0:
normalize-path "^2.1.1"
arch@^2.1.0:
- version "2.1.2"
- resolved "https://registry.npmjs.org/arch/-/arch-2.1.2.tgz#0c52bbe7344bb4fa260c443d2cbad9c00ff2f0bf"
- integrity sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ==
+ version "2.2.0"
+ resolved "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11"
+ integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==
archive-type@^4.0.0:
version "4.0.0"
@@ -1124,6 +1037,11 @@ argparse@^1.0.10, argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"
+argparse@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
arr-diff@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
@@ -1207,7 +1125,7 @@ asynckit@^0.4.0:
at-least-node@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
+ resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
atob@^2.1.2:
@@ -1216,9 +1134,9 @@ atob@^2.1.2:
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
autolinker@^3.11.0:
- version "3.14.1"
- resolved "https://registry.npmjs.org/autolinker/-/autolinker-3.14.1.tgz#6ae4b812b6eaf42d4d68138b9e67757cbf2bc1e4"
- integrity sha512-yvsRHIaY51EYDml6MGlbqyJGfl4n7zezGYf+R7gvM8c5LNpRGc4SISkvgAswSS8SWxk/OrGCylKV9mJyVstz7w==
+ version "3.14.2"
+ resolved "https://registry.npmjs.org/autolinker/-/autolinker-3.14.2.tgz#71856274eb768fb7149039e24d3a2be2f5c55a63"
+ integrity sha512-VO66nXUCZFxTq7fVHAaiAkZNXRQ1l3IFi6D5P7DLoyIEAn2E8g7TWbyEgLlz1uW74LfWmu1A17IPWuPQyGuNVg==
dependencies:
tslib "^1.9.3"
@@ -1248,9 +1166,9 @@ aws-sign2@~0.7.0:
integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
aws4@^1.8.0:
- version "1.10.1"
- resolved "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428"
- integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==
+ version "1.11.0"
+ resolved "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
+ integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==
babel-code-frame@^6.22.0:
version "6.26.0"
@@ -1278,10 +1196,10 @@ balanced-match@^1.0.0:
resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
-base64-js@^1.0.2:
- version "1.3.1"
- resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
- integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
+base64-js@^1.3.1:
+ version "1.5.1"
+ resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
+ integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
base@^0.11.1:
version "0.11.2"
@@ -1440,24 +1358,14 @@ browserslist@4.7.0:
electron-to-chromium "^1.3.247"
node-releases "^1.1.29"
-browserslist@^4.0.0, browserslist@^4.12.0:
- version "4.14.1"
- resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.14.1.tgz#cb2b490ba881d45dc3039078c7ed04411eaf3fa3"
- integrity sha512-zyBTIHydW37pnb63c7fHFXUG6EcqWOqoMdDx6cdyaDFriZ20EoVxcE95S54N+heRqY8m8IUgB5zYta/gCwSaaA==
+browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.0:
+ version "4.16.0"
+ resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.16.0.tgz#410277627500be3cb28a1bfe037586fbedf9488b"
+ integrity sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ==
dependencies:
- caniuse-lite "^1.0.30001124"
- electron-to-chromium "^1.3.562"
- escalade "^3.0.2"
- node-releases "^1.1.60"
-
-browserslist@^4.14.5, browserslist@^4.14.7:
- version "4.15.0"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.15.0.tgz#3d48bbca6a3f378e86102ffd017d9a03f122bdb0"
- integrity sha512-IJ1iysdMkGmjjYeRlDU8PQejVwxvVO5QOfXH7ylW31GO6LwNRSmm/SgRXtNsEXqMLl2e+2H5eEJ7sfynF8TCaQ==
- dependencies:
- caniuse-lite "^1.0.30001164"
+ caniuse-lite "^1.0.30001165"
colorette "^1.2.1"
- electron-to-chromium "^1.3.612"
+ electron-to-chromium "^1.3.621"
escalade "^3.1.1"
node-releases "^1.1.67"
@@ -1490,12 +1398,12 @@ buffer-from@^1.0.0:
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
buffer@^5.2.1:
- version "5.6.0"
- resolved "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786"
- integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==
+ version "5.7.1"
+ resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
+ integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
dependencies:
- base64-js "^1.0.2"
- ieee754 "^1.1.4"
+ base64-js "^1.3.1"
+ ieee754 "^1.1.13"
bytes@1:
version "1.0.0"
@@ -1535,6 +1443,14 @@ cacheable-request@^2.1.1:
normalize-url "2.0.1"
responselike "1.0.2"
+call-bind@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz#24127054bb3f9bdcb4b1fb82418186072f77b8ce"
+ integrity sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==
+ dependencies:
+ function-bind "^1.1.1"
+ get-intrinsic "^1.0.0"
+
call-me-maybe@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
@@ -1582,15 +1498,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"
-caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001124:
- version "1.0.30001124"
- resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001124.tgz#5d9998190258e11630d674fc50ea8e579ae0ced2"
- integrity sha512-zQW8V3CdND7GHRH6rxm6s59Ww4g/qGWTheoboW9nfeMg7sUoopIfKCcNZUjwYRCOrvereh3kwDpZj4VLQ7zGtA==
-
-caniuse-lite@^1.0.30001164:
- version "1.0.30001164"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001164.tgz#5bbfd64ca605d43132f13cc7fdabb17c3036bfdc"
- integrity sha512-G+A/tkf4bu0dSp9+duNiXc7bGds35DioCyC6vgK2m/rjA4Krpy5WeZgZyfH2f0wj2kI6yAWWucyap6oOwmY1mg==
+caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001165:
+ version "1.0.30001173"
+ resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001173.tgz#3c47bbe3cd6d7a9eda7f50ac016d158005569f56"
+ integrity sha512-R3aqmjrICdGCTAnSXtNyvWYMK3YtV5jwudbq0T7nN9k4kmE4CBuwPqyJ+KBzepSTh0huivV2gLbSMEzTTmfeYw==
caseless@~0.12.0:
version "0.12.0"
@@ -1770,21 +1681,21 @@ color-name@^1.0.0, color-name@~1.1.4:
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
-color-string@^1.5.2:
- version "1.5.3"
- resolved "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc"
- integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==
+color-string@^1.5.4:
+ version "1.5.4"
+ resolved "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6"
+ integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
color@^3.0.0:
- version "3.1.2"
- resolved "https://registry.npmjs.org/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10"
- integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==
+ version "3.1.3"
+ resolved "https://registry.npmjs.org/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e"
+ integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==
dependencies:
color-convert "^1.9.1"
- color-string "^1.5.2"
+ color-string "^1.5.4"
colorette@^1.2.1:
version "1.2.1"
@@ -1897,18 +1808,18 @@ copy-descriptor@^0.1.0:
resolved "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
-core-js-compat@^3.7.0:
- version "3.8.0"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.0.tgz#3248c6826f4006793bd637db608bca6e4cd688b1"
- integrity sha512-o9QKelQSxQMYWHXc/Gc4L8bx/4F7TTraE5rhuN8I7mKBt5dBIUpXpIR3omv70ebr8ST5R3PqbDQr+ZI3+Tt1FQ==
+core-js-compat@^3.8.0:
+ version "3.8.2"
+ resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.2.tgz#3717f51f6c3d2ebba8cbf27619b57160029d1d4c"
+ integrity sha512-LO8uL9lOIyRRrQmZxHZFl1RV+ZbcsAkFWTktn5SmH40WgLtSNYN4m4W2v9ONT147PxBY/XrRhrWq8TlvObyUjQ==
dependencies:
- browserslist "^4.14.7"
+ browserslist "^4.16.0"
semver "7.0.0"
core-js@^2.6.5:
- version "2.6.11"
- resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
- integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
+ version "2.6.12"
+ resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
+ integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
@@ -2000,12 +1911,12 @@ css-tree@1.0.0-alpha.37:
mdn-data "2.0.4"
source-map "^0.6.1"
-css-tree@1.0.0-alpha.39:
- version "1.0.0-alpha.39"
- resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz#2bff3ffe1bb3f776cf7eefd91ee5cba77a149eeb"
- integrity sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==
+css-tree@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz#9ae393b5dafd7dae8a622475caec78d3d8fbd7b5"
+ integrity sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==
dependencies:
- mdn-data "2.0.6"
+ mdn-data "2.0.14"
source-map "^0.6.1"
css-what@2.1:
@@ -2014,9 +1925,9 @@ css-what@2.1:
integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==
css-what@^3.2.1:
- version "3.3.0"
- resolved "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz#10fec696a9ece2e591ac772d759aacabac38cd39"
- integrity sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==
+ version "3.4.2"
+ resolved "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4"
+ integrity sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==
cssesc@^3.0.0:
version "3.0.0"
@@ -2092,11 +2003,11 @@ cssnano@^4.1.10:
postcss "^7.0.0"
csso@^4.0.2:
- version "4.0.3"
- resolved "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz#0d9985dc852c7cc2b2cacfbbe1079014d1a8e903"
- integrity sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==
+ version "4.2.0"
+ resolved "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529"
+ integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==
dependencies:
- css-tree "1.0.0-alpha.39"
+ css-tree "^1.1.2"
currently-unhandled@^0.4.1:
version "0.4.1"
@@ -2119,24 +2030,17 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0:
dependencies:
ms "2.0.0"
-debug@4.1.0:
- version "4.1.0"
- resolved "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87"
- integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==
+debug@4.3.1, debug@^4.1.0:
+ version "4.3.1"
+ resolved "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
+ integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
dependencies:
- ms "^2.1.1"
+ ms "2.1.2"
debug@^3.1.0, debug@^3.1.1, debug@^3.2.5:
- version "3.2.6"
- resolved "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
- integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
- dependencies:
- ms "^2.1.1"
-
-debug@^4.1.0:
- version "4.1.1"
- resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
- integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ version "3.2.7"
+ resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
+ integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
dependencies:
ms "^2.1.1"
@@ -2215,7 +2119,7 @@ deep-is@^0.1.3:
resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
-define-properties@^1.1.2, define-properties@^1.1.3:
+define-properties@^1.1.3:
version "1.1.3"
resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
@@ -2285,9 +2189,9 @@ dir-glob@2.0.0:
arrify "^1.0.1"
path-type "^3.0.0"
-docusaurus@^2.0.0-alpha.378053ac5:
+docusaurus@^2.0.0-alpha.70:
version "2.0.0-alpha.378053ac5"
- resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-2.0.0-alpha.378053ac5.tgz#9ca31969ef6eb8958692948ae1fd1d4e0f452f44"
+ resolved "https://registry.npmjs.org/docusaurus/-/docusaurus-2.0.0-alpha.378053ac5.tgz#9ca31969ef6eb8958692948ae1fd1d4e0f452f44"
integrity sha512-+NM1NrJKYcmHYiMQ/4b5ew9QDbLW3QI/ii2lCs/gpEZhtU0FVnl1RLC3FUO41xgOhth3A8M5G5ChzlPuNzxjug==
dependencies:
"@babel/core" "^7.12.3"
@@ -2359,9 +2263,9 @@ domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1:
integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
domelementtype@^2.0.1:
- version "2.0.1"
- resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d"
- integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==
+ version "2.1.0"
+ resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e"
+ integrity sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==
domhandler@^2.3.0:
version "2.4.2"
@@ -2387,9 +2291,9 @@ domutils@^1.5.1, domutils@^1.7.0:
domelementtype "1"
dot-prop@^5.2.0:
- version "5.2.0"
- resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb"
- integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==
+ version "5.3.0"
+ resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88"
+ integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==
dependencies:
is-obj "^2.0.0"
@@ -2451,15 +2355,10 @@ ee-first@1.1.1:
resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
-electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.562:
- version "1.3.562"
- resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.562.tgz#79c20277ee1c8d0173a22af00e38433b752bc70f"
- integrity sha512-WhRe6liQ2q/w1MZc8mD8INkenHivuHdrr4r5EQHNomy3NJux+incP6M6lDMd0paShP3MD0WGe5R1TWmEClf+Bg==
-
-electron-to-chromium@^1.3.612:
- version "1.3.614"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.614.tgz#ff359e8d2249e2ce859a4c2bc34c22bd2e2eb0a2"
- integrity sha512-JMDl46mg4G+n6q/hAJkwy9eMTj5FJjsE+8f/irAGRMLM4yeRVbMuRrdZrbbGGOrGVcZc4vJPjUpEUWNb/fA6hg==
+electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.621:
+ version "1.3.634"
+ resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.634.tgz#82ea400f520f739c4f6ff00c1f7524827a917d25"
+ integrity sha512-QPrWNYeE/A0xRvl/QP3E0nkaEvYUvH3gM04ZWYtIa6QlSpEetRlRI1xvQ7hiMIySHHEV+mwDSX8Kj4YZY6ZQAw==
"emoji-regex@>=6.0.0 <=6.1.1":
version "6.1.1"
@@ -2489,9 +2388,9 @@ entities@^1.1.1, entities@~1.1.1:
integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
entities@^2.0.0:
- version "2.0.3"
- resolved "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f"
- integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==
+ version "2.1.0"
+ resolved "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
+ integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
error-ex@^1.2.0, error-ex@^1.3.1:
version "1.3.2"
@@ -2507,20 +2406,38 @@ error@^7.0.0:
dependencies:
string-template "~0.2.1"
-es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5:
- version "1.17.6"
- resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a"
- integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==
+es-abstract@^1.17.2:
+ version "1.17.7"
+ resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c"
+ integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==
dependencies:
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
has "^1.0.3"
has-symbols "^1.0.1"
- is-callable "^1.2.0"
- is-regex "^1.1.0"
- object-inspect "^1.7.0"
+ is-callable "^1.2.2"
+ is-regex "^1.1.1"
+ object-inspect "^1.8.0"
object-keys "^1.1.1"
- object.assign "^4.1.0"
+ object.assign "^4.1.1"
+ string.prototype.trimend "^1.0.1"
+ string.prototype.trimstart "^1.0.1"
+
+es-abstract@^1.18.0-next.1:
+ version "1.18.0-next.1"
+ resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz#6e3a0a4bda717e5023ab3b8e90bec36108d22c68"
+ integrity sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==
+ dependencies:
+ es-to-primitive "^1.2.1"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.1"
+ is-callable "^1.2.2"
+ is-negative-zero "^2.0.0"
+ is-regex "^1.1.1"
+ object-inspect "^1.8.0"
+ object-keys "^1.1.1"
+ object.assign "^4.1.1"
string.prototype.trimend "^1.0.1"
string.prototype.trimstart "^1.0.1"
@@ -2533,14 +2450,9 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
-escalade@^3.0.2:
- version "3.0.2"
- resolved "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4"
- integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==
-
escalade@^3.1.1:
version "3.1.1"
- resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
+ resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
escape-html@~1.0.3:
@@ -2793,7 +2705,7 @@ fd-slicer@~1.1.0:
feed@^4.2.1:
version "4.2.1"
- resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.1.tgz#b246ef891051c7dbf088ca203341d9fb0444baee"
+ resolved "https://registry.npmjs.org/feed/-/feed-4.2.1.tgz#b246ef891051c7dbf088ca203341d9fb0444baee"
integrity sha512-l28KKcK1J/u3iq5dRDmmoB2p7dtBfACC2NqJh4dI2kFptxH0asfjmOfcxqh5Sv8suAlVa73gZJ4REY5RrafVvg==
dependencies:
xml-js "^1.6.11"
@@ -3004,7 +2916,7 @@ fs-constants@^1.0.0:
fs-extra@^9.0.1:
version "9.0.1"
- resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
+ resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
dependencies:
at-least-node "^1.0.0"
@@ -3038,9 +2950,18 @@ gaze@^1.1.3:
globule "^1.0.0"
gensync@^1.0.0-beta.1:
- version "1.0.0-beta.1"
- resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269"
- integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==
+ version "1.0.0-beta.2"
+ resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
+ integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
+
+get-intrinsic@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz#6820da226e50b24894e08859469dc68361545d49"
+ integrity sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==
+ dependencies:
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.1"
get-proxy@^2.0.0:
version "2.1.0"
@@ -3098,7 +3019,7 @@ gifsicle@^4.0.0:
github-slugger@^1.3.0:
version "1.3.0"
- resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9"
+ resolved "https://registry.npmjs.org/github-slugger/-/github-slugger-1.3.0.tgz#9bd0a95c5efdfc46005e82a906ef8e2a059124c9"
integrity sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q==
dependencies:
emoji-regex ">=6.0.0 <=6.1.1"
@@ -3289,7 +3210,7 @@ has-symbol-support-x@^1.4.1:
resolved "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==
-has-symbols@^1.0.0, has-symbols@^1.0.1:
+has-symbols@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
@@ -3345,9 +3266,9 @@ hex-color-regex@^1.1.0:
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
highlight.js@^9.16.2:
- version "9.18.3"
- resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.3.tgz#a1a0a2028d5e3149e2380f8a865ee8516703d634"
- integrity sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ==
+ version "9.18.5"
+ resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825"
+ integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==
hosted-git-info@^2.1.4:
version "2.8.8"
@@ -3409,9 +3330,9 @@ http-errors@~1.7.2:
toidentifier "1.0.0"
http-parser-js@>=0.5.1:
- version "0.5.2"
- resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.2.tgz#da2e31d237b393aae72ace43882dd7e270a8ff77"
- integrity sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ==
+ version "0.5.3"
+ resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9"
+ integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==
http-signature@~1.2.0:
version "1.2.0"
@@ -3429,10 +3350,10 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24:
dependencies:
safer-buffer ">= 2.1.2 < 3"
-ieee754@^1.1.4:
- version "1.1.13"
- resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
- integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
+ieee754@^1.1.13:
+ version "1.2.1"
+ resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
+ integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
ignore@^3.3.5:
version "3.3.10"
@@ -3535,9 +3456,9 @@ inherits@2.0.3:
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
ini@^1.3.4, ini@^1.3.5:
- version "1.3.5"
- resolved "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
- integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
+ version "1.3.8"
+ resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
+ integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
inquirer@6.5.0:
version "6.5.0"
@@ -3571,10 +3492,10 @@ into-stream@^3.1.0:
from2 "^2.1.1"
p-is-promise "^1.1.0"
-ip-regex@^2.1.0:
- version "2.1.0"
- resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
- integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
+ip-regex@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-4.2.0.tgz#a03f5eb661d9a154e3973a03de8b23dd0ad6892e"
+ integrity sha512-n5cDDeTWWRwK1EBoWwRti+8nP4NbytBBY0pldmnIkq6Z55KNFmWofh4rl9dPZpj+U/nVq7gweR3ylrvMt4YZ5A==
ipaddr.js@1.9.1:
version "1.9.1"
@@ -3622,10 +3543,10 @@ is-buffer@^1.1.5:
resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
-is-callable@^1.1.4, is-callable@^1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb"
- integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==
+is-callable@^1.1.4, is-callable@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9"
+ integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==
is-color-stop@^1.0.0:
version "1.1.0"
@@ -3639,6 +3560,13 @@ is-color-stop@^1.0.0:
rgb-regex "^1.0.1"
rgba-regex "^1.0.0"
+is-core-module@^2.1.0:
+ version "2.2.0"
+ resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
+ integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
+ dependencies:
+ has "^1.0.3"
+
is-data-descriptor@^0.1.4:
version "0.1.4"
resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56"
@@ -3739,6 +3667,11 @@ is-natural-number@^4.0.1:
resolved "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8"
integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=
+is-negative-zero@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24"
+ integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==
+
is-number@^2.1.0:
version "2.1.0"
resolved "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -3764,9 +3697,9 @@ is-obj@^2.0.0:
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
is-object@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
- integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA=
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf"
+ integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==
is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
@@ -3785,7 +3718,7 @@ is-png@^1.0.0:
resolved "https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce"
integrity sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=
-is-regex@^1.1.0:
+is-regex@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9"
integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==
@@ -3838,7 +3771,7 @@ is-typedarray@~1.0.0:
resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
-is-url@^1.2.2:
+is-url@^1.2.4:
version "1.2.4"
resolved "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
@@ -3858,14 +3791,14 @@ is-wsl@^1.1.0:
resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
-is2@2.0.1:
- version "2.0.1"
- resolved "https://registry.npmjs.org/is2/-/is2-2.0.1.tgz#8ac355644840921ce435d94f05d3a94634d3481a"
- integrity sha512-+WaJvnaA7aJySz2q/8sLjMb2Mw14KTplHmSwcSpZ/fWJPkUmqw3YTzSWbPJ7OAwRvdYTWF2Wg+yYJ1AdP5Z8CA==
+is2@^2.0.6:
+ version "2.0.6"
+ resolved "https://registry.npmjs.org/is2/-/is2-2.0.6.tgz#094f887248b49ba7ce278f8c39f85a70927bb5de"
+ integrity sha512-+Z62OHOjA6k2sUDOKXoZI3EXv7Fb1K52jpTBLbkfx62bcUeSsrTBLhEquCRDKTx0XE5XbHcG/S2vrtE3lnEDsQ==
dependencies:
deep-is "^0.1.3"
- ip-regex "^2.1.0"
- is-url "^1.2.2"
+ ip-regex "^4.1.0"
+ is-url "^1.2.4"
isarray@1.0.0, isarray@~1.0.0:
version "1.0.0"
@@ -3921,14 +3854,21 @@ js-tokens@^3.0.2:
resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
-js-yaml@^3.13.1, js-yaml@^3.14.1, js-yaml@^3.8.1:
+js-yaml@^3.13.1, js-yaml@^3.8.1:
version "3.14.1"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
+ resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
+js-yaml@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
+ integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==
+ dependencies:
+ argparse "^2.0.1"
+
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
@@ -3990,7 +3930,7 @@ json5@^2.1.2:
jsonfile@^6.0.1:
version "6.1.0"
- resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
+ resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
dependencies:
universalify "^2.0.0"
@@ -4322,16 +4262,16 @@ math-random@^1.0.1:
resolved "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==
+mdn-data@2.0.14:
+ version "2.0.14"
+ resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
+ integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==
+
mdn-data@2.0.4:
version "2.0.4"
resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b"
integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==
-mdn-data@2.0.6:
- version "2.0.6"
- resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz#852dc60fcaa5daa2e8cf6c9189c440ed3e042978"
- integrity sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==
-
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -4392,17 +4332,17 @@ micromatch@^3.1.10, micromatch@^3.1.4:
snapdragon "^0.8.1"
to-regex "^3.0.2"
-mime-db@1.44.0, mime-db@^1.28.0:
- version "1.44.0"
- resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
- integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
+mime-db@1.45.0, mime-db@^1.28.0:
+ version "1.45.0"
+ resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea"
+ integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==
mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
- version "2.1.27"
- resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
- integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
+ version "2.1.28"
+ resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd"
+ integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==
dependencies:
- mime-db "1.44.0"
+ mime-db "1.45.0"
mime@1.6.0:
version "1.6.0"
@@ -4456,20 +4396,25 @@ ms@2.1.1:
resolved "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
-ms@^2.1.1:
+ms@2.1.2:
version "2.1.2"
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+ms@^2.1.1:
+ version "2.1.3"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
+
mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
nan@^2.12.1:
- version "2.14.1"
- resolved "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
- integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
+ version "2.14.2"
+ resolved "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
+ integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
nanomatch@^1.2.9:
version "1.2.13"
@@ -4503,15 +4448,10 @@ node-modules-regexp@^1.0.0:
resolved "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40"
integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=
-node-releases@^1.1.29, node-releases@^1.1.60:
- version "1.1.60"
- resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz#6948bdfce8286f0b5d0e5a88e8384e954dfe7084"
- integrity sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==
-
-node-releases@^1.1.67:
- version "1.1.67"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.67.tgz#28ebfcccd0baa6aad8e8d4d8fe4cbc49ae239c12"
- integrity sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==
+node-releases@^1.1.29, node-releases@^1.1.67:
+ version "1.1.69"
+ resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.69.tgz#3149dbde53b781610cd8b486d62d86e26c3725f6"
+ integrity sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA==
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.5.0"
@@ -4600,12 +4540,12 @@ object-copy@^0.1.0:
define-property "^0.2.5"
kind-of "^3.0.3"
-object-inspect@^1.7.0:
- version "1.8.0"
- resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0"
- integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==
+object-inspect@^1.8.0:
+ version "1.9.0"
+ resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a"
+ integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==
-object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
+object-keys@^1.0.12, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
@@ -4617,23 +4557,24 @@ object-visit@^1.0.0:
dependencies:
isobject "^3.0.0"
-object.assign@^4.1.0:
- version "4.1.0"
- resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
- integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
+object.assign@^4.1.0, object.assign@^4.1.1:
+ version "4.1.2"
+ resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940"
+ integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==
dependencies:
- define-properties "^1.1.2"
- function-bind "^1.1.1"
- has-symbols "^1.0.0"
- object-keys "^1.0.11"
+ call-bind "^1.0.0"
+ define-properties "^1.1.3"
+ has-symbols "^1.0.1"
+ object-keys "^1.1.1"
object.getownpropertydescriptors@^2.1.0:
- version "2.1.0"
- resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649"
- integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==
+ version "2.1.1"
+ resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz#0dfda8d108074d9c563e80490c883b6661091544"
+ integrity sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==
dependencies:
+ call-bind "^1.0.0"
define-properties "^1.1.3"
- es-abstract "^1.17.0-next.1"
+ es-abstract "^1.18.0-next.1"
object.pick@^1.2.0, object.pick@^1.3.0:
version "1.3.0"
@@ -4643,13 +4584,13 @@ object.pick@^1.2.0, object.pick@^1.3.0:
isobject "^3.0.1"
object.values@^1.1.0:
- version "1.1.1"
- resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e"
- integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==
+ version "1.1.2"
+ resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz#7a2015e06fcb0f546bd652486ce8583a4731c731"
+ integrity sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==
dependencies:
+ call-bind "^1.0.0"
define-properties "^1.1.3"
- es-abstract "^1.17.0-next.1"
- function-bind "^1.1.1"
+ es-abstract "^1.18.0-next.1"
has "^1.0.3"
on-finished@~2.3.0:
@@ -4949,7 +4890,7 @@ pkg-up@2.0.0:
portfinder@^1.0.28:
version "1.0.28"
- resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778"
+ resolved "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz#67c4622852bd5374dd1dd900f779f53462fac778"
integrity sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==
dependencies:
async "^2.6.2"
@@ -4962,9 +4903,9 @@ posix-character-classes@^0.1.0:
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
postcss-calc@^7.0.1:
- version "7.0.4"
- resolved "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.4.tgz#5e177ddb417341e6d4a193c5d9fd8ada79094f8b"
- integrity sha512-0I79VRAd1UTkaHzY9w83P39YGO/M3bG7/tNLrHGEunBolfoGM0hSjrGvjoeaj0JE/zIw5GsI2KZ0UwDJqv5hjw==
+ version "7.0.5"
+ resolved "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e"
+ integrity sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==
dependencies:
postcss "^7.0.27"
postcss-selector-parser "^6.0.2"
@@ -5199,13 +5140,14 @@ postcss-selector-parser@^3.0.0:
uniq "^1.0.1"
postcss-selector-parser@^6.0.2:
- version "6.0.2"
- resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c"
- integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==
+ version "6.0.4"
+ resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz#56075a1380a04604c38b063ea7767a129af5c2b3"
+ integrity sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==
dependencies:
cssesc "^3.0.0"
indexes-of "^1.0.1"
uniq "^1.0.1"
+ util-deprecate "^1.0.2"
postcss-svgo@^4.0.2:
version "4.0.2"
@@ -5237,9 +5179,9 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0:
integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==
postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.23, postcss@^7.0.27, postcss@^7.0.32:
- version "7.0.32"
- resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz#4310d6ee347053da3433db2be492883d62cec59d"
- integrity sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==
+ version "7.0.35"
+ resolved "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz#d2be00b998f7f211d8a276974079f2e92b970e24"
+ integrity sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==
dependencies:
chalk "^2.4.2"
source-map "^0.6.1"
@@ -5261,9 +5203,9 @@ prettier@^2.2.1:
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
prismjs@^1.22.0:
- version "1.22.0"
- resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.22.0.tgz#73c3400afc58a823dd7eed023f8e1ce9fd8977fa"
- integrity sha512-lLJ/Wt9yy0AiSYBf212kK3mM5L8ycwlyTlSxHBAneXLR0nzFMlZ5y7riFPF3E33zXOF2IH95xdY5jIyZbM9z/w==
+ version "1.23.0"
+ resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33"
+ integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA==
optionalDependencies:
clipboard "^2.0.0"
@@ -5415,9 +5357,9 @@ react-dev-utils@^9.1.0:
text-table "0.2.0"
react-dom@^16.8.4:
- version "16.13.1"
- resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
- integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
+ version "16.14.0"
+ resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89"
+ integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
@@ -5425,9 +5367,9 @@ react-dom@^16.8.4:
scheduler "^0.19.1"
react-error-overlay@^6.0.3:
- version "6.0.7"
- resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.7.tgz#1dcfb459ab671d53f660a991513cb2f0a0553108"
- integrity sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==
+ version "6.0.8"
+ resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.8.tgz#474ed11d04fc6bda3af643447d85e9127ed6b5de"
+ integrity sha512-HvPuUQnLp5H7TouGq3kzBeioJmXms1wHy9EGjz2OURWBp4qZO6AfGEcnxts1D/CbwPLRAgTMPCEgYhA3sEM4vw==
react-is@^16.8.1:
version "16.13.1"
@@ -5435,9 +5377,9 @@ react-is@^16.8.1:
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
react@^16.8.4:
- version "16.13.1"
- resolved "https://registry.npmjs.org/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
- integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
+ version "16.14.0"
+ resolved "https://registry.npmjs.org/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
+ integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
@@ -5521,9 +5463,9 @@ regenerate-unicode-properties@^8.2.0:
regenerate "^1.4.0"
regenerate@^1.4.0:
- version "1.4.1"
- resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
- integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==
+ version "1.4.2"
+ resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
+ integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
regenerator-runtime@^0.13.4:
version "0.13.7"
@@ -5545,21 +5487,9 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
-regexpu-core@^4.7.0:
- version "4.7.0"
- resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938"
- integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==
- dependencies:
- regenerate "^1.4.0"
- regenerate-unicode-properties "^8.2.0"
- regjsgen "^0.5.1"
- regjsparser "^0.6.4"
- unicode-match-property-ecmascript "^1.0.4"
- unicode-match-property-value-ecmascript "^1.2.0"
-
regexpu-core@^4.7.1:
version "4.7.1"
- resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6"
+ resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6"
integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==
dependencies:
regenerate "^1.4.0"
@@ -5665,11 +5595,12 @@ resolve-url@^0.2.1:
resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=
-resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2:
- version "1.17.0"
- resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
- integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
+resolve@^1.1.6, resolve@^1.10.0:
+ version "1.19.0"
+ resolved "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c"
+ integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==
dependencies:
+ is-core-module "^2.1.0"
path-parse "^1.0.6"
responselike@1.0.2:
@@ -5715,9 +5646,9 @@ run-async@^2.2.0:
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
rxjs@^6.4.0:
- version "6.6.2"
- resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2"
- integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==
+ version "6.6.3"
+ resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
+ integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
dependencies:
tslib "^1.9.0"
@@ -6018,9 +5949,9 @@ spdx-expression-parse@^3.0.0:
spdx-license-ids "^3.0.0"
spdx-license-ids@^3.0.0:
- version "3.0.5"
- resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654"
- integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==
+ version "3.0.7"
+ resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65"
+ integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==
split-string@^3.0.1, split-string@^3.0.2:
version "3.1.0"
@@ -6095,20 +6026,20 @@ string-width@^2.1.0:
strip-ansi "^4.0.0"
string.prototype.trimend@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913"
- integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b"
+ integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==
dependencies:
+ call-bind "^1.0.0"
define-properties "^1.1.3"
- es-abstract "^1.17.5"
string.prototype.trimstart@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54"
- integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==
+ version "1.0.3"
+ resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa"
+ integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==
dependencies:
+ call-bind "^1.0.0"
define-properties "^1.1.3"
- es-abstract "^1.17.5"
string_decoder@0.10:
version "0.10.31"
@@ -6261,12 +6192,12 @@ tar-stream@^1.5.2:
xtend "^4.0.0"
tcp-port-used@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.1.tgz#46061078e2d38c73979a2c2c12b5a674e6689d70"
- integrity sha512-rwi5xJeU6utXoEIiMvVBMc9eJ2/ofzB+7nLOdnZuFTmNCLqRiQh2sMG9MqCxHU/69VC/Fwp5dV9306Qd54ll1Q==
+ version "1.0.2"
+ resolved "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz#9652b7436eb1f4cfae111c79b558a25769f6faea"
+ integrity sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==
dependencies:
- debug "4.1.0"
- is2 "2.0.1"
+ debug "4.3.1"
+ is2 "^2.0.6"
temp-dir@^1.0.0:
version "1.0.0"
@@ -6421,9 +6352,9 @@ truncate-html@^1.0.3:
cheerio "0.22.0"
tslib@^1.9.0, tslib@^1.9.3:
- version "1.13.0"
- resolved "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
- integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
+ version "1.14.1"
+ resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
+ integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tunnel-agent@^0.6.0:
version "0.6.0"
@@ -6503,12 +6434,12 @@ uniqs@^2.0.0:
universalify@^1.0.0:
version "1.0.0"
- resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
+ resolved "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==
universalify@^2.0.0:
version "2.0.0"
- resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
+ resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
unpipe@1.0.0, unpipe@~1.0.0:
@@ -6578,7 +6509,7 @@ use@^3.1.0:
resolved "https://registry.npmjs.org/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==
-util-deprecate@^1.0.1, util-deprecate@~1.0.1:
+util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
diff --git a/mkdocs.yml b/mkdocs.yml
index 109be46a58..a2cbf11b4c 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -48,6 +48,9 @@ nav:
- Create your own Templater: 'features/software-templates/extending/create-your-own-templater.md'
- Create your own Publisher: 'features/software-templates/extending/create-your-own-publisher.md'
- Create your own Preparer: 'features/software-templates/extending/create-your-own-preparer.md'
+ - Backstage Search:
+ - Overview: 'features/search/README.md'
+ - Architecture: 'features/search/architecture.md'
- TechDocs:
- Overview: 'features/techdocs/README.md'
- Getting Started: 'features/techdocs/getting-started.md'
@@ -56,14 +59,18 @@ nav:
- Creating and Publishing Documentation: 'features/techdocs/creating-and-publishing.md'
- Configuration: 'features/techdocs/configuration.md'
- Using Cloud Storage: 'features/techdocs/using-cloud-storage.md'
+ - HOW TO guides: 'features/techdocs/how-to-guides.md'
- Troubleshooting: 'features/techdocs/troubleshooting.md'
- FAQ: 'features/techdocs/FAQ.md'
+ - Kubernetes:
+ - Overview: 'features/kubernetes/index.md'
- Plugins:
- Overview: 'plugins/index.md'
- Existing plugins: 'plugins/existing-plugins.md'
- Creating a new plugin: 'plugins/create-a-plugin.md'
- Developing a plugin: 'plugins/plugin-development.md'
- Structure of a plugin: 'plugins/structure-of-a-plugin.md'
+ - Composability System Migration: 'plugins/composability.md'
- Backends and APIs:
- Proxying: 'plugins/proxying.md'
- Backstage backend plugin: 'plugins/backend-plugin.md'
@@ -111,8 +118,10 @@ nav:
- ADR007 - Use MSW for Network Request Mocking: 'architecture-decisions/adr007-use-msw-to-mock-service-requests.md'
- ADR008 - Default Catalog File Name: 'architecture-decisions/adr008-default-catalog-file-name.md'
- ADR009 - Entity References: 'architecture-decisions/adr009-entity-references.md'
+ - ADR010 - Luxon Date Library: 'architecture-decisions/adr010-luxon-date-library.md'
- Contribute: '../CONTRIBUTING.md'
- Support:
- 'support/support.md'
- 'support/project-structure.md'
+ - Glossary: glossary.md
- FAQ: FAQ.md
diff --git a/package.json b/package.json
index 8376915729..758a8ba884 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,6 @@
"lint:all": "lerna run lint --",
"lint:type-deps": "node scripts/check-type-dependencies.js",
"docgen": "lerna run docgen",
- "docker-build:app": "yarn workspace example-app build && docker build . -t spotify/backstage",
"docker-build": "yarn tsc && yarn workspace example-backend build-image",
"create-plugin": "backstage-cli create-plugin --scope backstage --no-private",
"remove-plugin": "backstage-cli remove-plugin",
@@ -43,7 +42,7 @@
"version": "1.0.0",
"devDependencies": {
"@changesets/cli": "^2.11.0",
- "@octokit/openapi-types": "^2.0.0",
+ "@octokit/openapi-types": "^2.2.0",
"@spotify/eslint-config-oss": "^1.0.1",
"@spotify/prettier-config": "^9.0.0",
"command-exists": "^1.2.9",
@@ -76,7 +75,7 @@
},
"jest": {
"transformModules": [
- "@kyma-project/asyncapi-react"
+ "@asyncapi/react-component"
]
}
}
diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md
index 3eaf5ad111..d6157f560f 100644
--- a/packages/app/CHANGELOG.md
+++ b/packages/app/CHANGELOG.md
@@ -1,5 +1,83 @@
# example-app
+## 0.2.12
+
+### Patch Changes
+
+- Updated dependencies [def2307f3]
+- Updated dependencies [46bba09ea]
+- Updated dependencies [efd6ef753]
+- Updated dependencies [593632f07]
+- Updated dependencies [8c2437c15]
+- Updated dependencies [2b514d532]
+- Updated dependencies [33846acfc]
+- Updated dependencies [b604a9d41]
+- Updated dependencies [d014185db]
+- Updated dependencies [a187b8ad0]
+- Updated dependencies [8855f61f6]
+- Updated dependencies [ed6baab66]
+- Updated dependencies [f04db53d7]
+- Updated dependencies [a5e27d5c1]
+- Updated dependencies [debf359b5]
+- Updated dependencies [a93f42213]
+ - @backstage/catalog-model@0.7.0
+ - @backstage/plugin-github-actions@0.3.0
+ - @backstage/core@0.5.0
+ - @backstage/plugin-catalog@0.2.12
+ - @backstage/plugin-cost-insights@0.5.7
+ - @backstage/plugin-catalog-import@0.3.5
+ - @backstage/cli@0.4.7
+ - @backstage/plugin-kubernetes@0.3.6
+ - @backstage/plugin-api-docs@0.4.3
+ - @backstage/plugin-scaffolder@0.4.0
+ - @backstage/plugin-techdocs@0.5.4
+ - @backstage/plugin-lighthouse@0.2.8
+ - @backstage/plugin-circleci@0.2.6
+ - @backstage/plugin-cloudbuild@0.2.7
+ - @backstage/plugin-jenkins@0.3.6
+ - @backstage/plugin-kafka@0.1.1
+ - @backstage/plugin-org@0.3.4
+ - @backstage/plugin-pagerduty@0.2.6
+ - @backstage/plugin-register-component@0.2.7
+ - @backstage/plugin-rollbar@0.2.8
+ - @backstage/plugin-search@0.2.6
+ - @backstage/plugin-sentry@0.3.3
+ - @backstage/plugin-explore@0.2.3
+ - @backstage/plugin-gcp-projects@0.2.3
+ - @backstage/plugin-gitops-profiles@0.2.3
+ - @backstage/plugin-graphiql@0.2.6
+ - @backstage/plugin-newrelic@0.2.3
+ - @backstage/plugin-tech-radar@0.3.3
+ - @backstage/plugin-user-settings@0.2.4
+ - @backstage/plugin-welcome@0.2.4
+
+## 0.2.9
+
+### Patch Changes
+
+- Updated dependencies [ab0892358]
+- Updated dependencies [37a7d26c4]
+- Updated dependencies [8e083f41f]
+- Updated dependencies [88da267cc]
+- Updated dependencies [9c09a364f]
+- Updated dependencies [01707438b]
+- Updated dependencies [edb7d0775]
+- Updated dependencies [818d45e94]
+- Updated dependencies [0588be01f]
+- Updated dependencies [b8abdda57]
+- Updated dependencies [b7a124883]
+- Updated dependencies [bc909178d]
+- Updated dependencies [947d3c269]
+ - @backstage/plugin-cost-insights@0.5.5
+ - @backstage/plugin-tech-radar@0.3.2
+ - @backstage/cli@0.4.5
+ - @backstage/plugin-scaffolder@0.3.6
+ - @backstage/plugin-sentry@0.3.2
+ - @backstage/plugin-catalog@0.2.10
+ - @backstage/plugin-search@0.2.5
+ - @backstage/plugin-catalog-import@0.3.3
+ - @backstage/plugin-pagerduty@0.2.5
+
## 0.2.8
### Patch Changes
diff --git a/packages/app/package.json b/packages/app/package.json
index 7541dd59a3..7734dfc244 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -1,43 +1,43 @@
{
"name": "example-app",
- "version": "0.2.8",
+ "version": "0.2.12",
"private": true,
"bundled": true,
"dependencies": {
- "@backstage/catalog-model": "^0.6.0",
- "@backstage/cli": "^0.4.3",
- "@backstage/core": "^0.4.2",
- "@backstage/plugin-api-docs": "^0.4.1",
- "@backstage/plugin-catalog": "^0.2.8",
- "@backstage/plugin-catalog-import": "^0.3.2",
- "@backstage/plugin-circleci": "^0.2.5",
- "@backstage/plugin-cloudbuild": "^0.2.5",
- "@backstage/plugin-cost-insights": "^0.5.2",
- "@backstage/plugin-explore": "^0.2.2",
- "@backstage/plugin-gcp-projects": "^0.2.2",
- "@backstage/plugin-github-actions": "^0.2.6",
- "@backstage/plugin-gitops-profiles": "^0.2.2",
- "@backstage/plugin-graphiql": "^0.2.3",
- "@backstage/plugin-org": "^0.3.2",
- "@backstage/plugin-jenkins": "^0.3.4",
- "@backstage/plugin-kubernetes": "^0.3.3",
- "@backstage/plugin-lighthouse": "^0.2.6",
- "@backstage/plugin-newrelic": "^0.2.2",
- "@backstage/plugin-pagerduty": "0.2.4",
- "@backstage/plugin-register-component": "^0.2.5",
- "@backstage/plugin-rollbar": "^0.2.7",
- "@backstage/plugin-scaffolder": "^0.3.5",
- "@backstage/plugin-sentry": "^0.3.1",
- "@backstage/plugin-search": "^0.2.4",
- "@backstage/plugin-tech-radar": "^0.3.1",
- "@backstage/plugin-techdocs": "^0.5.1",
- "@backstage/plugin-user-settings": "^0.2.3",
- "@backstage/plugin-welcome": "^0.2.3",
- "@backstage/test-utils": "^0.1.6",
+ "@backstage/catalog-model": "^0.7.0",
+ "@backstage/cli": "^0.4.7",
+ "@backstage/core": "^0.5.0",
+ "@backstage/plugin-api-docs": "^0.4.3",
+ "@backstage/plugin-catalog": "^0.2.12",
+ "@backstage/plugin-catalog-import": "^0.3.5",
+ "@backstage/plugin-circleci": "^0.2.6",
+ "@backstage/plugin-cloudbuild": "^0.2.7",
+ "@backstage/plugin-cost-insights": "^0.5.7",
+ "@backstage/plugin-explore": "^0.2.3",
+ "@backstage/plugin-gcp-projects": "^0.2.3",
+ "@backstage/plugin-github-actions": "^0.3.0",
+ "@backstage/plugin-gitops-profiles": "^0.2.3",
+ "@backstage/plugin-graphiql": "^0.2.6",
+ "@backstage/plugin-org": "^0.3.4",
+ "@backstage/plugin-jenkins": "^0.3.6",
+ "@backstage/plugin-kafka": "^0.1.1",
+ "@backstage/plugin-kubernetes": "^0.3.6",
+ "@backstage/plugin-lighthouse": "^0.2.8",
+ "@backstage/plugin-newrelic": "^0.2.3",
+ "@backstage/plugin-pagerduty": "0.2.6",
+ "@backstage/plugin-register-component": "^0.2.7",
+ "@backstage/plugin-rollbar": "^0.2.8",
+ "@backstage/plugin-scaffolder": "^0.4.0",
+ "@backstage/plugin-sentry": "^0.3.3",
+ "@backstage/plugin-search": "^0.2.6",
+ "@backstage/plugin-tech-radar": "^0.3.3",
+ "@backstage/plugin-techdocs": "^0.5.4",
+ "@backstage/plugin-user-settings": "^0.2.4",
+ "@backstage/plugin-welcome": "^0.2.4",
"@backstage/theme": "^0.2.2",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
- "@octokit/rest": "^18.0.0",
+ "@octokit/rest": "^18.0.12",
"@roadiehq/backstage-plugin-buildkite": "^0.1.3",
"@roadiehq/backstage-plugin-github-insights": "^0.2.16",
"@roadiehq/backstage-plugin-github-pull-requests": "^0.6.3",
@@ -53,6 +53,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
+ "@backstage/test-utils": "^0.1.6",
"@testing-library/cypress": "^7.0.1",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.4.1",
diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx
index a58bf45f9c..1b76773979 100644
--- a/packages/app/src/App.tsx
+++ b/packages/app/src/App.tsx
@@ -20,6 +20,7 @@ import {
OAuthRequestDialog,
SignInPage,
createRouteRef,
+ FlatRoutes,
} from '@backstage/core';
import React from 'react';
import Root from './components/Root';
@@ -29,13 +30,13 @@ import { hot } from 'react-hot-loader/root';
import { providers } from './identityProviders';
import { Router as CatalogRouter } from '@backstage/plugin-catalog';
import { Router as DocsRouter } from '@backstage/plugin-techdocs';
-import { GraphiQLPage } from '@backstage/plugin-graphiql';
+import { Router as GraphiQLRouter } from '@backstage/plugin-graphiql';
import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
import { Router as LighthouseRouter } from '@backstage/plugin-lighthouse';
import { Router as RegisterComponentRouter } from '@backstage/plugin-register-component';
import { Router as SettingsRouter } from '@backstage/plugin-user-settings';
import { Router as ImportComponentRouter } from '@backstage/plugin-catalog-import';
-import { Route, Routes, Navigate } from 'react-router';
+import { Route, Navigate } from 'react-router';
import { EntityPage } from './components/catalog/EntityPage';
@@ -65,31 +66,31 @@ const catalogRouteRef = createRouteRef({
title: 'Service Catalog',
});
-const AppRoutes = () => (
-
+const routes = (
+ }
/>
}
/>
- } />
+ } />
}
/>
- } />
- } />
+ } />
+ } />
}
/>
} />
{...deprecatedAppRoutes}
-
+
);
const App = () => (
@@ -97,9 +98,7 @@ const App = () => (
-
-
-
+ {routes}
);
diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx
index a4d097b1d4..a1ab181211 100644
--- a/packages/app/src/components/catalog/EntityPage.tsx
+++ b/packages/app/src/components/catalog/EntityPage.tsx
@@ -63,6 +63,7 @@ import {
UserProfileCard,
} from '@backstage/plugin-org';
import { Router as SentryRouter } from '@backstage/plugin-sentry';
+import { Router as KafkaRouter } from '@backstage/plugin-kafka';
import { EmbeddedDocsRouter as DocsRouter } from '@backstage/plugin-techdocs';
import { Button, Grid } from '@material-ui/core';
import {
@@ -243,6 +244,11 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
title="Code Insights"
element={}
/>
+ }
+ />
);
diff --git a/packages/app/src/plugins.ts b/packages/app/src/plugins.ts
index 6a4924cb0e..f07be07ec1 100644
--- a/packages/app/src/plugins.ts
+++ b/packages/app/src/plugins.ts
@@ -43,3 +43,4 @@ export { plugin as PagerDuty } from '@backstage/plugin-pagerduty';
export { plugin as Buildkite } from '@roadiehq/backstage-plugin-buildkite';
export { plugin as Search } from '@backstage/plugin-search';
export { plugin as Org } from '@backstage/plugin-org';
+export { plugin as Kafka } from '@backstage/plugin-kafka';
diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md
index 0e0a3074a4..84265c9897 100644
--- a/packages/backend-common/CHANGELOG.md
+++ b/packages/backend-common/CHANGELOG.md
@@ -1,5 +1,99 @@
# @backstage/backend-common
+## 0.5.0
+
+### Minor Changes
+
+- 5345a1f98: Remove fallback option from `UrlReaders.create` and `UrlReaders.default`, as well as the default fallback reader.
+
+ To be able to read data from endpoints outside of the configured integrations, you now need to explicitly allow it by
+ adding an entry in the `backend.reading.allow` list. For example:
+
+ ```yml
+ backend:
+ baseUrl: ...
+ reading:
+ allow:
+ - host: example.com
+ - host: '*.examples.org'
+ ```
+
+ Apart from adding the above configuration, most projects should not need to take any action to migrate existing code. If you do happen to have your own fallback reader configured, this needs to be replaced with a reader factory that selects a specific set of URLs to work with. If you where wrapping the existing fallback reader, the new one that handles the allow list is created using `FetchUrlReader.factory`.
+
+- 09a370426: Remove support for HTTPS certificate generation parameters. Use `backend.https = true` instead.
+
+### Patch Changes
+
+- 0b135e7e0: Add support for GitHub Apps authentication for backend plugins.
+
+ `GithubCredentialsProvider` requests and caches GitHub credentials based on a repository or organization url.
+
+ The `GithubCredentialsProvider` class should be considered stateful since tokens will be cached internally.
+ Consecutive calls to get credentials will return the same token, tokens older than 50 minutes will be considered expired and reissued.
+ `GithubCredentialsProvider` will default to the configured access token if no GitHub Apps are configured.
+
+ More information on how to create and configure a GitHub App to use with backstage can be found in the documentation.
+
+ Usage:
+
+ ```javascript
+ const credentialsProvider = new GithubCredentialsProvider(config);
+ const { token, headers } = await credentialsProvider.getCredentials({
+ url: 'https://github.com/',
+ });
+ ```
+
+ Updates `GithubUrlReader` to use the `GithubCredentialsProvider`.
+
+- 294a70cab: 1. URL Reader's `readTree` method now returns an `etag` in the response along with the blob. The etag is an identifier of the blob and will only change if the blob is modified on the target. Usually it is set to the latest commit SHA on the target.
+
+ `readTree` also takes an optional `etag` in its options and throws a `NotModifiedError` if the etag matches with the etag of the resource.
+
+ So, the `etag` can be used in building a cache when working with URL Reader.
+
+ An example -
+
+ ```ts
+ const response = await reader.readTree(
+ 'https://github.com/backstage/backstage',
+ );
+
+ const etag = response.etag;
+
+ // Will throw a new NotModifiedError (exported from @backstage/backstage-common)
+ await reader.readTree('https://github.com/backstage/backstage', {
+ etag,
+ });
+ ```
+
+ 2. URL Reader's readTree method can now detect the default branch. So, `url:https://github.com/org/repo/tree/master` can be replaced with `url:https://github.com/org/repo` in places like `backstage.io/techdocs-ref`.
+
+- 0ea032763: URL Reader: Use API response headers for archive filename in readTree. Fixes bug for users with hosted Bitbucket.
+- Updated dependencies [0b135e7e0]
+- Updated dependencies [fa8ba330a]
+- Updated dependencies [ed6baab66]
+ - @backstage/integration@0.3.0
+
+## 0.4.3
+
+### Patch Changes
+
+- Updated dependencies [466354aaa]
+ - @backstage/integration@0.2.0
+
+## 0.4.2
+
+### Patch Changes
+
+- 5ecd50f8a: Fix HTTPS certificate generation and add new config switch, enabling it simply by setting `backend.https = true`. Also introduces caching of generated certificates in order to avoid having to add a browser override every time the backend is restarted.
+- 00042e73c: Moving the Git actions to isomorphic-git instead of the node binding version of nodegit
+- 0829ff126: Tweaked development log formatter to include extra fields at the end of each log line
+- 036a84373: Provide support for on-prem azure devops
+- Updated dependencies [ad5c56fd9]
+- Updated dependencies [036a84373]
+ - @backstage/config-loader@0.4.1
+ - @backstage/integration@0.1.5
+
## 0.4.1
### Patch Changes
diff --git a/packages/backend-common/config.d.ts b/packages/backend-common/config.d.ts
index b7241bcc03..74c199e737 100644
--- a/packages/backend-common/config.d.ts
+++ b/packages/backend-common/config.d.ts
@@ -41,31 +41,16 @@ export interface Config {
https?:
| true
| {
- /**
- * Certificate configuration or parameters for generating a self-signed certificate
- *
- * Setting parameters for self-signed certificates is deprecated and will be removed in
- * the future, set `backend.https = true` instead.
- */
- certificate?:
- | {
- /** Algorithm to use to generate a self-signed certificate */
- algorithm?: string;
- keySize?: number;
- days?: number;
- attributes: {
- commonName: string;
- };
- }
- | {
- /** PEM encoded certificate. Use $file to load in a file */
- cert: string;
- /**
- * PEM encoded certificate key. Use $file to load in a file.
- * @visibility secret
- */
- key: string;
- };
+ /** Certificate configuration */
+ certificate?: {
+ /** PEM encoded certificate. Use $file to load in a file */
+ cert: string;
+ /**
+ * PEM encoded certificate key. Use $file to load in a file.
+ * @visibility secret
+ */
+ key: string;
+ };
};
/** Database connection configuration, select database type using the `client` field */
@@ -94,6 +79,26 @@ export interface Config {
optionsSuccessStatus?: number;
};
+ /**
+ * Configuration related to URL reading, used for example for reading catalog info
+ * files, scaffolder templates, and techdocs content.
+ */
+ reading?: {
+ /**
+ * A list of targets to allow outgoing requests to. Users will be able to make
+ * requests on behalf of the backend to the targets that are allowed by this list.
+ */
+ allow?: Array<{
+ /**
+ * A host to allow outgoing requests to, being either a full host or
+ * a subdomain wildcard pattern with a leading `*`. For example `example.com`
+ * and `*.example.com` are valid values, `prod.*.example.com` is not.
+ * The host may also contain a port, for example `example.com:8080`.
+ */
+ host: string;
+ }>;
+ };
+
/**
* Content Security Policy options.
*
@@ -104,81 +109,4 @@ export interface Config {
*/
csp?: { [policyId: string]: string[] | false };
};
-
- /** Configuration for integrations towards various external repository provider systems */
- integrations?: {
- /** Integration configuration for Azure */
- azure?: Array<{
- /**
- * The hostname of the given Azure instance
- */
- host: string;
- /**
- * Token used to authenticate requests.
- * @visibility secret
- */
- token?: string;
- }>;
-
- /** Integration configuration for BitBucket */
- bitbucket?: Array<{
- /**
- * The hostname of the given Bitbucket instance
- */
- host: string;
- /**
- * Token used to authenticate requests.
- * @visibility secret
- */
- token?: string;
- /**
- * The base url for the BitBucket API, for example https://api.bitbucket.org/2.0
- */
- apiBaseUrl?: string;
- /**
- * The username to use for authenticated requests.
- * @visibility secret
- */
- username?: string;
- /**
- * BitBucket app password used to authenticate requests.
- * @visibility secret
- */
- appPassword?: string;
- }>;
-
- /** Integration configuration for GitHub */
- github?: Array<{
- /**
- * The hostname of the given GitHub instance
- */
- host: string;
- /**
- * Token used to authenticate requests.
- * @visibility secret
- */
- token?: string;
- /**
- * The base url for the GitHub API, for example https://api.github.com
- */
- apiBaseUrl?: string;
- /**
- * The base url for GitHub raw resources, for example https://raw.githubusercontent.com
- */
- rawBaseUrl?: string;
- }>;
-
- /** Integration configuration for GitLab */
- gitlab?: Array<{
- /**
- * The hostname of the given GitLab instance
- */
- host: string;
- /**
- * Token used to authenticate requests.
- * @visibility secret
- */
- token?: string;
- }>;
- };
}
diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json
index a6b47bd7b4..c698351615 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.4.1",
+ "version": "0.5.0",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -31,8 +31,8 @@
"dependencies": {
"@backstage/cli-common": "^0.1.1",
"@backstage/config": "^0.1.2",
- "@backstage/config-loader": "^0.4.0",
- "@backstage/integration": "^0.1.4",
+ "@backstage/config-loader": "^0.4.1",
+ "@backstage/integration": "^0.3.0",
"@types/cors": "^2.8.6",
"@types/express": "^4.17.6",
"archiver": "^5.0.2",
@@ -66,9 +66,9 @@
}
},
"devDependencies": {
- "@backstage/cli": "^0.4.2",
+ "@backstage/cli": "^0.4.7",
"@backstage/test-utils": "^0.1.5",
- "@types/archiver": "^3.1.1",
+ "@types/archiver": "^5.1.0",
"@types/compression": "^1.7.0",
"@types/concat-stream": "^1.6.0",
"@types/fs-extra": "^9.0.3",
@@ -82,7 +82,6 @@
"@types/tar": "^4.0.3",
"@types/unzipper": "^0.10.3",
"@types/webpack-env": "^1.15.2",
- "@types/yaml": "^1.9.7",
"get-port": "^5.1.1",
"http-errors": "^1.7.3",
"jest": "^26.0.1",
diff --git a/packages/backend-common/src/config.ts b/packages/backend-common/src/config.ts
index 86beb65805..6989f3567b 100644
--- a/packages/backend-common/src/config.ts
+++ b/packages/backend-common/src/config.ts
@@ -37,7 +37,6 @@ export async function loadBackendConfig(options: Options): Promise {
/* eslint-disable-next-line no-restricted-syntax */
const paths = findPaths(__dirname);
const configs = await loadConfig({
- env: process.env.APP_ENV ?? process.env.NODE_ENV ?? 'development',
configRoot: paths.targetRoot,
configPaths: configOpts.map(opt => resolvePath(opt)),
});
diff --git a/packages/backend-common/src/errors.ts b/packages/backend-common/src/errors.ts
index b68dc8e3f0..39703127e6 100644
--- a/packages/backend-common/src/errors.ts
+++ b/packages/backend-common/src/errors.ts
@@ -75,3 +75,8 @@ export class NotFoundError extends CustomErrorBase {}
* resource.
*/
export class ConflictError extends CustomErrorBase {}
+
+/**
+ * The requested resource has not changed since last request.
+ */
+export class NotModifiedError extends CustomErrorBase {}
diff --git a/packages/backend-common/src/middleware/errorHandler.test.ts b/packages/backend-common/src/middleware/errorHandler.test.ts
index a7a3d64bd1..6d22c2f175 100644
--- a/packages/backend-common/src/middleware/errorHandler.test.ts
+++ b/packages/backend-common/src/middleware/errorHandler.test.ts
@@ -72,6 +72,9 @@ describe('errorHandler', () => {
it('handles well-known error classes', async () => {
const app = express();
+ app.use('/NotModifiedError', () => {
+ throw new errors.NotModifiedError();
+ });
app.use('/InputError', () => {
throw new errors.InputError();
});
@@ -90,6 +93,7 @@ describe('errorHandler', () => {
app.use(errorHandler());
const r = request(app);
+ expect((await r.get('/NotModifiedError')).status).toBe(304);
expect((await r.get('/InputError')).status).toBe(400);
expect((await r.get('/AuthenticationError')).status).toBe(401);
expect((await r.get('/NotAllowedError')).status).toBe(403);
diff --git a/packages/backend-common/src/middleware/errorHandler.ts b/packages/backend-common/src/middleware/errorHandler.ts
index 7365ce8b93..a08849813d 100644
--- a/packages/backend-common/src/middleware/errorHandler.ts
+++ b/packages/backend-common/src/middleware/errorHandler.ts
@@ -101,6 +101,8 @@ function getStatusCode(error: Error): number {
// Handle well-known error types
switch (error.name) {
+ case errors.NotModifiedError.name:
+ return 304;
case errors.InputError.name:
return 400;
case errors.AuthenticationError.name:
diff --git a/packages/backend-common/src/reading/AzureUrlReader.test.ts b/packages/backend-common/src/reading/AzureUrlReader.test.ts
index 616cbaaadc..20f8feba42 100644
--- a/packages/backend-common/src/reading/AzureUrlReader.test.ts
+++ b/packages/backend-common/src/reading/AzureUrlReader.test.ts
@@ -23,6 +23,7 @@ import { getVoidLogger } from '../logging';
import { AzureUrlReader } from './AzureUrlReader';
import { msw } from '@backstage/test-utils';
import { ReadTreeResponseFactory } from './tree';
+import { NotModifiedError } from '../errors';
const logger = getVoidLogger();
@@ -139,7 +140,12 @@ describe('AzureUrlReader', () => {
describe('readTree', () => {
const repoBuffer = fs.readFileSync(
- path.resolve('src', 'reading', '__fixtures__', 'repo.zip'),
+ path.resolve('src', 'reading', '__fixtures__', 'mock-main.zip'),
+ );
+
+ const processor = new AzureUrlReader(
+ { host: 'dev.azure.com' },
+ { treeResponseFactory },
);
beforeEach(() => {
@@ -153,24 +159,70 @@ describe('AzureUrlReader', () => {
ctx.body(repoBuffer),
),
),
+ rest.get(
+ // https://docs.microsoft.com/en-us/rest/api/azure/devops/git/commits/get%20commits?view=azure-devops-rest-6.0#on-a-branch
+ 'https://dev.azure.com/organization/project/_apis/git/repositories/repository/commits',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.json({
+ count: 2,
+ value: [
+ {
+ commitId: '123abc2',
+ comment: 'second commit',
+ },
+ {
+ commitId: '123abc1',
+ comment: 'first commit',
+ },
+ ],
+ }),
+ ),
+ ),
);
});
it('returns the wanted files from an archive', async () => {
- const processor = new AzureUrlReader(
- { host: 'dev.azure.com' },
- { treeResponseFactory },
- );
-
const response = await processor.readTree(
'https://dev.azure.com/organization/project/_git/repository',
);
+ expect(response.etag).toBe('123abc2');
+
const files = await response.files();
expect(files.length).toBe(2);
- const mkDocsFile = await files[1].content();
- const indexMarkdownFile = await files[0].content();
+ const mkDocsFile = await files[0].content();
+ const indexMarkdownFile = await files[1].content();
+
+ expect(mkDocsFile.toString()).toBe('site_name: Test\n');
+ expect(indexMarkdownFile.toString()).toBe('# Test\n');
+ });
+
+ it('throws a NotModifiedError when given a etag in options', async () => {
+ const fnAzure = async () => {
+ await processor.readTree(
+ 'https://dev.azure.com/organization/project/_git/repository',
+ { etag: '123abc2' },
+ );
+ };
+
+ await expect(fnAzure).rejects.toThrow(NotModifiedError);
+ });
+
+ it('should not throw a NotModifiedError when given an outdated etag in options', async () => {
+ const response = await processor.readTree(
+ 'https://dev.azure.com/organization/project/_git/repository',
+ { etag: 'outdated123abc' },
+ );
+
+ expect(response.etag).toBe('123abc2');
+ const files = await response.files();
+
+ expect(files.length).toBe(2);
+ const mkDocsFile = await files[0].content();
+ const indexMarkdownFile = await files[1].content();
expect(mkDocsFile.toString()).toBe('site_name: Test\n');
expect(indexMarkdownFile.toString()).toBe('# Test\n');
diff --git a/packages/backend-common/src/reading/AzureUrlReader.ts b/packages/backend-common/src/reading/AzureUrlReader.ts
index ea716a1d4a..578db2ac92 100644
--- a/packages/backend-common/src/reading/AzureUrlReader.ts
+++ b/packages/backend-common/src/reading/AzureUrlReader.ts
@@ -20,10 +20,11 @@ import {
getAzureFileFetchUrl,
getAzureDownloadUrl,
getAzureRequestOptions,
+ getAzureCommitsUrl,
} from '@backstage/integration';
import fetch from 'cross-fetch';
import { Readable } from 'stream';
-import { NotFoundError } from '../errors';
+import { NotFoundError, NotModifiedError } from '../errors';
import {
ReaderFactory,
ReadTreeOptions,
@@ -75,20 +76,42 @@ export class AzureUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise {
- const response = await fetch(
- getAzureDownloadUrl(url),
- getAzureRequestOptions(this.options, { Accept: 'application/zip' }),
+ // TODO: Support filepath based reading tree feature like other providers
+
+ // Get latest commit SHA
+
+ const commitsAzureResponse = await fetch(
+ getAzureCommitsUrl(url),
+ getAzureRequestOptions(this.options),
);
- if (!response.ok) {
- const message = `Failed to read tree from ${url}, ${response.status} ${response.statusText}`;
- if (response.status === 404) {
+ if (!commitsAzureResponse.ok) {
+ const message = `Failed to read tree from ${url}, ${commitsAzureResponse.status} ${commitsAzureResponse.statusText}`;
+ if (commitsAzureResponse.status === 404) {
throw new NotFoundError(message);
}
throw new Error(message);
}
- return this.deps.treeResponseFactory.fromZipArchive({
- stream: (response.body as unknown) as Readable,
+ const commitSha = (await commitsAzureResponse.json()).value[0].commitId;
+ if (options?.etag && options.etag === commitSha) {
+ throw new NotModifiedError();
+ }
+
+ const archiveAzureResponse = await fetch(
+ getAzureDownloadUrl(url),
+ getAzureRequestOptions(this.options, { Accept: 'application/zip' }),
+ );
+ if (!archiveAzureResponse.ok) {
+ const message = `Failed to read tree from ${url}, ${archiveAzureResponse.status} ${archiveAzureResponse.statusText}`;
+ if (archiveAzureResponse.status === 404) {
+ throw new NotFoundError(message);
+ }
+ throw new Error(message);
+ }
+
+ return await this.deps.treeResponseFactory.fromZipArchive({
+ stream: (archiveAzureResponse.body as unknown) as Readable,
+ etag: commitSha,
filter: options?.filter,
});
}
diff --git a/packages/backend-common/src/reading/BitbucketUrlReader.test.ts b/packages/backend-common/src/reading/BitbucketUrlReader.test.ts
index e327770114..9661368b5e 100644
--- a/packages/backend-common/src/reading/BitbucketUrlReader.test.ts
+++ b/packages/backend-common/src/reading/BitbucketUrlReader.test.ts
@@ -20,6 +20,7 @@ import fs from 'fs';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import path from 'path';
+import { NotModifiedError } from '../errors';
import { BitbucketUrlReader } from './BitbucketUrlReader';
import { ReadTreeResponseFactory } from './tree';
@@ -27,15 +28,24 @@ const treeResponseFactory = ReadTreeResponseFactory.create({
config: new ConfigReader({}),
});
+const bitbucketProcessor = new BitbucketUrlReader(
+ { host: 'bitbucket.org', apiBaseUrl: 'https://api.bitbucket.org/2.0' },
+ { treeResponseFactory },
+);
+
+const hostedBitbucketProcessor = new BitbucketUrlReader(
+ {
+ host: 'bitbucket.mycompany.net',
+ apiBaseUrl: 'https://api.bitbucket.mycompany.net/rest/api/1.0',
+ },
+ { treeResponseFactory },
+);
+
describe('BitbucketUrlReader', () => {
describe('implementation', () => {
it('rejects unknown targets', async () => {
- const processor = new BitbucketUrlReader(
- { host: 'bitbucket.org', apiBaseUrl: 'https://api.bitbucket.org/2.0' },
- { treeResponseFactory },
- );
await expect(
- processor.read('https://not.bitbucket.com/apa'),
+ bitbucketProcessor.read('https://not.bitbucket.com/apa'),
).rejects.toThrow(
'Incorrect URL: https://not.bitbucket.com/apa, Error: Invalid Bitbucket URL or file path',
);
@@ -55,14 +65,40 @@ describe('BitbucketUrlReader', () => {
),
);
- it('returns the wanted files from an archive', async () => {
+ const privateBitbucketRepoBuffer = fs.readFileSync(
+ path.resolve(
+ 'src',
+ 'reading',
+ '__fixtures__',
+ 'bitbucket-server-repo.zip',
+ ),
+ );
+
+ beforeEach(() => {
worker.use(
+ rest.get(
+ 'https://api.bitbucket.org/2.0/repositories/backstage/mock',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.json({
+ mainbranch: {
+ type: 'branch',
+ name: 'master',
+ },
+ }),
+ ),
+ ),
rest.get(
'https://bitbucket.org/backstage/mock/get/master.zip',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.set('Content-Type', 'application/zip'),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename=backstage-mock-12ab34cd56ef.zip',
+ ),
ctx.body(repoBuffer),
),
),
@@ -76,17 +112,39 @@ describe('BitbucketUrlReader', () => {
}),
),
),
+ rest.get(
+ 'https://api.bitbucket.mycompany.net/rest/api/1.0/projects/backstage/repos/mock/archive?format=zip&prefix=mock&path=docs',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/zip'),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename=backstage-mock.zip',
+ ),
+ ctx.body(privateBitbucketRepoBuffer),
+ ),
+ ),
+ rest.get(
+ 'https://api.bitbucket.mycompany.net/rest/api/1.0/repositories/backstage/mock/commits/some-branch',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.json({
+ values: [{ hash: '12ab34cd56ef78gh90ij12kl34mn56op78qr90st' }],
+ }),
+ ),
+ ),
);
+ });
- const processor = new BitbucketUrlReader(
- { host: 'bitbucket.org', apiBaseUrl: 'https://api.bitbucket.org/2.0' },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
+ it('returns the wanted files from an archive', async () => {
+ const response = await bitbucketProcessor.readTree(
'https://bitbucket.org/backstage/mock/src/master',
);
+ expect(response.etag).toBe('12ab34cd56ef');
+
const files = await response.files();
expect(files.length).toBe(2);
@@ -98,38 +156,12 @@ describe('BitbucketUrlReader', () => {
});
it('uses private bitbucket host', async () => {
- const privateBitbucketRepoBuffer = fs.readFileSync(
- path.resolve(
- 'src',
- 'reading',
- '__fixtures__',
- 'bitbucket-server-repo.zip',
- ),
- );
- worker.use(
- rest.get(
- 'https://api.bitbucket.mycompany.net/rest/api/1.0/projects/backstage/repos/mock/archive?format=zip&prefix=mock&path=docs',
- (_, res, ctx) =>
- res(
- ctx.status(200),
- ctx.set('Content-Type', 'application/zip'),
- ctx.body(privateBitbucketRepoBuffer),
- ),
- ),
- );
-
- const processor = new BitbucketUrlReader(
- {
- host: 'bitbucket.mycompany.net',
- apiBaseUrl: 'https://api.bitbucket.mycompany.net/rest/api/1.0',
- },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
+ const response = await hostedBitbucketProcessor.readTree(
'https://bitbucket.mycompany.net/projects/backstage/repos/mock/browse/docs?at=some-branch',
);
+ expect(response.etag).toBe('12ab34cd56ef');
+
const files = await response.files();
expect(files.length).toBe(1);
@@ -139,37 +171,12 @@ describe('BitbucketUrlReader', () => {
});
it('returns the wanted files from an archive with a subpath', async () => {
- worker.use(
- rest.get(
- 'https://bitbucket.org/backstage/mock/get/master.zip',
- (_, res, ctx) =>
- res(
- ctx.status(200),
- ctx.set('Content-Type', 'application/zip'),
- ctx.body(repoBuffer),
- ),
- ),
- rest.get(
- 'https://api.bitbucket.org/2.0/repositories/backstage/mock/commits/master',
- (_, res, ctx) =>
- res(
- ctx.status(200),
- ctx.json({
- values: [{ hash: '12ab34cd56ef78gh90ij12kl34mn56op78qr90st' }],
- }),
- ),
- ),
- );
-
- const processor = new BitbucketUrlReader(
- { host: 'bitbucket.org', apiBaseUrl: 'https://api.bitbucket.org/2.0' },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
+ const response = await bitbucketProcessor.readTree(
'https://bitbucket.org/backstage/mock/src/master/docs',
);
+ expect(response.etag).toBe('12ab34cd56ef');
+
const files = await response.files();
expect(files.length).toBe(1);
@@ -177,5 +184,25 @@ describe('BitbucketUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
+
+ it('throws a NotModifiedError when given a etag in options', async () => {
+ const fnBitbucket = async () => {
+ await bitbucketProcessor.readTree(
+ 'https://bitbucket.org/backstage/mock',
+ { etag: '12ab34cd56ef' },
+ );
+ };
+
+ await expect(fnBitbucket).rejects.toThrow(NotModifiedError);
+ });
+
+ it('should not throw a NotModifiedError when given an outdated etag in options', async () => {
+ const response = await bitbucketProcessor.readTree(
+ 'https://bitbucket.org/backstage/mock',
+ { etag: 'outdatedetag123abc' },
+ );
+
+ expect(response.etag).toBe('12ab34cd56ef');
+ });
});
});
diff --git a/packages/backend-common/src/reading/BitbucketUrlReader.ts b/packages/backend-common/src/reading/BitbucketUrlReader.ts
index 4367424423..e9727e04cf 100644
--- a/packages/backend-common/src/reading/BitbucketUrlReader.ts
+++ b/packages/backend-common/src/reading/BitbucketUrlReader.ts
@@ -23,9 +23,9 @@ import {
readBitbucketIntegrationConfigs,
} from '@backstage/integration';
import fetch from 'cross-fetch';
-import parseGitUri from 'git-url-parse';
+import parseGitUrl from 'git-url-parse';
import { Readable } from 'stream';
-import { NotFoundError } from '../errors';
+import { NotFoundError, NotModifiedError } from '../errors';
import { ReadTreeResponseFactory } from './tree';
import {
ReaderFactory,
@@ -101,33 +101,52 @@ export class BitbucketUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise {
- const gitUrl: parseGitUri.GitUrl = parseGitUri(url);
- const { name: repoName, owner: project, resource, filepath } = gitUrl;
+ const { filepath } = parseGitUrl(url);
- const isHosted = resource === 'bitbucket.org';
+ const lastCommitShortHash = await this.getLastCommitShortHash(url);
+ if (options?.etag && options.etag === lastCommitShortHash) {
+ throw new NotModifiedError();
+ }
const downloadUrl = await getBitbucketDownloadUrl(url, this.config);
- const response = await fetch(
+ const archiveBitbucketResponse = await fetch(
downloadUrl,
getBitbucketRequestOptions(this.config),
);
- if (!response.ok) {
- const message = `Failed to read tree from ${url}, ${response.status} ${response.statusText}`;
- if (response.status === 404) {
+ if (!archiveBitbucketResponse.ok) {
+ const message = `Failed to read tree from ${url}, ${archiveBitbucketResponse.status} ${archiveBitbucketResponse.statusText}`;
+ if (archiveBitbucketResponse.status === 404) {
throw new NotFoundError(message);
}
throw new Error(message);
}
- let folderPath = `${project}-${repoName}`;
- if (isHosted) {
- const lastCommitShortHash = await this.getLastCommitShortHash(url);
- folderPath = `${project}-${repoName}-${lastCommitShortHash}`;
+ // Get the filename of archive from the header of the response
+ const contentDispositionHeader = archiveBitbucketResponse.headers.get(
+ 'content-disposition',
+ ) as string;
+ if (!contentDispositionHeader) {
+ throw new Error(
+ `Failed to read tree from ${url}. ` +
+ 'Bitbucket API response for downloading archive does not contain content-disposition header ',
+ );
+ }
+ const fileNameRegEx = new RegExp(
+ /^attachment; filename=(?.*).zip$/,
+ );
+ const archiveFileName = contentDispositionHeader.match(fileNameRegEx)
+ ?.groups?.fileName;
+ if (!archiveFileName) {
+ throw new Error(
+ `Failed to read tree from ${url}. Bitbucket API response for downloading archive has an unexpected ` +
+ `format of content-disposition header ${contentDispositionHeader} `,
+ );
}
- return this.treeResponseFactory.fromZipArchive({
- stream: (response.body as unknown) as Readable,
- path: `${folderPath}/${filepath}`,
+ return await this.treeResponseFactory.fromZipArchive({
+ stream: (archiveBitbucketResponse.body as unknown) as Readable,
+ path: `${archiveFileName}/${filepath}`,
+ etag: lastCommitShortHash,
filter: options?.filter,
});
}
@@ -141,8 +160,8 @@ export class BitbucketUrlReader implements UrlReader {
return `bitbucket{host=${host},authed=${authed}}`;
}
- private async getLastCommitShortHash(url: string): Promise {
- const { name: repoName, owner: project, ref } = parseGitUri(url);
+ private async getLastCommitShortHash(url: string): Promise {
+ const { name: repoName, owner: project, ref } = parseGitUrl(url);
let branch = ref;
if (!branch) {
diff --git a/packages/backend-common/src/reading/FetchUrlReader.test.ts b/packages/backend-common/src/reading/FetchUrlReader.test.ts
new file mode 100644
index 0000000000..8dc4aba29b
--- /dev/null
+++ b/packages/backend-common/src/reading/FetchUrlReader.test.ts
@@ -0,0 +1,73 @@
+/*
+ * 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 { msw } from '@backstage/test-utils';
+import { setupServer } from 'msw/node';
+import { getVoidLogger } from '../logging';
+import { FetchUrlReader } from './FetchUrlReader';
+import { ReadTreeResponseFactory } from './tree';
+
+describe('FetchUrlReader', () => {
+ const worker = setupServer();
+
+ msw.setupDefaultHandlers(worker);
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ it('factory should create a single entry with a predicate that matches config', async () => {
+ const entries = FetchUrlReader.factory({
+ config: new ConfigReader({
+ backend: {
+ reading: {
+ allow: [
+ { host: 'example.com' },
+ { host: 'example.com:700' },
+ { host: '*.examples.org' },
+ { host: '*.examples.org:700' },
+ ],
+ },
+ },
+ }),
+ logger: getVoidLogger(),
+ treeResponseFactory: ReadTreeResponseFactory.create({
+ config: new ConfigReader({}),
+ }),
+ });
+
+ expect(entries.length).toBe(1);
+ const [{ predicate }] = entries;
+
+ expect(predicate(new URL('https://example.com/test'))).toBe(true);
+ expect(predicate(new URL('https://a.example.com/test'))).toBe(false);
+ expect(predicate(new URL('https://example.com:600/test'))).toBe(false);
+ expect(predicate(new URL('https://a.example.com:600/test'))).toBe(false);
+ expect(predicate(new URL('https://example.com:700/test'))).toBe(true);
+ expect(predicate(new URL('https://a.example.com:700/test'))).toBe(false);
+ expect(predicate(new URL('https://other.com/test'))).toBe(false);
+ expect(predicate(new URL('https://examples.org/test'))).toBe(false);
+ expect(predicate(new URL('https://a.examples.org/test'))).toBe(true);
+ expect(predicate(new URL('https://a.b.examples.org/test'))).toBe(true);
+ expect(predicate(new URL('https://examples.org:600/test'))).toBe(false);
+ expect(predicate(new URL('https://a.examples.org:600/test'))).toBe(false);
+ expect(predicate(new URL('https://a.b.examples.org:600/test'))).toBe(false);
+ expect(predicate(new URL('https://examples.org:700/test'))).toBe(false);
+ expect(predicate(new URL('https://a.examples.org:700/test'))).toBe(true);
+ expect(predicate(new URL('https://a.b.examples.org:700/test'))).toBe(true);
+ });
+});
diff --git a/packages/backend-common/src/reading/FetchUrlReader.ts b/packages/backend-common/src/reading/FetchUrlReader.ts
index 1d1784590c..81f1dfa90e 100644
--- a/packages/backend-common/src/reading/FetchUrlReader.ts
+++ b/packages/backend-common/src/reading/FetchUrlReader.ts
@@ -16,12 +16,39 @@
import fetch from 'cross-fetch';
import { NotFoundError } from '../errors';
-import { ReadTreeResponse, UrlReader } from './types';
+import { ReaderFactory, ReadTreeResponse, UrlReader } from './types';
/**
* A UrlReader that does a plain fetch of the URL.
*/
export class FetchUrlReader implements UrlReader {
+ /**
+ * The factory creates a single reader that will be used for reading any URL that's listed
+ * in configuration at `backend.reading.allow`. The allow list contains a list of objects describing
+ * targets to allow, containing the following fields:
+ *
+ * `host`:
+ * Either full hostnames to match, or subdomain wildcard matchers with a leading `*`.
+ * For example `example.com` and `*.example.com` are valid values, `prod.*.example.com` is not.
+ */
+ static factory: ReaderFactory = ({ config }) => {
+ const predicates =
+ config
+ .getOptionalConfigArray('backend.reading.allow')
+ ?.map(allowConfig => {
+ const host = allowConfig.getString('host');
+ if (host.startsWith('*.')) {
+ const suffix = host.slice(1);
+ return (url: URL) => url.host.endsWith(suffix);
+ }
+ return (url: URL) => url.host === host;
+ }) ?? [];
+
+ const reader = new FetchUrlReader();
+ const predicate = (url: URL) => predicates.some(p => p(url));
+ return [{ reader, predicate }];
+ };
+
async read(url: string): Promise {
let response: Response;
try {
diff --git a/packages/backend-common/src/reading/GithubUrlReader.test.ts b/packages/backend-common/src/reading/GithubUrlReader.test.ts
index f842adcf90..080e8b1d5b 100644
--- a/packages/backend-common/src/reading/GithubUrlReader.test.ts
+++ b/packages/backend-common/src/reading/GithubUrlReader.test.ts
@@ -15,11 +15,13 @@
*/
import { ConfigReader } from '@backstage/config';
+import { GithubCredentialsProvider } from '@backstage/integration';
import { msw } from '@backstage/test-utils';
import fs from 'fs';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import path from 'path';
+import { NotFoundError, NotModifiedError } from '../errors';
import { GithubUrlReader } from './GithubUrlReader';
import { ReadTreeResponseFactory } from './tree';
@@ -27,59 +29,193 @@ const treeResponseFactory = ReadTreeResponseFactory.create({
config: new ConfigReader({}),
});
+const mockCredentialsProvider = ({
+ getCredentials: jest.fn().mockResolvedValue({ headers: {} }),
+} as unknown) as GithubCredentialsProvider;
+
+const githubProcessor = new GithubUrlReader(
+ {
+ host: 'github.com',
+ apiBaseUrl: 'https://api.github.com',
+ },
+ { treeResponseFactory, credentialsProvider: mockCredentialsProvider },
+);
+
+const gheProcessor = new GithubUrlReader(
+ {
+ host: 'ghe.github.com',
+ apiBaseUrl: 'https://ghe.github.com/api/v3',
+ },
+ { treeResponseFactory, credentialsProvider: mockCredentialsProvider },
+);
+
describe('GithubUrlReader', () => {
+ const worker = setupServer();
+
+ msw.setupDefaultHandlers(worker);
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
describe('implementation', () => {
it('rejects unknown targets', async () => {
- const processor = new GithubUrlReader(
- {
- host: 'github.com',
- apiBaseUrl: 'https://api.github.com',
- },
- { treeResponseFactory },
- );
await expect(
- processor.read('https://not.github.com/apa'),
+ githubProcessor.read('https://not.github.com/apa'),
).rejects.toThrow(
'Incorrect URL: https://not.github.com/apa, Error: Invalid GitHub URL or file path',
);
});
});
+ describe('read', () => {
+ it('should use the headers from the credentials provider to the fetch request when doing read', async () => {
+ expect.assertions(2);
+
+ const mockHeaders = {
+ Authorization: 'bearer blah',
+ otherheader: 'something',
+ };
+
+ (mockCredentialsProvider.getCredentials as jest.Mock).mockResolvedValue({
+ headers: mockHeaders,
+ });
+
+ worker.use(
+ rest.get(
+ 'https://api.github.com/repos/backstage/mock/tree/contents/?ref=main',
+ (req, res, ctx) => {
+ expect(req.headers.get('authorization')).toBe(
+ mockHeaders.Authorization,
+ );
+ expect(req.headers.get('otherheader')).toBe(
+ mockHeaders.otherheader,
+ );
+ return res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/x-gzip'),
+ ctx.body('foo'),
+ );
+ },
+ ),
+ );
+
+ await githubProcessor.read(
+ 'https://github.com/backstage/mock/tree/blob/main',
+ );
+ });
+ });
+
describe('readTree', () => {
- const worker = setupServer();
-
- msw.setupDefaultHandlers(worker);
-
const repoBuffer = fs.readFileSync(
- path.resolve('src', 'reading', '__fixtures__', 'repo.tar.gz'),
+ path.resolve(
+ 'src',
+ 'reading',
+ '__fixtures__',
+ 'backstage-mock-etag123.tar.gz',
+ ),
);
+ const reposGithubApiResponse = {
+ id: '123',
+ full_name: 'backstage/mock',
+ default_branch: 'main',
+ branches_url:
+ 'https://api.github.com/repos/backstage/mock/branches{/branch}',
+ archive_url:
+ 'https://api.github.com/repos/backstage/mock/{archive_format}{/ref}',
+ };
+
+ const reposGheApiResponse = {
+ ...reposGithubApiResponse,
+ branches_url:
+ 'https://ghe.github.com/api/v3/repos/backstage/mock/branches{/branch}',
+ archive_url:
+ 'https://ghe.github.com/api/v3/repos/backstage/mock/{archive_format}{/ref}',
+ };
+
+ const branchesApiResponse = {
+ name: 'main',
+ commit: {
+ sha: 'etag123abc',
+ },
+ };
+
beforeEach(() => {
worker.use(
+ rest.get('https://api.github.com/repos/backstage/mock', (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(reposGithubApiResponse),
+ ),
+ ),
rest.get(
- 'https://github.com/backstage/mock/archive/repo.tar.gz',
+ 'https://api.github.com/repos/backstage/mock/branches/main',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(branchesApiResponse),
+ ),
+ ),
+ rest.get(
+ 'https://api.github.com/repos/backstage/mock/tarball/etag123abc',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.set('Content-Type', 'application/x-gzip'),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename=backstage-mock-etag123.tar.gz',
+ ),
ctx.body(repoBuffer),
),
),
+ rest.get(
+ 'https://api.github.com/repos/backstage/mock/branches/branchDoesNotExist',
+ (_, res, ctx) => res(ctx.status(404)),
+ ),
+ rest.get(
+ 'https://ghe.github.com/api/v3/repos/backstage/mock/tarball/etag123abc',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/x-gzip'),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename=backstage-mock-etag123.tar.gz',
+ ),
+ ctx.body(repoBuffer),
+ ),
+ ),
+ rest.get(
+ 'https://ghe.github.com/api/v3/repos/backstage/mock',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(reposGheApiResponse),
+ ),
+ ),
+ rest.get(
+ 'https://ghe.github.com/api/v3/repos/backstage/mock/branches/main',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(branchesApiResponse),
+ ),
+ ),
);
});
it('returns the wanted files from an archive', async () => {
- const processor = new GithubUrlReader(
- {
- host: 'github.com',
- apiBaseUrl: 'https://api.github.com',
- },
- { treeResponseFactory },
+ const response = await githubProcessor.readTree(
+ 'https://github.com/backstage/mock/tree/main',
);
- const response = await processor.readTree(
- 'https://github.com/backstage/mock/tree/repo',
- );
+ expect(response.etag).toBe('etag123abc');
const files = await response.files();
@@ -91,30 +227,49 @@ describe('GithubUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
- it('includes the subdomain in the github url', async () => {
- worker.resetHandlers();
+ it('should use the headers from the credentials provider to the fetch request', async () => {
+ expect.assertions(2);
+
+ const mockHeaders = {
+ Authorization: 'bearer blah',
+ otherheader: 'something',
+ };
+
+ (mockCredentialsProvider.getCredentials as jest.Mock).mockResolvedValue({
+ headers: mockHeaders,
+ });
+
worker.use(
rest.get(
- 'https://ghe.github.com/backstage/mock/archive/repo.tar.gz',
- (_, res, ctx) =>
- res(
+ 'https://ghe.github.com/api/v3/repos/backstage/mock/tarball/etag123abc',
+ (req, res, ctx) => {
+ expect(req.headers.get('authorization')).toBe(
+ mockHeaders.Authorization,
+ );
+ expect(req.headers.get('otherheader')).toBe(
+ mockHeaders.otherheader,
+ );
+ return res(
ctx.status(200),
ctx.set('Content-Type', 'application/x-gzip'),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename=backstage-mock-etag123.tar.gz',
+ ),
ctx.body(repoBuffer),
- ),
+ );
+ },
),
);
- const processor = new GithubUrlReader(
- {
- host: 'ghe.github.com',
- apiBaseUrl: 'https://api.github.com',
- },
- { treeResponseFactory },
+ await gheProcessor.readTree(
+ 'https://ghe.github.com/backstage/mock/tree/main',
);
+ });
- const response = await processor.readTree(
- 'https://ghe.github.com/backstage/mock/tree/repo/docs',
+ it('includes the subdomain in the github url', async () => {
+ const response = await gheProcessor.readTree(
+ 'https://ghe.github.com/backstage/mock/tree/main/docs',
);
const files = await response.files();
@@ -125,33 +280,9 @@ describe('GithubUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
- it('must specify a branch', async () => {
- const processor = new GithubUrlReader(
- {
- host: 'github.com',
- apiBaseUrl: 'https://api.github.com',
- },
- { treeResponseFactory },
- );
-
- await expect(
- processor.readTree('https://github.com/backstage/mock'),
- ).rejects.toThrow(
- 'GitHub URL must contain branch to be able to fetch tree',
- );
- });
-
it('returns the wanted files from an archive with a subpath', async () => {
- const processor = new GithubUrlReader(
- {
- host: 'github.com',
- apiBaseUrl: 'https://api.github.com',
- },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
- 'https://github.com/backstage/mock/tree/repo/docs',
+ const response = await githubProcessor.readTree(
+ 'https://github.com/backstage/mock/tree/main/docs',
);
const files = await response.files();
@@ -161,5 +292,51 @@ describe('GithubUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
+
+ it('throws a NotModifiedError when given a etag in options', async () => {
+ const fnGithub = async () => {
+ await githubProcessor.readTree('https://github.com/backstage/mock', {
+ etag: 'etag123abc',
+ });
+ };
+
+ const fnGhe = async () => {
+ await gheProcessor.readTree(
+ 'https://ghe.github.com/backstage/mock/tree/main/docs',
+ {
+ etag: 'etag123abc',
+ },
+ );
+ };
+
+ await expect(fnGithub).rejects.toThrow(NotModifiedError);
+ await expect(fnGhe).rejects.toThrow(NotModifiedError);
+ });
+
+ it('should not throw error when given an outdated etag in options', async () => {
+ const response = await githubProcessor.readTree(
+ 'https://github.com/backstage/mock/tree/main',
+ {
+ etag: 'outdatedetag123abc',
+ },
+ );
+ expect((await response.files()).length).toBe(2);
+ });
+
+ it('should detect the default branch', async () => {
+ const response = await githubProcessor.readTree(
+ 'https://github.com/backstage/mock',
+ );
+ expect((await response.files()).length).toBe(2);
+ });
+
+ it('should throw error on missing branch', async () => {
+ const fnGithub = async () => {
+ await githubProcessor.readTree(
+ 'https://github.com/backstage/mock/tree/branchDoesNotExist',
+ );
+ };
+ await expect(fnGithub).rejects.toThrow(NotFoundError);
+ });
});
});
diff --git a/packages/backend-common/src/reading/GithubUrlReader.ts b/packages/backend-common/src/reading/GithubUrlReader.ts
index 5ca2a99692..6c7cefe2ef 100644
--- a/packages/backend-common/src/reading/GithubUrlReader.ts
+++ b/packages/backend-common/src/reading/GithubUrlReader.ts
@@ -18,12 +18,12 @@ import {
GitHubIntegrationConfig,
readGitHubIntegrationConfigs,
getGitHubFileFetchUrl,
- getGitHubRequestOptions,
+ GithubCredentialsProvider,
} from '@backstage/integration';
import fetch from 'cross-fetch';
-import parseGitUri from 'git-url-parse';
+import parseGitUrl from 'git-url-parse';
import { Readable } from 'stream';
-import { InputError, NotFoundError } from '../errors';
+import { NotFoundError, NotModifiedError } from '../errors';
import { ReadTreeResponseFactory } from './tree';
import {
ReaderFactory,
@@ -42,7 +42,11 @@ export class GithubUrlReader implements UrlReader {
config.getOptionalConfigArray('integrations.github') ?? [],
);
return configs.map(provider => {
- const reader = new GithubUrlReader(provider, { treeResponseFactory });
+ const credentialsProvider = GithubCredentialsProvider.create(provider);
+ const reader = new GithubUrlReader(provider, {
+ treeResponseFactory,
+ credentialsProvider,
+ });
const predicate = (url: URL) => url.host === provider.host;
return { reader, predicate };
});
@@ -50,7 +54,10 @@ export class GithubUrlReader implements UrlReader {
constructor(
private readonly config: GitHubIntegrationConfig,
- private readonly deps: { treeResponseFactory: ReadTreeResponseFactory },
+ private readonly deps: {
+ treeResponseFactory: ReadTreeResponseFactory;
+ credentialsProvider: GithubCredentialsProvider;
+ },
) {
if (!config.apiBaseUrl && !config.rawBaseUrl) {
throw new Error(
@@ -61,11 +68,17 @@ export class GithubUrlReader implements UrlReader {
async read(url: string): Promise {
const ghUrl = getGitHubFileFetchUrl(url, this.config);
- const options = getGitHubRequestOptions(this.config);
-
+ const { headers } = await this.deps.credentialsProvider.getCredentials({
+ url,
+ });
let response: Response;
try {
- response = await fetch(ghUrl.toString(), options);
+ response = await fetch(ghUrl.toString(), {
+ headers: {
+ ...headers,
+ Accept: 'application/vnd.github.v3.raw',
+ },
+ });
} catch (e) {
throw new Error(`Unable to read ${url}, ${e}`);
}
@@ -85,44 +98,106 @@ export class GithubUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise {
- const {
- name: repoName,
- ref,
- protocol,
- resource,
- full_name,
- filepath,
- } = parseGitUri(url);
+ const { ref, filepath, full_name } = parseGitUrl(url);
+ // Caveat: The ref will totally be incorrect if the branch name includes a /
+ // Thus, readTree can not work on url containing branch name that has a /
- if (!ref) {
- // TODO(Rugvip): We should add support for defaulting to the default branch
- throw new InputError(
- 'GitHub URL must contain branch to be able to fetch tree',
- );
- }
+ const { headers } = await this.deps.credentialsProvider.getCredentials({
+ url,
+ });
- // TODO(Rugvip): use API to fetch URL instead
- const response = await fetch(
- new URL(
- `${protocol}://${resource}/${full_name}/archive/${ref}.tar.gz`,
- ).toString(),
- getGitHubRequestOptions(this.config),
+ // Get GitHub API urls for the repository
+ const repoGitHubResponse = await fetch(
+ new URL(`${this.config.apiBaseUrl}/repos/${full_name}`).toString(),
+ {
+ headers,
+ },
);
- if (!response.ok) {
- const message = `Failed to read tree from ${url}, ${response.status} ${response.statusText}`;
- if (response.status === 404) {
+ if (!repoGitHubResponse.ok) {
+ const message = `Failed to read tree (repository) from ${url}, ${repoGitHubResponse.status} ${repoGitHubResponse.statusText}`;
+ if (repoGitHubResponse.status === 404) {
throw new NotFoundError(message);
}
throw new Error(message);
}
- const path = `${repoName}-${ref}/${filepath}`;
+ const repoResponseJson = await repoGitHubResponse.json();
- return this.deps.treeResponseFactory.fromTarArchive({
+ // ref is an empty string if no branch is set in provided url to readTree.
+ // Use GitHub API to get the default branch of the repository.
+ const branch = ref || repoResponseJson.default_branch;
+ const branchesApiUrl = repoResponseJson.branches_url;
+ const archiveApiUrl = repoResponseJson.archive_url;
+
+ // Fetch the latest commit in the provided or default branch to compare against
+ // the provided sha.
+ const branchGitHubResponse = await fetch(
+ // branchesApiUrl looks like "https://api.github.com/repos/owner/repo/branches{/branch}"
+ branchesApiUrl.replace('{/branch}', `/${branch}`),
+ {
+ headers,
+ },
+ );
+ if (!branchGitHubResponse.ok) {
+ const message = `Failed to read tree (branch) from ${url}, ${branchGitHubResponse.status} ${branchGitHubResponse.statusText}`;
+ if (branchGitHubResponse.status === 404) {
+ throw new NotFoundError(message);
+ }
+ throw new Error(message);
+ }
+ const commitSha = (await branchGitHubResponse.json()).commit.sha;
+
+ if (options?.etag && options.etag === commitSha) {
+ throw new NotModifiedError();
+ }
+
+ const archive = await fetch(
+ // archiveApiUrl looks like "https://api.github.com/repos/owner/repo/{archive_format}{/ref}"
+ archiveApiUrl
+ .replace('{archive_format}', 'tarball')
+ .replace('{/ref}', `/${commitSha}`),
+ { headers },
+ );
+ if (!archive.ok) {
+ const message = `Failed to read tree (archive) from ${url}, ${archive.status} ${archive.statusText}`;
+ if (archive.status === 404) {
+ throw new NotFoundError(message);
+ }
+ throw new Error(message);
+ }
+
+ // Get the filename of archive from the header of the response
+ const contentDispositionHeader = archive.headers.get(
+ 'content-disposition',
+ ) as string;
+ if (!contentDispositionHeader) {
+ throw new Error(
+ `Failed to read tree from ${url}. ` +
+ 'GitHub API response for downloading archive does not contain content-disposition header ',
+ );
+ }
+ const fileNameRegEx = new RegExp(
+ /^attachment; filename=(?.*).tar.gz$/,
+ );
+ const archiveFileName = contentDispositionHeader.match(fileNameRegEx)
+ ?.groups?.fileName;
+ if (!archiveFileName) {
+ throw new Error(
+ `Failed to read tree from ${url}. GitHub API response for downloading archive has an unexpected ` +
+ `format of content-disposition header ${contentDispositionHeader} `,
+ );
+ }
+
+ // The path includes the name of the directory inside the tarball and a sub path
+ // if requested in readTree.
+ const path = `${archiveFileName}/${filepath}`;
+
+ return await this.deps.treeResponseFactory.fromTarArchive({
// TODO(Rugvip): Underlying implementation of fetch will be node-fetch, we probably want
// to stick to using that in exclusively backend code.
- stream: (response.body as unknown) as Readable,
+ stream: (archive.body as unknown) as Readable,
path,
+ etag: commitSha,
filter: options?.filter,
});
}
diff --git a/packages/backend-common/src/reading/GitlabUrlReader.test.ts b/packages/backend-common/src/reading/GitlabUrlReader.test.ts
index 6cc5e30dbd..c0736f769d 100644
--- a/packages/backend-common/src/reading/GitlabUrlReader.test.ts
+++ b/packages/backend-common/src/reading/GitlabUrlReader.test.ts
@@ -23,6 +23,7 @@ import path from 'path';
import { getVoidLogger } from '../logging';
import { GitlabUrlReader } from './GitlabUrlReader';
import { ReadTreeResponseFactory } from './tree';
+import { NotModifiedError, NotFoundError } from '../errors';
const logger = getVoidLogger();
@@ -30,6 +31,22 @@ const treeResponseFactory = ReadTreeResponseFactory.create({
config: new ConfigReader({}),
});
+const gitlabProcessor = new GitlabUrlReader(
+ {
+ host: 'gitlab.com',
+ apiBaseUrl: 'https://gitlab.com/api/v4',
+ },
+ { treeResponseFactory },
+);
+
+const hostedGitlabProcessor = new GitlabUrlReader(
+ {
+ host: 'gitlab.mycompany.com',
+ apiBaseUrl: 'https://gitlab.mycompany.com/api/v4',
+ },
+ { treeResponseFactory },
+);
+
describe('GitlabUrlReader', () => {
const worker = setupServer();
msw.setupDefaultHandlers(worker);
@@ -136,39 +153,102 @@ describe('GitlabUrlReader', () => {
});
describe('readTree', () => {
- const repoBuffer = fs.readFileSync(
- path.resolve('src', 'reading', '__fixtures__', 'repo.zip'),
+ const archiveBuffer = fs.readFileSync(
+ path.resolve('src', 'reading', '__fixtures__', 'gitlab-archive.zip'),
);
+ const projectGitlabApiResponse = {
+ id: 11111111,
+ default_branch: 'main',
+ };
+
+ const branchGitlabApiResponse = {
+ commit: {
+ id: 'sha123abc',
+ },
+ };
+
beforeEach(() => {
worker.use(
rest.get(
- 'https://gitlab.com/backstage/mock/-/archive/repo/mock-repo.zip',
+ 'https://gitlab.com/api/v4/projects/backstage%2Fmock/repository/archive.zip?sha=main',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.set('Content-Type', 'application/zip'),
- ctx.body(repoBuffer),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename="mock-main-sha123abc.zip"',
+ ),
+ ctx.body(archiveBuffer),
+ ),
+ ),
+ rest.get(
+ 'https://gitlab.com/api/v4/projects/backstage%2Fmock',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(projectGitlabApiResponse),
+ ),
+ ),
+ rest.get(
+ 'https://gitlab.com/api/v4/projects/backstage%2Fmock/repository/branches/main',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(branchGitlabApiResponse),
+ ),
+ ),
+ rest.get(
+ 'https://gitlab.com/api/v4/projects/backstage%2Fmock/repository/branches/branchDoesNotExist',
+ (_, res, ctx) => res(ctx.status(404)),
+ ),
+ rest.get(
+ 'https://gitlab.mycompany.com/api/v4/projects/backstage%2Fmock',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(projectGitlabApiResponse),
+ ),
+ ),
+ rest.get(
+ 'https://gitlab.mycompany.com/api/v4/projects/backstage%2Fmock/repository/branches/main',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/json'),
+ ctx.json(branchGitlabApiResponse),
+ ),
+ ),
+ rest.get(
+ 'https://gitlab.mycompany.com/api/v4/projects/backstage%2Fmock/repository/archive.zip?sha=main',
+ (_, res, ctx) =>
+ res(
+ ctx.status(200),
+ ctx.set('Content-Type', 'application/zip'),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename="mock-main-sha123abc.zip"',
+ ),
+ ctx.body(archiveBuffer),
),
),
);
});
it('returns the wanted files from an archive', async () => {
- const processor = new GitlabUrlReader(
- { host: 'gitlab.com' },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
- 'https://gitlab.com/backstage/mock/tree/repo',
+ const response = await gitlabProcessor.readTree(
+ 'https://gitlab.com/backstage/mock/tree/main',
);
const files = await response.files();
expect(files.length).toBe(2);
- const indexMarkdownFile = await files[0].content();
- const mkDocsFile = await files[1].content();
+ const mkDocsFile = await files[0].content();
+ const indexMarkdownFile = await files[1].content();
expect(mkDocsFile.toString()).toBe('site_name: Test\n');
expect(indexMarkdownFile.toString()).toBe('# Test\n');
@@ -177,23 +257,22 @@ describe('GitlabUrlReader', () => {
it('returns the wanted files from hosted gitlab', async () => {
worker.use(
rest.get(
- 'https://git.mycompany.com/backstage/mock/-/archive/repo/mock-repo.zip',
+ 'https://gitlab.mycompany.com/backstage/mock/-/archive/main.zip',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.set('Content-Type', 'application/zip'),
- ctx.body(repoBuffer),
+ ctx.set(
+ 'content-disposition',
+ 'attachment; filename="mock-main-sha123abc.zip"',
+ ),
+ ctx.body(archiveBuffer),
),
),
);
- const processor = new GitlabUrlReader(
- { host: 'git.mycompany.com' },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
- 'https://git.mycompany.com/backstage/mock/tree/repo/docs',
+ const response = await hostedGitlabProcessor.readTree(
+ 'https://gitlab.mycompany.com/backstage/mock/tree/main/docs',
);
const files = await response.files();
@@ -204,27 +283,9 @@ describe('GitlabUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
- it('throws an error when branch is not specified', async () => {
- const processor = new GitlabUrlReader(
- { host: 'gitlab.com' },
- { treeResponseFactory },
- );
-
- await expect(
- processor.readTree('https://gitlab.com/backstage/mock'),
- ).rejects.toThrow(
- 'GitLab URL must contain a branch to be able to fetch its tree',
- );
- });
-
it('returns the wanted files from an archive with a subpath', async () => {
- const processor = new GitlabUrlReader(
- { host: 'gitlab.com' },
- { treeResponseFactory },
- );
-
- const response = await processor.readTree(
- 'https://gitlab.com/backstage/mock/tree/repo/docs',
+ const response = await gitlabProcessor.readTree(
+ 'https://gitlab.com/backstage/mock/tree/main/docs',
);
const files = await response.files();
@@ -234,5 +295,51 @@ describe('GitlabUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
+
+ it('throws a NotModifiedError when given a etag in options', async () => {
+ const fnGitlab = async () => {
+ await gitlabProcessor.readTree('https://gitlab.com/backstage/mock', {
+ etag: 'sha123abc',
+ });
+ };
+
+ const fnHostedGitlab = async () => {
+ await hostedGitlabProcessor.readTree(
+ 'https://gitlab.mycompany.com/backstage/mock',
+ {
+ etag: 'sha123abc',
+ },
+ );
+ };
+
+ await expect(fnGitlab).rejects.toThrow(NotModifiedError);
+ await expect(fnHostedGitlab).rejects.toThrow(NotModifiedError);
+ });
+
+ it('should not throw error when given an outdated etag in options', async () => {
+ const response = await gitlabProcessor.readTree(
+ 'https://gitlab.com/backstage/mock/tree/main',
+ {
+ etag: 'outdatedsha123abc',
+ },
+ );
+ expect((await response.files()).length).toBe(2);
+ });
+
+ it('should detect the default branch', async () => {
+ const response = await gitlabProcessor.readTree(
+ 'https://gitlab.com/backstage/mock',
+ );
+ expect((await response.files()).length).toBe(2);
+ });
+
+ it('should throw error on missing branch', async () => {
+ const fnGithub = async () => {
+ await gitlabProcessor.readTree(
+ 'https://gitlab.com/backstage/mock/tree/branchDoesNotExist',
+ );
+ };
+ await expect(fnGithub).rejects.toThrow(NotFoundError);
+ });
});
});
diff --git a/packages/backend-common/src/reading/GitlabUrlReader.ts b/packages/backend-common/src/reading/GitlabUrlReader.ts
index d51e8dc090..654f4f9a85 100644
--- a/packages/backend-common/src/reading/GitlabUrlReader.ts
+++ b/packages/backend-common/src/reading/GitlabUrlReader.ts
@@ -21,7 +21,7 @@ import {
readGitLabIntegrationConfigs,
} from '@backstage/integration';
import fetch from 'cross-fetch';
-import { InputError, NotFoundError } from '../errors';
+import { NotFoundError, NotModifiedError } from '../errors';
import { ReadTreeResponseFactory } from './tree';
import {
ReaderFactory,
@@ -29,7 +29,7 @@ import {
ReadTreeResponse,
UrlReader,
} from './types';
-import parseGitUri from 'git-url-parse';
+import parseGitUrl from 'git-url-parse';
import { Readable } from 'stream';
export class GitlabUrlReader implements UrlReader {
@@ -39,26 +39,26 @@ export class GitlabUrlReader implements UrlReader {
const configs = readGitLabIntegrationConfigs(
config.getOptionalConfigArray('integrations.gitlab') ?? [],
);
- return configs.map(options => {
- const reader = new GitlabUrlReader(options, { treeResponseFactory });
- const predicate = (url: URL) => url.host === options.host;
+ return configs.map(provider => {
+ const reader = new GitlabUrlReader(provider, { treeResponseFactory });
+ const predicate = (url: URL) => url.host === provider.host;
return { reader, predicate };
});
};
constructor(
- private readonly options: GitLabIntegrationConfig,
+ private readonly config: GitLabIntegrationConfig,
deps: { treeResponseFactory: ReadTreeResponseFactory },
) {
this.treeResponseFactory = deps.treeResponseFactory;
}
async read(url: string): Promise {
- const builtUrl = await getGitLabFileFetchUrl(url, this.options);
+ const builtUrl = await getGitLabFileFetchUrl(url, this.config);
let response: Response;
try {
- response = await fetch(builtUrl, getGitLabRequestOptions(this.options));
+ response = await fetch(builtUrl, getGitLabRequestOptions(this.config));
} catch (e) {
throw new Error(`Unable to read ${url}, ${e}`);
}
@@ -78,45 +78,102 @@ export class GitlabUrlReader implements UrlReader {
url: string,
options?: ReadTreeOptions,
): Promise {
- const {
- name: repoName,
- ref,
- protocol,
- resource,
- full_name,
- filepath,
- } = parseGitUri(url);
+ const { ref, full_name, filepath } = parseGitUrl(url);
- if (!ref) {
- throw new InputError(
- 'GitLab URL must contain a branch to be able to fetch its tree',
- );
- }
-
- const archive = `${protocol}://${resource}/${full_name}/-/archive/${ref}/${repoName}-${ref}.zip`;
- const response = await fetch(
- archive,
- getGitLabRequestOptions(this.options),
+ // Use GitLab API to get the default branch
+ // encodeURIComponent is required for GitLab API
+ // https://docs.gitlab.com/ee/api/README.html#namespaced-path-encoding
+ const projectGitlabResponse = await fetch(
+ new URL(
+ `${this.config.apiBaseUrl}/projects/${encodeURIComponent(full_name)}`,
+ ).toString(),
+ getGitLabRequestOptions(this.config),
);
- if (!response.ok) {
- const msg = `Failed to read tree from ${url}, ${response.status} ${response.statusText}`;
- if (response.status === 404) {
+ if (!projectGitlabResponse.ok) {
+ const msg = `Failed to read tree from ${url}, ${projectGitlabResponse.status} ${projectGitlabResponse.statusText}`;
+ if (projectGitlabResponse.status === 404) {
throw new NotFoundError(msg);
}
throw new Error(msg);
}
+ const projectGitlabResponseJson = await projectGitlabResponse.json();
- const path = filepath ? `${repoName}-${ref}/${filepath}/` : '';
+ // ref is an empty string if no branch is set in provided url to readTree.
+ const branch = ref || projectGitlabResponseJson.default_branch;
- return this.treeResponseFactory.fromZipArchive({
- stream: (response.body as unknown) as Readable,
+ // Fetch the latest commit in the provided or default branch to compare against
+ // the provided sha.
+ const branchGitlabResponse = await fetch(
+ new URL(
+ `${this.config.apiBaseUrl}/projects/${encodeURIComponent(
+ full_name,
+ )}/repository/branches/${branch}`,
+ ).toString(),
+ getGitLabRequestOptions(this.config),
+ );
+ if (!branchGitlabResponse.ok) {
+ const message = `Failed to read tree (branch) from ${url}, ${branchGitlabResponse.status} ${branchGitlabResponse.statusText}`;
+ if (branchGitlabResponse.status === 404) {
+ throw new NotFoundError(message);
+ }
+ throw new Error(message);
+ }
+
+ const commitSha = (await branchGitlabResponse.json()).commit.id;
+
+ if (options?.etag && options.etag === commitSha) {
+ throw new NotModifiedError();
+ }
+
+ // https://docs.gitlab.com/ee/api/repositories.html#get-file-archive
+ const archiveGitLabResponse = await fetch(
+ `${this.config.apiBaseUrl}/projects/${encodeURIComponent(
+ full_name,
+ )}/repository/archive.zip?sha=${branch}`,
+ getGitLabRequestOptions(this.config),
+ );
+ if (!archiveGitLabResponse.ok) {
+ const message = `Failed to read tree (archive) from ${url}, ${archiveGitLabResponse.status} ${archiveGitLabResponse.statusText}`;
+ if (archiveGitLabResponse.status === 404) {
+ throw new NotFoundError(message);
+ }
+ throw new Error(message);
+ }
+
+ // Get the filename of archive from the header of the response
+ const contentDispositionHeader = archiveGitLabResponse.headers.get(
+ 'content-disposition',
+ ) as string;
+ if (!contentDispositionHeader) {
+ throw new Error(
+ `Failed to read tree from ${url}. ` +
+ 'GitLab API response for downloading archive does not contain content-disposition header ',
+ );
+ }
+ const fileNameRegEx = new RegExp(
+ /^attachment; filename="(?.*).zip"$/,
+ );
+ const archiveFileName = contentDispositionHeader.match(fileNameRegEx)
+ ?.groups?.fileName;
+ if (!archiveFileName) {
+ throw new Error(
+ `Failed to read tree from ${url}. GitLab API response for downloading archive has an unexpected ` +
+ `format of content-disposition header ${contentDispositionHeader} `,
+ );
+ }
+
+ const path = filepath ? `${archiveFileName}/${filepath}/` : '';
+
+ return await this.treeResponseFactory.fromZipArchive({
+ stream: (archiveGitLabResponse.body as unknown) as Readable,
path,
+ etag: commitSha,
filter: options?.filter,
});
}
toString() {
- const { host, token } = this.options;
+ const { host, token } = this.config;
return `gitlab{host=${host},authed=${Boolean(token)}}`;
}
}
diff --git a/packages/backend-common/src/reading/UrlReaderPredicateMux.ts b/packages/backend-common/src/reading/UrlReaderPredicateMux.ts
index 465c125fda..3183aa0c28 100644
--- a/packages/backend-common/src/reading/UrlReaderPredicateMux.ts
+++ b/packages/backend-common/src/reading/UrlReaderPredicateMux.ts
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+import { NotAllowedError } from '../errors';
import {
ReadTreeOptions,
ReadTreeResponse,
@@ -21,22 +22,12 @@ import {
UrlReaderPredicateTuple,
} from './types';
-type Options = {
- // UrlReader to fall back to if no other reader is matched
- fallback?: UrlReader;
-};
-
/**
* A UrlReader implementation that selects from a set of UrlReaders
* based on a predicate tied to each reader.
*/
export class UrlReaderPredicateMux implements UrlReader {
private readonly readers: UrlReaderPredicateTuple[] = [];
- private readonly fallback?: UrlReader;
-
- constructor({ fallback }: Options) {
- this.fallback = fallback;
- }
register(tuple: UrlReaderPredicateTuple): void {
this.readers.push(tuple);
@@ -51,32 +42,25 @@ export class UrlReaderPredicateMux implements UrlReader {
}
}
- if (this.fallback) {
- return this.fallback.read(url);
- }
-
- throw new Error(`No reader found that could handle '${url}'`);
+ throw new NotAllowedError(`Reading from '${url}' is not allowed`);
}
- readTree(url: string, options?: ReadTreeOptions): Promise {
+ async readTree(
+ url: string,
+ options?: ReadTreeOptions,
+ ): Promise {
const parsed = new URL(url);
for (const { predicate, reader } of this.readers) {
if (predicate(parsed)) {
- return reader.readTree(url, options);
+ return await reader.readTree(url, options);
}
}
- if (this.fallback) {
- return this.fallback.readTree(url, options);
- }
-
- throw new Error(`No reader found that could handle '${url}'`);
+ throw new NotAllowedError(`Reading from '${url}' is not allowed`);
}
toString() {
- return `predicateMux{readers=${this.readers
- .map(t => t.reader)
- .join(',')},fallback=${this.fallback}}`;
+ return `predicateMux{readers=${this.readers.map(t => t.reader).join(',')}`;
}
}
diff --git a/packages/backend-common/src/reading/UrlReaders.ts b/packages/backend-common/src/reading/UrlReaders.ts
index 2bb5617907..2f233463bb 100644
--- a/packages/backend-common/src/reading/UrlReaders.ts
+++ b/packages/backend-common/src/reading/UrlReaders.ts
@@ -22,8 +22,8 @@ import { AzureUrlReader } from './AzureUrlReader';
import { BitbucketUrlReader } from './BitbucketUrlReader';
import { GithubUrlReader } from './GithubUrlReader';
import { GitlabUrlReader } from './GitlabUrlReader';
-import { FetchUrlReader } from './FetchUrlReader';
import { ReadTreeResponseFactory } from './tree';
+import { FetchUrlReader } from './FetchUrlReader';
type CreateOptions = {
/** Root config object */
@@ -32,8 +32,6 @@ type CreateOptions = {
logger: Logger;
/** A list of factories used to construct individual readers that match on URLs */
factories?: ReaderFactory[];
- /** Fallback reader to use if none of the readers created by the factories match */
- fallback?: UrlReader;
};
/**
@@ -43,13 +41,8 @@ export class UrlReaders {
/**
* Creates a UrlReader without any known types.
*/
- static create({
- logger,
- config,
- factories,
- fallback,
- }: CreateOptions): UrlReader {
- const mux = new UrlReaderPredicateMux({ fallback: fallback });
+ static create({ logger, config, factories }: CreateOptions): UrlReader {
+ const mux = new UrlReaderPredicateMux();
const treeResponseFactory = ReadTreeResponseFactory.create({ config });
for (const factory of factories ?? []) {
@@ -67,10 +60,8 @@ export class UrlReaders {
* Creates a UrlReader that includes all the default factories from this package.
*
* Any additional factories passed will be loaded before the default ones.
- *
- * If no fallback reader is passed, a plain fetch reader will be used.
*/
- static default({ logger, config, factories = [], fallback }: CreateOptions) {
+ static default({ logger, config, factories = [] }: CreateOptions) {
return UrlReaders.create({
logger,
config,
@@ -79,8 +70,8 @@ export class UrlReaders {
BitbucketUrlReader.factory,
GithubUrlReader.factory,
GitlabUrlReader.factory,
+ FetchUrlReader.factory,
]),
- fallback: fallback ?? new FetchUrlReader(),
});
}
}
diff --git a/packages/backend-common/src/reading/__fixtures__/backstage-mock-etag123.tar.gz b/packages/backend-common/src/reading/__fixtures__/backstage-mock-etag123.tar.gz
new file mode 100644
index 0000000000..e1ac2579de
Binary files /dev/null and b/packages/backend-common/src/reading/__fixtures__/backstage-mock-etag123.tar.gz differ
diff --git a/packages/backend-common/src/reading/__fixtures__/gitlab-archive.zip b/packages/backend-common/src/reading/__fixtures__/gitlab-archive.zip
new file mode 100644
index 0000000000..884ec20004
Binary files /dev/null and b/packages/backend-common/src/reading/__fixtures__/gitlab-archive.zip differ
diff --git a/packages/backend-common/src/reading/__fixtures__/mock-main.tar.gz b/packages/backend-common/src/reading/__fixtures__/mock-main.tar.gz
new file mode 100644
index 0000000000..291690b447
Binary files /dev/null and b/packages/backend-common/src/reading/__fixtures__/mock-main.tar.gz differ
diff --git a/packages/backend-common/src/reading/__fixtures__/mock-main.zip b/packages/backend-common/src/reading/__fixtures__/mock-main.zip
new file mode 100644
index 0000000000..beee59d3a0
Binary files /dev/null and b/packages/backend-common/src/reading/__fixtures__/mock-main.zip differ
diff --git a/packages/backend-common/src/reading/__fixtures__/repo.tar.gz b/packages/backend-common/src/reading/__fixtures__/repo.tar.gz
deleted file mode 100644
index 7a8e9902a2..0000000000
Binary files a/packages/backend-common/src/reading/__fixtures__/repo.tar.gz and /dev/null differ
diff --git a/packages/backend-common/src/reading/__fixtures__/repo.zip b/packages/backend-common/src/reading/__fixtures__/repo.zip
deleted file mode 100644
index f66bf2d612..0000000000
Binary files a/packages/backend-common/src/reading/__fixtures__/repo.zip and /dev/null differ
diff --git a/packages/backend-common/src/reading/tree/ReadTreeResponseFactory.ts b/packages/backend-common/src/reading/tree/ReadTreeResponseFactory.ts
index 986a0302bc..7332154d09 100644
--- a/packages/backend-common/src/reading/tree/ReadTreeResponseFactory.ts
+++ b/packages/backend-common/src/reading/tree/ReadTreeResponseFactory.ts
@@ -26,6 +26,8 @@ type FromArchiveOptions = {
stream: Readable;
// If set, the root of the tree will be set to the given directory path.
path?: string;
+ // etag of the blob
+ etag: string;
// Filter passed on from the ReadTreeOptions
filter?: (path: string) => boolean;
};
@@ -45,6 +47,7 @@ export class ReadTreeResponseFactory {
options.stream,
options.path ?? '',
this.workDir,
+ options.etag,
options.filter,
);
}
@@ -54,6 +57,7 @@ export class ReadTreeResponseFactory {
options.stream,
options.path ?? '',
this.workDir,
+ options.etag,
options.filter,
);
}
diff --git a/packages/backend-common/src/reading/tree/TarArchiveResponse.test.ts b/packages/backend-common/src/reading/tree/TarArchiveResponse.test.ts
index 1bc0d3a386..2cbfc4a89e 100644
--- a/packages/backend-common/src/reading/tree/TarArchiveResponse.test.ts
+++ b/packages/backend-common/src/reading/tree/TarArchiveResponse.test.ts
@@ -20,7 +20,7 @@ import { resolve as resolvePath } from 'path';
import { TarArchiveResponse } from './TarArchiveResponse';
const archiveData = fs.readFileSync(
- resolvePath(__filename, '../../__fixtures__/repo.tar.gz'),
+ resolvePath(__filename, '../../__fixtures__/mock-main.tar.gz'),
);
describe('TarArchiveResponse', () => {
@@ -38,7 +38,7 @@ describe('TarArchiveResponse', () => {
it('should read files', async () => {
const stream = fs.createReadStream('/test-archive.tar.gz');
- const res = new TarArchiveResponse(stream, 'mock-repo/', '/tmp');
+ const res = new TarArchiveResponse(stream, 'mock-main/', '/tmp', 'etag');
const files = await res.files();
expect(files).toEqual([
@@ -61,8 +61,12 @@ describe('TarArchiveResponse', () => {
it('should read files with filter', async () => {
const stream = fs.createReadStream('/test-archive.tar.gz');
- const res = new TarArchiveResponse(stream, 'mock-repo/', '/tmp', path =>
- path.endsWith('.yml'),
+ const res = new TarArchiveResponse(
+ stream,
+ 'mock-main/',
+ '/tmp',
+ 'etag',
+ path => path.endsWith('.yml'),
);
const files = await res.files();
@@ -79,14 +83,14 @@ describe('TarArchiveResponse', () => {
it('should read as archive and files', async () => {
const stream = fs.createReadStream('/test-archive.tar.gz');
- const res = new TarArchiveResponse(stream, 'mock-repo/', '/tmp');
+ const res = new TarArchiveResponse(stream, 'mock-main/', '/tmp', 'etag');
const buffer = await res.archive();
await expect(res.archive()).rejects.toThrow(
'Response has already been read',
);
- const res2 = new TarArchiveResponse(buffer, '', '/tmp');
+ const res2 = new TarArchiveResponse(buffer, '', '/tmp', 'etag');
const files = await res2.files();
expect(files).toEqual([
@@ -109,21 +113,26 @@ describe('TarArchiveResponse', () => {
it('should extract entire archive into directory', async () => {
const stream = fs.createReadStream('/test-archive.tar.gz');
- const res = new TarArchiveResponse(stream, '', '/tmp');
+ const res = new TarArchiveResponse(stream, '', '/tmp', 'etag');
const dir = await res.dir();
await expect(
- fs.readFile(resolvePath(dir, 'mock-repo/mkdocs.yml'), 'utf8'),
+ fs.readFile(resolvePath(dir, 'mock-main/mkdocs.yml'), 'utf8'),
).resolves.toBe('site_name: Test\n');
await expect(
- fs.readFile(resolvePath(dir, 'mock-repo/docs/index.md'), 'utf8'),
+ fs.readFile(resolvePath(dir, 'mock-main/docs/index.md'), 'utf8'),
).resolves.toBe('# Test\n');
});
it('should extract archive into directory with a subpath', async () => {
const stream = fs.createReadStream('/test-archive.tar.gz');
- const res = new TarArchiveResponse(stream, 'mock-repo/docs/', '/tmp');
+ const res = new TarArchiveResponse(
+ stream,
+ 'mock-main/docs/',
+ '/tmp',
+ 'etag',
+ );
const dir = await res.dir();
expect(dir).toMatch(/^[\/\\]tmp[\/\\].*$/);
@@ -135,8 +144,12 @@ describe('TarArchiveResponse', () => {
it('should extract archive into directory with a subpath and filter', async () => {
const stream = fs.createReadStream('/test-archive.tar.gz');
- const res = new TarArchiveResponse(stream, 'mock-repo/', '/tmp', path =>
- path.endsWith('.yml'),
+ const res = new TarArchiveResponse(
+ stream,
+ 'mock-main/',
+ '/tmp',
+ 'etag',
+ path => path.endsWith('.yml'),
);
const dir = await res.dir({ targetDir: '/tmp' });
diff --git a/packages/backend-common/src/reading/tree/TarArchiveResponse.ts b/packages/backend-common/src/reading/tree/TarArchiveResponse.ts
index 5d18ec7dc6..5927eb75a1 100644
--- a/packages/backend-common/src/reading/tree/TarArchiveResponse.ts
+++ b/packages/backend-common/src/reading/tree/TarArchiveResponse.ts
@@ -41,6 +41,7 @@ export class TarArchiveResponse implements ReadTreeResponse {
private readonly stream: Readable,
private readonly subPath: string,
private readonly workDir: string,
+ public readonly etag: string,
private readonly filter?: (path: string) => boolean,
) {
if (subPath) {
@@ -53,6 +54,8 @@ export class TarArchiveResponse implements ReadTreeResponse {
);
}
}
+
+ this.etag = etag;
}
// Make sure the input stream is only read once
diff --git a/packages/backend-common/src/reading/tree/ZipArchiveResponse.test.ts b/packages/backend-common/src/reading/tree/ZipArchiveResponse.test.ts
index 6c2592ffce..b42ec79d81 100644
--- a/packages/backend-common/src/reading/tree/ZipArchiveResponse.test.ts
+++ b/packages/backend-common/src/reading/tree/ZipArchiveResponse.test.ts
@@ -20,7 +20,7 @@ import { resolve as resolvePath } from 'path';
import { ZipArchiveResponse } from './ZipArchiveResponse';
const archiveData = fs.readFileSync(
- resolvePath(__filename, '../../__fixtures__/repo.zip'),
+ resolvePath(__filename, '../../__fixtures__/mock-main.zip'),
);
describe('ZipArchiveResponse', () => {
@@ -38,31 +38,35 @@ describe('ZipArchiveResponse', () => {
it('should read files', async () => {
const stream = fs.createReadStream('/test-archive.zip');
- const res = new ZipArchiveResponse(stream, 'mock-repo/', '/tmp');
+ const res = new ZipArchiveResponse(stream, 'mock-main/', '/tmp', 'etag');
const files = await res.files();
expect(files).toEqual([
{
- path: 'docs/index.md',
+ path: 'mkdocs.yml',
content: expect.any(Function),
},
{
- path: 'mkdocs.yml',
+ path: 'docs/index.md',
content: expect.any(Function),
},
]);
const contents = await Promise.all(files.map(f => f.content()));
expect(contents.map(c => c.toString('utf8').trim())).toEqual([
- '# Test',
'site_name: Test',
+ '# Test',
]);
});
it('should read files with filter', async () => {
const stream = fs.createReadStream('/test-archive.zip');
- const res = new ZipArchiveResponse(stream, 'mock-repo/', '/tmp', path =>
- path.endsWith('.yml'),
+ const res = new ZipArchiveResponse(
+ stream,
+ 'mock-main/',
+ '/tmp',
+ 'etag',
+ path => path.endsWith('.yml'),
);
const files = await res.files();
@@ -79,51 +83,56 @@ describe('ZipArchiveResponse', () => {
it('should read as archive and files', async () => {
const stream = fs.createReadStream('/test-archive.zip');
- const res = new ZipArchiveResponse(stream, 'mock-repo/', '/tmp');
+ const res = new ZipArchiveResponse(stream, 'mock-main/', '/tmp', 'etag');
const buffer = await res.archive();
await expect(res.archive()).rejects.toThrow(
'Response has already been read',
);
- const res2 = new ZipArchiveResponse(buffer, '', '/tmp');
+ const res2 = new ZipArchiveResponse(buffer, '', '/tmp', 'etag');
const files = await res2.files();
expect(files).toEqual([
{
- path: 'docs/index.md',
+ path: 'mkdocs.yml',
content: expect.any(Function),
},
{
- path: 'mkdocs.yml',
+ path: 'docs/index.md',
content: expect.any(Function),
},
]);
const contents = await Promise.all(files.map(f => f.content()));
expect(contents.map(c => c.toString('utf8').trim())).toEqual([
- '# Test',
'site_name: Test',
+ '# Test',
]);
});
it('should extract entire archive into directory', async () => {
const stream = fs.createReadStream('/test-archive.zip');
- const res = new ZipArchiveResponse(stream, '', '/tmp');
+ const res = new ZipArchiveResponse(stream, '', '/tmp', 'etag');
const dir = await res.dir();
await expect(
- fs.readFile(resolvePath(dir, 'mock-repo/mkdocs.yml'), 'utf8'),
+ fs.readFile(resolvePath(dir, 'mock-main/mkdocs.yml'), 'utf8'),
).resolves.toBe('site_name: Test\n');
await expect(
- fs.readFile(resolvePath(dir, 'mock-repo/docs/index.md'), 'utf8'),
+ fs.readFile(resolvePath(dir, 'mock-main/docs/index.md'), 'utf8'),
).resolves.toBe('# Test\n');
});
it('should extract archive into directory with a subpath', async () => {
const stream = fs.createReadStream('/test-archive.zip');
- const res = new ZipArchiveResponse(stream, 'mock-repo/docs/', '/tmp');
+ const res = new ZipArchiveResponse(
+ stream,
+ 'mock-main/docs/',
+ '/tmp',
+ 'etag',
+ );
const dir = await res.dir();
expect(dir).toMatch(/^[\/\\]tmp[\/\\].*$/);
@@ -135,8 +144,12 @@ describe('ZipArchiveResponse', () => {
it('should extract archive into directory with a subpath and filter', async () => {
const stream = fs.createReadStream('/test-archive.zip');
- const res = new ZipArchiveResponse(stream, 'mock-repo/', '/tmp', path =>
- path.endsWith('.yml'),
+ const res = new ZipArchiveResponse(
+ stream,
+ 'mock-main/',
+ '/tmp',
+ 'etag',
+ path => path.endsWith('.yml'),
);
const dir = await res.dir({ targetDir: '/tmp' });
diff --git a/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts b/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts
index 4106d49a11..07d34faaa3 100644
--- a/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts
+++ b/packages/backend-common/src/reading/tree/ZipArchiveResponse.ts
@@ -35,6 +35,7 @@ export class ZipArchiveResponse implements ReadTreeResponse {
private readonly stream: Readable,
private readonly subPath: string,
private readonly workDir: string,
+ public readonly etag: string,
private readonly filter?: (path: string) => boolean,
) {
if (subPath) {
@@ -47,6 +48,8 @@ export class ZipArchiveResponse implements ReadTreeResponse {
);
}
}
+
+ this.etag = etag;
}
// Make sure the input stream is only read once
diff --git a/packages/backend-common/src/reading/types.ts b/packages/backend-common/src/reading/types.ts
index f9dca3e1d5..e98f760d8f 100644
--- a/packages/backend-common/src/reading/types.ts
+++ b/packages/backend-common/src/reading/types.ts
@@ -32,6 +32,19 @@ export type ReadTreeOptions = {
* If no filter is provided all files are extracted.
*/
filter?(path: string): boolean;
+
+ /**
+ * An etag can be provided to check whether readTree's response has changed from a previous execution.
+ *
+ * In the readTree() response, an etag is returned along with the tree blob. The etag is a unique identifer
+ * of the tree blob, usually the commit SHA or etag from the target.
+ *
+ * When a etag is given in ReadTreeOptions, readTree will first compare the etag against the etag
+ * on the target branch. If they match, readTree will throw a NotModifiedError indicating that the readTree
+ * response will not differ from the previous response which included this particular etag. If they mismatch,
+ * readTree will return the rest of ReadTreeResponse along with a new etag.
+ */
+ etag?: string;
};
/**
@@ -70,5 +83,14 @@ export type ReadTreeResponseDirOptions = {
export type ReadTreeResponse = {
files(): Promise;
archive(): Promise;
+
+ /**
+ * dir() extracts the tree response into a directory and returns the path of the directory.
+ */
dir(options?: ReadTreeResponseDirOptions): Promise;
+
+ /**
+ * A unique identifer of the tree blob, usually the commit SHA or etag from the target.
+ */
+ etag: string;
};
diff --git a/packages/backend-common/src/service/lib/config.ts b/packages/backend-common/src/service/lib/config.ts
index 6abea97454..3a33675d5f 100644
--- a/packages/backend-common/src/service/lib/config.ts
+++ b/packages/backend-common/src/service/lib/config.ts
@@ -22,23 +22,8 @@ export type BaseOptions = {
listenHost?: string;
};
-export type CertificateOptions = {
- key?: CertificateKeyOptions;
- attributes?: CertificateAttributeOptions;
-};
-
-export type CertificateKeyOptions = {
- size?: number;
- algorithm?: string;
- days?: number;
-};
-
-export type CertificateAttributeOptions = {
- commonName?: string;
-};
-
export type HttpsSettings = {
- certificate: CertificateSigningOptions | CertificateReferenceOptions;
+ certificate: CertificateGenerationOptions | CertificateReferenceOptions;
};
export type CertificateReferenceOptions = {
@@ -46,11 +31,8 @@ export type CertificateReferenceOptions = {
cert: string;
};
-export type CertificateSigningOptions = {
- algorithm?: string;
- size?: number;
- days?: number;
- attributes: CertificateAttributes;
+export type CertificateGenerationOptions = {
+ hostname: string;
};
export type CertificateAttributes = {
@@ -193,23 +175,17 @@ export function readCspOptions(
* ```
*/
export function readHttpsSettings(config: Config): HttpsSettings | undefined {
- const https = config.get('https');
+ const https = config.getOptional('https');
if (https === true) {
const baseUrl = config.getString('baseUrl');
- let commonName;
+ let hostname;
try {
- commonName = new URL(baseUrl).hostname;
+ hostname = new URL(baseUrl).hostname;
} catch (error) {
throw new Error(`Invalid backend.baseUrl "${baseUrl}"`);
}
- return {
- certificate: {
- attributes: {
- commonName,
- },
- },
- };
+ return { certificate: { hostname } };
}
const cc = config.getOptionalConfig('https');
diff --git a/packages/backend-common/src/service/lib/hostFactory.ts b/packages/backend-common/src/service/lib/hostFactory.ts
index 656f160c31..db202a84ab 100644
--- a/packages/backend-common/src/service/lib/hostFactory.ts
+++ b/packages/backend-common/src/service/lib/hostFactory.ts
@@ -20,10 +20,12 @@ import express from 'express';
import * as http from 'http';
import * as https from 'https';
import { Logger } from 'winston';
-import { CertificateSigningOptions, HttpsSettings } from './config';
+import { HttpsSettings } from './config';
const ALMOST_MONTH_IN_MS = 25 * 24 * 60 * 60 * 1000;
+const IP_HOSTNAME_REGEX = /:|^\d+\.\d+\.\d+\.\d+$/;
+
/**
* Creates a Http server instance based on an Express application.
*
@@ -59,17 +61,17 @@ export async function createHttpsServer(
let credentials: { key: string | Buffer; cert: string | Buffer };
- const signingOptions: any = httpsSettings?.certificate;
-
- // TODO(Rugvip): remove support for generated certificate params and make this a more straightforward check
- if (signingOptions?.attributes) {
- credentials = await getGeneratedCertificate(signingOptions, logger);
+ if ('hostname' in httpsSettings?.certificate) {
+ credentials = await getGeneratedCertificate(
+ httpsSettings.certificate.hostname,
+ logger,
+ );
} else {
logger?.info('Loading certificate from config');
credentials = {
- key: signingOptions?.key,
- cert: signingOptions?.cert,
+ key: httpsSettings?.certificate?.key,
+ cert: httpsSettings?.certificate?.cert,
};
}
@@ -80,16 +82,7 @@ export async function createHttpsServer(
return https.createServer(credentials, app) as http.Server;
}
-async function getGeneratedCertificate(
- options: CertificateSigningOptions,
- logger?: Logger,
-) {
- if (options?.algorithm) {
- logger?.warn(
- 'Certificate generation configuration with parameters in backend.https.certificate is deprecated, set backend.https = true instead',
- );
- }
-
+async function getGeneratedCertificate(hostname: string, logger?: Logger) {
const hasModules = await fs.pathExists('node_modules');
let certPath;
if (hasModules) {
@@ -119,20 +112,61 @@ async function getGeneratedCertificate(
}
logger?.info('Generating new self-signed certificate');
- const newCert = await createCertificate(options);
+ const newCert = await createCertificate(hostname);
await fs.writeFile(certPath, newCert.cert + newCert.key, 'utf8');
return newCert;
}
-async function createCertificate(options: CertificateSigningOptions) {
- const attributes: Array = Object.entries(
- options.attributes,
- ).map(([name, value]) => ({ name, value }));
+async function createCertificate(hostname: string) {
+ const attributes = [
+ {
+ name: 'commonName',
+ value: 'dev-cert',
+ },
+ ];
+
+ const sans = [
+ {
+ type: 2, // DNS
+ value: 'localhost',
+ },
+ {
+ type: 2,
+ value: 'localhost.localdomain',
+ },
+ {
+ type: 2,
+ value: '[::1]',
+ },
+ {
+ type: 7, // IP
+ ip: '127.0.0.1',
+ },
+ {
+ type: 7,
+ ip: 'fe80::1',
+ },
+ ];
+
+ // Add hostname from backend.baseUrl if it doesn't already exist in our list of SANs
+ if (!sans.find(({ value, ip }) => value === hostname || ip === hostname)) {
+ sans.push(
+ IP_HOSTNAME_REGEX.test(hostname)
+ ? {
+ type: 7,
+ ip: hostname,
+ }
+ : {
+ type: 2,
+ value: hostname,
+ },
+ );
+ }
const params = {
- algorithm: options?.algorithm || 'sha256',
- keySize: options?.size || 2048,
- days: options?.days || 30,
+ algorithm: 'sha256',
+ keySize: 2048,
+ days: 30,
extensions: [
{
name: 'keyUsage',
@@ -151,36 +185,7 @@ async function createCertificate(options: CertificateSigningOptions) {
},
{
name: 'subjectAltName',
- altNames: [
- {
- type: 2, // DNS
- value: 'localhost',
- },
- {
- type: 2,
- value: 'localhost.localdomain',
- },
- {
- type: 2,
- value: '[::1]',
- },
- {
- type: 7, // IP
- ip: '127.0.0.1',
- },
- {
- type: 7,
- ip: 'fe80::1',
- },
- ...(options.attributes.commonName
- ? [
- {
- type: 2, // DNS
- value: options.attributes.commonName,
- },
- ]
- : []),
- ],
+ altNames: sans,
},
],
};
diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md
index 04cac6c2fc..1d840d8761 100644
--- a/packages/backend/CHANGELOG.md
+++ b/packages/backend/CHANGELOG.md
@@ -1,5 +1,77 @@
# example-backend
+## 0.2.12
+
+### Patch Changes
+
+- Updated dependencies [def2307f3]
+- Updated dependencies [d54857099]
+- Updated dependencies [0b135e7e0]
+- Updated dependencies [318a6af9f]
+- Updated dependencies [294a70cab]
+- Updated dependencies [ac7be581a]
+- Updated dependencies [0ea032763]
+- Updated dependencies [5345a1f98]
+- Updated dependencies [ed6baab66]
+- Updated dependencies [ad838c02f]
+- Updated dependencies [a5e27d5c1]
+- Updated dependencies [0643a3336]
+- Updated dependencies [a2291d7cc]
+- Updated dependencies [f9ba00a1c]
+- Updated dependencies [09a370426]
+- Updated dependencies [a93f42213]
+ - @backstage/catalog-model@0.7.0
+ - @backstage/plugin-catalog-backend@0.5.4
+ - @backstage/plugin-kubernetes-backend@0.2.5
+ - @backstage/backend-common@0.5.0
+ - @backstage/plugin-scaffolder-backend@0.5.0
+ - @backstage/plugin-techdocs-backend@0.5.4
+ - @backstage/plugin-auth-backend@0.2.11
+ - example-app@0.2.12
+ - @backstage/plugin-kafka-backend@0.1.1
+ - @backstage/plugin-app-backend@0.3.4
+ - @backstage/plugin-graphql-backend@0.1.5
+ - @backstage/plugin-proxy-backend@0.2.4
+ - @backstage/plugin-rollbar-backend@0.1.7
+
+## 0.2.11
+
+### Patch Changes
+
+- cc068c0d6: Bump the gitbeaker dependencies to 28.x.
+
+ To update your own installation, go through the `package.json` files of all of
+ your packages, and ensure that all dependencies on `@gitbeaker/node` or
+ `@gitbeaker/core` are at version `^28.0.2`. Then run `yarn install` at the root
+ of your repo.
+
+- Updated dependencies [68ad5af51]
+- Updated dependencies [5a9a7e7c2]
+- Updated dependencies [f3b064e1c]
+- Updated dependencies [94fdf4955]
+- Updated dependencies [cc068c0d6]
+- Updated dependencies [ade6b3bdf]
+- Updated dependencies [468579734]
+- Updated dependencies [cb7af51e7]
+- Updated dependencies [abbee6fff]
+- Updated dependencies [147fadcb9]
+- Updated dependencies [711ba55a2]
+ - @backstage/plugin-techdocs-backend@0.5.3
+ - @backstage/plugin-kubernetes-backend@0.2.4
+ - @backstage/catalog-model@0.6.1
+ - @backstage/plugin-catalog-backend@0.5.3
+ - @backstage/plugin-scaffolder-backend@0.4.1
+ - @backstage/plugin-auth-backend@0.2.10
+ - @backstage/backend-common@0.4.3
+
+## 0.2.10
+
+### Patch Changes
+
+- Updated dependencies [5eb8c9b9e]
+- Updated dependencies [7e3451700]
+ - @backstage/plugin-scaffolder-backend@0.4.0
+
## 0.2.8
### Patch Changes
diff --git a/packages/backend/package.json b/packages/backend/package.json
index 5c13ee94e2..269089a400 100644
--- a/packages/backend/package.json
+++ b/packages/backend/package.json
@@ -1,6 +1,6 @@
{
"name": "example-backend",
- "version": "0.2.8",
+ "version": "0.2.12",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -27,23 +27,24 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
- "@backstage/backend-common": "^0.4.1",
- "@backstage/catalog-model": "^0.6.0",
+ "@backstage/backend-common": "^0.5.0",
+ "@backstage/catalog-model": "^0.7.0",
"@backstage/config": "^0.1.2",
- "@backstage/plugin-app-backend": "^0.3.3",
- "@backstage/plugin-auth-backend": "^0.2.7",
- "@backstage/plugin-catalog-backend": "^0.5.1",
- "@backstage/plugin-graphql-backend": "^0.1.4",
- "@backstage/plugin-kubernetes-backend": "^0.2.3",
- "@backstage/plugin-proxy-backend": "^0.2.3",
- "@backstage/plugin-rollbar-backend": "^0.1.5",
- "@backstage/plugin-scaffolder-backend": "^0.3.6",
- "@backstage/plugin-techdocs-backend": "^0.5.0",
- "@gitbeaker/node": "^25.2.0",
- "@octokit/rest": "^18.0.0",
+ "@backstage/plugin-app-backend": "^0.3.4",
+ "@backstage/plugin-auth-backend": "^0.2.11",
+ "@backstage/plugin-catalog-backend": "^0.5.4",
+ "@backstage/plugin-graphql-backend": "^0.1.5",
+ "@backstage/plugin-kubernetes-backend": "^0.2.5",
+ "@backstage/plugin-kafka-backend": "^0.1.1",
+ "@backstage/plugin-proxy-backend": "^0.2.4",
+ "@backstage/plugin-rollbar-backend": "^0.1.7",
+ "@backstage/plugin-scaffolder-backend": "^0.5.0",
+ "@backstage/plugin-techdocs-backend": "^0.5.4",
+ "@gitbeaker/node": "^28.0.2",
+ "@octokit/rest": "^18.0.12",
"azure-devops-node-api": "^10.1.1",
"dockerode": "^3.2.1",
- "example-app": "^0.2.8",
+ "example-app": "^0.2.12",
"express": "^4.17.1",
"express-promise-router": "^3.0.3",
"knex": "^0.21.6",
@@ -53,11 +54,10 @@
"winston": "^3.2.1"
},
"devDependencies": {
- "@backstage/cli": "^0.4.3",
+ "@backstage/cli": "^0.4.7",
"@types/dockerode": "^3.2.1",
"@types/express": "^4.17.6",
- "@types/express-serve-static-core": "^4.17.5",
- "@types/helmet": "^0.0.48"
+ "@types/express-serve-static-core": "^4.17.5"
},
"files": [
"dist"
diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts
index 68cc170901..81d0bb96d2 100644
--- a/packages/backend/src/index.ts
+++ b/packages/backend/src/index.ts
@@ -38,6 +38,7 @@ import healthcheck from './plugins/healthcheck';
import auth from './plugins/auth';
import catalog from './plugins/catalog';
import kubernetes from './plugins/kubernetes';
+import kafka from './plugins/kafka';
import rollbar from './plugins/rollbar';
import scaffolder from './plugins/scaffolder';
import proxy from './plugins/proxy';
@@ -77,6 +78,7 @@ async function main() {
const rollbarEnv = useHotMemoize(module, () => createEnv('rollbar'));
const techdocsEnv = useHotMemoize(module, () => createEnv('techdocs'));
const kubernetesEnv = useHotMemoize(module, () => createEnv('kubernetes'));
+ const kafkaEnv = useHotMemoize(module, () => createEnv('kafka'));
const graphqlEnv = useHotMemoize(module, () => createEnv('graphql'));
const appEnv = useHotMemoize(module, () => createEnv('app'));
@@ -87,6 +89,7 @@ async function main() {
apiRouter.use('/auth', await auth(authEnv));
apiRouter.use('/techdocs', await techdocs(techdocsEnv));
apiRouter.use('/kubernetes', await kubernetes(kubernetesEnv));
+ apiRouter.use('/kafka', await kafka(kafkaEnv));
apiRouter.use('/proxy', await proxy(proxyEnv));
apiRouter.use('/graphql', await graphql(graphqlEnv));
apiRouter.use(notFoundHandler());
diff --git a/packages/backend/src/plugins/kafka.ts b/packages/backend/src/plugins/kafka.ts
new file mode 100644
index 0000000000..e65ce6719c
--- /dev/null
+++ b/packages/backend/src/plugins/kafka.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 } from '@backstage/plugin-kafka-backend';
+import { PluginEnvironment } from '../types';
+
+export default async function createPlugin({
+ logger,
+ config,
+}: PluginEnvironment) {
+ return await createRouter({ logger, config });
+}
diff --git a/packages/backend/src/plugins/scaffolder.ts b/packages/backend/src/plugins/scaffolder.ts
index 5d36d508a5..4e2257a46c 100644
--- a/packages/backend/src/plugins/scaffolder.ts
+++ b/packages/backend/src/plugins/scaffolder.ts
@@ -34,6 +34,7 @@ export default async function createPlugin({
const cookiecutterTemplater = new CookieCutter();
const craTemplater = new CreateReactAppTemplater();
const templaters = new Templaters();
+
templaters.register('cookiecutter', cookiecutterTemplater);
templaters.register('cra', craTemplater);
diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md
index c99f72e376..c8042b72e9 100644
--- a/packages/catalog-client/CHANGELOG.md
+++ b/packages/catalog-client/CHANGELOG.md
@@ -1,5 +1,13 @@
# @backstage/catalog-client
+## 0.3.5
+
+### Patch Changes
+
+- Updated dependencies [def2307f3]
+- Updated dependencies [a93f42213]
+ - @backstage/catalog-model@0.7.0
+
## 0.3.4
### Patch Changes
diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json
index c878119a35..0b68446463 100644
--- a/packages/catalog-client/package.json
+++ b/packages/catalog-client/package.json
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-client",
- "version": "0.3.4",
+ "version": "0.3.5",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -29,12 +29,12 @@
"clean": "backstage-cli clean"
},
"dependencies": {
- "@backstage/catalog-model": "^0.6.0",
+ "@backstage/catalog-model": "^0.7.0",
"@backstage/config": "^0.1.2",
"cross-fetch": "^3.0.6"
},
"devDependencies": {
- "@backstage/cli": "^0.4.2",
+ "@backstage/cli": "^0.4.7",
"@types/jest": "^26.0.7",
"msw": "^0.21.2"
},
diff --git a/packages/catalog-model/CHANGELOG.md b/packages/catalog-model/CHANGELOG.md
index f6c2477d6c..6a081c3336 100644
--- a/packages/catalog-model/CHANGELOG.md
+++ b/packages/catalog-model/CHANGELOG.md
@@ -1,5 +1,46 @@
# @backstage/catalog-model
+## 0.7.0
+
+### Minor Changes
+
+- a93f42213: The catalog no longer attempts to merge old and new annotations, when updating an entity from a remote location. This was a behavior that was copied from kubernetes, and catered to use cases where you wanted to use HTTP POST to update an entity in-place, outside of what the refresh loop does. This has proved to be a mistake, because as a side effect, the refresh loop effectively is unable to ever delete annotations when they are removed from source YAML. This is obviously a breaking change, but we believe that this is not a behavior that is relied upon in the wild, and it has never been an actually supported use flow of the catalog. We therefore choose to break the behavior outright, and instead just store updated annotations verbatim - just like we already do for example for labels
+
+### Patch Changes
+
+- def2307f3: Adds a `backstage.io/managed-by-origin-location` annotation to all entities. It links to the
+ location that was registered to the catalog and which emitted this entity. It has a different
+ semantic than the existing `backstage.io/managed-by-location` annotation, which tells the direct
+ parent location that created this entity.
+
+ Consider this example: The Backstage operator adds a location of type `github-org` in the
+ `app-config.yaml`. This setting will be added to a `bootstrap:boostrap` location. The processor
+ discovers the entities in the following branch
+ `Location bootstrap:bootstrap -> Location github-org:… -> User xyz`. The user `xyz` will be:
+
+ ```yaml
+ apiVersion: backstage.io/v1alpha1
+ kind: User
+ metadata:
+ name: xyz
+ annotations:
+ # This entity was added by the 'github-org:…' location
+ backstage.io/managed-by-location: github-org:…
+ # The entity was added because the 'bootstrap:boostrap' was added to the catalog
+ backstage.io/managed-by-origin-location: bootstrap:bootstrap
+ # ...
+ spec:
+ # ...
+ ```
+
+## 0.6.1
+
+### Patch Changes
+
+- f3b064e1c: Export the `schemaValidator` helper function.
+- abbee6fff: Implement System, Domain and Resource entity kinds.
+- 147fadcb9: Add subcomponentOf to Component kind to represent subsystems of larger components.
+
## 0.6.0
### Minor Changes
diff --git a/packages/catalog-model/examples/all-components.yaml b/packages/catalog-model/examples/all-components.yaml
index 5db5825b20..9471b810a1 100644
--- a/packages/catalog-model/examples/all-components.yaml
+++ b/packages/catalog-model/examples/all-components.yaml
@@ -15,4 +15,6 @@ spec:
- ./components/www-artist-component.yaml
- ./components/shuffle-api-component.yaml
- ./components/wayback-archive-component.yaml
+ - ./components/wayback-archive-ingestion-component.yaml
+ - ./components/wayback-archive-storage-component.yaml
- ./components/wayback-search-component.yaml
diff --git a/packages/catalog-model/examples/all-domains.yaml b/packages/catalog-model/examples/all-domains.yaml
new file mode 100644
index 0000000000..91a8a5b76d
--- /dev/null
+++ b/packages/catalog-model/examples/all-domains.yaml
@@ -0,0 +1,9 @@
+apiVersion: backstage.io/v1alpha1
+kind: Location
+metadata:
+ name: example-domains
+ description: A collection of all Backstage example domains
+spec:
+ targets:
+ - ./domains/artists-domain.yaml
+ - ./domains/playback-domain.yaml
diff --git a/packages/catalog-model/examples/all-resources.yaml b/packages/catalog-model/examples/all-resources.yaml
new file mode 100644
index 0000000000..d0986e3fe2
--- /dev/null
+++ b/packages/catalog-model/examples/all-resources.yaml
@@ -0,0 +1,8 @@
+apiVersion: backstage.io/v1alpha1
+kind: Location
+metadata:
+ name: example-resources
+ description: A collection of all Backstage example resources
+spec:
+ targets:
+ - ./resources/artists-db-resource.yaml
diff --git a/packages/catalog-model/examples/all-systems.yaml b/packages/catalog-model/examples/all-systems.yaml
new file mode 100644
index 0000000000..165bee54e5
--- /dev/null
+++ b/packages/catalog-model/examples/all-systems.yaml
@@ -0,0 +1,10 @@
+apiVersion: backstage.io/v1alpha1
+kind: Location
+metadata:
+ name: example-systems
+ description: A collection of all Backstage example systems
+spec:
+ targets:
+ - ./systems/artist-engagement-portal-system.yaml
+ - ./systems/audio-playback-system.yaml
+ - ./systems/podcast-system.yaml
diff --git a/packages/catalog-model/examples/components/artist-lookup-component.yaml b/packages/catalog-model/examples/components/artist-lookup-component.yaml
index 257344be3d..3fc516ece9 100644
--- a/packages/catalog-model/examples/components/artist-lookup-component.yaml
+++ b/packages/catalog-model/examples/components/artist-lookup-component.yaml
@@ -10,3 +10,4 @@ spec:
type: service
lifecycle: experimental
owner: team-a
+ system: artist-engagement-portal
diff --git a/packages/catalog-model/examples/components/playback-lib-component.yaml b/packages/catalog-model/examples/components/playback-lib-component.yaml
index f7d7670b5d..de7e93d38d 100644
--- a/packages/catalog-model/examples/components/playback-lib-component.yaml
+++ b/packages/catalog-model/examples/components/playback-lib-component.yaml
@@ -7,3 +7,4 @@ spec:
type: library
lifecycle: experimental
owner: team-c
+ system: audio-playback
diff --git a/packages/catalog-model/examples/components/playback-order-component.yaml b/packages/catalog-model/examples/components/playback-order-component.yaml
index c4f41b2b58..9146063886 100644
--- a/packages/catalog-model/examples/components/playback-order-component.yaml
+++ b/packages/catalog-model/examples/components/playback-order-component.yaml
@@ -10,3 +10,4 @@ spec:
type: service
lifecycle: production
owner: user:guest
+ system: audio-playback
diff --git a/packages/catalog-model/examples/components/podcast-api-component.yaml b/packages/catalog-model/examples/components/podcast-api-component.yaml
index b89ff48c48..30d254a00f 100644
--- a/packages/catalog-model/examples/components/podcast-api-component.yaml
+++ b/packages/catalog-model/examples/components/podcast-api-component.yaml
@@ -9,3 +9,4 @@ spec:
type: service
lifecycle: experimental
owner: team-b
+ system: podcast
diff --git a/packages/catalog-model/examples/components/queue-proxy-component.yaml b/packages/catalog-model/examples/components/queue-proxy-component.yaml
index 7f7fcbd527..a2d5ae5ea4 100644
--- a/packages/catalog-model/examples/components/queue-proxy-component.yaml
+++ b/packages/catalog-model/examples/components/queue-proxy-component.yaml
@@ -10,3 +10,4 @@ spec:
type: website
lifecycle: production
owner: team-b
+ system: podcast
diff --git a/packages/catalog-model/examples/components/shuffle-api-component.yaml b/packages/catalog-model/examples/components/shuffle-api-component.yaml
index 1c2da03511..6328ebdf3b 100644
--- a/packages/catalog-model/examples/components/shuffle-api-component.yaml
+++ b/packages/catalog-model/examples/components/shuffle-api-component.yaml
@@ -9,3 +9,4 @@ spec:
type: service
lifecycle: production
owner: user:guest
+ system: audio-playback
diff --git a/packages/catalog-model/examples/components/wayback-archive-ingestion-component.yaml b/packages/catalog-model/examples/components/wayback-archive-ingestion-component.yaml
new file mode 100644
index 0000000000..4f870ac831
--- /dev/null
+++ b/packages/catalog-model/examples/components/wayback-archive-ingestion-component.yaml
@@ -0,0 +1,10 @@
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+ name: wayback-archive-ingestion
+ description: Ingestion subsystem of the Wayback Archive
+spec:
+ type: service
+ lifecycle: production
+ owner: team-d
+ subcomponentOf: wayback-archive
diff --git a/packages/catalog-model/examples/components/wayback-archive-storage-component.yaml b/packages/catalog-model/examples/components/wayback-archive-storage-component.yaml
new file mode 100644
index 0000000000..78d67258d7
--- /dev/null
+++ b/packages/catalog-model/examples/components/wayback-archive-storage-component.yaml
@@ -0,0 +1,10 @@
+apiVersion: backstage.io/v1alpha1
+kind: Component
+metadata:
+ name: wayback-archive-storage
+ description: Storage subsystem of the Wayback Archive
+spec:
+ type: service
+ lifecycle: production
+ owner: team-a
+ subcomponentOf: wayback-archive
diff --git a/packages/catalog-model/examples/components/www-artist-component.yaml b/packages/catalog-model/examples/components/www-artist-component.yaml
index c333eb8c09..3acb6fc6a6 100644
--- a/packages/catalog-model/examples/components/www-artist-component.yaml
+++ b/packages/catalog-model/examples/components/www-artist-component.yaml
@@ -7,3 +7,4 @@ spec:
type: website
lifecycle: production
owner: team-a
+ system: artist-engagement-portal
diff --git a/packages/catalog-model/examples/domains/artists-domain.yaml b/packages/catalog-model/examples/domains/artists-domain.yaml
new file mode 100644
index 0000000000..7bcc4329dd
--- /dev/null
+++ b/packages/catalog-model/examples/domains/artists-domain.yaml
@@ -0,0 +1,7 @@
+apiVersion: backstage.io/v1alpha1
+kind: Domain
+metadata:
+ name: artists
+ description: Everything related to artists
+spec:
+ owner: team-a
diff --git a/packages/catalog-model/examples/domains/playback-domain.yaml b/packages/catalog-model/examples/domains/playback-domain.yaml
new file mode 100644
index 0000000000..c9933ebf5e
--- /dev/null
+++ b/packages/catalog-model/examples/domains/playback-domain.yaml
@@ -0,0 +1,7 @@
+apiVersion: backstage.io/v1alpha1
+kind: Domain
+metadata:
+ name: playback
+ description: Everything related to audio playback
+spec:
+ owner: user:frank.tiernan
diff --git a/packages/catalog-model/examples/resources/artists-db-resource.yaml b/packages/catalog-model/examples/resources/artists-db-resource.yaml
new file mode 100644
index 0000000000..a666e9b3fd
--- /dev/null
+++ b/packages/catalog-model/examples/resources/artists-db-resource.yaml
@@ -0,0 +1,9 @@
+apiVersion: backstage.io/v1alpha1
+kind: Resource
+metadata:
+ name: artists-db
+ description: Stores artist details
+spec:
+ type: database
+ owner: team-a
+ system: artist-engagement-portal
diff --git a/packages/catalog-model/examples/systems/artist-engagement-portal-system.yaml b/packages/catalog-model/examples/systems/artist-engagement-portal-system.yaml
new file mode 100644
index 0000000000..8de3c00880
--- /dev/null
+++ b/packages/catalog-model/examples/systems/artist-engagement-portal-system.yaml
@@ -0,0 +1,10 @@
+apiVersion: backstage.io/v1alpha1
+kind: System
+metadata:
+ name: artist-engagement-portal
+ description: Everything related to artists
+ tags:
+ - portal
+spec:
+ owner: team-a
+ domain: artists
diff --git a/packages/catalog-model/examples/systems/audio-playback-system.yaml b/packages/catalog-model/examples/systems/audio-playback-system.yaml
new file mode 100644
index 0000000000..7430ae2ff5
--- /dev/null
+++ b/packages/catalog-model/examples/systems/audio-playback-system.yaml
@@ -0,0 +1,8 @@
+apiVersion: backstage.io/v1alpha1
+kind: System
+metadata:
+ name: audio-playback
+ description: Audio playback system
+spec:
+ owner: team-c
+ domain: playback
diff --git a/packages/catalog-model/examples/systems/podcast-system.yaml b/packages/catalog-model/examples/systems/podcast-system.yaml
new file mode 100644
index 0000000000..47a2f7ac9f
--- /dev/null
+++ b/packages/catalog-model/examples/systems/podcast-system.yaml
@@ -0,0 +1,8 @@
+apiVersion: backstage.io/v1alpha1
+kind: System
+metadata:
+ name: podcast
+ description: Podcast playback
+spec:
+ owner: team-b
+ domain: playback
diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json
index 4fad95e122..e03ce8c465 100644
--- a/packages/catalog-model/package.json
+++ b/packages/catalog-model/package.json
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-model",
- "version": "0.6.0",
+ "version": "0.7.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -38,7 +38,7 @@
"yup": "^0.29.3"
},
"devDependencies": {
- "@backstage/cli": "^0.4.2",
+ "@backstage/cli": "^0.4.7",
"@types/express": "^4.17.6",
"@types/jest": "^26.0.7",
"@types/lodash": "^4.14.151",
diff --git a/packages/catalog-model/src/entity/util.test.ts b/packages/catalog-model/src/entity/util.test.ts
index e4399bbe05..c7e2c036b5 100644
--- a/packages/catalog-model/src/entity/util.test.ts
+++ b/packages/catalog-model/src/entity/util.test.ts
@@ -96,18 +96,12 @@ describe('util', () => {
b = lodash.cloneDeep(a);
b.metadata.labels.labelKey += 'a';
expect(entityHasChanges(a, b)).toBe(true);
- });
-
- it('detects annotation changes, but not removals', () => {
- let b: any = lodash.cloneDeep(a);
+ b = lodash.cloneDeep(a);
b.metadata.annotations.annotationKey += 'a';
expect(entityHasChanges(a, b)).toBe(true);
b = lodash.cloneDeep(a);
- b.metadata.annotations.n = 'n';
- expect(entityHasChanges(a, b)).toBe(true);
- b = lodash.cloneDeep(a);
delete b.metadata.annotations.annotationKey;
- expect(entityHasChanges(a, b)).toBe(false);
+ expect(entityHasChanges(a, b)).toBe(true);
});
it('detects spec changes', () => {
diff --git a/packages/catalog-model/src/entity/util.ts b/packages/catalog-model/src/entity/util.ts
index ed68339a99..2c63cc4c49 100644
--- a/packages/catalog-model/src/entity/util.ts
+++ b/packages/catalog-model/src/entity/util.ts
@@ -54,10 +54,6 @@ export function generateEntityEtag(): string {
* @param next The new state of the entity
*/
export function entityHasChanges(previous: Entity, next: Entity): boolean {
- if (entityHasAnnotationChanges(previous, next)) {
- return true;
- }
-
const e1 = lodash.cloneDeep(previous);
const e2 = lodash.cloneDeep(next);
@@ -67,6 +63,18 @@ export function entityHasChanges(previous: Entity, next: Entity): boolean {
if (!e2.metadata.labels) {
e2.metadata.labels = {};
}
+ if (!e1.metadata.annotations) {
+ e1.metadata.annotations = {};
+ }
+ if (!e2.metadata.annotations) {
+ e2.metadata.annotations = {};
+ }
+ if (!e1.metadata.tags) {
+ e1.metadata.tags = [];
+ }
+ if (!e2.metadata.tags) {
+ e2.metadata.tags = [];
+ }
// Remove generated fields
delete e1.metadata.uid;
@@ -76,10 +84,6 @@ export function entityHasChanges(previous: Entity, next: Entity): boolean {
delete e2.metadata.etag;
delete e2.metadata.generation;
- // Remove already compared things
- delete e1.metadata.annotations;
- delete e2.metadata.annotations;
-
// Remove things that we explicitly do not compare
delete e1.relations;
delete e2.relations;
@@ -106,14 +110,6 @@ export function generateUpdatedEntity(previous: Entity, next: Entity): Entity {
const result = lodash.cloneDeep(next);
- // Annotations are merged, with the new ones taking precedence
- if (previous.metadata.annotations) {
- next.metadata.annotations = {
- ...previous.metadata.annotations,
- ...next.metadata.annotations,
- };
- }
-
// Generated fields are copied and updated
const bumpEtag = entityHasChanges(previous, result);
const bumpGeneration = !lodash.isEqual(previous.spec, result.spec);
@@ -123,26 +119,3 @@ export function generateUpdatedEntity(previous: Entity, next: Entity): Entity {
return result;
}
-
-function entityHasAnnotationChanges(previous: Entity, next: Entity): boolean {
- // Since the next annotations get merged into the previous, extract only
- // the overlapping keys and check if their values match.
- if (next.metadata.annotations) {
- if (!previous.metadata.annotations) {
- return true;
- }
- if (
- !lodash.isEqual(
- next.metadata.annotations,
- lodash.pick(
- previous.metadata.annotations,
- Object.keys(next.metadata.annotations),
- ),
- )
- ) {
- return true;
- }
- }
-
- return false;
-}
diff --git a/packages/catalog-model/src/kinds/ApiEntityV1alpha1.test.ts b/packages/catalog-model/src/kinds/ApiEntityV1alpha1.test.ts
index a5d5152fab..a4d7d904cd 100644
--- a/packages/catalog-model/src/kinds/ApiEntityV1alpha1.test.ts
+++ b/packages/catalog-model/src/kinds/ApiEntityV1alpha1.test.ts
@@ -70,6 +70,7 @@ components:
items:
$ref: "#/components/schemas/Pet"
`,
+ system: 'system',
},
};
});
@@ -152,4 +153,19 @@ components:
(entity as any).spec.definition = '';
await expect(validator.check(entity)).rejects.toThrow(/definition/);
});
+
+ it('accepts missing system', async () => {
+ delete (entity as any).spec.system;
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('rejects wrong system', async () => {
+ (entity as any).spec.system = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/system/);
+ });
+
+ it('rejects empty system', async () => {
+ (entity as any).spec.system = '';
+ await expect(validator.check(entity)).rejects.toThrow(/system/);
+ });
});
diff --git a/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts b/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts
index 660cd71cd8..2c634ff091 100644
--- a/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts
+++ b/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts
@@ -30,6 +30,7 @@ const schema = yup.object>({
lifecycle: yup.string().required().min(1),
owner: yup.string().required().min(1),
definition: yup.string().required().min(1),
+ system: yup.string().notRequired().min(1),
})
.required(),
});
@@ -42,6 +43,7 @@ export interface ApiEntityV1alpha1 extends Entity {
lifecycle: string;
owner: string;
definition: string;
+ system?: string;
};
}
diff --git a/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.test.ts b/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.test.ts
index 030c99c151..9284a5d5b1 100644
--- a/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.test.ts
+++ b/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.test.ts
@@ -33,8 +33,10 @@ describe('ComponentV1alpha1Validator', () => {
type: 'service',
lifecycle: 'production',
owner: 'me',
+ subcomponentOf: 'monolith',
providesApis: ['api-0'],
consumesApis: ['api-0'],
+ system: 'system',
},
};
});
@@ -103,6 +105,21 @@ describe('ComponentV1alpha1Validator', () => {
await expect(validator.check(entity)).rejects.toThrow(/owner/);
});
+ it('accepts missing subcomponentOf', async () => {
+ delete (entity as any).spec.subcomponentOf;
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('rejects wrong subcomponentOf', async () => {
+ (entity as any).spec.subcomponentOf = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/subcomponentOf/);
+ });
+
+ it('rejects empty subcomponentOf', async () => {
+ (entity as any).spec.subcomponentOf = '';
+ await expect(validator.check(entity)).rejects.toThrow(/subcomponentOf/);
+ });
+
it('accepts missing providesApis', async () => {
delete (entity as any).spec.providesApis;
await expect(validator.check(entity)).resolves.toBe(true);
@@ -142,4 +159,19 @@ describe('ComponentV1alpha1Validator', () => {
(entity as any).spec.consumesApis = [];
await expect(validator.check(entity)).resolves.toBe(true);
});
+
+ it('accepts missing system', async () => {
+ delete (entity as any).spec.system;
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('rejects wrong system', async () => {
+ (entity as any).spec.system = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/system/);
+ });
+
+ it('rejects empty system', async () => {
+ (entity as any).spec.system = '';
+ await expect(validator.check(entity)).rejects.toThrow(/system/);
+ });
});
diff --git a/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts b/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts
index e511dcb24a..c55c48055a 100644
--- a/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts
+++ b/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts
@@ -29,8 +29,10 @@ const schema = yup.object>({
type: yup.string().required().min(1),
lifecycle: yup.string().required().min(1),
owner: yup.string().required().min(1),
+ subcomponentOf: yup.string().notRequired().min(1),
providesApis: yup.array(yup.string().required()).notRequired(),
consumesApis: yup.array(yup.string().required()).notRequired(),
+ system: yup.string().notRequired().min(1),
})
.required(),
});
@@ -42,8 +44,10 @@ export interface ComponentEntityV1alpha1 extends Entity {
type: string;
lifecycle: string;
owner: string;
+ subcomponentOf?: string;
providesApis?: string[];
consumesApis?: string[];
+ system?: string;
};
}
diff --git a/packages/catalog-model/src/kinds/DomainEntityV1alpha1.test.ts b/packages/catalog-model/src/kinds/DomainEntityV1alpha1.test.ts
new file mode 100644
index 0000000000..0e989f22ca
--- /dev/null
+++ b/packages/catalog-model/src/kinds/DomainEntityV1alpha1.test.ts
@@ -0,0 +1,71 @@
+/*
+ * 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 {
+ DomainEntityV1alpha1,
+ domainEntityV1alpha1Validator as validator,
+} from './DomainEntityV1alpha1';
+
+describe('DomainV1alpha1Validator', () => {
+ let entity: DomainEntityV1alpha1;
+
+ beforeEach(() => {
+ entity = {
+ apiVersion: 'backstage.io/v1alpha1',
+ kind: 'Domain',
+ metadata: {
+ name: 'test',
+ },
+ spec: {
+ owner: 'me',
+ },
+ };
+ });
+
+ it('happy path: accepts valid data', async () => {
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('silently accepts v1beta1 as well', async () => {
+ (entity as any).apiVersion = 'backstage.io/v1beta1';
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('ignores unknown apiVersion', async () => {
+ (entity as any).apiVersion = 'backstage.io/v1beta0';
+ await expect(validator.check(entity)).resolves.toBe(false);
+ });
+
+ it('ignores unknown kind', async () => {
+ (entity as any).kind = 'Wizard';
+ await expect(validator.check(entity)).resolves.toBe(false);
+ });
+
+ it('rejects missing owner', async () => {
+ delete (entity as any).spec.owner;
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('rejects wrong owner', async () => {
+ (entity as any).spec.owner = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('rejects empty owner', async () => {
+ (entity as any).spec.owner = '';
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+});
diff --git a/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts b/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts
new file mode 100644
index 0000000000..60b11aa124
--- /dev/null
+++ b/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts
@@ -0,0 +1,46 @@
+/*
+ * 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 * as yup from 'yup';
+import type { Entity } from '../entity/Entity';
+import { schemaValidator } from './util';
+
+const API_VERSION = ['backstage.io/v1alpha1', 'backstage.io/v1beta1'] as const;
+const KIND = 'Domain' as const;
+
+const schema = yup.object>({
+ apiVersion: yup.string().required().oneOf(API_VERSION),
+ kind: yup.string().required().equals([KIND]),
+ spec: yup
+ .object({
+ owner: yup.string().required().min(1),
+ })
+ .required(),
+});
+
+export interface DomainEntityV1alpha1 extends Entity {
+ apiVersion: typeof API_VERSION[number];
+ kind: typeof KIND;
+ spec: {
+ owner: string;
+ };
+}
+
+export const domainEntityV1alpha1Validator = schemaValidator(
+ KIND,
+ API_VERSION,
+ schema,
+);
diff --git a/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.test.ts b/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.test.ts
new file mode 100644
index 0000000000..ad8ea5cdf3
--- /dev/null
+++ b/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.test.ts
@@ -0,0 +1,103 @@
+/*
+ * 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 {
+ ResourceEntityV1alpha1,
+ resourceEntityV1alpha1Validator as validator,
+} from './ResourceEntityV1alpha1';
+
+describe('ResourceV1alpha1Validator', () => {
+ let entity: ResourceEntityV1alpha1;
+
+ beforeEach(() => {
+ entity = {
+ apiVersion: 'backstage.io/v1alpha1',
+ kind: 'Resource',
+ metadata: {
+ name: 'test',
+ },
+ spec: {
+ type: 'database',
+ owner: 'me',
+ system: 'system',
+ },
+ };
+ });
+
+ it('happy path: accepts valid data', async () => {
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('silently accepts v1beta1 as well', async () => {
+ (entity as any).apiVersion = 'backstage.io/v1beta1';
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('ignores unknown apiVersion', async () => {
+ (entity as any).apiVersion = 'backstage.io/v1beta0';
+ await expect(validator.check(entity)).resolves.toBe(false);
+ });
+
+ it('ignores unknown kind', async () => {
+ (entity as any).kind = 'Wizard';
+ await expect(validator.check(entity)).resolves.toBe(false);
+ });
+
+ it('rejects missing type', async () => {
+ delete (entity as any).spec.type;
+ await expect(validator.check(entity)).rejects.toThrow(/type/);
+ });
+
+ it('rejects wrong type', async () => {
+ (entity as any).spec.type = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/type/);
+ });
+
+ it('rejects empty type', async () => {
+ (entity as any).spec.type = '';
+ await expect(validator.check(entity)).rejects.toThrow(/type/);
+ });
+
+ it('rejects missing owner', async () => {
+ delete (entity as any).spec.owner;
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('rejects wrong owner', async () => {
+ (entity as any).spec.owner = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('rejects empty owner', async () => {
+ (entity as any).spec.owner = '';
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('accepts missing system', async () => {
+ delete (entity as any).spec.system;
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('rejects wrong system', async () => {
+ (entity as any).spec.system = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/system/);
+ });
+
+ it('rejects empty system', async () => {
+ (entity as any).spec.system = '';
+ await expect(validator.check(entity)).rejects.toThrow(/system/);
+ });
+});
diff --git a/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts b/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts
new file mode 100644
index 0000000000..12df7f6664
--- /dev/null
+++ b/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts
@@ -0,0 +1,50 @@
+/*
+ * 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 * as yup from 'yup';
+import type { Entity } from '../entity/Entity';
+import { schemaValidator } from './util';
+
+const API_VERSION = ['backstage.io/v1alpha1', 'backstage.io/v1beta1'] as const;
+const KIND = 'Resource' as const;
+
+const schema = yup.object>({
+ apiVersion: yup.string().required().oneOf(API_VERSION),
+ kind: yup.string().required().equals([KIND]),
+ spec: yup
+ .object({
+ type: yup.string().required().min(1),
+ owner: yup.string().required().min(1),
+ system: yup.string().notRequired().min(1),
+ })
+ .required(),
+});
+
+export interface ResourceEntityV1alpha1 extends Entity {
+ apiVersion: typeof API_VERSION[number];
+ kind: typeof KIND;
+ spec: {
+ type: string;
+ owner: string;
+ system?: string;
+ };
+}
+
+export const resourceEntityV1alpha1Validator = schemaValidator(
+ KIND,
+ API_VERSION,
+ schema,
+);
diff --git a/packages/catalog-model/src/kinds/SystemEntityV1alpha1.test.ts b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.test.ts
new file mode 100644
index 0000000000..7d744b7d0d
--- /dev/null
+++ b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.test.ts
@@ -0,0 +1,87 @@
+/*
+ * 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 {
+ SystemEntityV1alpha1,
+ systemEntityV1alpha1Validator as validator,
+} from './SystemEntityV1alpha1';
+
+describe('SystemV1alpha1Validator', () => {
+ let entity: SystemEntityV1alpha1;
+
+ beforeEach(() => {
+ entity = {
+ apiVersion: 'backstage.io/v1alpha1',
+ kind: 'System',
+ metadata: {
+ name: 'test',
+ },
+ spec: {
+ owner: 'me',
+ domain: 'domain',
+ },
+ };
+ });
+
+ it('happy path: accepts valid data', async () => {
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('silently accepts v1beta1 as well', async () => {
+ (entity as any).apiVersion = 'backstage.io/v1beta1';
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('ignores unknown apiVersion', async () => {
+ (entity as any).apiVersion = 'backstage.io/v1beta0';
+ await expect(validator.check(entity)).resolves.toBe(false);
+ });
+
+ it('ignores unknown kind', async () => {
+ (entity as any).kind = 'Wizard';
+ await expect(validator.check(entity)).resolves.toBe(false);
+ });
+
+ it('rejects missing owner', async () => {
+ delete (entity as any).spec.owner;
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('rejects wrong owner', async () => {
+ (entity as any).spec.owner = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('rejects empty owner', async () => {
+ (entity as any).spec.owner = '';
+ await expect(validator.check(entity)).rejects.toThrow(/owner/);
+ });
+
+ it('accepts missing domain', async () => {
+ delete (entity as any).spec.domain;
+ await expect(validator.check(entity)).resolves.toBe(true);
+ });
+
+ it('rejects wrong domain', async () => {
+ (entity as any).spec.domain = 7;
+ await expect(validator.check(entity)).rejects.toThrow(/domain/);
+ });
+
+ it('rejects empty domain', async () => {
+ (entity as any).spec.domain = '';
+ await expect(validator.check(entity)).rejects.toThrow(/domain/);
+ });
+});
diff --git a/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts
new file mode 100644
index 0000000000..764514efdd
--- /dev/null
+++ b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts
@@ -0,0 +1,48 @@
+/*
+ * 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 * as yup from 'yup';
+import type { Entity } from '../entity/Entity';
+import { schemaValidator } from './util';
+
+const API_VERSION = ['backstage.io/v1alpha1', 'backstage.io/v1beta1'] as const;
+const KIND = 'System' as const;
+
+const schema = yup.object>({
+ apiVersion: yup.string().required().oneOf(API_VERSION),
+ kind: yup.string().required().equals([KIND]),
+ spec: yup
+ .object({
+ owner: yup.string().required().min(1),
+ domain: yup.string().notRequired().min(1),
+ })
+ .required(),
+});
+
+export interface SystemEntityV1alpha1 extends Entity {
+ apiVersion: typeof API_VERSION[number];
+ kind: typeof KIND;
+ spec: {
+ owner: string;
+ domain?: string;
+ };
+}
+
+export const systemEntityV1alpha1Validator = schemaValidator(
+ KIND,
+ API_VERSION,
+ schema,
+);
diff --git a/packages/catalog-model/src/kinds/index.ts b/packages/catalog-model/src/kinds/index.ts
index 914d7efea7..bc157c79df 100644
--- a/packages/catalog-model/src/kinds/index.ts
+++ b/packages/catalog-model/src/kinds/index.ts
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+export { schemaValidator } from './util';
+export type { KindValidator } from './types';
export { apiEntityV1alpha1Validator } from './ApiEntityV1alpha1';
export type {
ApiEntityV1alpha1 as ApiEntity,
@@ -24,6 +26,11 @@ export type {
ComponentEntityV1alpha1 as ComponentEntity,
ComponentEntityV1alpha1,
} from './ComponentEntityV1alpha1';
+export { domainEntityV1alpha1Validator } from './DomainEntityV1alpha1';
+export type {
+ DomainEntityV1alpha1 as DomainEntity,
+ DomainEntityV1alpha1,
+} from './DomainEntityV1alpha1';
export { groupEntityV1alpha1Validator } from './GroupEntityV1alpha1';
export type {
GroupEntityV1alpha1 as GroupEntity,
@@ -35,12 +42,21 @@ export type {
LocationEntityV1alpha1,
} from './LocationEntityV1alpha1';
export * from './relations';
+export { resourceEntityV1alpha1Validator } from './ResourceEntityV1alpha1';
+export type {
+ ResourceEntityV1alpha1 as ResourceEntity,
+ ResourceEntityV1alpha1,
+} from './ResourceEntityV1alpha1';
+export { systemEntityV1alpha1Validator } from './SystemEntityV1alpha1';
+export type {
+ SystemEntityV1alpha1 as SystemEntity,
+ SystemEntityV1alpha1,
+} from './SystemEntityV1alpha1';
export { templateEntityV1alpha1Validator } from './TemplateEntityV1alpha1';
export type {
TemplateEntityV1alpha1 as TemplateEntity,
TemplateEntityV1alpha1,
} from './TemplateEntityV1alpha1';
-export type { KindValidator } from './types';
export { userEntityV1alpha1Validator } from './UserEntityV1alpha1';
export type {
UserEntityV1alpha1 as UserEntity,
diff --git a/packages/catalog-model/src/kinds/relations.ts b/packages/catalog-model/src/kinds/relations.ts
index 3d5d629b9e..8ad5017fba 100644
--- a/packages/catalog-model/src/kinds/relations.ts
+++ b/packages/catalog-model/src/kinds/relations.ts
@@ -30,7 +30,7 @@ export const RELATION_OWNED_BY = 'ownedBy';
export const RELATION_OWNER_OF = 'ownerOf';
/**
- * A relation with an API entity, typically from a component or system
+ * A relation with an API entity, typically from a component
*/
export const RELATION_CONSUMES_API = 'consumesApi';
export const RELATION_API_CONSUMED_BY = 'apiConsumedBy';
@@ -55,3 +55,10 @@ export const RELATION_CHILD_OF = 'childOf';
*/
export const RELATION_MEMBER_OF = 'memberOf';
export const RELATION_HAS_MEMBER = 'hasMember';
+
+/**
+ * A part/whole relation, typically for components in a system and systems
+ * in a domain.
+ */
+export const RELATION_PART_OF = 'partOf';
+export const RELATION_HAS_PART = 'hasPart';
diff --git a/packages/catalog-model/src/location/annotation.ts b/packages/catalog-model/src/location/annotation.ts
index 371d095685..93f2fabea4 100644
--- a/packages/catalog-model/src/location/annotation.ts
+++ b/packages/catalog-model/src/location/annotation.ts
@@ -15,3 +15,5 @@
*/
export const LOCATION_ANNOTATION = 'backstage.io/managed-by-location';
+export const ORIGIN_LOCATION_ANNOTATION =
+ 'backstage.io/managed-by-origin-location';
diff --git a/packages/catalog-model/src/location/index.ts b/packages/catalog-model/src/location/index.ts
index ce64b988a6..8fd516120a 100644
--- a/packages/catalog-model/src/location/index.ts
+++ b/packages/catalog-model/src/location/index.ts
@@ -20,4 +20,4 @@ export {
locationSpecSchema,
analyzeLocationSchema,
} from './validation';
-export { LOCATION_ANNOTATION } from './annotation';
+export { LOCATION_ANNOTATION, ORIGIN_LOCATION_ANNOTATION } from './annotation';
diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md
index d88220cc23..7998d408e0 100644
--- a/packages/cli/CHANGELOG.md
+++ b/packages/cli/CHANGELOG.md
@@ -1,5 +1,30 @@
# @backstage/cli
+## 0.4.7
+
+### Patch Changes
+
+- b604a9d41: Append `-credentials.yaml` to credentials file generated by `backstage-cli create-github-app` and display warning about sensitive contents.
+
+## 0.4.6
+
+### Patch Changes
+
+- 94fdf4955: Get rid of all usages of @octokit/types, and bump the rest of the octokit dependencies to the latest version
+- 08e9893d2: Handle no npm info
+- 9cf71f8bf: Added experimental `create-github-app` command.
+
+## 0.4.5
+
+### Patch Changes
+
+- 37a7d26c4: Use consistent file extensions for JS output when building packages.
+- 818d45e94: Fix detection of external package child directories
+- 0588be01f: Add `backend:bundle` command for bundling a backend package with dependencies into a deployment archive.
+- b8abdda57: Add color to output from `versions:bump` in order to make it easier to spot changes. Also highlight possible breaking changes and link to changelogs.
+- Updated dependencies [ad5c56fd9]
+ - @backstage/config-loader@0.4.1
+
## 0.4.4
### Patch Changes
@@ -10,7 +35,7 @@
### Patch Changes
-- 19554f6d6: Added Github Actions for Create React App, and allow better imports of files inside a module when they're exposed using `files` in `package.json`
+- 19554f6d6: Added GitHub Actions for Create React App, and allow better imports of files inside a module when they're exposed using `files` in `package.json`
- 7d72f9b09: Fix for `app.listen.host` configuration not properly overriding listening host.
## 0.4.2
diff --git a/packages/cli/config/eslint.backend.js b/packages/cli/config/eslint.backend.js
index 67f0a49b9f..7acb538d38 100644
--- a/packages/cli/config/eslint.backend.js
+++ b/packages/cli/config/eslint.backend.js
@@ -34,12 +34,12 @@ module.exports = {
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
+ lib: require('./tsconfig.json').compilerOptions.lib,
},
ignorePatterns: ['.eslintrc.js', '**/dist/**', '**/dist-types/**'],
rules: {
- // TODO(Rugvip): We need to bump @typescript-eslint to v4 to enable these
- '@typescript-eslint/no-shadow': 0,
- '@typescript-eslint/no-redeclare': 0,
+ '@typescript-eslint/no-shadow': 'off',
+ '@typescript-eslint/no-redeclare': 'off',
'no-console': 0, // Permitted in console programs
'new-cap': ['error', { capIsNew: false }], // Because Express constructs things e.g. like 'const r = express.Router()'
@@ -79,6 +79,13 @@ module.exports = {
],
},
overrides: [
+ {
+ files: ['**/*.ts?(x)'],
+ rules: {
+ '@typescript-eslint/no-unused-vars': 'off',
+ 'no-undef': 'off',
+ },
+ },
{
files: ['*.test.*', 'src/setupTests.*', 'dev/**'],
rules: {
diff --git a/packages/cli/config/eslint.js b/packages/cli/config/eslint.js
index e2a807e42e..044d737d15 100644
--- a/packages/cli/config/eslint.js
+++ b/packages/cli/config/eslint.js
@@ -32,7 +32,11 @@ module.exports = {
},
parserOptions: {
ecmaVersion: 2018,
+ ecmaFeatures: {
+ jsx: true,
+ },
sourceType: 'module',
+ lib: require('./tsconfig.json').compilerOptions.lib,
},
settings: {
react: {
@@ -41,10 +45,9 @@ module.exports = {
},
ignorePatterns: ['.eslintrc.js', '**/dist/**', '**/dist-types/**'],
rules: {
- // TODO(Rugvip): We need to bump @typescript-eslint to v4 to enable these
- '@typescript-eslint/no-shadow': 0,
- '@typescript-eslint/no-redeclare': 0,
-
+ '@typescript-eslint/no-shadow': 'off',
+ '@typescript-eslint/no-redeclare': 'off',
+ 'no-undef': 'off',
'import/newline-after-import': 'error',
'import/no-duplicates': 'warn',
'import/no-extraneous-dependencies': [
@@ -90,6 +93,8 @@ module.exports = {
rules: {
// Default to not enforcing prop-types in typescript
'react/prop-types': 0,
+ '@typescript-eslint/no-unused-vars': 'off',
+ 'no-undef': 'off',
},
},
{
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 6da871e74c..0d1605f752 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.4.4",
+ "version": "0.4.7",
"private": false,
"publishConfig": {
"access": "public"
@@ -30,10 +30,11 @@
"dependencies": {
"@backstage/cli-common": "^0.1.1",
"@backstage/config": "^0.1.2",
- "@backstage/config-loader": "^0.4.0",
+ "@backstage/config-loader": "^0.4.1",
"@hot-loader/react-dom": "^16.13.0",
"@lerna/package-graph": "^3.18.5",
"@lerna/project": "^3.18.0",
+ "@octokit/request": "^5.4.12",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^9.0.0",
@@ -49,8 +50,8 @@
"@types/start-server-webpack-plugin": "^2.2.0",
"@types/webpack-env": "^1.15.2",
"@types/webpack-node-externals": "^2.5.0",
- "@typescript-eslint/eslint-plugin": "^v3.10.1",
- "@typescript-eslint/parser": "^v3.10.1",
+ "@typescript-eslint/eslint-plugin": "^v4.14.0",
+ "@typescript-eslint/parser": "^v4.14.0",
"@yarnpkg/lockfile": "^1.1.0",
"bfj": "^7.0.2",
"chalk": "^4.0.0",
@@ -69,6 +70,7 @@
"eslint-plugin-monorepo": "^0.3.2",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^4.0.0",
+ "express": "^4.17.1",
"fork-ts-checker-webpack-plugin": "^4.0.5",
"fs-extra": "^9.0.0",
"handlebars": "^4.7.3",
@@ -111,13 +113,14 @@
"yn": "^4.0.0"
},
"devDependencies": {
- "@backstage/backend-common": "^0.4.1",
+ "@backstage/backend-common": "^0.5.0",
"@backstage/config": "^0.1.2",
- "@backstage/core": "^0.4.3",
- "@backstage/dev-utils": "^0.1.7",
+ "@backstage/core": "^0.5.0",
+ "@backstage/dev-utils": "^0.1.8",
"@backstage/test-utils": "^0.1.6",
"@backstage/theme": "^0.2.2",
"@types/diff": "^4.0.2",
+ "@types/express": "^4.17.6",
"@types/fs-extra": "^9.0.1",
"@types/html-webpack-plugin": "^3.2.2",
"@types/http-proxy": "^1.17.4",
@@ -125,7 +128,6 @@
"@types/mini-css-extract-plugin": "^0.9.1",
"@types/mock-fs": "^4.13.0",
"@types/node": "^13.7.2",
- "@types/ora": "^3.2.0",
"@types/react-dev-utils": "^9.0.4",
"@types/recursive-readdir": "^2.2.0",
"@types/rollup-plugin-peer-deps-external": "^2.2.0",
diff --git a/packages/cli/src/commands/backend/bundle.ts b/packages/cli/src/commands/backend/bundle.ts
index 4d298f3735..25322045e1 100644
--- a/packages/cli/src/commands/backend/bundle.ts
+++ b/packages/cli/src/commands/backend/bundle.ts
@@ -38,7 +38,7 @@ export default async (cmd: Command) => {
try {
await createDistWorkspace([pkg.name], {
targetDir: tmpDir,
- buildDependencies: Boolean(cmd.build),
+ buildDependencies: Boolean(cmd.buildDependencies),
buildExcludes: [pkg.name],
parallel: parseParallel(process.env[PARALLEL_ENV_VAR]),
skeleton: SKELETON_FILE,
diff --git a/packages/cli/src/commands/config/print.ts b/packages/cli/src/commands/config/print.ts
index 8be88adce7..56dcd3f753 100644
--- a/packages/cli/src/commands/config/print.ts
+++ b/packages/cli/src/commands/config/print.ts
@@ -24,6 +24,7 @@ export default async (cmd: Command) => {
const { schema, appConfigs } = await loadCliConfig({
args: cmd.config,
fromPackage: cmd.package,
+ mockEnv: cmd.lax,
});
const visibility = getVisibilityOption(cmd);
const data = serializeConfigData(appConfigs, schema, visibility);
diff --git a/packages/cli/src/commands/config/validate.ts b/packages/cli/src/commands/config/validate.ts
index 581e4bae43..37f41164af 100644
--- a/packages/cli/src/commands/config/validate.ts
+++ b/packages/cli/src/commands/config/validate.ts
@@ -21,5 +21,6 @@ export default async (cmd: Command) => {
await loadCliConfig({
args: cmd.config,
fromPackage: cmd.package,
+ mockEnv: cmd.lax,
});
};
diff --git a/packages/cli/src/commands/create-github-app/GithubCreateAppServer.ts b/packages/cli/src/commands/create-github-app/GithubCreateAppServer.ts
new file mode 100644
index 0000000000..45671c2ead
--- /dev/null
+++ b/packages/cli/src/commands/create-github-app/GithubCreateAppServer.ts
@@ -0,0 +1,148 @@
+/*
+ * 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 crypto from 'crypto';
+import openBrowser from 'react-dev-utils/openBrowser';
+import { request } from '@octokit/request';
+import express, { Express, Request, Response } from 'express';
+
+const MANIFEST_DATA = {
+ default_events: ['create', 'delete', 'push', 'repository'],
+ default_permissions: {
+ contents: 'read',
+ metadata: 'read',
+ },
+ name: 'Backstage-',
+ url: 'https://backstage.io',
+ description: 'GitHub App for Backstage',
+ public: false,
+};
+
+const FORM_PAGE = `
+
+
+
+
+
+
+`;
+
+type GithubAppConfig = {
+ appId: number;
+ slug?: string;
+ name?: string;
+ webhookUrl?: string;
+ clientId: string;
+ clientSecret: string;
+ webhookSecret: string;
+ privateKey: string;
+};
+
+export class GithubCreateAppServer {
+ private baseUrl?: string;
+ private webhookUrl?: string;
+
+ static async run({ org }: { org: string }): Promise {
+ const encodedOrg = encodeURIComponent(org);
+ const actionUrl = `https://github.com/organizations/${encodedOrg}/settings/apps/new`;
+ const server = new GithubCreateAppServer(actionUrl);
+ return server.start();
+ }
+
+ constructor(private readonly actionUrl: string) {
+ const webhookId = crypto
+ .randomBytes(15)
+ .toString('base64')
+ .replace(/[\+\/]/g, '');
+
+ this.webhookUrl = `https://smee.io/${webhookId}`;
+ }
+
+ private async start(): Promise {
+ const app = express();
+
+ app.get('/', this.formHandler);
+
+ const callPromise = new Promise((resolve, reject) => {
+ app.get('/callback', (req, res) => {
+ request(
+ `POST /app-manifests/${encodeURIComponent(
+ req.query.code as string,
+ )}/conversions`,
+ ).then(({ data }) => {
+ resolve({
+ name: data.name,
+ slug: data.slug,
+ appId: data.id,
+ webhookUrl: this.webhookUrl,
+ clientId: data.client_id,
+ clientSecret: data.client_secret,
+ webhookSecret: data.webhook_secret,
+ privateKey: data.pem,
+ });
+ res.redirect(302, `${data.html_url}/installations/new`);
+ }, reject);
+ });
+ });
+
+ this.baseUrl = await this.listen(app);
+
+ openBrowser(this.baseUrl);
+
+ return callPromise;
+ }
+
+ private formHandler = (_req: Request, res: Response) => {
+ const baseUrl = this.baseUrl;
+ if (!baseUrl) {
+ throw new Error('baseUrl is not set');
+ }
+ const manifest = {
+ ...MANIFEST_DATA,
+ redirect_url: `${baseUrl}/callback`,
+ hook_attributes: {
+ url: this.webhookUrl,
+ },
+ };
+ const manifestJson = JSON.stringify(manifest).replace(/\"/g, '"');
+
+ let body = FORM_PAGE;
+ body = body.replace('MANIFEST_JSON', manifestJson);
+ body = body.replace('ACTION_URL', this.actionUrl);
+
+ res.setHeader('content-type', 'text/html');
+ res.send(body);
+ };
+
+ private async listen(app: Express) {
+ return new Promise((resolve, reject) => {
+ const listener = app.listen(0, () => {
+ const info = listener.address();
+ if (typeof info !== 'object' || info === null) {
+ reject(new Error(`Unexpected listener info '${info}'`));
+ return;
+ }
+ const { port } = info;
+ resolve(`http://localhost:${port}`);
+ });
+ });
+ }
+}
diff --git a/packages/cli/src/commands/create-github-app/index.ts b/packages/cli/src/commands/create-github-app/index.ts
new file mode 100644
index 0000000000..cd9e8dbe09
--- /dev/null
+++ b/packages/cli/src/commands/create-github-app/index.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 fs from 'fs-extra';
+import chalk from 'chalk';
+import { stringify as stringifyYaml } from 'yaml';
+import { paths } from '../../lib/paths';
+import { GithubCreateAppServer } from './GithubCreateAppServer';
+
+// This is an experimental command that at this point does not support GitHub Enterprise
+// due to lacking support for creating apps from manifests.
+// https://docs.github.com/en/free-pro-team@latest/developers/apps/creating-a-github-app-from-a-manifest
+export default async (org: string) => {
+ const { slug, name, ...config } = await GithubCreateAppServer.run({ org });
+
+ const fileName = `github-app-${slug}-credentials.yaml`;
+ const content = `# Name: ${name}\n${stringifyYaml(config)}`;
+ await fs.writeFile(paths.resolveTargetRoot(fileName), content);
+ console.log(`GitHub App configuration written to ${chalk.cyan(fileName)}`);
+ console.log(
+ chalk.yellow(
+ 'This file contains sensitive credentials, it should not be committed to version control and handled with care!',
+ ),
+ );
+ // TODO: log instructions on how to use the newly created app configuration.
+};
diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts
index e090c454f9..1d267c6889 100644
--- a/packages/cli/src/commands/index.ts
+++ b/packages/cli/src/commands/index.ts
@@ -45,9 +45,12 @@ export function registerCommands(program: CommanderStatic) {
.action(lazy(() => import('./backend/build').then(m => m.default)));
program
- .command('backend:__experimental__bundle__', { hidden: true })
- .description('Bundle all backend packages into dist-workspace')
- .option('--build', 'Build packages before packing them into the image')
+ .command('backend:bundle')
+ .description('Bundle the backend into a deployment archive')
+ .option(
+ '--build-dependencies',
+ 'Build all local package dependencies before bundling the backend',
+ )
.action(lazy(() => import('./backend/bundle').then(m => m.default)));
program
@@ -150,6 +153,7 @@ export function registerCommands(program: CommanderStatic) {
'--package ',
'Only load config schema that applies to the given package',
)
+ .option('--lax', 'Do not require environment variables to be set')
.option('--frontend', 'Print only the frontend configuration')
.option('--with-secrets', 'Include secrets in the printed configuration')
.option(
@@ -166,6 +170,7 @@ export function registerCommands(program: CommanderStatic) {
'--package ',
'Only load config schema that applies to the given package',
)
+ .option('--lax', 'Do not require environment variables to be set')
.option(...configOption)
.description(
'Validate that the given configuration loads and matches schema',
@@ -202,6 +207,13 @@ export function registerCommands(program: CommanderStatic) {
.command('build-workspace ...')
.description('Builds a temporary dist workspace from the provided packages')
.action(lazy(() => import('./buildWorkspace').then(m => m.default)));
+
+ program
+ .command('create-github-app ', { hidden: true })
+ .description(
+ 'Create new GitHub App in your organization. This command is experimental and may change in the future.',
+ )
+ .action(lazy(() => import('./create-github-app').then(m => m.default)));
}
// Wraps an action function so that it always exits and handles errors
@@ -212,6 +224,7 @@ function lazy(
try {
const actionFunc = await getActionFunc();
await actionFunc(...args);
+
process.exit(0);
} catch (error) {
exitWithError(error);
diff --git a/packages/cli/src/commands/versions/bump.test.ts b/packages/cli/src/commands/versions/bump.test.ts
index 1325f0e2fd..987d4f6f31 100644
--- a/packages/cli/src/commands/versions/bump.test.ts
+++ b/packages/cli/src/commands/versions/bump.test.ts
@@ -23,6 +23,15 @@ import * as runObj from '../../lib/run';
import bump from './bump';
import { withLogCollector } from '@backstage/test-utils';
+// Remove log coloring to simplify log matching
+jest.mock('chalk', () => ({
+ blue: (str: string) => str,
+ cyan: (str: string) => str,
+ green: (str: string) => str,
+ magenta: (str: string) => str,
+ yellow: (str: string) => str,
+}));
+
const REGISTRY_VERSIONS: { [name: string]: string } = {
'@backstage/core': '1.0.6',
'@backstage/core-api': '1.0.7',
@@ -121,11 +130,15 @@ describe('bump', () => {
'Checking for updates of @backstage/core',
'Checking for updates of @backstage/core-api',
'Some packages are outdated, updating',
- 'Removing lockfile entry for @backstage/core@^1.0.3 to bump to 1.0.6',
- 'Removing lockfile entry for @backstage/core-api@^1.0.6 to bump to 1.0.7',
- 'Removing lockfile entry for @backstage/core-api@^1.0.3 to bump to 1.0.7',
- 'Bumping @backstage/theme in b to ^2.0.0',
- "Running 'yarn install' to install new versions",
+ 'unlocking @backstage/core@^1.0.3 ~> 1.0.6',
+ 'unlocking @backstage/core-api@^1.0.6 ~> 1.0.7',
+ 'unlocking @backstage/core-api@^1.0.3 ~> 1.0.7',
+ 'bumping @backstage/theme in b to ^2.0.0',
+ 'Running yarn install to install new versions',
+ '⚠️ The following packages may have breaking changes:',
+ ' @backstage/theme',
+ ' https://github.com/backstage/backstage/blob/master/packages/theme/CHANGELOG.md',
+ 'Version bump complete!',
]);
expect(runObj.runPlain).toHaveBeenCalledTimes(3);
@@ -164,4 +177,71 @@ describe('bump', () => {
},
});
});
+
+ it('should ignore not found packages', async () => {
+ // Make sure all modules involved in package discovery are in the module cache before we mock fs
+ await mapDependencies(paths.targetDir);
+ mockFs({
+ '/yarn.lock': lockfileMockResult,
+ '/lerna.json': JSON.stringify({
+ packages: ['packages/*'],
+ }),
+ '/packages/a/package.json': JSON.stringify({
+ name: 'a',
+ dependencies: {
+ '@backstage/core': '^1.0.5',
+ },
+ }),
+ '/packages/b/package.json': JSON.stringify({
+ name: 'b',
+ dependencies: {
+ '@backstage/core': '^1.0.3',
+ '@backstage/theme': '^2.0.0',
+ },
+ }),
+ });
+
+ paths.targetDir = '/';
+ jest
+ .spyOn(paths, 'resolveTargetRoot')
+ .mockImplementation((...paths) => resolvePath('/', ...paths));
+ jest.spyOn(runObj, 'runPlain').mockImplementation(async () => '');
+ jest.spyOn(runObj, 'run').mockResolvedValue(undefined);
+
+ const { log: logs } = await withLogCollector(['log'], async () => {
+ await bump();
+ });
+ expect(logs.filter(Boolean)).toEqual([
+ 'Checking for updates of @backstage/theme',
+ 'Checking for updates of @backstage/core',
+ 'Package info not found, ignoring package @backstage/theme',
+ 'Package info not found, ignoring package @backstage/core',
+ 'Checking for updates of @backstage/theme',
+ 'Checking for updates of @backstage/core',
+ 'Package info not found, ignoring package @backstage/theme',
+ 'Package info not found, ignoring package @backstage/core',
+ 'All Backstage packages are up to date!',
+ ]);
+
+ expect(runObj.run).toHaveBeenCalledTimes(0);
+
+ const lockfileContents = await fs.readFile('/yarn.lock', 'utf8');
+ expect(lockfileContents).toBe(lockfileMockResult);
+
+ const packageA = await fs.readJson('/packages/a/package.json');
+ expect(packageA).toEqual({
+ name: 'a',
+ dependencies: {
+ '@backstage/core': '^1.0.5', // not bumped
+ },
+ });
+ const packageB = await fs.readJson('/packages/b/package.json');
+ expect(packageB).toEqual({
+ name: 'b',
+ dependencies: {
+ '@backstage/core': '^1.0.3', // not bumped
+ '@backstage/theme': '^2.0.0', // not bumped
+ },
+ });
+ });
});
diff --git a/packages/cli/src/commands/versions/bump.ts b/packages/cli/src/commands/versions/bump.ts
index 441f65f353..ceb2f7f988 100644
--- a/packages/cli/src/commands/versions/bump.ts
+++ b/packages/cli/src/commands/versions/bump.ts
@@ -15,6 +15,7 @@
*/
import fs from 'fs-extra';
+import chalk from 'chalk';
import semver from 'semver';
import { resolve as resolvePath } from 'path';
import { run } from '../../lib/run';
@@ -35,6 +36,7 @@ const DEP_TYPES = [
type PkgVersionInfo = {
range: string;
+ target: string;
name: string;
location: string;
};
@@ -53,7 +55,16 @@ export default async () => {
// Track package versions that we want to remove from yarn.lock in order to trigger a bump
const unlocked = Array<{ name: string; range: string; target: string }>();
await workerThreads(16, dependencyMap.entries(), async ([name, pkgs]) => {
- const target = await findTargetVersion(name);
+ let target: string;
+ try {
+ target = await findTargetVersion(name);
+ } catch (error) {
+ if (error.name === 'NotFoundError') {
+ console.log(`Package info not found, ignoring package ${name}`);
+ return;
+ }
+ throw error;
+ }
for (const pkg of pkgs) {
if (semver.satisfies(target, pkg.range)) {
@@ -69,6 +80,7 @@ export default async () => {
name,
location: pkg.location,
range: `^${target}`, // TODO(Rugvip): Option to use something else than ^?
+ target,
}),
);
}
@@ -81,7 +93,16 @@ export default async () => {
return;
}
- const target = await findTargetVersion(name);
+ let target: string;
+ try {
+ target = await findTargetVersion(name);
+ } catch (error) {
+ if (error.name === 'NotFoundError') {
+ console.log(`Package info not found, ignoring package ${name}`);
+ return;
+ }
+ throw error;
+ }
for (const entry of lockfile.get(name) ?? []) {
// Ignore lockfile entries that don't satisfy the version range, since
@@ -98,9 +119,9 @@ export default async () => {
// Write all discovered version bumps to package.json in this repo
if (versionBumps.size === 0 && unlocked.length === 0) {
- console.log('All Backstage packages are up to date!');
+ console.log(chalk.green('All Backstage packages are up to date!'));
} else {
- console.log('Some packages are outdated, updating');
+ console.log(chalk.yellow('Some packages are outdated, updating'));
console.log();
if (unlocked.length > 0) {
@@ -115,7 +136,9 @@ export default async () => {
if (!removed.has(key)) {
removed.add(key);
console.log(
- `Removing lockfile entry for ${name}@${range} to bump to ${target}`,
+ `${chalk.magenta('unlocking')} ${name}@${chalk.yellow(
+ range,
+ )} ~> ${chalk.yellow(target)}`,
);
lockfile.remove(name, range);
}
@@ -123,16 +146,34 @@ export default async () => {
await lockfile.save();
}
+ const breakingUpdates = new Map();
await workerThreads(16, versionBumps.entries(), async ([name, deps]) => {
const pkgPath = resolvePath(deps[0].location, 'package.json');
const pkgJson = await fs.readJson(pkgPath);
for (const dep of deps) {
- console.log(`Bumping ${dep.name} in ${name} to ${dep.range}`);
+ console.log(
+ `${chalk.cyan('bumping')} ${dep.name} in ${chalk.cyan(
+ name,
+ )} to ${chalk.yellow(dep.range)}`,
+ );
for (const depType of DEP_TYPES) {
if (depType in pkgJson && dep.name in pkgJson[depType]) {
+ const oldRange = pkgJson[depType][dep.name];
pkgJson[depType][dep.name] = dep.range;
+
+ // Check if the update was at least a pre-v1 minor or post-v1 major release
+ const lockfileEntry = lockfile
+ .get(dep.name)
+ ?.find(entry => entry.range === oldRange);
+ if (lockfileEntry) {
+ const from = lockfileEntry.version;
+ const to = dep.target;
+ if (!semver.satisfies(to, `^${from}`)) {
+ breakingUpdates.set(dep.name, { from, to });
+ }
+ }
}
}
}
@@ -141,9 +182,42 @@ export default async () => {
});
console.log();
- console.log("Running 'yarn install' to install new versions");
+ console.log(
+ `Running ${chalk.blue('yarn install')} to install new versions`,
+ );
console.log();
await run('yarn', ['install']);
+
+ if (breakingUpdates.size > 0) {
+ console.log();
+ console.log(
+ chalk.yellow('⚠️ The following packages may have breaking changes:'),
+ );
+ console.log();
+
+ for (const name of Array.from(breakingUpdates.keys()).sort()) {
+ console.log(` ${chalk.yellow(name)}`);
+
+ let path;
+ if (name.startsWith('@backstage/plugin-')) {
+ path = `plugins/${name.replace('@backstage/plugin-', '')}`;
+ } else if (name.startsWith('@backstage/')) {
+ path = `packages/${name.replace('@backstage/', '')}`;
+ }
+ if (path) {
+ // TODO(Rugvip): Grab these URLs and paths from package.json, possibly verify existence
+ // Possibly invent new "changelog" field in package.json or some sh*t.
+ console.log(
+ ` https://github.com/backstage/backstage/blob/master/${path}/CHANGELOG.md`,
+ );
+ }
+ console.log();
+ }
+ } else {
+ console.log();
+ }
+
+ console.log(chalk.green('Version bump complete!'));
}
console.log();
diff --git a/packages/cli/src/lib/builder/config.ts b/packages/cli/src/lib/builder/config.ts
index 2e7847fdb1..a236e87806 100644
--- a/packages/cli/src/lib/builder/config.ts
+++ b/packages/cli/src/lib/builder/config.ts
@@ -62,7 +62,7 @@ export const makeConfigs = async (
output.push({
dir: 'dist',
entryFileNames: 'index.cjs.js',
- chunkFileNames: 'cjs/[name]-[hash].js',
+ chunkFileNames: 'cjs/[name]-[hash].cjs.js',
format: 'commonjs',
sourcemap: true,
});
@@ -71,7 +71,7 @@ export const makeConfigs = async (
output.push({
dir: 'dist',
entryFileNames: 'index.esm.js',
- chunkFileNames: 'esm/[name]-[hash].js',
+ chunkFileNames: 'esm/[name]-[hash].esm.js',
format: 'module',
sourcemap: true,
});
diff --git a/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.test.ts b/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.test.ts
index b4580ea281..f3906bfd0d 100644
--- a/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.test.ts
+++ b/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.test.ts
@@ -84,6 +84,23 @@ describe('LinkedPackageResolvePlugin', () => {
expect(callbackFalse).toHaveBeenCalledWith();
expect(doResolve).toHaveBeenCalledTimes(0);
+ // Internal modules with a path prefix of an external module
+ const callbackY = jest.fn();
+ tap(
+ {
+ request: path.resolve(root, 'external-aa/src/module.ts'),
+ path: path.resolve(root, 'external-aa/src'),
+ context: {
+ issuer: path.resolve(root, 'external-aa/src/index.ts'),
+ },
+ },
+ 'some-context',
+ callbackY,
+ );
+ expect(callbackY).toHaveBeenCalledTimes(1);
+ expect(callbackY).toHaveBeenCalledWith();
+ expect(doResolve).toHaveBeenCalledTimes(0);
+
// External modules have their path and issuer context rewritten, but not the request
const callbackA = jest.fn();
tap(
diff --git a/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.ts b/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.ts
index 86269a5828..0478337c61 100644
--- a/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.ts
+++ b/packages/cli/src/lib/bundler/LinkedPackageResolvePlugin.ts
@@ -16,6 +16,7 @@
import { resolve as resolvePath } from 'path';
import { ResolvePlugin } from 'webpack';
+import { isChildPath } from './paths';
import { LernaPackage } from './types';
// Enables proper resolution of packages when linking in external packages.
@@ -40,7 +41,7 @@ export class LinkedPackageResolvePlugin implements ResolvePlugin {
callback: () => void,
) => {
const pkg = this.packages.find(
- pkg => data.path && data.path.startsWith(pkg.location),
+ pkg => data.path && isChildPath(pkg.location, data.path),
);
if (!pkg) {
callback();
diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts
index 3c336401ee..c53a8329f5 100644
--- a/packages/cli/src/lib/bundler/config.ts
+++ b/packages/cli/src/lib/bundler/config.ts
@@ -24,7 +24,7 @@ import webpack from 'webpack';
import nodeExternals from 'webpack-node-externals';
import { optimization } from './optimization';
import { Config } from '@backstage/config';
-import { BundlingPaths } from './paths';
+import { BundlingPaths, isChildPath } from './paths';
import { transforms } from './transforms';
import { LinkedPackageResolvePlugin } from './LinkedPackageResolvePlugin';
import { BundlingOptions, BackendBundlingOptions, LernaPackage } from './types';
@@ -87,7 +87,9 @@ export async function createConfig(
const { plugins, loaders } = transforms(options);
// Any package that is part of the monorepo but outside the monorepo root dir need
// separate resolution logic.
- const externalPkgs = packages.filter(p => !p.location.startsWith(paths.root));
+ const externalPkgs = packages.filter(
+ p => !isChildPath(paths.root, p.location),
+ );
const baseUrl = frontendConfig.getString('app.baseUrl');
const validBaseUrl = new URL(baseUrl);
@@ -199,7 +201,9 @@ export async function createBackendConfig(
const moduleDirs = packages.map((p: any) =>
resolvePath(p.location, 'node_modules'),
);
- const externalPkgs = packages.filter(p => !p.location.startsWith(paths.root)); // See frontend config
+ const externalPkgs = packages.filter(
+ p => !isChildPath(paths.root, p.location),
+ ); // See frontend config
const { loaders } = transforms(options);
diff --git a/packages/cli/src/lib/bundler/paths.ts b/packages/cli/src/lib/bundler/paths.ts
index 390e41a345..f38416ca4e 100644
--- a/packages/cli/src/lib/bundler/paths.ts
+++ b/packages/cli/src/lib/bundler/paths.ts
@@ -15,8 +15,25 @@
*/
import fs from 'fs-extra';
+import path from 'path';
import { paths } from '../paths';
+/**
+ * Checks if dir is the same as or a child of base.
+ */
+export function isChildPath(base: string, dir: string): boolean {
+ const relativePath = path.relative(base, dir);
+ if (relativePath === '') {
+ // The same directory
+ return true;
+ }
+
+ const outsideBase = relativePath.startsWith('..'); // not outside base
+ const differentDrive = path.isAbsolute(relativePath); // on Windows, this means dir is on a different drive from base.
+
+ return !outsideBase && !differentDrive;
+}
+
export type BundlingPathsOptions = {
// bundle entrypoint, e.g. 'src/index'
entry: string;
diff --git a/packages/cli/src/lib/config.ts b/packages/cli/src/lib/config.ts
index 88aac1e33c..30469421d3 100644
--- a/packages/cli/src/lib/config.ts
+++ b/packages/cli/src/lib/config.ts
@@ -21,6 +21,7 @@ import { paths } from './paths';
type Options = {
args: string[];
fromPackage?: string;
+ mockEnv?: boolean;
};
export async function loadCliConfig(options: Options) {
@@ -40,7 +41,9 @@ export async function loadCliConfig(options: Options) {
});
const appConfigs = await loadConfig({
- env: process.env.APP_ENV ?? process.env.NODE_ENV ?? 'production',
+ experimentalEnvFunc: options.mockEnv
+ ? async name => process.env[name] || 'x'
+ : undefined,
configRoot: paths.targetRoot,
configPaths,
});
diff --git a/packages/cli/src/lib/errors.ts b/packages/cli/src/lib/errors.ts
index a1eab4c9e5..110a095fe3 100644
--- a/packages/cli/src/lib/errors.ts
+++ b/packages/cli/src/lib/errors.ts
@@ -44,3 +44,5 @@ export function exitWithError(error: Error): never {
process.exit(1);
}
}
+
+export class NotFoundError extends CustomError {}
diff --git a/packages/cli/src/lib/versioning/packages.test.ts b/packages/cli/src/lib/versioning/packages.test.ts
index b0f1c46e8a..5af040809a 100644
--- a/packages/cli/src/lib/versioning/packages.test.ts
+++ b/packages/cli/src/lib/versioning/packages.test.ts
@@ -19,6 +19,7 @@ import path from 'path';
import * as runObj from '../run';
import { paths } from '../paths';
import { fetchPackageInfo, mapDependencies } from './packages';
+import { NotFoundError } from '../errors';
describe('fetchPackageInfo', () => {
afterEach(() => {
@@ -40,6 +41,14 @@ describe('fetchPackageInfo', () => {
'my-package',
);
});
+
+ it('should throw if no info', async () => {
+ jest.spyOn(runObj, 'runPlain').mockResolvedValue('');
+
+ await expect(fetchPackageInfo('my-package')).rejects.toThrow(
+ new NotFoundError(`No package information found for package my-package`),
+ );
+ });
});
describe('mapDependencies', () => {
diff --git a/packages/cli/src/lib/versioning/packages.ts b/packages/cli/src/lib/versioning/packages.ts
index 76e5dc49b0..991a4d23ef 100644
--- a/packages/cli/src/lib/versioning/packages.ts
+++ b/packages/cli/src/lib/versioning/packages.ts
@@ -15,6 +15,7 @@
*/
import { runPlain } from '../../lib/run';
+import { NotFoundError } from '../errors';
const PREFIX = '@backstage';
@@ -49,6 +50,11 @@ export async function fetchPackageInfo(
name: string,
): Promise {
const output = await runPlain('yarn', 'info', '--json', name);
+
+ if (!output) {
+ throw new NotFoundError(`No package information found for package ${name}`);
+ }
+
const info = JSON.parse(output) as YarnInfo;
if (info.type !== 'inspect') {
throw new Error(`Received unknown yarn info for ${name}, ${output}`);
diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md
index 30891c2dd9..a5e34ad91e 100644
--- a/packages/config-loader/CHANGELOG.md
+++ b/packages/config-loader/CHANGELOG.md
@@ -1,5 +1,26 @@
# @backstage/config-loader
+## 0.4.1
+
+### Patch Changes
+
+- ad5c56fd9: Deprecate `$data` and replace it with `$include` which allows for any type of json value to be read from external files. In addition, `$include` can be used without a path, which causes the value at the root of the file to be loaded.
+
+ Most usages of `$data` can be directly replaced with `$include`, except if the referenced value is not a string, in which case the value needs to be changed. For example:
+
+ ```yaml
+ # app-config.yaml
+ foo:
+ $data: foo.yaml#myValue # replacing with $include will turn the value into a number
+ $data: bar.yaml#myValue # replacing with $include is safe
+
+ # foo.yaml
+ myValue: 0xf00
+
+ # bar.yaml
+ myValue: bar
+ ```
+
## 0.4.0
### Minor Changes
diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json
index 3e2c58c676..476c57b014 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.4.0",
+ "version": "0.4.1",
"private": false,
"publishConfig": {
"access": "public",
@@ -36,7 +36,7 @@
"fs-extra": "^9.0.0",
"json-schema": "^0.2.5",
"json-schema-merge-allof": "^0.7.0",
- "typescript-json-schema": "^0.45.0",
+ "typescript-json-schema": "^0.47.0",
"yaml": "^1.9.2",
"yup": "^0.29.3"
},
diff --git a/packages/config-loader/src/lib/index.ts b/packages/config-loader/src/lib/index.ts
index ceb7c34222..192ac81f5d 100644
--- a/packages/config-loader/src/lib/index.ts
+++ b/packages/config-loader/src/lib/index.ts
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-export { readConfigFile } from './reader';
export { readEnvConfig } from './env';
-export { readSecret } from './secrets';
+export * from './transform';
export * from './schema';
diff --git a/packages/config-loader/src/lib/reader.test.ts b/packages/config-loader/src/lib/reader.test.ts
deleted file mode 100644
index a0a8495714..0000000000
--- a/packages/config-loader/src/lib/reader.test.ts
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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 { readConfigFile } from './reader';
-import { ReaderContext, ReadSecretFunc } from './types';
-
-function memoryFiles(files: { [path: string]: string }) {
- return async (path: string) => {
- if (path in files) {
- return files[path];
- }
- throw new Error(`File not found, ${path}`);
- };
-}
-
-const mockContext: ReaderContext = {
- env: {},
- readFile: jest.fn(),
- readSecret: jest.fn(),
-};
-
-describe('readConfigFile', () => {
- it('should read a plain config file', async () => {
- const readFile = memoryFiles({
- './app-config.yaml':
- 'app: { title: "Test", x: 1, y: [null, true], z: null }',
- });
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- });
-
- await expect(config).resolves.toEqual({
- data: {
- app: {
- title: 'Test',
- x: 1,
- y: [true],
- },
- },
- context: 'app-config.yaml',
- });
- });
-
- it('should error out if the config file has invalid syntax', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': 'app: { title: ]',
- });
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- });
-
- await expect(config).rejects.toThrow('Flow map contains an unexpected ]');
- });
-
- it('should error out if config is not an object', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': '[]',
- });
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- });
-
- await expect(config).rejects.toThrow('Expected object at config root');
- });
-
- it('should read secrets', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': 'app: { $file: "./my-secret" }',
- });
- const readSecret = jest.fn().mockResolvedValue('secret');
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- readSecret: readSecret as ReadSecretFunc,
- });
-
- await expect(config).resolves.toEqual({
- data: {
- app: 'secret',
- },
- context: 'app-config.yaml',
- });
- expect(readSecret).toHaveBeenCalledWith('.app', {
- file: './my-secret',
- });
- });
-
- it('should not allow keys adjacent to secrets', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': 'app: { extraKey: 3, $file: "./my-secret" }',
- });
- const readSecret = jest.fn().mockResolvedValue('secret');
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- readSecret: readSecret as ReadSecretFunc,
- });
-
- await expect(config).rejects.toThrow(
- "Secret key '$file' has adjacent keys at .app",
- );
- expect(readSecret).not.toHaveBeenCalled();
- });
-
- it('should read deprecated secrets', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': 'app: { $secret: { file: "./my-secret" } }',
- });
- const readSecret = jest.fn().mockResolvedValue('secret');
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- readSecret: readSecret as ReadSecretFunc,
- });
-
- await expect(config).resolves.toEqual({
- data: {
- app: 'secret',
- },
- context: 'app-config.yaml',
- });
- expect(readSecret).toHaveBeenCalledWith('.app', {
- file: './my-secret',
- });
- });
-
- it('should require deprecated secrets to be objects', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': 'app: { $secret: ["wrong-type"] }',
- });
- const readSecret = jest.fn().mockResolvedValue('secret');
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- readSecret: readSecret as ReadSecretFunc,
- });
-
- expect(readSecret).not.toHaveBeenCalled();
- await expect(config).rejects.toThrow(
- 'Expected object at secret .app.$secret',
- );
- });
-
- it('should forward secret reading errors', async () => {
- const readFile = memoryFiles({
- './app-config.yaml': 'app: { $secret: {} }',
- });
- const readSecret = jest.fn().mockRejectedValue(new Error('NOPE'));
-
- const config = readConfigFile('./app-config.yaml', {
- ...mockContext,
- readFile,
- readSecret: readSecret as ReadSecretFunc,
- });
-
- await expect(config).rejects.toThrow('Invalid secret at .app: NOPE');
- });
-});
diff --git a/packages/config-loader/src/lib/reader.ts b/packages/config-loader/src/lib/reader.ts
deleted file mode 100644
index 9eba58be97..0000000000
--- a/packages/config-loader/src/lib/reader.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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 { AppConfig, JsonObject, JsonValue } from '@backstage/config';
-import { basename } from 'path';
-import yaml from 'yaml';
-import { ReaderContext } from './types';
-import { isObject } from './utils';
-
-/**
- * Reads and parses, and validates, and transforms a single config file.
- * The transformation rewrites any special values, like the $secret key.
- */
-export async function readConfigFile(
- filePath: string,
- ctx: ReaderContext,
-): Promise {
- const configYaml = await ctx.readFile(filePath);
- const config = yaml.parse(configYaml);
-
- const context = basename(filePath);
-
- async function transform(
- obj: JsonValue,
- path: string,
- ): Promise {
- if (typeof obj !== 'object') {
- return obj;
- } else if (obj === null) {
- return undefined;
- } else if (Array.isArray(obj)) {
- const arr = new Array();
-
- for (const [index, value] of obj.entries()) {
- const out = await transform(value, `${path}[${index}]`);
- if (out !== undefined) {
- arr.push(out);
- }
- }
-
- return arr;
- }
-
- // TODO(Rugvip): This form of declaring secrets is deprecated, warn and remove in the future
- if ('$secret' in obj) {
- console.warn(
- `Deprecated secret declaration at '${path}' in '${context}', use $env, $file, etc. instead`,
- );
- if (!isObject(obj.$secret)) {
- throw TypeError(`Expected object at secret ${path}.$secret`);
- }
-
- try {
- return await ctx.readSecret(path, obj.$secret);
- } catch (error) {
- throw new Error(`Invalid secret at ${path}: ${error.message}`);
- }
- }
-
- // Check if there's any key that starts with a '$', in that case we treat
- // this entire object as a secret.
- const [secretKey] = Object.keys(obj).filter(key => key.startsWith('$'));
- if (secretKey) {
- if (Object.keys(obj).length !== 1) {
- throw new Error(
- `Secret key '${secretKey}' has adjacent keys at ${path}`,
- );
- }
- try {
- return await ctx.readSecret(path, {
- [secretKey.slice(1)]: obj[secretKey],
- });
- } catch (error) {
- throw new Error(`Invalid secret at ${path}: ${error.message}`);
- }
- }
-
- const out: JsonObject = {};
-
- for (const [key, value] of Object.entries(obj)) {
- // undefined covers optional fields
- if (value !== undefined) {
- const result = await transform(value, `${path}.${key}`);
- if (result !== undefined) {
- out[key] = result;
- }
- }
- }
-
- return out;
- }
-
- const finalConfig = await transform(config, '');
- if (!isObject(finalConfig)) {
- throw new TypeError('Expected object at config root');
- }
- return { data: finalConfig, context };
-}
diff --git a/packages/config-loader/src/lib/secrets.test.ts b/packages/config-loader/src/lib/secrets.test.ts
deleted file mode 100644
index d80ada193b..0000000000
--- a/packages/config-loader/src/lib/secrets.test.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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 { readSecret } from './secrets';
-import { ReaderContext } from './types';
-
-const ctx: ReaderContext = {
- env: {
- SECRET: 'my-secret',
- },
- readSecret: jest.fn(),
- async readFile(path) {
- const content = ({
- 'my-secret': 'secret',
- 'my-data.json': '{"a":{"b":{"c":42}}}',
- 'my-data.yaml': 'some:\n yaml:\n key: 7',
- 'my-data.yml': 'different: { key: hello }',
- } as { [key: string]: string })[path];
-
- if (!content) {
- throw new Error('File not found!');
- }
- return content;
- },
-};
-
-describe('readSecret', () => {
- it('should read file secrets', async () => {
- await expect(readSecret({ file: 'my-secret' }, ctx)).resolves.toBe(
- 'secret',
- );
- await expect(readSecret({ file: 'no-secret' }, ctx)).rejects.toThrow(
- 'File not found!',
- );
- });
-
- it('should read present env secrets', async () => {
- await expect(readSecret({ env: 'SECRET' }, ctx)).resolves.toBe('my-secret');
- await expect(readSecret({ env: 'NO_SECRET' }, ctx)).resolves.toBe(
- undefined,
- );
- });
-
- it('should read data secrets', async () => {
- // Deprecated object form
- await expect(
- readSecret({ data: 'my-data.json', path: 'a.b.c' }, ctx),
- ).resolves.toBe('42');
- await expect(
- readSecret({ data: 'my-data.yaml', path: 'some.yaml.key' }, ctx),
- ).resolves.toBe('7');
- await expect(
- readSecret({ data: 'my-data.yml', path: 'different.key' }, ctx),
- ).resolves.toBe('hello');
- await expect(
- readSecret({ data: 'no-data.yml', path: 'different.key' }, ctx),
- ).rejects.toThrow('File not found!');
-
- // New format with path in fragment
- await expect(readSecret({ data: 'my-data.json#a.b.c' }, ctx)).resolves.toBe(
- '42',
- );
- await expect(
- readSecret({ data: 'my-data.yaml#some.yaml.key' }, ctx),
- ).resolves.toBe('7');
- await expect(
- readSecret({ data: 'my-data.yml#different.key' }, ctx),
- ).resolves.toBe('hello');
- await expect(
- readSecret({ data: 'no-data.yml#different.key' }, ctx),
- ).rejects.toThrow('File not found!');
- });
-
- it('should reject invalid secrets', async () => {
- await expect(readSecret('hello' as any, ctx)).rejects.toThrow(
- 'secret must be a `object` type, but the final value was: `"hello"`.',
- );
- await expect(readSecret({}, ctx)).rejects.toThrow(
- "Secret must contain one of 'file', 'env', 'data'",
- );
- await expect(readSecret({ unknown: 'derp' }, ctx)).rejects.toThrow(
- "Secret must contain one of 'file', 'env', 'data'",
- );
- await expect(readSecret({ data: 'no-data.yml' }, ctx)).rejects.toThrow(
- "Invalid format for data secret value, must be of the form #, got 'no-data.yml'",
- );
- await expect(
- readSecret({ data: 'no-parser.js', path: '.' }, ctx),
- ).rejects.toThrow('No data secret parser available for extension .js');
- await expect(
- readSecret({ data: 'my-data.yaml', path: 'some.wrong.yaml.key' }, ctx),
- ).rejects.toThrow('Value is not an object at some.wrong in my-data.yaml');
- });
-
- it('should have 100% test coverage', async () => {
- let firstVisit = true;
- const secret = {};
- const proto = {
- get file() {
- if (!firstVisit) {
- Object.setPrototypeOf(secret, {});
- }
- firstVisit = false;
- return 'a-file';
- },
- };
- Object.setPrototypeOf(secret, proto);
-
- await expect(readSecret(secret, ctx)).rejects.toThrow(
- 'Secret was left unhandled',
- );
- });
-});
diff --git a/packages/config-loader/src/lib/secrets.ts b/packages/config-loader/src/lib/secrets.ts
deleted file mode 100644
index 97f0de2940..0000000000
--- a/packages/config-loader/src/lib/secrets.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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 * as yup from 'yup';
-import yaml from 'yaml';
-import { extname } from 'path';
-import { JsonObject, JsonValue } from '@backstage/config';
-import { isObject, isNever } from './utils';
-import { ReaderContext } from './types';
-
-// Reads a file and forwards the contents as is, assuming ut8 encoding
-type FileSecret = {
- // Path to the secret file, relative to the config file.
- file: string;
-};
-
-// Reads the secret from an environment variable.
-type EnvSecret = {
- // The name of the environment file.
- env: string;
-};
-
-// Reads a secret from a json-like file and extracts a value at a path.
-// The supported extensions are define in dataSecretParser below.
-type DataSecret = {
- // Path to the data secret file, relative to the config file.
- data: string;
- // The path to the value inside the data file, each element separated by '.'.
- path?: string;
-};
-
-type Secret = FileSecret | EnvSecret | DataSecret;
-
-// Schema for each type of secret description
-const secretLoaderSchemas = {
- file: yup.object({
- file: yup.string().required(),
- }),
- env: yup.object({
- env: yup.string().required(),
- }),
- data: yup.object({
- data: yup.string().required(),
- }),
-};
-
-// The top-level secret schema, which figures out what type of secret it is.
-const secretSchema = yup.lazy