UNPKG

@backstage/cli

Version:

CLI for developing Backstage plugins and apps

44 lines (40 loc) 2.34 kB
'use strict'; var lazy = require('../../lib/lazy.cjs.js'); const configOption = [ "--config <path>", "Config files to load instead of app-config.yaml", (opt, opts) => opts ? [...opts, opt] : [opt], Array() ]; function registerCommands(program) { program.command("config:docs").option( "--package <name>", "Only include the schema that applies to the given package" ).description("Browse the configuration reference documentation").action(lazy.lazy(() => import('./commands/docs.cjs.js'), "default")); program.command("config:print").option( "--package <name>", "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( "--format <format>", "Format to print the configuration in, either json or yaml [yaml]" ).option(...configOption).description("Print the app configuration for the current package").action(lazy.lazy(() => import('./commands/print.cjs.js'), "default")); program.command("config:check").option( "--package <name>", "Only load config schema that applies to the given package" ).option("--lax", "Do not require environment variables to be set").option("--frontend", "Only validate the frontend configuration").option("--deprecated", "Output deprecated configuration settings").option( "--strict", "Enable strict config validation, forbidding errors and unknown keys" ).option(...configOption).description( "Validate that the given configuration loads and matches schema" ).action(lazy.lazy(() => import('./commands/validate.cjs.js'), "default")); program.command("config:schema").option( "--package <name>", "Only output config schema that applies to the given package" ).option( "--format <format>", "Format to print the schema in, either json or yaml [yaml]" ).option("--merge", "Print the config schemas merged", true).option("--no-merge", "Print the config schemas not merged").description("Print configuration schema").action(lazy.lazy(() => import('./commands/schema.cjs.js'), "default")); } exports.configOption = configOption; exports.registerCommands = registerCommands; //# sourceMappingURL=index.cjs.js.map