@mcma/client
Advanced tools
Comparing version 0.13.15 to 0.13.16
@@ -1,2 +0,2 @@ | ||
export * from "./context-variable-provider-ext"; | ||
export * from "./environment-variables-ext"; | ||
export * from "./resource-endpoint-client"; | ||
@@ -3,0 +3,0 @@ export * from "./resource-manager-config"; |
@@ -13,3 +13,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./context-variable-provider-ext"), exports); | ||
__exportStar(require("./environment-variables-ext"), exports); | ||
__exportStar(require("./resource-endpoint-client"), exports); | ||
@@ -16,0 +16,0 @@ __exportStar(require("./resource-manager-config"), exports); |
@@ -1,2 +0,2 @@ | ||
import { ContextVariableProvider } from "@mcma/core"; | ||
import { EnvironmentVariables } from "@mcma/core"; | ||
import { AuthProvider } from "../auth"; | ||
@@ -9,3 +9,3 @@ import { ResourceManagerConfig } from "./resource-manager-config"; | ||
constructor(authProvider: AuthProvider, defaultConfig?: ResourceManagerConfig); | ||
get(config?: ResourceManagerConfig | ContextVariableProvider): ResourceManager; | ||
get(config?: ResourceManagerConfig | EnvironmentVariables): ResourceManager; | ||
} |
@@ -6,6 +6,3 @@ "use strict"; | ||
const resource_manager_1 = require("./resource-manager"); | ||
const context_variable_provider_ext_1 = require("./context-variable-provider-ext"); | ||
function isContextVariableProvider(configOrVariableProvider) { | ||
return configOrVariableProvider.getRequiredContextVariable !== undefined; | ||
} | ||
const environment_variables_ext_1 = require("./environment-variables-ext"); | ||
class ResourceManagerProvider { | ||
@@ -19,6 +16,6 @@ constructor(authProvider, defaultConfig) { | ||
if (!config) { | ||
config = new core_1.EnvironmentVariableProvider(); | ||
config = core_1.EnvironmentVariables.getInstance(); | ||
} | ||
if (isContextVariableProvider(config)) { | ||
config = context_variable_provider_ext_1.getResourceManagerConfig(config); | ||
if (config instanceof core_1.EnvironmentVariables) { | ||
config = environment_variables_ext_1.getResourceManagerConfig(config); | ||
} | ||
@@ -25,0 +22,0 @@ if (!config) { |
@@ -132,3 +132,3 @@ "use strict"; | ||
else { | ||
throw new core_1.McmaException("ResourceManager: Resource has illegal type '" + resolvedType + "'"); | ||
throw new core_1.McmaException("ResourceManager: Resource at '" + resource + "' has illegal type '" + resolvedType + "'"); | ||
} | ||
@@ -135,0 +135,0 @@ return resolvedResource; |
{ | ||
"name": "@mcma/client", | ||
"version": "0.13.15", | ||
"version": "0.13.16", | ||
"description": "Node module with classes and functions used to access services in an MCMA environment", | ||
@@ -35,6 +35,6 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/core": "0.13.15" | ||
"@mcma/core": "0.13.16" | ||
}, | ||
"devDependencies": { | ||
"@mcma/core": "0.13.15", | ||
"@mcma/core": "0.13.16", | ||
"@types/node": "^13.7.4", | ||
@@ -41,0 +41,0 @@ "jasmine": "^3.3.1" |
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
39003
849