fix(core): Fix configuration initialization by accepting a config argument

This commit is contained in:
2024-11-05 21:31:15 +01:00
parent 7eb6bf794c
commit b5433e412f
8 changed files with 60 additions and 53 deletions

View File

@@ -60,7 +60,8 @@ export class Cloudly {
private readyDeferred = new plugins.smartpromise.Deferred();
constructor() {
private configOptions: plugins.servezoneInterfaces.data.ICloudlyConfig;
constructor(configArg?: plugins.servezoneInterfaces.data.ICloudlyConfig) {
this.cloudlyInfo = new CloudlyInfo(this);
this.config = new CloudlyConfig(this);
@@ -90,7 +91,7 @@ export class Cloudly {
*/
public async start() {
// config
await this.config.init();
await this.config.init(this.configOptions);
// manageers
await this.authManager.start();