fix(core): Fix configuration initialization by accepting a config argument
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/cloudly',
|
||||
version: '4.3.2',
|
||||
version: '4.3.3',
|
||||
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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,
|
||||
},
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user