Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcma/client

Package Overview
Dependencies
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcma/client - npm Package Compare versions

Comparing version 0.14.8 to 0.15.0

1

dist/lib/auth/auth-provider.d.ts

@@ -9,2 +9,3 @@ import { Authenticator } from "./authenticator";

get(authType: string): Authenticator;
getDefault(): Authenticator;
}

@@ -31,3 +31,9 @@ "use strict";

}
getDefault() {
if (Object.keys(this.registeredAuthTypes).length === 1) {
return this.registeredAuthTypes[Object.keys(this.registeredAuthTypes)[0]];
}
return null;
}
}
exports.AuthProvider = AuthProvider;

4

dist/lib/resources/config-variables-ext.js

@@ -7,6 +7,6 @@ "use strict";

return {
servicesUrl: configVariables.get("ServicesUrl"),
servicesAuthType: configVariables.getOptional("ServicesAuthType"),
serviceRegistryUrl: configVariables.get("MCMA_SERVICE_REGISTRY_URL"),
serviceRegistryAuthType: configVariables.getOptional("MCMA_SERVICE_REGISTRY_AUTH_TYPE"),
};
}
exports.getResourceManagerConfig = getResourceManagerConfig;
import { HttpClientConfig } from "../http";
export interface ResourceManagerConfig {
servicesUrl: string;
servicesAuthType?: string;
serviceRegistryUrl: string;
serviceRegistryAuthType?: string;
httpClientConfig?: HttpClientConfig;
}

@@ -12,3 +12,3 @@ import { McmaResource, McmaResourceType, NotificationEndpointProperties } from "@mcma/core";

private authProvider;
private httpClient;
private readonly httpClient;
private serviceClients;

@@ -15,0 +15,0 @@ constructor(config: ResourceManagerConfig, authProvider: AuthProvider);

@@ -16,7 +16,10 @@ "use strict";

this.authProvider = authProvider;
this.httpClient = new http_1.HttpClient();
this.serviceClients = [];
if (!config.servicesUrl) {
throw new core_1.McmaException("Missing property 'servicesUrl' in ResourceManager config");
if (!config.serviceRegistryUrl) {
throw new core_1.McmaException("Missing property 'serviceRegistryUrl' in ResourceManager config");
}
if (config.serviceRegistryUrl.endsWith("/")) {
config.serviceRegistryUrl = config.serviceRegistryUrl.substring(0, config.serviceRegistryUrl.length - 1);
}
this.httpClient = new http_1.HttpClient(authProvider.getDefault(), config.httpClientConfig);
}

@@ -28,7 +31,11 @@ async init() {

name: "Service Registry",
authType: this.config.serviceRegistryAuthType,
resources: [
new core_1.ResourceEndpoint({
resourceType: "Service",
httpEndpoint: this.config.servicesUrl,
authType: this.config.servicesAuthType,
httpEndpoint: this.config.serviceRegistryUrl + "/services",
}),
new core_1.ResourceEndpoint({
resourceType: "JobProfile",
httpEndpoint: this.config.serviceRegistryUrl + "/job-profiles",
})

@@ -35,0 +42,0 @@ ]

{
"name": "@mcma/client",
"version": "0.14.8",
"version": "0.15.0",
"description": "Node module with classes and functions used to access services in an MCMA environment",
"engines": {
"node": "^14.17.0"
"node": "^16.0.0"
},

@@ -35,9 +35,9 @@ "type": "commonjs",

"peerDependencies": {
"@mcma/core": "0.14.8"
"@mcma/core": "0.15.0"
},
"devDependencies": {
"@mcma/core": "0.14.8",
"@types/node": "^14.17.22",
"@mcma/core": "0.15.0",
"@types/node": "^16.11.60",
"jasmine": "^3.3.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc