@backstage/backend-defaults
Version:
Backend defaults used by Backstage backend apps
40 lines (36 loc) • 1.47 kB
TypeScript
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
import { LoggerService } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { ConfigSchema, RemoteConfigSourceOptions } from '@backstage/config-loader';
/** @public */
declare function createConfigSecretEnumerator(options: {
logger: LoggerService;
dir?: string;
schema?: ConfigSchema;
}): Promise<(config: Config) => Iterable<string>>;
/**
* Access to static configuration.
*
* See {@link @backstage/code-plugin-api#RootConfigService}
* and {@link https://backstage.io/docs/backend-system/core-services/root-config | the service docs}
* for more information.
*
* @public
*/
interface RootConfigFactoryOptions {
/**
* Process arguments to use instead of the default `process.argv()`.
*/
argv?: string[];
/**
* Enables and sets options for remote configuration loading.
*/
remote?: Pick<RemoteConfigSourceOptions, 'reloadInterval'>;
watch?: boolean;
}
/**
* @public
*/
declare const rootConfigServiceFactory: ((options?: RootConfigFactoryOptions) => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootConfigService, "root", "singleton">) & _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.RootConfigService, "root", "singleton">;
export { createConfigSecretEnumerator, rootConfigServiceFactory };
export type { RootConfigFactoryOptions };