cli: include root package in schema search + update docs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Configuration schema is now also collected from the root `package.json` if it exists.
|
||||
@@ -13,9 +13,10 @@ which during validation is stitched together into a single schema.
|
||||
## Schema Collection and Definition
|
||||
|
||||
Schemas are collected from all packages and dependencies in each repo that are a
|
||||
part of the Backstage ecosystem, including transitive dependencies. The current
|
||||
definition of "part of the ecosystem" is that a package has at least one
|
||||
dependency in the `@backstage` namespace, but this is subject to change.
|
||||
part of the Backstage ecosystem, including the root package and transitive
|
||||
dependencies. The current definition of "part of the ecosystem" is that a
|
||||
package has at least one dependency in the `@backstage` namespace or a
|
||||
`"configSchema"` field in `package.json`, but this is subject to change.
|
||||
|
||||
Each package is searched for a schema at a single point of entry, a top-level
|
||||
`"configSchema"` field in `package.json`. The field can either contain an
|
||||
|
||||
@@ -39,6 +39,8 @@ export async function loadCliConfig(options: Options) {
|
||||
|
||||
const schema = await loadConfigSchema({
|
||||
dependencies: localPackageNames,
|
||||
// Include the package.json in the project root if it exists
|
||||
packagePaths: [paths.resolveTargetRoot('package.json')],
|
||||
});
|
||||
|
||||
const appConfigs = await loadConfig({
|
||||
|
||||
Reference in New Issue
Block a user