@aerogear/app
Advanced tools
Comparing version 2.1.0-rc2 to 2.1.0-rc3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@aerogear/core"); | ||
var AeroGearApp = /** @class */ (function () { | ||
function AeroGearApp(config) { | ||
this.config = new core_1.ConfigurationService(config); | ||
var metricsConfig = this.config.getConfigByType(core_1.MetricsService.TYPE); | ||
if (metricsConfig) { | ||
var metricsOptions = { | ||
configuration: metricsConfig | ||
}; | ||
this.metrics = new core_1.MetricsService(metricsOptions); | ||
} | ||
} | ||
return AeroGearApp; | ||
}()); | ||
exports.AeroGearApp = AeroGearApp; | ||
/** | ||
@@ -10,4 +24,4 @@ * Initialize all platform SDK's by using configuration generated by AeroGear command line client | ||
exports.init = function (config) { | ||
return core_1.INSTANCE.init(config); | ||
return new AeroGearApp(config); | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@aerogear/app", | ||
"version": "2.1.0-rc2", | ||
"version": "2.1.0-rc3", | ||
"description": "Aero Gear SDK application module", | ||
@@ -34,4 +34,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@aerogear/core": "2.1.0-rc2" | ||
"@aerogear/core": "2.1.0-rc3" | ||
} | ||
} |
@@ -0,4 +1,20 @@ | ||
import { AeroGearConfiguration, ConfigurationService, MetricsService } from "@aerogear/core"; | ||
import { AeroGearConfiguration, INSTANCE } from "@aerogear/core"; | ||
export class AeroGearApp { | ||
public metrics?: MetricsService; | ||
public config?: ConfigurationService; | ||
constructor(config: AeroGearConfiguration) { | ||
this.config = new ConfigurationService(config); | ||
const metricsConfig = this.config.getConfigByType(MetricsService.TYPE); | ||
if (metricsConfig) { | ||
const metricsOptions = { | ||
configuration: metricsConfig | ||
}; | ||
this.metrics = new MetricsService(metricsOptions); | ||
} | ||
} | ||
} | ||
/** | ||
@@ -9,4 +25,4 @@ * Initialize all platform SDK's by using configuration generated by AeroGear command line client | ||
*/ | ||
export const init = (config: AeroGearConfiguration): void => { | ||
return INSTANCE.init(config); | ||
export const init = (config: AeroGearConfiguration): AeroGearApp => { | ||
return new AeroGearApp(config); | ||
}; |
@@ -1,2 +0,7 @@ | ||
import { AeroGearConfiguration } from "@aerogear/core"; | ||
import { AeroGearConfiguration, ConfigurationService, MetricsService } from "@aerogear/core"; | ||
export declare class AeroGearApp { | ||
metrics?: MetricsService; | ||
config?: ConfigurationService; | ||
constructor(config: AeroGearConfiguration); | ||
} | ||
/** | ||
@@ -7,2 +12,2 @@ * Initialize all platform SDK's by using configuration generated by AeroGear command line client | ||
*/ | ||
export declare const init: (config: AeroGearConfiguration) => void; | ||
export declare const init: (config: AeroGearConfiguration) => AeroGearApp; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4164
70
+ Added@aerogear/core@2.1.0-rc3(transitive)
- Removed@aerogear/core@2.1.0-rc2(transitive)
Updated@aerogear/core@2.1.0-rc3