feat: allow customizing config watch file
Signed-off-by: Antonio Musolino <antoniomusolino007@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-app-api': patch
|
||||
---
|
||||
|
||||
Add the possibility to disable watching files in the new backend system
|
||||
@@ -273,6 +273,8 @@ export function readHttpServerOptions(config?: Config): HttpServerOptions;
|
||||
export interface RootConfigFactoryOptions {
|
||||
argv?: string[];
|
||||
remote?: Pick<RemoteConfigSourceOptions, 'reloadInterval'>;
|
||||
// (undocumented)
|
||||
watch?: boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
+2
@@ -34,6 +34,7 @@ export interface RootConfigFactoryOptions {
|
||||
* Enables and sets options for remote configuration loading.
|
||||
*/
|
||||
remote?: Pick<RemoteConfigSourceOptions, 'reloadInterval'>;
|
||||
watch?: boolean;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
@@ -45,6 +46,7 @@ export const rootConfigServiceFactory = createServiceFactory(
|
||||
const source = ConfigSources.default({
|
||||
argv: options?.argv,
|
||||
remote: options?.remote,
|
||||
watch: options?.watch,
|
||||
});
|
||||
console.log(`Loading config from ${source}`);
|
||||
return await ConfigSources.toConfig(source);
|
||||
|
||||
Reference in New Issue
Block a user