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

@@ -15,7 +15,7 @@ export class CloudlyConfig {
this.cloudlyRef = cloudlyRefArg;
}
public async init() {
public async init(configArg?: plugins.servezoneInterfaces.data.ICloudlyConfig) {
this.appData =
await plugins.npmextra.AppData.createAndInit<plugins.servezoneInterfaces.data.ICloudlyConfig>(
{
@@ -54,6 +54,7 @@ export class CloudlyConfig {
'environment',
'mongoDescriptor',
],
overwriteObject: configArg,
},
);